/* 夜行公路 — 站点样式。深色街机底 + 长文阅读区，移动端单列。 */
:root {
  --bg: #070a12;
  --bg-2: #0d1220;
  --panel: #121a2c;
  --panel-2: #18233a;
  --line: rgba(150, 180, 230, 0.16);
  --ink: #eef3ff;
  --muted: #9aa9c4;
  --faint: #6f7f9c;
  --accent: #ff6a3d;
  --accent-2: #48d9ff;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--panel); padding: 8px 14px; border-radius: 8px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* ── 顶栏 ───────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--line); background: rgba(7, 10, 18, 0.86); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--faint); letter-spacing: .12em; }
.nav { display: flex; gap: 14px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 12.5px; }
.nav a:hover { color: var(--ink); }
.tool {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 8px; padding: 5px 10px; font-size: 12px; line-height: 1.4;
}
.tool:hover { color: var(--ink); border-color: var(--accent-2); }

/* ── 首屏 ───────────────────────────────────────── */
.hero { padding: 44px 0 26px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -120px -10% auto -10%; height: 420px; pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
              radial-gradient(ellipse at 75% 10%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 60%);
}
.hero .wrap { position: relative; }
.kicker { color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 6vw, 58px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 900; }
.h1-en { font-size: 13px; letter-spacing: .3em; color: var(--faint); font-weight: 600; margin: 0 0 20px; }
.lede { font-size: clamp(15px, 2vw, 18px); color: var(--muted); max-width: 68ch; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn-primary {
  border: 0; border-radius: 10px; padding: 12px 26px; font-weight: 800; font-size: 15px; color: #08101c;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border: 1px solid var(--line); border-radius: 10px; padding: 11px 20px; color: var(--muted); background: var(--panel); font-size: 14px; }
.btn-ghost:hover { color: var(--ink); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { border: 1px solid var(--line); background: rgba(20, 30, 50, .7); border-radius: 999px; padding: 5px 13px; font-size: 12px; color: var(--muted); }
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── 游戏舞台 ───────────────────────────────────── */
.stage-wrap { margin: 10px auto 0; }
#stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: min(72vh, 700px);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #05070e; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); touch-action: none;
}
#game { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
@media (max-aspect-ratio: 3/4) { #stage { aspect-ratio: 3 / 4; max-height: 74vh; } }
.hud-bar {
  position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 6px; padding: 9px 12px;
  pointer-events: none; z-index: 5; flex-wrap: wrap;
}
.hud-cell { background: rgba(8, 12, 22, .72); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; display: flex; gap: 8px; align-items: baseline; backdrop-filter: blur(6px); }
.hud-k { font-size: 10px; color: var(--faint); letter-spacing: .08em; }
.hud-v { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.overlay { position: absolute; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(4, 7, 14, .76); backdrop-filter: blur(7px); }
.overlay.is-open { display: flex; }
.ov-card {
  width: min(560px, 100%); max-height: 100%; overflow-y: auto; text-align: center;
  background: linear-gradient(160deg, rgba(22, 32, 54, .96), rgba(10, 15, 27, .97));
  border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.ov-card[data-tone="good"] { border-color: color-mix(in srgb, var(--accent-2) 55%, transparent); }
.ov-card[data-tone="bad"] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.ov-tag { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0 0 8px; }
.ov-title { font-size: clamp(24px, 4vw, 36px); margin: 0 0 10px; font-weight: 900; letter-spacing: -.01em; }
.ov-text { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.ov-list { text-align: left; margin: 0 auto 16px; padding-left: 20px; color: var(--muted); font-size: 13px; max-width: 42ch; }
.ov-list li { margin: 4px 0; }
.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0 0 18px; }
.ov-stat { background: rgba(8, 12, 22, .6); border: 1px solid var(--line); border-radius: 9px; padding: 8px 6px; }
.ov-stat dt { font-size: 10px; color: var(--faint); }
.ov-stat dd { margin: 2px 0 0; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ov-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ov-btn { border-radius: 9px; padding: 10px 20px; font-weight: 700; font-size: 14px; border: 1px solid var(--line); }
.ov-btn.is-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #08101c; border: 0; }
.ov-btn.is-ghost { background: transparent; color: var(--muted); }
.ov-btn:hover { filter: brightness(1.15); }
.ov-foot { font-size: 11px; color: var(--faint); margin: 16px 0 0; }
.toast-box, .flash-box { position: absolute; inset: 0; pointer-events: none; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 56px; gap: 6px; }
.flash-box { justify-content: center; padding-top: 0; }
.toast { background: rgba(10, 16, 30, .9); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 12px; animation: fade .3s ease both; }
.flash { font-size: clamp(20px, 4vw, 40px); font-weight: 900; letter-spacing: .1em; text-shadow: 0 0 24px currentColor; animation: pop .8s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.7); } 25% { opacity: 1; transform: scale(1.06); } 100% { opacity: 0; transform: scale(1.2); } }
.stage-tools { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 2px 0; }
.stage-tools p { margin: 0; font-size: 11.5px; color: var(--faint); }
.stage-tools .mini { display: flex; gap: 6px; }

/* ── 长文 ───────────────────────────────────────── */
.article { padding: 56px 0 20px; }
.article h2 { font-size: clamp(19px, 2.6vw, 25px); margin: 44px 0 14px; letter-spacing: -.01em; }
.article h2:first-child { margin-top: 0; }
.article p { color: var(--muted); font-size: 15px; line-height: 1.9; margin: 0 0 14px; }
.article ul { color: var(--muted); font-size: 14.5px; line-height: 1.85; padding-left: 22px; }
.article li { margin: 6px 0; }
.article strong { color: var(--ink); }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 22px 0 10px; }
.fact { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 12px 14px; }
.fact dt { font-size: 11px; color: var(--faint); letter-spacing: .06em; }
.fact dd { margin: 4px 0 0; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fig { margin: 26px 0; }
.fig img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.fig figcaption { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--faint); }
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0; }
.fig-pair .fig { margin: 0; }
@media (max-width: 720px) { .fig-pair { grid-template-columns: 1fr; } }
.qa { border-top: 1px solid var(--line); }
.qa-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.qa-item dt { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.qa-item dd { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin: 18px 0; }
.ctrl { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: var(--panel); }
kbd { font: 700 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 7px; color: var(--ink); white-space: nowrap; }
.ctrl span { font-size: 13px; color: var(--muted); }
.cta-band { margin: 46px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--panel)), var(--panel)); text-align: center; }
.cta-band h2 { margin: 0 0 8px; font-size: 22px; }
.cta-band p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

/* ── 页脚 ───────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 30px 0 44px; }
.footer .cols { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
.footer h3 { font-size: 12px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; margin: 0 0 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.footer li { font-size: 12.5px; }
.footer a { color: var(--muted); }
.footer .fine { color: var(--faint); font-size: 11.5px; margin: 22px 0 0; }
@media (max-width: 640px) {
  .hero { padding-top: 28px; }
  .nav { gap: 10px; }
  .nav a[data-optional] { display: none; }
  .article { padding-top: 38px; }
  .ov-card { padding: 20px 16px; }
}
