/* 三层导航：首页选剧卡片 → 剧页（集数格子 + 继续看 + 说明）→ 单集页的上一集 / 选集 / 下一集。沿用 app.css 的配色和圆角。 */

/* ---------- 首页：选剧 ---------- */
.home .picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.home { max-width: 1040px; }
.pick {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-m);
  overflow: hidden; text-decoration: none; color: inherit; transition: border-color .12s, box-shadow .12s, transform .12s;
}
.pick:hover { border-color: #c3c8d1; box-shadow: 0 6px 20px rgba(27, 33, 48, .08); transform: translateY(-1px); }
.pick-cover { aspect-ratio: 5 / 4; background: var(--stage); overflow: hidden; }
.pick-cover.img { aspect-ratio: 3 / 4; }   /* 真封面是 600×800 竖版（<剧>/notes/cover.jpg），整张显示 */
.pick-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-cover.typo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff;
  background: radial-gradient(120% 90% at 30% 20%, hsl(var(--hue) 45% 38%), hsl(calc(var(--hue) + 40) 35% 16%) 70%, var(--stage));
}
.pc-char { font-size: 5.5rem; line-height: 1; font-weight: 600; text-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
.pc-id { font-size: 0.8rem; letter-spacing: .12em; opacity: .7; }
.pick-body { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pick-body h2 { font-size: 1.25rem; }
.pick-ru { color: var(--muted); font-size: 0.95rem; }
.pick-zh { color: var(--muted); font-size: 0.9rem; }   /* 俄文主标题下面的中文原名 */
/* 剧编号（ZH00008 → 08）：剧名前一枚小方牌，等宽数字，沟通时说「08 号」 */
.sno { display: inline-block; min-width: 2.1em; margin-right: 0.45em; padding: 0 0.3em; border-radius: var(--radius-s);
  background: var(--ink); color: var(--card); font-size: 0.8em; font-weight: 700; line-height: 1.5; text-align: center;
  font-variant-numeric: tabular-nums; vertical-align: 0.12em; letter-spacing: 0.02em; }
.pick-go { margin: 12px 16px 16px; justify-content: center; min-height: 48px; font-size: 1.05rem; }
.badge-new { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--mark); color: #1b1200;
  font-size: 0.75rem; font-weight: 600; vertical-align: 1px; }

/* ---------- 剧页 ---------- */
.series-page {
  max-width: 1200px; margin: 0 auto; padding: 28px 20px 40px; display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "head head" "news news" "eps notes" "eps side";
}
.sp-head { grid-area: head; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.sp-head h1 { font-size: 2rem; }
.sp-notes { grid-area: notes; }
/* 有新回复 / 新版本的集（服务端按账号算，#ux-p0 ⑤） */
.news-box { grid-area: news; background: var(--ok-soft); border: 1px solid #b9dfcf; border-radius: var(--radius-m); padding: 12px 16px; }
.news-box h2 { font-size: 1rem; color: #14573f; margin-bottom: 4px; }
.news-box ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.news-box a { color: #14573f; font-weight: 600; display: inline-flex; min-height: 36px; align-items: center; }
.button.primary.series-go { min-height: 52px; padding: 10px 22px; font-size: 1.1rem; background: var(--mark); border-color: var(--mark); color: #1b1200; }
.button.primary.series-go:hover { background: #f2b23a; border-color: #f2b23a; }
.sp-eps { grid-area: eps; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 18px 20px; align-self: start; }
.sp-eps h2 { margin-bottom: 6px; }
.series-side { grid-area: side; display: flex; flex-direction: column; gap: 16px; align-self: start; }
.notes-box { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 16px 18px; }
.notes-box > h2 { margin-bottom: 8px; }
.notes-box .md h3 { font-size: 1.05rem; margin: 4px 0 8px; }
.notes-box .md ul { padding-left: 1.2em; margin: 6px 0; }
.notes-full { margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 10px; }
.notes-full > summary { cursor: pointer; color: var(--focus); font-weight: 500; }
.series-side .about-link { border: 1px solid var(--rule); border-radius: var(--radius-m); }

/* 集数格子：看过 = 实心底；有反馈 = 琥珀；通过 = 绿；有新版 = 右上角琥珀点；当前集 = 深色描边 */
.ep-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.ep-tile {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--radius-s);
  border: 1px solid var(--rule); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ep-tile:hover { border-color: var(--ink); }
.ep-tile.seen { background: #e9ebef; }
.ep-tile.st-draft { box-shadow: inset 0 -3px 0 var(--mark); }
.ep-tile.st-submitted { background: var(--mark-soft); border-color: var(--mark); color: var(--mark-ink); }
.ep-tile.st-approved { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.ep-tile.fresh::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--mark); }
.ep-tile.replied::before { content: ""; position: absolute; top: 4px; left: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.ep-tile.current { outline: 2px solid var(--ink); outline-offset: 1px; }
.et-issues { position: absolute; bottom: 2px; right: 5px; font-size: 0.65rem; font-weight: 600; color: var(--mark-ink); }
.ep-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8rem; color: var(--muted); }
.ep-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--rule); background: var(--card); position: relative; }
.lg.seen { background: #e9ebef; }
.lg.st-submitted { background: var(--mark-soft); border-color: var(--mark); }
.lg.st-approved { background: var(--ok-soft); border-color: var(--ok); }
.lg.fresh { border: 0; background: none; }
.lg.replied { border: 0; background: none; }
.lg.replied::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--ok); }
.lg.fresh::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--mark); }

/* ---------- 单集页：上一集 / 选集 / 下一集 ---------- */
.ep-nav { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ep-nav .tool { min-height: 40px; text-decoration: none; }
.ep-nav .en-list { flex: 1; justify-content: center; font-weight: 600; }
.ep-nav .tool[disabled] { opacity: .45; cursor: default; }
.ep-drawer { max-height: min(70vh, 520px); overflow-y: auto; }
.ep-drawer .ep-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.ep-drawer .ep-tile { min-height: 44px; }

@media (max-width: 900px) {
  /* app.css 在手机上把面包屑的链接全藏了；这里只放出上一层（「‹ 剧名」），首页和分隔符仍然不显示 */
  .crumbs a:last-of-type { display: inline-flex; align-items: center; min-height: 40px; padding-right: 4px; white-space: nowrap;
    flex-shrink: 0; min-width: 4.5em; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; color: var(--focus); font-weight: 500; }
  .crumbs a:last-of-type::before { content: "‹\00a0"; }
  .crumbs a ~ .here { display: none; }   /* 当前页的名字页面标题里已经有了，窄屏上只留「‹ 上一层」 */
  .home .picker { grid-template-columns: 1fr; gap: 14px; }
  .pick { flex-direction: row; align-items: stretch; }
  .pick-cover, .pick-cover.img { width: 108px; flex: none; aspect-ratio: auto; }
  .pc-char { font-size: 3rem; }
  .pick-body { padding: 12px 12px 12px 14px; }
  .pick-go { margin: auto 12px auto 0; align-self: center; min-width: 76px; }
  .series-page { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "head" "news" "notes" "eps" "side"; padding: 18px 12px 32px; gap: 14px; }
  .sp-head h1 { font-size: 1.5rem; }
  .series-go { width: 100%; justify-content: center; }
  .sp-eps { padding: 14px 12px; }
  /* 手机：说明在列表上方，只显示精简要点；版本说明默认收起 */
  .notes-box { padding: 12px 14px; }
}

/* 剧的处理状态（notes/status.json，10-02）：fixing = 配音修正中、暂缓审片；ready = 可以审片 */
.pick-cover-wrap { position: relative; }
.st-tag { position: absolute; left: 8px; right: 8px; top: 8px; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 0.85rem; line-height: 1.3; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.st-fixing { background: var(--mark); color: #1b1200; }
.st-tag.st-ready { right: auto; background: var(--ok); color: #fff; font-size: 0.8rem; padding: 3px 10px; }
.pick.is-fixing { opacity: 0.62; }
.pick.is-fixing:hover, .pick.is-fixing:focus-visible { opacity: 0.85; }
.st-banner { flex-basis: 100%; border-radius: var(--radius-m); padding: 10px 14px; margin: 0; }
.st-banner.st-fixing { background: var(--mark-soft); border: 1px solid var(--mark); color: var(--mark-ink); }
.st-banner.st-ready { background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ok); }
