/* ==========================================================================
   九九影院全部电视剧 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base：变量、重置、排版、链接、按钮
   -------------------------------------------------------------------------- */
:root {
  --bg: #f7f9fa;
  --surface: #ffffff;
  --ink: #1f2a30;
  --ink-soft: #5b6b73;
  --accent: #0f766e;
  --accent-2: #0e7490;
  --line: #d7e0e4;
  --line-soft: #e8eef1;
  --new-bg: #e6f4f1;
  --new-ink: #0f766e;
  --edit-bg: #e5f0f6;
  --edit-ink: #0e7490;
  --archive-bg: #eef1f3;
  --archive-ink: #5b6b73;
  --radius: 6px;
  --shell: 1120px;
  --aside-w: 240px;
  --gap: 32px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 12px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

button {
  font: inherit;
  color: inherit;
}

code,
kbd,
samp,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

/* --------------------------------------------------------------------------
   layout：站点骨架、容器、页头、导航、页脚、内页布局
   -------------------------------------------------------------------------- */
.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
  min-height: 44px;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand-sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 15px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.nav-link.is-current {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}

.nav-toggle::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.home-main {
  display: block;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 32px;
}

.footer-brand {
  min-width: 0;
}

.footer-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.footer-col {
  min-width: 0;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col li a {
  display: inline-block;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 3px 0;
  min-height: 24px;
}

.footer-col li a:hover,
.footer-col li a:focus-visible {
  color: var(--accent);
}

.footer-copy {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* 内页通用：面包屑、页面标题区 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.page-description {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0;
}

/* 内页两栏布局：默认主内容在前、侧栏在后 */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-w);
  gap: var(--gap);
  align-items: start;
}

.page-layout.sidebar-left {
  grid-template-columns: var(--aside-w) minmax(0, 1fr);
}

.sidebar-left .page-layout {
  grid-template-columns: var(--aside-w) minmax(0, 1fr);
}

.page-layout.sidebar-left .page-aside,
.sidebar-left .page-layout .page-aside,
.sidebar-left .page-layout .page-sidebar {
  order: -1;
}

.page-content {
  min-width: 0;
}

.content-column {
  min-width: 0;
}

/* 侧栏 */
.page-aside,
.page-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  min-width: 0;
}

.aside-title,
.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.aside-nav,
.page-sidebar nav {
  display: block;
}

.aside-list,
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-list a,
.sidebar-list a {
  display: block;
  padding: 7px 8px;
  min-height: 36px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 4px;
  border-left: 2px solid transparent;
}

.aside-list a:hover,
.aside-list a:focus-visible,
.sidebar-list a:hover,
.sidebar-list a:focus-visible {
  background: var(--line-soft);
  color: var(--accent);
  text-decoration: none;
  border-left-color: var(--accent);
}

.aside-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* 内页通用区块 */
.section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-intro,
.section-lead {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 18px;
}

.section-note {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   components：按钮、标签、条目清单、时间线、表格、折叠、图片容器
   -------------------------------------------------------------------------- */
/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #0b5f59;
  border-color: #0b5f59;
  color: #ffffff;
}

.btn-ghost {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  min-height: 32px;
}

.text-link::after {
  content: "\2192";
  font-size: 13px;
}

/* 状态标签 */
.entry-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.status-new {
  background: var(--new-bg);
  color: var(--new-ink);
}

.status-update,
.status-adjusted {
  background: var(--edit-bg);
  color: var(--edit-ink);
}

.status-archive,
.status-archived {
  background: var(--archive-bg);
  color: var(--archive-ink);
}

/* 条目清单：首页 */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(80px, 1fr) 72px 96px;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  min-height: 52px;
}

.entry-row:last-child {
  border-bottom: 0;
}

.entry-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.entry-name a {
  color: var(--ink);
}

.entry-name a:hover,
.entry-name a:focus-visible {
  color: var(--accent);
}

.entry-genre,
.entry-year {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 条目：内页（目录分组 / 题材） */
.entry-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}

.entry-item:last-child {
  border-bottom: 0;
}

.entry-item .entry-name {
  display: block;
  margin-bottom: 4px;
}

.entry-item .entry-meta,
.entry-item .entry-summary,
.entry-item .entry-year,
.entry-item .entry-genre {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.entry-item .entry-summary {
  display: block;
  margin-top: 4px;
}

.entry-item .entry-genre,
.entry-item .entry-year {
  display: inline-block;
  margin-right: 10px;
  font-family: var(--mono);
}

.entry-item .entry-status {
  margin-top: 6px;
}

/* 时间线：首页动态摘要 */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  min-height: 48px;
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline-row time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
}

.timeline-name {
  font-size: 15px;
  color: var(--ink);
  min-width: 0;
}

/* 更新记录列表：动态页 */
.update-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.update-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1.4fr) 92px minmax(0, 2fr);
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  min-height: 52px;
}

.update-item:last-child {
  border-bottom: 0;
}

.update-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.update-name {
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
}

.update-name a {
  color: var(--ink);
}

.update-name a:hover,
.update-name a:focus-visible {
  color: var(--accent);
}

.update-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.update-tag-new {
  background: var(--new-bg);
  color: var(--new-ink);
}

.update-tag-edit {
  background: var(--edit-bg);
  color: var(--edit-ink);
}

.update-tag-archive {
  background: var(--archive-bg);
  color: var(--archive-ink);
}

.update-note {
  font-size: 14px;
  color: var(--ink-soft);
  min-width: 0;
}

/* 表格 */
.spec-table,
.field-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.spec-table caption,
.field-table caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
}

.spec-table th,
.spec-table td,
.field-table th,
.field-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  line-height: 1.7;
}

.spec-table thead th,
.field-table thead th {
  background: #f2f6f7;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

.spec-table tbody tr:last-child td,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.spec-table tbody th,
.field-table tbody th {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* 图片容器 */
.hero-media,
.genre-media,
.media-figure,
.section-media,
.page-media,
.guide-figure {
  display: block;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-media img,
.genre-media img,
.media-figure img,
.section-media img,
.page-media img,
.guide-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media figcaption,
.media-figure figcaption,
.section-media figcaption,
.page-media figcaption,
.guide-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* 折叠说明 */
.guide-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.guide-details summary {
  cursor: pointer;
  padding: 12px 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.guide-details summary::-webkit-details-marker {
  display: none;
}

.guide-details summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  margin-right: 10px;
  font-weight: 600;
}

.guide-details[open] summary::before {
  content: "\2212";
}

.guide-details summary:hover {
  color: var(--accent);
}

.guide-details p {
  padding: 0 16px 14px 40px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* 步骤列表 */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.step-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}

.step-item:last-child {
  border-bottom: 0;
}

.step-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* 普通列表 */
.plain-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plain-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   pages：首页
   -------------------------------------------------------------------------- */
/* 首屏 */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 48px 0 40px;
}

.hero-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.6;
}

.hero-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.hero-line a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  min-height: 24px;
}

.hero-line a:hover,
.hero-line a:focus-visible {
  color: var(--accent);
}

.hero-line span {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.hero-media {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
}

.hero-media img {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
}

/* 首页通用区块头 */
.section-head {
  max-width: var(--shell);
  margin: 0 auto 20px;
  padding: 0 24px;
}

.section-head h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.section-head p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 760px;
}

.overview,
.genre-entry,
.catalog-preview,
.updates-preview,
.path-guide {
  padding: 44px 0 0;
}

.overview {
  padding-top: 48px;
}

/* 总览四线 */
.overview-grid {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.overview-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.overview-item h3 {
  font-size: 17px;
}

.overview-item p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  flex: 1 1 auto;
}

/* 题材入口 */
.genre-grid {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.genre-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.genre-media {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  aspect-ratio: 16 / 9;
}

.genre-card h3 {
  font-size: 17px;
  padding: 14px 16px 0;
}

.genre-scope {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  padding: 6px 16px 0;
  flex: 1 1 auto;
}

.genre-samples {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 16px;
  margin-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.genre-samples li a {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  min-height: 28px;
  padding: 2px 0;
}

.genre-more,
.catalog-more,
.updates-more {
  max-width: var(--shell);
  margin: 16px auto 0;
  padding: 0 24px;
}

/* 目录摘要 */
.catalog-preview .entry-list {
  max-width: var(--shell);
  width: calc(100% - 48px);
  margin: 0 auto;
}

/* 动态摘要 */
.updates-blocks {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.updates-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 12px;
  min-width: 0;
}

.updates-block h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

/* 查阅路径 */
.path-list {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  counter-reset: path;
}

.path-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  min-width: 0;
}

.path-step::before {
  counter-increment: path;
  content: counter(path, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}

.path-step h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.path-step p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages：剧集目录
   -------------------------------------------------------------------------- */
.media-figure {
  margin-bottom: 20px;
  aspect-ratio: 16 / 7;
  display: flex;
  flex-direction: column;
}

.media-figure img {
  flex: 1 1 auto;
  min-height: 0;
}

.field-spec .spec-table {
  margin-top: 4px;
}

.group-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  min-width: 0;
}

.group-block h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.group-scope {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.group-block .entry-list {
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
}

/* --------------------------------------------------------------------------
   pages：题材分类
   -------------------------------------------------------------------------- */
.section-media {
  aspect-ratio: 16 / 7;
  display: flex;
  flex-direction: column;
}

.section-media img {
  flex: 1 1 auto;
  min-height: 0;
}

.genre-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  scroll-margin-top: 88px;
  min-width: 0;
}

.genre-detail .section-title {
  margin-bottom: 8px;
}

.genre-detail .genre-scope {
  margin-bottom: 12px;
}

.genre-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.genre-detail .entry-list {
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
}

.genre-distinct {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.genre-advice .advice-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.advice-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.advice-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.advice-step p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.advice-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   pages：剧集动态
   -------------------------------------------------------------------------- */
.page-media {
  margin-bottom: 32px;
  aspect-ratio: 16 / 6;
  display: flex;
  flex-direction: column;
}

.page-media img {
  flex: 1 1 auto;
  min-height: 0;
}

.update-block {
  margin-bottom: 40px;
  scroll-margin-top: 88px;
}

.update-block h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.update-block-new h2 {
  color: var(--new-ink);
}

.update-block-adjust h2 {
  color: var(--edit-ink);
}

.update-block-archive h2 {
  color: var(--archive-ink);
}

.update-block-advice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
}

.update-block-advice p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   pages：观看指引
   -------------------------------------------------------------------------- */
.page-sidebar {
  position: sticky;
  top: 88px;
}

.guide-section {
  margin-bottom: 40px;
  scroll-margin-top: 88px;
}

.guide-section h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.guide-section > p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 14px;
}

.guide-figure {
  margin-bottom: 18px;
  aspect-ratio: 16 / 7;
  display: flex;
  flex-direction: column;
}

.guide-figure img {
  flex: 1 1 auto;
  min-height: 0;
}

.field-table {
  margin: 14px 0;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.boundary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.boundary-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   pages：404
   -------------------------------------------------------------------------- */
.error-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

.error-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 24px;
}

.error-code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
}

.error-block h1 {
  font-size: 30px;
  margin-bottom: 12px;
}

.error-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-hint {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.error-hint h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.error-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.error-links li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--accent);
}

.error-links li a:hover,
.error-links li a:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}

/* 滚动淡入增强：默认可见，JS 可用时才加初始态 */
.reveal.is-ready {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal.is-ready,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   responsive：1024px 与 768px 断点
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --gap: 24px;
    --aside-w: 210px;
  }

  .hero-inner {
    gap: 28px;
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-row {
    grid-template-columns: minmax(0, 2fr) minmax(72px, 1fr) 64px 88px;
    padding: 12px 14px;
  }

  .update-item {
    grid-template-columns: 100px minmax(0, 1.4fr) 84px minmax(0, 1.6fr);
    padding: 12px 14px;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    gap: 12px;
    min-height: 60px;
    flex-wrap: wrap;
  }

  .brand-sub {
    font-size: 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    flex: 1 0 100%;
    margin-left: 0;
    border-top: 1px solid var(--line);
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 10px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    min-height: 44px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line-soft);
    border-left: 2px solid transparent;
  }

  .nav-link.is-current {
    border-bottom-color: var(--line-soft);
    border-left-color: var(--accent);
    padding-left: 10px;
  }

  .site-main {
    display: block;
  }

  .inner-main {
    padding: 16px 16px 40px;
  }

  h1,
  .page-title,
  .hero-title,
  .error-block h1 {
    font-size: 24px;
  }

  h2,
  .section-title,
  .section-head h2,
  .update-block h2,
  .guide-section h2 {
    font-size: 20px;
  }

  .page-header {
    margin-bottom: 24px;
  }

  .page-description {
    font-size: 15px;
  }

  /* 单栏堆叠：正文在侧栏之前 */
  .page-layout,
  .page-layout.sidebar-left,
  .sidebar-left .page-layout {
    display: block;
  }

  .page-layout.sidebar-left .page-aside,
  .sidebar-left .page-layout .page-aside,
  .sidebar-left .page-layout .page-sidebar {
    order: 0;
  }

  .page-aside,
  .page-sidebar {
    position: static;
    margin-bottom: 24px;
  }

  .page-aside .aside-list,
  .page-sidebar .sidebar-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .page-aside .aside-list li,
  .page-sidebar .sidebar-list li {
    flex: 1 1 auto;
    min-width: 140px;
  }

  .aside-list a,
  .sidebar-list a {
    min-height: 44px;
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 4px;
    padding: 0 12px;
  }

  .hero {
    padding: 32px 0 28px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 0 16px;
  }

  .hero-media {
    aspect-ratio: 16 / 10;
  }

  .hero-lines {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head {
    padding: 0 16px;
    margin-bottom: 16px;
  }

  .overview,
  .genre-entry,
  .catalog-preview,
  .updates-preview,
  .path-guide {
    padding-top: 32px;
  }

  .overview {
    padding-top: 36px;
  }

  .overview-grid,
  .genre-grid,
  .updates-blocks,
  .path-list,
  .genre-advice .advice-steps,
  .boundary-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px;
  }

  .genre-advice .advice-steps,
  .boundary-grid {
    padding: 0;
  }

  .genre-more,
  .catalog-more,
  .updates-more {
    padding: 0 16px;
  }

  .catalog-preview .entry-list {
    width: calc(100% - 32px);
  }

  /* 条目清单改为两行式布局 */
  .entry-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name status"
      "meta meta";
    row-gap: 4px;
    padding: 12px 14px;
  }

  .entry-row .entry-name {
    grid-area: name;
  }

  .entry-row .entry-status {
    grid-area: status;
    justify-self: end;
  }

  .entry-row .entry-genre {
    grid-area: meta;
    align-self: center;
  }

  .entry-row .entry-year {
    display: none;
  }

  /* 更新记录改为堆叠 */
  .update-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 12px 14px;
  }

  .update-name {
    font-size: 15px;
  }

  .update-note {
    font-size: 13px;
  }

  .timeline-row {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
      "date name"
      "status status";
    row-gap: 4px;
  }

  .timeline-row time {
    grid-area: date;
  }

  .timeline-name {
    grid-area: name;
  }

  .timeline-row .entry-status {
    grid-area: status;
    justify-self: start;
  }

  /* 表格横向滚动，页面本身不溢出 */
  .spec-table,
  .field-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .spec-table caption,
  .field-table caption {
    white-space: normal;
  }

  .spec-table thead th,
  .spec-table tbody td,
  .spec-table tbody th,
  .field-table thead th,
  .field-table tbody td,
  .field-table tbody th {
    padding: 10px 12px;
    min-width: 110px;
  }

  .media-figure,
  .section-media,
  .page-media,
  .guide-figure {
    aspect-ratio: 16 / 9;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px 16px 24px;
  }

  .site-footer {
    margin-top: 32px;
  }

  .error-main {
    padding: 32px 16px 40px;
  }

  .error-block,
  .error-hint {
    padding: 20px 16px;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    min-width: 36px;
    font-size: 14px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-links {
    grid-template-columns: minmax(0, 1fr);
  }
}
