/* GENESIS v5 — dark cinematic "living world", interactive playground.
 *
 * One visual language, top to bottom: near-black night (#07080D),
 * warm town light, Monad violet (#836EF9) for interaction, gold (#E8B34B)
 * for the headline, green only for a verified on-chain fact, amber only
 * for honest pending state. Serif display headline + mono for hashes.
 * Pure static files, no build step.
 */
:root {
  --bg: #07080d;
  --bg2: #0b0e18;
  --surface: #10141f;
  --surface2: #151a29;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f2f3f7;
  --muted: #a7adc0;
  --dim: #6b7280;
  --accent: #836ef9;
  --accent2: #5b55e8;
  --gold: #e8b34b;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.12);
  --ease: cubic-bezier(.3, .8, .3, 1);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --serif: Georgia, "Songti SC", "Noto Serif SC", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .85em; background: rgba(255,255,255,.08); padding: 2px 7px; border-radius: 6px; }
.mono { font-family: var(--mono); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
.num, .hud-stat b, .kpi-num, .sim-day, .price, .ws b, .donut-center span { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; background: rgba(7, 8, 13, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); z-index: 20; }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 20px; }
.brand { font-weight: 800; letter-spacing: .14em; text-decoration: none; font-size: 17px; }
.brand-mark { color: var(--accent); }
.brand-sub { font-size: 12px; color: var(--dim); letter-spacing: .08em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .25s ease; }
.nav-links a:hover { color: var(--text); }
.nav-note { font-size: 13px; color: var(--dim); white-space: nowrap; }

/* ---------- hero slice: one sentence + one button ---------- */
.hero-slice { position: relative; background: radial-gradient(1100px 480px at 50% -8%, rgba(131,110,249,.20), transparent 62%), radial-gradient(800px 380px at 82% 0%, rgba(232,179,75,.10), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.hero-slice-inner { max-width: 980px; margin: 0 auto; padding: 84px 32px 72px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--accent); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 2s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.hero-slice h1 { font-family: var(--serif); font-size: clamp(40px, 5.4vw, 68px); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; margin: 20px 0 14px; }
.hero-slice h1 em { font-style: normal; color: var(--gold); }
.hero-en { font-family: var(--mono); font-size: 15px; letter-spacing: .04em; color: var(--muted); }
.hero-note { margin-top: 10px; font-size: 15px; color: var(--muted); }
.hero-note::before { content: "— "; color: var(--dim); }
.hero-actions { display: flex; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.btn-hero { font-size: 17px; padding: 16px 32px; }
.hero-run-hint { font-size: 14px; color: var(--muted); max-width: 640px; }
.btn { cursor: pointer; border: none; border-radius: 999px; padding: 13px 26px; font-size: 15px; font-weight: 600; text-decoration: none; display: inline-block; transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .25s var(--ease); font-family: var(--sans); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-play { background: var(--accent); color: #fff; box-shadow: 0 8px 32px rgba(131, 110, 249, .45); }
.btn-play:hover { background: #9a86ff; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #9a86ff; }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: rgba(255,255,255,.55); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* digest panel (revealed by hero button) */
.digest-panel { margin-top: 28px; background: linear-gradient(180deg, rgba(52,211,153,.06), transparent 60%), var(--surface); border: 1px solid rgba(52,211,153,.35); border-radius: 14px; padding: 24px 26px; }
.digest-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.digest-label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--dim); font-weight: 700; }
.digest-full { font-size: 14px; word-break: break-all; margin: 14px 0; color: var(--text); }
.digest-panel-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; font-size: 14px; color: var(--muted); }
.digest-panel-note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.digest-panel-note a { color: var(--green); }

/* anchored proof card */
.proof-card { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; }
.proof-card-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.proof-chain { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.proof-rows { margin-top: 6px; }
.proof-row { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.proof-row > span:first-child { color: var(--muted); width: 110px; flex-shrink: 0; font-size: 13px; }
.proof-row .mono { word-break: break-all; font-size: 13.5px; }
.proof-hash { color: var(--green); text-decoration: none; }
.proof-hash:hover { text-decoration: underline; }
.proof-dim { color: var(--dim); font-size: 12.5px; }
.proof-card-note { color: var(--muted); font-size: 13.5px; margin-top: 16px; }
.cast-box { margin-top: 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.cast-label { font-size: 11px; letter-spacing: .14em; color: var(--dim); font-weight: 700; margin-bottom: 10px; }
.cast-cmd { display: block; font-size: 13px; line-height: 1.7; word-break: break-all; color: var(--text); }
.cast-box .btn { margin-top: 12px; }

/* strip */
.strip { border-bottom: 1px solid var(--line); background: var(--bg2); }
.strip-inner { max-width: 1280px; margin: 0 auto; padding: 18px 32px; display: flex; gap: 28px; flex-wrap: wrap; }
.strip-item { font-size: 14px; color: var(--muted); }
.strip-item b { color: var(--text); font-family: var(--mono); font-size: 15px; margin-right: 4px; }
.strip-item-ok b { color: var(--green); }

/* ---------- sections ---------- */
.section { max-width: 1280px; margin: 0 auto; padding: 104px 32px 0; }
.section + .section { padding-top: 88px; }
.section-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(28px, 3.2vw, 42px); font-weight: 700; }
.section-head > p { color: var(--muted); font-size: 15px; margin: 10px 0 28px; max-width: 680px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h3 { font-size: 16px; margin-bottom: 16px; }
.badge { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }

/* ---------- playground ---------- */
.pg-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px 32px; }
.pg-controls { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 18px; align-items: end; }
.ctl { display: grid; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ctl-val { color: var(--gold); font-family: var(--mono); font-weight: 700; }
.ctl input[type="number"] { width: 100%; background: var(--bg2); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: var(--text); font-family: var(--mono); font-size: 16px; padding: 9px 12px; }
.ctl input[type="number"]:focus { outline: none; border-color: var(--accent); }
.ctl input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; }
.pg-buttons { display: flex; gap: 10px; }
.pg-status { margin-top: 18px; font-size: 13.5px; color: var(--muted); font-family: var(--mono); }
.pg-rerun { margin-top: 8px; font-size: 14px; min-height: 1.4em; }
.pg-rerun.ok { color: var(--green); }
.pg-rerun.bad { color: var(--red); }
.callout { margin-top: 16px; border-radius: 10px; padding: 14px 18px; font-size: 14.5px; background: rgba(131,110,249,.10); border: 1px solid rgba(131,110,249,.4); color: var(--text); }
.callout b { color: var(--gold); }
.callout-dead { background: var(--red-soft); border-color: rgba(248,113,113,.45); }
.callout-dead b { color: var(--red); }
.pg-panel .kpi-grid { margin-top: 24px; }
.pg-digest { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.digest-value { font-size: 13px; word-break: break-all; flex: 1; min-width: 280px; }
.pg-anchor-line { margin-top: 14px; font-size: 14px; color: var(--muted); }
.pg-anchor-line a { color: var(--green); }
.pg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 28px; }
.chart-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
#gini-chart { width: 100%; height: auto; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 8px; }
.chart-note { color: var(--dim); font-size: 12.5px; margin-top: 10px; }
.table-scroll { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.table-scroll .table th { position: sticky; top: 0; background: var(--surface2); z-index: 1; }

/* ---------- compare ---------- */
.compare-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px; }
.compare-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.compare-note { color: var(--muted); font-size: 14px; margin: 16px 0; }
.compare-table { margin-top: 4px; }

/* ---------- anchor your world ---------- */
.anchor-panel { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.anchor-left, .anchor-right { padding: 28px; }
.anchor-right { background: var(--bg2); border-left: 1px solid var(--line); }
.anchor-label { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.anchor-note { color: var(--muted); font-size: 13.5px; margin: 16px 0 20px; }
.anchor-note a { color: var(--green); }
.anchor-steps { display: grid; gap: 12px; }
.anchor-step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.anchor-step b { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.anchor-step.done { color: var(--text); }
.anchor-step.done b { background: var(--green-soft); color: var(--green); }
.anchor-step a { color: var(--green); }
.explorer-box { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.explorer-label { font-size: 11px; letter-spacing: .14em; color: var(--dim); font-weight: 700; }

/* ---------- town ---------- */
.town-wrap { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #0a0f1e; }
#town { display: block; width: 100%; height: auto; }
.town-hud { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 14px 20px; background: var(--surface); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.town-hud b { color: var(--gold); }
.town-hud .btn { margin-left: auto; }

/* ---------- proof (live transfer detail) ---------- */
.proof-panel { background: linear-gradient(180deg, rgba(52,211,153,.07), transparent 55%), var(--surface); border: 1px solid rgba(52,211,153,.35); border-radius: 14px; padding: 28px; }
.proof-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.proof-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
.proof-main .proof-row > span:first-child { width: 84px; }
.proof-balances h3 { margin-bottom: 8px; }
.proof-note { color: var(--muted); font-size: 13px; margin: 12px 0 18px; }
.proof-balances .btn { width: 100%; text-align: center; }

/* digest line / repro */
.digest-line { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.verify-line { color: var(--muted); font-size: 13.5px; margin-top: 18px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { padding: 24px 24px 24px 0; border-right: 1px solid var(--line); }
.kpi:nth-child(4n) { border-right: none; }
.kpi:nth-child(n+5) { border-top: 1px solid var(--line); padding-top: 24px; }
.kpi-num { font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; word-break: break-all; }
.kpi-num small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi-label { font-size: 13px; margin-top: 6px; font-weight: 600; }
.kpi-sub { color: var(--dim); font-size: 12px; margin-top: 2px; }

/* market */
.market-list { border-top: 1px solid var(--line); }
.market-row { display: grid; grid-template-columns: 44px 1fr 180px 1fr; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.res-icon { width: 40px; height: 40px; border-radius: 8px; background: rgba(131,110,249,.16); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }
.market-row h3 { font-size: 18px; }
.res-en { color: var(--dim); font-size: 11px; letter-spacing: .14em; margin-top: 2px; }
.price { font-size: 32px; font-weight: 700; font-family: var(--mono); }
.price small { font-size: 13px; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.bar-track { height: 6px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.bar-wood { background: #94a3b8; }
.bar-stone { background: #64748b; }
.res-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; font-size: 13px; }
.res-stats span { color: var(--dim); display: block; font-size: 11.5px; }
.res-stats b { font-family: var(--mono); font-weight: 600; }
.market-foot { margin-top: 20px; color: var(--muted); font-size: 13.5px; }

/* residents */
.people-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.donut-wrap { position: relative; width: 180px; height: 180px; margin: 4px auto 16px; }
.donut { width: 100%; height: 100%; border-radius: 50%; }
.donut-center { position: absolute; inset: 42px; background: var(--surface); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center span { font-size: 32px; font-weight: 700; }
.donut-center small { color: var(--muted); font-size: 12px; }
.legend { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend b { margin-left: auto; font-family: var(--mono); font-weight: 600; }
.wealth-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.ws { background: var(--bg2); border-radius: 8px; padding: 12px 14px; }
.ws b { display: block; font-size: 18px; font-family: var(--mono); font-weight: 600; }
.ws span { font-size: 11.5px; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--dim); font-size: 12px; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line-soft); }
.table td.num, .table th.num { text-align: right; font-family: var(--mono); }
.table tr.top3 td:first-child { font-weight: 700; color: var(--gold); }
.table tbody tr:hover td { background: rgba(255,255,255,.03); }
#btn-more-residents { margin-top: 16px; }

/* lessons */
.lessons { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lessons li { display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.lesson-num { font-family: var(--serif); font-size: 34px; color: var(--gold); line-height: 1; flex-shrink: 0; }
.lessons h3 { font-size: 17px; margin-bottom: 6px; }
.lessons p { color: var(--muted); font-size: 14px; }

/* footer / top */
.footer { max-width: 1280px; margin: 104px auto 0; padding: 28px 32px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: grid; gap: 8px; }
.footer a { color: var(--green); }
.footer-note { color: var(--dim); }
#top-btn { position: fixed; right: 24px; bottom: 24px; z-index: 20; width: 44px; height: 44px; border-radius: 50%; background: var(--text); color: #07080d; border: none; cursor: pointer; font-size: 18px; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .9s ease .7s; }
#top-btn.on { opacity: 1; pointer-events: auto; }

@media (hover: hover) {
  .kpi-grid:hover .kpi:not(:hover) { opacity: .55; }
  .kpi { transition: opacity .25s ease; }
  .market-list:hover .market-row:not(:hover) { opacity: .55; }
  .market-row { transition: opacity .25s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #top-btn { display: none; }
}
@media (max-width: 900px) {
  .hero-slice-inner { padding: 56px 20px 48px; }
  .section { padding: 72px 20px 0; }
  .section + .section { padding-top: 64px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(4n) { border-right: 1px solid var(--line); }
  .kpi:nth-child(2n) { border-right: none; }
  .pg-controls { grid-template-columns: 1fr 1fr; }
  .pg-buttons { grid-column: 1 / -1; }
  .pg-grid { grid-template-columns: 1fr; }
  .market-row { grid-template-columns: 44px 1fr; }
  .people-grid, .anchor-panel, .proof-grid, .lessons { grid-template-columns: 1fr; }
  .anchor-right { border-left: none; border-top: 1px solid var(--line); }
  .nav-links, .nav-note, .brand-sub { display: none; }
  .wealth-stats { grid-template-columns: repeat(2, 1fr); }
  .nav-inner, .section, .footer, .strip-inner { padding-left: 20px; padding-right: 20px; }
  .pg-panel, .compare-panel { padding: 20px; }
}

/* ================= BETTING GAME (v6) ================= */
.game { position: relative; background: radial-gradient(1100px 480px at 50% -8%, rgba(131,110,249,.22), transparent 62%), radial-gradient(800px 380px at 82% 0%, rgba(232,179,75,.10), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.game::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(131,110,249,.05) 46px 48px); pointer-events: none; }
.game-inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 72px 32px 72px; }
.game h1 { font-family: var(--serif); font-size: clamp(38px, 5.2vw, 64px); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; margin: 20px 0 14px; }
.game h1 em { font-style: normal; color: var(--gold); }
.play-money { color: var(--amber); font-weight: 700; }
.game-controls { display: flex; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; align-items: center; }
.speed-group { display: flex; gap: 8px; }
.speed-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.game-note { font-size: 14px; color: var(--muted); max-width: 760px; }

/* status bar */
.game-status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 0 0; border-bottom: none; }
.gs-item { padding: 18px 22px; border-right: 1px solid var(--line); }
.gs-item:last-child { border-right: none; }
.gs-item span { display: block; font-size: 12px; color: var(--dim); font-weight: 600; }
.gs-item b { display: block; font-size: 24px; margin-top: 4px; }
.gs-item small { color: var(--dim); font-size: 12px; }
.day-track { height: 6px; background: rgba(255,255,255,.08); border: 1px solid var(--line); border-top: none; border-radius: 0 0 14px 14px; overflow: hidden; }
.day-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #b7a5ff); transition: width .5s linear; }

/* lifecycle stepper: Proposed -> Voted -> Running -> Finalized */
.lifecycle { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.lifecycle li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; font-weight: 600; color: var(--dim); }
.lifecycle li b { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.lifecycle li small { color: var(--dim); font-weight: 400; }
.lifecycle li.done { color: var(--text); border-color: rgba(52,211,153,.4); }
.lifecycle li.done b { background: var(--green-soft); color: var(--green); }
.lifecycle li.now { color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 28px rgba(131,110,249,.25); }
.lifecycle li.now b { background: var(--accent); color: #fff; animation: pulse 1.6s ease infinite; }

/* lanes: parallel-race feel */
.lanes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.lane { --civ: #836ef9; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; cursor: pointer; transition: border-color .25s ease, transform .25s var(--ease), opacity .3s ease; position: relative; overflow: hidden; }
.lane:hover { border-color: rgba(255,255,255,.35); transform: translateY(-2px); }
.lane.selected { border-color: var(--civ); box-shadow: 0 0 0 1px var(--civ), 0 10px 30px rgba(131,110,249,.28); }
.lane.leader { border-color: rgba(232,179,75,.55); }
.lane.dead { opacity: .55; }
.lane.dead .lane-name { text-decoration: line-through; text-decoration-color: var(--red); }
.lane-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lane-name { font-size: 22px; font-weight: 800; }
.lane-name small { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .12em; }
.lane-rank { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.lane-tag { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lane-race { position: relative; height: 10px; background: rgba(255,255,255,.07); border-radius: 99px; margin: 16px 0 12px; overflow: hidden; }
.lane-fill { height: 100%; border-radius: 99px; background: var(--civ); transition: width .5s linear; }
.lane-streak { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); background-size: 60px 100%; background-repeat: repeat-x; animation: streak 1.1s linear infinite; opacity: .5; }
@keyframes streak { from { background-position-x: -60px; } to { background-position-x: 60px; } }
.lane-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.lane-stats span { display: block; font-size: 11px; color: var(--dim); }
.lane-stats b { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.lane-bet { width: 100%; }

/* bet slip + feed */
.bet-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.bet-slip h3, .feed h3 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.bet-selected { margin-top: 4px; font-size: 15px; }
.amt-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0 10px; }
.amt-custom { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.amt-custom input { width: 96px; background: var(--bg2); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: var(--text); font-family: var(--mono); font-size: 15px; padding: 8px 10px; }
.amt-custom input:focus { outline: none; border-color: var(--accent); }
.bet-preview { font-size: 14px; color: var(--muted); margin-bottom: 14px; min-height: 1.5em; }
.bet-preview b { color: var(--gold); }
.bet-error { color: var(--red); font-size: 13.5px; margin-top: 10px; min-height: 1.3em; }
.my-bets { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.my-bets h4 { font-size: 14px; margin-bottom: 8px; }
.my-bets ul { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.my-bets li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.my-bets li.dim, .dim { color: var(--dim); }
.pool-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.feed-list { list-style: none; display: grid; gap: 10px; margin-top: 6px; max-height: 320px; overflow-y: auto; font-size: 14px; }
.feed-list li { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; color: var(--muted); }
.feed-list li b { color: var(--text); }
.feed-list li.feed-dead { border-left-color: var(--red); }
.feed-list li.feed-finalized { border-left-color: var(--green); }
.feed-list li.feed-voted { border-left-color: var(--gold); }
.feed-day { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-right: 6px; }

/* settlement */
.settle-panel { margin-top: 16px; background: linear-gradient(180deg, rgba(52,211,153,.07), transparent 55%), var(--surface); border: 1px solid rgba(52,211,153,.4); border-radius: 14px; padding: 28px; }
.settle-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.settle-epoch { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.settle-panel h2 { font-family: var(--serif); font-size: 32px; margin: 14px 0 6px; }
.settle-panel > p { color: var(--muted); font-size: 15px; }
.settle-panel .table-scroll { margin-top: 18px; }
.settle-payouts { margin-top: 20px; }
.settle-payouts h4 { font-size: 14px; margin-bottom: 8px; }
.payout-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.payout-row b { font-family: var(--mono); color: var(--green); }
.payout-total b { color: var(--gold); }
.settle-note { font-size: 13.5px; margin-top: 14px; }
.settle-panel .btn-play { margin-top: 18px; }

/* leaderboard */
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.board-note { font-size: 13.5px; color: var(--muted); margin-top: 14px; }
.board-note b { color: var(--gold); }
.game .proof-card { margin-top: 16px; }

@media (max-width: 900px) {
  .game-inner { padding: 56px 20px 48px; }
  .lanes { grid-template-columns: 1fr 1fr; }
  .bet-grid, .board-grid { grid-template-columns: 1fr; }
  .game-status { grid-template-columns: repeat(2, 1fr); }
  .gs-item:nth-child(2) { border-right: none; }
  .gs-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lifecycle { grid-template-columns: 1fr 1fr; }
  .lane-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .lane-streak { animation: none; }
}

/* epoch param controls in the game bar (canonical game) */
.game-controls .ctl-inline { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ctl-inline input[type="number"] { width: 110px; background: var(--bg2); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: var(--text); font-family: var(--mono); font-size: 15px; padding: 9px 10px; }
.ctl-inline input[type="number"]:focus { outline: none; border-color: var(--accent); }
.ctl-inline input[type="range"] { width: 130px; accent-color: var(--accent); height: 28px; cursor: pointer; }
/* settlement cross-check line */
.settle-check { font-size: 14px; margin-top: 10px; }
.settle-check.ok { color: var(--green); }
.settle-check.bad { color: var(--red); }

/* ================= v5: game-first Blitz redesign ================= */
/* demo bar: the 3 steps of the 60-second pitch */
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 14px; }
.demo-step b { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; font-size: 12px; margin-right: 6px; }
.demo-arrow { color: var(--dim); }
.demo-note { margin-left: auto; color: var(--gold); font-weight: 600; font-size: 13px; }

/* three "why it's fun" cards */
.hook-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.rule-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; transition: border-color .25s ease, transform .25s var(--ease); }
.rule-card:hover { border-color: rgba(232,179,75,.5); transform: translateY(-2px); }
.rule-emoji { font-size: 26px; }
.rule-card h4 { font-size: 15px; margin: 10px 0 4px; }
.rule-card p { font-size: 13.5px; color: var(--muted); }

/* civ identity: color-coded top border + emoji */
.lane { border-top: 3px solid var(--civ); }
.lane-emoji { font-size: 24px; margin-right: 8px; }

/* survivor reveal: big winner emoji + pop */
.settle-emoji { font-size: 64px; line-height: 1; animation: reveal-pop .6s var(--ease) both; filter: drop-shadow(0 0 24px var(--civ, #e8b34b)); }
@keyframes reveal-pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.15); } to { transform: scale(1); opacity: 1; } }
.settle-panel { animation: settle-in .5s var(--ease) both; }
@keyframes settle-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* fast-forward button: the demo-safe path, gold to stand out */
#btn-fast-forward { border-color: rgba(232,179,75,.6); color: var(--gold); }
#btn-fast-forward:hover:not(:disabled) { border-color: var(--gold); background: rgba(232,179,75,.12); }
#btn-fast-forward:disabled { opacity: .45; }

@media (max-width: 900px) {
  .hook-rules { grid-template-columns: 1fr; }
  .demo-note { margin-left: 0; }
  .settle-emoji { font-size: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .settle-emoji, .settle-panel { animation: none; }
}
