/* ==========================================================================
   歪歪漫画 · 全站样式表
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --ink: #1d2a33;
  --ink-soft: #4a5a66;
  --ink-mute: #6d7c88;
  --paper: #f6f4ef;
  --panel: #ffffff;
  --line: #d8d2c6;
  --line-soft: #e7e2d8;
  --teal: #266660;
  --teal-dark: #1c4f4a;
  --ochre: #a85a1e;
  --ochre-soft: #f2e4d4;
  --radius: 6px;
  --radius-sm: 4px;
  --shell: 1000px;
  --body-col: 720px;
  --shadow-sm: 0 1px 2px rgba(29, 42, 51, 0.06);
  --shadow-md: 0 3px 10px rgba(29, 42, 51, 0.08);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono",
    Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--teal-dark);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

dl,
dd,
dt,
figure,
figcaption {
  margin: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

caption {
  text-align: left;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 术语统一样式：深青虚线下划线 */
.term {
  color: var(--teal-dark);
  border-bottom: 1px dashed var(--teal);
  padding-bottom: 1px;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   layout · 骨架（site-body / site-header / site-main / site-footer）
   -------------------------------------------------------------------------- */

.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
}

/* 站务通知横幅（首页） */
.notice-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 20px;
  background-color: #ede7da;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}

.notice-text {
  margin: 0;
  flex: 1 1 240px;
}

.notice-link {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.notice-close:hover,
.notice-close:focus-visible {
  background-color: #ffffff;
  color: var(--ink);
}

.notice-banner.is-closed {
  display: none;
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(246, 244, 239, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(4px);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.brand:hover,
.brand:focus-visible {
  color: var(--teal-dark);
  text-decoration: none;
}

.site-nav {
  flex: 1 1 auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 18px;
}

.nav-link {
  display: inline-block;
  padding: 4px 2px;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--teal-dark);
  text-decoration: none;
  border-bottom-color: var(--line);
}

.nav-link.is-current {
  color: var(--teal-dark);
  font-weight: 600;
  border-bottom-color: var(--teal);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--panel);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 1px;
}

/* 主内容 */
.site-main {
  flex: 1 1 auto;
  width: 100%;
}

.home-main {
  padding-bottom: 8px;
}

.inner-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.site-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--teal-dark);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--ink);
}

/* 页标题区 */
.page-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

/* 内页引导区（H1 下方定位句 + 标签） */
.page-hero {
  margin-bottom: 26px;
}

.page-lead {
  max-width: var(--body-col);
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-tag,
.tag,
.tag-chip {
  display: inline-block;
  padding: 2px 10px;
  font-size: 13px;
  line-height: 1.7;
  border-radius: 999px;
  border: 1px solid var(--line);
  background-color: var(--panel);
  color: var(--ink-soft);
}

.tag-topic,
.tag-genre {
  color: var(--teal-dark);
  border-color: #bcd2cf;
  background-color: #eef4f3;
}

.tag-status,
.status-tag {
  color: var(--ochre);
  border-color: #e6cbb0;
  background-color: var(--ochre-soft);
}

/* 页脚 */
.site-footer {
  margin-top: 40px;
  background-color: #efece4;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 30px 20px 18px;
}

.footer-brand {
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.footer-summary {
  margin: 0 0 8px;
  max-width: 640px;
  color: var(--ink-soft);
}

.footer-home {
  font-size: 14px;
  color: var(--teal-dark);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 24px;
}

.footer-col {
  min-width: 0;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.footer-col-title a {
  color: var(--ink);
}

.footer-col-title a:hover,
.footer-col-title a:focus-visible {
  color: var(--teal-dark);
}

.footer-list li {
  margin-bottom: 5px;
}

.footer-list a {
  color: var(--ink-soft);
  font-size: 14px;
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--teal-dark);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--ink-mute);
}

.back-to-top {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--panel);
  color: var(--ink-soft);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background-color: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

/* 通用区块 */
.section-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.section-intro {
  max-width: var(--body-col);
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.section-text {
  max-width: var(--body-col);
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.sub-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-more {
  margin-top: 14px;
  font-size: 15px;
}

.text-link {
  color: var(--teal-dark);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--teal);
}

/* 两栏外壳 */
.page-layout {
  display: grid;
  gap: 28px;
  align-items: start;
}

.layout-shell {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.sidebar-left .page-layout,
.page-layout.sidebar-left {
  grid-template-columns: 260px minmax(0, 1fr);
}

.page-primary {
  min-width: 0;
}

.page-aside {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   components · 通用组件
   -------------------------------------------------------------------------- */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--teal);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--teal-dark);
  color: #ffffff;
}

.btn-ghost {
  background-color: var(--panel);
  color: var(--teal-dark);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--teal);
  color: var(--teal-dark);
}

/* 图片容器 */
.hero-figure,
.entry-cover,
.panel-media,
.field-figure,
.content-figure,
.section-figure,
.example-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #e9e4da;
  border: 1px solid var(--line-soft);
}

.hero-figure img,
.entry-cover img,
.panel-media img,
.field-figure img,
.content-figure img,
.section-figure img,
.example-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

figcaption,
.media-caption,
.figure-caption {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
  background-color: var(--panel);
  border-top: 1px solid var(--line-soft);
}

/* 标签组 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  display: inline-block;
  padding: 3px 10px;
  font-size: 13px;
  line-height: 1.7;
  border-radius: 999px;
  border: 1px solid var(--line);
  background-color: var(--panel);
  color: var(--ink-soft);
}

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 1px 9px;
  font-size: 13px;
  line-height: 1.7;
  border-radius: 999px;
  border: 1px solid #e6cbb0;
  background-color: var(--ochre-soft);
  color: var(--ochre);
  white-space: nowrap;
}

.status-running,
.status-ongoing,
.status-steady,
.status-stable {
  color: var(--teal-dark);
  border-color: #bcd2cf;
  background-color: #eef4f3;
}

.status-gap,
.status-interval {
  color: var(--ochre);
  border-color: #e6cbb0;
  background-color: var(--ochre-soft);
}

.status-done,
.status-complete,
.status-finished {
  color: var(--ink-mute);
  border-color: var(--line);
  background-color: #f1eee7;
}

.status-pending {
  color: #7a5a2e;
  border-color: #ddcdb2;
  background-color: #f6efe2;
}

/* 字段说明块 */
.field-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.field-item {
  padding: 14px 16px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.field-def {
  display: grid;
  gap: 4px;
}

.field-name,
dt.field-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.field-mean,
.field-rule,
.field-value,
.field-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

.field-rule {
  color: var(--ink-mute);
}

/* 规则 / 步骤列表 */
.rule-list,
.check-list,
.checklist,
.howto-steps,
.process-list,
.maintenance-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.rule-item,
.check-item,
.checklist-item,
.howto-step,
.process-step,
.maintenance-item {
  padding: 14px 16px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.rule-name,
.rule-title,
.check-name,
.step-title,
.step-name,
.maintenance-name,
.howto-step .step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.rule-desc,
.check-desc,
.step-desc,
.step-text,
.maintenance-desc,
.rule-text {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

/* 相关入口条 */
.related-bar,
.related-links {
  margin-top: 30px;
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.related-title,
.related-bar-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.related-item {
  font-size: 15px;
}

.related-list a,
.related-item a {
  color: var(--teal-dark);
  border-bottom: 1px solid transparent;
}

.related-list a:hover,
.related-list a:focus-visible,
.related-item a:hover,
.related-item a:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--teal);
}

/* 侧栏区块 */
.aside-block,
.side-block,
.aside-links {
  padding: 16px 18px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.aside-title,
.side-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}

.aside-links ul,
.side-list,
.side-list-plain {
  display: grid;
  gap: 7px;
}

.aside-links a,
.side-list a,
.side-list-plain a {
  font-size: 15px;
  color: var(--teal-dark);
}

.checklist {
  gap: 8px;
  margin-top: 0;
}

.checklist-item {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: #faf8f4;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

/* 步骤列表（进度页） */
.step-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.step-item {
  padding: 14px 16px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.step-item .step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-item .step-text {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

/* --------------------------------------------------------------------------
   pages
   -------------------------------------------------------------------------- */

/* -------------------- 首页 -------------------- */

/* 首屏定位区 */
.hero {
  padding: 40px 0 34px;
  border-bottom: 1px solid var(--line);
  background-color: #f2efe7;
}

.hero-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 34px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--teal-dark);
}

.hero-copy h1 {
  font-size: 34px;
  line-height: 1.35;
  margin-bottom: 14px;
}

.hero-lead {
  max-width: 36em;
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-figure {
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}

/* 目录速览表 */
.overview {
  padding: 36px 0 8px;
}

.table-wrap {
  overflow-x: auto;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.overview-table {
  min-width: 620px;
  font-size: 15px;
}

.overview-table th,
.overview-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.overview-table thead th {
  background-color: #f1eee7;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.overview-table tbody tr:last-child td {
  border-bottom: none;
}

.overview-table tbody tr:hover {
  background-color: #faf8f4;
}

.overview-table .row-name {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.overview-table .row-genre {
  color: var(--ink-soft);
}

/* 焦点条目组 */
.spotlight {
  padding: 36px 0 8px;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease,
    box-shadow 0.18s ease;
}

.entry-card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.entry-cover {
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  aspect-ratio: 16 / 10;
}

.entry-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.entry-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.entry-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.entry-link {
  margin-top: auto;
  font-size: 15px;
  color: var(--teal-dark);
  border-bottom: 1px solid transparent;
  align-self: flex-start;
}

.entry-link:hover,
.entry-link:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--teal);
}

/* 题材分区索引与内容面板 */
.genre-panel-section {
  padding: 36px 0 8px;
}

.genre-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.genre-index {
  min-width: 0;
}

.genre-list {
  display: grid;
  gap: 8px;
}

.genre-item {
  padding: 10px 14px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.genre-item:hover {
  border-color: var(--line);
  transform: translateY(-1px);
}

.genre-item.is-active {
  border-color: var(--teal);
  box-shadow: inset 3px 0 0 var(--teal);
}

.genre-link {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.genre-item.is-active .genre-link {
  color: var(--teal-dark);
}

.genre-link:hover,
.genre-link:focus-visible {
  text-decoration: none;
  color: var(--teal-dark);
}

.genre-desc {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-mute);
}

.genre-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-mute);
}

.genre-panels {
  min-width: 0;
}

.genre-panel {
  padding: 20px 22px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.genre-panel[hidden] {
  display: none;
}

.panel-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.panel-scope {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.panel-scope strong {
  color: var(--ink);
}

.panel-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--ink);
}

.panel-entries {
  margin-bottom: 4px;
}

.panel-entry-list {
  display: grid;
  gap: 8px;
}

.panel-entry {
  padding: 9px 12px;
  font-size: 15px;
  color: var(--ink-soft);
  background-color: #faf8f4;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.panel-entry-name {
  font-weight: 600;
  color: var(--ink);
  margin-right: 8px;
}

.entry-meta {
  font-size: 13px;
  color: var(--ink-mute);
}

.panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 连载进度分组清单 */
.progress-section {
  padding: 36px 0 8px;
}

.progress-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.progress-group {
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.group-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.group-desc {
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 12px;
}

.group-list {
  display: grid;
  gap: 8px;
}

.group-row {
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line-soft);
}

.group-row:last-child {
  border-bottom: none;
}

/* 阅读说明与术语示例 */
.guide-section {
  padding: 36px 0 8px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.guide-points {
  min-width: 0;
}

.guide-list {
  display: grid;
  gap: 10px;
}

.guide-item {
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink-soft);
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.term-sample {
  min-width: 0;
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.term-line {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

/* 收录与纠错入口 */
.contribute-section {
  padding: 36px 0 8px;
}

/* -------------------- 内页 · 题材索引 -------------------- */

.rule-note {
  margin-bottom: 26px;
  padding: 16px 18px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.rule-note .section-title {
  font-size: 17px;
  margin-bottom: 6px;
}

.rule-note p {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: var(--body-col);
}

.page-head {
  margin-bottom: 22px;
}

.page-inner {
  min-width: 0;
}

.page-layout.sidebar-left .genre-index,
.sidebar-left .page-layout .genre-index {
  min-width: 0;
}

.panel-media {
  margin: 14px 0;
  aspect-ratio: 16 / 9;
}

.genre-panel .panel-entry-list {
  margin-bottom: 4px;
}

/* 交界题材归类规则 */
.cross-rule {
  margin-top: 32px;
}

.cross-rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.cross-rule-item {
  padding: 16px 18px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.cross-rule-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cross-rule-item p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

/* 分区交叉参考条 */
.cross-ref {
  margin-top: 30px;
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.cross-ref-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 10px 0;
}

.cross-ref-item a {
  color: var(--teal-dark);
  border-bottom: 1px solid transparent;
}

.cross-ref-item a:hover,
.cross-ref-item a:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--teal);
}

.cross-ref-note {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0;
}

.cross-ref-note a {
  color: var(--teal-dark);
  margin-right: 12px;
}

/* -------------------- 内页 · 作品目录 -------------------- */

.catalog-rules {
  margin-bottom: 30px;
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.rules-body p {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: var(--body-col);
  margin-bottom: 10px;
}

.catalog-list {
  margin-bottom: 30px;
}

.name-group {
  margin-bottom: 22px;
}

.catalog-list .group-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.entry-rows {
  display: grid;
  gap: 8px;
}

.entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.entry-row:hover {
  border-color: var(--line);
  transform: translateY(-1px);
}

.entry-row .entry-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.entry-row .entry-name:hover,
.entry-row .entry-name:focus-visible {
  color: var(--teal-dark);
  text-decoration: none;
}

.entry-genre {
  font-size: 14px;
  color: var(--ink-mute);
}

.field-notes {
  margin-bottom: 30px;
}

.field-figure {
  margin: 0 0 18px;
  aspect-ratio: 16 / 9;
}

.catalog-howto {
  margin-bottom: 30px;
}

.howto-step {
  padding: 14px 16px;
}

/* -------------------- 内页 · 连载进度 -------------------- */

.status-def {
  padding: 16px 18px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.status-def-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.status-def-body {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 14px;
}

.status-def-body .field-name {
  font-size: 14px;
  color: var(--ink-mute);
  font-weight: 400;
}

.status-def-body .field-value {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

.section-media {
  margin: 16px 0 0;
}

/* -------------------- 内页 · 阅读说明 -------------------- */

.anchor-nav {
  margin: 18px 0 26px;
  padding: 14px 18px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.anchor-nav-title {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0 0 8px;
}

.anchor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.anchor-list a {
  font-size: 15px;
  color: var(--teal-dark);
  border-bottom: 1px solid transparent;
}

.anchor-list a:hover,
.anchor-list a:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--teal);
}

.content-column {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.content-body {
  min-width: 0;
}

.content-section {
  margin-bottom: 32px;
}

.content-section > p {
  max-width: var(--body-col);
  font-size: 15px;
  color: var(--ink-soft);
}

.content-figure {
  margin: 16px 0;
  aspect-ratio: 16 / 9;
}

.content-body .field-list {
  margin-top: 16px;
}

.screen-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.screen-note {
  padding: 14px 16px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.screen-note-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.screen-note p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 0;
}

.faq-question {
  display: block;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "＋";
  float: right;
  font-weight: 400;
  color: var(--teal-dark);
}

.faq-item[open] .faq-question::after {
  content: "－";
}

.faq-answer {
  padding: 12px 16px 14px;
  font-size: 15px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line-soft);
}

.sidebar {
  min-width: 0;
}

/* -------------------- 内页 · 标签与术语 -------------------- */

.terms-layout {
  grid-template-columns: 240px minmax(0, 1fr);
}

.terms-toc {
  min-width: 0;
  padding: 16px 18px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.toc-list {
  display: grid;
  gap: 8px;
}

.toc-item a {
  font-size: 15px;
  color: var(--teal-dark);
}

.toc-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-mute);
}

.terms-body {
  min-width: 0;
}

.terms-block,
.terms-example {
  margin-bottom: 30px;
}

.example-figure {
  margin: 14px 0;
  aspect-ratio: 16 / 9;
}

.terms-table {
  margin: 14px 0;
  font-size: 15px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.terms-table th,
.terms-table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.terms-table thead th {
  background-color: #f1eee7;
  font-weight: 600;
  white-space: nowrap;
}

.terms-table tbody tr:last-child td {
  border-bottom: none;
}

.term-cell {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.status-tag-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.status-tag-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.status-desc {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.misuse-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.misuse-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 12px 16px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.misuse-wrong {
  font-size: 15px;
  color: #8a4a3a;
}

.misuse-right {
  font-size: 15px;
  color: var(--teal-dark);
}

/* -------------------- 内页 · 收录与纠错 -------------------- */

.condition-list,
.correction-list,
.process-list,
.maintenance-list {
  margin-top: 14px;
}

.rule-item .rule-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.rule-item .rule-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

.section-figure {
  margin: 16px 0 18px;
  aspect-ratio: 16 / 9;
}

.correction-list {
  counter-reset: check;
}

.check-item {
  padding: 14px 16px;
}

.check-item .check-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.check-item .check-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

.process-step {
  padding: 14px 16px;
}

.process-step .step-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.process-step .step-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

/* -------------------- 404 -------------------- */

.error-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 48px 20px 56px;
}

.error-panel {
  max-width: var(--body-col);
  margin-bottom: 34px;
}

.error-panel h1 {
  font-size: 30px;
  margin-bottom: 12px;
}

.error-lead {
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-color: var(--panel);
  color: var(--teal-dark);
}

.error-btn:hover,
.error-btn:focus-visible {
  text-decoration: none;
  border-color: var(--teal);
}

.error-btn-primary {
  background-color: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.error-btn-primary:hover,
.error-btn-primary:focus-visible {
  background-color: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
}

.error-hints {
  max-width: var(--body-col);
  padding: 18px 20px;
  background-color: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.error-hints h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.error-hint-list {
  display: grid;
  gap: 8px;
}

.error-hint-list a {
  font-size: 15px;
  color: var(--teal-dark);
}

/* 滚动进入的轻微淡入（不影响初始可见性） */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-in 0.5s ease both;
  }
}

@keyframes reveal-in {
  from {
    transform: translateY(6px);
  }

  to {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

/* 平板 640–1023px */
@media (max-width: 1023px) {
  .hero {
    padding: 30px 0 26px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .hero-figure {
    aspect-ratio: 16 / 9;
  }

  .page-title {
    font-size: 26px;
  }

  .layout-shell,
  .content-column {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .sidebar-left .page-layout,
  .page-layout.sidebar-left,
  .terms-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .genre-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cross-rule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 手机 ≤639px */
@media (max-width: 639px) {
  .notice-banner {
    padding: 10px 16px;
  }

  .header-inner {
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .brand {
    font-size: 18px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    flex: 1 1 100%;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-top: 8px;
    padding: 8px 0;
    background-color: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 16px;
    border-bottom: none;
  }

  .nav-link.is-current {
    border-bottom: none;
    background-color: #eef4f3;
  }

  .hero {
    padding: 26px 0 22px;
  }

  .hero-inner,
  .section-inner,
  .site-inner,
  .inner-main,
  .error-main,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy h1 {
    font-size: 22px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .page-title {
    font-size: 22px;
  }

  .section-title {
    font-size: 18px;
  }

  .entry-grid,
  .progress-groups,
  .cross-rule-list,
  .screen-notes,
  .guide-layout,
  .genre-layout,
  .layout-shell,
  .content-column,
  .sidebar-left .page-layout,
  .page-layout.sidebar-left,
  .terms-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .status-def-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .status-def-body .field-name {
    margin-top: 6px;
  }

  .status-tag-item,
  .misuse-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .overview-table {
    min-width: 520px;
  }

  .related-list,
  .cross-ref-list,
  .anchor-list {
    flex-direction: column;
    gap: 8px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-to-top {
    min-height: 44px;
    padding: 8px 18px;
  }
}
