/* 世一泽拉斯 deck — one committed dark look (Shurima night: lapis ground, arcane cyan, sun-disc gold). */
:root {
  color-scheme: dark;
  --void: #0a0f1c;
  --slate: #121a2b;
  --slate-2: #1a2438;
  --line: #2a3650;
  --arcane: #56c8f5;
  --arcane-dim: #2b6f8f;
  --sand: #c9a45c;
  --sand-dim: #7d6639;
  --bone: #ebe5d6;
  --dust: #939aab;
  --ember: #e5533d;
  --ok: #5bc98a;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--void); color: var(--bone); font: 400 22px/1.55 var(--sans);
  overflow: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- stage ---------- */
.stage { position: fixed; left: 50%; top: calc(50% - 28px); width: 1600px; height: 900px; transform-origin: 50% 50%; }
.slide {
  position: absolute; inset: 0; padding: 64px 88px 56px; display: none; flex-direction: column; gap: 26px;
  background: radial-gradient(1200px 700px at 85% -10%, #16223a 0%, transparent 60%), var(--void);
  overflow: hidden; border: 1px solid #172035;
}
.slide.active { display: flex; }
.slide > .bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.slide > :not(.bg) { position: relative; z-index: 1; }

.eyebrow { display: flex; gap: 14px; align-items: center; font: 600 15px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sand); }
.eyebrow .tag { color: var(--dust); border: 1px solid var(--line); padding: 6px 10px; letter-spacing: .06em; text-transform: none; font-weight: 500; }
h1, h2, h3 { font-family: var(--serif); margin: 0; text-wrap: balance; font-weight: 900; }
h1 { font-size: 104px; line-height: 1.02; letter-spacing: -.01em; }
h2 { font-size: 54px; line-height: 1.15; }
h3 { font-size: 30px; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
.lede { font-size: 26px; color: var(--dust); max-width: 36em; }
.hl { color: var(--arcane); }
.gold { color: var(--sand); }
.enemy { color: var(--ember); }
.good { color: var(--ok); }
.muted { color: var(--dust); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
b, strong { font-weight: 700; color: #fff; }

.grow { flex: 1; min-height: 0; }
.row { display: flex; gap: 28px; }
.col { display: flex; flex-direction: column; gap: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.split { display: grid; grid-template-columns: 1.08fr .92fr; gap: 44px; align-items: start; }

/* ---------- entrance ---------- */
.enter .rise { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.enter .rise:nth-child(2) { animation-delay: .08s; }
.enter .rise:nth-child(3) { animation-delay: .16s; }
.enter .rise:nth-child(4) { animation-delay: .24s; }
.enter .rise:nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { transform: translateY(18px); opacity: .001; } }
[data-step] { transition: opacity .45s ease, transform .45s ease, filter .45s; }
[data-step]:not(.shown) { opacity: .08; transform: translateY(10px); filter: saturate(.2); }

/* ---------- pieces ---------- */
.panel { background: var(--slate); border: 1px solid var(--line); padding: 22px 26px; }
.rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rule-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: baseline; }
.rule-list li::before { content: "◆"; color: var(--sand); font-size: 18px; text-align: center; }
.rule-list li.warn::before { content: "✕"; color: var(--ember); }
.rule-list li.yes::before { content: "✓"; color: var(--ok); }

.icon { width: 64px; height: 64px; display: block; border: 2px solid var(--sand-dim); box-shadow: 0 0 0 1px #000 inset; }
.icon.sm { width: 44px; height: 44px; }
.icon.lg { width: 92px; height: 92px; }
.icon.round { border-radius: 50%; }
.key {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; font: 700 16px/1 var(--mono);
  color: var(--void); background: var(--sand); vertical-align: middle;
}
.icon-wrap { position: relative; flex: none; }
.icon-wrap .key { position: absolute; right: -8px; bottom: -8px; }

.quote { border-left: 3px solid var(--arcane); padding: 6px 0 6px 22px; font-family: var(--serif); font-size: 27px; line-height: 1.5; }
.quote cite { display: block; margin-top: 8px; font: 500 15px/1.4 var(--mono); color: var(--dust); font-style: normal; }

.clip { position: relative; background: #000; border: 1px solid var(--line); }
.clip video { display: block; width: 100%; height: auto; }
.clip figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font: 500 15px/1.4 var(--mono); color: var(--dust); background: var(--slate); border-top: 1px solid var(--line); }
.clip figcaption b { color: var(--bone); font-family: var(--sans); }
figure { margin: 0; }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .n { font: 700 46px/1 var(--mono); color: var(--arcane); font-variant-numeric: tabular-nums; }
.stat .l { font-size: 17px; color: var(--dust); }

table.nums { border-collapse: collapse; font-size: 19px; width: 100%; }
table.nums th, table.nums td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.nums th { font: 600 14px/1.2 var(--mono); letter-spacing: .08em; color: var(--sand); text-transform: uppercase; }
table.nums td.mono { color: var(--arcane); }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--line); font-size: 17px; color: var(--bone); background: var(--slate-2); }
.chip img { width: 26px; height: 26px; }

/* ---------- chrome ---------- */
.chrome {
  position: fixed; left: 0; right: 0; bottom: 0; height: 56px; display: flex; align-items: center; gap: 18px;
  padding: 0 20px env(safe-area-inset-bottom, 0px); background: #070b15; border-top: 1px solid #1b2438; z-index: 10;
  font: 500 14px/1 var(--mono); color: var(--dust);
}
.chrome button { background: none; border: 1px solid var(--line); color: var(--bone); height: 34px; min-width: 40px; font: inherit; cursor: pointer; }
.chrome button:hover, .chrome button:focus-visible { border-color: var(--sand); color: var(--sand); outline: none; }
.progress { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sand), var(--arcane)); transition: width .4s; }
.toc { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.toc a { color: var(--dust); text-decoration: none; padding: 6px 10px; white-space: nowrap; font-family: var(--sans); font-size: 14px; }
.toc a.on { color: var(--void); background: var(--sand); }
.section-label { color: var(--sand); white-space: nowrap; }
.counter { color: var(--bone); }

/* overview grid */
body.overview { overflow: auto; }
body.overview .stage { position: static; transform: none !important; width: auto; height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding: 20px 20px 80px; }
body.overview .slide { display: flex; position: relative; width: 1600px; height: 900px; transform: scale(.2); transform-origin: 0 0; margin: 0 -1280px -720px 0; cursor: pointer; }
body.overview .slide.active { outline: 6px solid var(--sand); }
body.overview [data-step] { opacity: 1; transform: none; filter: none; }

/* phone / narrow: vertical scroll, everything shown */
body.scroll-mode { overflow: auto; padding-inline: 16px; }
body.scroll-mode .stage { position: static; transform: none; width: 100%; height: auto; display: flex; flex-direction: column; gap: 16px; padding-block: 16px 80px; }
body.scroll-mode .slide { display: flex; position: relative; height: auto; padding: 28px 18px; gap: 18px; }
body.scroll-mode h1 { font-size: 46px; }
body.scroll-mode h2 { font-size: 30px; }
body.scroll-mode h3 { font-size: 21px; }
body.scroll-mode .lede, body.scroll-mode .quote { font-size: 18px; }
body.scroll-mode { font-size: 16px; }
body.scroll-mode .grid2, body.scroll-mode .grid3, body.scroll-mode .split { grid-template-columns: 1fr; gap: 18px; }
body.scroll-mode .row { flex-wrap: wrap; }
body.scroll-mode [data-step] { opacity: 1; transform: none; filter: none; }
body.scroll-mode .toc, body.scroll-mode .nav-grid { display: none; }
body.scroll-mode svg { max-width: 100%; height: auto; }

body.reduced *, body.reduced *::before, body.reduced *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
