/* =========================================================
   课件商店 · 浅色版（分类与浏览方式参考国家中小学智慧教育平台）
   顶部：内容类型 + 逐级筛选；选定一册后左侧教材目录；课件卡片格子
   ========================================================= */
html:has(body.store-page) { color-scheme: light; background: #f3f6fb; }

.store-page {
  --s-bg: #f3f6fb;
  --s-panel: #ffffff;
  --s-panel-2: #eaf1fb;
  --s-line: #e2e8f1;
  --s-text: #1f2a3d;
  --s-muted: #5b6b82;
  --s-dim: #8a97ab;
  --s-accent: #2f7cf6;
  --s-accent-dark: #1f63d6;
  --s-accent-soft: rgba(47, 124, 246, .1);
  --s-cta: #ff8a3d;
  --s-cta-dark: #f2690f;
  --s-free: #1fa971;
  --s-radius: 14px;
  --s-shadow: 0 2px 6px rgba(31, 42, 61, .05), 0 10px 26px rgba(31, 42, 61, .07);
  --s-shadow-hover: 0 6px 14px rgba(31, 42, 61, .08), 0 18px 40px rgba(31, 42, 61, .12);
  margin: 0;
  color: var(--s-text);
  background: var(--s-bg);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.store-page button { cursor: pointer; }
.store-page a { color: inherit; }
.store-wrap { width: min(1840px, 100% - clamp(32px, 5vw, 96px)); margin-inline: auto; }

/* ---------- 顶部导航 ---------- */
.store-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--s-line);
  box-shadow: 0 2px 12px rgba(31, 42, 61, .04);
}
.store-nav-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.store-brand { display: flex; align-items: center; gap: 12px; flex: none; text-decoration: none; }
.store-brand .brand-mark { flex: none; width: 44px; height: 44px; transform: none; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 6px 12px rgba(76, 100, 240, .28)); }
.brand-text { display: grid; line-height: 1.25; }
.brand-text b { color: var(--s-text); font-size: 20px; letter-spacing: .02em; }
.brand-text small { color: var(--s-muted); font-size: 13px; }

/* min-width:0 + input width:100%：窄屏手机上搜索框要能缩，否则顶栏把整页撑宽、能左右滑动 */
.store-search { position: relative; display: flex; flex: 1; min-width: 0; max-width: 560px; margin-left: auto; }
.store-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--s-dim);
  transform: translateY(-50%);
}
.store-search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--s-line);
  border-right: 0;
  border-radius: 22px 0 0 22px;
  color: var(--s-text);
  background: #f6f8fc;
  font-size: 16px;
  outline: none;
}
.store-search input:focus { border-color: var(--s-accent); background: #fff; }
.store-search button {
  padding: 0 22px;
  border: 0;
  border-radius: 0 22px 22px 0;
  color: #fff;
  background: var(--s-accent);
  font-size: 15px;
  font-weight: 700;
}
.store-search button:hover { background: var(--s-accent-dark); }
.store-account { display: flex; align-items: center; gap: 10px; flex: none; }
.store-account form { margin: 0; }
.nav-button {
  height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 21px;
  color: #fff;
  background: var(--s-accent);
  font-size: 15px;
  font-weight: 700;
}
.nav-button:hover { background: var(--s-accent-dark); }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--s-line);
  border-radius: 21px;
  color: var(--s-text);
  background: var(--s-panel);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover { border-color: var(--s-accent); color: var(--s-accent); }
.nav-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* 姊妹站导流卡（微课视频） */
.sister-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding: 22px 26px;
  border: 1px solid var(--s-line);
  border-radius: var(--s-radius);
  background: var(--s-panel);
  box-shadow: var(--s-shadow);
  color: var(--s-text);
  text-decoration: none;
  transition: box-shadow .2s;
}
.sister-card:hover { box-shadow: var(--s-shadow-hover); }
.sister-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--s-accent-soft); }
.sister-icon svg { width: 22px; height: 22px; fill: var(--s-accent); }
.sister-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.sister-text b { font-size: 17px; }
.sister-text small { color: var(--s-muted); font-size: 14px; line-height: 1.6; }
.sister-go { flex: none; padding: 10px 20px; border-radius: 21px; color: #fff; background: var(--s-accent); font-size: 14px; font-weight: 700; }
@media (max-width: 640px) {
  .sister-card { flex-wrap: wrap; padding: 18px; }
  .sister-text { flex-basis: calc(100% - 64px); }
  .sister-go { margin-left: 64px; }
  .nav-link { height: 38px; padding: 0 12px; font-size: 14px; }
}
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #13744d;
  background: rgba(31, 169, 113, .12);
  font-size: 14px;
}
.account-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--s-free); }
.link-button { border: 0; background: none; color: var(--s-muted); font-size: 14px; text-decoration: underline; }

/* ---------- 主推荐 ---------- */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  overflow: hidden;
  margin-bottom: 26px;
  border: 1px solid var(--s-line);
  border-radius: 16px;
  background: var(--s-panel);
  box-shadow: var(--s-shadow);
}
.spotlight-media { aspect-ratio: 16 / 9; padding: 0; border: 0; overflow: hidden; background: var(--s-panel-2); }
.spotlight-media img,
.cw-cover img,
.detail-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.spotlight-media:hover img { transform: scale(1.03); }
.spotlight-info { display: flex; flex-direction: column; gap: 10px; padding: 24px 28px; }
.spotlight-info h1, .spotlight-info h2 { margin: 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; }
.hero-badge {
  align-self: flex-start;
  margin: 0;
  padding: 3px 12px;
  border-radius: 999px;
  color: #c2560c;
  background: rgba(255, 138, 61, .14);
  font-size: 14px;
  font-weight: 700;
}
.hero-meta { margin: 0; color: var(--s-accent); font-size: 16px; font-weight: 600; }
.hero-summary {
  margin: 0;
  color: var(--s-muted);
  font-size: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 6px; }

/* ---------- 按钮 ---------- */
.cta {
  height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(180deg, var(--s-cta), var(--s-cta-dark));
  box-shadow: 0 8px 18px rgba(242, 105, 15, .25);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: transform .15s ease, filter .15s ease;
}
.cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.cta.wide { width: 100%; }
.ghost {
  height: 48px;
  padding: 0 22px;
  border: 1px solid var(--s-line);
  border-radius: 24px;
  color: var(--s-text);
  background: #fff;
  font-size: 16px;
  font-weight: 700;
}
.ghost:hover { border-color: var(--s-accent); color: var(--s-accent); }
.copy-button {
  padding: 4px 12px;
  border: 1px solid var(--s-cta);
  border-radius: 999px;
  color: var(--s-cta-dark);
  background: #fff;
  font-size: 14px;
}
.copy-button:hover { background: rgba(255, 138, 61, .08); }
.copy-button.is-done { color: #fff; background: var(--s-cta); }

/* ---------- 标签 ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag-row li { padding: 2px 10px; border-radius: 6px; color: var(--s-muted); background: #f0f3f8; font-size: 13px; }

.cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .6), transparent 55%),
    linear-gradient(135deg, #cfe0fb, #a9c6f5);
}
.cover-placeholder b { color: #fff; font-size: 64px; text-shadow: 0 4px 14px rgba(31, 99, 214, .35); }

.store-footer { margin-top: 56px; color: var(--s-dim); font-size: 14px; text-align: center; }
.store-footer p { margin: 0; }
.store-footer .store-about { max-width: 760px; margin: 0 auto 8px; color: var(--s-muted); }
.store-footer .site-beian { margin-top: 8px; }

/* ---------- 弹窗 ---------- */
.store-dialog {
  width: min(94vw, 560px);
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  color: var(--s-text);
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 30, 60, .3);
}
.store-dialog::backdrop { background: rgba(20, 32, 52, .45); backdrop-filter: blur(4px); }
.dialog-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--s-text);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  font-size: 22px;
  line-height: 1;
}
.detail-dialog { width: min(94vw, 760px); }
.detail-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--s-panel-2); }
.detail-media [hidden] { display: none !important; }
.detail-body { display: grid; gap: 10px; padding: 22px 26px 26px; }
.detail-body h2 { margin: 0; font-size: 28px; line-height: 1.3; }
.detail-access {
  justify-self: start;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--s-muted);
  background: #f0f3f8;
  font-size: 13px;
  font-weight: 700;
}
.detail-access.is-free { color: #13744d; background: rgba(31, 169, 113, .12); }
.detail-access.is-open { color: var(--s-accent-dark); background: var(--s-accent-soft); }
.detail-meta { margin: 0; color: var(--s-accent); font-size: 16px; font-weight: 600; }
.detail-summary { margin: 0; color: var(--s-muted); font-size: 16px; white-space: pre-line; }
.detail-actions { margin-top: 8px; }
.detail-actions .cta { width: 100%; }
.detail-promo { margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--s-line); color: var(--s-muted); font-size: 15px; }
.detail-promo b { color: var(--s-cta-dark); }

.notice-dialog { padding: 30px 28px 26px; }
.notice-dialog h2 { margin: 0 0 14px; font-size: 26px; }
.notice-list { margin: 0 0 18px; padding-left: 1.2em; color: #34445c; font-size: 16px; line-height: 1.75; }
.notice-list li { margin-bottom: 6px; }

.help-wechat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 138, 61, .45);
  border-radius: 12px;
  background: #fff6ef;
}
.help-wechat span { color: var(--s-muted); font-size: 14px; }
.help-wechat b { color: var(--s-cta-dark); font-size: 22px; letter-spacing: .02em; }

/* 访问码弹窗（site.css 里是深色的，这里改成浅色） */
.store-page .unlock-dialog {
  border: 0;
  color: var(--s-text);
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 30, 60, .3);
}
.store-page .unlock-dialog::backdrop { background: rgba(20, 32, 52, .45); }
.store-page .unlock-dialog h2 { color: var(--s-text); }
.store-page .dialog-note { color: var(--s-muted); font-size: 14px; }
.store-page .dialog-note strong { color: var(--s-text); }
.store-page .unlock-form label { color: var(--s-muted); font-size: 13px; }
.store-page .unlock-form input[name="access_code"] { color: var(--s-text); background: #f6f8fc; border-color: var(--s-line); }
.store-page .dialog-close { color: var(--s-muted); background: #f0f3f8; border-color: transparent; }
.store-page .dialog-footnote { color: var(--s-dim); font-size: 13px; }

/* ---------- 右下角“获取完整课件” ---------- */
.help-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.help-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--s-cta), var(--s-cta-dark));
  box-shadow: 0 12px 28px rgba(242, 105, 15, .35);
  font-size: 16px;
  font-weight: 800;
}
.help-button svg { width: 22px; height: 22px; }
.help-button:hover { filter: brightness(1.05); }
.help-card {
  position: relative;
  width: min(92vw, 340px);
  padding: 22px 20px 6px;
  border: 1px solid var(--s-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--s-shadow-hover);
}
.help-card[hidden] { display: none; }
.help-card h3 { margin: 0 0 6px; font-size: 20px; }
.help-card p { margin: 0 0 8px; color: var(--s-muted); font-size: 15px; }
.help-card ul { margin: 0 0 14px; padding-left: 1.1em; color: #34445c; font-size: 15px; }
.help-card .dialog-x { top: 8px; right: 8px; width: 30px; height: 30px; box-shadow: none; color: var(--s-dim); }

/* =========================================================
   课件商店：内容类型 + 逐级筛选 + 教材目录 + 课件卡片（2026-11 大修）
   ========================================================= */
.store-main { padding: 22px 0 120px; }

/* ---------- 内容类型（顶部标签） ---------- */
.type-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.type-tab {
  --tab: var(--s-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--s-line);
  border-radius: 999px;
  background: var(--s-panel);
  color: var(--s-muted);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.type-tab em { min-width: 22px; padding: 0 7px; border-radius: 999px; background: #f0f3f8; color: var(--s-dim); font-size: 13px; font-style: normal; line-height: 22px; text-align: center; }
.type-tab:hover { border-color: var(--tab); color: var(--tab); }
.type-tab.is-active { border-color: var(--tab); background: var(--tab); color: #fff; }
.type-tab.is-active em { background: rgba(255, 255, 255, .25); color: #fff; }
.type-tab.t-competition { --tab: #d6336c; }
.type-tab.t-general { --tab: var(--s-accent); }
.type-tab.t-tool { --tab: #0c8599; }
.type-tab.t-game { --tab: #e8590c; }

/* ---------- 逐级筛选面板（参考智慧平台：左侧栏名 + 一排圆角按钮） ---------- */
.filter-panel {
  position: relative;
  margin-bottom: 22px;
  padding: 20px 28px 14px;
  border: 1px solid var(--s-line);
  border-radius: 16px;
  background:
    radial-gradient(520px 220px at 100% 100%, rgba(47, 124, 246, .07), transparent 70%),
    linear-gradient(180deg, #fff, #f8faff);
  box-shadow: var(--s-shadow);
}
.f-row { display: flex; align-items: flex-start; gap: 18px; padding: 6px 0; }
.f-label { flex: none; width: 3.2em; padding-top: 7px; color: var(--s-text); font-size: 16px; font-weight: 700; }
.f-chips { display: flex; flex-wrap: wrap; gap: 6px 4px; min-width: 0; }
.f-chip {
  position: relative;
  padding: 6px 16px;
  border-radius: 999px;
  color: #3c4a60;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.f-chip sup { margin-left: 3px; color: var(--s-dim); font-size: 11px; font-weight: 600; vertical-align: super; }
.f-chip:hover { color: var(--s-accent); background: rgba(47, 124, 246, .06); }
.f-chip.is-active { color: var(--s-accent-dark); background: #e3edfd; font-weight: 600; }
.f-chip.is-active sup { color: var(--s-accent); }
.f-chip.is-empty { color: #a3adbd; }
.f-collapse {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--s-muted);
  font: inherit;
  font-size: 15px;
}
.f-collapse:hover { color: var(--s-accent); background: rgba(47, 124, 246, .06); }
.f-collapse svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
.f-collapse .when-closed { display: none; }
.f-summary { display: none; align-items: center; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; }
.f-summary .f-label { padding-top: 0; }
.f-none { color: var(--s-dim); font-size: 15px; }
.filter-panel.is-collapsed .f-rows { display: none; }
.filter-panel.is-collapsed .f-summary { display: flex; }
.filter-panel.is-collapsed .f-collapse .when-open { display: none; }
.filter-panel.is-collapsed .f-collapse .when-closed { display: inline; }
.filter-panel.is-collapsed .f-collapse svg { transform: rotate(180deg); }

.sel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  background: #e3edfd;
  color: var(--s-accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.sel-chip b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(31, 99, 214, .14); font-size: 13px; line-height: 1; }
.sel-chip:hover b { background: var(--s-accent); color: #fff; }

/* 手机筛选条（电脑隐藏） */
.m-filterbar { display: none; }

/* ---------- 布局：选定一册后左目录 + 右列表 ---------- */
.library { display: block; }
.library.has-book { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; align-items: start; border: 1px solid var(--s-line); border-radius: 16px; background: var(--s-panel); box-shadow: var(--s-shadow); overflow: clip; }
.library.has-book .library-main { padding: 22px 26px 30px; border-left: 1px solid var(--s-line); min-height: 100%; }
.library-main { min-width: 0; container-type: inline-size; }

/* ---------- 教材目录 ---------- */
.book-side { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 72px); overflow-y: auto; background: #fafbfd; }
.book-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 22px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .55), transparent 45%),
    linear-gradient(135deg, color-mix(in srgb, var(--subj) 22%, #fff), color-mix(in srgb, var(--subj) 8%, #fff));
}
.book-spine {
  display: grid;
  place-content: center;
  gap: 2px;
  flex: none;
  width: 64px;
  height: 86px;
  border-radius: 4px 8px 8px 4px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .18) 0 5px, transparent 5px), var(--subj);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--subj) 35%, transparent);
  color: #fff;
  text-align: center;
}
.book-spine b { font-size: 17px; letter-spacing: .1em; line-height: 1.2; }
.book-spine small { font-size: 11px; opacity: .85; }
.book-name { display: grid; gap: 4px; min-width: 0; }
.book-name b { font-size: 22px; line-height: 1.2; }
.book-name small { color: var(--s-muted); font-size: 14px; }

.book-drawer-toggle { display: none; }
.book-tree { display: grid; padding: 6px 0 10px; }
.book-tree em { margin-left: auto; padding-left: 10px; color: var(--s-accent); font-size: 13px; font-style: normal; font-weight: 700; }
.t-unit { border-top: 1px solid var(--s-line); }
.t-unit summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 14px 22px;
  color: var(--s-text);
  font-size: 17px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.t-unit summary::-webkit-details-marker { display: none; }
.t-unit summary:hover { color: var(--s-accent); }
.t-unit-title { min-width: 0; }
.t-chev { flex: none; width: 18px; height: 18px; margin-left: 6px; fill: none; stroke: var(--s-dim); stroke-width: 2; transition: transform .2s; }
.t-unit summary em + .t-chev { margin-left: 6px; }
.t-unit summary .t-unit-title + .t-chev { margin-left: auto; }
.t-unit[open] > summary { color: var(--s-accent-dark); background: #e8f0fd; }
.t-unit[open] > summary .t-chev { transform: rotate(180deg); stroke: var(--s-accent); }
.t-body { display: grid; padding: 6px 0 10px; background: #f5f7fa; }
.t-leaf, .t-group {
  display: flex;
  align-items: center;
  padding: 8px 20px 8px 44px;
  color: #3c4a60;
  font-size: 15px;
  line-height: 1.45;
  text-decoration: none;
}
.t-leaf::before { content: ""; flex: none; width: 5px; height: 5px; margin-right: 10px; border-radius: 50%; background: #b5bfcd; }
.t-group { padding-top: 10px; color: var(--s-text); font-weight: 600; }
.t-leaf.d2, .t-group.d2 { padding-left: 62px; }
.t-leaf.d3 { padding-left: 80px; }
.t-leaf.t-all { color: var(--s-muted); font-size: 14px; }
.t-leaf.t-all::before { display: none; }
.t-leaf.t-top { padding: 14px 20px 14px 22px; color: var(--s-text); font-size: 16px; font-weight: 600; }
.t-leaf.t-top::before { display: none; }
.t-leaf:hover, .t-group:hover { color: var(--s-accent); }
.t-leaf.has-items::before { background: var(--s-accent); }
.t-leaf.is-active, .t-group.is-active { color: var(--s-accent-dark); background: #e3edfd; font-weight: 700; }
.book-source { margin: 0; padding: 12px 22px 18px; color: var(--s-dim); font-size: 12px; }

/* ---------- 列表头 ---------- */
.mini-shelf { margin-bottom: 26px; }
.mini-shelf h2 { margin: 0 0 14px; font-size: 20px; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.list-title { margin: 0; font-size: 22px; line-height: 1.35; }
.result-count { margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--s-muted); font-size: 15px; }
.result-count a { color: var(--s-accent); }
.list-search { display: flex; flex: none; }
.list-search input {
  width: 260px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d5dce7;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  color: var(--s-text);
  background: #fff;
  font: inherit;
  font-size: 15px;
}
.list-search input:focus { outline: 2px solid rgba(47, 124, 246, .35); outline-offset: -1px; }
.list-search button { display: grid; place-items: center; width: 46px; height: 42px; border: 1px solid #d5dce7; border-radius: 0 8px 8px 0; background: #fff; color: var(--s-muted); }
.list-search button:hover { color: var(--s-accent); }
.list-search svg, .store-search svg { fill: none; stroke: currentColor; stroke-width: 2; }
.list-search svg { width: 20px; height: 20px; }

/* ---------- 课件卡片：宽 4 个 / 中 3 个 / 手机 2 个 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@container (max-width: 900px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 560px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.mini-shelf { container-type: inline-size; }

.cw-card {
  --subj: #495057;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--s-line);
  border-radius: 12px;
  background: var(--s-panel);
  box-shadow: 0 1px 3px rgba(31, 42, 61, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.cw-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--subj) 35%, var(--s-line)); box-shadow: var(--s-shadow-hover); }
.cw-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--s-panel-2); }
.cw-cover { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
.cw-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cw-card:hover .cw-cover img { transform: scale(1.04); }
.cw-cover .cover-placeholder { background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .55), transparent 55%), linear-gradient(135deg, color-mix(in srgb, var(--subj) 45%, #fff), var(--subj)); }
.cw-cover .cover-placeholder b { font-size: 46px; text-shadow: none; }
.cw-subject {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 12px 3px 10px;
  border-radius: 0 0 10px 0;
  background: var(--subj);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  pointer-events: none;
}
.cw-type {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  pointer-events: none;
}
.cw-type.t-general { color: var(--s-accent-dark); }
.cw-type.t-competition { color: #c2255c; }
.cw-type.t-tool { color: #0b7285; }
.cw-type.t-game { color: #d9480f; }
.cw-access {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(20, 28, 45, .62);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.cw-access.is-free { background: rgba(19, 140, 92, .88); }
.cw-access.is-open { background: rgba(31, 99, 214, .88); }
.cw-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(15, 23, 42, .38);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.cw-hover button {
  padding: 7px 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  transform: translateY(6px);
  transition: transform .2s, background .15s;
}
.cw-hover-open { background: var(--s-cta); color: #fff; }
.cw-hover-open:hover { background: var(--s-cta-dark); }
.cw-hover-detail { background: rgba(255, 255, 255, .95); color: var(--s-text); }
@media (hover: hover) {
  .cw-card:hover .cw-hover, .cw-media:focus-within .cw-hover { opacity: 1; pointer-events: auto; }
  .cw-card:hover .cw-hover button { transform: none; }
}
.cw-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px 14px 12px; }
.cw-body h3 { margin: 0; font-size: 16px; line-height: 1.45; }
.title-button {
  display: -webkit-box;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.title-button:hover { color: var(--s-accent); }
a.title-button { text-decoration: none; }
.cw-meta { margin: 0; overflow: hidden; color: var(--s-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cw-meta i { margin: 0 4px; color: #c3cad6; font-style: normal; }
.cw-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; color: var(--s-dim); font-size: 12px; }
.cw-kind, .cw-hot { display: inline-flex; align-items: center; gap: 4px; }
.cw-foot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.cw-hot svg { stroke: #f08c00; }

.empty-state { display: grid; justify-items: center; gap: 4px; padding: 56px 20px; border: 1px dashed #cdd6e3; border-radius: 12px; background: #fbfcfe; color: var(--s-muted); text-align: center; }
.empty-state p { max-width: 34em; margin: 0; }
.empty-icon svg { width: 44px; height: 44px; fill: none; stroke: #b5bfcd; stroke-width: 1.6; }

/* ---------- 详情弹窗补充 ---------- */
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.detail-badges span:empty { display: none; }
.detail-subject { padding: 3px 10px; border-radius: 999px; background: var(--subj, #495057); color: #fff; font-size: 13px; font-weight: 700; }
.detail-kind { padding: 3px 10px; border-radius: 999px; background: #f0f3f8; color: var(--s-text); font-size: 13px; font-weight: 700; }
.detail-h { margin: 6px 0 0; color: var(--s-text); font-size: 15px; }
.detail-steps { margin: 0; padding-left: 1.3em; color: var(--s-muted); font-size: 15px; line-height: 1.75; }
.detail-actions { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 6px; margin: 4px -26px -26px; padding: 12px 26px 18px; border-top: 1px solid var(--s-line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); }
.detail-opens { color: var(--s-dim); font-size: 13px; text-align: center; }
.detail-opens:empty { display: none; }

/* ---------- 手机筛选抽屉 ---------- */
.filter-sheet {
  width: 100%;
  max-width: 100%;
  max-height: 86vh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: #fff;
  color: var(--s-text);
  box-shadow: 0 -10px 40px rgba(15, 23, 42, .2);
}
.filter-sheet[open] { display: flex; flex-direction: column; }
.filter-sheet::backdrop { background: rgba(15, 23, 42, .45); }
.sheet-head { position: relative; display: flex; align-items: center; justify-content: center; padding: 14px 16px 10px; border-bottom: 1px solid var(--s-line); }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-head .dialog-x { top: 8px; right: 10px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 6px 16px 10px; overscroll-behavior: contain; }
.sheet-body .f-row { display: block; padding: 10px 0; border-bottom: 1px solid #f0f3f8; }
.sheet-body .f-label { display: block; width: auto; padding: 0 0 8px; font-size: 15px; }
.sheet-body .f-chips { gap: 8px; }
.sheet-body .f-chip { padding: 5px 14px; border: 1px solid var(--s-line); font-size: 15px; }
.sheet-body .f-chip.is-active { border-color: #bcd3fa; }
.sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--s-line); }
.sheet-foot .ghost, .sheet-foot .cta { display: flex; align-items: center; justify-content: center; min-height: 46px; text-align: center; text-decoration: none; }

/* ---------- 不同屏幕 ---------- */
@media (max-width: 1100px) {
  .spotlight { grid-template-columns: 1fr; }
  .library.has-book { grid-template-columns: 270px minmax(0, 1fr); }
  .library.has-book .library-main { padding: 18px; }
}
@media (max-width: 860px) {
  .store-main { padding-top: 12px; }
  .store-wrap { width: calc(100% - 32px); }
  .store-nav-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 0; }
  .store-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .store-account { margin-left: auto; }
  .brand-text small { display: none; }

  .type-tabs { flex-wrap: nowrap; margin: 0 -16px 10px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .type-tabs::-webkit-scrollbar { display: none; }
  .type-tab { flex: none; padding: 7px 14px; font-size: 15px; }

  .filter-panel { display: none; }
  .m-filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .m-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 8px 14px;
    border: 1px solid var(--s-accent);
    border-radius: 999px;
    background: #fff;
    color: var(--s-accent-dark);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
  }
  .m-filter-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
  .m-filter-btn em { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--s-accent); color: #fff; font-size: 12px; font-style: normal; line-height: 18px; text-align: center; }
  .m-chips { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .m-chips::-webkit-scrollbar { display: none; }

  .library.has-book { display: block; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .library.has-book .library-main { padding: 0; border: 0; }
  .book-side { position: static; max-height: none; margin-bottom: 16px; overflow: hidden; border: 1px solid var(--s-line); border-radius: 14px; background: #fff; }
  .book-banner { padding: 14px 16px; }
  .book-spine { width: 46px; height: 62px; }
  .book-spine b { font-size: 14px; }
  .book-name b { font-size: 18px; }
  .book-drawer-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--s-line); font-weight: 700; list-style: none; cursor: pointer; }
  .book-drawer-toggle::-webkit-details-marker { display: none; }
  .book-drawer-toggle small { margin-left: auto; overflow: hidden; color: var(--s-accent); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .book-drawer-toggle::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--s-dim); border-bottom: 2px solid var(--s-dim); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
  .book-drawer[open] > .book-drawer-toggle::after { transform: rotate(225deg) translateY(-2px); }
  .book-tree { max-height: 60vh; overflow-y: auto; }

  .spotlight-info { padding: 18px; }
  .list-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .list-title { font-size: 19px; }
  .list-search input { flex: 1; width: auto; min-width: 0; }
  .help-button span { display: none; }
  .help-button { width: 54px; padding: 0; justify-content: center; }
}
@media (max-width: 420px) {
  .cw-body { padding: 10px 10px 10px; }
  .cw-body h3 { font-size: 15px; }
  .cw-foot .cw-kind { display: none; }
}
@media (max-width: 480px) {
  .store-nav-inner { flex-wrap: wrap; }
  .store-brand .brand-mark { width: 36px; height: 36px; }
  .brand-text b { font-size: 17px; }
  .store-account { gap: 6px; }
  .store-account .nav-link, .store-account .nav-button { height: 34px; padding: 0 11px; font-size: 13px; }
  .brand-text b { letter-spacing: 0; }
}

/* ---------- 访问码登录页（/login，会话失效时跳到这里） ---------- */
.login-page { min-height: 100vh; background: radial-gradient(900px 500px at 10% 0%, #e3edfd, transparent 60%), var(--s-bg); }
.login-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 48px; align-items: center; width: min(1040px, 100% - 32px); min-height: calc(100vh - 70px); margin: 0 auto; padding: 40px 0; }
.login-story .eyebrow { margin: 0 0 6px; color: var(--s-accent); font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.login-story h1 { margin: 0 0 14px; font-size: clamp(32px, 4vw, 48px); line-height: 1.2; }
.login-intro { margin: 0; color: var(--s-muted); font-size: 18px; }
.lesson-orbit { display: flex; gap: 10px; margin-top: 26px; }
.orbit-card { padding: 8px 18px; border-radius: 999px; background: #fff; box-shadow: var(--s-shadow); color: var(--s-accent-dark); font-weight: 700; }
.orbit-b { color: #0b7285; }
.orbit-c { color: #d9480f; }
.login-card { padding: 30px 28px; border: 1px solid var(--s-line); border-radius: 18px; background: #fff; box-shadow: var(--s-shadow); }
.panel-kicker { margin: 0; color: var(--s-dim); font-size: 13px; font-weight: 700; }
.login-card h2 { margin: 4px 0 6px; font-size: 26px; }
.panel-note, .device-note { margin: 0 0 14px; color: var(--s-muted); font-size: 14px; }
.code-form { display: grid; gap: 10px; margin: 8px 0 14px; }
.code-form label { font-weight: 700; }
.code-form input { height: 52px; padding: 0 16px; border: 1px solid #d5dce7; border-radius: 12px; font: inherit; font-size: 22px; letter-spacing: .3em; text-transform: uppercase; }
.code-form input:focus { outline: 3px solid rgba(47, 124, 246, .25); border-color: var(--s-accent); }
.code-form button { height: 50px; border: 0; border-radius: 12px; background: var(--s-cta); color: #fff; font: inherit; font-size: 17px; font-weight: 700; }
.code-form button:hover { background: var(--s-cta-dark); }
.login-card .alert { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff4e6; color: #a34a00; font-size: 14px; }
.login-card .alert-error { background: #fff0f0; color: #c92a2a; }
.login-page .login-footer { color: var(--s-dim); }
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; gap: 24px; min-height: auto; }
  .lesson-orbit { display: none; }
}
.code-form input::placeholder { letter-spacing: .05em; text-transform: none; }

/* =========================================================
   手机端：按常用 App 的方式排——顶部固定（搜索 + 类型标签 + 筛选条），
   底部标签栏，目录 / 筛选 / 详情都从底部弹出
   ========================================================= */
.m-subnav, .m-tabbar, .m-backdrop, .m-only { display: none; }
.m-backdrop[hidden] { display: none !important; }

@media (max-width: 860px) {
  .d-only { display: none; }
  .m-only { display: revert; }
  html.sheet-lock, html.sheet-lock body { overflow: hidden; }

  /* 顶部固定区 */
  .store-nav { box-shadow: 0 1px 0 var(--s-line); border-bottom: 0; }
  .store-nav-inner { flex-wrap: nowrap; gap: 10px; min-height: 0; padding: 8px 0; }
  .store-brand .brand-mark { width: 34px; height: 34px; }
  .brand-text { display: none; }
  .store-search { order: 0; flex: 1; flex-basis: auto; margin: 0; }
  .store-search input { height: 36px; padding-left: 36px; border-right: 1px solid var(--s-line); border-radius: 18px; font-size: 15px; }
  .store-search svg { left: 11px; width: 18px; height: 18px; }
  .store-search button { display: none; }
  .store-account { gap: 6px; margin: 0; }
  .store-account .nav-link { display: none; }
  .store-account .nav-button { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 17px; font-size: 14px; }
  .store-account .nav-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
  .store-account .account-chip { padding: 5px 10px; font-size: 13px; }
  .chip-more { display: none; }
  .store-account .link-button { font-size: 13px; }

  .m-subnav { display: block; background: #fff; }
  .m-tabs { display: flex; gap: 22px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--s-line); }
  .m-tabs::-webkit-scrollbar { display: none; }
  .m-tab {
    position: relative;
    flex: none;
    padding: 9px 0 10px;
    color: var(--s-muted);
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
  }
  .m-tab sup { margin-left: 2px; color: var(--s-dim); font-size: 10px; }
  .m-tab.is-active { color: var(--s-text); font-size: 16px; font-weight: 700; }
  .m-tab.is-active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 3px; border-radius: 3px; background: var(--s-accent); transform: translateX(-50%); }
  .m-subnav .m-filterbar { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; }
  .m-filter-btn { padding: 6px 12px; font-size: 14px; }
  .m-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    margin-left: auto;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--s-accent);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
  }
  .m-book-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
  .m-chips { flex: 1; }

  /* 手机上不显示的大块 */
  .type-tabs, .filter-panel, .spotlight, .mini-shelf, .sister-card, .list-search, .help-button { display: none !important; }

  .store-main { padding: 12px 0 calc(76px + env(safe-area-inset-bottom)); }
  .list-head { flex-direction: row; align-items: baseline; gap: 8px; margin-bottom: 12px; }
  .list-title { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .list-head > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .result-count { flex: none; margin: 0; font-size: 13px; }
  .store-footer { margin-top: 28px; font-size: 12px; }

  /* 本册目录：底部弹出面板 */
  .book-side {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    max-height: 82vh;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, .2);
    transform: translateY(105%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    visibility: hidden;
  }
  .book-side.is-open { transform: none; visibility: visible; }
  .book-side .sheet-head { display: flex; flex: none; }
  .book-side .book-banner { flex: none; padding: 10px 16px; }
  /* 目录外层是 <details>，它的内容不参与 flex 分配高度，所以让 details 自己滚动，不让里面的 book-tree 滚 */
  .book-side .book-drawer { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .book-side .book-drawer-toggle { display: none; }
  .book-side .book-tree { max-height: none; overflow: visible; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .m-backdrop { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(15, 23, 42, .45); }

  /* 底部弹出面板的把手 */
  .sheet-grip { position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; border-radius: 4px; background: #d5dce7; transform: translateX(-50%); }
  .sheet-head { position: relative; padding-top: 18px; }

  /* 课件详情：底部弹出 */
  .detail-dialog { width: 100%; max-width: 100%; max-height: 90vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .detail-body { padding: 16px 18px 18px; }
  .detail-body h2 { font-size: 21px; }
  .detail-actions { margin: 4px -18px -18px; padding: 10px 18px calc(12px + env(safe-area-inset-bottom)); }

  /* 底部标签栏 */
  .m-tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    display: flex;
    padding: 4px 0 env(safe-area-inset-bottom);
    border-top: 1px solid var(--s-line);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
  }
  .m-tabbar-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 5px 0 6px;
    border: 0;
    background: none;
    color: var(--s-dim);
    font: inherit;
    font-size: 11px;
    text-decoration: none;
  }
  .m-tabbar-item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .m-tabbar-item.is-active { color: var(--s-accent); font-weight: 700; }
  .m-tabbar-item:active { transform: scale(.94); }

  /* “客服”卡片从底部标签栏上方弹出 */
  .help-fab { right: 0; left: 0; bottom: calc(62px + env(safe-area-inset-bottom)); align-items: center; z-index: 55; pointer-events: none; }
  .help-card { width: calc(100% - 24px); max-width: 420px; margin: 0; pointer-events: auto; }
}

/* 筛选抽屉：连着选几栏，最后一次生效 */
.sheet-content { display: flex; flex: 1; flex-direction: column; min-height: 0; transition: opacity .15s; }
.sheet-content.is-loading { opacity: .55; pointer-events: none; }
.sheet-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px solid #f0f3f8; }
.sheet-picked > span { margin-right: 4px; color: var(--s-text); font-size: 15px; font-weight: 700; }
.sheet-foot .cta { font-size: 16px; }

/* 底部标签栏：未选中的统一深灰，选中的蓝色（链接和按钮颜色一致） */
@media (max-width: 860px) {
  .m-tabbar .m-tabbar-item { color: #3c4a60; }
  .m-tabbar .m-tabbar-item.is-active { color: var(--s-accent); }
}

/* ---------- 详情弹窗里的“详情页”链接 ---------- */
.detail-page-link { color: var(--s-dim); font-size: 13px; text-align: center; }
.detail-page-link:hover { color: var(--s-accent); }

/* ---------- 课件详情页 /c/<编号>/ ---------- */
.cwd-main { padding: 22px 0 40px; }
.cwd-main .store-wrap { max-width: 1180px; }
.cwd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; color: var(--s-dim); font-size: 14px; }
.cwd-crumbs a { color: var(--s-muted); text-decoration: none; }
.cwd-crumbs a:hover { color: var(--s-accent); }
.cwd-crumbs i { font-style: normal; }
.cwd { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; border-radius: var(--s-radius); background: var(--s-panel); box-shadow: var(--s-shadow); }
.cwd-media { aspect-ratio: 16 / 9; align-self: start; overflow: hidden; background: var(--s-panel-2); }
.cwd-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cwd-media .cover-placeholder { display: grid; place-items: center; height: 100%; color: var(--subj); font-size: 64px; }
.cwd-info { display: grid; align-content: start; gap: 12px; padding: 24px 28px; }
.cwd-info h1 { margin: 0; font-size: 28px; line-height: 1.3; }
.cwd-actions { display: grid; gap: 6px; margin-top: 6px; }
.cwd-actions .cta { width: 100%; }
.cwd-actions .detail-opens { text-align: left; }
.cwd-section { margin-top: 28px; padding: 22px 28px; border-radius: var(--s-radius); background: var(--s-panel); box-shadow: var(--s-shadow); }
.cwd-section h2 { margin: 0 0 12px; font-size: 20px; }
.cwd-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.cwd-related a { display: grid; gap: 4px; text-decoration: none; }
.cwd-related img, .cwd-related .cover-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; background: var(--s-panel-2); color: var(--subj); font-size: 32px; }
.cwd-related b { overflow: hidden; font-size: 15px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.cwd-related small { overflow: hidden; color: var(--s-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cwd-related a:hover b { color: var(--s-accent); }
@media (max-width: 860px) {
  .cwd { grid-template-columns: 1fr; }
  .cwd-info { padding: 18px; }
  .cwd-info h1 { font-size: 22px; }
  .cwd-section { padding: 18px; }
  .cwd-related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
