/* ==========================================================================
   九九电影影院 kuopan.cn 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */

:root {
  --bg-page: #f6f7f9;
  --bg-card: #ffffff;
  --text-main: #1f2430;
  --text-sub: #5b6472;
  --brand: #1f5fa8;
  --brand-dark: #17497f;
  --brand-soft: #e8f0fa;
  --channel: #2f7d5c;
  --state-new: #b06a12;
  --state-revise: #8a3f6d;
  --line: #dfe3e8;
  --line-strong: #c9d0d8;
  --radius: 6px;
  --radius-sm: 4px;
  --wrap: 1180px;
  --gap: 20px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

caption {
  text-align: left;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

time {
  font-variant-numeric: tabular-nums;
}

.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;
}

/* --------------------------------------------------------------------------
   layout —— 全站骨架
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 30;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.3;
}

.brand-slogan {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  display: block;
}

.nav-list a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.nav-list a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.nav-list a.is-current {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--text-main);
  border-radius: 1px;
}

.site-main {
  display: block;
}

.inner-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.home-main {
  padding-bottom: 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 4px 0 14px;
}

.breadcrumb a {
  color: var(--text-sub);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--text-main);
}

.page-header {
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.page-title {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.page-description {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 860px;
  margin-bottom: 14px;
}

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 20px 20px;
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 24px 28px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
}

.footer-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.footer-back {
  font-size: 13px;
}

.footer-col-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-list a {
  display: inline-block;
  font-size: 13px;
  color: var(--text-sub);
  padding: 2px 0;
  line-height: 1.6;
}

.footer-list a:hover {
  color: var(--brand);
}

.footer-bottom {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 20px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  font-size: 12px;
  color: var(--text-sub);
}

.footer-copy {
  color: var(--text-sub);
}

/* 通用 section 节奏 */
.section {
  margin-bottom: 36px;
}

.section-head {
  margin-bottom: 16px;
}

.section-title,
.section-head h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.section-desc,
.section-intro,
.section-lead {
  font-size: 14px;
  color: var(--text-sub);
  max-width: 880px;
  margin-bottom: 14px;
}

.section-foot {
  margin-top: 14px;
  font-size: 14px;
}

.section-foot a {
  margin-right: 18px;
}

/* --------------------------------------------------------------------------
   components —— 顶部信息条 / 表格 / 卡片 / 标签 / 记录
   -------------------------------------------------------------------------- */

.top-notice {
  background: #eef1f5;
  border-bottom: 1px solid var(--line);
}

.top-notice p {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.top-notice a {
  color: var(--brand);
  margin: 0 2px;
}

/* 表格通用 */
.channel-table,
.data-table,
.field-table {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

.channel-table thead th,
.data-table thead th,
.field-table thead th {
  background: #f0f3f7;
  color: var(--text-main);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.channel-table tbody th,
.channel-table tbody td,
.data-table tbody th,
.data-table tbody td,
.field-table tbody th,
.field-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--text-main);
  line-height: 1.65;
}

.channel-table tbody tr:last-child th,
.channel-table tbody tr:last-child td,
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td,
.field-table tbody tr:last-child th,
.field-table tbody tr:last-child td {
  border-bottom: 0;
}

.channel-table tbody th,
.field-table tbody th,
.data-table tbody th {
  font-weight: 600;
  white-space: nowrap;
}

.channel-table tbody tr:hover,
.data-table tbody tr:hover,
.field-table tbody tr:hover {
  background: #f7f9fc;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 640px;
}

.table-caption {
  font-size: 13px;
  color: var(--text-sub);
  padding: 8px 12px 0;
}

/* 频道色标 */
.channel-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  background: var(--channel);
}

.channel-dot--drama { background: #2f7d5c; }
.channel-dot--doc { background: #1f5fa8; }
.channel-dot--anim { background: #b06a12; }
.channel-dot--scifi { background: #4a5fa8; }
.channel-dot--mystery { background: #8a3f6d; }
.channel-dot--family { background: #3f8a86; }

.channel-dot-drama { background: #2f7d5c; }
.channel-dot-doc { background: #1f5fa8; }
.channel-dot-anime { background: #b06a12; }
.channel-dot-scifi { background: #4a5fa8; }
.channel-dot-mystery { background: #8a3f6d; }
.channel-dot-family { background: #3f8a86; }

/* 图片容器 */
.content-media,
.section-media,
.collection-figure,
.collection-media,
.gallery-item,
.fields-figure,
.guide-figure {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-media img,
.section-media img,
.collection-figure img,
.collection-media img,
.gallery-item img,
.fields-figure img,
.guide-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e9edf2;
}

.content-media figcaption,
.section-media figcaption,
.gallery-item figcaption,
.fields-figure figcaption,
.guide-figure figcaption {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-sub);
  border-top: 1px solid var(--line);
  line-height: 1.6;
}

/* 专题卡（首页 + 专题页共用基础） */
.collection-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.collection-card .collection-figure,
.collection-card .collection-media {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.collection-name {
  font-size: 17px;
  font-weight: 600;
  padding: 12px 14px 0;
}

.collection-name a {
  color: var(--text-main);
}

.collection-name a:hover {
  color: var(--brand);
  text-decoration: none;
}

.collection-scope {
  padding: 6px 14px 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.collection-meta {
  padding: 8px 14px 0;
  font-size: 13px;
  color: var(--text-main);
}

.meta-label {
  color: var(--text-sub);
  margin-right: 4px;
}

.collection-org {
  padding: 6px 14px 14px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.collection-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.collection-link {
  font-size: 13px;
}

/* 整理记录 */
.record-groups,
.records-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.record-month {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.record-month-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-strong);
  margin-bottom: 10px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-size: 14px;
}

.record-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-sub);
  flex: 0 0 auto;
}

.record-channel {
  color: var(--text-main);
  flex: 0 0 auto;
}

.record-text,
.record-note {
  flex: 1 1 100%;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0;
}

.record-tag,
.record-tag-new,
.record-tag-edit,
.record-tag-move {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.record-tag--new,
.record-tag-new {
  color: var(--state-new);
}

.record-tag--revise,
.record-tag-edit {
  color: var(--state-revise);
}

.record-tag--move,
.record-tag-move {
  color: var(--channel);
}

/* 字段摘要条 / 摘要列表 */
.field-summary,
.field-strip,
.field-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
}

.field-summary-item,
.field-strip-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 140px;
}

.field-summary-item dt,
.field-strip-item dt {
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 12px;
}

.field-summary-item dd,
.field-strip-item dd {
  margin: 0;
  color: var(--text-main);
}

.field-summary-label {
  font-size: 13px;
  color: var(--text-sub);
  flex: 0 0 auto;
  margin-right: 6px;
}

.field-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.field-summary-list li {
  font-size: 13px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.field-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
}

.field-val {
  color: var(--text-main);
}

/* 相关入口 / 下一步 */
.related-list,
.next-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.related-item,
.next-list li {
  font-size: 14px;
}

.related-item a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--brand);
}

.related-item a:hover {
  border-color: var(--brand);
  text-decoration: none;
}

.related-name {
  display: block;
  font-weight: 600;
  color: var(--text-main);
}

.related-desc {
  display: block;
  font-size: 13px;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   pages —— 首页
   -------------------------------------------------------------------------- */

.hero-desk {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 20px 8px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 28px;
  align-items: start;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-eyebrow {
  font-size: 13px;
  color: var(--channel);
  font-family: var(--font-mono);
}

.hero-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.35;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 2px;
}

.hero-points li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-main);
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.hero-cta {
  align-self: flex-start;
  display: inline-block;
  margin-top: 6px;
  padding: 10px 20px;
  background: var(--brand);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}

.hero-cta:hover {
  background: var(--brand-dark);
  color: #ffffff;
  text-decoration: none;
}

.hero-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-title {
  font-size: 16px;
  font-weight: 600;
}

.channel-table--preview {
  font-size: 13px;
}

.channel-table--preview thead th,
.channel-table--preview tbody th,
.channel-table--preview tbody td {
  padding: 8px 10px;
}

.preview-note {
  font-size: 13px;
  color: var(--text-sub);
}

.content-media-primary {
  grid-column: 1 / -1;
}

.content-media-primary img {
  aspect-ratio: 21 / 9;
}

.home-main .section {
  max-width: var(--wrap);
  margin: 0 auto 36px;
  padding: 0 20px;
}

.section-channels .section-media {
  margin-bottom: 16px;
}

.section-channels .section-media img {
  aspect-ratio: 21 / 9;
}

.collection-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.fields-summary {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

.fields-subtitle {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.field-table tbody th {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand-dark);
}

.boundary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boundary-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.7;
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--channel);
}

.fields-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-sub);
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.index-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.index-item h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.index-item p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   pages —— 频道目录
   -------------------------------------------------------------------------- */

.channel-row .channel-name {
  font-weight: 600;
}

.channel-enter {
  white-space: nowrap;
}

.channel-enter a::after {
  content: " →";
  color: var(--brand);
}

.channel-row:hover .channel-enter a {
  text-decoration: underline;
}

.section-channel-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.explain-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.explain-title {
  font-size: 15px;
  margin-bottom: 6px;
}

.explain-card p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.tag-table tbody th {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand-dark);
}

.advice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: advice;
}

.advice-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.advice-title {
  font-size: 15px;
  margin-bottom: 6px;
}

.advice-item p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.advice-note {
  margin-top: 14px;
  font-size: 14px;
}

.advice-note a {
  margin-right: 16px;
}

/* --------------------------------------------------------------------------
   pages —— 专题片单
   -------------------------------------------------------------------------- */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.layout-main {
  min-width: 0;
}

.layout-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aside-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.aside-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-list a {
  display: block;
  font-size: 13px;
  color: var(--text-sub);
  padding: 3px 0;
  line-height: 1.65;
}

.aside-list a:hover {
  color: var(--brand);
}

.aside-text {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.collection-grid .collection-card {
  min-width: 0;
}

.relation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.relation-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.relation-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.relation-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: order;
}

.order-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 14px 52px;
}

.order-item::before {
  counter-increment: order;
  content: counter(order, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--brand);
}

.order-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.order-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.section-next .next-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
}

.section-next .next-list a {
  display: block;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--brand);
}

.section-next .next-list a:hover {
  border-color: var(--brand);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages —— 字段说明
   -------------------------------------------------------------------------- */

.fields-visual {
  margin-bottom: 32px;
}

.fields-visual h2,
.fields-table-section h2,
.boundary-section h2,
.principle-section h2,
.related-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.fields-figure {
  margin-top: 14px;
}

.fields-figure img {
  aspect-ratio: 21 / 9;
}

.fields-table-section {
  margin-bottom: 32px;
}

.fields-table tbody th {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand-dark);
}

.boundary-section {
  margin-bottom: 32px;
}

.boundary-section .boundary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin-top: 14px;
}

.boundary-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.boundary-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.boundary-item p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.principle-section {
  margin-bottom: 32px;
}

.principle-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
  counter-reset: principle;
}

.principle-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--channel);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.principle-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.principle-item p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.related-section {
  margin-bottom: 8px;
}

.related-section .related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.related-section .related-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.related-section .related-item a {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.related-section .related-item p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   pages —— 整理记录
   -------------------------------------------------------------------------- */

.records-section {
  margin-bottom: 32px;
}

.records-section .section-head h2,
.change-types .section-head h2,
.record-rules .section-head h2,
.related-entry .section-head h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.records-section .section-media {
  margin-bottom: 18px;
}

.records-section .section-media img {
  aspect-ratio: 21 / 9;
}

.records-month {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.records-month-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.records-month-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: #f0f3f7;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}

.records-month-toggle:hover {
  background: var(--brand-soft);
}

.records-month-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.records-month-count {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-sub);
}

.records-month-toggle::after {
  content: "＋";
  font-size: 14px;
  color: var(--text-sub);
  margin-left: 8px;
}

.records-month.is-open .records-month-toggle::after {
  content: "－";
}

.records-month .records-list {
  display: none;
  padding: 12px 16px;
  gap: 12px;
}

.records-month.is-open .records-list {
  display: flex;
  flex-direction: column;
}

.change-types {
  margin-bottom: 32px;
}

.change-type-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.change-type-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.change-type-name {
  font-size: 15px;
  margin-bottom: 8px;
}

.change-type-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.record-rules {
  margin-bottom: 32px;
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rule-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.rule-name {
  font-size: 15px;
  margin-bottom: 6px;
}

.rule-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.related-entry {
  margin-bottom: 8px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.related-card-title {
  font-size: 15px;
  margin-bottom: 6px;
}

.related-card-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   pages —— 浏览指引
   -------------------------------------------------------------------------- */

.guide-steps,
.guide-usage,
.guide-faq,
.related-entry {
  margin-bottom: 32px;
}

.guide-steps h2,
.guide-usage h2,
.guide-faq h2,
.related-entry h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.guide-figure {
  margin-bottom: 18px;
}

.guide-figure img {
  aspect-ratio: 21 / 9;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  counter-increment: step;
}

.step-item::before {
  content: "步骤 " counter(step);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  margin-bottom: 6px;
}

.step-title {
  font-size: 15px;
  margin-bottom: 6px;
}

.step-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.step-result {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13px;
  color: var(--channel);
  line-height: 1.7;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.usage-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.usage-title {
  font-size: 15px;
  margin-bottom: 6px;
}

.usage-text {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.usage-link {
  margin-top: 8px;
  font-size: 13px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  display: block;
  min-height: 44px;
  padding: 12px 42px 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "＋";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-sub);
}

.faq-item[open] .faq-question::after {
  content: "－";
}

.faq-question:hover {
  background: #f7f9fc;
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.related-entry .related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-entry .related-item a {
  display: block;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--brand);
}

.related-entry .related-item a:hover {
  border-color: var(--brand);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   pages —— 404
   -------------------------------------------------------------------------- */

.error-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 56px;
}

.error-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  margin-bottom: 26px;
}

.error-panel h1 {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 10px;
}

.error-lead {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 18px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary {
  display: inline-block;
  padding: 10px 20px;
  background: var(--brand);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  line-height: 24px;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-card);
  color: var(--brand);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  min-height: 44px;
  line-height: 24px;
}

.btn-ghost:hover {
  border-color: var(--brand);
  text-decoration: none;
}

.error-hint h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.hint-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.hint-list li a {
  display: block;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--brand);
}

.hint-list li a:hover {
  border-color: var(--brand);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .header-inner {
    padding: 10px 16px;
    gap: 10px 16px;
    align-items: center;
    flex-wrap: nowrap;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-toggle {
    display: flex;
    order: 3;
    flex: 0 0 auto;
  }

  .site-nav {
    order: 4;
    flex: 0 0 100%;
    display: block;
    justify-content: flex-start;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 6px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }

  .hero-desk {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 22px 16px 6px;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .fields-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .collection-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explain-grid,
  .advice-list,
  .relation-list,
  .principle-list,
  .change-type-list,
  .rule-list,
  .usage-grid,
  .related-entry .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-channel-gallery .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boundary-section .boundary-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .top-notice p {
    padding: 8px 14px;
    font-size: 12px;
  }

  .header-inner {
    padding: 10px 14px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-slogan {
    font-size: 11px;
  }

  .inner-main {
    padding: 16px 14px 40px;
  }

  .home-main .section {
    padding: 0 14px;
    margin-bottom: 30px;
  }

  .hero-desk {
    padding: 20px 14px 4px;
  }

  .hero-title {
    font-size: 24px;
  }

  .page-title {
    font-size: 24px;
  }

  .section-title,
  .section-head h2,
  .fields-visual h2,
  .fields-table-section h2,
  .boundary-section h2,
  .principle-section h2,
  .related-section h2,
  .records-section .section-head h2,
  .change-types .section-head h2,
  .record-rules .section-head h2,
  .related-entry .section-head h2,
  .guide-steps h2,
  .guide-usage h2,
  .guide-faq h2,
  .related-entry h2 {
    font-size: 19px;
  }

  .error-panel h1 {
    font-size: 24px;
  }

  .collection-cards,
  .collection-grid,
  .index-grid,
  .explain-grid,
  .advice-list,
  .relation-list,
  .principle-list,
  .change-type-list,
  .rule-list,
  .usage-grid,
  .related-entry .related-list,
  .section-channel-gallery .gallery-grid,
  .step-list,
  .related-grid,
  .hint-list,
  .boundary-section .boundary-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 24px 14px 16px;
  }

  .footer-bottom {
    padding: 12px 14px 20px;
    flex-direction: column;
    gap: 6px;
  }

  .field-summary,
  .field-strip,
  .field-summary-bar {
    flex-direction: column;
    gap: 8px;
  }

  .field-summary-item,
  .field-strip-item {
    min-width: 0;
  }

  .table-wrap table {
    min-width: 560px;
  }

  .channel-table--preview {
    min-width: 520px;
  }

  .hero-preview .table-wrap {
    overflow-x: auto;
  }

  .content-media-primary img,
  .section-channels .section-media img,
  .fields-figure img,
  .guide-figure img,
  .records-section .section-media img {
    aspect-ratio: 16 / 9;
  }

  .record-item {
    gap: 4px 10px;
  }

  .related-list,
  .next-list {
    flex-direction: column;
    gap: 8px;
  }

  .related-item a {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
