:root {
  --bg: #0e1020; --bg2: #171a30; --card: #1d2140; --line: #2c3160;
  --text: #f3f2ff; --muted: #9a9fc4; --accent: #ffb547; --accent2: #ff7a59; --pink: #ec297b;   /* Morty pink, from the logo gradient */
  --good: #47e0a0; --bad: #ff5d73;
  --radius: 16px; --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: radial-gradient(1200px 600px at 50% -10%, #23275a 0%, var(--bg) 60%); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
#app { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.15; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.45rem; }
p { line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0 14px; }
.pill { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .9rem; white-space: nowrap; }
.pill b { color: var(--pink); }
.dots { display: flex; gap: 4px; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.dot.on { transform: scale(1.15); }
.dot.one { background: var(--good); }
.dot.two { background: var(--accent); }
.dot.three { background: var(--bad); }
.linkish { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .9rem; padding: 0; width: auto; display: inline; margin: 0; }

/* buttons */
button { display: block; width: 100%; font: inherit; font-size: 1.05rem; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; margin: 10px 0; text-align: left;
  cursor: pointer; box-shadow: var(--shadow); transition: transform .08s, background .2s, border-color .2s; }
button:active { transform: scale(.985); }
/* Hover only on a real mouse. `nohover` is set on every new question and cleared
   by the first pointer move, so an option sitting under a parked cursor after a
   re-render does not light up as if it were already chosen. */
@media (hover: hover) and (pointer: fine) {
  button:hover { border-color: var(--pink); }
  body.nohover button.option:not(.right):not(.wrong):hover { border-color: var(--line); }
}
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1200; border: none; font-weight: 700; text-align: center; }
button.ghost { background: transparent; box-shadow: none; text-align: center; color: var(--muted); }
button.option { display: flex; align-items: center; gap: 12px; }
.rooms { color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: 12px; opacity: .85; }
.prompt .rooms { font-weight: 400; }
.rooms.sm { font-size: .82rem; margin-top: 3px; }
button.option small.venue { display: block; color: var(--muted); font-size: .88rem; font-weight: 600; margin-top: 7px; }
.prompt .venue { color: var(--muted); font-size: .95rem; font-weight: 400; margin-top: 11px; }
button.option .key { flex: 0 0 30px; height: 30px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--muted); font-size: .9rem; }
button.option.wrong { border-color: var(--bad); background: #3a1f2b; animation: shake .35s; }
button.option.right { border-color: var(--good); background: #1d3b34; }
button.option:disabled { cursor: default; opacity: .9; }
button.level { display: flex; align-items: center; gap: 14px; }
button.level .n { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; background: var(--bg2); border: 1px solid var(--line); color: var(--pink); }
button.level .best { margin-left: auto; text-align: right; color: var(--muted); font-size: .85rem; white-space: nowrap; }
button.level .best b { color: var(--good); display: block; font-size: 1rem; }
button.level .best .go { color: var(--pink); font-weight: 700; }
button.level .best .lock { font-size: 1.1rem; }
button.level.done { opacity: .85; cursor: default; }
button.level.locked { opacity: .45; cursor: default; }
button.level:disabled:hover { border-color: var(--line); }
.total { text-align: center; margin: -4px 0 14px; }
.total .score-big { font-size: 3.4rem; }

@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 60% { transform: scale(1.08); opacity: 1 } 100% { transform: scale(1) } }
.view { animation: rise .25s ease-out; }

/* question */
.prompt { font-size: 1.35rem; font-weight: 700; margin: 6px 0 28px; }
.prompt .name, .prompt .career { color: var(--pink); }
.prompt .career { margin-top: 10px; }   /* career sits on its own line */
.msg { min-height: 1.6em; margin-top: 28px; font-weight: 800; font-size: 1.35rem; line-height: 1.25; color: var(--bad); }
.miss-note { color: var(--muted); font-size: .85rem; margin-top: 8px; }

/* reveal card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); animation: pop .35s ease-out; }
.card .kicker { color: var(--good); font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; }
.card .points { float: right; background: var(--good); color: #05261a; font-weight: 800; border-radius: 999px; padding: 8px 16px; font-size: 1.5rem; line-height: 1; }
.card h2 { margin: 6px 0 0; }
.card .career { font-size: 1.1rem; font-weight: 700; color: var(--pink); margin: 20px 0 4px; }
.card .venue { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.card .story { margin: 12px 0 0; }

/* end */
.score-big { font-size: 3rem; font-weight: 900; color: var(--pink); line-height: 1; margin: 6px 0; }
.score-big small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.verdict { font-size: 1.05rem; margin: 6px 0 16px; }
.yearbook { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 10px 0 18px; }
.yb { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; }
.yb .pts { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--card); color: var(--good); }
.yb .pts.zero { color: var(--muted); }
.yb .who { flex: 1; }
.yb .who b { display: block; }
.yb .who .c { color: var(--accent); font-size: .95rem; }
.yb .who .v { color: var(--muted); font-size: .82rem; }

/* menu */
.hero { padding: 26px 0 10px; text-align: center; }
.hero .logo { font-size: 3.2rem; line-height: 1; margin-bottom: 10px; }
.hero .logo .mark { height: 62px; width: auto; filter: drop-shadow(0 6px 18px rgba(236, 41, 123, .45)); }
.hero h1 { font-size: clamp(1.4rem, 6.9vw, 2.2rem); white-space: nowrap; }
.hero p { color: var(--muted); margin: 6px auto 0; font-size: clamp(.8rem, 3.55vw, 1rem); white-space: nowrap; }
.row { display: flex; gap: 10px; }
.row button { margin: 10px 0; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 30px; }

/* confetti */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

/* leaderboard page */
.lb { max-width: 900px; margin: 0 auto; padding: 24px; }
.lb h1 { text-align: center; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.lb-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.lb-col h2 { font-size: 1.1rem; color: var(--accent); }
.lb-col ol { margin: 8px 0 0; padding-left: 26px; }
.lb-col li { padding: 5px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.lb-col li b { color: var(--good); }
