/* ============================================================
   金沙服务 / river-of-gold-jinsha.com.cn
   共享站点样式：reset、变量、中文排版、页头页脚、通用组件
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  line-height: 1.75;
  color: var(--ink-green);
  background-color: var(--sand-white);
  background-image: repeating-linear-gradient(
    118deg,
    rgba(15, 61, 62, 0.026) 0 1px,
    transparent 1px 8px
  );
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ---------- 变量 ---------- */
:root {
  --gold: #c9a227;
  --ink: #0f3d3e;
  --sand: #f5efe6;
  --river: #2e6f95;
  --gold-light: #e8d48b;
  --river-green: #2f5d5c;
  --sand-deep: #e6dccb;
  --deep: #08282a;
  --gray-bed: #6f7f78;
  --ochre: #b65c3a;

  --paper: #fbf7f0;
  --rule: 1px solid rgba(15, 61, 62, 0.16);
  --rule-strong: 1px solid rgba(15, 61, 62, 0.28);

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-sans: "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1200px;
  --shell-wide: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --stack: clamp(1.5rem, 3vw, 2.5rem);
  --nav-break: 820px;
}

/* ---------- 基础排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--deep);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--river);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--ink);
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: 1.25em;
}

hr {
  border: 0;
  border-top: var(--rule);
  margin: clamp(2rem, 5vw, 3.5rem) 0;
}

::selection {
  background: var(--gold-light);
  color: var(--deep);
}

/* ---------- 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--river);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-footer :focus-visible,
.surface--deep :focus-visible {
  outline-color: var(--gold-light);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -140%);
  display: inline-block;
  padding: 0.65rem 1.2rem;
  background: var(--deep);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: 0 0 3px 3px;
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  color: var(--gold-light);
}

/* ============================================================
   页头：印刷装订框
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 239, 230, 0.96);
  border-bottom: 1px solid rgba(15, 61, 62, 0.22);
  box-shadow: 0 1px 0 rgba(201, 162, 39, 0.28);
  backdrop-filter: saturate(140%) blur(6px);
}

.header-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding: clamp(0.7rem, 1.6vw, 1.05rem) var(--gutter);
}

.header-brand {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--deep);
}

.brand-mark:hover {
  color: var(--deep);
}

.brand-seal {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--gold);
  background:
    radial-gradient(circle at 28% 18%, rgba(201, 162, 39, 0.3), transparent 68%),
    var(--ink);
  border: 1px solid var(--gold);
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px rgba(245, 239, 230, 0.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--deep);
}

.brand-tagline {
  font-size: 0.74rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--gray-bed);
}

.header-meta {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.6rem);
}

.header-hours {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  white-space: nowrap;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-bed);
}

/* 导航：框架的横向装订线 */
.site-nav {
  border-top: 1px solid rgba(15, 61, 62, 0.12);
  background:
    linear-gradient(180deg, rgba(230, 220, 203, 0.34), rgba(245, 239, 230, 0)),
    rgba(245, 239, 230, 0.96);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.1rem;
  width: 100%;
  max-width: var(--shell-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
}

.nav-list li {
  display: flex;
}

.nav-list a {
  display: block;
  padding: 0.78rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.nav-list a:hover {
  color: var(--deep);
  background: rgba(201, 162, 39, 0.1);
}

.nav-list a[aria-current="page"] {
  color: var(--deep);
  border-bottom-color: var(--gold);
  background: linear-gradient(180deg, transparent 55%, rgba(201, 162, 39, 0.22));
}

/* 移动导航按钮 */
.nav-toggle {
  grid-column: 2;
  grid-row: 1;
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(15, 61, 62, 0.35);
  border-radius: 2px;
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(201, 162, 39, 0.14);
  border-color: var(--gold);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.site-header[data-open] .nav-toggle-bars {
  background: transparent;
}

.site-header[data-open] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.site-header[data-open] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* 河线进度 */
.river-progress {
  height: 2px;
  background: rgba(15, 61, 62, 0.1);
  overflow: hidden;
}

.river-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--river) 0%, var(--river-green) 45%, var(--gold) 100%);
}

/* ============================================================
   页脚：河床沉积层
   ============================================================ */
.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  background:
    linear-gradient(180deg, #0b2f31 0%, #08282a 62%, #061f21 100%);
  color: rgba(245, 239, 230, 0.86);
  border-top: 2px solid var(--gold);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.35fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.4rem, 5vw, 4rem) var(--gutter) clamp(2rem, 4vw, 3rem);
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--sand);
  margin-bottom: 1rem;
}

.footer-brand-link:hover {
  color: var(--gold-light);
}

.brand-seal--footer {
  width: 2.4rem;
  height: 2.4rem;
  font-size: 0.72rem;
  background:
    radial-gradient(circle at 28% 18%, rgba(201, 162, 39, 0.4), transparent 68%),
    #0b2f31;
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.07em;
  color: var(--sand);
}

.footer-summary {
  margin: 0;
  max-width: 32ch;
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(245, 239, 230, 0.66);
}

.footer-heading {
  margin: 0 0 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  font-size: 0.92rem;
  color: rgba(245, 239, 230, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-links a:hover {
  color: var(--gold-light);
  border-bottom-color: rgba(232, 212, 139, 0.55);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  line-height: 1.65;
  color: rgba(245, 239, 230, 0.78);
  word-break: break-word;
}

.footer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 212, 139, 0.7);
}

.footer-note {
  margin: 0.95rem 0 0;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(245, 239, 230, 0.52);
}

.footer-base {
  border-top: 1px solid rgba(232, 212, 139, 0.18);
  background: rgba(0, 0, 0, 0.24);
}

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.75rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1rem var(--gutter);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(245, 239, 230, 0.58);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal a {
  color: rgba(245, 239, 230, 0.74);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 212, 139, 0.32);
  padding-bottom: 1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-legal a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

.footer-copy,
.footer-icp {
  margin: 0;
}

/* ============================================================
   通用布局与组件
   ============================================================ */
.container,
.container-wide,
.container-narrow {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container { max-width: var(--shell); }
.container-wide { max-width: var(--shell-wide); }
.container-narrow { max-width: 68ch; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* 纸张与沉积块面 */
.paper {
  background: var(--paper);
  border: var(--rule);
  padding: clamp(1.15rem, 2.4vw, 1.9rem);
}

.paper--stack {
  box-shadow:
    6px 6px 0 -1px var(--sand-deep),
    6px 6px 0 0 rgba(15, 61, 62, 0.12);
}

.surface {
  background: var(--paper);
  border: var(--rule);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.surface--deep {
  background:
    radial-gradient(circle at 88% 8%, rgba(201, 162, 39, 0.22), transparent 60%),
    var(--ink);
  border-color: rgba(232, 212, 139, 0.28);
  color: rgba(245, 239, 230, 0.9);
}

.surface--deep h2,
.surface--deep h3,
.surface--deep h4 {
  color: var(--sand);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-gold {
  background: var(--gold);
  color: var(--deep);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--deep);
}

.btn-blue {
  background: var(--river);
  color: #ffffff;
  border-color: var(--river);
}

.btn-blue:hover {
  background: #245a79;
  border-color: #245a79;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(15, 61, 62, 0.45);
}

.btn-outline:hover {
  background: rgba(201, 162, 39, 0.14);
  border-color: var(--gold);
  color: var(--deep);
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.84rem;
}

/* 标签与版本号 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
}

.tag--gold {
  background: var(--gold-light);
  color: var(--ink);
  border-color: rgba(201, 162, 39, 0.7);
}

.tag--blue {
  background: var(--river);
  color: #ffffff;
  border-color: var(--river);
}

.tag--outline {
  background: transparent;
  color: var(--river-green);
  border-color: rgba(47, 93, 92, 0.5);
}

/* 面包屑 */
.breadcrumb {
  padding-block: clamp(1rem, 2vw, 1.5rem);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--gray-bed);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: rgba(111, 127, 120, 0.55);
}

.breadcrumb a {
  color: var(--river);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  border-bottom-color: currentColor;
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
}

/* 章节索引（配合 data-index-link） */
.index-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid rgba(15, 61, 62, 0.14);
}

.index-list a {
  display: block;
  margin-left: -2px;
  padding: 0.5rem 0.4rem 0.5rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--river-green);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.index-list a:hover {
  color: var(--deep);
  background: rgba(201, 162, 39, 0.1);
}

.index-list a.is-active,
.index-list a[aria-current="true"] {
  color: var(--deep);
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.18), transparent);
}

/* 图片容器基础 */
.media {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(165deg, var(--sand-deep) 0%, #d9cdb8 100%);
  border: var(--rule);
}

.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.28);
}

.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gray-bed);
}

/* 刊物化文字组件 */
.display-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.01em;
  color: var(--deep);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1.2;
  color: var(--deep);
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.lede {
  font-size: clamp(1.02rem, 1rem + 0.3vw, 1.18rem);
  line-height: 1.8;
  color: var(--river-green);
}

.aside-note {
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--ink);
  background: rgba(232, 212, 139, 0.32);
  border-left: 3px solid var(--gold);
}

.aside-note--alert {
  background: rgba(182, 92, 58, 0.12);
  border-left-color: var(--ochre);
}

/* 卡片浮现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 回流按钮（由 JS 注入） */
.to-top {
  position: fixed;
  right: clamp(0.9rem, 2.5vw, 1.6rem);
  bottom: clamp(0.9rem, 2.5vw, 1.6rem);
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--deep);
  background: var(--gold);
  border: 1px solid rgba(8, 40, 42, 0.25);
  border-radius: 2px;
  box-shadow: 0 2px 0 rgba(15, 61, 62, 0.2);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.to-top:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.to-top[hidden] {
  display: none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  }

  .footer-contact {
    grid-column: 1 / -1;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(232, 212, 139, 0.16);
  }

  .footer-summary {
    max-width: none;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 7rem;
  }

  .header-frame {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem 1rem;
    padding: 0.8rem var(--gutter);
  }

  .header-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .header-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    padding-top: 0.7rem;
    border-top: 1px dashed rgba(15, 61, 62, 0.22);
  }

  .header-hours {
    flex-direction: row;
    align-items: baseline;
    gap: 0.45rem;
    font-size: 0.76rem;
  }

  .brand-tagline {
    display: none;
  }

  .site-nav {
    display: none;
    border-top: 1px solid rgba(15, 61, 62, 0.18);
    background: #f2ebdf;
  }

  .site-header[data-open] .site-nav {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 0.25rem var(--gutter) 0.9rem;
  }

  .nav-list li {
    display: block;
    border-bottom: 1px solid rgba(15, 61, 62, 0.1);
  }

  .nav-list a {
    padding: 0.9rem 0.25rem;
    font-size: 0.86rem;
    border-bottom: 2px solid transparent;
  }

  .nav-list a[aria-current="page"] {
    background: none;
    border-bottom-color: var(--gold);
    padding-left: 0.6rem;
  }

  .grid-12 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .span-4,
  .span-5,
  .span-7,
  .span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }

  .footer-base-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

@media (max-width: 560px) {
  .grid-12 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-4,
  .span-5,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 2;
  }

  .footer-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-navgroup {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(232, 212, 139, 0.14);
  }

  .brand-seal {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.74rem;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .to-top {
    right: 0.8rem;
    bottom: 0.8rem;
    padding: 0.55rem 0.75rem;
  }
}

/* ============================================================
   动效偏好与打印
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .to-top:hover {
    transform: none;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .to-top,
  .river-progress,
  .nav-toggle {
    display: none !important;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }

  .paper,
  .surface {
    border: 1px solid #999999;
    box-shadow: none;
    break-inside: avoid;
  }
}
