/* Capitol Quest — retro arcade styles. Dark by design (it's an arcade cabinet). */

:root {
  --bg0: #070b1f;
  --bg1: #0d1433;
  --bg2: #141d4a;
  --panel: #111a42;
  --panel2: #1a2560;
  --line: #2e3d8f;
  --line2: #4456b8;
  --ink: #f4f1e6;
  --muted: #9aa3d4;
  --gold: #ffcb3d;
  --gold-d: #b8860b;
  --red: #ff4f6d;
  --red-d: #9e1f3b;
  --green: #3ee08f;
  --green-d: #17754a;
  --teal: #38e1c6;
  --purple: #a77bff;
  --parch: #f4e4bc;
  --parch-d: #d8c08a;
  --ink-brown: #3d2b1a;
  --px: 'Press Start 2P', ui-monospace, Menlo, monospace;
  --body: 'VT323', ui-monospace, Menlo, monospace;
  --shake: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg0); color: var(--ink); }
body {
  font-family: var(--body);
  font-size: 24px;
  line-height: 1.12;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeSpeed;
}
button { font: inherit; color: inherit; }
b { font-weight: normal; color: var(--gold); }
.muted { color: var(--muted); }
kbd { font-family: var(--px); font-size: 10px; background: #000; border: 2px solid var(--line2); padding: 3px 5px; }
[hidden] { display: none !important; }

.px, .px-svg { image-rendering: crisp-edges; image-rendering: pixelated; }

#app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse at 50% -10%, #1c2a6e 0%, transparent 60%),
    radial-gradient(ellipse at 50% 120%, #1a1240 0%, transparent 55%),
    var(--bg0);
}
#app.shake { animation: shake 0.36s steps(6); }

/* ─────────── HUD ─────────── */
#hud {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(#0e1638, #0a0f29);
  border-bottom: 4px solid #000;
  box-shadow: 0 3px 0 var(--line);
  font-family: var(--px); font-size: 11px;
  position: relative; z-index: 5;
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 10px; }
.hud-hearts { display: flex; gap: 4px; }
.hud-heart { width: 26px; }
.hud-heart.heart-break { animation: heartBreak 0.45s steps(4) forwards; }
.hud-stage { color: var(--muted); letter-spacing: 1px; text-align: center; }
.hud-score span { color: var(--muted); font-size: 9px; }
.hud-score b { font-size: 14px; }
.hud-combo { color: var(--green); font-size: 10px; margin-right: 6px; white-space: nowrap; }
.hud-combo.bump { animation: pop 0.25s steps(3); }
.hud-btn {
  font-family: var(--px); font-size: 11px; width: 34px; height: 30px;
  background: var(--panel2); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; padding: 0;
}
.hud-btn.off { color: #5a6399; }
.hud-btn:focus-visible { outline: 3px solid var(--gold); }

/* ─────────── Screens ─────────── */
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: smooth; }
.screen-out > * { animation: fadeOut 0.16s steps(4) forwards; }
.screen-in > * { animation: fadeIn 0.26s steps(5); }
.boot { font-family: var(--px); font-size: 14px; color: var(--muted); display: grid; place-items: center; height: 100%; }
.center-wrap { min-height: 100%; display: grid; place-items: center; padding: 20px 16px; }
.center-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 14px 0; }

/* ─────────── Buttons ─────────── */
.btn {
  font-family: var(--px); font-size: 12px; letter-spacing: 1px; line-height: 1.3;
  color: var(--ink); background: var(--panel2);
  border: 3px solid #000;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.14), 0 4px 0 #000;
  padding: 12px 16px; cursor: pointer; text-transform: uppercase;
  transition: transform 0.05s, filter 0.1s;
}
.btn:hover:not(:disabled) { filter: brightness(1.18); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.14), 0 1px 0 #000; }
.btn:focus-visible, .btn.sel { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.btn-gold { background: var(--gold); color: #2a1a00; }
.btn-red { background: var(--red); color: #fff; }
.btn-big { font-size: 14px; padding: 16px 22px; }
.btn-small { font-size: 10px; padding: 9px 12px; }
.btn-back { background: #0b1030; }

/* ─────────── Starfield ─────────── */
.sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sky i { position: absolute; width: 3px; height: 3px; background: #fff; opacity: .2; animation: twinkle 3s steps(3) infinite; }

/* ─────────── Title ─────────── */
.title-screen {
  min-height: 100%; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 18px 16px 22px; text-align: center;
}
.title-top { position: absolute; top: 12px; left: 16px; right: 16px; display: flex; justify-content: space-between; font-family: var(--px); font-size: 10px; color: var(--muted); }
.logo { position: relative; z-index: 1; }
.logo-small { font-family: var(--px); font-size: 10px; color: var(--teal); letter-spacing: 2px; margin-bottom: 12px; }
.logo-title { margin: 0; font-family: var(--px); font-weight: normal; line-height: 1.05; display: flex; flex-direction: column; align-items: center; }
.lt1, .lt2 { display: block; font-size: clamp(34px, 8.5vw, 76px); letter-spacing: 4px; }
.lt1 { color: var(--gold); text-shadow: 4px 4px 0 var(--red-d), 8px 8px 0 #000; animation: titleBob 2.4s steps(2) infinite; }
.lt2 { color: #fff; text-shadow: 4px 4px 0 #1c5fb0, 8px 8px 0 #000; animation: titleBob 2.4s steps(2) infinite 0.3s; }
.logo-sub { font-family: var(--px); font-size: clamp(10px, 1.8vw, 14px); color: var(--ink); margin-top: 14px; letter-spacing: 2px; }
.title-capitol { position: relative; z-index: 1; }
.capitol-img { width: min(520px, 88vw); display: block; filter: drop-shadow(0 0 24px rgba(255, 216, 107, .18)); }
.menu { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: min(360px, 90vw); position: relative; z-index: 1; }
.menu-item {
  font-family: var(--px); font-size: 13px; text-align: left; letter-spacing: 1px;
  background: rgba(10, 15, 41, .75); border: 3px solid transparent; color: var(--ink);
  padding: 10px 14px; cursor: pointer; display: flex; align-items: center; gap: 12px;
}
.menu-item .cursor { color: var(--gold); visibility: hidden; }
.menu-item.sel { border-color: var(--gold); background: rgba(40, 30, 0, .55); color: var(--gold); }
.menu-item.sel .cursor { visibility: visible; animation: nudge 0.6s steps(2) infinite; }
.menu-item.primary { font-size: 14px; }
.menu-item:focus-visible { outline: none; border-color: var(--gold); }
.title-foot { font-family: var(--px); font-size: 9px; color: var(--muted); position: relative; z-index: 1; }
.blink { animation: blink 1s steps(2) infinite; color: var(--gold); }

/* ─────────── Pages ─────────── */
.page { max-width: 1100px; margin: 0 auto; padding: 18px 16px 28px; position: relative; }
.page-narrow { max-width: 680px; }
.page-title { font-family: var(--px); font-weight: normal; font-size: clamp(16px, 3vw, 26px); text-align: center; margin: 6px 0 12px; text-shadow: 3px 3px 0 #000; line-height: 1.4; position: relative; }
.page-title.gold { color: var(--gold); }
.page-title.red { color: var(--red); }
.page-sub { text-align: center; color: var(--muted); font-size: 24px; margin: 0 0 16px; }

/* how to play */
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.howto-card { display: flex; gap: 14px; background: var(--panel); border: 4px solid #000; box-shadow: 0 0 0 3px var(--line); padding: 14px; }
.howto-icon { flex: none; width: 60px; display: grid; place-items: start center; }
.howto-img { width: 52px; }
.howto-card h3 { font-family: var(--px); font-weight: normal; font-size: 12px; color: var(--gold); margin: 2px 0 8px; }
.howto-card p { margin: 0; font-size: 23px; }
.howto-keys { text-align: center; font-size: 22px; margin: 16px 0 0; line-height: 1.8; color: var(--muted); }

/* settings */
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--panel); border: 4px solid #000; box-shadow: 0 0 0 3px var(--line); padding: 14px; margin-bottom: 12px; }
.set-label { font-family: var(--px); font-size: 12px; margin-bottom: 6px; }
.set-desc { color: var(--muted); font-size: 22px; }
.toggle { font-family: var(--px); font-size: 11px; width: 74px; padding: 10px 0; background: #2a1622; color: var(--red); border: 3px solid #000; box-shadow: 0 3px 0 #000; cursor: pointer; }
.toggle.on { background: #0f3b27; color: var(--green); }

/* pick cards (chamber / bill) */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.page-pick .pick-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 860px; margin: 0 auto; }
.pick-card {
  text-align: left; background: var(--panel); border: 4px solid #000;
  box-shadow: 0 0 0 3px var(--line), 0 8px 0 #000;
  padding: 16px; cursor: pointer; font-size: 23px; transition: transform 0.08s;
}
.pick-card:hover, .pick-card.sel { box-shadow: 0 0 0 4px var(--gold), 0 8px 0 #000; transform: translateY(-4px); }
.pick-card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--gold), 0 8px 0 #000; }
.pick-card h3 { font-family: var(--px); font-weight: normal; font-size: 13px; line-height: 1.45; margin: 10px 0 8px; color: var(--gold); }
.pick-card p { margin: 8px 0 0; }
.pick-icon { width: 64px; display: block; }
.bill-tag { font-family: var(--px); font-size: 8px; color: var(--teal); margin-top: 10px; }
.card-house h3 { color: var(--teal); }
.card-senate h3 { color: var(--purple); }
.stats { margin-top: 6px; }
.stat { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px dotted #2a3470; padding: 4px 0; font-size: 23px; }
.stat span { font-family: var(--px); font-size: 9px; color: var(--muted); }

/* oath */
.oath { min-height: 100%; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px; text-align: center; }
.oath-capitol { width: min(380px, 78vw); position: relative; }
.oath-hand { font-family: var(--px); font-size: 12px; color: var(--muted); position: relative; }
.oath-text { font-size: 30px; max-width: 760px; min-height: 3.3em; position: relative; }
.oath-after { position: relative; }
.oath-welcome { font-family: var(--px); font-size: 12px; }
.oath-name { font-family: var(--px); font-size: clamp(18px, 4vw, 30px); color: var(--gold); margin: 12px 0; text-shadow: 3px 3px 0 #000; }
.oath-name.pop { animation: pop 0.3s steps(3); }
.oath-note { color: var(--muted); font-size: 22px; }

/* ─────────── Pip dialog ─────────── */
.dlg-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(4, 6, 18, .45); }
.dlg-wrap.dlg-out { animation: fadeOut 0.15s steps(3) forwards; }
.dlg {
  width: min(880px, 100%); display: flex; gap: 14px; cursor: pointer;
  background: #0b1030; border: 4px solid #fff; box-shadow: 0 0 0 4px #000, 0 10px 0 #000;
  padding: 14px; animation: dlgIn 0.2s steps(4);
}
.dlg.dlg-urgent { border-color: var(--red); }
.dlg-portrait { flex: none; width: 88px; height: 88px; background: var(--bg2); border: 3px solid var(--line2); display: grid; place-items: center; }
.dlg-portrait-img { width: 72px; }
.dlg-body { flex: 1; min-width: 0; }
.dlg-name { font-family: var(--px); font-size: 11px; color: var(--gold); margin-bottom: 8px; }
.dlg-name span { color: var(--muted); font-size: 9px; }
.dlg-text { font-size: 27px; line-height: 1.12; min-height: 3.4em; }
.dlg-next { text-align: right; color: var(--gold); font-size: 20px; animation: bob 0.6s steps(2) infinite; }
.dlg-compact .dlg-text { min-height: 2.3em; }

/* ─────────── Overlay FX ─────────── */
#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
#overlay > * { pointer-events: auto; }
#overlay > .banner, #overlay > .float-text, #overlay > .toast, #overlay > .flash { pointer-events: none; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 58; image-rendering: pixelated; }
#crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 140px rgba(0, 0, 0, .55);
}
.no-crt #crt { display: none; }

.banner { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; z-index: 50; width: max-content; max-width: 94vw; animation: bannerIn 0.35s cubic-bezier(.2, 1.6, .4, 1); }
.banner-text {
  font-family: var(--px); font-size: clamp(22px, 5vw, 48px); color: #fff; line-height: 1.25;
  text-shadow: 4px 4px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000;
}
.banner-sub { display: inline-block; font-size: 27px; background: rgba(0, 0, 0, .82); border: 3px solid #000; padding: 4px 12px; margin-top: 12px; }
.banner-gold .banner-text { color: var(--gold); }
.banner-bad .banner-text { color: var(--red); }
.banner-warn .banner-text { color: var(--red); animation: blink 0.3s steps(2) infinite; }
.banner-ready .banner-text { color: var(--teal); }
.banner-go .banner-text { color: var(--gold); font-size: clamp(40px, 9vw, 90px); }
.banner-huge .banner-text { font-size: clamp(26px, 6.5vw, 64px); }
.banner-out { animation: bannerOut 0.22s steps(3) forwards; }

.float-text {
  position: fixed; transform: translate(-50%, -50%); z-index: 60; white-space: nowrap;
  font-family: var(--px); font-size: 14px; color: #fff; text-shadow: 2px 2px 0 #000, -2px -2px 0 #000;
  animation: floatUp 1s ease-out forwards;
}
.ft-gold { color: var(--gold); }
.ft-green { color: var(--green); }
.ft-red { color: var(--red); }
.ft-blue { color: var(--teal); font-size: 11px; }
.ft-dmg { color: #fff; font-size: 28px; text-shadow: 3px 3px 0 var(--red-d), -2px -2px 0 #000; }

.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 70;
  background: #000; border: 3px solid var(--gold); box-shadow: 0 4px 0 #000;
  padding: 10px 14px; font-family: var(--px); font-size: 11px; color: var(--gold); white-space: nowrap; max-width: 94vw;
  animation: toastIn 0.25s steps(3);
}
.toast-power { border-color: var(--teal); color: var(--teal); }
.toast-achieve { border-color: var(--purple); color: #e3d6ff; }
.toast-out { animation: fadeOut 0.3s steps(3) forwards; }
.flash { position: fixed; inset: 0; z-index: 55; animation: flash linear forwards; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 15, .74); }
.modal {
  width: 100%; max-width: 520px; text-align: center;
  background: var(--panel); border: 4px solid #fff; box-shadow: 0 0 0 4px #000, 0 12px 0 #000;
  padding: 22px; animation: dlgIn 0.2s steps(4);
}
.modal-title { font-family: var(--px); font-size: 16px; color: var(--gold); margin-bottom: 14px; line-height: 1.4; }
.modal-text { font-size: 25px; margin-bottom: 16px; }
.modal-btns { display: flex; flex-direction: column; gap: 10px; }
.heart-note { color: var(--red); font-family: var(--px); font-size: 11px; }
.cont-title { font-family: var(--px); font-size: 13px; color: var(--red); line-height: 1.5; }
.cont-q { font-family: var(--px); font-size: 22px; margin-top: 14px; }
.cont-num { font-family: var(--px); font-size: 64px; color: var(--gold); margin: 14px 0; text-shadow: 4px 4px 0 #000; }
.cont-num.tick { animation: pop 0.3s steps(3); }
.cont-cost { color: var(--muted); font-size: 22px; margin-bottom: 14px; }

/* stage clear */
.clear-wrap { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 15, .72); }
.clear-card { width: min(460px, 100%); text-align: center; background: var(--panel); border: 4px solid #fff; box-shadow: 0 0 0 4px #000, 0 12px 0 #000; padding: 24px; animation: dlgIn 0.25s steps(4); }
.clear-title { font-family: var(--px); font-size: 20px; color: var(--gold); text-shadow: 3px 3px 0 #000; }
.stars { display: flex; justify-content: center; gap: 6px; }
.star-img { width: 40px; }
.stars-big .star-img { width: 64px; margin: 14px 4px 6px; }
.star-pop { animation: starPop 0.35s cubic-bezier(.2, 1.8, .4, 1); }
.clear-lines { font-size: 25px; margin: 8px 0 16px; }

/* ─────────── Stage cards ─────────── */
.stage-card {
  max-width: 720px; width: 100%; text-align: center;
  background: var(--panel); border: 4px solid #000; box-shadow: 0 0 0 4px var(--line), 0 12px 0 #000;
  padding: 26px 22px;
}
.sc-num { font-family: var(--px); font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.sc-icon { margin: 16px 0 6px; }
.sc-icon-img { width: 72px; animation: bob 1s steps(2) infinite; }
.stage-card .sc-icon-img[src*="data"] { max-height: 90px; object-fit: contain; }
.sc-title { font-family: var(--px); font-weight: normal; font-size: clamp(18px, 4vw, 32px); color: var(--gold); margin: 10px 0 12px; line-height: 1.35; text-shadow: 3px 3px 0 #000; }
.sc-sub { font-size: 26px; color: var(--muted); margin-bottom: 14px; }
.sc-goals { text-align: left; margin: 0 auto 20px; padding: 0; list-style: none; max-width: 580px; }
.sc-goals li { font-size: 25px; padding: 7px 0 7px 30px; position: relative; border-bottom: 2px dotted #2a3470; }
.sc-goals li::before { content: '▶'; position: absolute; left: 4px; color: var(--gold); font-size: 16px; top: 11px; }

/* ─────────── Stage layout ─────────── */
.stage { max-width: 1100px; margin: 0 auto; padding: 12px 14px 24px; display: flex; flex-direction: column; gap: 12px; }
.scene { background: var(--bg1); border: 4px solid #000; box-shadow: 0 0 0 3px var(--line); padding: 12px; position: relative; }
.panel:empty { display: none; }
.part-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; font-family: var(--px); font-size: 13px; color: var(--gold); margin-bottom: 8px; }
.part-title small { font-family: var(--body); font-size: 22px; color: var(--muted); }

.mini-hud { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.mini-timer { flex: 1; height: 16px; background: #000; border: 2px solid var(--line); }
.mini-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); }
.mini-timer.low .mini-timer-fill { background: var(--red); }
.mini-count { font-family: var(--px); font-size: 10px; color: var(--muted); flex: 1; }
.strikes { display: flex; gap: 6px; }
.strike { font-family: var(--px); font-size: 12px; color: #39407a; border: 2px solid #39407a; padding: 4px 6px; }
.strike.on { color: var(--red); border-color: var(--red); background: rgba(255, 79, 109, .15); animation: pop 0.25s steps(3); }
.mini-msg { min-height: 2.3em; font-size: 25px; text-align: center; padding: 8px 6px 2px; }
.mini-msg .good { color: var(--green); }
.mini-msg .bad { color: var(--red); }

/* ─────────── Quiz ─────────── */
.quiz { background: var(--panel); border: 4px solid #000; box-shadow: 0 0 0 3px var(--line2); padding: 14px; animation: fadeIn 0.2s steps(3); }
.quiz-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--px); font-size: 10px; }
.quiz-label { color: var(--muted); }
.quiz-timer { flex: 1; min-width: 110px; height: 14px; background: #000; border: 2px solid var(--line); }
.quiz-timer-fill { height: 100%; width: 100%; background: var(--green); }
.quiz-timer.low .quiz-timer-fill { background: var(--red); }
.quiz-timer.frozen { border-color: var(--teal); }
.quiz-timer.frozen .quiz-timer-fill { background: var(--teal); }
.quiz-powers { display: flex; gap: 6px; margin-left: auto; }
.pw { font-family: var(--px); font-size: 8px; background: #0b1030; color: var(--teal); border: 2px solid var(--teal); padding: 5px 7px; cursor: pointer; }
.pw b { color: #fff; }
.pw:disabled { color: #3c4577; border-color: #2a3266; cursor: default; }
.pw:disabled b { color: #3c4577; }
.quiz-q { font-size: clamp(25px, 2.6vw, 32px); line-height: 1.1; margin: 12px 2px 14px; }
.quiz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ans {
  display: flex; align-items: center; gap: 10px; text-align: left;
  font-family: var(--body); font-size: 24px; line-height: 1.05;
  background: var(--bg2); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 #000;
  padding: 10px 12px; min-height: 62px; cursor: pointer;
}
.ans:hover:not(:disabled) { background: #1f2c6e; box-shadow: inset 0 0 0 2px var(--gold), 0 4px 0 #000; }
.ans:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--gold), 0 1px 0 #000; }
.ans:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ans:disabled { cursor: default; }
.ans-key { flex: none; font-family: var(--px); font-size: 11px; background: var(--gold); color: #000; padding: 6px 7px; }
.ans-correct { background: var(--green-d) !important; box-shadow: inset 0 0 0 3px var(--green), 0 4px 0 #000 !important; animation: pop 0.25s steps(3); }
.ans-wrong { background: var(--red-d) !important; box-shadow: inset 0 0 0 3px var(--red), 0 4px 0 #000 !important; animation: shakeX 0.3s steps(4); }
.ans-out { opacity: .22; text-decoration: line-through; }
.quiz.revealed .ans:not(.ans-correct):not(.ans-wrong) { opacity: .45; }
.quiz-feedback { margin-top: 12px; border-top: 3px dashed var(--line); padding-top: 10px; animation: fadeIn 0.2s steps(3); }
.fb-head { font-family: var(--px); font-size: 14px; }
.fb-head.good { color: var(--green); }
.fb-head.bad { color: var(--red); }
.fb-pts { color: var(--gold); }
.fb-answer { font-size: 25px; margin-top: 8px; }
.fb-why { font-size: 25px; color: #d8dcf5; margin-top: 6px; }
.btn-next { margin-top: 12px; }
.quiz-tf .quiz-answers { grid-template-columns: 1fr 1fr; }
.quiz-tf .ans { justify-content: center; font-family: var(--px); font-size: 16px; min-height: 76px; }
.quiz.lightning .quiz-q { text-align: center; font-size: clamp(27px, 3vw, 36px); min-height: 2.3em; display: grid; place-items: center; }
.quiz.lightning .quiz-feedback { text-align: center; }

/* battle variant (boss) */
.quiz.battle { background: #f4f1e6; color: #111; box-shadow: 0 0 0 3px #000, 6px 6px 0 #000; }
.quiz.battle .quiz-label { color: #6a4020; }
.quiz.battle .ans { background: #fff; color: #111; box-shadow: inset 0 0 0 2px #b9b1a0, 0 4px 0 #000; }
.quiz.battle .ans:hover:not(:disabled) { background: #fff7d6; box-shadow: inset 0 0 0 2px var(--gold-d), 0 4px 0 #000; }
.quiz.battle .ans-correct { color: #fff; }
.quiz.battle .ans-wrong { color: #fff; }
.quiz.battle .fb-why, .quiz.battle .fb-answer { color: #222; }
.quiz.battle .fb-head.good { color: var(--green-d); }
.quiz.battle .fb-head.bad { color: var(--red-d); }
.quiz.battle .fb-pts { color: var(--gold-d); }
.quiz.battle .quiz-feedback { border-top-color: #cfc6b0; }
.quiz.battle .pw { background: #fff; }
.battle-text { background: #f4f1e6; color: #111; border: 4px solid #000; box-shadow: 0 0 0 3px #000, 6px 6px 0 #000; padding: 16px; font-size: 30px; min-height: 96px; animation: fadeIn 0.2s steps(3); }

/* ─────────── Stage 1: Idea Factory ─────────── */
.whack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 760px; margin: 0 auto; }
.hole {
  position: relative; height: clamp(150px, 24vh, 190px); overflow: hidden;
  background: linear-gradient(#e9e6f0 0 12px, #c3c8e8 12px 16px, #1a2358 16px);
  border: 4px solid #000; box-shadow: 0 0 0 3px var(--line);
}
.hole-arch { position: absolute; left: 12%; right: 12%; top: 24px; bottom: 0; background: #070b1f; border-radius: 60px 60px 0 0; border: 4px solid #3a4585; border-bottom: 0; }
.mole {
  position: absolute; left: 50%; bottom: 0; width: 88%; height: 88%;
  transform: translate(-50%, 108%); transition: transform 0.12s steps(3);
  background: none; border: 0; padding: 0 0 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  touch-action: manipulation;
}
.hole.up .mole { transform: translate(-50%, 0); }
.mole-img { width: 104px; }
.mole-label { font-family: var(--body); font-size: 23px; line-height: 0.95; background: #000; color: #fff; padding: 2px 8px 3px; margin-top: -2px; max-width: 100%; text-align: center; border: 2px solid var(--line2); }
.mole.bonk { filter: brightness(1.7) drop-shadow(0 0 8px var(--green)); }
.mole.wrong { filter: sepia(1) hue-rotate(-50deg) saturate(5); }
.hole-key { position: absolute; top: 20px; left: 6px; font-family: var(--px); font-size: 9px; color: #5a6399; z-index: 1; }

.draft-row { display: flex; align-items: flex-end; justify-content: center; gap: 36px; flex-wrap: wrap; padding: 10px; min-height: 200px; }
.draft-bill { display: flex; gap: 14px; align-items: center; background: var(--parch); color: var(--ink-brown); border: 4px solid #000; padding: 14px 18px; box-shadow: 6px 6px 0 #000; }
.draft-bill-img { width: 64px; }
.draft-lines { min-width: 230px; }
.draft-line { font-size: 24px; padding: 3px 0; border-bottom: 2px dotted #c9b27c; }
.draft-k { font-family: var(--px); font-size: 8px; display: inline-block; width: 92px; color: #7a6040; }
.draft-v.ink { color: #1a3a8a; }
.draft-v.ink-red { color: #b3203f; }
.hopper-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hopper-img { width: 200px; }
.hopper-label { font-family: var(--px); font-size: 9px; color: var(--muted); }
.clerk-desk { width: 200px; height: 90px; display: grid; place-items: center; font-family: var(--px); font-size: 12px; color: var(--gold); background: linear-gradient(#8b5a2b, #5a3316); border: 4px solid #000; box-shadow: 0 6px 0 #000; }
.drop-in { animation: dropIn 0.7s ease-in forwards; }
.slide-in { animation: slideIn 0.7s ease-in forwards; }
.bill-badge { display: flex; align-items: center; gap: 14px; background: var(--parch); color: var(--ink-brown); border: 4px solid #000; box-shadow: 6px 6px 0 #000; padding: 14px 18px; margin: 20px 0; }
.bill-badge-img { width: 60px; }
.bb-num { font-family: var(--px); font-size: 16px; color: #1a1330; }
.bb-name { font-size: 26px; }

/* ─────────── Stage 2: Committee ─────────── */
.conveyor {
  position: relative; height: 112px; overflow: hidden;
  background: repeating-linear-gradient(90deg, #232c5c 0 20px, #1a2250 20px 40px);
  background-size: 40px 100%;
  border: 4px solid #000; box-shadow: inset 0 -8px 0 #0a0f28, 0 0 0 3px var(--line);
  animation: belt 0.7s linear infinite;
}
.belt { position: absolute; inset: 0 18px 0 0; }
.belt-card {
  position: absolute; top: 12px; left: 0; width: min(310px, 62%); min-height: 78px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--parch); color: var(--ink-brown); border: 3px solid #000; box-shadow: 4px 4px 0 #000;
  padding: 8px 10px; font-size: 25px; line-height: 1;
}
.belt-card small { font-family: var(--px); font-size: 8px; margin-bottom: 4px; }
.belt-card.mine { background: var(--gold); color: #2a1a00; box-shadow: 0 0 0 3px #fff, 4px 4px 0 #000; }
.belt-end { position: absolute; right: 0; top: 0; bottom: 0; width: 16px; background: repeating-linear-gradient(45deg, var(--red) 0 8px, #000 8px 16px); font-size: 0; }
.card-sent { animation: cardSent 0.35s steps(4) forwards; }
.card-fall { animation: cardFall 0.4s steps(4) forwards; }
.card-bounce { animation: shakeX 0.3s steps(4); }
.doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.door {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--bg2); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 #000;
  padding: 12px 6px 10px; min-height: 150px; cursor: pointer; font-size: 23px; line-height: 1;
}
.door:hover { box-shadow: inset 0 0 0 2px var(--gold), 0 4px 0 #000; }
.door:active { transform: translateY(3px); }
.door-img { width: 54px; }
.door-name { text-align: center; }
.door-key { position: absolute; top: 5px; left: 6px; font-family: var(--px); font-size: 9px; color: var(--muted); }
.door-good { background: var(--green-d); }
.door-bad { background: var(--red-d); }

.petition { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px; }
.petition-paper { width: min(440px, 100%); text-align: center; background: var(--parch); color: var(--ink-brown); border: 4px solid #000; box-shadow: 6px 6px 0 #000; padding: 16px 20px; }
.petition-head { font-family: var(--px); font-size: 10px; }
.petition-count { font-family: var(--px); font-size: 42px; color: #1a3a8a; margin: 12px 0 6px; }
.petition-need { font-size: 23px; margin-bottom: 8px; }
.petition-track { height: 16px; background: var(--parch-d); border: 2px solid #000; }
.petition-fill { height: 100%; width: 0; background: #1a3a8a; }
.petition-btn { font-size: 22px; padding: 24px 46px; touch-action: manipulation; }

/* vote chart */
.chart { text-align: center; }
.chart-label { font-family: var(--px); font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.chart-svg { width: 100%; max-width: 560px; display: block; margin: 0 auto; }
.chart-senate .chart-svg { max-width: 400px; }
.seat { transition: fill 0.15s steps(2); }
.seat-u { fill: #464e80; }
.seat-y { fill: var(--green); }
.seat-n { fill: var(--red); }
.tally { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-family: var(--px); font-size: 11px; margin-top: 6px; }
.tally-yea { color: var(--green); }
.tally-nay { color: var(--red); }
.tally-und { color: var(--muted); }
.chart-need { display: inline-block; margin-top: 10px; font-family: var(--px); font-size: 11px; padding: 6px 10px; border: 3px solid var(--gold); color: var(--gold); }
.chart-need.met { background: var(--gold); color: #000; animation: pop 0.3s steps(3); }
.vote-clock { text-align: center; font-family: var(--px); font-size: 11px; color: var(--teal); margin-top: 10px; }

/* ─────────── Rules committee ─────────── */
.po-field { display: flex; gap: 8px; height: 300px; }
.po-bill { flex: none; width: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; background: var(--parch); color: var(--ink-brown); border: 4px solid #000; padding: 6px; font-size: 21px; line-height: 1; }
.po-bill-img { width: 60px; }
.po-bill.glow { animation: glow 0.5s steps(3); }
.lanes { flex: 1; display: grid; grid-template-rows: repeat(3, 1fr); gap: 6px; min-width: 0; }
.lane { position: relative; overflow: hidden; background: #0b1030; border: 3px solid #000; box-shadow: inset 0 0 0 2px #1d2766; }
.lane-key { position: absolute; right: 6px; top: 4px; font-family: var(--px); font-size: 9px; color: #3c4577; }
.amend {
  position: absolute; top: 50%; left: 100%; transform: translateY(-50%);
  width: min(270px, 46%); text-align: left; cursor: crosshair; touch-action: manipulation;
  background: #fff; color: #111; border: 3px solid #000; box-shadow: 3px 3px 0 #000;
  padding: 6px 8px; font-size: 22px; line-height: 1;
}
.amend small { display: block; font-family: var(--px); font-size: 7px; color: #777; margin-bottom: 3px; }
.amend:hover { box-shadow: 0 0 0 3px var(--gold), 3px 3px 0 #000; }
.amend.struck { animation: struck 0.4s steps(4) forwards; pointer-events: none; }
.amend.struck-bad { animation: struckBad 0.4s steps(4) forwards; pointer-events: none; }
.rules-room { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; }
.rules-gavel { width: 90px; animation: gavelBang 1.2s steps(2) infinite; transform-origin: 50% 90%; }
.rules-sign { font-family: var(--px); font-size: 11px; color: var(--gold); border: 3px solid var(--gold); padding: 8px 12px; }

/* ─────────── Senate ─────────── */
.senate-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; align-items: center; }
.podium-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.speech { position: relative; width: 100%; max-width: 380px; min-height: 80px; background: #fff; color: #111; border: 3px solid #000; box-shadow: 4px 4px 0 #000; padding: 8px 10px; font-size: 22px; line-height: 1.05; }
.speech::after { content: ''; position: absolute; left: 50%; bottom: -14px; border: 7px solid transparent; border-top-color: #000; transform: translateX(-50%); }
.windy { display: flex; flex-direction: column; align-items: center; }
.windy-img { width: 128px; margin-bottom: -12px; position: relative; z-index: 0; }
.podium { position: relative; z-index: 1; width: 170px; text-align: center; font-family: var(--px); font-size: 8px; color: var(--gold); background: linear-gradient(#7a4a24, #5a3316); border: 4px solid #000; padding: 14px 4px 20px; box-shadow: 0 6px 0 #000; }
.fb-clock { font-family: var(--px); font-size: 10px; color: var(--red); }
.sig-box { margin-top: 12px; }
.sig-label { font-family: var(--px); font-size: 8px; color: var(--muted); margin-bottom: 6px; text-align: center; }
.sigs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-width: 360px; margin: 0 auto; }
.sig { height: 14px; border: 2px solid var(--line); }
.sig.on { background: var(--gold); border-color: #000; animation: pop 0.2s steps(2); }

/* ─────────── Conference ─────────── */
.deal-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--px); font-size: 10px; margin-bottom: 18px; }
.meter-val { color: var(--ink); font-size: 12px; }
.meter-track { position: relative; height: 22px; background: #000; border: 3px solid var(--line); }
.meter-fill { height: 100%; width: 0; background: var(--red); transition: width 0.3s steps(6); }
.meter.met .meter-fill { background: var(--green); }
.meter-mark { position: absolute; top: -7px; bottom: -7px; width: 4px; margin-left: -2px; background: var(--gold); }
.meter-mark span { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-family: var(--px); font-size: 8px; color: var(--gold); white-space: nowrap; }
.deal-table { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.deal-row { display: grid; grid-template-columns: 180px 1fr; gap: 10px; align-items: center; }
.deal-label { font-family: var(--px); font-size: 10px; color: var(--muted); line-height: 1.4; display: flex; align-items: center; gap: 8px; }
.deal-pig { width: 30px; }
.deal-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.deal-opts-2 { grid-template-columns: 1fr 1fr; }
.deal-opt { text-align: center; cursor: pointer; background: var(--bg2); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 #000; padding: 7px 6px; font-size: 22px; line-height: 1; }
.deal-opt small { display: block; font-family: var(--px); font-size: 7px; margin-bottom: 5px; }
.deal-h small { color: var(--teal); }
.deal-c small { color: var(--gold); }
.deal-s small { color: var(--purple); }
.deal-ear small { color: #ff9ebb; }
.deal-no small { color: var(--muted); }
.deal-opt:hover { box-shadow: inset 0 0 0 2px var(--gold), 0 3px 0 #000; }
.deal-opt.on { background: #2b3a8a; box-shadow: inset 0 0 0 3px var(--gold), 0 3px 0 #000; }
.deal-submit { display: flex; justify-content: center; margin-top: 14px; }

/* ─────────── Boss ─────────── */
.arena {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: 'bp boss' 'player pp';
  align-items: center; gap: 10px 18px; padding: 14px;
  background:
    linear-gradient(transparent 62%, #1d2a6e 62%, #16215a 100%),
    radial-gradient(ellipse at 72% 30%, #2d3f93 0%, #141c4a 62%);
  border: 4px solid #000;
}
.arena::after { content: ''; position: absolute; left: 50%; bottom: -60px; width: 340px; height: 120px; transform: translateX(-50%); border-radius: 50%; border: 4px solid rgba(255, 203, 61, .35); pointer-events: none; }
.boss-plate { grid-area: bp; }
.boss { grid-area: boss; }
.player { grid-area: player; }
.player-plate { grid-area: pp; }
.boss-plate, .player-plate { position: relative; z-index: 2; background: #f4f1e6; color: #111; border: 4px solid #000; box-shadow: 4px 4px 0 #000; padding: 8px 10px; }
.plate-name { font-family: var(--px); font-size: 12px; }
.plate-sub { font-size: 21px; }
.hp { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hp-label { font-family: var(--px); font-size: 7px; color: var(--red-d); }
.hp-track { flex: 1; height: 12px; background: #3a3a3a; border: 2px solid #000; }
.hp-fill { height: 100%; width: 100%; background: var(--green); transition: width 0.45s steps(9); }
.hp-fill.low { background: var(--red); }
.hp-text { font-family: var(--px); font-size: 8px; }
.boss { position: relative; height: 210px; display: flex; justify-content: center; align-items: flex-end; }
.boss-backdrop { position: absolute; inset: 0 8% 0; background: repeating-linear-gradient(90deg, #1e2a66 0 12px, #26347a 12px 24px); border: 3px solid #000; border-bottom: 0; }
.seal { position: absolute; top: 10px; left: 10px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #1b2a5e; border: 4px solid var(--gold); color: var(--gold); font-size: 24px; }
.boss-img { position: relative; z-index: 1; width: 150px; margin-bottom: 30px; }
.resolute { position: absolute; z-index: 2; left: 50%; bottom: 0; transform: translateX(-50%); width: 230px; height: 62px; background: linear-gradient(#9b6431, #5a3316); border: 4px solid #000; box-shadow: inset 0 6px 0 rgba(255, 255, 255, .15); }
.boss.boss-windup .boss-img { animation: windup 0.6s steps(3); }
.boss.boss-hit .boss-img { animation: bossHit 0.5s steps(5); }
.boss.boss-attack .boss-img { animation: bossAttack 0.45s steps(4); }
.boss.boss-beaten .boss-img { animation: bob 0.8s steps(2) infinite; }
.player { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 150px; }
.player-img { width: 108px; position: relative; z-index: 1; }
.player-img.lunge { animation: lunge 0.4s steps(4); }
.player-img.hurt { animation: hurt 0.5s steps(5); }
.player-img.sad { filter: grayscale(.8) brightness(.8); }
.day-counter { font-family: var(--px); font-size: 10px; color: var(--red-d); margin-top: 6px; }
.big-stamp { position: absolute; z-index: 3; top: 36%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); font-family: var(--px); font-size: 26px; padding: 8px 12px; border: 5px solid; background: rgba(0, 0, 0, .35); animation: stampIn 0.3s cubic-bezier(.2, 1.8, .4, 1); }
.stamp-good { color: var(--green); border-color: var(--green); }
.stamp-bad { color: var(--red); border-color: var(--red); }

/* ─────────── Override ─────────── */
.blitz { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 8px 4px; }
.blitz-clock { width: 120px; height: 120px; display: grid; place-items: center; font-family: var(--px); font-size: 46px; color: var(--gold); background: #000; border: 4px solid #000; box-shadow: 0 0 0 4px var(--gold); }
.blitz-clock.low { color: var(--red); box-shadow: 0 0 0 4px var(--red); animation: pulse 0.5s steps(2) infinite; }
.blitz-meters { display: flex; flex-direction: column; gap: 22px; }
.review-list { display: flex; flex-direction: column; gap: 8px; }
.review-item { background: var(--bg2); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--line); padding: 10px; }
.review-q { font-size: 25px; }
.review-a { font-size: 24px; margin-top: 4px; }
.review-why { font-size: 23px; color: var(--muted); margin-top: 2px; }

/* ─────────── Map ─────────── */
.page-map { max-width: 1060px; }
.map-head { text-align: center; }
.map-bill { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 23px; text-align: left; }
.map-bill-img { width: 34px; }
.map-stars { font-family: var(--px); font-size: 12px; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.tiny-star { width: 20px; }
.map-wrap { margin: 12px 0 8px; padding: 8px; background: radial-gradient(ellipse at 50% 40%, #1a2458, #0b1030 70%); border: 4px solid #000; box-shadow: 0 0 0 3px var(--line); }
.map-svg { width: 100%; height: auto; display: block; overflow: visible; }
.map-svg.portrait { max-width: 400px; margin: 0 auto; }
.map-road { fill: none; stroke: #000; stroke-width: 24; stroke-linecap: round; }
.map-road-dash { fill: none; stroke: var(--gold); stroke-width: 4; stroke-dasharray: 10 12; animation: dash 1s linear infinite; opacity: .8; }
.node-bg { fill: #151d4a; stroke: #000; stroke-width: 5; }
.map-node.done .node-bg { fill: #1b6b45; }
.map-node.current .node-bg { fill: #7a5a0e; stroke: var(--gold); animation: nodePulse 0.9s steps(2) infinite; }
.map-node.locked > image:first-of-type { opacity: .35; }
.node-label { font-family: var(--px); font-size: 13px; fill: var(--ink); paint-order: stroke; stroke: #000; stroke-width: 5px; stroke-linejoin: round; }
.map-node.locked .node-label { fill: #6b739e; }
.map-node.current .node-label { fill: var(--gold); }
.map-svg.portrait .node-label { font-size: 14px; }
.avatar-bob { animation: avatarBob 0.7s steps(2) infinite; }

/* ─────────── Law ─────────── */
.law { min-height: 100%; position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 22px 16px; }
.law-banner { position: relative; font-family: var(--px); font-size: clamp(18px, 4vw, 34px); color: var(--gold); text-align: center; text-shadow: 4px 4px 0 #000; line-height: 1.3; animation: titleBob 1s steps(2) infinite; }
.law-doc {
  position: relative; width: min(640px, 100%); text-align: center;
  background: var(--parch); color: var(--ink-brown);
  border: 4px solid #000; box-shadow: 8px 8px 0 #000, inset 0 0 0 6px var(--parch-d);
  padding: 28px 24px 34px; animation: dlgIn 0.4s steps(5);
}
.law-num { font-family: var(--px); font-size: 15px; color: #1a1330; }
.law-cong { font-size: 23px; margin-top: 6px; }
.law-name { font-family: var(--px); font-size: clamp(14px, 3vw, 22px); line-height: 1.4; margin: 16px 0 4px; color: #1a1330; }
.law-was { font-size: 22px; color: #7a6040; }
.law-desc { font-size: 25px; margin: 14px 0; }
.law-via { font-size: 22px; font-style: italic; }
.law-sig { width: 62%; margin: 18px auto 0; border-top: 2px solid var(--ink-brown); padding-top: 6px; display: flex; flex-direction: column; }
.law-sig span { font-size: 30px; color: #1a3a8a; }
.law-sig small { font-family: var(--px); font-size: 8px; margin-top: 4px; }
.law-date { font-size: 21px; margin-top: 8px; }
.law-stamp { position: absolute; right: 16px; bottom: 16px; font-family: var(--px); font-size: 18px; color: #c0283f; border: 4px solid #c0283f; padding: 6px 10px; transform: rotate(-12deg); opacity: .9; animation: stampIn 0.4s 0.8s both cubic-bezier(.2, 1.8, .4, 1); }

/* ─────────── Results ─────────── */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.res-card { background: var(--panel); border: 4px solid #000; box-shadow: 0 0 0 3px var(--line); padding: 14px; }
.res-bill { display: flex; gap: 12px; align-items: center; font-size: 23px; margin-bottom: 10px; }
.res-bill b { font-family: var(--px); font-size: 12px; }
.res-bill-img { width: 52px; }
.tally-row { display: flex; justify-content: space-between; font-size: 24px; padding: 3px 0; animation: fadeIn 0.2s steps(3); }
.tally-total-row { display: flex; justify-content: space-between; align-items: center; border-top: 4px solid var(--line); margin-top: 8px; padding-top: 10px; font-family: var(--px); font-size: 11px; }
.tally-total { font-family: var(--px); font-size: 22px; color: var(--gold); }
.rank { text-align: center; margin-top: 16px; }
.rank small { font-family: var(--px); font-size: 9px; color: var(--muted); }
.rank-title { font-family: var(--px); font-size: clamp(14px, 2.4vw, 20px); color: var(--gold); margin-top: 8px; text-shadow: 3px 3px 0 #000; animation: starPop 0.5s cubic-bezier(.2, 1.8, .4, 1); line-height: 1.4; }
.ach-row, .miss-box { margin-top: 14px; background: var(--panel); border: 4px solid #000; box-shadow: 0 0 0 3px var(--line); padding: 12px; }
.ach-head { font-family: var(--px); font-size: 11px; color: var(--purple); margin-bottom: 10px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.ach-img { width: 38px; }
.ach b { display: block; font-family: var(--px); font-size: 10px; color: var(--gold); margin-bottom: 3px; }
.ach small { font-size: 21px; color: var(--muted); }
.miss { border-bottom: 2px dotted #2a3470; padding: 6px 0; }
.miss summary { cursor: pointer; font-size: 23px; }
.miss-a, .miss-why { font-size: 22px; padding-left: 18px; }
.miss-why { color: var(--muted); }
.hof-box { text-align: center; margin: 16px 0 4px; }
.hof-msg { font-size: 24px; margin-bottom: 10px; }

/* ─────────── Hall of Fame ─────────── */
.page-hof { max-width: 820px; }
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; position: relative; }
.tab { font-family: var(--px); font-size: 10px; background: var(--panel); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--line); padding: 10px 12px; cursor: pointer; }
.tab.on { background: var(--gold); color: #000; box-shadow: none; }
.hof-list { position: relative; background: #000; border: 4px solid var(--line); padding: 10px; }
.hof-row { display: grid; grid-template-columns: 64px 1fr 110px 52px; gap: 8px; align-items: center; font-family: var(--px); font-size: 11px; padding: 9px 6px; }
.hof-head { color: var(--muted); font-size: 8px; border-bottom: 2px solid var(--line); }
.hof-row.top1 { color: var(--gold); }
.hof-row.top2 { color: #dfe3ff; }
.hof-row.top3 { color: #f0b38a; }
.hof-row.mine { background: #1f2c6e; animation: blinkBg 1.2s steps(2) infinite; }
.hof-name { font-family: var(--body); font-size: 24px; }
.hof-score { text-align: right; }
.hof-law { text-align: center; }
.hof-law.yes { color: var(--green); }
.hof-loading, .hof-empty { text-align: center; padding: 26px 10px; font-size: 25px; }

/* ─────────── Almanac ─────────── */
.alm-group { background: var(--panel); border: 3px solid #000; box-shadow: 0 0 0 2px var(--line); margin-bottom: 10px; }
.alm-group summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; cursor: pointer; font-family: var(--px); font-size: 12px; list-style: none; }
.alm-group summary::-webkit-details-marker { display: none; }
.alm-group summary::before { content: '▶'; color: var(--gold); margin-right: 10px; font-size: 10px; }
.alm-group[open] summary::before { content: '▼'; }
.alm-group summary > span:first-child { flex: 1; }
.alm-count { color: var(--muted); }
.alm-count.full { color: var(--green); }
.alm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; padding: 0 12px 12px; }
.alm-card { background: var(--bg2); border: 2px solid var(--line); padding: 10px; font-size: 22px; }
.alm-q { color: var(--muted); }
.alm-a { color: var(--gold); margin: 6px 0; }
.alm-card.locked { display: flex; gap: 10px; align-items: center; color: #5a6399; }
.alm-lock { width: 30px; flex: none; }
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.trophy { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 3px solid #000; box-shadow: 0 0 0 2px var(--line); padding: 12px; opacity: .55; }
.trophy.got { opacity: 1; box-shadow: 0 0 0 3px var(--gold); }
.trophy-img { width: 44px; flex: none; }
.trophy b { display: block; font-family: var(--px); font-size: 10px; margin-bottom: 5px; line-height: 1.4; }
.trophy small { font-size: 21px; color: var(--muted); }

/* ─────────── Responsive ─────────── */
@media (max-width: 760px) {
  .senate-row { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .deal-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 640px) {
  body { font-size: 22px; }
  #hud { padding: 6px 10px; }
  .hud-stage { display: none; }
  .hud-heart { width: 20px; }
  .hud-score span { display: none; }
  .quiz { padding: 10px; }
  .quiz-answers { grid-template-columns: 1fr; gap: 8px; }
  .ans { min-height: 52px; font-size: 22px; }
  .quiz-powers { margin-left: 0; }
  .whack-grid { gap: 8px; }
  .hole { height: clamp(136px, 21vh, 180px); }
  .mole-img { width: 76px; }
  .mole-label { font-size: 19px; padding: 1px 4px 2px; }
  .doors { grid-template-columns: repeat(2, 1fr); }
  .door { min-height: 104px; font-size: 21px; }
  .door-img { width: 38px; }
  .conveyor { height: 104px; }
  .belt-card { width: 74%; font-size: 22px; }
  .po-field { height: 290px; }
  .po-bill { width: 72px; font-size: 16px; }
  .po-bill-img { width: 40px; }
  .amend { width: 66%; font-size: 19px; }
  .deal-meters { grid-template-columns: 1fr; gap: 8px; }
  .arena { gap: 8px; padding: 10px; }
  .boss { height: 160px; }
  .boss-img { width: 100px; margin-bottom: 24px; }
  .resolute { width: 150px; height: 44px; }
  .seal { width: 30px; height: 30px; font-size: 16px; top: 6px; left: 6px; border-width: 3px; }
  .player { min-height: 110px; }
  .player-img { width: 70px; }
  .plate-name { font-size: 9px; }
  .blitz { grid-template-columns: 1fr; justify-items: center; }
  .blitz-meters { width: 100%; }
  .blitz-clock { width: 90px; height: 90px; font-size: 34px; }
  .hof-row { grid-template-columns: 44px 1fr 84px 36px; font-size: 9px; gap: 6px; }
  .hof-name { font-size: 20px; }
  .draft-row { gap: 16px; }
  .hopper-img { width: 150px; }
  .dlg { gap: 10px; padding: 10px; }
  .dlg-portrait { width: 60px; height: 60px; }
  .dlg-portrait-img { width: 48px; }
  .dlg-text { font-size: 24px; }
  .banner-sub { font-size: 23px; }
  .stage { padding: 8px 8px 20px; }
  .scene { padding: 10px; }
}

/* ─────────── Animations ─────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes blinkBg { 50% { background: #2d3f93; } }
@keyframes twinkle { 50% { opacity: .9; } }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes avatarBob { 50% { transform: translateY(-6px); } }
@keyframes titleBob { 50% { transform: translateY(-3px); } }
@keyframes nudge { 50% { transform: translateX(4px); } }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes starPop { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
@keyframes dlgIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bannerIn { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes bannerOut { to { transform: translate(-50%, -50%) scale(1.3); opacity: 0; } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -190%); } }
@keyframes toastIn { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(calc(var(--shake) * -1), 2px); }
  40% { transform: translate(var(--shake), -2px); }
  60% { transform: translate(calc(var(--shake) * -.6), 1px); }
  80% { transform: translate(calc(var(--shake) * .6), -1px); }
}
@keyframes shakeX { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes heartBreak { 50% { transform: scale(1.4); filter: brightness(2); } 100% { transform: scale(.6); opacity: .3; } }
@keyframes belt { to { background-position: 40px 0; } }
@keyframes cardSent { to { transform: translate(-40%, 120px) scale(.4); opacity: 0; } }
@keyframes cardFall { to { transform: translate(-100%, 120px) rotate(20deg); opacity: 0; } }
@keyframes dropIn { 0% { transform: translate(0, 0); } 40% { transform: translate(120px, -40px) rotate(8deg); } 100% { transform: translate(230px, 60px) rotate(20deg) scale(.3); opacity: 0; } }
@keyframes slideIn { to { transform: translateX(260px) scale(.4); opacity: 0; } }
@keyframes glow { 50% { box-shadow: 0 0 0 6px var(--green); } }
@keyframes struck { 30% { transform: translateY(-50%) rotate(-6deg) scale(1.08); background: var(--gold); } 100% { transform: translateY(-50%) rotate(12deg) scale(.2); opacity: 0; } }
@keyframes struckBad { 30% { background: var(--red); color: #fff; } 100% { transform: translateY(-50%) scale(.2); opacity: 0; } }
@keyframes gavelBang { 50% { transform: rotate(-24deg); } }
@keyframes windup { 50% { transform: scale(1.08) translateY(-6px); } }
@keyframes bossHit { 20%, 60% { filter: brightness(3) saturate(0); transform: translateX(6px); } 40%, 80% { filter: none; transform: translateX(-6px); } }
@keyframes bossAttack { 50% { transform: translate(-70px, 50px) scale(1.12); } }
@keyframes lunge { 50% { transform: translate(60px, -40px) rotate(12deg); } }
@keyframes hurt { 20%, 60% { filter: sepia(1) hue-rotate(-50deg) saturate(6); transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes stampIn { from { transform: translate(-50%, -50%) rotate(-14deg) scale(3); opacity: 0; } to { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 1; } }
@keyframes nodePulse { 50% { stroke: #fff; } }
@keyframes dash { to { stroke-dashoffset: -22; } }
@keyframes pulse { 50% { transform: scale(1.06); } }

.law-stamp { transform-origin: center; }
.law-stamp { animation-name: lawStampIn; }
@keyframes lawStampIn { from { transform: rotate(-12deg) scale(3); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: .9; } }

.is-paused *, .is-paused *::before, .is-paused *::after { animation-play-state: paused !important; }
#overlay .modal-wrap *, .is-paused .modal-wrap * { animation-play-state: running !important; }

.reduce-motion .lt1, .reduce-motion .lt2, .reduce-motion .sc-icon-img, .reduce-motion .avatar-bob, .reduce-motion .law-banner,
.reduce-motion .conveyor, .reduce-motion .map-road-dash, .reduce-motion .rules-gavel { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .lt1, .lt2, .sc-icon-img, .avatar-bob, .law-banner, .conveyor, .map-road-dash, .rules-gavel, .sky i, .dlg-next { animation: none !important; }
}

/* ─────────── Compact layouts for phones & short screens ─────────── */
@media (max-width: 640px) {
  .senate-row { gap: 10px; }
  .podium-wrap { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'sen bubble' 'sen clock'; align-items: center; gap: 4px 12px; }
  .podium-wrap .speech { grid-area: bubble; font-size: 19px; min-height: 64px; }
  .podium-wrap .speech::after { left: -14px; bottom: auto; top: 22px; border-top-color: transparent; border-right-color: #000; transform: none; }
  .podium-wrap .windy { grid-area: sen; }
  .podium-wrap .fb-clock { grid-area: clock; }
  .windy-img { width: 76px; margin-bottom: -8px; }
  .podium { width: 104px; font-size: 6px; padding: 8px 2px 10px; }
  .chart-senate .chart-svg { max-width: 300px; }
  .chart-house .chart-svg { max-width: 400px; }
  .sig { height: 10px; }
}
@media (max-height: 720px) {
  .capitol-img { width: min(400px, 70vw); }
  .lt1, .lt2 { font-size: clamp(30px, 7vw, 60px); }
  .title-screen { gap: 10px; }
  .menu-item { padding: 7px 14px; }
  .chart-house .chart-svg { max-width: 430px; }
  .chart-senate .chart-svg { max-width: 330px; }
  .boss { height: 180px; }
}

/* ─────────── Modes ─────────── */
.mode-badge { display: inline-block; margin-top: 14px; font-family: var(--px); font-size: 10px; letter-spacing: 2px; padding: 6px 10px; border: 3px solid currentColor; }
.mode-basic { color: var(--teal); }
.mode-advanced { color: var(--gold); }
.mode-row { margin: -6px 0 12px; }
.mode-row .mode-badge { margin-top: 0; }
.card-mode h3 { font-size: 18px; margin: 8px 0 10px; }
.card-basic h3 { color: var(--teal); }
.card-advanced h3 { color: var(--gold); }
.mode-points { margin: 0; padding: 0 0 0 20px; font-size: 22px; }
.mode-points li { margin: 4px 0; }
.mode-stages { margin-top: 12px; font-family: var(--px); font-size: 10px; color: var(--muted); }
.tab-mode { min-width: 118px; }
.tab-mode.on { background: var(--teal); }
.tag-adv { float: right; font-family: var(--px); font-size: 7px; color: var(--gold); border: 2px solid var(--gold); padding: 2px 4px; margin: 0 0 4px 6px; }
.vp-note { color: var(--teal); }

/* Basic mode shows 3 answer choices */
.quiz-answers.ans-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .quiz-answers.ans-3 { grid-template-columns: 1fr; }
}
