/* ==========================================================================
   天美星空无限 · 全站样式
   分组：base / layout / components / pages / responsive
   ========================================================================== */

/* --- base ---------------------------------------------------------------- */

:root {
  --shell-max: 1120px;
  --shell-inner: 1080px;
  --content-max: 720px;
  --side-width: 240px;
  --col-gap: 40px;

  --paper: #F7F5EF;
  --ink: #1E2226;
  --night: #1F3A5F;
  --star: #6B7785;
  --warm: #B8794A;
  --line: #DCD8CE;
  --white: #FFFFFF;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-num: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.site-body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-base);
  font-size: 17px;
  line-height: 1.9;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--night);
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease;
}

a:hover {
  color: var(--warm);
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--star);
}

sup {
  font-size: 0.68em;
  line-height: 0;
  vertical-align: super;
}

strong {
  font-weight: 600;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

:focus-visible {
  outline: 2px solid var(--night);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--night);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

/* --- layout -------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 24px;
}

.inner-main .shell {
  max-width: var(--shell-inner);
}

/* 页头 */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.brand-slogan {
  font-size: 12px;
  line-height: 1.4;
  color: var(--star);
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.nav-item a {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  border-bottom: 2px solid transparent;
}

.nav-item a:hover {
  color: var(--night);
  border-bottom-color: var(--night);
}

.nav-item.is-current a {
  color: var(--night);
  border-bottom-color: var(--night);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
}

.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 16px 24px 24px;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-position {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--star);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
}

.mobile-nav-list li a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.mobile-nav-list li a:hover {
  color: var(--night);
}

/* 主内容 */

.site-main {
  display: block;
  padding: 0 0 72px;
}

.inner-main {
  padding-top: 0;
}

/* 面包屑 */

.breadcrumb {
  max-width: var(--shell-inner);
  margin: 0 auto;
  padding: 24px 24px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--star);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb a {
  color: var(--star);
}

.breadcrumb a:hover {
  color: var(--night);
}

.breadcrumb-sep {
  color: var(--line);
}

.breadcrumb-current {
  color: var(--night);
}

/* 页面标题区 */

.page-header {
  max-width: var(--shell-inner);
  margin: 0 auto;
  padding: 20px 24px 8px;
}

.page-title {
  font-size: 30px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
}

.page-title-block,
.page-head {
  padding-top: 12px;
  padding-bottom: 4px;
}

.page-lead {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 10px;
}

.page-meta {
  font-size: 14px;
  line-height: 1.7;
  color: var(--star);
  margin: 0;
}

/* 两栏页布局 */

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-width);
  gap: var(--col-gap);
  align-items: start;
  padding-top: 28px;
  padding-bottom: 8px;
}

.page-layout .content-column {
  min-width: 0;
}

.page-layout .sidebar,
.page-layout .side-column {
  min-width: 0;
}

.sidebar-left .page-layout,
.page-layout.sidebar-left {
  grid-template-columns: var(--side-width) minmax(0, 1fr);
}

/* 页脚 */

.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  margin-top: 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.footer-col {
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.footer-col:first-child {
  padding-left: 0;
  border-left: 0;
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 10px;
}

.footer-col p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--star);
  margin: 0 0 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links li a {
  font-size: 13px;
  line-height: 1.8;
  color: var(--star);
}

.footer-links li a:hover {
  color: var(--night);
}

.footer-copy {
  font-size: 13px;
  line-height: 1.8;
  color: var(--star);
}

/* --- components ---------------------------------------------------------- */

/* 文字箭头链接 */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--night);
  border-bottom: 1px dotted var(--night);
  padding-bottom: 2px;
}

.link-arrow::after {
  content: "→";
  font-size: 13px;
  transition: transform 120ms ease;
}

.link-arrow:hover {
  color: var(--warm);
  border-bottom: 1px solid var(--warm);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* 区块通用标题 */

.section-title {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 8px;
}

.section-lead,
.section-note,
.section-intro {
  font-size: 15px;
  line-height: 1.8;
  color: var(--star);
  margin: 0 0 20px;
}

/* 规则摘要框 */

.rule-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warm);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rule-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.8;
}

.rule-item p {
  margin: 0;
}

.rule-index {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--warm);
  font-weight: 600;
}

.rule-item-note {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  color: var(--star);
}

/* 折叠问答 */

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-num);
  font-size: 18px;
  color: var(--night);
  transition: transform 120ms ease;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-question:hover {
  color: var(--night);
}

.faq-answer {
  padding: 4px 0 20px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
}

.faq-answer p {
  margin: 0 0 10px;
}

/* 相关页面入口（通用网格） */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

/* 侧栏通用 */

.sidebar,
.side-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-title,
.side-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.sidebar-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--star);
  margin: 0 0 12px;
}

.sidebar-links,
.side-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links li a,
.side-links li a {
  display: block;
  font-size: 14px;
  line-height: 1.7;
  color: var(--night);
  padding: 4px 0;
}

.sidebar-links li a:hover,
.side-links li a:hover {
  color: var(--warm);
}

/* 卷次目录列表 */

.volume-index,
.volume-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.volume-item a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
}

.volume-item a:hover {
  background: var(--white);
  border-left-color: var(--night);
  color: var(--night);
}

.volume-item.is-current a {
  background: var(--white);
  border-left-color: var(--warm);
  color: var(--night);
  font-weight: 600;
}

.side-block {
  min-width: 0;
}

/* 内页正文列 */

.content-column {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.content-section {
  min-width: 0;
}

.content-section .section-title {
  margin-bottom: 12px;
}

/* 内页正文图片 */

.section-figure,
.article-figure,
.media-figure,
.works-figure,
.reading-figure {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}

.section-figure img,
.article-figure img,
.media-figure img,
.works-figure img,
.reading-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--paper);
}

.section-figure figcaption,
.article-figure figcaption,
.media-figure figcaption,
.works-figure figcaption,
.reading-figure figcaption {
  padding: 10px 16px 12px;
  margin: 0;
  border-top: 1px solid var(--line);
}

/* --- pages --------------------------------------------------------------- */

/* 首页 · 首屏 */

.home-main {
  padding-bottom: 72px;
}

.hero {
  padding: 48px 0 8px;
}

.hero-intro {
  max-width: var(--content-max);
  margin: 0 0 32px;
}

.hero-eyebrow {
  font-size: 13px;
  line-height: 1.7;
  color: var(--star);
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.hero-intro h1 {
  margin: 0 0 16px;
}

.hero-lead {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.hero-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-card-main {
  grid-column: span 6;
}

.hero-card-side {
  grid-column: span 3;
  padding: 24px;
}

.hero-card-side:nth-of-type(2) {
  margin-top: 40px;
}

.hero-card-side:nth-of-type(3) {
  margin-top: 80px;
}

.hero-figure {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--paper);
}

.hero-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-card-title {
  font-size: 20px;
  line-height: 1.45;
  margin: 0;
}

.hero-card-side .hero-card-title {
  font-size: 18px;
  margin-bottom: 10px;
}

.hero-card-side p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--star);
  margin: 0 0 16px;
}

.hero-card-body p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--star);
  margin: 0;
}

.hero-card-body .link-arrow,
.hero-card-side .link-arrow {
  align-self: flex-start;
  margin-top: auto;
}

/* 首页 · 题材速览 */

.genre-strip {
  padding: 56px 0 8px;
}

.genre-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.genre-item {
  padding: 20px 20px 20px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.genre-item:last-child {
  border-right: 0;
  padding-right: 0;
}

.genre-name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.genre-meta {
  font-size: 13px;
  line-height: 1.7;
  color: var(--star);
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.genre-meta .num {
  color: var(--night);
  font-weight: 600;
}

/* 首页 · 交错图文 */

.split-block {
  padding: 56px 0 0;
}

.split-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}

.split-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}

.split-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper);
}

.split-text {
  min-width: 0;
}

.split-text h2 {
  margin: 0 0 14px;
}

.split-text p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 14px;
}

.split-text .link-arrow {
  margin-top: 4px;
}

/* 首页 · 设定索引摘要 */

.setting-index {
  padding: 56px 0 0;
}

.setting-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  border-top: 1px solid var(--line);
  margin-bottom: 20px;
}

.setting-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.setting-term {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 6px;
  border-bottom: 1px dotted var(--star);
  display: inline-block;
  padding-bottom: 2px;
}

.setting-def {
  font-size: 15px;
  line-height: 1.8;
  color: var(--star);
  margin: 0 0 6px;
}

.setting-source {
  font-size: 13px;
  line-height: 1.6;
  color: var(--star);
}

.vol-mark {
  color: var(--warm);
  font-family: var(--font-num);
  font-weight: 600;
  margin-left: 4px;
}

/* 首页 · 规则摘要 */

.rule-summary {
  padding: 56px 0 0;
}

.rule-summary .rule-box {
  margin-bottom: 20px;
}

/* 首页 · 常见问题 */

.faq {
  padding: 56px 0 0;
}

.faq .faq-list {
  margin-bottom: 20px;
}

/* 首页 · 反馈入口 */

.feedback-entry {
  padding: 56px 0 0;
}

.feedback-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 32px;
}

.feedback-block h2 {
  font-size: 20px;
  margin: 0 0 10px;
}

.feedback-block p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--star);
  margin: 0 0 16px;
}

/* 作品档案页 */

.works-layout {
  align-items: start;
}

.works-filter {
  margin-bottom: 8px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-tab-item {
  min-width: 0;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.filter-tab:hover {
  color: var(--night);
  border-color: var(--night);
}

.filter-tab.is-active {
  color: var(--night);
  border-color: var(--night);
  border-bottom-width: 2px;
  font-weight: 600;
}

.works-figure {
  margin-top: 4px;
}

.works-list-section {
  margin-top: 8px;
}

.works-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.work-item {
  border-bottom: 1px solid var(--line);
}

.work-card {
  padding: 22px 0;
  min-width: 0;
}

.work-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.work-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.work-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--night);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
}

.work-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--star);
}

.work-meta-row .num {
  color: var(--night);
  font-weight: 600;
}

.work-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 12px;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.work-links a {
  font-size: 14px;
  line-height: 1.7;
  color: var(--night);
  border-bottom: 1px dotted var(--night);
  padding-bottom: 1px;
}

.work-links a:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

.sync-section {
  margin-top: 8px;
}

.sync-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
  padding-left: 0;
}

.sync-item {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.sync-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 5px;
  height: 5px;
  background: var(--warm);
  border-radius: 50%;
}

.sync-note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

/* 设定集页 */

.page-world .page-layout {
  padding-top: 28px;
}

.page-world .rule-list {
  gap: 18px;
}

.page-world .rule-list .rule-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.page-world .rule-list .rule-item:last-child {
  border-bottom: 0;
}

.rule-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 4px;
}

.rule-scope {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--star);
  font-family: var(--font-num);
}

.glossary-group {
  margin-top: 24px;
}

.glossary-group-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--night);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.glossary-list {
  display: flex;
  flex-direction: column;
}

.glossary-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.glossary-item:last-child {
  border-bottom: 0;
}

.glossary-term {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 4px;
  display: inline-block;
  border-bottom: 1px dotted var(--star);
  padding-bottom: 1px;
}

.glossary-meta {
  font-size: 13px;
  line-height: 1.7;
  color: var(--star);
  margin: 0;
}

.glossary-meta a {
  color: var(--night);
  border-bottom: 1px dotted var(--night);
}

.glossary-meta a:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

.change-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.change-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.8;
}

.change-date {
  font-family: var(--font-num);
  font-size: 14px;
  color: var(--star);
  letter-spacing: 0.02em;
}

.change-target {
  font-weight: 600;
  color: var(--ink);
}

.change-reason {
  grid-column: 2;
  font-size: 14px;
  color: var(--star);
  margin: 0;
}

.section-footnote {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
}

.section-footnote a {
  color: var(--night);
  border-bottom: 1px dotted var(--night);
}

.section-footnote a:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

/* 阅读指引页 */

.page-reading .reading-body {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 0 0;
}

.reading-paths {
  margin-bottom: 48px;
}

.path-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.path-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--night);
  border-radius: var(--radius-sm);
  padding: 20px;
  min-width: 0;
}

.path-name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
}

.path-audience {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 10px;
}

.path-start {
  font-size: 13px;
  line-height: 1.7;
  color: var(--night);
  font-family: var(--font-num);
  margin: 0 0 8px;
}

.path-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--star);
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.reading-numbering {
  margin-bottom: 48px;
}

.numbering-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.numbering-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.numbering-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 5px;
  height: 5px;
  background: var(--warm);
  border-radius: 50%;
}

.reading-faq {
  margin-bottom: 48px;
}

.reading-faq .faq-list {
  margin-top: 16px;
}

.related-entry {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 0 8px;
}

.related-entry h2 {
  font-size: 20px;
  margin: 0 0 16px;
}

.entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.entry-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  min-width: 0;
}

.entry-block h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.entry-block p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
  margin: 0 0 12px;
}

.entry-link {
  font-size: 14px;
  color: var(--night);
  border-bottom: 1px dotted var(--night);
  padding-bottom: 1px;
}

.entry-link:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

/* 连载手记页 */

.page-notes .article-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 0 0;
}

.article-body {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.article-body .content-section h2 {
  margin-bottom: 14px;
}

.article-body .content-section p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 14px;
}

.point-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.point-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--star);
}

.point-list li strong {
  color: var(--ink);
  font-size: 15px;
}

.split-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.split-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.split-index {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
  color: var(--warm);
  line-height: 1.8;
}

.split-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  min-width: 0;
}

.related-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 0 8px;
}

.related-section h2 {
  font-size: 20px;
  margin: 0 0 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
}

.related-card:hover {
  border-color: var(--night);
  color: var(--ink);
}

.related-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--night);
}

.related-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
}

/* 反馈与勘误页 */

.page-feedback .page-head {
  padding-bottom: 0;
}

.feedback-scope,
.feedback-media,
.feedback-elements,
.feedback-flow {
  padding-top: 40px;
}

.feedback-scope h2,
.feedback-media h2,
.feedback-elements h2,
.feedback-flow h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.scope-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  min-width: 0;
}

.scope-name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
}

.scope-item p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 10px;
}

.scope-verdict {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--star);
  font-size: 13px;
}

.scope-note {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
}

.scope-note a {
  color: var(--night);
  border-bottom: 1px dotted var(--night);
}

.scope-note a:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

.feedback-media .media-figure {
  margin-top: 16px;
}

.element-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  counter-reset: element;
}

.element-list li {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: element;
}

.element-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--ink);
}

.element-name::before {
  content: counter(element, decimal-leading-zero) " ";
  font-family: var(--font-num);
  color: var(--warm);
  font-weight: 600;
  margin-right: 6px;
}

.element-list li p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--star);
  margin: 0;
  min-width: 0;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.step-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  min-width: 0;
}

.step-index {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  color: var(--warm);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.step-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 6px;
}

.step-item p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
  margin: 0;
}

.flow-note {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.related-entry .related-grid {
  margin-top: 0;
}

.related-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  min-width: 0;
}

.related-item .related-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}

.related-item p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
  margin: 0 0 12px;
}

.related-link {
  font-size: 14px;
  color: var(--night);
  border-bottom: 1px dotted var(--night);
  padding-bottom: 1px;
}

.related-link:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

/* 404 页 */

.error-main {
  padding: 56px 0 72px;
}

.error-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}

.error-block {
  min-width: 0;
}

.error-code {
  font-family: var(--font-num);
  font-size: 64px;
  line-height: 1;
  font-weight: 600;
  color: var(--line);
  margin: 0 0 12px;
  letter-spacing: 0.04em;
}

.error-block h1 {
  font-size: 30px;
  margin: 0 0 14px;
}

.error-block p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--star);
  margin: 0 0 20px;
}

.error-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  color: var(--white);
  background: var(--night);
  border-radius: var(--radius-sm);
}

.error-home-link:hover {
  color: var(--white);
  background: var(--warm);
}

.error-paths h2,
.error-note h2 {
  font-size: 20px;
  margin: 0 0 14px;
}

.error-path-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.error-path-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.error-path-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.error-path-item h3 a {
  color: var(--night);
  border-bottom: 1px dotted var(--night);
  padding-bottom: 1px;
}

.error-path-item h3 a:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

.error-path-item p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--star);
  margin: 0;
}

.error-note {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.error-note p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--star);
  margin: 0;
}

.error-note a {
  color: var(--night);
  border-bottom: 1px dotted var(--night);
}

.error-note a:hover {
  color: var(--warm);
  border-bottom-style: solid;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero-card-main {
    grid-column: span 12;
  }

  .hero-card-side {
    grid-column: span 6;
  }

  .hero-card-side:nth-of-type(2),
  .hero-card-side:nth-of-type(3) {
    margin-top: 0;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 32px;
  }

  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .path-list {
    gap: 18px;
  }

  .scope-grid {
    gap: 16px;
  }
}

@media (max-width: 860px) {
  body.site-body {
    font-size: 16px;
  }

  h1,
  .page-title {
    font-size: 26px;
  }

  h2,
  .section-title {
    font-size: 20px;
  }

  .header-inner {
    min-height: 64px;
    gap: 16px;
  }

  .site-nav {
    display: flex;
    justify-content: flex-end;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-list {
    display: none;
  }

  .nav-list.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    gap: 0;
    padding: 8px 24px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 16px rgba(30, 34, 38, 0.08);
  }

  .nav-list.is-open .nav-item {
    width: 100%;
  }

  .nav-list.is-open .nav-item a {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid var(--line);
  }

  .nav-list.is-open .nav-item.is-current a {
    border-bottom-color: var(--night);
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .sidebar-left .page-layout,
  .page-layout.sidebar-left {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-layout .sidebar,
  .page-layout .side-column {
    order: 2;
  }

  .page-layout .content-column {
    order: 1;
  }

  .split-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .split-figure {
    order: -1;
  }

  .split-block .split-text {
    order: 1;
  }

  .setting-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .genre-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-item {
    border-bottom: 1px solid var(--line);
    padding: 16px 20px 16px 0;
  }

  .genre-item:nth-child(2n) {
    border-right: 0;
    padding-right: 0;
    padding-left: 20px;
  }

  .genre-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .footer-col:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .path-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .scope-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .error-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .error-code {
    font-size: 52px;
  }

  .change-item {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 6px 16px;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 18px;
  }

  .breadcrumb {
    padding: 18px 18px 0;
  }

  .page-header {
    padding: 16px 18px 6px;
  }

  .hero {
    padding: 32px 0 8px;
  }

  .hero-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .hero-card-main,
  .hero-card-side {
    grid-column: auto;
  }

  .hero-card-body,
  .hero-card-side {
    padding: 20px;
  }

  .genre-strip,
  .split-block,
  .setting-index,
  .rule-summary,
  .faq,
  .feedback-entry {
    padding-top: 40px;
  }

  .genre-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .genre-item,
  .genre-item:nth-child(2n) {
    border-right: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .genre-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .genre-item:last-child {
    border-bottom: 0;
  }

  .feedback-block {
    padding: 22px 20px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-col,
  .footer-col:nth-child(3) {
    padding-left: 0;
    border-left: 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .footer-col:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tab-item {
    flex: 0 0 auto;
  }

  .work-head {
    gap: 8px;
  }

  .work-title {
    font-size: 18px;
  }

  .change-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .change-reason {
    grid-column: 1;
  }

  .element-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .split-list li {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
  }

  .error-main {
    padding: 36px 0 56px;
  }

  .error-code {
    font-size: 44px;
  }

  .faq-question {
    font-size: 15px;
  }
}
