/* ==========================================================================
   贝勒漫画 · ranqiaoao.cn
   全站样式表：基础 / 布局 / 组件 / 页面 / 响应式
   结构严格对应已锁定的 DOM，不引入外部资源
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BASE · 变量、重置、排版基础
   -------------------------------------------------------------------------- */

:root {
  --ink: #1c2b45;
  --ink-soft: #33445f;
  --ink-muted: #5c6b83;
  --accent: #e07a2f;
  --accent-deep: #b95f1c;
  --teal: #3f8f86;
  --line: #dbe1ea;
  --line-soft: #e8ecf2;
  --paper: #ffffff;
  --bg: #f4f6f9;
  --bg-cream: #f7f3ea;
  --bg-tint: #eef3f8;
  --shadow-sm: 0 1px 2px rgba(28, 43, 69, 0.06);
  --shadow-md: 0 6px 18px rgba(28, 43, 69, 0.10);
  --radius: 8px;
  --radius-sm: 4px;
  --wrap: 1160px;
  --wrap-narrow: 880px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-deep);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* --------------------------------------------------------------------------
   2. LAYOUT · 骨架容器、页头、主内容、页脚
   -------------------------------------------------------------------------- */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
}

/* ---- 顶部信息条（仅首页） ---- */

.top-bar {
  background: var(--ink);
  color: #cdd8e6;
}

.top-bar-text {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* ---- 页头与主导航 ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.brand-slogan {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.brand:hover .brand-name {
  color: var(--accent-deep);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
}

.site-nav {
  flex: 1 1 auto;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-item {
  display: block;
}

.nav-link {
  display: block;
  padding: 9px 14px;
  font-size: 15px;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent-deep);
  background: var(--bg-tint);
}

.nav-link.is-current {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* ---- 主内容容器 ---- */

.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.inner-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 24px 56px;
}

/* ---- 面包屑 ---- */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.breadcrumb a {
  color: var(--ink-muted);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent-deep);
}

.breadcrumb-sep {
  color: #b3bdcc;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 600;
}

/* ---- 内页标题区 ---- */

.page-header {
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.page-description {
  max-width: 760px;
  font-size: 15px;
  color: var(--ink-muted);
}

.page-description strong {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---- 页脚 ---- */

.site-footer {
  background: var(--ink);
  color: #b9c5d6;
  font-size: 14px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-back {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  color: #dce4ef;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.footer-back:hover,
.footer-back:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
  padding: 28px 0;
}

.footer-group-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  display: inline-block;
  padding: 2px 0;
  color: #b9c5d6;
  font-size: 14px;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: #fff;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-brand {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.footer-note {
  font-size: 13px;
  color: #9fabbe;
}

.footer-copy {
  font-size: 12px;
  color: #8794a8;
}

/* --------------------------------------------------------------------------
   3. COMPONENTS · 通用组件
   -------------------------------------------------------------------------- */

/* ---- 按钮 ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* ---- 文字链接 ---- */

.text-link {
  display: inline-block;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-deep);
  border-bottom: 1px solid rgba(224, 122, 47, 0.35);
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--accent-deep);
}

/* ---- 通用 section ---- */

.section {
  padding: 48px 0;
}

.home-main .section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 48px 24px;
}

.section-head {
  margin-bottom: 24px;
}

.section-title {
  font-size: 23px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.section-desc,
.section-intro {
  max-width: 760px;
  font-size: 15px;
  color: var(--ink-muted);
}

.section-intro {
  margin-bottom: 24px;
}

.section-foot {
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-muted);
}

.section-foot a {
  color: var(--accent-deep);
  font-weight: 600;
}

.subsection-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ---- 标签 ---- */

.tag {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--teal);
  background: rgba(63, 143, 134, 0.10);
  border: 1px solid rgba(63, 143, 134, 0.28);
  border-radius: 999px;
  white-space: nowrap;
}

/* ---- 表格 ---- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.data-table {
  min-width: 620px;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.data-table thead th {
  background: var(--bg-tint);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td,
.data-table tbody tr:hover th {
  background: #fafbfd;
}

.field-table {
  min-width: 520px;
}

.field-table-caption {
  caption-side: top;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink-muted);
  text-align: left;
}

/* ---- 封面图容器 ---- */

.work-cover,
.work-figure,
.cover-figure,
.pick-media {
  margin: 0;
  overflow: hidden;
  background: var(--bg-cream);
  border-radius: var(--radius-sm);
}

.work-cover img,
.work-figure img,
.cover-figure img,
.pick-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   4. PAGES · 首页
   -------------------------------------------------------------------------- */

/* ---- 首屏 ---- */

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px 24px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--accent-deep);
  background: rgba(224, 122, 47, 0.10);
  border-radius: 999px;
}

.hero-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.hero-desc {
  font-size: 15px;
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  margin: 0;
  min-width: 0;
}

.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.hero-visual-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ---- 首屏入口组 ---- */

.hero-entry {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.entry-group {
  min-width: 0;
  padding: 18px 20px;
  background: var(--bg-cream);
  border: 1px solid #ece3d3;
  border-radius: var(--radius);
}

.entry-group-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.entry-group-text {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  display: block;
}

.tag-link {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tag-link:hover,
.tag-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
  box-shadow: var(--shadow-sm);
}

/* ---- 推荐作品 ---- */

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.work-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.work-card .work-cover {
  aspect-ratio: 3 / 4;
  border-radius: 0;
}

.work-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.work-tag {
  font-size: 12px;
  color: var(--teal);
  font-weight: 600;
}

.work-title {
  font-size: 17px;
  font-weight: 600;
}

.work-text {
  font-size: 14px;
  color: var(--ink-muted);
}

.work-reason {
  font-size: 13px;
  color: var(--ink-muted);
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.work-card-main {
  grid-column: span 3;
  flex-direction: row;
}

.work-card-main .work-cover {
  flex: 0 0 300px;
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.work-card-main .work-body {
  padding: 22px 24px;
  justify-content: center;
}

.work-card-main .work-title {
  font-size: 21px;
}

/* ---- 题材方向总览 ---- */

.genre-table {
  min-width: 640px;
}

/* ---- 最近更新线索 ---- */

.update-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.update-month {
  min-width: 0;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.month-title {
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.update-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 13px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-soft);
}

.update-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.update-date {
  grid-row: span 2;
  align-self: start;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--teal);
  background: rgba(63, 143, 134, 0.10);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.update-work {
  color: var(--ink);
  font-weight: 600;
}

.update-genre,
.update-change {
  color: var(--ink-muted);
}

/* ---- 榜单速览 ---- */

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.rank-card {
  min-width: 0;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}

.rank-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.rank-basis {
  font-size: 13px;
  color: var(--ink-muted);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: rank;
}

.rank-item {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  counter-increment: rank;
}

.rank-item::before {
  content: counter(rank);
  flex: 0 0 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
  background: rgba(224, 122, 47, 0.10);
  border-radius: var(--radius-sm);
}

/* ---- 阅读说明与站内索引 ---- */

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.guide-fields,
.guide-index {
  min-width: 0;
}

.index-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.index-item {
  min-width: 0;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.index-link {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.index-link:hover,
.index-link:focus-visible {
  color: var(--accent-deep);
}

.index-text {
  font-size: 13px;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   5. PAGES · 内页 — 题材分类
   -------------------------------------------------------------------------- */

.content-section {
  padding: 0 0 44px;
}

.section-overview .tikuang-table {
  min-width: 680px;
}

.organize-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.organize-item {
  min-width: 0;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}

.organize-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.organize-text {
  font-size: 14px;
  color: var(--ink-muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.section-works .work-card {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.section-works .work-card:hover {
  box-shadow: none;
  transform: none;
}

.work-link {
  display: block;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.work-link:hover,
.work-link:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.section-works .work-figure {
  aspect-ratio: 3 / 4;
  border-radius: 0;
}

.work-name {
  padding: 14px 16px 4px;
  font-size: 16px;
  font-weight: 600;
}

.section-works .work-tag {
  padding: 0 16px 16px;
  margin: 0;
}

.advice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.advice-item {
  min-width: 0;
  padding: 20px;
  background: var(--bg-cream);
  border: 1px solid #ece3d3;
  border-radius: var(--radius);
}

.advice-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.advice-text {
  font-size: 14px;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   6. PAGES · 内页 — 最近更新
   -------------------------------------------------------------------------- */

.update-timeline {
  padding-bottom: 44px;
}

.timeline-group {
  padding: 20px 22px;
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
}

.timeline-month {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1.4fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline-date {
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.timeline-work {
  color: var(--ink);
  font-weight: 600;
}

.timeline-progress {
  font-size: 13px;
  color: var(--ink-muted);
}

.field-guide {
  padding-bottom: 44px;
}

.field-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.update-works {
  padding-bottom: 44px;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.cover-card {
  min-width: 0;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.cover-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cover-figure {
  aspect-ratio: 3 / 4;
  margin-bottom: 12px;
}

.cover-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cover-tag {
  margin-bottom: 8px;
}

.cover-note {
  font-size: 13px;
  color: var(--ink-muted);
}

.follow-tips {
  padding-bottom: 44px;
}

.tips-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: tips;
}

.tips-item {
  position: relative;
  min-width: 0;
  padding: 20px 20px 20px 56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tips-item::before {
  content: counter(tips);
  counter-increment: tips;
  position: absolute;
  left: 18px;
  top: 20px;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.tips-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tips-desc {
  font-size: 14px;
  color: var(--ink-muted);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 18px 20px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-links-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.related-links-item {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.related-links-item:hover,
.related-links-item:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* --------------------------------------------------------------------------
   7. PAGES · 内页 — 榜单排行
   -------------------------------------------------------------------------- */

.board-section,
.scene-section,
.picks-section,
.howto-section {
  padding-bottom: 44px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.board-card {
  min-width: 0;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.board-card-hot {
  border-top: 3px solid var(--accent);
}

.board-card-focus {
  border-top: 3px solid var(--teal);
}

.board-card-editor {
  border-top: 3px solid var(--ink);
}

.board-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.board-rule {
  font-size: 13px;
  color: var(--ink-muted);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.board-rule-label {
  font-weight: 600;
  color: var(--ink-soft);
}

.board-entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: board;
}

.board-entry {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.entry-rank {
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
  background: rgba(224, 122, 47, 0.10);
  border-radius: var(--radius-sm);
}

.entry-title {
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-tag {
  font-size: 12px;
  color: var(--teal);
  white-space: nowrap;
}

.scene-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.scene-item {
  min-width: 0;
  padding: 20px;
  background: var(--bg-cream);
  border: 1px solid #ece3d3;
  border-radius: var(--radius);
}

.scene-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.scene-text {
  font-size: 14px;
  color: var(--ink-muted);
}

.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.pick-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.pick-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pick-media {
  aspect-ratio: 3 / 4;
  border-radius: 0;
}

.pick-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pick-title {
  font-size: 16px;
  font-weight: 600;
}

.pick-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.pick-board {
  padding: 2px 9px;
  color: var(--accent-deep);
  background: rgba(224, 122, 47, 0.10);
  border-radius: 999px;
}

.pick-rank {
  padding: 2px 9px;
  color: var(--ink-muted);
  background: var(--bg-tint);
  border-radius: 999px;
}

.pick-note {
  font-size: 13px;
  color: var(--ink-muted);
}

.howto-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.howto-item {
  position: relative;
  min-width: 0;
  padding: 20px 20px 20px 56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.howto-step {
  position: absolute;
  left: 18px;
  top: 20px;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
}

.howto-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.howto-text {
  font-size: 14px;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   8. PAGES · 内页 — 阅读说明
   -------------------------------------------------------------------------- */

.section-fields,
.section-usage,
.section-scope,
.section-faq,
.section-index {
  padding-bottom: 44px;
}

.field-figure {
  margin: 0 0 20px;
  max-width: 640px;
}

.field-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-figure-caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}

.usage-block {
  padding: 18px 20px;
  margin-bottom: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.usage-block:last-child {
  margin-bottom: 0;
}

.usage-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.usage-block p {
  font-size: 14px;
  color: var(--ink-muted);
}

.usage-block a {
  color: var(--accent-deep);
  font-weight: 600;
}

.scope-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.scope-column {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.scope-in {
  border-top: 3px solid var(--teal);
}

.scope-out {
  border-top: 3px solid #b3bdcc;
}

.scope-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.scope-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scope-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-muted);
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.scope-out .scope-list li::before {
  background: #b3bdcc;
}

.scope-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-muted);
}

.scope-note a {
  color: var(--accent-deep);
  font-weight: 600;
}

.faq-item {
  margin-bottom: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  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: "+";
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--ink-muted);
}

.section-index {
  padding: 24px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section-index .index-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-index .index-item {
  background: var(--paper);
}

.section-index .index-item a {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.section-index .index-item a:hover,
.section-index .index-item a:focus-visible {
  color: var(--accent-deep);
}

.index-desc {
  display: block;
  font-size: 13px;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   9. PAGES · 404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px 24px 64px;
}

.error-hero {
  padding: 40px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.error-code {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 10px;
}

.error-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-text {
  max-width: 560px;
  margin: 0 auto 22px;
  font-size: 15px;
  color: var(--ink-muted);
}

.error-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.error-home-link:hover,
.error-home-link:focus-visible {
  background: var(--accent-deep);
  color: #fff;
}

.error-guide {
  margin-top: 32px;
}

.error-guide-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.error-entry-item {
  min-width: 0;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-entry-item a {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.error-entry-item a:hover,
.error-entry-item a:focus-visible {
  color: var(--accent-deep);
}

.error-entry-note {
  display: block;
  font-size: 13px;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE · 断点适配
   -------------------------------------------------------------------------- */

/* ---- 平板：≤ 960px ---- */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 32px;
  }

  .hero-title {
    font-size: 29px;
  }

  .hero-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .recommend-grid,
  .update-groups,
  .rank-grid,
  .work-grid,
  .advice-list,
  .cover-grid,
  .board-grid,
  .scene-list,
  .picks-grid,
  .howto-list,
  .tips-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-card-main {
    grid-column: span 2;
    flex-direction: column;
  }

  .work-card-main .work-cover {
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
  }

  .guide-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .timeline-item {
    grid-template-columns: 96px minmax(0, 1fr);
    row-gap: 6px;
  }

  .timeline-progress {
    grid-column: 2 / -1;
  }
}

/* ---- 手机：≤ 720px，含 390px 窄屏 ---- */

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .top-bar-text {
    padding: 8px 16px;
    font-size: 12px;
  }

  .header-inner {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand-name {
    font-size: 19px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    flex: 1 0 100%;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 12px;
    font-size: 15px;
    border-bottom: 0;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
  }

  .nav-link.is-current {
    border-left-color: var(--accent);
    background: var(--bg-tint);
  }

  .inner-main {
    padding: 18px 16px 44px;
  }

  .page-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
  }

  .page-title {
    font-size: 23px;
  }

  .home-main .section {
    padding: 34px 16px;
  }

  .hero-inner {
    padding: 26px 16px 24px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-entry {
    padding: 0 16px 28px;
    gap: 16px;
  }

  .section {
    padding: 34px 0;
  }

  .section-title {
    font-size: 20px;
  }

  .recommend-grid,
  .update-groups,
  .rank-grid,
  .work-grid,
  .advice-list,
  .cover-grid,
  .board-grid,
  .scene-list,
  .picks-grid,
  .howto-list,
  .tips-list,
  .organize-list,
  .index-list,
  .scope-columns,
  .error-entry-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-index .index-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-card-main {
    grid-column: span 1;
  }

  .work-card-main .work-cover {
    aspect-ratio: 3 / 4;
  }

  .work-card-main .work-body {
    padding: 16px 18px 18px;
  }

  .work-card-main .work-title {
    font-size: 18px;
  }

  .timeline-group {
    padding: 16px;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4px;
  }

  .timeline-progress {
    grid-column: auto;
  }

  .tips-item,
  .howto-item {
    padding: 18px 18px 18px 52px;
  }

  .tips-item::before,
  .howto-step {
    left: 16px;
    top: 18px;
  }

  .footer-inner {
    padding: 30px 16px 20px;
  }

  .footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
  }

  .error-main {
    padding: 32px 16px 48px;
  }

  .error-hero {
    padding: 28px 18px;
  }

  .error-code {
    font-size: 34px;
  }

  .error-title {
    font-size: 21px;
  }
}

/* ---- 窄屏：≤ 430px ---- */

@media (max-width: 430px) {
  .footer-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .brand-slogan {
    font-size: 11px;
  }
}

/* ---- 桌面端导航按钮兜底 ---- */

@media (min-width: 721px) {
  .nav-toggle {
    display: none;
  }

  .nav-list {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   11. MOTION · 轻量交互增强（不影响初始可见性）
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
