/* Rewind Rally phone app: game-show redesign (2026-11-21, from rewindrally-phone-mockup.dc.html).
   Navy + amber + pink, Lilita One headings, Nunito text. Fonts are self-hosted (CSP: same-origin only; no
   third-party requests from the game). Answer and result colors are the mockup's, darkened just enough for
   4.5:1 with white text. */
@font-face { font-family: 'Lilita One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/lilita-one-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url('fonts/nunito-latin-wght.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #0A0F2A;
  --bg-glow: #22337C;
  --ink: #070A1C;          /* inputs, boards, heading outline */
  --surface: #141D4A;
  --surface-2: #111A45;
  --line: #2E3D7A;
  --text: #F5EFE4;
  --text-2: #EDE6DA;
  --muted: #B3BEDD;
  --faint: #9AA4C2;
  --accent: #FFB547;
  --accent-hover: #FFD27A;
  --accent-text: #1A1408;
  --accent-shadow: #9A6B12;
  --pink: #FF4FA3;
  --good: #3DDC84;
  --bad: #FF6B78;
  --good-card: #197134;
  --bad-card: #BF2525;
  --opt-a: #D73C20;
  --opt-b: #2072DC;
  --opt-c: #22853B;
  --opt-d: #9B4DD8;
  --radius: 16px;
  --head: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: radial-gradient(ellipse 120% 70% at 50% 0%, var(--bg-glow) 0%, var(--bg) 60%) var(--bg) no-repeat;
  color: var(--text-2);
  font: 600 16px/1.4 Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Two soft spotlight beams from the top corners (decoration only), in a fixed layer that clips them. */
.beams { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.beams::before, .beams::after { content: ''; position: absolute; top: -60px; width: 220px; height: 600px; }
.beams::before { left: -80px; background: linear-gradient(170deg, rgba(255, 214, 140, .14), rgba(255, 214, 140, 0) 65%); transform: rotate(-14deg); }
.beams::after { right: -80px; background: linear-gradient(190deg, rgba(255, 79, 163, .12), rgba(255, 79, 163, 0) 65%); transform: rotate(14deg); }
body > :not(.beams):not(.banner) { position: relative; z-index: 1; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* Brand bar (index.html): icon + REWIND RALLY wordmark */
.brand { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 16px 0; margin: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brandname { font-family: var(--head); font-size: 22px; line-height: 1; color: var(--accent); letter-spacing: .02em;
  text-shadow: 0 2px 0 var(--ink); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.brandname b { color: #FFFFFF; font-weight: 400; }

.app { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 12px 16px 8px; }
h1 { font-family: var(--head); font-weight: 400; font-size: 40px; line-height: 1.05; margin: 10px 0 6px; color: var(--text);
  text-shadow: 0 4px 0 var(--ink); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; overflow-wrap: anywhere; }
h1 .accent { color: var(--accent); }
h2 { font-family: var(--head); font-weight: 400; font-size: 22px; line-height: 1.1; margin: 4px 0 8px; color: var(--text); }
p { margin: 4px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.center { text-align: center; }
.eyebrow { margin: 0; font-weight: 900; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--pink); }
.lead { font-weight: 700; font-size: 16px; color: var(--muted); text-align: center; }
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; }
.stack > * + * { margin-top: 10px; }
.stack > button { display: block; width: 100%; }

label { display: block; font-weight: 900; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); margin: 12px 0 6px; }
input[type="text"], input[type="search"], input[type="number"], select {
  width: 100%; min-height: 52px; padding: 9px 14px; font: 800 18px/1.2 Nunito, system-ui, sans-serif;
  color: var(--text); background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px;
}
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input.code { height: 64px; text-transform: uppercase; letter-spacing: .3em; padding-left: calc(14px + .3em); font: 400 34px/1 var(--head);
  text-align: center; color: #FFFFFF; background: var(--ink); border: 3px solid var(--accent); box-shadow: 0 0 18px rgba(255, 181, 71, .35); }

button {
  min-height: 48px; min-width: 44px; padding: 10px 14px; font-size: 16px; font-weight: 800;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text);
  cursor: pointer; touch-action: manipulation;
  /* Safari: buttons don't inherit the page font and keep their own look; long words must be able to wrap. */
  font-family: inherit; line-height: 1.2; margin: 0; -webkit-appearance: none; appearance: none;
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
}
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); width: 100%;
  font: 400 24px/1.1 var(--head); letter-spacing: .02em; min-height: 58px; box-shadow: 0 5px 0 var(--accent-shadow); margin-bottom: 5px; }
button.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-shadow); }
button.ghost { background: transparent; }
button.small { min-height: 44px; padding: 6px 12px; font-size: 14px; }
button:disabled { opacity: .5; cursor: default; }
button.primary:disabled { box-shadow: none; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 0; }
/* "How much?" (4 choices): 2×2 grid on phones; one row only when there is room. */
.seg4 { display: grid; grid-template-columns: 1fr 1fr; }
@media (min-width: 420px) { .seg4 { grid-template-columns: repeat(4, 1fr); } }
.row > button { min-width: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.error { color: var(--bad); font-weight: 800; margin: 8px 0; }
.error:empty { margin: 0; }
.banner { position: sticky; top: 0; z-index: 10; background: var(--bad-card); color: #FFFFFF; text-align: center; padding: 10px; font-weight: 800; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); min-height: 40px; font-weight: 800; }
.list li:last-child { border-bottom: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--muted); }
.tag { font-size: 13px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.ready { background: rgba(61, 220, 132, .14); color: var(--good); }
.tag.partial { background: rgba(255, 181, 71, .14); color: var(--accent); }
.tag.none { background: var(--surface-2); color: var(--muted); }
.results button.result { display: flex; gap: 12px; align-items: center; text-align: left; padding: 8px; min-height: 76px; }
.thumb { flex: none; width: 44px; height: 62px; border-radius: 6px; object-fit: cover; background: var(--surface); }
.thumb.ph { display: grid; place-items: center; font: 400 22px var(--head); color: var(--accent); border: 1px solid var(--line); }
.rinfo { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.rname { font-weight: 800; }
.rdetails { font-size: 13px; font-weight: 600; color: var(--muted); }
.you { color: var(--accent); font-weight: 900; }

.results { max-height: 300px; overflow-y: auto; }
.results button, .eps button { width: 100%; text-align: left; margin: 4px 0; font-weight: 700; }
.eps label.ep { display: flex; gap: 12px; align-items: center; font-weight: 700; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--text-2);
  margin: 0; padding: 8px 4px; min-height: 44px; border-bottom: 1px solid var(--line); }
.eps input[type="checkbox"], .eps input[type="radio"] { width: 24px; height: 24px; flex: none; accent-color: var(--accent); }
.related label, .card label.ep { text-transform: none; letter-spacing: 0; color: var(--text-2); font-size: 16px; font-weight: 700; }
.eps label.ep.muted { color: var(--muted); }
/* Host setup: the numbered step headings ("1. What did you watch?") are labels inside cards. */
.card > label:not(.ep) { text-transform: none; letter-spacing: .01em; font: 400 20px/1.15 var(--head); color: var(--text); margin-top: 4px; }

.progress { height: 14px; background: var(--ink); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.progress.live > div { position: relative; overflow: hidden; transition: width .25s linear; border-radius: 99px; }
.progress.live > div::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%); animation: rr-shimmer 1.6s ease-in-out infinite;
}
@keyframes rr-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .progress.live > div::after { animation: none; } }
.buildstatus { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; margin-top: 8px; }
.buildstatus .muted { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Waiting room ---- */
.waithead { text-align: center; margin-top: 4px; }
.waithead h1 { margin-top: 6px; }
.dots { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 15px; color: var(--text); background: var(--surface);
  border: 2px solid var(--line); border-radius: 100px; padding: 6px 14px; max-width: 100%; overflow-wrap: anywhere; }
.chip.me { border-color: var(--accent); color: var(--accent); }
.chip .tag { font-size: 12px; padding: 0 7px; }
.chip .dot { width: 12px; height: 12px; }

/* ---- Promo cards ("Get it on Roku"): marquee lights around the edge ---- */
.promo { position: relative; border-radius: 20px; padding: 20px 18px 16px; margin: 16px 0 10px; background: var(--surface);
  border: 4px solid var(--accent); box-shadow: 0 0 24px rgba(255, 181, 71, .35); text-align: center; }
/* Bulbs: one row of dots per edge (18 px apart, spaced evenly), on a 7 px ring inside the amber border. */
.promo::before { content: ''; position: absolute; inset: 4px; border-radius: 15px; pointer-events: none;
  --bulb: radial-gradient(circle at 50% 50%, #FFF1C9 0 2px, rgba(255, 241, 201, .3) 2.6px, transparent 3.6px);
  background-image: var(--bulb), var(--bulb), var(--bulb), var(--bulb);
  background-size: 18px 7px, 18px 7px, 7px 18px, 7px 18px;
  background-position: top, bottom, left, right;
  background-repeat: space no-repeat, space no-repeat, no-repeat space, no-repeat space; }
.promo > * { position: relative; }
.promo .eyebrow { font-size: 12px; }
.promo-title { margin: 6px 0 0; font: 400 26px/1.08 var(--head); color: var(--text); }
.promo-title span { color: var(--accent); }
.promo-text { margin: 8px 0 14px; font-weight: 700; font-size: 15px; color: var(--muted); }
a.promo-btn { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 8px 14px; border-radius: 12px; text-decoration: none;
  background: var(--accent); color: var(--accent-text); font-weight: 900; font-size: 19px; box-shadow: 0 5px 0 var(--accent-shadow); }
a.promo-btn:hover { background: var(--accent-hover); color: var(--accent-text); }
.promo-note { margin: 12px 0 0; font-weight: 700; font-size: 13px; color: var(--muted); }

/* ---- Question ---- */
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.qnum { font: 400 18px/1.1 var(--head); color: var(--accent); text-transform: uppercase; letter-spacing: .02em; }
.qep { font-size: 13px; font-weight: 700; color: var(--muted); margin: 2px 0 0; }
.ring { --p: 100; position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--pink) calc(var(--p) * 1%), rgba(255, 79, 163, .18) 0); }
.ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg); }
.ring .secs { position: relative; font: 400 24px/1 var(--head); color: #FFFFFF; }
.ring.low { background: conic-gradient(var(--bad) calc(var(--p) * 1%), rgba(255, 107, 120, .18) 0); }
.qtext { font-size: 23px; font-weight: 900; line-height: 1.2; color: var(--text); margin: 10px 0 14px; overflow-wrap: anywhere; }
.timer { height: 10px; background: var(--ink); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.timer > div { height: 100%; background: var(--pink); width: 100%; }
.timer.low > div { background: var(--bad); }
.secs { font-variant-numeric: tabular-nums; font-weight: 900; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; min-height: 68px; padding: 10px 18px; color: #FFFFFF; border: 0; border-radius: 16px;
  font-size: 20px; font-weight: 900; box-shadow: 0 5px 0 rgba(0, 0, 0, .35); margin-bottom: 5px; }
.opt .letter { flex: none; width: 30px; font: 400 30px/1 var(--head); text-align: center; }
.opt.a { background: var(--opt-a); } .opt.b { background: var(--opt-b); } .opt.c { background: var(--opt-c); } .opt.d { background: var(--opt-d); }
.opt:disabled { opacity: 1; }
.opt.dim { opacity: .35; }
.opt.picked { outline: 4px solid #FFFFFF; outline-offset: 2px; }
.opt.revealed { min-height: 52px; font-size: 18px; }
.opt.correct { box-shadow: 0 0 0 4px var(--good); opacity: 1; }
.spaced { margin-top: 12px; }
.mybar { display: flex; justify-content: space-between; gap: 10px; font-weight: 900; font-size: 15px; color: var(--muted); margin: 12px 0 0; }
.mybar .pts { color: var(--accent); font-variant-numeric: tabular-nums; }
.verdict { font-size: 22px; font-weight: 900; margin: 4px 0; }
.verdict.good { color: var(--good); } .verdict.bad { color: var(--bad); }

/* ---- Result ---- */
.result-card { border-radius: 22px; padding: 22px 18px; margin: 8px 0 10px; text-align: center; color: #FFFFFF; }
.result-card.good { background: var(--good-card); box-shadow: 0 0 30px rgba(43, 168, 74, .45); }
.result-card.bad { background: var(--bad-card); box-shadow: 0 0 30px rgba(226, 85, 59, .4); }
.result-card .big { margin: 0; font: 400 46px/1 var(--head); color: #FFFFFF; -webkit-text-stroke: 2px rgba(0, 0, 0, .35); paint-order: stroke fill; }
.result-card .pts { margin: 8px 0 0; font: 400 54px/1 var(--head); color: #FFE08A; }
.result-card .voice { color: #FFFFFF; margin: 10px 0 0; }
.answerline { text-align: center; font-weight: 800; font-size: 16px; color: var(--muted); margin: 4px 0; }
.answerline b { color: var(--text); font-weight: 900; }
.qsmall { font-size: 15px; font-weight: 700; color: var(--muted); text-align: center; margin: 2px 0 6px; overflow-wrap: anywhere; }
.board { background: var(--ink); border: 3px solid var(--pink); border-radius: 18px; padding: 12px 16px; margin: 12px 0; }
.board.plain { border-color: var(--line); }
.board h2 { font: 900 12px/1.2 Nunito, system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--pink); margin: 0 0 6px; }
.board .list li { border-bottom-color: rgba(46, 61, 122, .6); font-size: 18px; color: var(--text-2); min-height: 36px; padding: 4px 0; }
.board .list li.first { color: var(--accent); }
.rank { min-width: 32px; font-weight: 900; color: var(--muted); }
.board .list li.first .rank { color: var(--accent); }
.score { margin-left: auto; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---- Game over ---- */
.overhead { text-align: center; margin-top: 4px; }
.overhead h1 { color: var(--accent); margin-top: 4px; }
.overhead .lead { margin-top: 6px; }
.feedbacklink { text-align: center; font-weight: 800; margin: 14px 0 6px; }

.stars { display: flex; gap: 6px; }
.stars .star { flex: 1; min-height: 52px; font-size: 28px; padding: 0; color: var(--muted); background: var(--surface-2); }
.stars .star.on { color: var(--accent); }
textarea { width: 100%; padding: 10px 12px; font: 600 16px/1.4 Nunito, system-ui, sans-serif; color: var(--text); background: var(--surface-2);
  border: 2px solid var(--line); border-radius: 12px; resize: vertical; }
.footer { text-align: center; color: var(--faint); font-size: 12px; padding: 8px 16px 18px; }
.byline { color: var(--faint); font-size: 13px; margin: 0 0 6px; }
.byline a, .footer .byline a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.footer a { color: var(--accent); font-weight: 700; }
.footer p { margin: 6px 0 0; }
.prose { max-width: 560px; margin: 0 auto; padding: 16px; }
.prose h1 { font-size: 34px; }
.prose h2 { margin-top: 18px; }
.prose li { margin: 6px 0; }
a.button { overflow-wrap: anywhere; max-width: 100%; display: inline-block; padding: 14px 18px; border-radius: 12px; background: var(--accent); color: var(--accent-text);
  font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 var(--accent-shadow); }

/* Voice lines (rotating copy per moment) and the several-movies picker */
.voice { color: var(--accent); font-weight: 800; font-style: italic; text-align: center; margin: 6px 0 10px; }
.related { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.related .ep { display: flex; align-items: center; gap: 10px; min-height: 40px; }

/* Host banner ("You're the host") and the building screen's "you can leave" note. */
.hostbanner { background: var(--accent); color: var(--accent-text); border-radius: 12px; padding: 8px 12px; margin: 8px 0; font-weight: 700; }
.leave { margin-top: 8px; font-weight: 700; }

.scoring { text-align: center; margin: 4px 0 10px; }
.double { background: var(--pink); color: var(--ink); font-weight: 900; text-align: center; border-radius: 12px; padding: 6px 10px; margin: 8px 0; }
.advance .advtext { font-weight: 800; min-height: 1.3em; margin: 4px 0; color: var(--faint); }
.advance .advtext .n { color: var(--accent); }
.advance .advbar { margin: 0 0 10px; }
.advance .row > button { flex: 1 1 0; }
.reactions { display: flex; justify-content: center; gap: 10px; margin: 12px 0 2px; }
.reactions .react { font-size: 28px; line-height: 1; width: 56px; height: 56px; padding: 0; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.reactions .react:disabled { opacity: .45; }
.youwon { text-align: center; margin: 4px 0 0; }
.youwon .trophy { font-size: 64px; line-height: 1.1; animation: rr-pop .6s ease-out; }
@keyframes rr-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .youwon .trophy { animation: none; } }

/* Narrow phones (320 px): shrink the big type a little so nothing overflows. */
@media (max-width: 360px) {
  h1 { font-size: 34px; }
  input.code { font-size: 28px; letter-spacing: .22em; padding-left: calc(14px + .22em); }
  .qtext { font-size: 21px; }
  .opt { font-size: 18px; min-height: 60px; padding: 8px 14px; }
  .result-card .big { font-size: 40px; }
  .result-card .pts { font-size: 46px; }
  .promo-title { font-size: 23px; }
}
