/* ==========================================================================
   尾巴漫画免费阅读 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */
:root {
  --bg: #f6f8f9;
  --panel: #ffffff;
  --ink: #1d2529;
  --ink-2: #5c6a73;
  --line: #e2e8ec;
  --main: #175d63;
  --main-soft: #e6f1f1;
  --accent: #d9863d;
  --foot-bg: #14262a;
  --foot-ink: #c9d6d8;
  --radius: 8px;
  --mono: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(23, 93, 99, .06), 0 4px 12px rgba(23, 93, 99, .05);
  --shadow-hover: 0 2px 4px rgba(23, 93, 99, .1), 0 8px 20px rgba(23, 93, 99, .09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--main);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: .875rem;
  line-height: 1.6;
}

code,
.mono,
.tag,
.batch-mark,
.ledger-batch,
.fix-field,
.fix-before,
.fix-after,
.sample-field,
.sample-value,
.field-name,
.field-value,
.status-badge,
.step-no,
.point-num {
  font-family: var(--mono);
}

/* --------------------------------------------------------------------------
   layout · 全站骨架
   -------------------------------------------------------------------------- */

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
}

.brand {
  flex: 0 0 auto;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.brand:hover {
  color: var(--main);
  text-decoration: none;
}

/* 主导航 */
.main-nav {
  flex: 1 1 auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav li {
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 20px 12px;
  color: var(--ink-2);
  font-size: .9375rem;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.site-nav a:hover {
  color: var(--main);
  border-bottom-color: var(--main-soft);
  text-decoration: none;
}

.site-nav a.is-current {
  color: var(--main);
  font-weight: 600;
  border-bottom-color: var(--main);
}

/* 移动菜单按钮 */
.menu-toggle {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}

.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
}

.menu-toggle::before {
  top: 16px;
}

.menu-toggle::after {
  top: 25px;
}

/* 移动端导航 */
.mobile-nav {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav ul {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 16px;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  color: var(--ink);
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
}

.mobile-nav a.is-current {
  color: var(--main);
  font-weight: 600;
}

/* 主内容 */
.site-main {
  display: block;
}

.inner-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 20px 0 0;
  color: var(--ink-2);
  font-size: .875rem;
}

.breadcrumb a {
  color: var(--ink-2);
}

.breadcrumb a:hover {
  color: var(--main);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

/* 页面标题区 */
.page-header {
  padding: 12px 0 0;
}

.page-title {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 12px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.page-head-text {
  flex: 1 1 420px;
  min-width: 0;
}

.page-lead,
.page-sub,
.page-summary,
.page-head-lead {
  max-width: 720px;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.page-head-links,
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

.page-head-links a,
.page-head-actions a {
  font-size: .9375rem;
  font-weight: 600;
}

/* 页脚 */
.site-footer {
  background: var(--foot-bg);
  color: var(--foot-ink);
  margin-top: 56px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(120px, 1fr));
  gap: 32px 28px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 24px 32px;
}

.footer-brand .footer-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
}

.footer-brand .footer-desc {
  margin-top: 10px;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--foot-ink);
}

.footer-col h2 {
  font-size: .9375rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  display: inline-block;
  color: var(--foot-ink);
  font-size: .875rem;
  line-height: 1.5;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px 28px;
  border-top: 1px solid rgba(201, 214, 216, .18);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer-bottom p {
  font-size: .8125rem;
  color: var(--foot-ink);
  line-height: 1.6;
}

.footer-copy {
  color: #8fa2a5;
}

/* --------------------------------------------------------------------------
   components · 通用模块
   -------------------------------------------------------------------------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn-primary {
  background: var(--main);
  color: #ffffff;
  border: 1px solid var(--main);
}

.btn-primary:hover {
  background: #114b50;
  border-color: #114b50;
  color: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  background: var(--panel);
  color: var(--main);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--main-soft);
  border-color: var(--main);
  text-decoration: none;
}

/* 标签胶囊 */
.tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 999px;
  font-size: .8125rem;
  line-height: 1.6;
  white-space: nowrap;
}

.tag-link:hover {
  background: var(--main);
  color: #ffffff;
  text-decoration: none;
}

.tag-accent {
  background: #fbeedd;
  color: #a75f1c;
}

.tag-genre {
  display: inline-block;
  padding: 2px 10px;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 999px;
  font-size: .8125rem;
  line-height: 1.6;
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  background: #fbeedd;
  color: #a75f1c;
  border-radius: 999px;
  font-size: .8125rem;
  line-height: 1.6;
}

/* 区块标题 */
.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 1.35rem;
}

.section-head p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: .9375rem;
}

.section-intro,
.section-lead {
  margin-top: 6px;
  margin-bottom: 18px;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.section-more {
  margin-top: 16px;
  font-size: .9375rem;
}

.section-more a {
  font-weight: 600;
}

.link-strong {
  font-weight: 600;
}

/* 条目卡片 */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}

.entry-card:hover {
  border-color: var(--main);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.entry-card h3,
.entry-card .entry-name {
  font-size: 1rem;
  font-weight: 600;
}

.entry-card h3 a,
.entry-card .entry-name a {
  color: var(--ink);
}

.entry-card h3 a:hover,
.entry-card .entry-name a:hover {
  color: var(--main);
}

.entry-tags,
.entry-meta,
.entry-vol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--ink-2);
  font-size: .8125rem;
  line-height: 1.6;
}

.entry-note {
  color: var(--ink-2);
  font-size: .875rem;
  line-height: 1.7;
}

.entry-cover {
  overflow: hidden;
  border-radius: 6px;
  background: var(--main-soft);
}

.entry-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* 要点列表 */
.point-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.point-list li {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--main);
  border-radius: var(--radius);
  font-size: .9375rem;
  line-height: 1.7;
}

.point-list li a {
  font-weight: 600;
}

/* 侧栏 */
.side-block {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-block + .side-block {
  margin-top: 20px;
}

.side-block h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.side-link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-link-list a {
  display: block;
  padding: 6px 0;
  font-size: .9375rem;
  color: var(--ink);
  border-bottom: 1px dashed var(--line);
}

.side-link-list li:last-child a {
  border-bottom: 0;
}

.side-link-list a:hover {
  color: var(--main);
}

/* 台账行 */
.batch-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.batch-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .9375rem;
}

.batch-mark {
  padding: 2px 10px;
  background: #fbeedd;
  color: #a75f1c;
  border-radius: 999px;
  font-size: .8125rem;
}

.batch-type {
  font-weight: 600;
  color: var(--main);
}

.batch-desc {
  color: var(--ink-2);
  flex: 1 1 200px;
}

/* 字段标签 */
.field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* 步骤列表（首页三步入手） */
.start-steps {
  max-width: 1120px;
  margin: 48px auto 0;
  padding: 0 24px;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.step-item {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-no {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  background: var(--main);
  color: #ffffff;
  border-radius: 999px;
  font-size: .8125rem;
}

.step-item h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step-item p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.7;
}

/* 图片容器 */
.media-figure {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.media-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-figure figcaption {
  padding: 10px 14px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

/* 数据表 */
.data-table,
.dict-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .9375rem;
}

.data-table caption,
.dict-table caption {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  background: var(--main-soft);
  border-bottom: 1px solid var(--line);
}

.data-table th,
.data-table td,
.dict-table th,
.dict-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.data-table thead th,
.dict-table thead th {
  background: #f2f6f7;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody tr:last-child td,
.dict-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table td .code,
.dict-table td .code {
  display: inline-block;
  padding: 1px 8px;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 4px;
  font-size: .8125rem;
}

/* 折叠问答 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  min-height: 48px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--main);
  font-family: var(--mono);
  font-size: 1.125rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq-answer {
  padding: 12px 16px 16px;
}

.faq-answer p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.8;
}

.faq-answer a {
  font-weight: 600;
}

/* 相关链接条 */
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  max-width: 1120px;
  margin: 32px auto 0;
  padding: 16px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-links-label {
  font-weight: 600;
  color: var(--ink-2);
  font-size: .875rem;
}

.related-links-item {
  font-size: .9375rem;
  font-weight: 600;
}

/* 页面区块通用间距 */
.change-types,
.batch-ledger,
.recent-entries,
.field-fix,
.faq-group,
.correction-note {
  margin-bottom: 40px;
}

/* --------------------------------------------------------------------------
   pages · 首页
   -------------------------------------------------------------------------- */
.home-main {
  padding-bottom: 8px;
}

/* 首屏 */
.hero {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 44px;
}

.hero-text {
  min-width: 0;
}

.hero-brand {
  display: inline-block;
  margin-bottom: 12px;
  padding: 2px 10px;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
}

.hero-text h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0;
}

.hero-lead {
  margin-top: 14px;
  max-width: 520px;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-visual {
  min-width: 0;
}

.hero-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--main-soft);
  box-shadow: var(--shadow);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-figure figcaption {
  padding: 10px 14px;
  margin-top: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.hero-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.hero-index li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

/* 题材索引条 */
.genre-strip {
  max-width: 1120px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.genre-strip h2 {
  font-size: 1.125rem;
  margin-bottom: 14px;
}

.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-list a {
  display: inline-block;
  padding: 6px 14px;
  min-height: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: .875rem;
  line-height: 1.6;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.genre-list a:hover {
  background: var(--main-soft);
  border-color: var(--main);
  color: var(--main);
  text-decoration: none;
}

/* 首页两栏目录区 */
.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 344px);
  gap: 56px;
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 0 24px;
  align-items: start;
}

.content-wrap .primary {
  min-width: 0;
}

.content-wrap .secondary {
  min-width: 0;
}

.entry-overview {
  margin-bottom: 40px;
}

.entry-group + .entry-group {
  margin-top: 26px;
}

.entry-group h3 {
  font-size: 1.0625rem;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--main);
}

.update-summary {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   pages · 内页通用
   -------------------------------------------------------------------------- */

/* 页面布局：默认主内容在前 */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 40px;
  align-items: start;
}

.page-layout .primary,
.page-layout .tab-area,
.page-layout .field-content {
  min-width: 0;
}

.page-layout .secondary {
  min-width: 0;
}

/* 侧栏在左的页面：容器自身带 sidebar-left */
.page-layout.sidebar-left {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
}

.page-layout.sidebar-left .dimension-nav,
.page-layout.sidebar-left .field-nav {
  min-width: 0;
}

/* 侧栏在左的页面：祖先节点带 sidebar-left（entry-standard） */
.sidebar-left .page-layout {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
}

/* 侧栏吸附 */
.dimension-nav,
.field-nav,
.page-layout .secondary {
  position: sticky;
  top: 88px;
}

/* 侧栏目录 */
.dimension-nav,
.field-nav {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-title,
.aside-title {
  font-size: 1rem;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dimension-list,
.field-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dimension-list a,
.field-nav a {
  display: block;
  padding: 8px 10px;
  min-height: 40px;
  color: var(--ink);
  font-size: .9375rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
}

.dimension-list a:hover,
.field-nav a:hover {
  background: var(--main-soft);
  color: var(--main);
  text-decoration: none;
}

.dimension-list a.is-active {
  background: var(--main-soft);
  color: var(--main);
  font-weight: 600;
  border-left-color: var(--main);
}

/* --------------------------------------------------------------------------
   pages · 漫画目录
   -------------------------------------------------------------------------- */

/* 维度目录条 */
.dimension-bar {
  position: sticky;
  top: 64px;
  z-index: 20;
  margin-bottom: 28px;
  padding: 10px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.dimension-bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dimension-bar a {
  display: inline-block;
  padding: 6px 16px;
  min-height: 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: .875rem;
  line-height: 1.6;
}

.dimension-bar a:hover {
  background: var(--main-soft);
  border-color: var(--main);
  color: var(--main);
  text-decoration: none;
}

/* 条目总表 */
.entry-table {
  margin-bottom: 40px;
}

.entry-table h2 {
  font-size: 1.35rem;
}

.entry-table > .section-intro {
  margin-bottom: 24px;
}

.entry-table .entry-group {
  margin-bottom: 30px;
}

.entry-table .entry-group h3 {
  font-size: 1.0625rem;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--main);
}

.entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.entry-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .12s ease, transform .12s ease;
}

.entry-row:hover {
  border-color: var(--main);
  transform: translateY(-2px);
}

.entry-row .entry-cover {
  flex: 0 0 64px;
  width: 64px;
}

.entry-row .entry-cover img {
  aspect-ratio: 3 / 4;
}

.entry-row .entry-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-row .entry-name {
  font-size: .9375rem;
  font-weight: 600;
}

.entry-row .entry-name a {
  color: var(--ink);
}

.entry-row .entry-name a:hover {
  color: var(--main);
}

.entry-row .mono {
  color: var(--ink-2);
  font-size: .8125rem;
}

/* 题材快速定位 */
.genre-quick {
  margin-bottom: 40px;
}

.genre-quick h2,
.column-note h2 {
  font-size: 1.35rem;
}

.genre-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-quick-list a {
  padding: 6px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.genre-quick-list a:hover {
  background: var(--main);
  color: #ffffff;
  border-color: var(--main);
}

/* 条目列位说明 */
.column-note {
  margin-bottom: 8px;
}

.column-note-list {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.column-note-list dt {
  padding: 12px 14px;
  background: #f2f6f7;
  font-weight: 600;
  font-size: .875rem;
  border-bottom: 1px solid var(--line);
}

.column-note-list dd {
  margin: 0;
  padding: 12px 14px;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.7;
  border-bottom: 1px solid var(--line);
}

.column-note-list dt:nth-last-of-type(1),
.column-note-list dd:nth-last-of-type(1) {
  border-bottom: 0;
}

.column-note-link {
  margin-top: 14px;
  font-size: .9375rem;
}

.column-note-link a {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   pages · 题材分类
   -------------------------------------------------------------------------- */

.tab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 7px 16px;
  min-height: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: .875rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.tab-btn:hover {
  border-color: var(--main);
  color: var(--main);
}

.tab-btn.is-active {
  background: var(--main);
  border-color: var(--main);
  color: #ffffff;
  font-weight: 600;
}

.genre-tabs {
  margin-bottom: 36px;
}

.genre-tabs h2,
.dimension-table h2,
.genre-entries h2,
.adjacent h2,
.next-links h2 {
  font-size: 1.35rem;
}

.genre-visual {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.genre-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.genre-visual figcaption {
  padding: 10px 14px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.dimension-table {
  margin-bottom: 36px;
}

.genre-entries {
  margin-bottom: 36px;
}

.genre-entries .entry-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: var(--main-soft);
}

.adjacent {
  margin-bottom: 36px;
}

.adjacent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adjacent-list li {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.adjacent-list h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.adjacent-list p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.next-links {
  margin-bottom: 8px;
}

.next-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.next-list a {
  display: inline-block;
  padding: 8px 16px;
  min-height: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
}

.next-list a:hover {
  background: var(--main-soft);
  border-color: var(--main);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages · 更新记录
   -------------------------------------------------------------------------- */

.change-type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.change-type-item {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.change-type-item h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.change-type-item p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.ledger-list {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.ledger-row {
  display: grid;
  grid-template-columns: 120px 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.ledger-row:last-child {
  border-bottom: 0;
}

.ledger-batch {
  display: inline-block;
  padding: 2px 10px;
  background: #fbeedd;
  color: #a75f1c;
  border-radius: 999px;
  font-size: .8125rem;
  text-align: center;
}

.ledger-type {
  font-weight: 600;
  color: var(--main);
  font-size: .9375rem;
}

.ledger-summary {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.7;
}

.entry-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.recent-entries .entry-card .entry-cover img {
  aspect-ratio: 3 / 4;
}

.fix-list {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fix-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 32px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: .9375rem;
}

.fix-row:last-child {
  border-bottom: 0;
}

.fix-field {
  font-weight: 600;
  color: var(--ink);
  font-size: .875rem;
}

.fix-before {
  color: #a75f1c;
  background: #fbeedd;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: .875rem;
  justify-self: start;
}

.fix-arrow {
  color: var(--ink-2);
  text-align: center;
}

.fix-after {
  color: var(--main);
  background: var(--main-soft);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: .875rem;
  justify-self: start;
}

/* --------------------------------------------------------------------------
   pages · 阅读指引
   -------------------------------------------------------------------------- */

.font-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.font-controls-label {
  color: var(--ink-2);
  font-size: .8125rem;
}

.font-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--main-soft);
  color: var(--main);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.font-btn:hover {
  background: var(--main);
  color: #ffffff;
  border-color: var(--main);
}

.font-value {
  min-width: 44px;
  text-align: center;
  font-family: var(--mono);
  font-size: .875rem;
  color: var(--ink);
}

.layout-shell {
  display: block;
}

.reading-shell {
  max-width: 820px;
  margin: 0 auto;
}

.reading-area {
  font-size: 1rem;
  line-height: 1.85;
}

.reading-section {
  margin-bottom: 40px;
}

.reading-section h2 {
  font-size: 1.35rem;
}

/* 结论要点 */
.conclusion .point-list {
  gap: 12px;
}

.conclusion .point-item {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--main);
  border-radius: var(--radius);
}

.conclusion .point-num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--main);
  color: #ffffff;
  border-radius: 50%;
  font-size: .8125rem;
}

.conclusion .point-body {
  min-width: 0;
  font-size: .9375rem;
  line-height: 1.8;
}

/* 判断方法步骤 */
.method .step-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.method .step-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 20px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  align-items: center;
}

.method .step-text {
  min-width: 0;
  font-size: .9375rem;
  line-height: 1.8;
}

.method .step-text h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.method .step-figure {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.method .step-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* 常见结构示例 */
.structure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.structure-card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.structure-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.structure-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 999px;
  font-size: .8125rem;
}

.structure-card p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.structure-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: .875rem;
}

/* 核对清单 */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .9375rem;
  line-height: 1.75;
}

.check-box {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 5px;
  border: 2px solid var(--main);
  border-radius: 4px;
}

.check-text {
  min-width: 0;
}

/* 阅读指引相关链接 */
.related .related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related .related-list a {
  display: inline-block;
  padding: 8px 16px;
  min-height: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
}

.related .related-list a:hover {
  background: var(--main-soft);
  border-color: var(--main);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages · 条目规范
   -------------------------------------------------------------------------- */

.field-content {
  min-width: 0;
}

.field-dict,
.value-sample,
.cite-rule,
.field-maintain {
  margin-bottom: 40px;
}

.field-dict h2,
.value-sample h2,
.cite-rule h2,
.field-maintain h2 {
  font-size: 1.35rem;
}

.sample-list {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.sample-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.sample-row:last-child {
  border-bottom: 0;
}

.sample-field {
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
}

.sample-value {
  padding: 2px 10px;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 4px;
  font-size: .875rem;
  justify-self: start;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rule-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.rule-item p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.maintain-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.maintain-item {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}

.maintain-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.maintain-item p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.maintain-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: .9375rem;
}

.maintain-links a {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   pages · 常见问题
   -------------------------------------------------------------------------- */

.page-media {
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.page-media img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.page-media figcaption {
  padding: 10px 14px;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.faq-group h2 {
  font-size: 1.35rem;
}

.group-intro {
  margin-top: 6px;
  margin-bottom: 18px;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.correction-note {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.correction-note h2 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.correction-note > p {
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.75;
}

.correction-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.correction-list .field-name {
  display: inline-block;
  padding: 4px 12px;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 999px;
  font-size: .8125rem;
}

.correction-tail {
  font-size: .9375rem;
  color: var(--ink-2);
}

.correction-tail a {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   pages · 404
   -------------------------------------------------------------------------- */

.error-main {
  padding-bottom: 56px;
}

.error-main .container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.error-panel {
  padding: 48px 32px;
  margin-bottom: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-code {
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--main);
  line-height: 1;
}

.error-panel h1 {
  margin-top: 14px;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

.error-desc {
  max-width: 560px;
  margin: 14px auto 0;
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.error-links {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-links h2 {
  font-size: 1.125rem;
  margin-bottom: 14px;
}

.error-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.error-link-list a {
  display: block;
  padding: 10px 14px;
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .9375rem;
  color: var(--ink);
}

.error-link-list a:hover {
  border-color: var(--main);
  color: var(--main);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-inner {
    gap: 32px;
  }

  .content-wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: 32px;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
    gap: 28px;
  }

  .page-layout.sidebar-left,
  .sidebar-left .page-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 32px;
  }

  .footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .header-inner {
    gap: 12px;
    padding: 0 16px;
    height: 60px;
  }

  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav ul {
    padding: 8px 16px 16px;
  }

  .inner-main {
    padding: 0 16px 40px;
  }

  .breadcrumb {
    padding-top: 16px;
  }

  .page-head {
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 22px;
  }

  .page-head-text {
    flex: 1 1 auto;
  }

  /* 首屏 */
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 32px 16px 28px;
  }

  .hero-lead {
    max-width: none;
  }

  .hero-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* 首页目录区：主内容在前，侧栏在后 */
  .content-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 0 16px;
    margin-top: 32px;
  }

  .genre-strip {
    padding: 0 16px;
    margin-top: 26px;
  }

  .start-steps {
    padding: 0 16px;
    margin-top: 36px;
  }

  /* 内页布局：单列，主内容始终在前 */
  .page-layout,
  .page-layout.sidebar-left,
  .sidebar-left .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .dimension-nav,
  .field-nav,
  .page-layout .secondary {
    position: static;
  }

  /* entry-standard：H1 与字段字典必须排在字段目录之前 */
  .sidebar-left .page-layout {
    display: flex;
    flex-direction: column;
  }

  .sidebar-left .page-layout .field-content {
    order: 1;
  }

  .sidebar-left .page-layout .field-nav {
    order: 2;
    width: 100%;
  }

  /* 目录页 */
  .dimension-bar {
    top: 60px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dimension-bar ul {
    flex-wrap: nowrap;
    width: max-content;
    padding-bottom: 2px;
  }

  .entry-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .column-note-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .column-note-list dt {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .column-note-list dd {
    padding-top: 4px;
  }

  /* 更新记录 */
  .ledger-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    align-items: start;
  }

  .ledger-batch {
    justify-self: start;
  }

  .fix-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .fix-arrow {
    text-align: left;
  }

  /* 条目规范 */
  .sample-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .dict-table,
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .dict-table caption,
  .data-table caption {
    white-space: normal;
  }

  /* 阅读指引 */
  .reading-shell {
    max-width: none;
  }

  .method .step-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .method .step-figure {
    order: -1;
  }

  /* 页脚 */
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
    padding: 32px 16px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    padding: 14px 16px 24px;
    flex-direction: column;
  }

  /* 404 */
  .error-main .container {
    padding: 0 16px;
  }

  .error-panel {
    padding: 32px 20px;
  }

  .related-links {
    padding: 14px 16px;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .hero-index {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .btn {
    width: 100%;
  }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }

  .entry-card:hover,
  .entry-row:hover {
    transform: none;
  }
}

/* 程序验收反馈：修复网格孤项 */
@media (min-width: 769px) {
  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 程序验收反馈：移动端正文优先 */
@media (max-width: 768px) {
  .site-main :is(.page-content, .main-content, .content-main) {
    order: 1;
  }

  .site-main :is(aside, .sidebar) {
    order: 2;
  }
}
