/* ==========================================================================
   樱花电视剧大全 — 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* ==========================================================================
   1. base — 变量、重置、排版基准
   ========================================================================== */

:root {
  --paper: #f6f3ef;
  --paper-soft: #fbf9f6;
  --ink: #24211e;
  --ink-soft: #6b645c;
  --accent: #c96a7a;
  --accent-deep: #a94f60;
  --line: #e0d9d1;
  --media-bg: #eae4dd;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  --shell-max: 1120px;
  --shell-pad: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-deep);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* 正文通用段落 */
.body-text {
  max-width: 40em;
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.body-text:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   2. layout — 骨架：页头 / 主容器 / 面包屑 / 页脚
   ========================================================================== */

.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

/* ---- 顶部线索说明条（仅首页） ---- */

.lead-bar {
  margin: 0;
  padding: 10px var(--shell-pad);
  background-color: var(--ink);
  color: #f1ece6;
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
}

/* ---- 页头 ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: rgba(246, 243, 239, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 14px var(--shell-pad);
}

.brand {
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.brand::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 4px;
  background-color: var(--accent);
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent-deep);
}

/* ---- 主导航 ---- */

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
}

.nav-item {
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 8px 2px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.nav-link.is-current {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

/* ---- 汉堡按钮（桌面隐藏） ---- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--paper-soft);
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- 主内容区 ---- */

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

/* 首页主内容：通栏区块，内部各自约束宽度 */
.home-main {
  display: block;
}

/* 内页主内容：统一容器宽度 */
.inner-main {
  display: block;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad) 56px;
}

/* ---- 面包屑 ---- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.breadcrumb a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

/* ---- 内页标题区 ---- */

.page-header {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.page-description {
  max-width: 46em;
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---- 页脚 ---- */

.site-footer {
  margin-top: auto;
  background-color: #efeae4;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 40px var(--shell-pad) 28px;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.footer-text {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.footer-bottom {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad) 28px;
  border-top: 1px solid var(--line);
}

.footer-copy {
  padding-top: 18px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ==========================================================================
   3. components — 通用组件：区块头、按钮、卡片、列表、FAQ
   ========================================================================== */

/* ---- 区块头 ---- */

.section-head {
  margin-bottom: 26px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.section-desc,
.section-intro,
.section-lead {
  max-width: 46em;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.section-foot {
  margin-top: 20px;
  font-size: 14.5px;
}

.section-foot a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.section-foot a:hover,
.section-foot a:focus-visible {
  border-bottom-color: var(--accent-deep);
}

.subsection-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.section-title + .section-desc,
.section-title + .section-intro,
.section-title + .section-lead {
  margin-top: 10px;
}

/* ---- 按钮 ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background-color: var(--ink);
  color: #f7f3ef;
  border-color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* ---- 元数据：编号 / 日期 / 字段名 ---- */

.genre-no,
.genre-code,
.step-no,
.genre-map-code,
.mapping-name,
.check-label,
.field-name {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---- 题材总表行（首页 .genre-list / 内页 .genre-table 共用行结构） ---- */

.genre-row {
  display: grid;
  grid-template-columns: 56px minmax(160px, 200px) minmax(0, 1fr) minmax(200px, 260px);
  gap: 8px 22px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.genre-list .genre-row:last-child,
.genre-table .genre-row:last-child {
  border-bottom: 1px solid var(--line);
}

.genre-list .genre-no,
.genre-table .genre-code {
  color: var(--accent-deep);
  font-weight: 700;
}

.genre-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}

.genre-scope {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.genre-link {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.genre-link a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.genre-link a:hover,
.genre-link a:focus-visible {
  border-bottom-color: var(--accent-deep);
}

/* ---- 片单卡片（首页 .playlist-card / 内页 .playlist-card） ---- */

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 26px;
}

.playlist-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 14px 18px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.playlist-card:hover {
  border-color: #cfc5ba;
  background-color: #fdfbf8;
}

.playlist-media,
.playlist-figure {
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--media-bg);
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
}

.playlist-media img,
.playlist-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.playlist-name a {
  color: inherit;
  border-bottom: 1px solid transparent;
}

.playlist-name a:hover,
.playlist-name a:focus-visible {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.playlist-idea,
.playlist-note {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.card-link {
  margin-top: auto;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 600;
}

.card-link a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.card-link a:hover,
.card-link a:focus-visible {
  border-bottom-color: var(--accent-deep);
}

/* ---- 步骤（首页 .steps-list / 内页 .step-list） ---- */

.steps-list,
.step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.steps-list .step-item,
.step-list .step-item {
  min-width: 0;
  padding: 16px 16px 18px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
}

.steps-list .step-no {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-deep);
  font-weight: 700;
}

.steps-list .step-name,
.step-list .step-name {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.steps-list .step-desc,
.step-list .step-desc {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.steps-list .step-check,
.step-list .step-check {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.step-list .step-desc a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.step-list .step-desc a:hover,
.step-list .step-desc a:focus-visible {
  border-bottom-color: var(--accent-deep);
}

.check-label {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  background-color: var(--media-bg);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
}

/* ---- 摘要列表（首页整理记录 / 边界摘要） ---- */

.summary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
}

.summary-col {
  min-width: 0;
  padding: 22px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.summary-subtitle {
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-item {
  position: relative;
  padding-left: 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.summary-item::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
}

.summary-more {
  margin-top: 16px;
  font-size: 14px;
}

.summary-more a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.summary-more a:hover,
.summary-more a:focus-visible {
  border-bottom-color: var(--accent-deep);
}

/* ---- 站内栏目索引（首页） ---- */

.index-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.index-col {
  min-width: 0;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--paper-soft);
}

.index-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.index-desc {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.index-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.index-link:hover,
.index-link:focus-visible {
  border-bottom-color: var(--accent-deep);
}

/* ---- 图片承载（内页 figure） ---- */

.guide-figure,
.archive-figure,
.genre-figure {
  overflow: hidden;
  margin-bottom: 26px;
  background-color: var(--media-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.guide-figure img,
.archive-figure img,
.genre-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.guide-figure figcaption,
.archive-figure figcaption,
.genre-figure figcaption,
.figure-caption {
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: var(--paper-soft);
  border-top: 1px solid var(--line);
}

/* ---- 字段口径对照（浏览指引） ---- */

.glossary-columns {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 0 32px;
}

.column-title {
  padding-bottom: 10px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.field-name-list,
.field-meaning-list {
  display: grid;
}

.field-name,
.field-meaning {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.7;
}

.field-name {
  color: var(--ink);
  font-weight: 600;
}

.field-meaning {
  color: var(--ink-soft);
}

/* ---- FAQ 折叠（浏览指引） ---- */

.browse-faq details.faq-item {
  border-bottom: 1px solid var(--line);
}

.browse-faq details.faq-item:first-of-type {
  border-top: 1px solid var(--line);
}

.faq-question {
  position: relative;
  padding: 16px 40px 16px 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  top: 14px;
  right: 6px;
  width: 22px;
  height: 22px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  color: var(--accent-deep);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.faq-item[open] .faq-question::after {
  content: "–";
}

.faq-answer {
  padding: 0 40px 18px 0;
}

.faq-answer p {
  max-width: 44em;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---- 下一步入口（浏览指引） ---- */

.next-link-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.next-link-item {
  min-width: 0;
  padding: 18px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.next-link {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.next-link:hover,
.next-link:focus-visible {
  border-bottom-color: var(--accent-deep);
}

.next-link-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---- 时间线（整理记录） ---- */

.stage-timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line);
  padding-left: 24px;
}

.stage-item {
  position: relative;
  padding: 0 0 26px;
}

.stage-item:last-child {
  padding-bottom: 0;
}

.stage-item::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -31px;
  width: 12px;
  height: 12px;
  background-color: var(--paper);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.stage-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.stage-notes {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.stage-notes li {
  position: relative;
  padding-left: 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.stage-notes li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 5px;
  height: 5px;
  background-color: var(--line);
  border-radius: 50%;
}

/* ---- 边界与字段变更（整理记录） ---- */

.boundary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
}

.boundary-col {
  min-width: 0;
  padding: 22px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.boundary-col h3 {
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.boundary-list {
  display: grid;
  gap: 10px;
}

.boundary-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
}

/* ---- 对应关系行（整理记录） ---- */

.mapping-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.mapping-row {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 8px 24px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.mapping-name {
  color: var(--accent-deep);
  font-weight: 700;
}

.mapping-scope {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---- 反馈入口（整理记录） ---- */

.feedback-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feedback-col {
  min-width: 0;
  padding: 18px 16px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.feedback-col h3 {
  margin-bottom: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.feedback-col p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.feedback-col p + p {
  margin-top: 8px;
}

/* ---- 站内文本链接（整理记录正文） ---- */

.inline-link {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.inline-link:hover,
.inline-link:focus-visible {
  border-bottom-color: var(--accent-deep);
}

/* ==========================================================================
   4. pages — 首页各区块与内页专属模块
   ========================================================================== */

/* ---- 首页：首屏定位区 ---- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 40px 48px;
  align-items: center;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 48px var(--shell-pad) 52px;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.hero-desc {
  max-width: 34em;
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-media {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: var(--media-bg);
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-media figcaption {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: var(--paper-soft);
  border-top: 1px solid var(--line);
}

/* ---- 首页：通用区块容器 ---- */

.genre-overview,
.playlist-entry,
.browse-steps,
.summary-block,
.site-index {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 46px var(--shell-pad);
  border-top: 1px solid var(--line);
}

.genre-overview {
  padding-top: 40px;
}

/* ---- 内页：题材频道 ---- */

.genre-table-section,
.genre-detail-section,
.genre-map-section,
.genre-next-section,
.section-playlist-grid,
.section-playlist-detail,
.section-playlist-map,
.section-playlist-update,
.guide-steps,
.field-glossary,
.browse-faq,
.next-links,
.archive-stages,
.archive-boundary,
.archive-mapping,
.archive-feedback {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.genre-table-section,
.section-playlist-grid,
.guide-steps,
.archive-stages {
  padding-top: 0;
  border-top: 0;
}

.genre-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
}

.genre-detail-col {
  min-width: 0;
  padding: 22px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.genre-detail-col .subsection-title {
  margin-bottom: 12px;
}

.genre-map-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.genre-map-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 20px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.genre-map-code {
  color: var(--accent-deep);
  font-weight: 700;
}

.genre-map-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.genre-map-text a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.genre-map-text a:hover,
.genre-map-text a:focus-visible {
  border-bottom-color: var(--accent-deep);
}

.genre-next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.genre-next-card {
  min-width: 0;
  padding: 22px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.genre-next-card .subsection-title {
  margin-bottom: 10px;
}

/* ---- 内页：专题片单 ---- */

.playlist-detail-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.playlist-detail-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.detail-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.detail-thought,
.detail-scope {
  max-width: 46em;
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.detail-scope {
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.playlist-map-layout,
.update-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
}

.playlist-map-col,
.update-col {
  min-width: 0;
  padding: 22px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.playlist-map-col .subsection-title,
.update-col .subsection-title {
  margin-bottom: 14px;
}

.map-list,
.update-list {
  display: grid;
  gap: 10px;
}

.map-item,
.update-item {
  position: relative;
  padding-left: 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.map-item::before,
.update-item::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
}

.map-item a,
.map-links a,
.update-item a,
.update-links a,
.map-text a,
.update-text a {
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(201, 106, 122, 0.4);
}

.map-item a:hover,
.map-links a:hover,
.update-item a:hover,
.update-links a:hover,
.map-text a:hover,
.update-text a:hover,
.map-item a:focus-visible,
.map-links a:focus-visible,
.update-item a:focus-visible,
.update-links a:focus-visible,
.map-text a:focus-visible,
.update-text a:focus-visible {
  border-bottom-color: var(--accent-deep);
}

/* ==========================================================================
   5. pages — 404
   ========================================================================== */

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px var(--shell-pad);
}

.container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
}

.error-inner {
  max-width: 640px;
  padding: 40px 32px;
  background-color: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: left;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-deep);
}

.error-inner h1 {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.error-text {
  max-width: 34em;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ==========================================================================
   6. responsive — 768px / 480px 两级断点
   ========================================================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 32px;
  }

  .index-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feedback-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-list,
  .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --shell-pad: 18px;
  }

  .lead-bar {
    font-size: 12.5px;
    text-align: left;
  }

  .header-inner {
    flex-wrap: nowrap;
    align-items: center;
    padding: 12px var(--shell-pad);
  }

  .brand {
    font-size: 18px;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-start;
  }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 10px;
    padding: 6px 0;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-item {
    border-bottom: 1px solid var(--line);
  }

  .nav-item:last-child {
    border-bottom: 0;
  }

  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 2px;
    font-size: 16px;
    border-bottom: 0;
  }

  .nav-link.is-current {
    color: var(--accent-deep);
    border-bottom: 0;
  }

  .inner-main {
    padding-bottom: 44px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-header {
    padding-bottom: 20px;
    margin-bottom: 26px;
  }

  .section-title {
    font-size: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 32px var(--shell-pad) 36px;
  }

  .hero-title {
    font-size: 27px;
  }

  .hero-media img {
    aspect-ratio: 16 / 10;
  }

  .genre-overview,
  .playlist-entry,
  .browse-steps,
  .summary-block,
  .site-index {
    padding: 34px var(--shell-pad);
  }

  .genre-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 14px;
    padding: 16px 0;
  }

  .genre-list .genre-name,
  .genre-table .genre-name {
    grid-column: 2;
  }

  .genre-list .genre-scope,
  .genre-table .genre-scope {
    grid-column: 2;
  }

  .genre-list .genre-link,
  .genre-table .genre-link {
    grid-column: 2;
  }

  .playlist-grid,
  .summary-columns,
  .genre-detail-grid,
  .genre-next-grid,
  .playlist-map-layout,
  .update-layout,
  .boundary-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps-list,
  .step-list,
  .next-link-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .index-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glossary-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .glossary-meanings .column-title {
    margin-top: 22px;
  }

  .field-name-list,
  .field-meaning-list {
    border-top: 1px solid var(--line);
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 32px var(--shell-pad) 22px;
  }

  .genre-table-section,
  .genre-detail-section,
  .genre-map-section,
  .genre-next-section,
  .section-playlist-grid,
  .section-playlist-detail,
  .section-playlist-map,
  .section-playlist-update,
  .guide-steps,
  .field-glossary,
  .browse-faq,
  .next-links,
  .archive-stages,
  .archive-boundary,
  .archive-mapping,
  .archive-feedback {
    padding: 26px 0;
  }

  .genre-map-item,
  .mapping-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .stage-timeline {
    padding-left: 18px;
  }

  .stage-item::before {
    left: -25px;
  }

  .error-main {
    padding: 40px var(--shell-pad);
  }

  .error-inner {
    padding: 28px 22px;
  }

  .error-code {
    font-size: 34px;
  }

  .error-inner h1 {
    font-size: 23px;
  }
}

@media (max-width: 480px) {
  :root {
    --shell-pad: 16px;
  }

  .hero-title {
    font-size: 24px;
  }

  .page-title {
    font-size: 23px;
  }

  .section-title {
    font-size: 19px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .index-columns,
  .feedback-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-col,
  .boundary-col,
  .genre-detail-col,
  .genre-next-card,
  .playlist-map-col,
  .update-col,
  .next-link-item,
  .index-col,
  .feedback-col {
    padding: 16px;
  }

  .playlist-card {
    padding: 12px 12px 16px;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   7. 动效增强 — 仅在不影响初始可见性的前提下叠加
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .playlist-card,
  .genre-row,
  .index-col,
  .next-link-item,
  .feedback-col {
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
  }

  .index-col:hover,
  .next-link-item:hover,
  .feedback-col:hover {
    border-color: #cfc5ba;
    background-color: #fdfbf8;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
