:root {
  --bg: #0f1226;
  --bg-2: #151936;
  --panel: #1b2044;
  --panel-2: #242a57;
  --line: #313874;
  --ink: #f6f2ea;
  --muted: #a9aed0;
  --orange: #ff8a1f;
  --orange-2: #ffb35c;
  --banana: #ffd23f;
  --red: #ff4d5e;
  --green: #34d399;
  --blue: #4dabf7;
  --pink: #ff6fae;
  --purple: #b48cff;
  --ricky: #ff5d73;
  --steve: #4dabf7;
  --karl: #ff8a1f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --display: "Bungee", "Impact", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 138, 31, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(77, 171, 247, .12), transparent 60%),
    var(--bg);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--orange-2); }
button, input { font: inherit; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--banana); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: rgba(15, 18, 38, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand-text { font-family: var(--display); font-size: 18px; letter-spacing: .5px; white-space: nowrap; }
.brand-text em { font-style: normal; color: var(--orange); }
.onair {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: 11px; letter-spacing: 1px;
  color: #fff; background: #3a0d14; border: 1px solid var(--red);
  padding: 3px 8px; border-radius: 6px;
}
.onair .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 15px; white-space: nowrap; }
.topnav a:hover { color: var(--orange-2); }
.me-points { color: var(--banana); }
.icon-btn { background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 16px 40px; outline: none; }
main:focus, main:focus-visible { outline: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 10px 16px; border-radius: 12px; font-weight: 800; cursor: pointer;
  text-decoration: none; transition: transform .08s ease, background .2s, border-color .2s;
}
.btn:hover { border-color: var(--orange); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #241100; border-color: transparent; box-shadow: 0 6px 0 #b85a07; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { box-shadow: 0 3px 0 #b85a07; transform: translateY(3px); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 14px 20px; font-size: 17px; }
.btn-small { padding: 7px 12px; font-size: 14px; }
:focus-visible { outline: 3px solid var(--banana); outline-offset: 2px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; margin-bottom: 22px; }
.kicker { font-family: var(--display); font-size: 12px; letter-spacing: 1.5px; color: var(--banana); margin: 0 0 8px; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 0 0 14px; }
.orange { color: var(--orange); }
.lede { color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.player-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.player-row label { font-weight: 800; color: var(--muted); }
.player-row input {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 9px 12px; border-radius: 10px; width: 200px; max-width: 100%;
}
.rank-chip { background: rgba(255, 210, 63, .12); color: var(--banana); border: 1px solid rgba(255, 210, 63, .4); padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; }

  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 10px;
  font-family: var(--display); font-size: 16px; text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
/* heights roughly to scale: Steve is six foot seven */

.karlism {
  background: linear-gradient(135deg, rgba(255, 138, 31, .18), rgba(255, 210, 63, .08));
  border: 1px solid rgba(255, 138, 31, .4); border-radius: var(--radius);
  padding: 16px 20px; margin: 10px 0 28px;
}
.karlism-label { font-family: var(--display); font-size: 12px; letter-spacing: 1px; color: var(--orange-2); }
.karlism blockquote { margin: 6px 0 4px; font-size: 20px; font-weight: 800; transition: opacity .4s; }
.karlism-src { color: var(--muted); font-size: 13px; }

.section-title { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 26px 0 12px; }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mode {
  position: relative; text-align: left; cursor: pointer; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; gap: 14px; align-items: flex-start; min-height: 112px;
  transition: transform .15s ease, border-color .2s;
  overflow: hidden;
}
.mode::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent, var(--orange)); }
.mode:hover { transform: translateY(-3px); border-color: var(--accent, var(--orange)); }
.mode-icon { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font-size: 30px; background: var(--panel-2); }
.mode-icon img { width: 100%; height: 100%; object-fit: cover; }
.mode h3 { margin: 0 0 4px; font-size: 17px; font-weight: 900; }
.mode p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.mode .best { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--banana); }
.mode .tag { display: inline-block; vertical-align: middle; margin-left: 6px; font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 999px; background: var(--red); color: #fff; letter-spacing: .5px; }
@media (min-width: 960px) {
  .modes { grid-template-columns: repeat(4, 1fr); }
  .mode.featured { grid-column: span 2; min-height: 120px; }
  .mode.featured .mode-icon { flex-basis: 64px; width: 64px; height: 64px; font-size: 36px; }
  .mode.featured h3 { font-size: 20px; }
}

.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 26px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 22px; font-weight: 400; color: var(--banana); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }

.challenge-banner {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(135deg, #3a0d14, #24113d); border: 1px solid var(--red);
  padding: 14px 16px; border-radius: var(--radius); margin-bottom: 20px;
}
.challenge-banner .big { font-size: 28px; }
.challenge-banner p { margin: 0; flex: 1 1 260px; }

/* ---------- play ---------- */
.play-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.play-title { flex: 1; font-family: var(--display); font-size: 18px; text-align: center; }
.score-box { font-family: var(--display); font-size: 22px; color: var(--banana); min-width: 90px; text-align: right; }
.score-box small { font-family: var(--body); font-size: 12px; color: var(--muted); margin-left: 4px; }
.score-box.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.25); } }
.progress { height: 8px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--banana)); transition: width .3s; }
.play-meta { display: flex; justify-content: space-between; align-items: center; margin: 10px 2px 6px; color: var(--muted); font-weight: 800; font-size: 14px; }
.streak { color: var(--orange-2); }
.timer { font-variant-numeric: tabular-nums; }
.timer.low { color: var(--red); }
.timer-track { height: 4px; background: var(--panel); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.timer-bar { height: 100%; width: 100%; background: var(--green); transform-origin: left; }
.timer-bar.low { background: var(--red); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.q-card { position: relative; }
.q-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.q-avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 3px solid var(--accent, var(--orange)); background: var(--panel-2); display: grid; place-items: center; font-size: 32px; }
.q-avatar img { width: 100%; height: 100%; object-fit: cover; }
.q-cat { font-family: var(--display); font-size: 12px; letter-spacing: 1px; color: var(--accent, var(--orange)); }
.q-diff { color: var(--muted); font-size: 13px; font-weight: 700; }
.q-text { font-size: clamp(19px, 2.6vw, 24px); font-weight: 900; line-height: 1.3; margin: 4px 0 18px; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: var(--panel-2); color: var(--ink); border: 2px solid var(--line);
  border-radius: 14px; padding: 12px 14px; font-weight: 800; font-size: 16px; min-height: 58px;
  transition: border-color .15s, background .15s, transform .08s;
}
.opt:hover:not(:disabled) { border-color: var(--orange); }
.opt .key { flex: 0 0 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); color: var(--banana); font-family: var(--display); font-size: 14px; }
.opt.correct { background: rgba(52, 211, 153, .18); border-color: var(--green); }
.opt.wrong { background: rgba(255, 77, 94, .18); border-color: var(--red); animation: shake .35s; }
.opt.gone { opacity: .2; pointer-events: none; }
.opt.karl-pick { box-shadow: 0 0 0 3px rgba(255, 138, 31, .55); }
.opt:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* rockbusters */
.rock-board { text-align: center; padding: 6px 0 4px; }
.rock-initials { font-family: var(--display); font-size: clamp(48px, 11vw, 92px); color: var(--banana); letter-spacing: 6px; line-height: 1; text-shadow: 0 4px 0 #6b4b00; }
.rock-clue { position: relative; margin: 16px auto 18px; max-width: 640px; background: #fff7e6; color: #2a1600; padding: 16px 18px; border-radius: 18px; font-size: 20px; font-weight: 800; }
.rock-clue::after { content: ""; position: absolute; left: 50%; bottom: -12px; border: 12px solid transparent; border-top-color: #fff7e6; border-bottom: 0; transform: translateX(-50%); }
.rock-by { color: var(--muted); font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.rock-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.rock-form input { flex: 1; min-width: 0; background: var(--bg); border: 2px solid var(--line); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-weight: 800; font-size: 17px; }
.rock-form input:focus { border-color: var(--orange); outline: none; }
.rock-alt { margin-top: 12px; }
.rock-pun { font-family: var(--display); color: var(--orange-2); font-size: 18px; }

/* who said it */
.quote-bubble { position: relative; background: #fff; color: #1a1a2e; border-radius: 22px; padding: 22px 24px; font-size: clamp(19px, 2.6vw, 25px); font-weight: 900; line-height: 1.35; margin: 4px 0 26px; }
.quote-bubble::before { content: "\201C"; position: absolute; left: 10px; top: -22px; font-size: 80px; color: var(--orange); font-family: Georgia, serif; }
.quote-bubble::after { content: ""; position: absolute; left: 50px; bottom: -14px; border: 14px solid transparent; border-top-color: #fff; border-bottom: 0; }
.who-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 540px; margin: 0 auto; }
.who-btn { cursor: pointer; border: 3px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: 18px; padding: 0 0 10px; overflow: hidden; font-family: var(--display); font-size: 16px; transition: transform .1s, border-color .15s; }
.who-btn img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 8px; }
.who-btn:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--orange); }
.who-btn.correct { border-color: var(--green); background: rgba(52, 211, 153, .18); }
.who-btn.wrong { border-color: var(--red); background: rgba(255, 77, 94, .18); animation: shake .35s; }

.lifelines { display: flex; gap: 10px; justify-content: center; margin: 14px 0 0; }
.lifeline:disabled { text-decoration: line-through; }

.karl-says { display: flex; gap: 12px; align-items: center; margin-top: 14px; background: rgba(255, 138, 31, .12); border: 1px dashed var(--orange); padding: 10px 12px; border-radius: 14px; font-weight: 800; }
.karl-says img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

.feedback { margin-top: 16px; border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); background: var(--bg-2); }
.feedback.good { border-color: var(--green); background: linear-gradient(135deg, rgba(52, 211, 153, .16), transparent); }
.feedback.bad { border-color: var(--red); background: linear-gradient(135deg, rgba(255, 77, 94, .16), transparent); }
.fb-head { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 20px; margin-bottom: 6px; }
.fb-points { margin-left: auto; color: var(--banana); }
.fb-fact { margin: 6px 0; font-size: 16px; }
.fb-src { color: var(--muted); font-size: 13px; font-weight: 700; }
.fb-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

/* ---------- results ---------- */
.results-card { text-align: center; }
.res-kicker { font-family: var(--display); color: var(--orange-2); letter-spacing: 1px; font-size: 13px; }
.res-score { font-family: var(--display); font-size: clamp(56px, 12vw, 96px); line-height: 1; color: var(--banana); margin: 8px 0; }
.res-line { font-size: 18px; font-weight: 800; margin: 4px 0; }
.res-verdict { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 18px auto; max-width: 620px; text-align: left; background: var(--bg-2); border-radius: 16px; padding: 12px 14px; }
.res-verdict img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 64px; border: 3px solid var(--orange); }
.res-verdict q { font-weight: 800; font-size: 17px; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.res-grid .stat b { font-size: 26px; }
.duel { margin: 16px auto; max-width: 560px; border: 1px solid var(--red); border-radius: 16px; padding: 14px; background: linear-gradient(135deg, rgba(255, 77, 94, .12), transparent); }
.duel-row { display: flex; justify-content: space-between; font-weight: 900; font-size: 18px; }
.new-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 8px; }
.share-link { display: flex; gap: 8px; max-width: 620px; margin: 10px auto; }
.share-link input { flex: 1; min-width: 0; background: var(--bg); color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.review { text-align: left; margin-top: 18px; }
.review summary { cursor: pointer; font-weight: 900; }
.review ol { padding-left: 20px; }
.review li { margin: 8px 0; }
.review .ok { color: var(--green); }
.review .no { color: var(--red); }

/* ---------- scores / profile ---------- */
.page-title { font-size: clamp(28px, 4vw, 40px); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--orange); color: #241100; border-color: var(--orange); }
.board { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.board li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: 0; }
.board li .pos { font-family: var(--display); color: var(--muted); }
.board li:nth-child(1) .pos { color: var(--banana); }
.board li .who { font-weight: 900; }
.board li .meta { color: var(--muted); font-size: 13px; }
.board li .pts { font-family: var(--display); color: var(--banana); }
.board .empty { display: block; color: var(--muted); padding: 10px; }

.profile-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.big-orange { width: 110px; height: 110px; }
.rank-title { font-family: var(--display); font-size: 26px; color: var(--orange); }
.rank-progress { height: 12px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.rank-progress div { height: 100%; background: linear-gradient(90deg, var(--orange), var(--banana)); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.badge { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.badge .b-icon { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--panel-2); flex: 0 0 46px; }
.badge b { display: block; }
.badge span { color: var(--muted); font-size: 13px; line-height: 1.3; display: block; }
.badge.locked { opacity: .45; filter: grayscale(1); }
.badge.new { border-color: var(--banana); box-shadow: 0 0 0 3px rgba(255, 210, 63, .25); }
.badge-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 210, 63, .14); border: 1px solid var(--banana); border-radius: 999px; padding: 6px 12px; font-weight: 900; }

.prose h3 { font-family: var(--display); font-weight: 400; margin-top: 22px; }
.prose li { margin: 6px 0; }

/* ---------- loading ---------- */
.loading { text-align: center; padding: 30px 10px; color: var(--muted); font-weight: 800; }
.loading p { margin: 12px 0; }
.reel { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; border: 6px dotted var(--orange); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- transcript excerpt shown after answering ---------- */
.tx { margin: 12px 0 8px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tx summary { cursor: pointer; list-style: none; padding: 9px 14px; font-weight: 800; font-size: 13px; color: var(--orange-2); background: rgba(255, 255, 255, .03); }
.tx summary::-webkit-details-marker { display: none; }
.tx summary::after { content: "▾"; float: right; color: var(--muted); }
.tx:not([open]) summary::after { content: "▸"; }
.tx-body { padding: 6px 14px 12px; font-size: 15px; line-height: 1.45; }
.tx-line { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.tx-line:last-child { border-bottom: 0; }
.tx-sp { font-weight: 900; color: var(--muted); font-size: 13px; padding-top: 1px; text-transform: uppercase; letter-spacing: .3px; }
.tx-line.sp-karl .tx-sp { color: var(--karl); }
.tx-line.sp-ricky .tx-sp { color: var(--ricky); }
.tx-line.sp-steve .tx-sp { color: var(--steve); }
.tx-line.hl { background: rgba(255, 210, 63, .1); border-radius: 8px; padding: 4px 6px; margin: 0 -6px; }
.tx-dir { display: block; color: var(--muted); font-style: italic; font-size: 13px; }
.tx-gap { color: var(--muted); text-align: center; letter-spacing: 4px; font-size: 12px; padding: 2px 0; }

/* ---------- bottom Next bar (phones and tablets) ---------- */
.next-bar { display: none; }

/* ---------- small extras ---------- */
.hl-initials { color: var(--banana); }
.mode-body { min-width: 0; }
.mode-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.mode-meta .best { margin-top: 0; }
.mode .count { font-size: 12px; font-weight: 800; color: var(--ink); opacity: .8; background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 1px 8px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.who-btn span { display: block; padding: 0 6px; }

/* ---------- misc ---------- */
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); max-width: 1080px; width: 100%; margin: 0 auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #111; padding: 10px 16px; border-radius: 12px; font-weight: 800; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; width: 100%; height: 100%; }

@media (min-width: 1400px) {
  main, .footer { max-width: 1180px; }
}
@media (max-width: 1024px) {
  .hero { gap: 20px; }
  }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
    /* the Next button is pinned to the bottom of the screen so you never have to hunt for it */
  .next-bar:not([hidden]) {
    display: flex; justify-content: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(15, 18, 38, .98) 60%, rgba(15, 18, 38, 0));
  }
  .next-bar .btn { width: 100%; max-width: 560px; }
  body.has-nextbar .fb-actions { display: none; }
  body.has-nextbar main { padding-bottom: 110px; }
  body.has-nextbar .toast { bottom: 96px; }
  .feedback { scroll-margin-top: 80px; }
}
@media (max-width: 560px) {
  main { padding: 14px 14px 32px; }
  .hero { gap: 14px; margin-bottom: 14px; }
  h1 { font-size: 30px; margin-bottom: 10px; }
  .kicker { font-size: 11px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-actions .btn-lg { padding: 12px 8px; font-size: 15px; }
  .player-row input { flex: 1 1 140px; width: auto; }
  .karlism { padding: 14px 16px; margin-bottom: 20px; }
  .onair { display: none; }
  .brand-text { font-size: 15px; }
  .topnav { gap: 10px; }
  .options { grid-template-columns: 1fr; gap: 8px; }
  .opt { min-height: 52px; font-size: 15px; padding: 10px 12px; }
  .card { padding: 16px; }
  .q-top { margin-bottom: 10px; }
  .q-avatar { flex-basis: 48px; width: 48px; height: 48px; font-size: 24px; }
  .q-text { margin-bottom: 14px; }
  .feedback { padding: 14px; }
  .fb-head { font-size: 17px; }
  .fb-fact { font-size: 15px; }
  .tx-body { padding: 4px 10px 10px; font-size: 14px; }
  .tx-line { grid-template-columns: 1fr; gap: 0; }
  .tx-sp { font-size: 12px; }
  .quote-bubble { padding: 18px 18px; margin-bottom: 22px; }
  .who-options { gap: 8px; }
  .who-btn { font-size: 14px; border-radius: 14px; }
  .res-grid { gap: 8px; }
  .res-grid .stat { padding: 10px 6px; }
  .res-grid .stat b { font-size: 20px; }
  .topnav .lbl { display: none; }
  .brand img { width: 30px; height: 30px; }
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .big-orange { margin: 0 auto; }
  .rock-form { flex-direction: column; }
  .rock-clue { font-size: 18px; }
  .lede { font-size: 16px; }
  .karlism blockquote { font-size: 18px; }
  .section-title { font-size: 20px; }
  .modes { gap: 10px; }
  .mode { padding: 14px; min-height: 0; }
  .share-row .btn { flex: 1 1 140px; }
}
@media (max-width: 380px) {
  .brand-text { display: none; }
  .play-title { font-size: 15px; }
  .score-box { min-width: 0; font-size: 19px; }
  .rock-initials { letter-spacing: 3px; }
  .q-text { font-size: 18px; }
  .who-btn { font-size: 12px; }
}
/* phones held sideways: short screens need everything tighter */
@media (max-height: 500px) and (orientation: landscape) {
  .topbar { padding: 6px 16px; }
  .hero { grid-template-columns: 1.4fr 1fr; gap: 16px; }
    h1 { font-size: 28px; }
  .lede { font-size: 15px; margin-bottom: 12px; }
  .q-avatar { flex-basis: 40px; width: 40px; height: 40px; }
  .q-top { margin-bottom: 6px; }
  .q-text { font-size: 18px; margin-bottom: 10px; }
  .opt { min-height: 44px; padding: 8px 12px; }
  .who-options { max-width: 380px; }
  .rock-initials { font-size: 44px; }
  .rock-clue { margin: 10px auto 12px; padding: 10px 14px; font-size: 17px; }
}
/* no hover on touch screens, so don't leave cards stuck in their hover state */
@media (hover: none) {
  .mode:hover, .who-btn:hover:not(:disabled) { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- round title screen */
.intro { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  overflow: hidden; text-align: center; --accent: var(--orange);
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 38%, var(--bg)) 0%, var(--bg) 62%, #090b18 100%); }
.intro[hidden] { display: none; }
body.intro-on { overflow: hidden; }
.intro-inner { position: relative; z-index: 2; max-width: 560px; width: 100%; }
.intro-onair { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 2px solid var(--red); border-radius: 8px;
  color: var(--red); font-family: var(--display); font-size: 12px; letter-spacing: 2px; margin-bottom: 18px; }
.intro-onair .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.intro.play .intro-onair { animation: introFade .4s both, introBlink 1s .4s steps(2, jump-none) infinite; }
.intro-icon { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-size: 66px;
  background: rgba(255, 255, 255, .06); border: 5px solid var(--accent); overflow: hidden; }
.intro-icon img { width: 100%; height: 100%; object-fit: cover; }
.intro.play .intro-icon { animation: introPop .75s cubic-bezier(.2, 1.6, .4, 1) both, introPulse 1.6s .8s ease-out infinite; }
.intro-kicker { font-weight: 900; letter-spacing: 3px; font-size: 12px; color: var(--accent); text-transform: uppercase; }
.intro.play .intro-kicker { animation: introFade .5s .2s both; }
.intro-title { font-family: var(--display); font-size: clamp(34px, 10vw, 66px); line-height: 1.05; margin: 10px 0 12px; font-weight: 400; }
.intro-title span { display: inline-block; }
.intro.play .intro-title span { animation: introDrop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.intro-blurb { color: var(--muted); font-size: 17px; margin: 0 auto 24px; max-width: 440px; }
.intro.play .intro-blurb { animation: introFade .5s .85s both; }
.intro.play #introGo { animation: introFade .4s 1.05s both; }
#introGo:disabled { opacity: .7; cursor: progress; }
.intro-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.intro-fx span { position: absolute; bottom: -80px; opacity: .55; animation: introFloat linear infinite; }
@keyframes introPop { from { transform: scale(0) rotate(-25deg); } to { transform: scale(1) rotate(0); } }
@keyframes introPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 28px transparent; } }
@keyframes introDrop { from { opacity: 0; transform: translateY(-70px) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes introFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes introBlink { 50% { opacity: .35; } }
@keyframes introFloat { from { transform: translateY(0) rotate(0); } to { transform: translateY(-125vh) rotate(360deg); } }
@media (max-width: 560px) { .intro-icon { width: 104px; height: 104px; font-size: 52px; } .intro-blurb { font-size: 15px; } }
@media (max-height: 500px) { .intro-icon { width: 72px; height: 72px; font-size: 36px; margin-bottom: 8px; } .intro-onair { margin-bottom: 8px; } .intro-blurb { margin-bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .intro.play * { animation: none !important; } }


/* ---------------------------------------------------------------- RSKQuiz branding */
.brand img { border-radius: 50%; background: #fff3; }
.brand-text b { font-weight: 400; }
.brand-text .r { color: var(--ricky); }
.brand-text .s { color: var(--steve); }
.brand-text .k { color: var(--banana); margin-right: 2px; }
.hero { display: block; text-align: center; max-width: 900px; margin: 0 auto 22px; }
.hero-logo { margin: 0 auto 6px; line-height: 0; }
.hero-logo img { width: 100%; max-width: 860px; height: auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .45)); animation: logoIn .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.tagline { font-family: var(--display); font-size: clamp(22px, 3.6vw, 32px); line-height: 1.15; margin: 6px 0 10px; }
.hero .lede { max-width: 640px; margin: 0 auto 18px; }
.hero .hero-actions, .hero .player-row { justify-content: center; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .hero-logo img { max-width: 100%; } .tagline { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .hero-logo img { animation: none; } }

/* cartoon heads (transparent PNGs): show the whole head on a soft tinted disc instead of cropping like a photo */
.mode-icon img, .q-avatar img, .who-btn img, .karl-says img, .res-verdict img, .intro-icon img {
  object-fit: contain; box-sizing: border-box; padding: 6%; background: radial-gradient(circle, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
}
.who-btn img { border-radius: 50%; padding: 4%; }
.intro-icon img { padding: 8%; }

/* ---------------------------------------------------------------- contact + report */
.report-link { display: block; margin: 10px 0 0; padding: 4px 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.report-link:hover { color: var(--ink); }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.contact-card b { display: block; font-size: 17px; }
.contact-card span { color: var(--muted); font-size: 14px; }
.msg-dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow); }
.msg-dialog::backdrop { background: rgba(5, 6, 15, .7); }
.msg-dialog form { position: relative; padding: 20px 20px 18px; display: grid; gap: 12px; }
.msg-dialog h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; }
.msg-dialog p { margin: 0; }
.msg-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-size: 16px; }
.msg-question { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel); border-left: 4px solid var(--orange); font-size: 14px; }
.msg-question b { display: block; margin-bottom: 4px; }
.msg-question span { color: var(--muted); }
.msg-field { display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
.msg-field .muted { font-weight: 600; }
.msg-field input, .msg-field textarea, .msg-field select { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; font-size: 16px; }
.msg-field textarea { resize: vertical; min-height: 96px; }
.msg-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg-error { color: var(--red); font-weight: 800; font-size: 14px; }
.msg-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 560px) { .contact-card { flex-direction: column; align-items: stretch; text-align: center; } }
.q-report { margin: 8px auto 4px; text-align: center; }
