/*
  People Predict LOOK — "Neon Afterparty" v6
  Change the art direction here without touching questions or rules.
*/
:root {
  --bg: #0b0a10;
  --panel: #15121d;
  --panel-2: #1f1a2b;
  --ink: #f4f1ea;
  --muted: #a59fb4;
  --lime: #DFFF3F;
  --magenta: #FC368E;
  --violet: #6D43FF;
  --ga: #DFFF3F;          /* group 1 color */
  --gb: #ff7bb6;          /* group 2 color */
  --right: #DFFF3F;
  --wrong: #ff3b5c;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 1.4px),
    linear-gradient(115deg, transparent 0 85%, rgba(252,54,142,.16) 85% 86.5%, transparent 86.5%),
    linear-gradient(245deg, transparent 0 88%, rgba(109,67,255,.2) 88% 90%, transparent 90%);
  background-size: 9px 9px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

.app { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
/* Question and transition screens fit the window: no scrolling while answering */
.app[data-screen="round"], .app[data-screen="transition"] {
  height: 100vh; display: flex; flex-direction: column; overflow: hidden;
}

/* ---------- header ---------- */
.top { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 0 10px; border-bottom: 2px solid var(--panel-2); }
.logo { font-family: var(--display); font-size: 36px; line-height: 1; color: var(--lime); transform: skewX(-12deg); letter-spacing: 2px; text-shadow: 3px 3px 0 var(--magenta), 6px 6px 0 var(--violet); }
.logo { justify-self: start; }
.hud { display: flex; gap: 10px; align-items: center; justify-self: end; }
/* running total: same treatment as the big final score, centered */
.total { display: flex; align-items: baseline; gap: 8px; font-family: var(--display); line-height: .95; transform: skewX(-8deg); transition: transform .15s; }
.total span { font-size: 56px; color: var(--lime); text-shadow: 3px 3px 0 var(--magenta), 6px 6px 0 var(--violet); font-variant-numeric: tabular-nums; }
.total small { font-size: 22px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.total.glow { transform: skewX(-8deg) scale(1.14); }
.pill { font-weight: 800; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; padding: 6px 12px; background: var(--panel-2); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); transition: background .2s, transform .15s; }
.sound { font: 800 12px var(--body); text-transform: uppercase; letter-spacing: .5px; background: transparent; color: var(--ink); border: 2px solid var(--violet); padding: 6px 12px; cursor: pointer; }
.sound[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }

/* ---------- buttons ---------- */
.btn { font-family: var(--display); font-size: 24px; letter-spacing: 1.5px; text-transform: uppercase; border: none; cursor: pointer; padding: 12px 40px; clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: transform .12s ease, filter .12s ease; white-space: nowrap; }
.btn.primary { background: var(--lime); color: #0b0a10; }
.btn.primary:hover:not(:disabled) { transform: translateY(-2px) skewX(-4deg); filter: drop-shadow(4px 4px 0 var(--magenta)); }
.btn:disabled { background: #3a3546; color: #77708a; cursor: not-allowed; }
.btn.small { font-size: 18px; padding: 8px 26px; background: var(--lime); color: #0b0a10; }

/* ---------- start ---------- */
.stage { padding: 40px 0 40px; }
.kicker { color: var(--magenta); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; margin: 0 0 10px; }
.hero { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 7.8cqw, 84px); line-height: 1.02; margin: 0 0 18px; text-transform: uppercase; transform: skewX(-6deg); }
.hero .line { display: block; white-space: nowrap; }
.hero .line + .line { color: var(--lime); }
.lede { color: var(--muted); max-width: 580px; font-size: 18px; margin: 0 0 30px; }

/* ---------- transition screen ---------- */
.app[data-screen="transition"] { overflow: visible; }
html { overflow-x: hidden; }
.tr-stage { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: center; cursor: pointer; outline: none; padding-left: 14px; }
.tr-stripes { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.tr-stripes i { position: absolute; left: -40%; width: 180%; height: 26px; transform: rotate(-8deg); opacity: .5; animation: stripe 2.6s linear infinite; }
.tr-stripes i:nth-child(1) { top: 14%; background: var(--magenta); height: 10px; }
.tr-stripes i:nth-child(2) { top: 22%; background: var(--violet); height: 34px; opacity: .35; animation-duration: 3.4s; animation-direction: reverse; }
.tr-stripes i:nth-child(3) { top: 78%; background: var(--violet); height: 14px; animation-duration: 2.2s; }
.tr-stripes i:nth-child(4) { top: 86%; background: var(--magenta); height: 6px; animation-duration: 3s; animation-direction: reverse; }
@keyframes stripe { from { translate: -12% 0; } to { translate: 12% 0; } }
.tr-round { position: relative; margin: 0 0 6px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); animation: flick .6s steps(6) both; }
.tr-mode { position: relative; margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .95; font-size: clamp(64px, 11vw, 150px); color: var(--lime); text-shadow: 6px 6px 0 var(--magenta), 12px 12px 0 var(--violet); animation: modeIn .6s cubic-bezier(.2, 1.5, .4, 1) .1s both; }
.tr-mode.mode-gap { color: #b49bff; text-shadow: 6px 6px 0 var(--magenta), 12px 12px 0 #0b0a10; }
.tr-title { position: relative; margin: 26px 0 0; font-size: clamp(24px, 3vw, 36px); font-weight: 800; max-width: 900px; animation: rise .5s ease-out .65s both; }
.tr-skip { position: absolute; right: 0; bottom: 28px; background: none; border: 2px solid var(--muted); color: var(--ink); font: 800 13px var(--body); letter-spacing: 1px; text-transform: uppercase; padding: 8px 14px; cursor: pointer; animation: rise .4s ease-out 1s both; }
@keyframes modeIn { 0% { transform: translateX(-70vw) skewX(-30deg); opacity: 0; } 70% { transform: translateX(14px) skewX(-6deg); opacity: 1; } 100% { transform: translateX(0) skewX(-10deg); } }
@keyframes flick { 0% { opacity: 0; } 50% { opacity: 1; } 60% { opacity: .2; } 100% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* screen wipe */
.wipe { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.wipe i { position: absolute; top: -20%; height: 140%; width: 70%; transform: translateX(-150%) skewX(-18deg); animation: wipe .9s cubic-bezier(.7, 0, .3, 1) both; }
.wipe .w1 { background: var(--magenta); }
.wipe .w2 { background: var(--violet); animation-delay: .06s; }
.wipe .w3 { background: var(--bg); width: 120%; animation-delay: .1s; }
@keyframes wipe { 0% { transform: translateX(-160%) skewX(-18deg); } 45%, 52% { transform: translateX(-5%) skewX(-18deg); } 100% { transform: translateX(160%) skewX(-18deg); } }

/* ---------- question screen ---------- */
.q-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px 0 16px; animation: rise .35s ease-out both; }
.q-head { flex: none; }
.mode-row { display: flex; align-items: center; gap: 8px; }
.mode-tag { font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; padding: 4px 10px; border: 2px solid var(--magenta); color: var(--magenta); transform: skewX(-10deg); }
.mode-tag.mode-gap { border-color: var(--violet); color: #a88bff; }
.qmark { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); background: transparent; color: var(--ink); font: 800 10px var(--body); cursor: pointer; line-height: 1; padding: 0; }
.qmark:hover { border-color: var(--lime); color: var(--lime); }
.q-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 4vw, 48px); line-height: 1.02; margin: 8px 0 4px; transform: skewX(-5deg); }
.q-prompt { font-size: 18px; font-weight: 600; margin: 0; max-width: 900px; color: #ddd8e8; }

/* groups being compared (Find the gap) */
.compare { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0; }
.grp { padding: 12px 18px; font-family: var(--display); font-size: clamp(22px, 2.6vw, 32px); text-transform: uppercase; line-height: 1.05; letter-spacing: .5px; background: var(--panel); }
.grp small { display: block; font-family: var(--body); font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--muted); margin-bottom: 4px; }
.grp.ga { color: var(--ga); border-left: 6px solid var(--ga); }
.grp.gb { color: var(--gb); border-right: 6px solid var(--gb); text-align: right; }
.compare .vs { display: grid; place-items: center; padding: 0 18px; font-family: var(--display); font-size: 28px; color: #0b0a10; background: var(--magenta); clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }

/* survey summary with small i at top right */
.context { flex: none; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0; background: var(--panel-2); border-left: 4px solid var(--violet); }
.context > div { background: var(--panel); padding: 7px 34px 7px 12px; }
.context dt { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.context dd { margin: 1px 0 0; font-size: 14px; }
.info { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); background: var(--panel); color: var(--ink); font: 800 10px Georgia, serif; font-style: italic; cursor: pointer; padding: 0; line-height: 1; }
.info:hover { border-color: var(--lime); color: var(--lime); }

/* the answer board takes all remaining space */
.board { flex: 1; min-height: 0; position: relative; display: flex; }
.answer-area { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.round-pts { position: absolute; z-index: 3; top: -12px; left: -14px; font-family: var(--display); font-size: 30px; line-height: 1; padding: 4px 12px; color: #0b0a10; background: var(--lime); transform: skewX(-10deg) scale(0); transform-origin: left center; transition: transform .2s; pointer-events: none; }
.round-pts.on { transform: skewX(-10deg) scale(1); }
.round-pts.bump { animation: bump .3s ease-out; }
.round-pts.zero { background: var(--panel-2); color: var(--muted); }
.round-pts.gone { visibility: hidden; }
.round-pts.charge { animation: charge .28s ease-in forwards; }
@keyframes charge { 0% { transform: skewX(-10deg) scale(1); } 55% { transform: skewX(-10deg) scale(calc(1 - .18 * var(--f, 1))); } 100% { transform: skewX(-10deg) scale(calc(1 + .5 * var(--f, 1))); filter: brightness(1.7); } }
.board.quake { animation: quake .38s ease-out; }
@keyframes quake { 0%, 100% { transform: none; } 15% { transform: translate(calc(-7px * var(--f, 1)), calc(5px * var(--f, 1))); } 35% { transform: translate(calc(6px * var(--f, 1)), calc(-4px * var(--f, 1))); } 55% { transform: translate(calc(-4px * var(--f, 1)), calc(2px * var(--f, 1))); } 75% { transform: translate(calc(2px * var(--f, 1)), calc(-1px * var(--f, 1))); } }
.round-pts.fade { transition: opacity .5s; opacity: 0; }
@keyframes bump { 0% { transform: skewX(-10deg) scale(1.45); } 100% { transform: skewX(-10deg) scale(1); } }

/* order list */
.order-list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(4, 1fr); gap: 8px; touch-action: none; }
.oi { position: relative; display: grid; grid-template-columns: 48px 22px 1fr auto; align-items: center; gap: 14px; background: var(--panel); border: 2px solid var(--panel-2); padding: 0 18px 0 10px; cursor: grab; user-select: none; transition: transform .16s ease, border-color .15s, background .15s, box-shadow .15s; min-height: 48px; }
.oi:hover { border-color: #4a3d6b; }
.oi:focus-visible { outline-offset: -2px; }
.oi.grabbing { cursor: grabbing; z-index: 5; transition: none; border-color: var(--lime); background: #221d31; box-shadow: 0 14px 30px rgba(0,0,0,.6), 6px 6px 0 var(--violet); }
.oi.settling { transition: transform .13s cubic-bezier(.3, 0, .6, 1); z-index: 5; }
.rank { font-family: var(--display); font-size: clamp(26px, 3.4vh, 36px); color: var(--lime); text-align: center; transform: skewX(-8deg); }
.grip { display: grid; gap: 3px; }
.grip i { display: block; height: 3px; width: 18px; background: #5b5270; }
.oi .label { font-weight: 700; font-size: clamp(16px, 2.2vh, 20px); }
.oi .result { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 14px; }
.rank small { display: block; font-family: var(--body); font-size: 9px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); transform: skewX(8deg); margin-top: 2px; }

/* drop: slight smash */
.oi.smash { animation: smash .32s ease-out; }
@keyframes smash { 0% { transform: scale(1.04); } 35% { transform: scaleX(1.015) scaleY(.92); border-color: var(--magenta); } 70% { transform: scaleY(1.02); } 100% { transform: none; } }
.shards { position: absolute; inset: 0; pointer-events: none; }
.shards i { position: absolute; width: 5px; height: 5px; background: var(--magenta); animation: shard .42s ease-out forwards; }
.shards i:nth-child(3n) { background: var(--lime); }
@keyframes shard { to { transform: translate(var(--x), var(--y)); opacity: 0; } }

/* reveal states */
/* locked in: your order (left) vs correct order (right) */
.duel { flex: 1; min-height: 0; display: grid; grid-template-rows: auto repeat(4, 1fr); gap: 8px; animation: rise .3s ease-out both; }
.duel-head, .duel-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.duel-head h3 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); text-align: center; }
.duel-row { min-height: 44px; }
.duel-row .rank { align-self: center; }
.dc { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; background: var(--panel); border: 2px solid var(--panel-2); padding: 0 16px; transition: border-color .15s, background .15s; }
.dc .label { font-weight: 700; font-size: clamp(15px, 2.1vh, 19px); line-height: 1.2; }
.dc .mark { flex: none; font-family: var(--display); font-size: 22px; white-space: nowrap; }
.dc.truth.pending { border-style: dashed; justify-content: center; }
.dc .qm { font-family: var(--display); font-size: 24px; color: #4a4460; }
.dc.truth.in { border-color: var(--violet); animation: slamIn .34s cubic-bezier(.2, 1.4, .4, 1) both; }
.dc .side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.dc .val { font-family: var(--display); font-size: 24px; line-height: 1.1; color: var(--lime); }
.dc.mine.right { border-color: var(--right); background: #1b210b; }
.dc.mine.right .mark { color: var(--right); }
.dc.mine.wrong { border-color: var(--wrong); background: #2a0f17; }
/* perfect list: the whole comparison grows and shakes */
.duel.perfect { animation: perfect 1.3s ease-out both; transform-origin: center; }
.duel.perfect .dc { border-color: var(--lime); box-shadow: 0 0 22px rgba(223,255,63,.28); }
@keyframes perfect {
  0% { transform: scale(1); } 14% { transform: scale(1.035); }
  22% { transform: scale(1.035) translateX(-7px) rotate(-.6deg); } 30% { transform: scale(1.035) translateX(7px) rotate(.6deg); }
  38% { transform: scale(1.035) translateX(-6px) rotate(-.4deg); } 46% { transform: scale(1.035) translateX(5px) rotate(.3deg); }
  54% { transform: scale(1.035) translateX(-3px); } 62%, 82% { transform: scale(1.035); } 100% { transform: scale(1.02); }
}
}
.dc.mine.wrong .label { color: var(--wrong); text-decoration: line-through; text-decoration-thickness: 2px; }
.dc.mine.wrong .mark { color: var(--wrong); }
@keyframes slamIn { 0% { transform: translateX(40px) scale(1.08); opacity: 0; } 100% { transform: none; opacity: 1; } }

.oi.revealed { cursor: default; animation: pop .3s ease-out; }
.oi.right { border-color: var(--right); background: #1b210b; }
.oi.right .val { color: var(--right); font-family: var(--display); font-size: 24px; }
.oi .miss { color: var(--wrong); font-family: var(--display); font-size: 24px; }
.oi.wrong { border-color: var(--wrong); background: #2a0f17; animation: shake .42s ease-out; }
.oi.wrong .label { color: var(--wrong); text-decoration: line-through; text-decoration-thickness: 2px; }
.oi .was { color: var(--ink); font-size: 14px; }
.oi .was b { color: var(--lime); }
.crowd { font-size: 11px; color: var(--muted); letter-spacing: .3px; }
@keyframes pop { 0% { transform: scale(1.03); } 100% { transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* gap grid */
.gap-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.gap-opt { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--vals-h, 56px) minmax(0, 1fr) var(--vals-h, 56px); column-gap: 14px; align-items: center; text-align: left; cursor: pointer; background: var(--panel); color: var(--ink); border: 2px solid var(--panel-2); padding: 8px 16px; font: 700 17px var(--body); line-height: 1.2; transition: border-color .12s, transform .12s, background .12s; min-height: 0; }
.gap-opt:hover { border-color: var(--violet); }
.gap-opt.sel { border-color: var(--lime); background: #1c2010; }
.gap-opt.sel .letter { background: var(--lime); color: #0b0a10; }
.letter { grid-row: 1 / span 2; flex: none; font-family: var(--display); font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center; background: var(--panel-2); color: var(--lime); transform: skewX(-8deg); }
/* Choice text is centered in the card and never moves: the results strip below keeps its space */
.gap-opt .label { grid-column: 2; grid-row: 2; align-self: center; justify-self: center; text-align: center; padding-right: 56px; }
.gap-opt .letter { grid-column: 1; grid-row: 2; }
.gap-vals { grid-column: 2; grid-row: 3; height: var(--vals-h, 56px); padding-right: 56px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; font-size: 14px; line-height: 1.3; }
.gap-vals .pair { display: flex; align-items: baseline; gap: 8px; font-size: clamp(22px, 3.3vh, 30px); font-weight: 800; line-height: 1; white-space: nowrap; }
.gap-vals .pair i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); }
.gap-vals .ga { color: var(--ga); } .gap-vals .gb { color: var(--gb); }
.gap-vals .gapline { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.gap-vals .gapnum { font-family: var(--body); font-weight: 600; font-size: 16px; }
.gap-vals > * { animation: rise .25s ease-out both; }
/* 1 to 4 placing: a sticker slapped onto the top right corner of the card */
.sticker { position: absolute; z-index: 3; top: -15px; right: -8px; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; line-height: 1; padding: 4px 10px 4px 4px; background: #2c2540; color: var(--ink); white-space: nowrap; border: 2px solid var(--ink); border-radius: 3px; box-shadow: 3px 4px 0 rgba(0,0,0,.55); transform: rotate(2deg); transform-origin: 85% 50%; animation: slap .42s cubic-bezier(.3, 0, .2, 1) both; }
.sticker span { display: grid; place-items: center; width: 20px; height: 20px; background: var(--bg); color: var(--ink); font-size: 13px; border-radius: 2px; }
.sticker small { font-family: var(--body); font-size: 10px; font-weight: 800; letter-spacing: .5px; opacity: .85; }
.sticker.r0 { background: var(--lime); color: #0b0a10; font-size: 17px; border-color: #fff; --tilt: -2.5deg; transform: rotate(-2.5deg); animation-duration: .5s; }
.sticker.r0 span { color: var(--lime); }
.sticker.r1 { --tilt: 2deg; }
.sticker.r2 { --tilt: -2deg; transform: rotate(-2deg); }
.sticker.r3 { --tilt: 2deg; transform: rotate(2deg); background: var(--panel); color: var(--muted); border-color: #5b5270; animation-name: slapSoft; animation-duration: .6s; }
.sticker.r3 span { background: var(--panel-2); color: var(--muted); }
/* comes in big and lifted (far shadow), smacks flat, squashes, one corner settles */
@keyframes slap {
  0% { transform: translate(34px, -46px) rotate(calc(var(--tilt, 2deg) + 16deg)) scale(2.1); opacity: 0; box-shadow: 22px 30px 14px rgba(0,0,0,.35); }
  30% { opacity: 1; }
  52% { transform: rotate(var(--tilt, 2deg)) scale(.9, .84); box-shadow: 0 0 0 rgba(0,0,0,.6); }
  70% { transform: rotate(calc(var(--tilt, 2deg) - 1.5deg)) scale(1.07, 1.05); }
  100% { transform: rotate(var(--tilt, 2deg)) scale(1); box-shadow: 3px 4px 0 rgba(0,0,0,.55); }
}
@keyframes slapSoft {
  0% { transform: translate(10px, -14px) rotate(calc(var(--tilt, 2deg) + 6deg)) scale(1.25); opacity: 0; }
  60% { transform: rotate(var(--tilt, 2deg)) scale(.97); opacity: 1; }
  100% { transform: rotate(var(--tilt, 2deg)) scale(1); opacity: 1; }
}
.gap-opt.revealed { cursor: default; }
.gap-opt.best { border-color: var(--lime); box-shadow: 0 0 0 2px var(--lime), 0 0 30px rgba(223,255,63,.25); animation: thud .5s ease-out .2s; }
.gap-opt.best .gapnum { color: var(--lime); font-weight: 700; }
.gap-opt.rank3 .label, .gap-opt.rank3 .pair { opacity: .8; }
@keyframes thud { 0% { transform: scale(1); } 18% { transform: scale(.955); } 45% { transform: scale(1.02); } 100% { transform: none; } }
/* your pick: magenta once locked, so it never gets confused with the lime "biggest gap" */
.pick-chip { position: absolute; top: -11px; left: 96px; z-index: 2; background: var(--magenta); color: #0b0a10; font: 800 11px var(--body); letter-spacing: 1px; text-transform: uppercase; padding: 3px 9px; animation: rise .25s ease-out both; }
.pick-chip[hidden] { display: none; }
.pick-chip.done { animation: bumpChip .35s ease-out; }
@keyframes bumpChip { 0% { transform: scale(1.3); } 100% { transform: none; } }
.app[data-locked="1"] .gap-opt.sel { border-color: var(--magenta); background: #23101f; transform: none; }
.app[data-locked="1"] .gap-opt.sel .letter { background: var(--magenta); }
.app[data-locked="1"] .gap-opt.sel.best { box-shadow: 0 0 0 2px var(--lime), 0 0 30px rgba(223,255,63,.25); background: #1b210b; }
.gap-opt.wrong { animation: shake .42s ease-out; }
.gap-opt.right .pick-chip { background: var(--lime); }
.gap-opt.wrong .pick-chip { background: var(--wrong); color: #fff; }

/* bottom bar */
.bottom { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 58px; }
.instruction { color: var(--muted); margin: 0; font-size: 14px; }
.instr-label { font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: 1px; text-transform: uppercase; color: var(--magenta); margin-right: 10px; vertical-align: -2px; }
.takeaway { font-size: 17px; font-weight: 700; margin: 0; max-width: 760px; animation: rise .35s ease-out both; }

/* shatter blocks */
.shatter-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.shatter-layer i { position: absolute; background: var(--lime); }
.shatter-layer i.m { background: var(--magenta); }
.shatter-layer i.v { background: var(--violet); }
/* burst when the round points break into blocks */
.boom-flash { position: absolute; width: 260px; height: 260px; margin: -130px 0 0 -130px; background: radial-gradient(circle, rgba(244,241,234,.95) 0, rgba(223,255,63,.75) 18%, rgba(252,54,142,.35) 42%, transparent 68%); animation: boomFlash .45s ease-out forwards; }
.boom-ring { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 6px solid var(--lime); animation: boomRing .6s cubic-bezier(.1, .7, .3, 1) forwards; }
.boom-ring.two { border-color: var(--magenta); animation-duration: .8s; animation-delay: .06s; }
@keyframes boomFlash { from { transform: scale(calc(.15 * var(--f, 1))); opacity: 1; } to { transform: scale(calc(1.5 * var(--f, 1))); opacity: 0; } }
@keyframes boomRing { from { transform: rotate(45deg) scale(calc(.4 * var(--f, 1))); opacity: 1; } to { transform: rotate(45deg) scale(calc(9 * var(--f, 1))); opacity: 0; border-width: 1px; } }

/* ---------- final score ---------- */
.results-screen { padding-top: 30px; }
.final-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.final { font-family: var(--display); font-weight: 400; margin: 0; line-height: .9; transform: skewX(-8deg); }
.final span { font-size: clamp(100px, 15vw, 170px); color: var(--lime); text-shadow: 5px 5px 0 var(--magenta), 10px 10px 0 var(--violet); }
.final small { font-size: 44px; color: var(--muted); margin-left: 14px; }
.beat { min-width: 300px; max-width: 380px; background: var(--panel); border-left: 4px solid var(--magenta); padding: 14px 18px; }
.beat-num { margin: 0; font-family: var(--display); font-size: 48px; line-height: 1; color: var(--magenta); }
.beat-label { margin: 4px 0 10px; font-weight: 700; }
.beat-bar, .bar { display: block; height: 8px; background: var(--panel-2); position: relative; }
.beat-bar i, .bar i { position: absolute; inset: 0 auto 0 0; background: var(--magenta); }
.placeholder-note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.hint { color: var(--muted); margin: 30px 0 12px; }
.rounds { display: grid; gap: 8px; }
.round-card { background: var(--panel); border: 2px solid var(--panel-2); }
.round-card[open] { border-color: var(--violet); }
.round-card summary { list-style: none; display: grid; grid-template-columns: 44px 1fr auto 24px; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; }
.round-card summary::-webkit-details-marker { display: none; }
.round-card summary:hover { background: #1b1726; }
.rc-num { font-family: var(--display); font-size: 30px; color: var(--muted); text-align: center; }
.rc-main { display: flex; flex-direction: column; }
.mini { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--magenta); }
.mini.mode-gap { color: #a88bff; }
.rc-title { font-weight: 800; font-size: 18px; }
.rc-pts { font-family: var(--display); font-size: 32px; color: var(--ink); }
.rc-pts small { font-size: 15px; color: var(--muted); margin-left: 2px; }
.rc-pts.max { color: var(--lime); }
.rc-pts.zero { color: var(--wrong); }
.chev { width: 12px; height: 12px; border-right: 3px solid var(--muted); border-bottom: 3px solid var(--muted); transform: rotate(45deg); transition: transform .2s; justify-self: center; margin-top: -6px; }
.round-card[open] .chev { transform: rotate(-135deg); margin-top: 6px; }
.rc-body { padding: 4px 22px 20px 74px; animation: rise .25s ease-out both; }
.rc-prompt { color: #ddd8e8; font-weight: 600; margin: 0 0 14px; }
.rc-body .takeaway { margin: 16px 0 12px; }
/* "#% of players got a perfect score": pink for Put them in order, yellow for Find the gap */
.perfect-line { margin: 18px 0 0; font-weight: 700; font-size: 16px; }
.perfect-line b { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: .5px; margin-right: 6px; vertical-align: -3px; }
.perfect-line b.mode-order { color: var(--magenta); }
.perfect-line b.mode-gap { color: var(--lime); }
.cmp { display: grid; grid-template-columns: 1fr 1fr 0.8fr; gap: 18px; }
.cmp h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.cmp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cmp-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; background: #1b1726; padding: 7px 10px; font-size: 14px; }
.cmp-list li.ok { box-shadow: inset 3px 0 0 var(--right); }
.cmp-list li.no { box-shadow: inset 3px 0 0 var(--wrong); }
.cmp-list li.no .m { color: var(--wrong); }
.cmp-list li.ok .m { color: var(--right); font-weight: 800; }
.cmp-list .n { font-family: var(--display); color: var(--muted); }
.cmp-list .m.v { color: var(--lime); font-weight: 700; }
.crowd-list li { grid-template-columns: 22px 1fr 40px; }
.rc-source { border-top: 1px solid var(--panel-2); padding-top: 12px; font-size: 14px; color: #cfc9da; }
.rc-source p { margin: 0 0 8px; }
.links { display: flex; gap: 18px; flex-wrap: wrap; }
.links a { color: var(--lime); font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }

table.results { width: 100%; border-collapse: collapse; font-size: 14px; }
.results th { text-align: left; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--panel-2); }
.results th.ga { color: var(--ga); } .results th.gb { color: var(--gb); }
.results td { padding: 8px; border-bottom: 1px solid var(--panel-2); vertical-align: middle; }
.results .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.results tr.best td { background: rgba(223,255,63,.07); }
.results tr.best .gapv { color: var(--lime); font-weight: 800; }
.results tr.mine td:first-child { box-shadow: inset 4px 0 0 var(--magenta); }
.crowd-col { width: 170px; white-space: nowrap; color: var(--muted); }
.crowd-col .bar { display: inline-block; width: 90px; vertical-align: middle; margin-right: 6px; }
.you, .tag-right { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--magenta); }
.tag-right { color: var(--lime); }
.actions { margin: 26px 0 0; }

/* v6 mascot: the selected artwork, with movement confined to the artwork.
   These additions leave the boards, scoring and existing reveal timing alone. */
.brand { display: flex; align-items: center; gap: 5px; justify-self: start; }
.mascot { display: inline-block; flex: none; pointer-events: none; user-select: none; }
.mascot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mascot-header { width: 52px; height: 52px; }
.start { position: relative; padding-right: 265px; min-height: 470px; container-type: inline-size; }
.mascot-welcome { position: absolute; right: -18px; top: 45px; width: 285px; height: 340px; animation: mascotWelcome 2.4s ease-in-out 2; }

.mascot-points { animation: mascotPulse .85s ease-out; }
.mascot-perfect { animation: mascotCelebrate 1.4s ease-out; }
.mascot-zero { animation: mascotOops 1s ease-out; }
.mascot-final-score { display: flex; align-items: center; gap: 8px; }
.mascot-final { width: 145px; height: 175px; animation: mascotArrive 1.1s ease-out both; }
@keyframes mascotWelcome {
  0%, 100% { transform: translateY(0); filter: brightness(1); }
  50% { transform: translateY(-8px); filter: brightness(1.22); }
}
@keyframes mascotPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.12); filter: brightness(1.5); }
}
@keyframes mascotCelebrate {
  0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
  30% { transform: translateY(-7px) scale(1.15); filter: brightness(1.7); }
  55% { transform: translateY(0) scale(1.04); }
  75% { transform: translateY(-3px) scale(1.08); filter: brightness(1.3); }
}
@keyframes mascotOops {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-9deg) translateY(2px); }
  60% { transform: rotate(7deg) translateY(2px); }
}
@keyframes mascotArrive {
  from { opacity: 0; transform: translateY(14px) scale(.9); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .start { padding-right: 170px; }
  .mascot-welcome { right: -12px; top: 65px; width: 185px; height: 250px; }
  .mascot-final { width: 100px; height: 130px; }
}
@media (max-width: 540px) {
  .brand { gap: 0; }
  .mascot-header { width: 34px; height: 42px; }
  .start { padding-right: 0; }
  .mascot-welcome { position: static; display: block; width: 160px; height: 160px; margin: -22px auto 8px; }
  .mascot-final { width: 75px; height: 110px; }
  .mascot-final-score { gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot { animation: none; }
}

/* ---------- dialog ---------- */
.dlg { max-width: 520px; width: calc(100% - 32px); background: var(--panel); color: var(--ink); border: 2px solid var(--violet); padding: 24px; }
.dlg::backdrop { background: rgba(5, 4, 10, .78); }
.dlg h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 30px; margin: 0 0 10px; color: var(--lime); transform: skewX(-6deg); }
.dlg p { margin: 0 0 12px; }

/* shorter laptop screens: tighten so nothing needs scrolling */
@media (max-height: 760px) {
  .q-title { font-size: 34px; margin-top: 4px; }
  .q-prompt { font-size: 16px; }
  .q-stage { gap: 9px; padding-top: 10px; }
  .grp { padding: 8px 14px; font-size: 22px; }
  .total span { font-size: 46px; }
  .gap-opt { --vals-h: 50px; padding: 6px 14px; font-size: 16px; }
  .context dd { font-size: 13px; }
  .btn { font-size: 21px; padding: 10px 34px; }
}

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

/* v8 centered title screen */
.app[data-screen="start"] { min-height: 100svh; display: flex; flex-direction: column; }
.app[data-screen="start"] .start { flex: 1; display: grid; grid-template-rows: 1fr auto; min-height: 500px; padding: 24px 0; container-type: inline-size; }
.start-copy { align-self: center; text-align: center; width: 100%; padding: 0 0 40px; }
.start-copy .hero { font-size: clamp(19px, 6.2cqw, 72px); margin: 0 0 22px; }
.start-copy .lede { max-width: 680px; margin: 0 auto; text-wrap: balance; }
.start #playBtn { width: 100%; min-height: 64px; padding: 16px 24px; align-self: end; }
.start .mascot-welcome { position: static; display: block; width: clamp(220px, 32svh, 320px); height: auto; aspect-ratio: 1; margin: 0 auto 20px; }
@media (max-width: 540px) {
 .start .mascot-welcome { width: clamp(200px, 28svh, 260px); }
 .start-copy { padding: 0 0 28px; }
 .start-copy .lede { font-size: 16px; }
}

/* V9: reserve the original layout space while removing player comparisons from view. */
.crowd, .beat, .player-comparison, .crowd-col, .perfect-line {
  visibility: hidden;
  pointer-events: none;
}
