/* ==========================================================================
   家乐棋牌 · /assets/site.css
   共享外壳：reset / 设计变量 / 中文排版 / 头部 / 页脚 /
   通用按钮 / 面包屑 / 容器与栅格 / 基础组件 / 响应式
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ol, ul, fieldset {
  margin: 0;
  padding: 0;
}

ol, ul {
  list-style: none;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ---------- 设计变量 ---------- */
:root {
  /* 品牌色 */
  --shu-red: #C4362C;
  --shu-red-deep: #8C1F19;
  --bamboo: #2E6B58;
  --bamboo-soft: #7FA694;
  --paper-warm: #F6EFE1;
  --paper-white: #FFFBF3;
  --ink: #1B1917;
  --gold: #C08B32;
  --gold-deep: #8A6115;
  --grey-bamboo: #5C6A61;
  --line: #DCD3C4;

  /* 字体 */
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "Inter", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 尺度 */
  --w-max: 1200px;
  --w-prose: 760px;
  --gutter: 24px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 72px;

  /* 形状与材质 */
  --radius: 4px;
  --shadow-1: 0 1px 0 rgba(27, 25, 23, 0.06);
  --shadow-2: 0 6px 18px rgba(27, 25, 23, 0.10);
  --cut: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
}

/* ---------- 中文排版与底色 ---------- */
body {
  background-color: var(--paper-warm);
  background-image:
    linear-gradient(to right, rgba(220, 211, 196, 0.42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(220, 211, 196, 0.42) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

h1 { font-size: clamp(28px, 4.6vw, 64px); }
h2 { font-size: clamp(22px, 2.6vw, 40px); }
h3 { font-size: clamp(18px, 1.7vw, 28px); }
h4 { font-size: 18px; letter-spacing: 0; }

p {
  max-width: 38em;
}

::selection {
  background: var(--shu-red);
  color: var(--paper-white);
}

:where(h2, h3, h4, [id]) {
  scroll-margin-top: 104px;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: var(--gutter);
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper-white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transform: translateY(-130%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- 容器 ---------- */
.container,
.header-inner,
.footer-inner {
  width: 100%;
  max-width: calc(var(--w-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--prose {
  max-width: calc(var(--w-prose) + var(--gutter) * 2);
}

.section {
  padding-block: var(--s4);
}

.section + .section {
  padding-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s2);
  margin-bottom: var(--s3);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bamboo);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--shu-red);
}

.rail-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--grey-bamboo);
}

/* ---------- 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 251, 243, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(27, 25, 23, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--shu-red), var(--gold));
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: transform 120ms linear;
  pointer-events: none;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-block: 12px;
}

/* 品牌 */
.brand {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 7px;
  background: var(--ink);
  border-radius: 3px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background-color 160ms var(--ease);
}

.brand-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--paper-warm);
}

.brand-pip:nth-child(1) {
  background: var(--shu-red);
}

.brand-pip:nth-child(4) {
  background: var(--gold);
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  background: var(--shu-red-deep);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.brand-tagline {
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--grey-bamboo);
}

/* 导航 */
.site-nav {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 0;
  margin: 0;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 140ms var(--ease), background-color 140ms var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--bamboo-soft);
  transition: color 140ms var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--shu-red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--shu-red-deep);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--shu-red);
  font-weight: 600;
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--shu-red-deep);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* 右侧行动区 */
.header-side {
  order: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--shu-red);
  color: var(--paper-white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 3px;
  clip-path: var(--cut);
  transition: background-color 140ms var(--ease), transform 140ms var(--ease);
}

.header-cta::after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
}

.header-cta:hover,
.header-cta:focus-visible {
  background: var(--shu-red-deep);
  transform: translateY(-1px);
}

.live-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--grey-bamboo);
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bamboo);
  box-shadow: 0 0 0 3px rgba(46, 107, 88, 0.16);
}

.live-label {
  font-size: 12px;
}

.live-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.live-unit {
  font-size: 12px;
}

/* 移动导航按钮 */
.nav-toggle {
  order: 4;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}

.nav-toggle:hover {
  border-color: var(--shu-red);
}

.nav-toggle-bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform 160ms var(--ease), opacity 140ms var(--ease);
}

.site-header[data-open] .nav-toggle {
  border-color: var(--shu-red);
  background: rgba(196, 54, 44, 0.06);
}

.site-header[data-open] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.site-header[data-open] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.site-header[data-open] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ---------- 站点页脚 ---------- */
.site-footer {
  margin-top: var(--s5);
  background: var(--ink);
  color: var(--paper-warm);
  border-top: 3px solid var(--shu-red);
}

.footer-inner {
  padding-block: 56px 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.5fr) minmax(280px, 1.2fr);
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper-white);
}

.footer-logo-mark {
  width: 22px;
  height: 22px;
  background:
    linear-gradient(var(--shu-red), var(--shu-red)) left top / 9px 9px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 9px 9px no-repeat,
    linear-gradient(var(--bamboo-soft), var(--bamboo-soft)) right top / 9px 9px no-repeat,
    linear-gradient(var(--paper-warm), var(--paper-warm)) left bottom / 9px 9px no-repeat;
  border-radius: 2px;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.footer-motto {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--bamboo-soft);
}

.footer-meta {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(246, 239, 225, 0.6);
  max-width: 26em;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col {
  min-width: 0;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--bamboo-soft);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(220, 211, 196, 0.2);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  position: relative;
  display: inline-block;
  font-size: 15px;
  line-height: 1.5;
  color: var(--paper-warm);
  text-decoration: none;
  padding-left: 0;
  transition: color 140ms var(--ease), padding-left 140ms var(--ease);
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateY(-50%);
  transition: width 140ms var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--gold);
  padding-left: 14px;
}

.footer-link:hover::before,
.footer-link:focus-visible::before {
  width: 8px;
}

.footer-contact {
  min-width: 0;
  padding: 18px 20px;
  background: rgba(246, 239, 225, 0.05);
  border: 1px solid rgba(220, 211, 196, 0.18);
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(220, 211, 196, 0.18);
}

.contact-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--bamboo-soft);
}

.contact-value {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  color: var(--paper-white);
  word-break: break-word;
}

.copy-btn {
  flex: 0 0 auto;
  padding: 3px 9px;
  background: transparent;
  border: 1px solid rgba(192, 139, 50, 0.55);
  border-radius: 2px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background: var(--gold);
  color: var(--ink);
}

.copy-btn[data-copy-state="done"] {
  background: var(--bamboo);
  border-color: var(--bamboo);
  color: var(--paper-white);
}

.copy-btn[data-copy-state="fail"] {
  background: var(--shu-red);
  border-color: var(--shu-red);
  color: var(--paper-white);
}

.footer-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(246, 239, 225, 0.58);
  max-width: 34em;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(220, 211, 196, 0.18);
  font-size: 12.5px;
  color: rgba(246, 239, 225, 0.62);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-legal-link {
  color: rgba(246, 239, 225, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(220, 211, 196, 0.3);
  padding-bottom: 1px;
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}

.footer-icp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  max-width: none;
}

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

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease),
              border-color 150ms var(--ease), transform 150ms var(--ease);
}

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

.btn--primary {
  background: var(--shu-red);
  border-color: var(--shu-red);
  color: var(--paper-white);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--shu-red-deep);
  border-color: var(--shu-red-deep);
}

.btn--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-white);
}

.btn--ink:hover,
.btn--ink:focus-visible {
  background: var(--bamboo);
  border-color: var(--bamboo);
}

.btn--ghost {
  background: transparent;
  border-color: var(--bamboo);
  color: var(--bamboo);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--bamboo);
  color: var(--paper-white);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s3);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--grey-bamboo);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumbs a {
  color: var(--grey-bamboo);
  text-decoration: none;
  transition: color 140ms var(--ease);
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--shu-red);
  text-decoration: underline;
}

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

/* ---------- 面板与卡片 ---------- */
.panel {
  position: relative;
  padding: var(--s3);
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.panel--cut {
  clip-path: var(--cut);
}

.panel--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-warm);
}

.panel--red {
  background: var(--shu-red);
  border-color: var(--shu-red);
  color: var(--paper-white);
}

.panel--bamboo {
  background: var(--bamboo);
  border-color: var(--bamboo);
  color: var(--paper-white);
}

.panel--lift {
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}

.panel--lift:hover,
.panel--lift:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--bamboo-soft);
}

/* ---------- Bento 栅格 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--s2);
}

.bento-item {
  grid-column: span 2;
  min-width: 0;
}

.bento-item--wide {
  grid-column: span 3;
}

.bento-item--tall {
  grid-row: span 2;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--grey-bamboo);
  white-space: nowrap;
}

.tag--red {
  background: rgba(196, 54, 44, 0.07);
  border-color: rgba(196, 54, 44, 0.32);
  color: var(--shu-red-deep);
}

.tag--bamboo {
  background: rgba(46, 107, 88, 0.08);
  border-color: rgba(46, 107, 88, 0.3);
  color: var(--bamboo);
}

.tag--gold {
  background: rgba(192, 139, 50, 0.14);
  border-color: rgba(192, 139, 50, 0.45);
  color: var(--gold-deep);
}

/* ---------- 筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: var(--s2);
}

.filter-btn {
  padding: 7px 14px;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--grey-bamboo);
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease),
              border-color 150ms var(--ease);
}

.filter-btn:hover {
  border-color: var(--bamboo-soft);
  color: var(--bamboo);
}

.filter-btn[aria-pressed="true"] {
  background: var(--bamboo);
  border-color: var(--bamboo);
  color: var(--paper-white);
}

.filter-status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey-bamboo);
  max-width: none;
}

[data-filter-item][data-filtered-out] {
  display: none !important;
}

/* ---------- 数据与目录 ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--bamboo);
}

.stat-label {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--grey-bamboo);
}

.toc {
  padding: var(--s2) var(--s3);
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--shu-red);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--bamboo);
  margin-bottom: 10px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-link {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey-bamboo);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}

.toc-link:hover,
.toc-link:focus-visible,
.toc-link[aria-current="true"] {
  color: var(--shu-red-deep);
  border-color: var(--shu-red);
}

/* ---------- 正文 ---------- */
.prose {
  max-width: var(--w-prose);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose p {
  max-width: 36em;
}

.prose h2 {
  margin-top: 1.8em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.prose h3 {
  margin-top: 1.5em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  max-width: 36em;
}

.prose ul {
  list-style: square;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose strong {
  color: var(--shu-red-deep);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(220, 211, 196, 0.4);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ---------- 图片容器基础规则 ---------- */
.media {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.media--wide {
  aspect-ratio: 16 / 9;
}

.media--tall {
  aspect-ratio: 3 / 4;
}

.media--square {
  aspect-ratio: 1 / 1;
}

.media--grid {
  background-image:
    linear-gradient(to right, rgba(220, 211, 196, 0.7) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(220, 211, 196, 0.7) 1px, transparent 1px);
  background-size: 32px 32px;
}

.media-caption {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--grey-bamboo);
  max-width: none;
}

/* ---------- 显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 360ms var(--ease), transform 360ms var(--ease);
}

html.js [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式：头部 ---------- */
@media (max-width: 1119px) {
  .site-nav {
    order: 5;
    flex: 1 1 100%;
    justify-content: flex-start;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 220ms var(--ease), opacity 160ms var(--ease);
  }

  .site-header[data-open] .site-nav {
    max-height: 560px;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding-block: 4px;
  }

  .nav-link {
    padding: 11px 8px;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-item:last-child .nav-link {
    border-bottom: 0;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    background: rgba(196, 54, 44, 0.07);
    box-shadow: inset 3px 0 0 var(--shu-red);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-side {
    margin-left: auto;
  }
}

@media (max-width: 899px) {
  .brand-tagline {
    display: none;
  }

  .live-label {
    display: none;
  }
}

@media (max-width: 599px) {
  .live-bar {
    display: none;
  }

  .brand-name {
    font-size: 18px;
  }

  .header-cta {
    padding: 8px 12px;
    font-size: 13px;
  }

  .header-cta::after {
    display: none;
  }
}

/* ---------- 响应式：页脚与栅格 ---------- */
@media (max-width: 1023px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

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

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

  .bento-item,
  .bento-item--wide,
  .bento-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .bento-item--wide {
    grid-column: span 2;
  }
}

@media (max-width: 679px) {
  .footer-inner {
    padding-block: 40px 24px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .footer-bottom {
    justify-content: flex-start;
  }

  .section {
    padding-block: 32px;
  }
}

@media (max-width: 479px) {
  body {
    font-size: 16px;
  }

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

  .bento-item--wide {
    grid-column: span 1;
  }

  .filter-status {
    margin-left: 0;
    width: 100%;
  }
}

/* ---------- 动效降级 ---------- */
@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;
  }

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

  .btn:hover,
  .panel--lift:hover,
  .panel--lift:focus-within,
  .header-cta:hover {
    transform: none;
  }
}
