/* ==========================================================================
   漫漫漫画 — 全站样式表
   现代主义海报风 · 米白画布 / 墨黑 / 朱红 / 湖蓝 / 明黄
   ========================================================================== */

/* ==========================================================================
   Base — 基础变量、重置、全局样式
   ========================================================================== */

:root {
  --color-canvas: #F5F1E8;
  --color-ink: #141414;
  --color-red: #D9482B;
  --color-blue: #2F5DA8;
  --color-yellow: #F2B43D;
  --color-white: #FFFFFF;
  --color-gray-light: #E8E3D8;
  --color-gray-mid: #8A857A;
  --color-gray-dark: #55504A;
  --font-sans: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-weight-title: 800;
  --font-weight-body: 400;
  --font-size-body: 16px;
  --line-height-body: 1.8;
  --container-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --border-thick: 3px;
  --border-thin: 1px;
  --shadow-card: 0 2px 8px rgba(20, 20, 20, 0.08);
  --shadow-card-hover: 0 6px 16px rgba(20, 20, 20, 0.14);
  --transition-base: 0.2s ease;
}

*,
*::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: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-ink);
  background-color: var(--color-canvas);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-red);
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* 全站统一容器宽度 */
.site-main,
.inner-main,
.site-footer .footer-inner,
.site-header .header-inner {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* 视觉骨架统一 */
.site-header,
.site-footer {
  flex-shrink: 0;
}

.site-main {
  flex: 1 0 auto;
}

/* ==========================================================================
   Layout — 页头、导航、页脚、面包屑、页面标题区
   ========================================================================== */

/* ---------- 页头 ---------- */

.site-header {
  background-color: var(--color-ink);
  border-bottom: var(--border-thick) solid var(--color-red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--color-white);
}

.brand:hover {
  color: var(--color-yellow);
}

.brand-name {
  font-size: 24px;
  font-weight: var(--font-weight-title);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li a {
  display: block;
  padding: 10px 16px;
  color: var(--color-white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.nav-list li a:hover {
  color: var(--color-ink);
  background-color: var(--color-yellow);
}

.nav-list li a.is-current {
  color: var(--color-ink);
  background-color: var(--color-white);
  font-weight: var(--font-weight-title);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* ---------- 面包屑 ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 8px;
  font-size: 14px;
  color: var(--color-gray-mid);
}

.breadcrumb a {
  color: var(--color-gray-mid);
}

.breadcrumb a:hover {
  color: var(--color-red);
}

.breadcrumb-sep {
  color: var(--color-gray-mid);
  margin: 0 2px;
}

.breadcrumb-current {
  color: var(--color-ink);
  font-weight: 600;
}

/* ---------- 页面标题区 ---------- */

.page-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--color-ink);
  margin-bottom: 40px;
}

.page-number {
  font-size: 96px;
  font-weight: var(--font-weight-title);
  line-height: 0.9;
  color: var(--color-gray-light);
  flex-shrink: 0;
  font-style: italic;
  user-select: none;
}

.page-title {
  font-size: 40px;
  font-weight: var(--font-weight-title);
  line-height: 1.2;
  color: var(--color-ink);
  margin-bottom: 8px;
}

.page-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-dark);
  max-width: 640px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  background-color: var(--color-ink);
  color: var(--color-white);
  margin-top: 80px;
  border-top: var(--border-thick) solid var(--color-red);
}

.footer-inner {
  padding-top: 48px;
  padding-bottom: 40px;
}

.footer-brand {
  font-size: 20px;
  font-weight: var(--font-weight-title);
  color: var(--color-white);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--color-gray-light);
  font-size: 14px;
  padding: 4px 0;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-yellow);
}

.footer-archive {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 24px;
}

.archive-label {
  font-size: 14px;
  color: var(--color-gray-mid);
}

.footer-archive a {
  font-size: 14px;
  color: var(--color-gray-light);
}

.footer-archive a:hover {
  color: var(--color-yellow);
}

.footer-copy {
  font-size: 13px;
  color: var(--color-gray-mid);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Components — 通用组件：区块标题、封面卡、色块、时间轴、表格、FAQ、链接卡
   ========================================================================== */

/* ---------- 区块标题 ---------- */

.section-head {
  margin-bottom: 32px;
}

.section-title {
  font-size: 28px;
  font-weight: var(--font-weight-title);
  line-height: 1.3;
  color: var(--color-ink);
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--color-gray-dark);
  line-height: 1.7;
  max-width: 560px;
}

/* ---------- 封面卡（首页精选 / 题材代表卡共用基础） ---------- */

.work-card,
.represent-card {
  background-color: var(--color-white);
  border: var(--border-thick) solid var(--color-ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.work-card:hover,
.represent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.work-figure,
.card-figure,
.work-card-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--color-gray-light);
}

.work-figure img,
.card-figure img,
.work-card-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 首页封面卡 */

.work-card {
  display: flex;
  flex-direction: column;
}

.work-tag {
  display: inline-block;
  align-self: flex-start;
  margin: 14px 14px 0;
  padding: 4px 12px;
  background-color: var(--color-yellow);
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.work-brief {
  padding: 10px 14px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray-dark);
}

/* 题材代表卡 */

.represent-card {
  display: flex;
  flex-direction: column;
  max-width: 320px;
}

.card-info {
  padding: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray-dark);
}

/* ---------- 题材色块按钮 ---------- */

.subject-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
  min-height: 72px;
}

.subject-block:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.subject-num,
.subject-index {
  font-size: 20px;
  font-weight: var(--font-weight-title);
  color: var(--color-gray-mid);
  font-style: italic;
  line-height: 1;
}

.subject-name {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  line-height: 1.3;
}

/* 首页 6 个色块差异化底色 */
.subject-block-1 {
  background-color: #F2B43D;
}

.subject-block-2 {
  background-color: #E8E3D8;
}

.subject-block-3 {
  background-color: #D9482B;
  border-color: var(--color-ink);
}

.subject-block-3 .subject-name {
  color: var(--color-white);
}

.subject-block-3 .subject-num {
  color: rgba(255, 255, 255, 0.7);
}

.subject-block-4 {
  background-color: #2F5DA8;
  border-color: var(--color-ink);
}

.subject-block-4 .subject-name {
  color: var(--color-white);
}

.subject-block-4 .subject-num {
  color: rgba(255, 255, 255, 0.7);
}

.subject-block-5 {
  background-color: #F5F1E8;
}

.subject-block-6 {
  background-color: #141414;
  border-color: var(--color-ink);
}

.subject-block-6 .subject-name {
  color: var(--color-white);
}

.subject-block-6 .subject-num {
  color: rgba(255, 255, 255, 0.6);
}

/* 题材图鉴页色块 */
.block-fantasy {
  background-color: #F2B43D;
}

.block-slice {
  background-color: #E8E3D8;
}

.block-suspense {
  background-color: #D9482B;
  border-color: var(--color-ink);
}

.block-suspense .subject-name {
  color: var(--color-white);
}

.block-suspense .subject-index {
  color: rgba(255, 255, 255, 0.7);
}

.block-sci {
  background-color: #2F5DA8;
  border-color: var(--color-ink);
}

.block-sci .subject-name {
  color: var(--color-white);
}

.block-sci .subject-index {
  color: rgba(255, 255, 255, 0.7);
}

.block-romance {
  background-color: #F5F1E8;
}

.block-adventure {
  background-color: #141414;
  border-color: var(--color-ink);
}

.block-adventure .subject-name {
  color: var(--color-white);
}

.block-adventure .subject-index {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- 时间轴 ---------- */

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 28px;
  border-left: 2px solid var(--color-ink);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  background-color: var(--color-red);
  border: 2px solid var(--color-ink);
  border-radius: 50%;
}

.timeline-time {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.timeline-title {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 4px;
  line-height: 1.4;
}

.timeline-desc {
  font-size: 14px;
  color: var(--color-gray-dark);
  line-height: 1.7;
}

/* ---------- 表格 ---------- */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rank-table,
.archive-table,
.state-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}

.rank-table th,
.rank-table td,
.archive-table th,
.archive-table td,
.state-table th,
.state-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-gray-light);
  font-size: 15px;
  line-height: 1.5;
}

.rank-table thead th,
.archive-table thead th,
.state-table thead th {
  background-color: var(--color-ink);
  color: var(--color-white);
  font-weight: var(--font-weight-title);
  letter-spacing: 0.02em;
}

.rank-table tbody tr,
.archive-table tbody tr,
.state-table tbody tr {
  transition: background-color var(--transition-base);
}

.rank-table tbody tr:hover,
.archive-table tbody tr:hover,
.state-table tbody tr:hover {
  background-color: #F2B43D;
  cursor: default;
}

.rank-table tbody td:first-child,
.archive-table tbody td:first-child,
.state-table tbody td:first-child {
  font-weight: 700;
}

/* ---------- FAQ 手风琴 ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-ink);
  cursor: pointer;
  list-style: none;
  transition: background-color var(--transition-base);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: var(--font-weight-title);
  color: var(--color-red);
  line-height: 1;
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq-item[open] summary {
  background-color: var(--color-gray-light);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 4px 20px 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-gray-dark);
}

/* ---------- 相关链接卡片 ---------- */

.link-card-grid,
.related-grid,
.related-links-grid,
.related-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.link-card,
.related-card,
.related-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.link-card:hover,
.related-card:hover,
.related-link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-red);
}

.link-card-title,
.related-card-title,
.related-title,
.related-name,
.related-link-label {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
}

.link-card-desc,
.related-card-desc,
.related-desc,
.related-link-text {
  font-size: 14px;
  color: var(--color-gray-dark);
  line-height: 1.6;
}

/* 更新记录页底部相关链接 */
.related-links-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-dark);
  margin-right: 12px;
}

.related-links-item {
  font-size: 14px;
  color: var(--color-blue);
}

/* ---------- 工具类 ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Pages — 首页
   ========================================================================== */

/* ---------- 首页 Hero ---------- */

.hero {
  background-color: var(--color-ink);
  color: var(--color-white);
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: center;
  padding: 64px 0;
  margin-bottom: 0;
  width: 100%;
}

.hero-text {
  padding-left: 24px;
  padding-right: 24px;
  max-width: 680px;
}

.hero-title {
  font-size: 64px;
  font-weight: var(--font-weight-title);
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero-slogan {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-yellow);
  margin-bottom: 12px;
  line-height: 1.5;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  min-height: 44px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hero-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-entry-dark {
  background-color: var(--color-ink);
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.hero-entry-dark:hover {
  background-color: var(--color-white);
  color: var(--color-ink);
}

.hero-entry-red {
  background-color: var(--color-red);
  color: var(--color-white);
  border: 2px solid var(--color-red);
}

.hero-entry-red:hover {
  background-color: var(--color-white);
  color: var(--color-red);
  border-color: var(--color-white);
}

.hero-entry-blue {
  background-color: var(--color-blue);
  color: var(--color-white);
  border: 2px solid var(--color-blue);
}

.hero-entry-blue:hover {
  background-color: var(--color-white);
  color: var(--color-blue);
  border-color: var(--color-white);
}

.hero-visual {
  padding-right: 24px;
}

.hero-figure {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: var(--border-thick) solid var(--color-white);
  border-radius: var(--radius-lg);
  background-color: var(--color-gray-light);
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- 首页导语色带 ---------- */

.home-intro {
  background-color: var(--color-yellow);
  padding: 20px 0;
  border-bottom: var(--border-thin) solid var(--color-ink);
}

.intro-line {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: var(--color-ink);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 首页题材图鉴入口 ---------- */

.subject-entry {
  padding: 64px 0 0;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ---------- 首页最近更新 ---------- */

.latest-updates {
  padding: 64px 0 0;
}

/* ---------- 首页精选作品 ---------- */

.featured-works {
  padding: 64px 0 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- 首页人气榜单 ---------- */

.popular-rank {
  padding: 64px 0 0;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: start;
}

.rank-table-wrap .section-title {
  margin-bottom: 16px;
}

.rank-note {
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-left: 6px solid var(--color-red);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 48px;
}

.rank-note-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-gray-dark);
  margin-bottom: 12px;
}

.rank-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-red);
}

/* ---------- 首页阅读说明 ---------- */

.reading-note {
  padding: 64px 0 0;
}

.note-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.note-item {
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.note-num {
  display: inline-block;
  font-size: 14px;
  font-weight: var(--font-weight-title);
  color: var(--color-white);
  background-color: var(--color-ink);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.note-title {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 8px;
}

.note-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-gray-dark);
}

/* ---------- 首页版权反馈条 ---------- */

.feedback-bar {
  margin-top: 64px;
  background-color: var(--color-ink);
  color: var(--color-white);
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.feedback-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.feedback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background-color: var(--color-red);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  min-height: 44px;
  transition: background-color var(--transition-base);
}

.feedback-link:hover {
  background-color: var(--color-yellow);
  color: var(--color-ink);
}

/* ==========================================================================
   Pages — 题材图鉴（subjects）
   ========================================================================== */

/* 题材导览 */
.subject-header {
  margin-bottom: 48px;
}

.subject-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

/* 题材分组 */
.subject-group {
  margin-bottom: 40px;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: var(--border-thin) solid var(--color-ink);
  background-color: var(--color-white);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.subject-group:nth-child(odd) {
  background-color: #F2B43D;
}

.subject-group:nth-child(even) {
  background-color: #E8E3D8;
}

.group-text {
  flex: 1;
  min-width: 0;
}

.group-title {
  font-size: 24px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.group-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-gray-dark);
  margin-bottom: 16px;
}

.represent-card {
  flex-shrink: 0;
  width: 280px;
}

/* 相关入口 */
.related-links {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--color-ink);
}

/* ==========================================================================
   Pages — 精选作品（works）
   ========================================================================== */

/* 页内目录 */
.page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.toc-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.toc-link:hover {
  background-color: var(--color-ink);
  color: var(--color-white);
}

/* 档案结论 */
.archive-intro {
  background-color: var(--color-white);
  border-left: 6px solid var(--color-blue);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 40px;
}

.archive-intro p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-gray-dark);
}

.archive-intro a {
  font-weight: 700;
  color: var(--color-blue);
}

/* 档案表 */
.archive-table-wrap {
  margin-bottom: 48px;
}

.table-note {
  font-size: 14px;
  color: var(--color-gray-mid);
  margin-bottom: 16px;
}

/* 封面卡墙 */
.card-wall {
  margin-bottom: 48px;
}

.card-wall-note {
  font-size: 14px;
  color: var(--color-gray-mid);
  margin-bottom: 24px;
}

.card-wall-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card-number {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background-color: var(--color-ink);
  color: var(--color-white);
  font-size: 14px;
  font-weight: var(--font-weight-title);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.work-card-body {
  padding: 16px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.tag-fantasy {
  background-color: #F2B43D;
  color: var(--color-ink);
}

.tag-scifi {
  background-color: #2F5DA8;
  color: var(--color-white);
}

.tag-mystery {
  background-color: #141414;
  color: var(--color-white);
}

.tag-daily {
  background-color: #E8E3D8;
  color: var(--color-ink);
}

.tag-school {
  background-color: #D9482B;
  color: var(--color-white);
}

.tag-healing {
  background-color: #F5F1E8;
  color: var(--color-ink);
  border: 1px solid var(--color-ink);
}

.work-card-title {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 6px;
}

.work-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray-dark);
}

/* 作品卡墙卡片容器定位 */
.card-wall-grid .work-card {
  position: relative;
}

/* ==========================================================================
   Pages — 更新记录（updates）
   ========================================================================== */

.layout-shell {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 40px;
  align-items: start;
}

.inner-main-content {
  min-width: 0;
}

/* 时间线 */
.timeline {
  margin-bottom: 48px;
}

.section-intro {
  font-size: 15px;
  color: var(--color-gray-dark);
  line-height: 1.7;
  margin-bottom: 24px;
}

.timeline-list {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 28px;
  border-left: 2px solid var(--color-ink);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  background-color: var(--color-red);
  border: 2px solid var(--color-ink);
  border-radius: 50%;
}

.timeline-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.timeline-body h3 {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 4px;
  line-height: 1.4;
}

.timeline-text {
  font-size: 14px;
  color: var(--color-gray-dark);
  line-height: 1.7;
}

/* 状态表 */
.state-section {
  margin-bottom: 48px;
}

/* 更新说明 */
.update-note {
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 48px;
}

.note-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.note-image {
  width: 240px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: var(--border-thin) solid var(--color-ink);
  flex-shrink: 0;
}

.note-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-gray-dark);
  margin-bottom: 12px;
}

.note-text p:last-child {
  margin-bottom: 0;
}

/* 相关链接 */
.related-grid {
  margin-top: 16px;
}

/* 底部横向相关链接 */
.related-links[aria-label="相关内容"] {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-gray-light);
}

/* ==========================================================================
   Pages — 阅读指南（guide）
   ========================================================================== */

/* 三步路径 */
.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.step-item {
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.step-no {
  display: inline-block;
  font-size: 14px;
  font-weight: var(--font-weight-title);
  color: var(--color-white);
  background-color: var(--color-red);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.step-title {
  font-size: 18px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-gray-dark);
}

.step-desc a {
  font-weight: 700;
  color: var(--color-blue);
}

/* FAQ */
.faq {
  margin-bottom: 48px;
}

/* 相关链接 */
.related-links {
  margin-bottom: 48px;
}

/* 阅读场景配图 */
.guide-figure {
  margin-top: 48px;
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-white);
}

.guide-figure img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
}

.guide-figure figcaption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-gray-mid);
  background-color: var(--color-white);
}

/* ==========================================================================
   Pages — 版权与反馈（feedback）
   ========================================================================== */

/* 版权边界 */
.boundary {
  margin-bottom: 48px;
}

.boundary-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.boundary-copy p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-gray-dark);
  background-color: var(--color-white);
  border-left: 6px solid var(--color-blue);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.boundary-media {
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-white);
}

.boundary-media img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
}

.boundary-media figcaption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-gray-mid);
}

/* 反馈 FAQ */
.feedback-faq {
  margin-bottom: 48px;
}

/* ==========================================================================
   Pages — 404
   ========================================================================== */

.error-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px;
  text-align: center;
}

.error-code {
  font-size: 120px;
  font-weight: var(--font-weight-title);
  line-height: 1;
  color: var(--color-red);
  margin-bottom: 16px;
  font-style: italic;
}

.error-detail h1 {
  font-size: 32px;
  font-weight: var(--font-weight-title);
  color: var(--color-ink);
  margin-bottom: 12px;
}

.error-text {
  font-size: 16px;
  color: var(--color-gray-dark);
  margin-bottom: 24px;
  max-width: 480px;
}

.error-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-home,
.error-subjects {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.error-home {
  background-color: var(--color-ink);
  color: var(--color-white);
}

.error-home:hover {
  background-color: var(--color-red);
  color: var(--color-white);
}

.error-subjects {
  background-color: var(--color-white);
  color: var(--color-ink);
  border: 2px solid var(--color-ink);
}

.error-subjects:hover {
  background-color: var(--color-yellow);
  color: var(--color-ink);
}

.error-guide {
  margin-top: 40px;
  background-color: var(--color-white);
  border: var(--border-thin) solid var(--color-ink);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 480px;
}

.guide-text {
  font-size: 15px;
  color: var(--color-gray-dark);
  margin-bottom: 12px;
  line-height: 1.7;
}

.guide-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-red);
}

/* ==========================================================================
   Responsive — 响应式断点
   ========================================================================== */

/* ---------- 平板及以下 ---------- */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .hero-title {
    font-size: 48px;
  }

  .subject-grid,
  .subject-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .note-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .popular-rank {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .rank-note {
    margin-top: 0;
  }

  .layout-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .subject-group {
    flex-direction: column;
  }

  .represent-card {
    width: 100%;
    max-width: 100%;
  }

  .steps-list {
    grid-template-columns: 1fr 1fr;
  }

  .step-item:last-child {
    grid-column: 1 / -1;
  }
}

/* ---------- 手机端 ---------- */

@media (max-width: 768px) {
  .site-main,
  .inner-main,
  .site-footer .footer-inner,
  .site-header .header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* 页头 */
  .header-inner {
    min-height: 56px;
  }

  .brand-name {
    font-size: 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background-color: var(--color-ink);
    padding: 8px 16px 16px;
    border-bottom: var(--border-thick) solid var(--color-red);
    gap: 4px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li a {
    padding: 12px 16px;
    font-size: 16px;
  }

  /* 面包屑 */
  .breadcrumb {
    padding-top: 16px;
    font-size: 13px;
  }

  /* 页面标题区 */
  .page-header {
    gap: 12px;
    padding-bottom: 24px;
    margin-bottom: 32px;
  }

  .page-number {
    font-size: 56px;
  }

  .page-title {
    font-size: 28px;
  }

  .page-description {
    font-size: 15px;
  }

  /* 首页 Hero */
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 0;
    gap: 24px;
  }

  .hero-text {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-slogan {
    font-size: 18px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-entries {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-entry {
    width: 100%;
  }

  .hero-visual {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-figure {
    aspect-ratio: 4 / 3;
  }

  /* 首页导语 */
  .intro-line {
    font-size: 16px;
    padding: 0 16px;
  }

  /* 区块间距 */
  .subject-entry,
  .latest-updates,
  .featured-works,
  .popular-rank,
  .reading-note {
    padding-top: 48px;
  }

  /* 网格单列化 */
  .subject-grid,
  .subject-nav-grid,
  .work-grid,
  .note-list,
  .card-wall-grid,
  .link-card-grid,
  .related-grid,
  .related-links-grid,
  .steps-list {
    grid-template-columns: 1fr;
  }

  .step-item:last-child {
    grid-column: auto;
  }

  /* 首页榜单 */
  .rank-note {
    padding: 20px;
  }

  /* 首页反馈条 */
  .feedback-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .feedback-link {
    width: 100%;
  }

  /* 题材分组 */
  .subject-group {
    padding: 20px;
  }

  .group-title {
    font-size: 20px;
  }

  /* 作品页目录 */
  .page-toc {
    flex-direction: column;
    align-items: stretch;
  }

  .toc-link {
    justify-content: center;
  }

  /* 表格容器 */
  .table-scroll {
    margin-bottom: 8px;
  }

  .archive-table th,
  .archive-table td,
  .state-table th,
  .state-table td,
  .rank-table th,
  .rank-table td {
    padding: 10px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* 更新说明图文 */
  .note-content {
    flex-direction: column;
  }

  .note-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }

  /* 底部相关链接 */
  .related-links[aria-label="相关内容"] {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* 指南配图 */
  .guide-figure img,
  .boundary-media img {
    aspect-ratio: 4 / 3;
  }

  /* 404 */
  .error-code {
    font-size: 80px;
  }

  .error-detail h1 {
    font-size: 24px;
  }

  .error-links {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .error-home,
  .error-subjects {
    width: 100%;
  }

  /* 页脚 */
  .site-footer {
    margin-top: 48px;
  }

  .footer-inner {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .footer-links {
    gap: 4px 16px;
  }

  .footer-links a {
    font-size: 13px;
  }
}

/* ---------- 小屏手机（390px 及以下） ---------- */

@media (max-width: 390px) {
  .hero-title {
    font-size: 32px;
  }

  .page-number {
    font-size: 44px;
  }

  .page-title {
    font-size: 24px;
  }

  .subject-block {
    padding: 16px;
  }

  .subject-name {
    font-size: 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .work-card .work-tag {
    margin: 10px 10px 0;
  }

  .work-brief {
    padding: 8px 10px 12px;
  }
}
