/* =========================================================
   里番动漫 · 全站样式表
   视觉方向：地方门户风内容站，深墨蓝 + 暖橙，纸白底
   ========================================================= */

/* ---------------------------------------------------------
   1. base · 变量、重置、基础排版
   --------------------------------------------------------- */
:root {
  --ink: #1b2a41;
  --ink-soft: #2c3d59;
  --accent: #e07a2f;
  --accent-dark: #c2631d;
  --paper: #fbfaf7;
  --line: #d9d5cd;
  --line-soft: #ece8e1;
  --muted: #5b6270;
  --muted-light: #7b818c;
  --white: #ffffff;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-soft: 0 1px 2px rgba(27, 42, 65, 0.06);
  --shadow-hover: 0 4px 14px rgba(27, 42, 65, 0.12);
  --container: 1180px;
  --gutter: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 17px;
}

h4 {
  font-size: 15px;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}

time {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   2. layout · 骨架：容器、页头、导航、主体、页脚
   --------------------------------------------------------- */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- 页头 --- */
.site-header {
  background: var(--ink);
  color: var(--white);
  border-bottom: 3px solid var(--accent);
  position: relative;
  z-index: 60;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  padding: 12px 0;
  flex-shrink: 0;
}

.brand:hover,
.brand:focus-visible {
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  position: relative;
  padding-left: 14px;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.brand-slogan {
  font-size: 12px;
  color: #a9b5c8;
  letter-spacing: 0.02em;
  padding-left: 10px;
  border-left: 1px solid #3a4a63;
}

/* --- 主导航 --- */
.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list li {
  display: block;
}

.nav-list a {
  display: block;
  padding: 10px 14px;
  color: #ccd6e4;
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--white);
  font-weight: 600;
  background: rgba(224, 122, 47, 0.18);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* --- 移动端菜单按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid #3a4a63;
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: 9px 12px;
  min-height: 44px;
  margin-left: auto;
}

.nav-toggle-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--white);
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.nav-toggle-text {
  font-size: 14px;
}

/* --- 主体容器 --- */
.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.inner-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) 56px;
}

.home-main {
  padding-bottom: 0;
}

/* --- 面包屑 --- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent-dark);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 500;
}

/* --- 内页标题区 --- */
.page-header {
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}

.page-description {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 820px;
}

/* --- 通用 section 标题 --- */
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}

.section-note,
.section-intro,
.section-lead {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head .section-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* --- 页脚 --- */
.site-footer {
  background: var(--ink);
  color: #b8c2d2;
  margin-top: 56px;
  border-top: 3px solid var(--accent);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 28px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  max-width: 340px;
}

.footer-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 10px;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: #98a4b6;
  margin: 0;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #33445e;
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  color: #b8c2d2;
  font-size: 13px;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.footer-copy {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  border-top: 1px solid #2a3a52;
  font-size: 12px;
  color: #7d8a9d;
  text-align: center;
}

/* ---------------------------------------------------------
   3. components · 通用组件
   --------------------------------------------------------- */

/* --- 状态标签 --- */
.status-ongoing,
.status-complete,
.status-paused,
.status-finished,
.is-ongoing,
.is-completed,
.is-hiatus,
.update-status,
.tag-status {
  display: inline-block;
  font-size: 12px;
  line-height: 1.5;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.status-ongoing,
.is-ongoing {
  color: #1f7a4d;
  background: #e5f4ec;
}

.status-complete,
.is-completed,
.status-finished {
  color: #2a5f9e;
  background: #e6effa;
}

.status-paused,
.is-hiatus {
  color: #9a5a11;
  background: #fbeedb;
}

/* --- 通用按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--white);
}

/* --- 图片容器通用约束 --- */
.hero-media img,
.featured-media img,
.group-cover img,
.update-cover img,
.rank-cover img,
.related-cover img,
.aside-figure img,
.process-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--line-soft);
}

/* ---------------------------------------------------------
   4. pages · 首页
   --------------------------------------------------------- */

/* --- 首屏内容焦点区 --- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  margin: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(27, 42, 65, 0.94) 0%,
    rgba(27, 42, 65, 0.78) 52%,
    rgba(27, 42, 65, 0.55) 100%
  );
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--gutter) 44px;
}

.hero-kicker {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  background: rgba(224, 122, 47, 0.16);
  border: 1px solid rgba(224, 122, 47, 0.5);
  border-radius: var(--radius-sm);
  padding: 3px 12px;
  margin: 0 0 16px;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 14px;
  max-width: 720px;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.8;
  color: #ccd6e4;
  max-width: 640px;
  margin: 0 0 28px;
}

.hero-entries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--white);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.entry-card:hover,
.entry-card:focus-visible {
  background: rgba(224, 122, 47, 0.22);
  border-color: var(--accent);
  color: var(--white);
  text-decoration: none;
}

.entry-name {
  font-size: 15px;
  font-weight: 600;
}

.entry-note {
  font-size: 12px;
  color: #a9b5c8;
}

/* --- 首页各 section 通用外框 --- */
.category-index,
.featured,
.updates,
.ranking,
.calendar-guide,
.site-index {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px var(--gutter) 0;
}

.site-index {
  padding-bottom: 8px;
}

/* --- 题材分类索引 --- */
.category-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-column {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-column:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

.category-scope {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  flex: 1 1 auto;
}

.category-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-dark);
  align-self: flex-start;
  border-bottom: 1px solid transparent;
}

.category-link:hover,
.category-link:focus-visible {
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* --- 主推漫画与编辑短评 --- */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}

.featured .section-head {
  grid-column: 1 / -1;
}

.featured-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.featured-media {
  width: 220px;
  height: 300px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
}

.featured-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.featured-name {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.meta-item {
  font-size: 12px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
}

.featured-comment {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin: 0;
  flex: 1 1 auto;
}

.featured-link {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-dark);
}

.featured-link:hover,
.featured-link:focus-visible {
  color: var(--accent);
}

.featured-similar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.similar-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.similar-list li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}

.similar-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.similar-list a {
  color: var(--ink-soft);
}

.similar-list a:hover,
.similar-list a:focus-visible {
  color: var(--accent-dark);
}

/* --- 最近更新目录 --- */
.update-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.update-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 96px 74px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  transition: background 0.15s ease;
}

.update-row:last-child {
  border-bottom: none;
}

.update-row:hover {
  background: #fdf7f0;
}

.update-date {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.update-name {
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.update-tag {
  font-size: 12px;
  color: var(--muted);
}

.update-status {
  justify-self: end;
}

.section-more {
  margin: 16px 0 0;
  text-align: right;
  font-size: 14px;
}

.section-more a {
  color: var(--accent-dark);
  font-weight: 500;
}

/* --- 人气榜单与编辑推荐 --- */
.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}

.ranking-main {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 18px;
}

.ranking-list {
  counter-reset: rank;
}

.ranking-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.ranking-item:nth-child(-n+3) .ranking-pos {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}

.ranking-name {
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.ranking-tag {
  justify-self: end;
  font-size: 12px;
  color: var(--muted);
}

.ranking-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.side-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.side-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 14px;
}

.side-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}

.side-list li:last-child {
  border-bottom: none;
}

.side-list a {
  color: var(--ink-soft);
}

.side-list a:hover,
.side-list a:focus-visible {
  color: var(--accent-dark);
}

/* --- 更新日历与阅读说明摘要 --- */
.calendar-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}

.calendar-main {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.calendar-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.calendar-day:hover {
  border-color: var(--accent);
  background: #fdf4ea;
}

.calendar-label {
  font-size: 12px;
  color: var(--muted);
}

.calendar-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.calendar-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.guide-summary {
  margin: 0 0 12px;
}

.guide-summary dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 12px;
}

.guide-summary dt:first-child {
  margin-top: 0;
}

.guide-summary dd {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.side-more {
  margin: 0;
  font-size: 13px;
}

/* --- 站内栏目索引 --- */
.index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.index-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.index-cell:hover,
.index-cell:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  color: var(--ink);
  text-decoration: none;
}

.index-name {
  font-size: 15px;
  font-weight: 600;
}

.index-note {
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------------------------------
   5. pages · 题材分类页
   --------------------------------------------------------- */

.category-groups {
  margin-bottom: 44px;
}

.category-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.group-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.group-cover {
  width: 180px;
  height: 118px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
  position: relative;
}

.group-cover figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--white);
  background: rgba(27, 42, 65, 0.72);
}

.group-intro {
  min-width: 0;
}

.group-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.group-scope {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 8px;
}

.group-count {
  font-size: 13px;
  color: var(--accent-dark);
  margin: 0;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 68px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}

.work-name {
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.work-field {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.work-link {
  font-size: 13px;
  color: var(--accent-dark);
  white-space: nowrap;
}

.work-link:hover,
.work-link:focus-visible {
  color: var(--accent);
}

.selection-guide {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.selection-body p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.85;
  margin-bottom: 12px;
}

.selection-body p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   6. pages · 最近更新页
   --------------------------------------------------------- */

.update-calendar {
  margin-bottom: 40px;
}

.update-calendar .calendar-week {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.update-calendar .calendar-day {
  padding: 0;
  background: transparent;
  border: none;
}

.calendar-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 60px;
  padding: 12px 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.calendar-node:hover,
.calendar-node:focus-visible {
  border-color: var(--accent);
  background: #fdf4ea;
  color: var(--ink);
  text-decoration: none;
}

.calendar-date {
  font-size: 13px;
  font-weight: 600;
}

.calendar-node .calendar-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.update-list-section {
  margin-bottom: 40px;
}

.update-list-section .update-list {
  padding: 0;
}

.update-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s ease;
}

.update-item:last-child {
  border-bottom: none;
}

.update-item:hover {
  background: #fdf7f0;
}

.update-cover {
  width: 108px;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
}

.update-body {
  min-width: 0;
}

.update-item .update-date {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted-light);
}

.update-item .update-name {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.update-genre {
  font-size: 12px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1px 9px;
}

.update-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0;
}

.related-works {
  margin-top: 8px;
}

.related-works .section-title {
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.related-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.related-cover {
  width: 100%;
  height: 150px;
  background: var(--line-soft);
}

.related-name {
  font-size: 15px;
  font-weight: 600;
  margin: 12px 14px 6px;
}

.related-genre {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 14px 8px;
}

.related-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 14px 16px;
}

/* ---------------------------------------------------------
   7. pages · 人气榜单页
   --------------------------------------------------------- */

.ranking-list-section {
  margin-bottom: 44px;
}

.ranking-list-section .section-head .section-desc a {
  color: var(--accent-dark);
}

.ranking-list-section .ranking-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 18px;
}

.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.ranking-item:nth-child(-n+3) .rank-index {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}

.rank-cover {
  width: 64px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
}

.rank-body {
  min-width: 0;
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}

.tag-genre {
  font-size: 12px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1px 9px;
}

.rank-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0;
}

.editor-picks-section {
  margin-bottom: 44px;
}

.editor-picks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}

.picks-list,
.picks-note {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.sub-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.pick-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}

.pick-items li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pick-name {
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pick-genre {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.picks-note p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 12px;
}

.picks-note p:last-child {
  margin-bottom: 0;
}

.ranking-note-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.note-body p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.85;
  margin-bottom: 12px;
}

.note-body p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   8. pages · 阅读说明页
   --------------------------------------------------------- */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.sidebar-left .page-layout,
.page-layout.sidebar-left {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.sidebar-left .page-layout .guide-aside,
.page-layout.sidebar-left .guide-aside {
  order: -1;
}

.guide-aside {
  position: sticky;
  top: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.aside-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.guide-toc li {
  margin-bottom: 4px;
}

.guide-toc a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--ink-soft);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.guide-toc a:hover,
.guide-toc a:focus-visible {
  color: var(--accent-dark);
  background: #fdf4ea;
  border-left-color: var(--accent);
  text-decoration: none;
}

.aside-figure {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line-soft);
}

.aside-figure img {
  width: 100%;
  height: 140px;
}

.aside-figure figcaption {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--paper);
}

.layout-main {
  min-width: 0;
}

.guide-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  scroll-margin-top: 16px;
}

.guide-section .section-lead {
  font-size: 14px;
  line-height: 1.85;
}

.field-table {
  font-size: 14px;
  margin: 0 0 14px;
}

.field-table caption {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 10px;
}

.field-table th,
.field-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.field-table thead th {
  background: var(--paper);
  font-weight: 600;
  color: var(--ink);
}

.field-table tbody td {
  color: var(--ink-soft);
  line-height: 1.7;
}

.status-list li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.status-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.status-tag {
  justify-self: start;
}

.status-list p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.browse-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.browse-path {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.browse-path-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
}

.browse-path p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0;
}

.faq-list {
  border-top: 1px solid var(--line-soft);
}

.faq-item {
  border-bottom: 1px solid var(--line-soft);
}

.faq-question {
  position: relative;
  padding: 14px 40px 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent-dark);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-question:hover {
  color: var(--accent-dark);
}

.faq-answer {
  padding: 0 0 16px;
}

.faq-answer p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.85;
  margin: 0 0 10px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.next-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.next-links li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease;
}

.next-links li:hover {
  border-color: var(--accent);
}

.next-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.next-desc {
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------------------------------
   9. pages · 内容反馈页
   --------------------------------------------------------- */

.issue-types {
  margin-bottom: 36px;
}

.issue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.issue-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.issue-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.issue-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.issue-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0;
  flex: 1 1 auto;
}

.issue-path {
  margin: 0;
  font-size: 14px;
}

.issue-path a {
  font-weight: 500;
  color: var(--accent-dark);
}

.process-figure {
  margin: 0 0 36px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line);
}

.process-figure img {
  width: 100%;
  height: 220px;
}

.process-figure figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 16px;
  background: var(--white);
}

.required-info {
  margin-bottom: 36px;
}

.info-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 20px;
}

.info-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--ink);
}

.info-text {
  color: var(--ink-soft);
  line-height: 1.75;
}

.process-steps {
  margin-bottom: 36px;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.step-item {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  border-radius: 50%;
}

.step-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}

.step-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0;
}

.feedback-tips {
  margin-bottom: 8px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tip-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
}

.tip-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.tip-text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  margin: 0;
}

/* ---------------------------------------------------------
   10. pages · 404
   --------------------------------------------------------- */

.error-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--gutter);
}

.error-block {
  text-align: center;
  padding: 32px 0 40px;
  border-bottom: 1px solid var(--line);
}

.error-code {
  font-size: 64px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 12px;
}

.error-block h1 {
  font-size: 26px;
  margin: 0 0 12px;
}

.error-text {
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto 24px;
}

.error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.error-hints {
  padding-top: 36px;
}

.error-hints h2 {
  font-size: 18px;
  margin: 0 0 16px;
}

.error-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.error-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  transition: border-color 0.18s ease;
}

.error-list li:hover {
  border-color: var(--accent);
}

.error-list a {
  color: var(--ink-soft);
}

/* ---------------------------------------------------------
   11. responsive · 断点 960px
   --------------------------------------------------------- */
@media (max-width: 960px) {
  .header-inner {
    min-height: 58px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 14px;
    border-top: 1px solid #33445e;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    padding: 13px 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 0;
  }

  .nav-list a.is-current {
    box-shadow: inset 3px 0 0 var(--accent);
    background: rgba(224, 122, 47, 0.14);
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-copy {
    padding: 44px var(--gutter) 36px;
  }

  .category-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-main {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .featured-media {
    width: 180px;
    height: 250px;
  }

  .ranking-layout,
  .calendar-guide-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .group-head {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .group-cover {
    width: 150px;
    height: 104px;
  }

  .work-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid,
  .issue-grid,
  .browse-paths {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-picks-layout,
  .page-layout,
  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar-left .page-layout .guide-aside,
  .page-layout.sidebar-left .guide-aside {
    order: 0;
  }

  .guide-aside {
    position: static;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

/* ---------------------------------------------------------
   12. responsive · 断点 640px
   --------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .page-title {
    font-size: 24px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .hero-entries {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .section-title {
    font-size: 18px;
  }

  .category-columns,
  .index-grid,
  .work-list,
  .related-grid,
  .issue-grid,
  .browse-paths,
  .step-list,
  .tips-grid,
  .next-links,
  .error-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-media {
    width: 100%;
    height: 220px;
  }

  .update-row {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 4px 10px;
    padding: 12px 14px;
  }

  .update-row .update-date {
    grid-column: 1 / -1;
    font-size: 12px;
  }

  .update-row .update-tag {
    grid-column: 1 / -1;
  }

  .update-status {
    justify-self: end;
  }

  .ranking-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 4px 10px;
  }

  .ranking-item .ranking-tag {
    grid-column: 2 / 3;
    justify-self: start;
  }

  .ranking-list-section .ranking-list {
    padding: 6px 14px;
  }

  .calendar-week {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .update-item {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .update-cover {
    width: 84px;
    height: 110px;
  }

  .group-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .group-cover {
    width: 100%;
    height: 150px;
  }

  .work-item {
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 4px 10px;
  }

  .work-item .work-field:last-of-type {
    grid-column: 2 / 3;
  }

  .work-item .work-link {
    grid-column: 1 / -1;
  }

  .info-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .status-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 32px var(--gutter) 22px;
  }

  .error-code {
    font-size: 52px;
  }

  .error-actions .btn {
    width: 100%;
  }
}
