/* ============================================================
   SE 棋牌电玩 · /assets/site.css
   共享外壳：reset、变量、中文排版、头部轨道、顶部批次条、页脚账本、
   通用按钮、面包屑、容器、网格、卡片、标签、折叠、图片容器、基础动效
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --ink: #0A1F1A;
  --ink-deep: #071612;
  --panel: #102E26;
  --panel-2: #0D2721;
  --line: #245446;
  --line-soft: rgba(36, 84, 70, 0.5);
  --paper: #F3F7F4;
  --mist: #A9C4B8;
  --cyan: #37E2C6;
  --cyan-deep: #1FA894;
  --amber: #F3A93C;
  --amber-soft: #FFD28A;
  --violet: #8C7CF2;
  --coral: #E2684F;

  --rail-w: 72px;
  --top-h: 56px;
  --gutter: 24px;
  --maxw: 1440px;

  --font-display: "Archivo Narrow", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-fold: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

ul, ol { padding: 0; }
ul[class], ol[class] { list-style: none; }

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

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

button { background: none; border: 0; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }

[hidden] { display: none !important; }

::selection { background: var(--cyan); color: var(--ink); }

/* ---------- 基础排版 ---------- */
body {
  margin: 0;
  padding-top: var(--top-h);
  padding-left: var(--rail-w);
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 90% at 88% -12%, rgba(55, 226, 198, 0.10), transparent 62%),
    radial-gradient(90% 80% at -12% 104%, rgba(140, 124, 242, 0.08), transparent 62%),
    repeating-linear-gradient(180deg, rgba(243, 247, 244, 0.018) 0 1px, transparent 1px 4px);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { display: block; }

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

h1 { font-size: clamp(30px, 4.4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); }

p { max-width: 68ch; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

#main-content:focus { outline: none; }

/* ---------- 工具类 ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.lede {
  font-size: 17px;
  line-height: 1.8;
  color: var(--mist);
  max-width: 46ch;
}

.muted { color: var(--mist); }

.is-hidden { display: none !important; }

.rule {
  height: 10px;
  border: 0;
  margin: 0;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 9px);
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

.section { padding-block: clamp(40px, 6vw, 80px); }

/* ---------- 网格与分屏 ---------- */
.grid { display: grid; gap: var(--gutter); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.split { display: grid; gap: 0; }
.split--38 { grid-template-columns: 38fr 62fr; }
.split--28 { grid-template-columns: 28fr 72fr; }
.split--30 { grid-template-columns: 30fr 70fr; }
.split--45 { grid-template-columns: 45fr 55fr; }
.split--24 { grid-template-columns: 24fr 76fr; }

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink-deep);
  transform: translateY(-200%);
  transition: transform 160ms var(--ease);
}

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

/* ---------- 头部：竖向轨道 ---------- */
.site-header { position: relative; z-index: 80; }

.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--rail-w);
  z-index: 90;
  display: flex;
  flex-direction: column;
  background-color: var(--ink-deep);
  background-image: repeating-linear-gradient(180deg, rgba(55, 226, 198, 0.05) 0 1px, transparent 1px 7px);
  border-inline-end: 2px solid var(--line);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px 12px;
  border-bottom: 2px solid var(--line);
  text-decoration: none;
  color: var(--paper);
  transition: background 120ms var(--ease);
}

.rail-brand:hover { background: rgba(55, 226, 198, 0.07); }

.rail-brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 3px 3px 0 rgba(55, 226, 198, 0.16);
}

.rail-brand-line {
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  color: var(--mist);
  letter-spacing: 0.02em;
  max-width: 62px;
}

.rail-nav { flex: 1 1 auto; padding-block: 4px; }

.rail-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-item { margin: 0; }

.rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 4px;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  transition: color 120ms var(--ease), background 120ms var(--ease);
}

.rail-link:hover {
  color: var(--cyan);
  background: rgba(55, 226, 198, 0.08);
}

.rail-link:focus-visible { outline-offset: -3px; }

.rail-num {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: rgba(169, 196, 184, 0.74);
  transition: color 120ms var(--ease);
}

.rail-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.rail-link[aria-current="page"] {
  color: var(--paper);
  background: rgba(55, 226, 198, 0.12);
}

.rail-link[aria-current="page"] .rail-num { color: var(--amber); }

.rail-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: var(--cyan);
}

.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 4px 18px;
  border-top: 2px solid var(--line);
}

.rail-dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(55, 226, 198, 0.18);
  animation: rail-pulse 3s var(--ease) infinite;
}

.rail-foot-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: rgba(169, 196, 184, 0.8);
}

@keyframes rail-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- 头部：顶部批次条 ---------- */
.topbar {
  position: fixed;
  top: 0;
  inset-inline-start: var(--rail-w);
  inset-inline-end: 0;
  height: var(--top-h);
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: clamp(12px, 2vw, 24px);
  background: rgba(10, 31, 26, 0.94);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 2px solid var(--line);
}

.batch {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 5px 10px;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
}

.batch-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(243, 169, 60, 0.16);
  animation: rail-pulse 3s var(--ease) infinite;
}

.batch-key { color: var(--amber-soft); }

.batch-code {
  color: var(--paper);
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-state {
  padding-inline-start: 9px;
  border-inline-start: 1px solid var(--line);
  color: rgba(169, 196, 184, 0.8);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 2px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms var(--ease), color 120ms var(--ease),
              border-color 120ms var(--ease), transform 120ms var(--ease),
              box-shadow 120ms var(--ease);
}

.btn:hover { border-color: var(--cyan); color: var(--cyan); }

.btn:active { transform: translate(2px, 2px); }

.btn-entry {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(31, 168, 148, 0.35);
}

.btn-entry:hover {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(243, 169, 60, 0.4);
  transform: translate(2px, 2px);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--mist);
  background: var(--panel-2);
}

.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan-deep); }

.btn-amber {
  border-color: rgba(243, 169, 60, 0.7);
  color: var(--amber-soft);
  background: rgba(243, 169, 60, 0.12);
}

.btn-amber:hover { border-color: var(--amber); color: var(--ink); background: var(--amber); }

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 2px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 120ms var(--ease), color 120ms var(--ease), background 120ms var(--ease);
}

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

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

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 220ms var(--ease), opacity 120ms var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-toggle-label { line-height: 1; }

/* ---------- 遮罩 ---------- */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 88;
  background: rgba(7, 22, 18, 0.74);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: var(--top-h);
  inset-inline-start: var(--rail-w);
  inset-inline-end: 0;
  height: 3px;
  z-index: 86;
  background: rgba(36, 84, 70, 0.55);
  pointer-events: none;
}

.scroll-progress::after {
  content: "";
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  transition: transform 100ms linear;
}

/* ---------- 页脚账本 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  border-top: 2px solid var(--line);
  background-image: linear-gradient(180deg, rgba(16, 46, 38, 0.92), rgba(7, 22, 18, 1));
  color: var(--mist);
  font-size: 14px;
}

.foot-tape {
  height: 9px;
  border-bottom: 2px solid var(--line);
  background-image: repeating-linear-gradient(90deg, rgba(243, 169, 60, 0.85) 0 6px, transparent 6px 15px);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr 1.7fr;
  align-items: start;
  border-bottom: 1px solid var(--line-soft);
}

.foot-grid > * {
  min-width: 0;
  padding: 36px clamp(16px, 2vw, 26px);
  border-inline-start: 1px solid var(--line-soft);
}

.foot-grid > *:first-child { border-inline-start: 0; }

.foot-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}

.foot-mark-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 4px 4px 0 rgba(55, 226, 198, 0.16);
}

.foot-mark-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.foot-line {
  margin-top: 18px;
  max-width: 24ch;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.75;
}

.foot-note {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(169, 196, 184, 0.75);
}

.foot-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.foot-col-list,
.foot-contact-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-link {
  display: inline-block;
  padding-block: 2px;
  color: var(--mist);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 120ms var(--ease), border-color 120ms var(--ease);
}

.foot-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.copy-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--paper);
  text-align: start;
  cursor: pointer;
  transition: border-color 120ms var(--ease), background 120ms var(--ease);
}

.copy-line:hover { border-color: var(--cyan); background: rgba(55, 226, 198, 0.09); }

.copy-line-key {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--mist);
}

.copy-line-value {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.copy-line-hint {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--amber);
  white-space: nowrap;
  transition: color 120ms var(--ease);
}

.copy-line[data-copied="true"] { border-color: var(--cyan); }
.copy-line[data-copied="true"] .copy-line-hint { color: var(--cyan); }

.foot-service {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(169, 196, 184, 0.85);
  max-width: none;
}

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 18px clamp(16px, 4vw, 48px) 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(169, 196, 184, 0.8);
}

.foot-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-legal-link {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 120ms var(--ease), border-color 120ms var(--ease);
}

.foot-legal-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.foot-icp { color: rgba(169, 196, 184, 0.72); }

.foot-copy {
  margin-inline-start: auto;
  color: rgba(169, 196, 184, 0.6);
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--mist);
}

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

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

.crumbs a { color: var(--mist); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 编号章节 ---------- */
.chapter {
  display: flex;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 22px);
  margin-bottom: clamp(16px, 2.4vw, 28px);
}

.chapter-num {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
}

@supports not (-webkit-text-stroke: 1px #000) {
  .chapter-num { color: var(--line); }
}

.chapter-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.chapter-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--amber);
}

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(16px, 2.2vw, 24px);
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 8px 8px 0 rgba(7, 22, 18, 0.5);
  transition: border-color 120ms var(--ease), transform 120ms var(--ease),
              box-shadow 120ms var(--ease), opacity 220ms var(--ease);
}

.card:hover {
  border-color: var(--cyan-deep);
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 rgba(7, 22, 18, 0.55);
}

.card-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--paper);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.card-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--mist);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: rgba(16, 46, 38, 0.72);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.tag--batch { border-color: rgba(243, 169, 60, 0.6); color: var(--amber-soft); background: rgba(243, 169, 60, 0.12); }
.tag--cyan { border-color: rgba(55, 226, 198, 0.55); color: var(--cyan); background: rgba(55, 226, 198, 0.1); }
.tag--violet { border-color: rgba(140, 124, 242, 0.55); color: #BFB6FA; background: rgba(140, 124, 242, 0.14); }
.tag--coral { border-color: rgba(226, 104, 79, 0.6); color: #F0A08D; background: rgba(226, 104, 79, 0.12); }

/* ---------- 筛选按钮 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--mist);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 120ms var(--ease), border-color 120ms var(--ease),
              background 120ms var(--ease), box-shadow 120ms var(--ease);
}

.chip:hover { color: var(--paper); border-color: var(--cyan-deep); }

.chip[aria-pressed="true"] {
  color: var(--paper);
  border-color: var(--cyan);
  background: rgba(55, 226, 198, 0.14);
  box-shadow: inset 0 0 0 1px rgba(55, 226, 198, 0.4);
}

.chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
}

.chip[aria-pressed="true"] .chip-count { color: var(--cyan); }

/* ---------- 折叠 ---------- */
.fold {
  border: 2px solid var(--line);
  background: var(--panel-2);
}

.fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  transition: color 120ms var(--ease), background 120ms var(--ease);
}

.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { color: var(--cyan); background: rgba(55, 226, 198, 0.06); }

.fold > summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  color: var(--cyan);
}

.fold[open] > summary::after { content: "\2212"; }

.fold-body {
  padding: 0 16px 16px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--mist);
}

/* ---------- 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--panel-2);
  isolation: isolate;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(10, 31, 26, 0) 42%, rgba(10, 31, 26, 0.55) 100%),
    repeating-linear-gradient(180deg, rgba(55, 226, 198, 0.06) 0 1px, transparent 1px 4px);
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--21x9 { aspect-ratio: 21 / 9; }

.media-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(169, 196, 184, 0.62);
  background-image: repeating-linear-gradient(45deg, rgba(36, 84, 70, 0.35) 0 1px, transparent 1px 10px);
}

.media-cap {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--mist);
}

/* ---------- 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 380ms var(--ease), transform 380ms var(--ease);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1120px) {
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand,
  .foot-contact { grid-column: 1 / -1; border-inline-start: 0; }
  .foot-brand { border-bottom: 1px solid var(--line-soft); }
  .foot-contact { border-top: 1px solid var(--line-soft); }
  .foot-grid > *:nth-child(2) { border-inline-start: 0; }
}

@media (max-width: 900px) {
  :root { --rail-w: 0px; }

  body {
    padding-left: 0;
    background-attachment: scroll;
  }

  .topbar { inset-inline-start: 0; }

  .scroll-progress { inset-inline-start: 0; }

  .rail {
    width: 282px;
    max-width: 84vw;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 380ms var(--ease), visibility 380ms var(--ease);
    border-inline-end: 2px solid var(--cyan-deep);
    box-shadow: 16px 0 0 rgba(7, 22, 18, 0.35);
  }

  .rail[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  html[data-nav-open="true"] { overflow: hidden; }

  .rail-brand {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 16px;
  }

  .rail-brand-line {
    max-width: none;
    font-size: 12px;
    text-align: start;
  }

  .rail-link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .rail-num { font-size: 11px; }

  .rail-text {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 15px;
    letter-spacing: 0.02em;
  }

  .rail-link[aria-current="page"]::after {
    top: 0;
    bottom: 0;
    inset-inline-end: auto;
    inset-inline-start: 0;
    width: 4px;
  }

  .rail-foot {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 18px 16px 26px;
  }

  .rail-foot-text {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: 0.08em;
  }

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

  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }

  .split--38, .split--28, .split--30, .split--45, .split--24 {
    grid-template-columns: 1fr;
  }

  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid > * { padding: 28px 18px; }
  .foot-grid > *:nth-child(2),
  .foot-grid > *:nth-child(3) { border-inline-start: 0; }
}

@media (max-width: 720px) {
  .batch-state { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-grid > * { border-inline-start: 0; }
  .foot-grid > * + * { border-top: 1px solid var(--line-soft); }
  .foot-copy { margin-inline-start: 0; }
  .btn { padding: 10px 13px; font-size: 13px; }
}

@media (max-width: 520px) {
  .batch-key { display: none; }
  .batch { font-size: 10px; padding: 5px 8px; gap: 7px; }
  .nav-toggle-label { display: none; }
  .topbar-actions { gap: 8px; }
}

/* ---------- 动效与可访问性偏好 ---------- */
@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;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

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

  .scroll-progress::after { transition: none; }
}

@media print {
  .rail, .topbar, .scroll-progress, .skip-link, .nav-toggle { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
}
