:root {
  --paper: #f7f4ef;
  --paper-2: #ece6dc;
  --ink: #1d2230;
  --ink-2: #4a5163;
  --muted: #858a96;
  --rule: #dcd5c8;
  --flame: #d4572a;
  --night: #16213a;
  --ok: #2f8f4e;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 17px/1.75 var(--sans); }
#app { max-width: 1240px; margin: 0 auto; padding: 0 32px 40px; }
section, footer { margin-top: 76px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 900; letter-spacing: .5px; color: var(--ink); }
h2 { font-size: 34px; margin: 0 0 10px; }
.lead { max-width: 780px; color: var(--ink-2); margin: 0 0 22px; }
.hint { color: var(--muted); font-size: 14px; }
.fatal { color: #a33; padding: 20px; }
button { font: 600 15px/1 var(--sans); color: var(--ink); background: transparent; border: 1.5px solid var(--ink); border-radius: 6px; padding: 10px 18px; cursor: pointer; }
button.primary { background: var(--ink); color: var(--paper); }
button:hover:not(:disabled) { background: var(--flame); border-color: var(--flame); color: #fff; }
a { color: var(--ink); text-decoration-color: var(--flame); text-underline-offset: 3px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.num { font-variant-numeric: tabular-nums; }

/* 开头：整屏深色舞台 */
.stage { width: 100vw; margin: 0 calc(50% - 50vw); background: #0b1120; color: #e8ecf4; padding: 0 0 26px; }
.stage-in { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.hero { padding: 44px 0 22px; }
.kicker { margin: 0; font-size: 14px; color: #8f9bb5; letter-spacing: 2px; }
.hero h1 { font-size: 48px; line-height: 1.3; margin: 8px 0 10px; color: #fff; }
.answer { font-size: 20px; line-height: 1.6; margin: 0; max-width: 980px; color: #b9c2d6; }
.answer b { color: #fff; }
.stage .frame { position: relative; width: 100%; height: min(56.25vw, calc(100vh - 90px)); background: #05060a; }
.stage .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .frame:fullscreen { height: 100vh; }
.frame .loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa4bf; font-size: 15px; pointer-events: none; }
.bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 0 6px; }
.bar select { font: 15px var(--sans); padding: 9px 10px; border-radius: 6px; border: 1px solid #3a4560; background: #141c30; color: #e8ecf4; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; padding: 6px 12px; border: 1px solid #3a4560; border-radius: 999px; cursor: pointer; user-select: none; }
.chip input { display: none; }
.chip:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 28%, transparent); color: #fff; }
.chip small { color: #8f9bb5; }
.chip.base { border-style: dashed; }
.stage button { color: #e8ecf4; border-color: #e8ecf4; }
.stage button.primary { background: #e8ecf4; color: #0b1120; }
.stage .hint { color: #8f9bb5; margin: 6px 0 4px; max-width: 980px; }
.verdicts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 22px; margin-top: 12px; font-size: 15px; }
.verdicts > div { display: flex; gap: 8px; align-items: baseline; }
.verdicts .tag { font-weight: 700; white-space: nowrap; filter: brightness(1.35); }
.verdicts .why { color: #8f9bb5; font-size: 13px; line-height: 1.5; }
.below { margin-top: 34px; }
.stats { display: flex; gap: 44px; flex-wrap: wrap; border-top: 2px solid var(--ink); padding-top: 14px; }
.stats div small { display: block; font-size: 13px; color: var(--muted); }
.stats div strong { font: 900 32px/1.25 var(--serif); }

/* 规则 */
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rule { background: var(--paper-2); border-radius: 8px; padding: 16px 18px 18px; }
.rule b { display: block; font-family: var(--serif); font-size: 19px; margin-bottom: 4px; }
.rule p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.rule svg { width: 100%; height: auto; display: block; margin-bottom: 8px; }
.rule table { width: 100%; font-size: 14px; border-collapse: collapse; }
.rule td { padding: 2px 0; border-bottom: 1px solid var(--rule); }
.rule td:last-child { text-align: right; font-weight: 600; }

/* 排行榜 */
.table-wrap { overflow-x: auto; }
table.rank { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 900px; }
table.rank th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; border-bottom: 2px solid var(--ink); padding: 8px 10px; white-space: nowrap; }
table.rank td { border-bottom: 1px solid var(--rule); padding: 12px 10px; vertical-align: middle; }
table.rank td.r { font: 900 22px var(--serif); width: 48px; }
table.rank .name { display: flex; align-items: center; gap: 10px; }
table.rank .name b { font-size: 16px; }
table.rank .name small { display: block; color: var(--muted); font-size: 13px; }
table.rank .big { font: 900 22px var(--serif); }
table.rank tr.base td { color: var(--ink-2); background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,.025) 8px 16px); }
table.rank tr.base td.r { font: 13px var(--sans); color: var(--muted); }
table.rank tr.sep td { padding: 18px 10px 6px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--rule); }
.pbar { position: relative; width: 120px; height: 8px; background: var(--paper-2); border-radius: 4px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.pbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c, var(--ink)); }
.obar { display: flex; height: 16px; width: 220px; border-radius: 3px; overflow: hidden; }
.obar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin: 12px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

/* 逐场矩阵 */
.matrix { border-collapse: separate; border-spacing: 3px; font-size: 13px; }
.matrix th { font-weight: 600; color: var(--muted); padding: 2px; }
.matrix th.col { cursor: pointer; white-space: nowrap; }
.matrix th.col:hover { color: var(--flame); }
.matrix th.col small { display: block; font-weight: 400; font-size: 11px; }
.matrix th.row { text-align: left; color: var(--ink); white-space: nowrap; padding-right: 10px; }
.matrix th.row .name { display: flex; align-items: center; gap: 8px; }
.matrix tr.base th.row { color: var(--ink-2); font-weight: 400; }
.matrix td { width: 40px; height: 34px; text-align: center; border-radius: 4px; color: #fff; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.matrix td:hover { outline: 2px solid var(--ink); }
.matrix td.light { color: var(--ink); }
.tip { position: fixed; z-index: 20; max-width: 340px; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.55; padding: 8px 11px; border-radius: 6px; pointer-events: none; }
.tip[hidden] { display: none; }

/* 过程曲线 */
.curve svg { width: 100%; height: auto; display: block; }
.curve svg text { font-family: var(--sans); }
.curve .series { cursor: pointer; }
.curve .series.dim { opacity: .15; }

/* 各家做法 */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card { border-top: 4px solid var(--c); padding-top: 14px; }
.card header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card h3 { font-size: 26px; margin: 0; }
.card .who { color: var(--muted); font-size: 14px; }
.card .score { margin-left: auto; font: 900 26px var(--serif); }
.card .score small { font: 400 13px var(--sans); color: var(--muted); margin-left: 6px; }
.card p { margin: 10px 0; color: var(--ink-2); }
.card .pending { color: var(--muted); font-style: italic; }
.guess { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.guess > div { background: var(--paper-2); border-radius: 8px; padding: 12px 14px; font-size: 15px; }
.guess small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.guess blockquote { margin: 0; font-family: var(--serif); }
.facts { font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 18px; }
.facts a { white-space: nowrap; }
.note { font-size: 14px; color: #8a4b1c; background: #f6e7d6; border-radius: 6px; padding: 8px 12px; margin: 10px 0; }

/* 怎么测的 */
.method { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 44px; color: var(--ink-2); font-size: 16px; }
.method p { margin: 0 0 10px; }
footer .sign { margin-top: 30px; padding-top: 14px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; flex-wrap: wrap; gap: 10px; }

@media (max-width: 900px) {
  #app { padding: 0 18px 30px; }
  .hero h1 { font-size: 36px; }
  .cards, .method, .guess { grid-template-columns: 1fr; }
  .stage-in { padding: 0 18px; }
  .rule-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 新增：成片播放、检查条、矩阵格子、图注（过山车 / 天坛结果页共用） ---------- */
.stage .film-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.stage .film-box { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #05060a; border-radius: 10px; overflow: hidden; }
.stage .film-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #05060a; }
.stage .film-box video[hidden] { display: none; }
.stage .bar .chips { flex-wrap: wrap; }
.stage .chip { cursor: pointer; }

.check-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px; }
.check-pill { background: var(--paper-2); border-radius: 8px; padding: 10px 12px; border-left: 3px solid var(--rule); }
.check-pill b { display: block; font-size: 14px; font-weight: 600; }
.check-pill small { color: var(--muted); font-size: 12px; }
.check-pill.ok { border-left-color: var(--ok); }
.check-pill.bad { border-left-color: #c4522a; }

table.rank.metrics td.num, table.rank.metrics th { white-space: nowrap; }
.baseline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 18px; }
.baseline > div { background: repeating-linear-gradient(135deg, #fff 0 10px, #f8f5f0 10px 20px); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 16px; }
.baseline p { margin: 4px 0 0; }

.matrix td.cell { width: 46px; height: 34px; text-align: center; font-weight: 700; border-radius: 4px; border-collapse: separate; }
.matrix td.cell.pass { background: #e6f2e9; color: var(--ok); }
.matrix td.cell.fail { background: #fbe4da; color: #b8421f; }
.matrix td.cell.skip { background: #f1eee9; color: #b0aaa0; }

.watch { background: var(--paper-2); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.watch small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.watch ul { margin: 0; padding-left: 18px; }
.watch li { margin: 4px 0; font-size: 15px; color: var(--ink-2); }
.film-fig, .card-fig { margin: 16px 0 10px; }
.film-fig video { width: 100%; border-radius: 8px; background: #05060a; display: block; }
.card-fig img { width: 100%; border-radius: 8px; display: block; border: 1px solid var(--rule); }
figcaption { margin-top: 6px; }

/* 天坛：截图九宫格 */
.shots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.shots button { padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.shots span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; color: #fff; background: rgba(10, 15, 29, .7); border-radius: 4px; padding: 1px 6px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(8, 10, 16, .92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox p { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #cfd6e4; font-size: 14px; }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; margin: 12px 0; }
.item { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: baseline; font-size: 15px; }
.item .mk { font-weight: 900; }
.item .mk.ok { color: var(--ok); }
.item .mk.no { color: #b8421f; }
.item b { display: block; font-size: 15px; }
.item span { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
@media (max-width: 900px) {
  .check-strip, .shots { grid-template-columns: repeat(2, 1fr); }
  .baseline { grid-template-columns: 1fr; }
  .items { grid-template-columns: 1fr; }
  .stage .film-wrap { padding: 0 18px; }
}

/* 天坛：两家并排的同机位截图 */
.shot-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 6px 0 26px; }
.shot-pair figure, .cmp figure { margin: 0; }
.stage .shot-pair figure { background: #0d1420; border-radius: 10px; overflow: hidden; border-top: 3px solid var(--c); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.zoom .missing, .shots .missing { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; color: #77808f; font-size: 13px; background: #141c28; }
.shot-pair figcaption { padding: 10px 12px; color: #cdd4e2; font-size: 14px; }
.shot-pair figcaption b { color: #fff; }
.shot-pair figcaption small { display: block; color: #8f9bb5; font-size: 12px; }

.cmp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.cmp-tab { font: 600 14px var(--sans); padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--rule); background: #fff; cursor: pointer; }
.cmp-tab[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cmp { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cmp figure { border-top: 3px solid var(--c); padding-top: 10px; }
.cmp .zoom img { border-radius: 8px; border: 1px solid var(--rule); }
.cmp figcaption { margin-top: 8px; }
.cmp figcaption b { font-size: 16px; }
.cmp figcaption small { display: block; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .shot-pair, .cmp { grid-template-columns: 1fr; } }

/* ---------- 静态正文（构建注入，B2）：无 JS、数据失败时也要能读 ---------- */
.site-crumbs { max-width: 1240px; margin: 0 auto; padding: 18px 32px 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.site-crumbs a { color: var(--ink-2); text-decoration: none; }
.site-crumbs a:hover { color: var(--flame, var(--sunset, var(--ink))); text-decoration: underline; }
.site-crumbs .sep { color: var(--rule); }
.static-body { max-width: 1240px; margin: 0 auto; padding: 14px 32px 8px; }
.static-body h1 { font-size: 40px; line-height: 1.3; margin: 12px 0 10px; }
.static-body h2 { font-size: 26px; margin: 30px 0 10px; }
.static-q, .static-answer { font-size: 19px; line-height: 1.65; color: var(--ink-2); margin: 0 0 10px; max-width: 860px; }
.static-answer { color: var(--ink); }
.static-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 10px; }
.static-rank, .static-checks { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
.static-rank { min-width: 520px; }
.static-checks { min-width: 700px; }
.static-rank th, .static-rank td { border-bottom: 1px solid var(--rule); padding: 9px 10px; text-align: left; }
.static-rank th { font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.static-rank td.r { font: 900 20px var(--serif); width: 52px; }
.static-rank td.big { font: 900 20px var(--serif); white-space: nowrap; }
.static-checks th, .static-checks td { border-bottom: 1px solid var(--rule); padding: 6px 8px; text-align: center; }
.static-checks th.col { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.static-checks th.col small { display: block; font-weight: 400; font-size: 11px; }
.static-checks th.row { text-align: left; white-space: nowrap; font-size: 14px; }
.static-checks td.pass { color: var(--ok, #2f8f4e); }
.static-checks td.fail { color: #b8421f; }
.static-checks td.skip { color: var(--muted); }
.static-entry { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 16px; max-width: 900px; }
.static-entry h3 { font-size: 21px; margin: 0 0 4px; }
.static-entry h3 small { display: block; font: 400 13px var(--sans); color: var(--muted); margin-top: 2px; }
.static-entry p { margin: 8px 0; color: var(--ink-2); }
.static-note { background: var(--paper-2); border-radius: 6px; padding: 8px 12px; }
.static-fair { padding-left: 20px; max-width: 860px; color: var(--ink-2); }
.static-fair li { margin: 6px 0; }
.static-sign { color: var(--muted); font-size: 14px; margin-top: 14px; }
@media (max-width: 900px) {
  .site-crumbs { padding: 14px 18px 0; }
  .static-body { padding: 12px 18px 6px; }
  .static-body h1 { font-size: 30px; }
  .static-body h2 { font-size: 22px; margin-top: 26px; }
  .static-q, .static-answer { font-size: 17px; }
}
