:root {
  --px: 4px; --vh: 100vh;
  --cream: #f4ecd0; --ink: #0d181b; --panel: rgba(13, 24, 27, .93); --dim: #8fa39a;
  --lime: #b6f24a; --gold: #ffd93b; --pink: #ff5fa2; --water: #6fd3ff; --red: #ff6b5e;
  --t0: #9fb0c2; --t1: #5aa9ff; --t2: #3de0b0; --t3: #ff9a3c; --t4: #ffd93b; --t5: #ff5fa2;
  --b: 4px; --bd: #f4ecd0;
  --f-num: 'Press Start 2P', monospace; --f-lab: 'Silkscreen', monospace; --f-txt: 'Pixelify Sans', 'Silkscreen', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #0d181b; color: var(--cream); font-family: var(--f-txt); -webkit-font-smoothing: none; font-smooth: never; touch-action: manipulation; }
button, input { font: inherit; color: inherit; }
.hide { display: none !important; }

#scene { position: fixed; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
#labels { position: fixed; left: 0; top: 0; width: 100%; height: var(--vh); pointer-events: none; overflow: hidden; }
.rl-num { position: absolute; left: 0; bottom: calc(var(--px) * 1.5); margin-left: 6px; font: 400 11px var(--f-lab); color: rgba(244, 236, 208, .8); white-space: nowrap; }
.rl-mark { position: absolute; left: 0; bottom: calc(var(--px) * 13); padding-left: 8px; border-left: 2px dashed rgba(244, 236, 208, .55); white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .55); line-height: 1.15; }
.rl-mark b { display: block; font: 700 12px var(--f-lab); color: var(--cream); letter-spacing: .04em; }
.rl-mark i { display: block; font: 400 13px var(--f-txt); font-style: normal; color: rgba(244, 236, 208, .72); }
.rl-mark.big b { color: var(--gold); font-size: 14px; }
#labelsV { position: fixed; left: 0; top: 0; width: 100%; height: var(--vh); pointer-events: none; overflow: hidden; }
.rv-num { position: absolute; right: calc(var(--px) * 14 + 6px); top: -7px; font: 400 11px var(--f-lab); color: rgba(244, 236, 208, .8); white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.rv-mark { position: absolute; right: calc(var(--px) * 14 + 6px); bottom: 100%; margin-bottom: -2px; padding: 0 6px 3px 0; border-bottom: 2px dashed rgba(244, 236, 208, .55); text-align: right; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); line-height: 1.15; }
.rv-mark b { display: block; font: 700 12px var(--f-lab); color: var(--cream); letter-spacing: .04em; }
.rv-mark i { display: block; font: 400 13px var(--f-txt); font-style: normal; color: rgba(244, 236, 208, .78); }
.rv-mark.big b { color: var(--gold); font-size: 14px; }
#crt { position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, .07) 3px, rgba(0, 0, 0, 0) 4px), radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .32) 100%); }
#flash { position: fixed; inset: 0; pointer-events: none; background: #fff; opacity: 0; }
#flash.on { animation: flash .35s steps(4) 1; }
@keyframes flash { 0% { opacity: .5 } 100% { opacity: 0 } }

#ui { position: fixed; left: 0; top: 0; width: 100%; height: var(--vh); pointer-events: none; }
#ui > * { pointer-events: auto; }

/* pixel panel: plus-shaped shadow border gives notched corners */
.panel, .hud-box, .btn, .ico {
  background: var(--panel);
  box-shadow: 0 calc(var(--b) * -1) 0 0 var(--bd), 0 var(--b) 0 0 var(--bd), calc(var(--b) * -1) 0 0 0 var(--bd), var(--b) 0 0 0 var(--bd), 0 calc(var(--b) * 2.5) 0 0 rgba(0, 0, 0, .35);
}
.btn, .ico { --bd: #f4ecd0; }

/* ── HUD ── */
#top { position: absolute; top: 18px; left: 0; right: 0; display: flex; justify-content: center; align-items: flex-start; gap: 22px; padding: 0 78px; pointer-events: none; }
.hud-box { min-width: 150px; padding: 8px 14px 9px; display: flex; flex-direction: column; gap: 3px; }
.hud-box.right { text-align: right; align-items: flex-end; }
.lab { font: 400 11px var(--f-lab); letter-spacing: .18em; color: var(--dim); text-transform: uppercase; }
.val { font: 400 22px var(--f-num); color: var(--lime); line-height: 1.1; }
.val small { font-size: 12px; margin-left: 3px; }
.val.sm { font: 600 19px var(--f-txt); color: var(--gold); white-space: nowrap; }
#hudDist.bump .val { animation: bump .25s steps(3); }
@keyframes bump { 0% { transform: scale(1.25); color: #fff } 100% { transform: scale(1) } }
#pipsWrap { flex: 0 1 300px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 6px; }
#pips { display: flex; gap: 10px; }
.pg { display: flex; gap: 3px; padding: 3px; background: rgba(13, 24, 27, .8); box-shadow: 0 0 0 2px rgba(244, 236, 208, .25); }
.pg.cur { box-shadow: 0 0 0 2px var(--cream); }
.pip { width: 11px; height: 11px; background: #25373a; }
.pip.bust { background: var(--water); animation: blink .5s steps(2) 3; }
.pg.climb { gap: 2px; } .pg.climb .pip { width: 9px; height: 11px; }
.pip.now { background: var(--cream); animation: blink 1s steps(2) infinite; }
#hudNext.bump .val { animation: bump .25s steps(3); }
body.mode-pogo #slots, body.mode-pogo #pass { display: none; }
.stair { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-bottom: 14px; border-bottom: 3px solid var(--cream); }
.stair i { flex: 1; min-height: 3px; background: #25373a; transform-origin: bottom; animation: grow .5s steps(6) both; }
.stair i.bust { background: repeating-linear-gradient(45deg, var(--red) 0 3px, #25373a 3px 6px); }
.lg-row.cl { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px dashed #20363a; }
#pipLab { font: 400 11px var(--f-lab); letter-spacing: .2em; color: var(--cream); text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.t0 { background: var(--t0) } .t1 { background: var(--t1) } .t2 { background: var(--t2) } .t3 { background: var(--t3) } .t4 { background: var(--t4) } .t5 { background: var(--t5) }
.c0 { color: var(--t0) } .c1 { color: var(--t1) } .c2 { color: var(--t2) } .c3 { color: var(--t3) } .c4 { color: var(--t4) } .c5 { color: var(--t5) }

#corner { position: absolute; top: 18px; right: 18px; display: flex; flex-direction: column; gap: 14px; }
.ico { width: 38px; height: 38px; border: 0; cursor: pointer; font: 400 14px var(--f-num); display: grid; place-items: center; color: var(--cream); }
.ico:hover { background: #1c3035; }
body.at-title #btnMenu { display: none; }
body.mode-pogo #corner { right: calc(var(--px) * 13 + 14px); }
.ico.off { color: #5d6f6a; }
.ico svg { width: 22px; height: 22px; shape-rendering: crispEdges; fill: currentColor; }

/* ── buttons ── */
.btn { border: 0; cursor: pointer; padding: 12px 18px; font: 700 15px var(--f-lab); letter-spacing: .12em; color: var(--ink); background: var(--lime); transition: transform .05s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 calc(var(--b) * -1) 0 0 var(--bd), 0 var(--b) 0 0 var(--bd), calc(var(--b) * -1) 0 0 0 var(--bd), var(--b) 0 0 0 var(--bd); }
a.btn { text-decoration: none; display: inline-block; }
.btn.big { padding: 18px 26px; font-size: 20px; width: 100%; }
.btn.big span { display: inline-block; animation: nudge 1s steps(2) infinite; margin: 0 10px; }
@keyframes nudge { 50% { transform: translateX(4px) } }
.btn.ghost { background: var(--panel); color: var(--cream); font-weight: 400; font-size: 12px; padding: 10px 12px; }
.btn.ghost:hover { background: #1c3035; }
.btn.sq { padding: 0 14px; height: 52px; font-size: 20px; }
.btn.ghost.sq { font-size: 11px; }
.btn[disabled] { opacity: .45; cursor: default; }

/* ── title ── */
#title { position: absolute; top: 5%; left: 50%; transform: translateX(-50%); width: min(94vw, 780px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo { font: 400 clamp(34px, 9.4vw, 92px) var(--f-num); letter-spacing: .02em; line-height: 1; display: flex; }
.logo span { display: inline-block; color: var(--lime); text-shadow: 0 .09em 0 #2f9140, 0 .17em 0 #143424, .07em .24em 0 rgba(0, 0, 0, .35); animation: hopin .7s cubic-bezier(.3, 1.6, .5, 1) both, bob 2.8s steps(6) infinite; }
.logo span.gold { color: var(--gold); text-shadow: 0 .09em 0 #c98a16, 0 .17em 0 #5a3a08, .07em .24em 0 rgba(0, 0, 0, .35); }
@keyframes hopin { 0% { transform: translateY(-140%) scaleY(1.3); opacity: 0 } 60% { transform: translateY(8%) scaleY(.8); opacity: 1 } 100% { transform: none } }
@keyframes bob { 0%, 100% { translate: 0 0 } 50% { translate: 0 -.06em } }
.sub { margin-top: 28px; font: 400 clamp(11px, 2vw, 17px) var(--f-num); letter-spacing: .55em; padding-left: .55em; color: #fff; text-shadow: 0 3px 0 rgba(20, 52, 36, .7); }
.tag { margin-top: 16px; font: 400 clamp(12px, 1.8vw, 15px) var(--f-lab); letter-spacing: .12em; color: #17323a; background: rgba(244, 236, 208, .82); padding: 5px 12px; }
.modes { margin-top: 30px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.mode { padding: 14px 16px 16px; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; cursor: pointer; transition: translate .08s steps(2); }
.mode.sel { --bd: var(--lime); translate: 0 -4px; }
.m-ico { width: 78px; height: 78px; image-rendering: pixelated; image-rendering: crisp-edges; background: #172a2e; box-shadow: inset 0 0 0 2px #2c4448; }
.m-name { font: 700 21px var(--f-lab); letter-spacing: .1em; color: #fff; }
.m-tag { display: inline-block; margin-top: 6px; font: 700 12px var(--f-lab); letter-spacing: .2em; color: var(--ink); background: var(--gold); padding: 3px 7px; }
.mode[data-mode="pogo"] .m-tag { background: var(--water); }
.m-blurb { grid-column: 1 / -1; font: 400 16px var(--f-txt); line-height: 1.25; color: var(--cream); min-height: 40px; }
.m-meta { grid-column: 1 / -1; font: 400 11px var(--f-lab); letter-spacing: .16em; color: var(--dim); }
.m-btns { grid-column: 1 / -1; display: flex; gap: 14px; margin-top: 6px; align-items: stretch; }
.m-btns .m-play { flex: 1; width: auto; padding: 13px 8px; font-size: 16px; }
.m-btns .m-play span { margin: 0 6px 0 0; }
.foot { margin-top: 24px; display: flex; gap: 18px; justify-content: center; }
.tabs { display: flex; gap: 12px; margin: 14px 0 2px; }
.tab { border: 0; cursor: pointer; padding: 8px 12px; font: 700 12px var(--f-lab); letter-spacing: .14em; color: var(--dim); background: #172a2e; }
.tab.on { color: var(--ink); background: var(--lime); }
.fine a { color: var(--cream); }
.title-actions { margin-top: 32px; width: min(92vw, 560px); display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-r { display: flex; gap: 16px; }
.meta { font: 400 12px var(--f-lab); letter-spacing: .2em; color: var(--cream); background: rgba(13, 24, 27, .78); padding: 8px 10px; }

/* ── prompt card ── */
#card, #recap { position: absolute; top: 108px; left: 50%; width: min(94vw, 620px); translate: -50% 0; padding: 16px 20px 18px; }
#card.in, #recap.in { animation: cardin .32s steps(6) both; }
@keyframes cardin { 0% { transform: translateY(-24px); opacity: 0 } 100% { transform: none; opacity: 1 } }
@media (min-width: 1040px) { body.mode-pogo #card, body.mode-pogo #recap { left: 4vw; translate: 0 0; width: min(50vw, 620px); } }
.cat { display: flex; justify-content: space-between; align-items: center; font: 700 12px var(--f-lab); letter-spacing: .2em; color: var(--gold); }
.cat span:last-child, .cat i { color: var(--dim); font-weight: 400; font-style: normal; }
#q, #recap h3 { margin: 8px 0 12px; font: 700 clamp(24px, 4.4vw, 36px) var(--f-txt); line-height: 1.08; color: #fff; }
#recap h3 { font-size: clamp(18px, 3vw, 24px); color: var(--cream); font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { position: relative; min-height: 56px; padding: 6px 8px 7px; background: #172a2e; box-shadow: inset 0 0 0 2px #2c4448; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.slot .k { font: 400 10px var(--f-lab); letter-spacing: .14em; color: var(--dim); display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; overflow: hidden; }
.slot .a { font: 600 18px var(--f-txt); line-height: 1.05; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.slot .p { font: 400 10px var(--f-num); }
.slot.cur { box-shadow: inset 0 0 0 2px var(--cream); animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 2px var(--lime) } }
.slot.cur .a { color: var(--dim); font-weight: 400; font-size: 15px; text-transform: none; white-space: normal; }
.slot.cur .a b { color: var(--gold); font-weight: 600; text-transform: capitalize; }
.slot.fill { animation: pop .3s steps(4); }
.slot.fill::after { content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: var(--w, 0%); background: currentColor; }
@keyframes pop { 0% { transform: scale(1.12) } 100% { transform: scale(1) } }
.slot.bust { box-shadow: inset 0 0 0 2px var(--water); color: var(--water); }
.slot.bust .a { color: var(--water); text-decoration: line-through; }
.slot.dead { opacity: .4; }
.msg { height: 24px; margin-top: 8px; font: 400 13px var(--f-lab); letter-spacing: .06em; color: var(--dim); line-height: 24px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.bad { color: var(--red); } .msg.good { color: var(--lime); } .msg.wet { color: var(--water); }
.msg b { text-transform: capitalize; font-weight: 700; }
.inrow { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.inrow.locked { opacity: .55; }
#ans { flex: 1; min-width: 0; height: 52px; padding: 0 14px; font: 600 24px var(--f-txt); color: var(--ink); background: var(--cream); border: 0; outline: 0; box-shadow: 0 -4px 0 0 #fff, 0 4px 0 0 #fff, -4px 0 0 0 #fff, 4px 0 0 0 #fff; caret-color: #2f9140; }
#ans::placeholder { color: #9aa58f; font-weight: 400; }
#ans:focus { box-shadow: 0 -4px 0 0 var(--lime), 0 4px 0 0 var(--lime), -4px 0 0 0 var(--lime), 4px 0 0 0 var(--lime); }
.shake { animation: shake .3s steps(6); }
@keyframes shake { 0%, 100% { translate: 0 } 20% { translate: -8px } 40% { translate: 8px } 60% { translate: -5px } 80% { translate: 5px } }
.timer { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; width: 100%; height: 100%; shape-rendering: crispEdges; }
.timer .tbg { fill: #172a2e; stroke: var(--cream); stroke-width: 2; }
#tnum { position: relative; font: 400 16px var(--f-num); color: var(--lime); }
.timer.low #tnum { color: var(--red); animation: blink .5s steps(2) infinite; }
.timer.paused #tnum { color: var(--dim); }
@keyframes blink { 50% { opacity: .25 } }
#tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #172a2e; }
#tbar i { display: block; height: 100%; width: 100%; background: var(--lime); }
#tbar.low i { background: var(--red); }
.countdown { margin-top: 12px; text-align: center; font: 400 13px var(--f-lab); letter-spacing: .2em; color: var(--dim); }
.countdown b { color: var(--lime); font: 400 15px var(--f-num); margin-left: 6px; }

/* ── recap ── */
.rr { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 2px dashed #2c4448; animation: rowin .25s steps(4) both; }
@keyframes rowin { 0% { opacity: 0; translate: -12px } }
.rr .k { font: 400 10px var(--f-lab); letter-spacing: .18em; color: var(--dim); }
.rr .a { font: 600 19px var(--f-txt); text-transform: capitalize; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr .a small { font: 400 12px var(--f-lab); color: var(--dim); text-transform: none; margin-left: 8px; }
.rr .t { font: 700 10px var(--f-lab); letter-spacing: .1em; }
.rr .p { font: 400 12px var(--f-num); min-width: 64px; text-align: right; }
.rr.wet .a { color: var(--water); text-decoration: line-through; } .rr.wet .p, .rr.wet .t { color: var(--water); }
.rr.none .a { color: var(--dim); font-weight: 400; }
.reveal { margin: 12px 0 16px; font: 400 15px var(--f-txt); color: var(--dim); line-height: 1.5; }
.reveal b { color: #fff; text-transform: capitalize; font-weight: 600; } .reveal .c5 { font-weight: 700; }

/* ── results ── */
#results, #how { position: absolute; inset: 0; overflow-y: auto; padding: 26px 14px 60px; background: rgba(6, 12, 16, .35); display: flex; justify-content: center; align-items: flex-start; }
#how { background: rgba(6, 12, 16, .7); z-index: 5; }
.res-inner, .how-inner { width: min(100%, 640px); padding: 18px 22px 22px; animation: cardin2 .4s steps(8) both; }
@keyframes cardin2 { 0% { translate: 0 30px; opacity: 0 } }
.brand { font: 400 14px var(--f-num) !important; color: var(--lime) !important; letter-spacing: .05em; }
.res-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 14px 0 6px; }
.bigm { font: 400 clamp(44px, 12vw, 76px) var(--f-num); color: #fff; line-height: 1; text-shadow: 0 5px 0 #2f9140; }
.bigm small { font-size: .32em; color: var(--lime); margin-left: 6px; text-shadow: none; }
.rank { font: 700 17px var(--f-lab); letter-spacing: .14em; color: var(--gold); }
.where { font: 400 16px var(--f-txt); color: var(--cream); margin-top: 4px; }
.sec { margin-top: 20px; }
.sec-h { display: flex; justify-content: space-between; font: 700 12px var(--f-lab); letter-spacing: .2em; color: var(--lime); border-bottom: 2px dashed #2c4448; padding-bottom: 6px; margin-bottom: 10px; }
.sec-h i { font-style: normal; font-weight: 400; color: var(--dim); letter-spacing: .1em; }
#hist { display: flex; align-items: flex-end; gap: 2px; height: 110px; border-bottom: 3px solid var(--cream); }
#hist .bar { flex: 1; background: #3d6a5a; min-height: 2px; position: relative; transform-origin: bottom; animation: grow .6s steps(8) both; }
#hist .bar.lo { background: #6f9a82; } #hist .bar.you { background: var(--gold); }
#hist .bar.you::before { content: 'YOU'; position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50%; font: 700 11px var(--f-lab); color: var(--ink); background: var(--gold); padding: 2px 5px; }
#hist .bar.you::after { content: ''; position: absolute; bottom: 100%; left: 50%; translate: -50%; border: 4px solid transparent; border-top-color: var(--gold); border-bottom: 0; margin-bottom: 4px; }
@keyframes grow { 0% { transform: scaleY(0) } }
.axis { display: flex; justify-content: space-between; font: 400 10px var(--f-lab); color: var(--dim); margin-top: 5px; }
.pct { margin-top: 10px; font: 700 13px var(--f-lab); letter-spacing: .16em; color: var(--lime); }
#log svg { width: 100%; height: auto; display: block; shape-rendering: crispEdges; }
#log .lq { font: 600 13px var(--f-txt); fill: var(--cream); } #log .la { font: 400 10px var(--f-lab); fill: var(--dim); }
.lg-row { display: grid; grid-template-columns: 1fr; gap: 3px; margin-bottom: 12px; }
.lg-q { font: 600 14px var(--f-txt); color: var(--cream); display: flex; justify-content: space-between; gap: 10px; }
.lg-q i { font: 400 11px var(--f-num); font-style: normal; color: var(--lime); white-space: nowrap; }
.lg-track { position: relative; height: 34px; background: linear-gradient(to bottom, transparent 0 27px, #244a66 27px 31px, transparent 31px); }
.lg-hop { position: absolute; bottom: 5px; height: 28px; border: 3px solid currentColor; border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; animation: grow .5s steps(6) both; transform-origin: bottom left; }
.lg-hop.wet { border-style: dashed; color: var(--water); }
.lg-pad { position: absolute; bottom: 2px; width: 9px; height: 5px; margin-left: -4px; background: #3aa055; }
.lg-a { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 400 12px var(--f-lab); }
.lg-a span { text-transform: capitalize; } .lg-a .wet { color: var(--water); text-decoration: line-through; } .lg-a .bn { color: var(--gold); text-transform: none; }
.res-actions { display: flex; gap: 16px; margin-top: 22px; align-items: stretch; }
.res-actions .big { flex: 1; width: auto; } .res-actions .ghost { flex: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; text-align: center; }
.stats div { background: #172a2e; padding: 9px 4px; } .stats b { display: block; font: 400 15px var(--f-num); color: #fff; } .stats span { font: 400 9px var(--f-lab); letter-spacing: .12em; color: var(--dim); }
.nextin { margin-top: 14px; text-align: center; font: 400 12px var(--f-lab); letter-spacing: .16em; color: var(--cream); }
.nextin b { font: 400 12px var(--f-num); color: var(--lime); margin-left: 6px; }
.fine { margin-top: 12px; font: 400 12px var(--f-txt); color: #6f837b; text-align: center; line-height: 1.4; }

/* ── how to play ── */
.how-inner ol { margin: 14px 0 6px 0; list-style: none; counter-reset: n; }
.how-inner li { counter-increment: n; position: relative; padding: 6px 0 6px 38px; font: 400 17px var(--f-txt); line-height: 1.3; color: var(--cream); }
.how-inner li::before { content: counter(n); position: absolute; left: 0; top: 6px; width: 24px; height: 24px; display: grid; place-items: center; font: 400 10px var(--f-num); background: var(--lime); color: var(--ink); }
.how-inner b { color: #fff; } .how-inner em { color: var(--gold); font-style: normal; } .splash-t { color: var(--water); font-weight: 700; }
.x { background: none; border: 0; cursor: pointer; font: 400 14px var(--f-num); color: var(--cream) !important; padding: 4px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 18px; }
.tiers div { padding: 6px 8px; background: #172a2e; font: 700 10px var(--f-lab); letter-spacing: .1em; border-left: 6px solid currentColor; }
.tiers i { display: block; font: 400 10px var(--f-lab); font-style: normal; color: var(--dim); margin-top: 2px; }

/* ── floaters & toast ── */
#floaters { position: absolute; inset: 0; pointer-events: none !important; overflow: hidden; }
.fl { position: absolute; translate: -50% -100%; text-align: center; white-space: nowrap; animation: floatup 1.9s steps(24) both; text-shadow: 0 3px 0 rgba(0, 0, 0, .65); }
.fl .n { font: 400 24px var(--f-num); } .fl .t { font: 700 13px var(--f-lab); letter-spacing: .16em; margin-top: 5px; } .fl .s { font: 400 13px var(--f-txt); color: #fff; margin-top: 2px; }
.fl.big .n { font-size: 34px; }
@keyframes floatup { 0% { transform: translateY(14px) scale(.6); opacity: 0 } 12% { transform: translateY(0) scale(1.15); opacity: 1 } 20% { transform: scale(1) } 80% { opacity: 1 } 100% { transform: translateY(-46px); opacity: 0 } }
.bubble { position: absolute; translate: -20% -100%; background: var(--cream); color: var(--ink); padding: 6px 10px; font: 700 14px var(--f-lab); box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink); animation: bub 1.3s steps(10) both; }
.bubble::after { content: ''; position: absolute; left: 10px; top: 100%; width: 6px; height: 6px; background: var(--cream); box-shadow: -3px 0 0 var(--ink), 3px 0 0 var(--ink), 0 3px 0 var(--ink); margin-top: 3px; }
@keyframes bub { 0% { transform: scale(0) } 15% { transform: scale(1.1) } 25%, 80% { transform: scale(1); opacity: 1 } 100% { opacity: 0 } }
#toast { position: absolute; left: 50%; bottom: 90px; translate: -50%; padding: 10px 16px; background: var(--cream); color: var(--ink); font: 700 13px var(--f-lab); letter-spacing: .1em; box-shadow: 0 6px 0 rgba(0, 0, 0, .4); animation: cardin2 .2s steps(4); z-index: 9; white-space: nowrap; }
.lm-toast { position: absolute; left: 50%; top: 62%; translate: -50%; text-align: center; animation: lm 2.6s steps(26) both; text-shadow: 0 3px 0 rgba(0, 0, 0, .6); white-space: nowrap; }
.lm-toast b { display: block; font: 700 18px var(--f-lab); letter-spacing: .2em; color: var(--gold); } .lm-toast i { font: 400 15px var(--f-txt); font-style: normal; color: #fff; }
@keyframes lm { 0% { opacity: 0; transform: translateX(-30px) } 10%, 80% { opacity: 1; transform: none } 100% { opacity: 0; transform: translateX(30px) } }

/* ── small screens ── */
@media (max-width: 720px) {
  :root { --b: 3px; }
  #top { top: 10px; gap: 10px; padding: 0 10px; justify-content: space-between; }
  .hud-box { min-width: 0; padding: 5px 9px 6px; } .val { font-size: 15px; } .val.sm { font-size: 13px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; } .lab { font-size: 9px; letter-spacing: .1em; }
  #pipsWrap { display: none; }
  #corner { top: auto; bottom: 64px; right: 10px; gap: 10px; } .ico { width: 32px; height: 32px; }
  body.playing #corner { top: 10px; bottom: auto; right: 10px; }
  body.playing #corner .ico:not(#btnMenu) { display: none; }
  body.playing #top { padding-right: 54px; }
  body.mode-pogo #corner { right: calc(var(--px) * 13 + 8px); }
  body.mode-pogo.playing #corner { right: 10px; }
  .modes { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; } .mode { padding: 10px 12px 12px; gap: 4px 12px; } .m-ico { width: 52px; height: 52px; } .m-name { font-size: 17px; } .m-blurb { font-size: 14px; min-height: 0; } .foot { margin-top: 16px; }
  .rv-mark i { display: none; } .rv-mark b { font-size: 10px; } .rv-num { font-size: 9px; }
  #card, #recap { top: 66px; padding: 11px 12px 13px; }
  #q { margin: 5px 0 8px; } .slots { gap: 6px; } .slot { min-height: 48px; padding: 4px 6px 6px; } .slot .a { font-size: 14px; } .slot.cur .a { font-size: 12px; }
  .inrow { gap: 10px; } #ans { height: 44px; font-size: 19px; } .timer { width: 40px; height: 44px; } #tnum { font-size: 12px; } .btn.sq { height: 44px; padding: 0 10px; }
  .msg { font-size: 11px; height: auto; min-height: 32px; line-height: 16px; margin-top: 5px; white-space: normal; }
  .countdown { letter-spacing: .08em; font-size: 12px; }
  #title { top: 5%; } .sub { margin-top: 18px; } .title-actions { margin-top: 22px; gap: 16px; } .btn.big { font-size: 15px; padding: 15px 10px; } .btn.big span { margin: 0 4px; }
  .row { justify-content: center; } .rr { grid-template-columns: 38px 1fr auto; } .rr .t { display: none; }
  .res-inner, .how-inner { padding: 14px 14px 18px; } .stats b { font-size: 12px; } .res-actions { flex-direction: column; }
  .rl-mark i { display: none; } .tiers { grid-template-columns: repeat(2, 1fr); } .how-inner li { font-size: 15px; }
  .fl .n { font-size: 17px; } .fl.big .n { font-size: 22px; }
}
@media (max-height: 700px) {
  #top { top: 10px; } .hud-box { padding: 5px 12px 6px; } .val { font-size: 17px; } .val.sm { font-size: 15px; }
  #card, #recap { top: 74px; padding: 11px 16px 13px; }
  #q { margin: 4px 0 8px; font-size: clamp(22px, 4vw, 28px); } #recap h3 { margin: 3px 0 4px; font-size: 18px; }
  .rr { padding: 4px 0; } .rr .a { font-size: 16px; } .reveal { margin: 7px 0 10px; font-size: 13px; line-height: 1.35; }
  #recap .btn.big { padding: 11px 20px; font-size: 16px; }
  .slot { min-height: 50px; } .msg { margin-top: 5px; } .inrow { margin-top: 4px; } #ans, .btn.sq { height: 46px; } .timer { width: 46px; height: 46px; }
  #title { top: 3%; } .modes { margin-top: 18px; } .m-ico { width: 56px; height: 56px; } .m-blurb { font-size: 14px; min-height: 0; } .foot { margin-top: 14px; } .sub { margin-top: 16px; } .btn.big { padding: 14px 20px; }
}
@media (max-height: 560px) { #title { top: 3%; } .title-actions { margin-top: 14px; } .tag { display: none; } }
@media (prefers-reduced-motion: reduce) { .logo span, .btn.big span { animation: none; } }
