/* ============================================================
   BASE — 全局基础样式
   ============================================================ */
:root {
  --bg: #f4f3ef;
  --bg-soft: #ecebe6;
  --text: #262a2e;
  --text-soft: #5a6066;
  --accent: #9ed110;
  --accent-dark: #7fb30c;
  --amber: #e8b64c;
  --border: #d8d4cc;
  --border-strong: #c6c1b7;
  --header-bg: rgba(244, 243, 239, 0.92);
  --card-bg: #ffffff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --container: 1200px;
  --header-h: 64px;
  --header-h-scrolled: 48px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191c1f;
    --bg-soft: #1f2327;
    --text: #e8e6e1;
    --text-soft: #a8ada6;
    --accent: #9ed110;
    --accent-dark: #b3e64a;
    --amber: #e8b64c;
    --border: #2d3237;
    --border-strong: #3a4046;
    --header-bg: rgba(25, 28, 31, 0.92);
    --card-bg: #1f2327;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

html[data-theme="dark"] {
  --bg: #191c1f;
  --bg-soft: #1f2327;
  --text: #e8e6e1;
  --text-soft: #a8ada6;
  --accent: #9ed110;
  --accent-dark: #b3e64a;
  --amber: #e8b64c;
  --border: #2d3237;
  --border-strong: #3a4046;
  --header-bg: rgba(25, 28, 31, 0.92);
  --card-bg: #1f2327;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] {
  --bg: #f4f3ef;
  --bg-soft: #ecebe6;
  --text: #262a2e;
  --text-soft: #5a6066;
  --accent: #9ed110;
  --accent-dark: #7fb30c;
  --amber: #e8b64c;
  --border: #d8d4cc;
  --border-strong: #c6c1b7;
  --header-bg: rgba(244, 243, 239, 0.92);
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

/* ============================================================
   LAYOUT — 全局布局骨架
   ============================================================ */

/* 全站统一容器宽度 */
.header-inner,
.site-main,
.footer-inner {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ============================================================
   HEADER — 页头与导航
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  transition: height 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  height: var(--header-h-scrolled);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.brand-slogan {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-soft);
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-sm);
}

.nav-toggle:hover {
  background-color: var(--bg-soft);
}

.toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background-color: var(--bg-soft);
}

.nav-link.is-current {
  color: var(--text);
  font-weight: 700;
}

.nav-link.is-current::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background-color: var(--accent);
  border-radius: 1px;
}

/* ============================================================
   MAIN — 主内容区
   ============================================================ */
.site-main {
  flex: 1;
  padding-top: 48px;
  padding-bottom: 64px;
}

/* ============================================================
   BREADCRUMB — 面包屑
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  margin-bottom: 28px;
  color: var(--text-soft);
}

.breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.breadcrumb-sep {
  color: var(--border-strong);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   PAGE HEADER — 内页标题区
   ============================================================ */
.page-header {
  margin-bottom: 44px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 64px;
  height: 2px;
  background-color: var(--accent);
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}

.page-description {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 720px;
  line-height: 1.7;
}

.page-desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  max-width: 720px;
  line-height: 1.7;
  margin-top: 6px;
}

/* ============================================================
   SECTION TITLE — 区块标题
   ============================================================ */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 22px;
  background-color: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ============================================================
   FOOTER — 页脚
   ============================================================ */
.site-footer {
  background-color: var(--bg-soft);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  padding-top: 44px;
  padding-bottom: 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 480px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 0.92rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent-dark);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

/* ============================================================
   COMPONENTS — 通用组件
   ============================================================ */

/* 题材标签 */
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.genre-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  color: var(--text-soft);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.genre-tag:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* 标签（卡片内） */
.card-tag,
.exhibit-work-tag,
.rank-genre,
.update-genre,
.update-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background-color: var(--bg);
  display: inline-block;
}

/* 站内链接按钮 */
.hero-cta,
.section-more,
.text-link,
.exhibit-link,
.topic-link,
.branch-link,
.entry-link,
.btn-back,
.btn-guide {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.hero-cta:hover,
.section-more:hover,
.text-link:hover,
.exhibit-link:hover,
.topic-link:hover,
.branch-link:hover,
.entry-link:hover,
.btn-back:hover,
.btn-guide:hover {
  border-bottom-color: var(--accent);
  color: var(--accent-dark);
}

/* 相关入口卡 */
.related-card,
.entry-card,
.branch-card {
  display: block;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.related-card:hover,
.entry-card:hover,
.branch-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-card-title,
.entry-title,
.branch-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.related-card-desc,
.entry-desc,
.branch-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* 滚动出现动画（增强，不影响初始可见性） */
@media (prefers-reduced-motion: no-preference) {
  .fade-in-up {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   PAGES — 首页
   ============================================================ */

/* --- Hero 首屏 --- */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}

.hero-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 8px;
}

.boundary-note {
  font-size: 0.88rem;
  color: var(--text-soft);
  border-left: 3px solid var(--amber);
  padding-left: 12px;
  margin: 16px 0;
  line-height: 1.6;
  max-width: 480px;
}

.hero-cta {
  margin-top: 8px;
  padding: 10px 24px;
  background-color: var(--accent);
  color: #191c1f;
  border-radius: var(--radius-md);
  font-weight: 700;
  border: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  background-color: var(--accent-dark);
  color: #191c1f;
  transform: translateY(-1px);
}

.hero-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* --- 三分支入口 --- */
.branch-section {
  margin-bottom: 72px;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.branch-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branch-link {
  align-self: flex-start;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* --- 双栏摘要：榜单 + 更新 --- */
.summary-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 72px;
}

.summary-column {
  min-width: 0;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.rank-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-num {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--amber);
  width: 32px;
  flex-shrink: 0;
  text-align: right;
  line-height: 1.4;
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.rank-genre {
  margin-bottom: 6px;
}

.rank-reason {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.section-more {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.update-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.update-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.update-item:last-child {
  border-bottom: none;
}

.update-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-soft);
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 76px;
}

.update-info {
  flex: 1;
  min-width: 0;
}

.update-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.update-genre {
  margin-bottom: 6px;
}

.update-summary {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.55;
}

/* --- 交错媒体区 --- */
.alternate-section {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-bottom: 72px;
}

.alternate-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.alternate-block.reverse {
  direction: rtl;
}

.alternate-block.reverse > * {
  direction: ltr;
}

.alternate-text {
  min-width: 0;
}

.alternate-text .section-title {
  margin-bottom: 16px;
}

.alternate-text p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 12px;
}

.text-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 4px;
}

.alternate-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.alternate-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

/* --- 规则说明条 --- */
.path-section {
  background-color: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 48px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.path-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-dark);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  align-self: flex-start;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* --- 首页相关链接条 --- */
.related-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.related-links-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 600;
}

.related-links-item {
  font-size: 0.88rem;
  color: var(--accent-dark);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

.related-links-item:hover {
  border-color: var(--accent);
}

/* ============================================================
   PAGES — 题材展览
   ============================================================ */

.exhibition-list {
  margin-bottom: 64px;
}

.exhibit-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.exhibit-block:first-of-type {
  padding-top: 0;
}

.exhibit-block:last-of-type {
  border-bottom: none;
}

.exhibit-block:nth-child(even) {
  direction: rtl;
}

.exhibit-block:nth-child(even) > * {
  direction: ltr;
}

.exhibit-copy {
  min-width: 0;
}

.exhibit-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.exhibit-curator {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 16px;
  line-height: 1.6;
}

.exhibit-work {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.exhibit-work-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.exhibit-work-tag {
  margin-bottom: 8px;
}

.exhibit-work-reason {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.exhibit-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.exhibit-media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.exhibit-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 11;
}

/* 专题推荐 */
.topic-recommend {
  margin-bottom: 64px;
}

.topic-intro {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 720px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.topic-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.topic-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.topic-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.topic-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.topic-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  align-self: flex-start;
  margin-top: auto;
}

/* 相关入口 */
.related-entry {
  margin-bottom: 32px;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  align-self: flex-start;
  margin-top: auto;
}

/* ============================================================
   PAGES — 馆藏专题
   ============================================================ */

.collection-section,
.topic-section {
  margin-bottom: 64px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.section-note {
  font-size: 0.9rem;
  color: var(--text-soft);
  max-width: 720px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.collection-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.collection-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.card-tag {
  align-self: flex-start;
}

.card-reason {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* 专题合集横排 */
.topic-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.topic-card.topic-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.topic-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.topic-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.topic-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.topic-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.topic-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  align-self: flex-start;
  margin-top: auto;
}

/* 相关卡片 */
.related-section {
  margin-bottom: 32px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.related-desc {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ============================================================
   PAGES — 更新记录
   ============================================================ */

.archive-section {
  margin-bottom: 56px;
}

.archive-group {
  margin-bottom: 40px;
}

.archive-group:last-child {
  margin-bottom: 0;
}

.archive-month {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  border-left: 3px solid var(--amber);
  padding-left: 12px;
  margin-bottom: 16px;
}

.archive-group .update-list {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.archive-group .update-item {
  padding: 12px 0 12px 16px;
}

.update-content {
  flex: 1;
  min-width: 0;
}

.update-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.update-summary {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.archive-figure {
  margin: 48px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.archive-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 21 / 9;
}

.archive-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 12px 16px;
  background-color: var(--bg-soft);
  font-family: var(--font-mono);
}

/* 相关推荐 */
.related-links {
  margin-bottom: 32px;
}

.related-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.related-card p {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ============================================================
   PAGES — 韩漫课堂
   ============================================================ */

.concept-notes {
  margin-bottom: 56px;
}

.concept-notes > h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.concept-block {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.concept-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.concept-block p {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 10px;
}

.concept-example {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background-color: var(--bg);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  line-height: 1.6;
}

.term-section {
  margin-bottom: 48px;
}

.term-section > h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.term-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.term-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.term-item dt {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.term-item dd {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.reading-figure {
  margin: 48px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.reading-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 21 / 9;
}

.reading-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 12px 16px;
  background-color: var(--bg-soft);
  font-family: var(--font-mono);
}

/* 相关入口 */
.related-links .related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-links .related-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.related-links .related-card p {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.related-links .related-card a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  align-self: flex-start;
  margin-top: auto;
}

/* ============================================================
   PAGES — 阅读指南
   ============================================================ */

.guide-steps {
  margin-bottom: 56px;
}

.guide-steps > h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.section-intro {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 720px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--amber);
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.step-card p a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-dark);
  display: inline-block;
  margin-top: 8px;
}

.reading-operation {
  margin-bottom: 56px;
}

.reading-operation > h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.operation-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.operation-media {
  min-width: 0;
}

.guide-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.guide-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.guide-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 10px 14px;
  background-color: var(--bg-soft);
  font-family: var(--font-mono);
}

.operation-text {
  min-width: 0;
}

.operation-text p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 14px;
}

.reading-tips {
  margin-bottom: 56px;
}

.reading-tips > h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.tip-item:last-child {
  border-bottom: none;
}

.tip-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-item p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ============================================================
   PAGES — 站务说明
   ============================================================ */

.boundary-section,
.rules-section,
.faq-section {
  margin-bottom: 56px;
}

.boundary-section .section-title,
.rules-section .section-title,
.faq-section .section-title {
  margin-bottom: 8px;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.boundary-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.boundary-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.boundary-card-title::before {
  content: "▌";
  color: var(--accent);
  font-family: var(--font-mono);
}

.boundary-card p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.rule-item:last-child {
  border-bottom: none;
}

.rule-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber);
  flex-shrink: 0;
  width: 28px;
  text-align: right;
  line-height: 1.4;
}

.rule-content {
  flex: 1;
  min-width: 0;
}

.rule-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.rule-content p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--accent);
}

.faq-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.2s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  background-color: var(--bg-soft);
}

.faq-question::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent-dark);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 16px;
}

.faq-answer p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* 站务示意图 */
.site-figure {
  margin: 48px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.site-figure-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 21 / 9;
}

.site-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 12px 16px;
  background-color: var(--bg-soft);
  font-family: var(--font-mono);
}

/* ============================================================
   PAGES — 404
   ============================================================ */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 48px 24px;
}

.error-panel {
  max-width: 560px;
  text-align: center;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 16px;
}

.error-panel h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-back,
.btn-guide {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-back:hover,
.btn-guide:hover {
  border-color: var(--accent);
  background-color: var(--bg-soft);
}

.error-tip {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

/* ============================================================
   UTILITY — 工具类
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE — 响应式
   ============================================================ */

/* 平板及以下 */
@media (max-width: 1024px) {
  .header-inner,
  .site-main,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-section {
    gap: 32px;
  }

  .home-title {
    font-size: 1.9rem;
  }

  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .term-list {
    grid-template-columns: 1fr;
  }
}

/* 手机端 */
@media (max-width: 768px) {
  .header-inner,
  .site-main,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header {
    height: var(--header-h);
  }

  /* 移动导航按钮显示 */
  .nav-toggle {
    display: flex;
  }

  /* 移动导航列表默认收起 */
  .nav-list {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 2px;
    z-index: 99;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    box-shadow: var(--shadow-md);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-link.is-current::after {
    display: none;
  }

  .nav-link.is-current {
    background-color: var(--bg-soft);
  }

  /* 首屏改为单列 */
  .hero-section {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 56px;
  }

  .hero-info {
    order: 1;
  }

  .hero-figure {
    order: 2;
  }

  .home-title {
    font-size: 1.7rem;
  }

  /* 三分支入口单列 */
  .branch-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .branch-section {
    margin-bottom: 56px;
  }

  /* 双栏摘要：先更新后榜单 */
  .summary-section {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 56px;
  }

  .rank-column {
    order: 2;
  }

  .update-column {
    order: 1;
  }

  /* 交错媒体单列 */
  .alternate-section {
    gap: 48px;
    margin-bottom: 56px;
  }

  .alternate-block {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .alternate-block.reverse {
    direction: ltr;
  }

  .alternate-text {
    order: 1;
  }

  .alternate-figure {
    order: 2;
  }

  /* 规则说明条单列 */
  .path-section {
    padding: 28px 20px;
    margin-bottom: 40px;
  }

  .path-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* 相关链接换行 */
  .related-links {
    gap: 10px;
    padding: 14px 0;
  }

  /* 题材展览 */
  .exhibit-block,
  .exhibit-block:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 20px;
    direction: ltr;
    padding: 24px 0;
  }

  .exhibit-copy {
    order: 1;
  }

  .exhibit-media {
    order: 2;
  }

  .topic-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .entry-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 馆藏专题 */
  .collection-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .topic-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 更新记录 */
  .archive-month {
    font-size: 1rem;
  }

  .archive-group .update-list {
    padding-left: 12px;
  }

  .archive-group .update-item {
    flex-direction: column;
    gap: 6px;
    padding-left: 12px;
  }

  .archive-hero-image {
    aspect-ratio: 16 / 9;
  }

  /* 韩漫课堂 */
  .concept-block {
    padding: 20px;
  }

  .term-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reading-figure img {
    aspect-ratio: 16 / 9;
  }

  /* 阅读指南 */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .operation-block {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .operation-media {
    order: 1;
  }

  .operation-text {
    order: 2;
  }

  .tip-item {
    flex-direction: column;
    gap: 6px;
  }

  .tip-label {
    align-self: flex-start;
  }

  /* 站务说明 */
  .boundary-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .boundary-card {
    padding: 20px;
  }

  .rule-item {
    gap: 12px;
  }

  .site-figure-img {
    aspect-ratio: 16 / 9;
  }

  /* 404 */
  .error-panel {
    padding: 36px 24px;
  }

  .error-code {
    font-size: 3rem;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-back,
  .btn-guide {
    width: 100%;
    text-align: center;
  }

  /* 页脚单列 */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 36px;
    padding-bottom: 24px;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-link {
    font-size: 0.9rem;
  }
}

/* 小屏手机 */
@media (max-width: 420px) {
  .brand-slogan {
    display: none;
  }

  .home-title {
    font-size: 1.5rem;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .update-date {
    min-width: 64px;
    font-size: 0.75rem;
  }

  .rank-num {
    font-size: 1.1rem;
    width: 26px;
  }
}
