/* ==========================================================================
   彩娱乐主站 · 共享样式表 /assets/site.css
   夜靛底 + 奶油纸面 + 霓虹青 / 品红 / 暖金
   ========================================================================== */

/* ---------- 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, ol, ul {
  margin: 0;
  padding: 0;
}

ol, ul { list-style: none; }

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

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

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色彩 */
  --ink-night: #101A3A;
  --ink-deep: #16224A;
  --ink-line: #2A3763;
  --ink-shadow: #070C1E;
  --paper: #F4EBD8;
  --paper-shadow: #D9CBB0;
  --neon-cyan: #35E0D6;
  --magenta: #FF3D8B;
  --warm-gold: #F2B33D;
  --retro-orange: #E4572E;
  --quiet-blue: #93A3CB;
  --body-ink: #1B2233;

  /* 字体 */
  --font-display: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo, Consolas, "Courier New", monospace;

  /* 字号（1.25 模数） */
  --fs-1: 0.875rem;
  --fs-2: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-3: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --fs-4: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  --fs-5: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --fs-6: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem);
  --fs-7: clamp(3rem, 1.2rem + 7.5vw, 5.5rem);

  /* 间距 */
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 40px;
  --gap-xl: 64px;
  --gap-2xl: 96px;

  /* 结构 */
  --border-brut: 2px solid var(--ink-line);
  --border-paper: 2px solid var(--ink-line);
  --shadow-brut: 6px 6px 0 var(--ink-shadow);
  --shadow-brut-sm: 3px 3px 0 var(--ink-shadow);
  --maxw: 1400px;
  --gutter: 24px;
  --header-h: 132px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-night);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-2);
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p { max-width: 74ch; }

strong, b { font-weight: 800; }

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

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

/* ---------- 4. 排版工具类 ---------- */
.display-1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-7);
  line-height: 1.05;
  letter-spacing: 0.005em;
  color: var(--paper);
}

.display-2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-6);
  line-height: 1.1;
  color: var(--paper);
}

.section-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: var(--fs-5);
  letter-spacing: -0.02em;
  color: var(--paper);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.lead {
  font-size: var(--fs-3);
  line-height: 1.6;
  color: var(--paper);
}

.mono-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--fs-7);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--warm-gold);
}

.mono-inline {
  font-family: var(--font-mono);
  font-size: 0.94em;
  color: var(--warm-gold);
  word-break: break-all;
}

.text-quiet { color: var(--quiet-blue); }
.text-cyan { color: var(--neon-cyan); }
.text-magenta { color: var(--magenta); }
.text-gold { color: var(--warm-gold); }
.text-ink { color: var(--body-ink); }

/* ---------- 5. 布局骨架 ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--gap-2xl);
  padding-bottom: var(--gap-2xl);
}

.section--tight {
  padding-top: var(--gap-xl);
  padding-bottom: var(--gap-xl);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap-md);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--gap-lg);
  align-items: start;
}

.split--flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.split--flip > .split__aside { order: 2; }

.split__aside { min-width: 0; }
.split__main { min-width: 0; }

.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }

.full-bleed {
  grid-column: 1 / -1;
  width: 100%;
}

.stack > * + * { margin-top: var(--gap-md); }
.stack-lg > * + * { margin-top: var(--gap-lg); }

.divider {
  height: 2px;
  width: 100%;
  background: var(--ink-line);
  border: 0;
}

.divider--accent {
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--warm-gold) 52%, var(--magenta));
}

#main-content { display: block; }

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--neon-cyan);
  color: var(--ink-night);
  font-weight: 800;
  font-size: var(--fs-2);
  text-decoration: none;
  border: 2px solid var(--ink-night);
  transition: top 0.2s cubic-bezier(.2,.7,.2,1);
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- 7. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--ink-night);
  border-bottom: var(--border-brut);
}

/* 7.1 上层 */
.header-upper {
  background: var(--ink-deep);
  border-bottom: 1px solid var(--ink-line);
}

.header-upper__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  transition: padding 0.3s cubic-bezier(.2,.7,.2,1);
}

.brand-mark {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px var(--gap-sm);
  min-width: 0;
}

.brand-mark__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-3);
  line-height: 1.2;
  color: var(--paper);
  letter-spacing: 0.01em;
}

.brand-mark__motto {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  line-height: 1.6;
  color: var(--quiet-blue);
}

.header-upper__meta {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  flex-shrink: 0;
}

.issue-tag,
.pill-tag {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid;
}

.issue-tag {
  color: var(--warm-gold);
  border-color: rgba(242, 179, 61, 0.45);
}

.pill-tag {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* 7.2 下层 */
.header-lower {
  background: var(--ink-night);
}

.header-lower__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
}

.nav-index { display: block; }

.nav-index__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap-lg);
}

.nav-index__list a {
  display: block;
  padding: 15px 0;
  font-family: var(--font-sans);
  font-size: var(--fs-2);
  font-weight: 600;
  color: var(--quiet-blue);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.nav-index__list a:hover { color: var(--paper); }

.nav-index__list a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--magenta);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--ink-deep);
  border: 2px solid var(--ink-line);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  width: 18px;
  height: 12px;
}

.nav-toggle__bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--neon-cyan);
}

.nav-toggle__bars span:nth-child(2) { width: 68%; }

.nav-toggle__label { letter-spacing: 0.08em; }

/* 7.3 滚动后压缩上层 */
.site-header[data-scrolled] .header-upper__inner {
  padding-top: 8px;
  padding-bottom: 8px;
}

.site-header[data-scrolled] .brand-mark__motto {
  display: none;
}

.site-header[data-scrolled] .brand-mark__name {
  font-size: var(--fs-2);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: var(--gap-2xl);
  background: var(--ink-deep);
  border-top: var(--border-brut);
  color: var(--quiet-blue);
}

.spectrum {
  display: flex;
  gap: 2px;
  height: 6px;
  width: 100%;
}

.spectrum__seg { flex: 1 1 0; min-width: 0; }

.spectrum__seg:nth-child(1) { background: #35E0D6; }
.spectrum__seg:nth-child(2) { background: #7ED4CE; }
.spectrum__seg:nth-child(3) { background: #C9C28C; }
.spectrum__seg:nth-child(4) { background: #F2B33D; }
.spectrum__seg:nth-child(5) { background: #F28A4E; }
.spectrum__seg:nth-child(6) { background: #FF5E76; }
.spectrum__seg:nth-child(7) { background: #FF3D8B; }

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gutter) var(--gap-lg);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: var(--gap-lg);
  align-items: start;
}

.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-4);
  color: var(--paper);
  line-height: 1.2;
}

.footer-brand__sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.1em;
  color: var(--neon-cyan);
}

.footer-brand__note {
  margin-top: var(--gap-sm);
  max-width: 30ch;
  font-size: var(--fs-1);
  line-height: 1.8;
  color: var(--quiet-blue);
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-gold);
  padding-bottom: 10px;
  margin-bottom: var(--gap-sm);
  border-bottom: 2px solid var(--ink-line);
}

.footer-col__list > li + li { margin-top: 10px; }

.footer-col__list a {
  font-size: var(--fs-2);
  color: var(--quiet-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-col__list a:hover {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.footer-contact > li {
  font-size: var(--fs-1);
  line-height: 1.8;
  color: var(--quiet-blue);
}

.footer-contact > li:last-child { margin-top: 14px; }

.footer-mono {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--gap-md);
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--gap-md);
  align-items: baseline;
}

.footer-mono__item {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.04em;
  color: var(--quiet-blue);
}

.footer-mono__item b {
  font-weight: 700;
  color: var(--warm-gold);
}

.footer-legal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--gap-md) var(--gutter) var(--gap-xl);
  border-top: 1px solid var(--ink-line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--gap-lg);
  align-items: baseline;
}

.footer-legal__line {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.05em;
  color: var(--paper);
}

.footer-legal__line--quiet { color: var(--quiet-blue); }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: var(--fs-2);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  background: transparent;
  color: var(--paper);
  border: 2px solid var(--ink-line);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.2,.7,.2,1),
              box-shadow 0.18s cubic-bezier(.2,.7,.2,1),
              background-color 0.18s ease,
              color 0.18s ease,
              border-color 0.18s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-brut-sm);
}

.btn:active { transform: translate(0, 0); box-shadow: none; }

.btn--primary {
  background: var(--neon-cyan);
  color: var(--ink-night);
  border-color: var(--neon-cyan);
}

.btn--primary:hover { box-shadow: 3px 3px 0 var(--ink-line); }

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

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

.btn--ghost:hover { background: rgba(53, 224, 214, 0.1); }

.btn--small {
  padding: 8px 14px;
  font-size: var(--fs-1);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--quiet-blue);
}

.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }

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

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

.breadcrumb a:hover { border-bottom-color: var(--neon-cyan); }

/* ---------- 11. 面板 / 卡片 ---------- */
.panel {
  position: relative;
  background: var(--paper);
  color: var(--body-ink);
  border: var(--border-paper);
  box-shadow: var(--shadow-brut);
  padding: var(--gap-lg);
}

.panel--tilt { transform: rotate(-0.4deg); }
.panel--tilt-r { transform: rotate(0.5deg); }

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

.panel--deep .panel__label { color: var(--neon-cyan); }

.panel__label {
  display: inline-block;
  margin-bottom: var(--gap-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--retro-orange);
}

.panel__title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: var(--fs-4);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.panel p + p { margin-top: 12px; }

.panel a {
  color: var(--retro-orange);
  text-decoration: none;
  border-bottom: 2px solid rgba(228, 87, 46, 0.4);
}

.panel a:hover { border-bottom-color: var(--retro-orange); }

.panel--deep a {
  color: var(--neon-cyan);
  border-bottom-color: rgba(53, 224, 214, 0.4);
}

.panel--deep a:hover { border-bottom-color: var(--neon-cyan); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-md);
}

/* ---------- 12. 旁注与索引 ---------- */
.aside-note {
  border-left: 3px solid var(--retro-orange);
  padding: 6px 0 6px var(--gap-sm);
  font-size: var(--fs-1);
  line-height: 1.8;
  color: var(--quiet-blue);
}

.aside-note__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: 0.12em;
  color: var(--retro-orange);
  margin-bottom: 4px;
}

.aside-index {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--ink-line);
}

.aside-index__item {
  display: block;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--quiet-blue);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.aside-index__item:hover { color: var(--paper); }

.aside-index__item.is-active {
  color: var(--neon-cyan);
  border-left-color: var(--neon-cyan);
}

/* ---------- 13. 七档刻度条 ---------- */
.spectrum-bar {
  display: flex;
  gap: 3px;
  width: 100%;
}

.spectrum-bar__seg {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 8px;
  background: var(--ink-deep);
  border: 1px solid var(--ink-line);
  border-top: 4px solid var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--quiet-blue);
  text-align: center;
}

.spectrum-bar__seg:nth-child(1) { border-top-color: #35E0D6; }
.spectrum-bar__seg:nth-child(2) { border-top-color: #7ED4CE; }
.spectrum-bar__seg:nth-child(3) { border-top-color: #C9C28C; }
.spectrum-bar__seg:nth-child(4) { border-top-color: #F2B33D; }
.spectrum-bar__seg:nth-child(5) { border-top-color: #F28A4E; }
.spectrum-bar__seg:nth-child(6) { border-top-color: #FF5E76; }
.spectrum-bar__seg:nth-child(7) { border-top-color: #FF3D8B; }

.spectrum-bar__seg b {
  display: block;
  font-size: var(--fs-3);
  color: var(--warm-gold);
}

/* ---------- 14. 时间轴 ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline__row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--gap-sm);
  padding: 12px 14px;
  background: var(--ink-deep);
  border: 2px solid var(--ink-line);
  border-left: 4px solid var(--warm-gold);
}

.timeline__stamp {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--warm-gold);
  white-space: nowrap;
}

.timeline__bar {
  height: 10px;
  width: calc(var(--seg, 1) * 1%);
  min-width: 8px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--magenta));
}

.timeline__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--quiet-blue);
  white-space: nowrap;
}

/* ---------- 15. 手风琴 ---------- */
.faq {
  background: var(--paper);
  color: var(--body-ink);
  border: 2px solid var(--ink-line);
  box-shadow: var(--shadow-brut-sm);
}

.faq + .faq { margin-top: var(--gap-sm); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 16px 18px;
  font-weight: 800;
  font-size: var(--fs-3);
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker { display: none; }

.faq__q::after {
  content: "＋";
  flex-shrink: 0;
  font-family: var(--font-mono);
  color: var(--retro-orange);
}

.faq[open] .faq__q::after { content: "－"; color: var(--neon-cyan); }

.faq[open] { border-right: 6px solid var(--neon-cyan); }

.faq__a {
  padding: 0 18px 20px;
  font-size: var(--fs-2);
  line-height: 1.8;
}

/* ---------- 16. 纯 CSS 筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--gap-md);
}

.filter-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.filter-chip {
  display: inline-block;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--quiet-blue);
  background: var(--ink-deep);
  border: 2px solid var(--ink-line);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

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

.filter-input:checked + .filter-chip {
  color: var(--ink-night);
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.filter-input:focus-visible + .filter-chip {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.filter-view { display: none; }

/* ---------- 17. 媒体容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--ink-deep);
  border: 2px solid var(--ink-line);
  box-shadow: var(--shadow-brut-sm);
}

.media-frame > img,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
}

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

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 10px 12px;
  background: rgba(16, 26, 58, 0.88);
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  color: var(--quiet-blue);
  border-top: 2px solid var(--ink-line);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap-md);
}

/* ---------- 18. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 140;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-3);
  color: var(--ink-night);
  background: var(--warm-gold);
  border: 2px solid var(--ink-night);
  box-shadow: var(--shadow-brut-sm);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- 19. 滚动显现 ---------- */
body.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s cubic-bezier(.2,.7,.2,1),
              transform 0.42s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}

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

/* ---------- 20. 平板 ---------- */
@media (max-width: 1080px) {
  :root { --gutter: 20px; }

  .split,
  .split--flip {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gap-lg);
  }

  .split--flip > .split__aside { order: 0; }

  .span-6, .span-8 { grid-column: 1 / -1; }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap-lg) var(--gap-md);
  }

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

  .aside-index { position: static; }
}

/* ---------- 21. 手机 ---------- */
@media (max-width: 900px) {
  .header-upper__inner {
    padding-top: 14px;
    padding-bottom: 14px;
    align-items: flex-start;
  }

  .brand-mark__motto { display: none; }

  .header-lower__inner {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-self: flex-end;
    margin: 10px 0;
  }

  .nav-index { display: none; width: 100%; }

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

  .nav-index__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 10px;
  }

  .nav-index__list a {
    padding: 14px 10px;
    font-size: var(--fs-3);
    border-bottom: 1px solid var(--ink-line);
    border-left: 3px solid transparent;
    white-space: normal;
  }

  .nav-index__list a[aria-current="page"] {
    border-bottom-color: var(--ink-line);
    border-left-color: var(--magenta);
  }

  .site-header[data-scrolled] .brand-mark__name { font-size: var(--fs-2); }

  .panel { padding: var(--gap-md); }

  .spectrum-bar { flex-wrap: wrap; }

  .spectrum-bar__seg { flex: 1 1 44%; }

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

  .timeline__meta { text-align: left; }
}

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

  .section { padding-top: var(--gap-xl); padding-bottom: var(--gap-xl); }

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

  .footer-legal { padding-bottom: var(--gap-xl); }

  .to-top { right: 12px; bottom: 12px; }

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

  .spectrum-bar__seg { flex: 1 1 100%; }
}

/* ---------- 22. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .to-top { transition: none; }
}
