:root {
  --navy: #0d1b3e;
  --navy-2: #15295a;
  --blue: #2b58aa;
  --gold: #e7b43a;
  --gold-2: #f5cf6b;
  --red: #d8432e;
  --cream: #f6ecd2;
  --ink: #0d1b3e;
  --good: #3fbf6f;
  --a: #d8432e;
  --b: #e7b43a;
  --c: #2f9e6a;
  --d: #2b58aa;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, var(--blue) 0%, var(--navy-2) 45%, var(--navy) 100%) fixed;
  background-color: var(--navy);
  color: var(--cream);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, .display { font-family: "Arial Black", Impact, "Trebuchet MS", sans-serif; letter-spacing: .02em; margin: 0; }
a { color: var(--gold-2); }
button {
  font: inherit; cursor: pointer; border: 0; border-radius: 14px; padding: .8em 1.2em;
  background: var(--gold); color: var(--ink); font-weight: 800;
}
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--cream); border: 2px solid rgba(246,236,210,.5); }
button.danger { background: var(--red); color: var(--cream); }
button.good { background: var(--good); color: var(--ink); }
input {
  font: inherit; padding: .75em .9em; border-radius: 12px; border: 2px solid rgba(246,236,210,.6);
  background: var(--cream); color: var(--ink); width: 100%;
}
.hidden { display: none !important; }
.muted { opacity: .75; }
.small { font-size: .85rem; }
.card { background: rgba(0,0,0,.25); border: 1px solid rgba(246,236,210,.15); border-radius: var(--radius); padding: 1.1rem; }
.pill { display: inline-block; padding: .2em .7em; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: .85rem; }
.pill.red { background: var(--red); color: var(--cream); }
.pill.blue { background: var(--blue); color: var(--cream); }
.letter { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: rgba(0,0,0,.28); font-weight: 900; flex: none; }
.opt-0 { background: var(--a); color: var(--cream); }
.opt-1 { background: var(--b); color: var(--ink); }
.opt-2 { background: var(--c); color: var(--cream); }
.opt-3 { background: var(--d); color: var(--cream); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 56px; height: 56px; }
.brand .st { font-weight: 800; }
footer.legal { text-align: center; font-size: .75rem; opacity: .6; padding: 18px 12px 28px; }

/* ---------- phone ---------- */
.phone { max-width: 520px; margin: 0 auto; padding: 16px; }
.phone header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ticks { display: grid; gap: 10px; margin: 14px 0; }
.tick { display: flex; gap: 12px; align-items: flex-start; background: rgba(0,0,0,.22); padding: 12px; border-radius: 12px; line-height: 1.35; }
.tick input { width: 24px; height: 24px; flex: none; margin: 2px 0 0; accent-color: var(--gold); }
.tick.req::after { content: "Required"; margin-left: auto; font-size: .7rem; opacity: .6; white-space: nowrap; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 700; }
.err { color: #ffb4a6; font-weight: 700; }
.big { font-size: 1.15rem; padding: 1em; width: 100%; }
.opts { display: grid; gap: 12px; margin-top: 14px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; font-size: 1.1rem; padding: 18px 16px; border-radius: 16px; width: 100%; border: 3px solid transparent; }
.opt.picked { border-color: var(--cream); box-shadow: 0 0 0 3px rgba(246,236,210,.35); }
.opt.right { outline: 4px solid var(--good); }
.opt.dim { opacity: .35; }
.timer { height: 10px; border-radius: 10px; background: rgba(0,0,0,.35); overflow: hidden; margin-top: 12px; }
.timer > i { display: block; height: 100%; background: var(--gold); width: 100%; transition: width .2s linear; }
.drive { margin-top: 16px; text-align: center; font-size: .85rem; opacity: .8; }
.result { text-align: center; padding: 22px 16px; }
.result .huge { font-size: 2.4rem; }
.bigmsg { font-size: 1.4rem; line-height: 1.3; }

/* ---------- live view ---------- */
.live { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 2.5vh 3vw; gap: 2vh; }
.live header { display: flex; justify-content: space-between; align-items: center; }
.live .brand img { width: 9vh; height: 9vh; min-width: 56px; min-height: 56px; }
.live main { display: grid; align-content: center; gap: 2.5vh; }
.live .q { font-size: clamp(1.4rem, 4vw, 3.2rem); line-height: 1.15; text-align: center; }
.live .lopts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6vw; }
.live .lopt { display: flex; align-items: center; gap: 1vw; padding: 1.6vh 1.4vw; border-radius: 18px; font-size: clamp(1rem, 2.4vw, 2rem); font-weight: 800; }
.live .lopt.right { outline: 6px solid var(--good); }
.live .lopt.dim { opacity: .3; }
.live .join { display: flex; gap: 16px; align-items: center; }
.live .join img { width: 14vh; height: 14vh; min-width: 90px; min-height: 90px; background: #fff; border-radius: 10px; padding: 6px; }
.live .board { max-width: 720px; margin: 0 auto; width: 100%; display: grid; gap: 8px; }
.live .row { display: grid; grid-template-columns: 3em 1fr auto; gap: 12px; align-items: center; background: rgba(0,0,0,.25); border-radius: 12px; padding: 10px 14px; font-size: clamp(1rem, 2vw, 1.5rem); }
.live .row:nth-child(-n+3) { background: rgba(231,180,58,.22); }
.center { text-align: center; }
.live footer { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { .live .lopts { grid-template-columns: 1fr; } }

/* ---------- console ---------- */
.console { max-width: 1200px; margin: 0 auto; padding: 18px; display: grid; gap: 16px; }
.console header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.console .bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.console .grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
@media (max-width: 900px) { .console .grid2 { grid-template-columns: 1fr; } }
.console .stat { font-size: 2rem; font-weight: 900; }
.script-item { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; background: rgba(0,0,0,.18); }
.script-item.now { background: rgba(231,180,58,.25); outline: 2px solid var(--gold); }
.script-item .t { font-size: .8rem; opacity: .7; }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.counts div { border-radius: 10px; padding: 8px; text-align: center; font-weight: 900; }
.modal { position: fixed; inset: 0; background: rgba(5,10,25,.75); display: grid; place-items: center; padding: 16px; z-index: 10; overflow: auto; }
.modal .card { background: var(--navy-2); max-width: 1000px; width: 100%; max-height: 94vh; overflow: auto; }
table.top3 { width: 100%; border-collapse: collapse; margin: 10px 0 6px; }
table.top3 th, table.top3 td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(246,236,210,.15); }
table.top3 tr.cur td { background: rgba(231,180,58,.18); }
.x { color: #ff8d7a; font-weight: 900; }
.ok { color: var(--good); font-weight: 900; }
.callbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.callbtns button { padding: .45em .7em; font-size: .9rem; }
.num { font-family: ui-monospace, Menlo, monospace; font-size: 1.2rem; letter-spacing: .05em; color: var(--gold-2); }
.recap h4 { margin: 14px 0 4px; }
.recap ul { margin: 4px 0 0 1.1em; padding: 0; }
.login { max-width: 380px; margin: 12vh auto; }
#who:empty { display: none; }
table.top3 td, table.top3 th { white-space: nowrap; }
table.top3 td:nth-child(2) .num, table.top3 td:nth-child(2) .muted { white-space: nowrap; }
.modal .card { overflow-x: auto; }
