:root {
  /* Kippax brand: Oxford ground, Cream ink, Sky headings and fills (see the Kippax design system) */
  --oxford: #002147;
  --cream: #f5f0e1;
  --sky: #a9c7e8;
  --night: #141618;
  --stone: #a7aaad;
  --coral: #ff7f50;
  --bg: var(--oxford);
  --panel: #0a2b55;
  --panel-2: #123563;
  --line: color-mix(in srgb, var(--text) 16%, transparent);
  --text: var(--cream);
  --muted: color-mix(in srgb, var(--text) 62%, var(--bg));
  --heading: var(--accent);
  --accent: var(--sky);
  --accent-ink: var(--oxford);
  --good: #3ccf8e;
  --bad: var(--coral);
  --well: color-mix(in srgb, var(--bg) 72%, #000);
  --card: color-mix(in srgb, var(--panel) 82%, #000);
  --ink: #002147; /* dark ink on the fixed option colours */
  --warn: var(--accent);
  --optA: #a9c7e8;
  --optB: #f5f0e1;
  --optC: #ff7f50;
  --optD: #a7aaad;
  --optE: #7fa6d1;
  --optF: #e6d9b8;
  --radius: 16px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.brand { font-weight: 900; letter-spacing: -.01em; text-transform: uppercase; }
.brand b { color: var(--accent); font-weight: 900; }
.display { font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: .9; }
body { background: var(--bg) radial-gradient(1200px 700px at 110% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%) no-repeat fixed,
                    radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%) no-repeat fixed; }
.kfoot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 12px 22px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.kfoot img { width: 34px; height: 34px; }
.kfoot:hover { color: var(--text); }

.btn {
  border-radius: 999px; padding: 10px 18px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: 14px;
  background: transparent; color: var(--text); border: 2px solid color-mix(in srgb, var(--text) 55%, transparent);
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.good { background: var(--good); color: var(--ink); border-color: transparent; }
.btn.bad { background: var(--bad); color: var(--ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 12px; border-width: 1.5px; }
.btn.big { padding: 15px 26px; font-size: 17px; }

input[type=text], input[type=number], input[type=password], input[type=email], input[type=date], input:not([type]), select, textarea {
  background: var(--well); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--muted); }
.pill.good { background: rgba(47,191,113,.18); color: var(--good); }
.pill.bad { background: rgba(255,93,93,.16); color: var(--bad); }
.pill.warn { background: rgba(255,176,32,.16); color: var(--warn); }
.pill.rec { background: var(--coral); color: var(--ink); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.opt-0 { --c: var(--optA); } .opt-1 { --c: var(--optB); } .opt-2 { --c: var(--optC); }
.opt-3 { --c: var(--optD); } .opt-4 { --c: var(--optE); } .opt-5 { --c: var(--optF); }

.timebar { height: 10px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.timebar > i { display: block; height: 100%; background: var(--accent); width: 100%; transform-origin: left; }
.timebar.low > i { background: var(--bad); }

/* ================= PLAYER (phone) ================= */
.play { max-width: 560px; margin: 0 auto; padding: 14px 14px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.play header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.play .teambox { text-align: right; line-height: 1.15; }
.play .teambox .t { font-weight: 800; }
.play .teambox .s { font-size: 13px; color: var(--muted); }
.play .stage { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.play h1 { font-size: 34px; margin: 6px 0 6px; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: .9; }
.play .qmeta { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.play .qtext { font-size: 22px; font-weight: 700; line-height: 1.3; }
.play .qimg { width: 100%; max-height: 38vh; object-fit: contain; border-radius: 12px; background: #000; }
.play .opts { display: grid; gap: 10px; }
.play .opt {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  min-height: 64px; padding: 12px 14px; border-radius: 14px; border: 0;
  background: var(--c); color: var(--ink); font-size: 19px; font-weight: 800;
  box-shadow: 0 4px 0 rgba(0,0,0,.35); transition: transform .06s;
}
.play .opt:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.play .opt .l { flex: 0 0 38px; height: 38px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 14%, transparent); display: grid; place-items: center; font-weight: 900; }
.play .opt.dim { opacity: .28; }
.play .opt.chosen { outline: 4px solid var(--text); }
.play .opt.right { outline: 4px solid var(--text); opacity: 1; }
.play .center { text-align: center; margin: auto 0; padding: 20px 0; }
.play .big-emoji { font-size: 64px; line-height: 1; }
.play .status-title { font-size: 30px; font-weight: 900; margin: 10px 0 6px; text-transform: uppercase; letter-spacing: -.02em; line-height: .95; }
.play .locked { border-radius: var(--radius); padding: 16px; background: var(--panel); border: 2px solid var(--accent); }
.play .result { border-radius: var(--radius); padding: 22px 16px; text-align: center; }
.play .result.good { background: rgba(47,191,113,.16); border: 2px solid var(--good); }
.play .result.bad { background: rgba(255,93,93,.12); border: 2px solid var(--bad); }
.play .result .pts { font-size: 44px; font-weight: 900; }
.play .form { display: grid; gap: 14px; }
.play .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.play .chip { border: 1px solid var(--line); background: var(--panel-2); border-radius: 99px; padding: 8px 12px; font-weight: 600; }
.play .chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.play .count { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; text-align: center; }
.play .members { font-size: 13px; color: var(--muted); }
.play .foot { margin-top: 24px; text-align: center; }
.play .err { color: var(--bad); font-weight: 600; min-height: 1.2em; }

/* ================= HOST (quiz master) ================= */
.host { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }
.host .topbar { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.host .tabs { display: flex; gap: 4px; }
.host .tab { background: transparent; border: 0; padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 700; }
.host .tab.on { background: var(--panel-2); color: var(--text); }
.host .spacer { flex: 1; }
.host main { padding: 18px; }
.host .live { display: grid; grid-template-columns: minmax(260px, 340px) 1fr minmax(260px, 320px); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .host .live { grid-template-columns: 1fr; } }
.host h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 12px; font-weight: 900; }
.host h3 { margin: 0 0 6px; }
.host .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.host .stack { display: grid; gap: 10px; }
.host .qnav { max-height: calc(100vh - 220px); overflow: auto; margin: 0 -6px; padding: 0 6px; }
.host .qnav .rh { font-weight: 800; margin: 14px 0 4px; }
.host .qnav .sh { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 8px 0 4px; }
.host .qitem { display: flex; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; background: transparent; border: 1px solid transparent; align-items: flex-start; }
.host .qitem:hover { background: var(--panel-2); }
.host .qitem.sel { background: var(--panel-2); border-color: var(--accent); }
.host .qitem .n { font-weight: 800; color: var(--muted); min-width: 24px; }
.host .qitem .t { flex: 1; font-size: 14px; line-height: 1.3; }
.host .qitem .done { color: var(--good); font-weight: 800; }
.host .qitem .on { color: var(--bad); font-weight: 800; }
.host .preview .qt { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 6px 0 12px; }
.host .preview .opt { padding: 8px 12px; border-radius: 8px; background: var(--panel-2); margin-bottom: 6px; border-left: 6px solid var(--c); }
.host .preview .opt.right { background: rgba(47,191,113,.18); font-weight: 700; }
.host .preview img { max-width: 100%; max-height: 220px; border-radius: 10px; }
.host .clock { font-size: 56px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.host table { width: 100%; border-collapse: collapse; font-size: 14px; }
.host th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.host td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.host td.num { font-variant-numeric: tabular-nums; }
.host .score { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.host .join { display: flex; gap: 12px; align-items: center; }
.host .join img { width: 96px; height: 96px; border-radius: 8px; background: #fff; }
.host .join .url { font-weight: 800; word-break: break-all; }
.host .toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--bad); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; z-index: 50; }
.host .toast.ok { background: var(--accent); color: var(--accent-ink); }
.host .login { max-width: 360px; margin: 14vh auto; }
.host .member { font-size: 12px; color: var(--muted); }
.host .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 4px; vertical-align: 1px; }
.host .dot.on { background: var(--good); }

/* editor */
.editor { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.editor .qzlist .qz { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 10px; border-radius: 8px; background: transparent; border: 1px solid transparent; }
.editor .qzlist .qz.sel { background: var(--panel-2); border-color: var(--accent); }
.editor .round { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--panel); }
.editor .round > .rhead { display: grid; grid-template-columns: 1fr 160px 110px auto; gap: 10px; padding: 14px; align-items: end; border-bottom: 1px solid var(--line); }
.editor .section { margin: 12px 14px; border-left: 3px solid var(--accent); padding-left: 12px; }
.editor .section > .shead { display: flex; gap: 8px; align-items: end; margin-bottom: 10px; }
.editor .question { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.editor .question .qhead { display: grid; grid-template-columns: 34px 1fr 180px 90px auto; gap: 10px; align-items: end; }
.editor .question .qn { font-weight: 900; color: var(--accent); padding-bottom: 10px; }
.editor .optrow { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 8px; align-items: center; margin-top: 6px; }
.editor .optrow .l { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-weight: 900; background: var(--c); color: var(--ink); }
.editor .optrow label.corr { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; white-space: nowrap; }
.editor .imgrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-top: 8px; }
.editor .imgrow img { height: 40px; border-radius: 6px; }
.editor .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 700px) {
  .editor .round > .rhead, .editor .question .qhead { grid-template-columns: 1fr 1fr; }
}

/* ================= BIG SCREEN ================= */
.screen { height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: 3.2vh 4vw; }
.screen .sbar { display: flex; justify-content: space-between; align-items: center; font-size: 2.2vh; color: var(--muted); font-weight: 700; }
.screen .sbody { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.screen .lobby { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; }
.screen .lobby img { width: 34vh; height: 34vh; background: #fff; border-radius: 28px; padding: 1.4vh; }
.screen .title { font-size: 9vh; font-weight: 900; line-height: .88; letter-spacing: -.02em; text-transform: uppercase; margin: 0 0 2.4vh; }
.screen .joinurl { font-size: 4vh; font-weight: 800; color: var(--accent); word-break: break-all; }
.screen .teamchips { display: flex; flex-wrap: wrap; gap: 1.2vh; margin-top: 3vh; }
.screen .teamchips span { background: var(--panel-2); border-radius: 99px; padding: 1vh 2vh; font-size: 2.6vh; font-weight: 700; }
.screen .meta { font-size: 2.6vh; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.screen .qtext { font-size: 6vh; font-weight: 800; line-height: 1.15; margin: 1.5vh 0 3vh; }
.screen .qwrap { display: flex; gap: 3vw; align-items: center; min-height: 0; }
.screen .qwrap img { max-height: 40vh; max-width: 40vw; border-radius: 2vh; }
.screen .sopts { display: grid; grid-template-columns: 1fr 1fr; gap: 2vh; }
.screen .sopt { display: flex; align-items: center; gap: 2vh; background: var(--c); border-radius: 999px; padding: 2.2vh 3.4vh 2.2vh 2.2vh; font-size: 4vh; font-weight: 800; color: var(--ink); transition: opacity .3s; }
.screen .sopt .l { width: 6.5vh; height: 6.5vh; flex: none; border-radius: 999px; background: color-mix(in srgb, var(--bg) 14%, transparent); display: grid; place-items: center; font-weight: 900; }
.screen .sopt.dim { opacity: .2; }
.screen .sopt.right { outline: .7vh solid var(--text); }
.screen .sfoot { display: flex; align-items: center; gap: 3vw; margin-top: 3vh; }
.screen .sfoot .timebar { flex: 1; height: 2.2vh; }
.screen .sclock { font-size: 8vh; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 14vh; text-align: right; }
.screen .answered { font-size: 3vh; font-weight: 700; color: var(--muted); }
.screen .answer-banner { font-size: 5vh; font-weight: 900; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1.6vh 4vh; display: inline-block; margin-bottom: 3vh; }
.screen .rank { display: grid; gap: 1.2vh; }
.screen .rank .r { display: grid; grid-template-columns: 7vh 1fr auto auto; gap: 2vw; align-items: center; background: var(--panel); border-radius: 1.6vh; padding: 1.4vh 2.4vh; font-size: 3.4vh; font-weight: 800; }
.screen .rank .r .p { color: var(--accent); }
.screen .rank .r .tm { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.screen .rank .r .pt { font-variant-numeric: tabular-nums; min-width: 9vh; text-align: right; }
.screen .rank .r.first { background: var(--accent); color: var(--accent-ink); }
.screen .rank .r.first .p, .screen .rank .r.first .tm { color: var(--accent-ink); }
.screen .rank .r.wrong { opacity: .55; }
.screen .bigmsg { font-size: 13vh; font-weight: 900; text-align: center; text-transform: uppercase; letter-spacing: -.02em; line-height: .9; }
.screen .board { columns: 2; column-gap: 3vw; }
.screen .board .r { break-inside: avoid; margin-bottom: 1.2vh; }

/* two-part questions, gambler, marking */
.editor .round > .rhead { grid-template-columns: 1fr 190px 150px 100px auto; }
.editor .part { margin: 10px 0 0 44px; padding: 10px 12px; border-left: 3px solid var(--line); background: rgba(255,255,255,.02); border-radius: 8px; }
.editor .part .phead { display: grid; grid-template-columns: 1fr 150px auto; gap: 10px; align-items: end; }
.editor .question.gamble { border-color: var(--accent); }
.editor .gamblebox { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--text); }
.host .preview .plabel { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 10px 0 4px; }
.host .markrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0; }
.host .markrow + .markrow { border-top: 1px dashed var(--line); }
.play .part { display: grid; gap: 8px; }
.play .part .plabel { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.play .seg { display: grid; grid-auto-flow: column; gap: 8px; }
.play .seg .opt { min-height: 56px; justify-content: center; }
.play .wager { display: grid; gap: 12px; }
.play .wager .amt { font-size: 40px; font-weight: 900; text-align: center; padding: 12px; }
.play .wager input[type=range] { width: 100%; accent-color: var(--accent); }
.play .partres { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); text-align: left; }
.screen .sparts { display: grid; gap: 2vh; }
.screen .spart { display: flex; align-items: center; gap: 2vw; font-size: 3.6vh; font-weight: 800; background: var(--panel); border-radius: 2vh; padding: 2vh 2.6vh; }
.screen .spart .lab { color: var(--accent); min-width: 20vw; }
.screen .chips { display: flex; gap: 1.4vh; }
.screen .chips span { background: var(--panel-2); border-radius: 1.4vh; padding: .8vh 2vh; }
@media (max-width: 700px) { .editor .round > .rhead { grid-template-columns: 1fr 1fr; } .editor .part { margin-left: 0; } .editor .part .phead { grid-template-columns: 1fr; } }

/* picture rounds */
.host .rtype { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; }
.host .rtype select { width: auto; }
.host tr.detail td { background: rgba(255,255,255,.02); padding: 6px 12px 12px; }
.editor .picgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.editor .picitem { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 6px; }
.editor .picitem input { padding: 7px 9px; font-size: 13px; }
.picthumb { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--well); display: grid; place-items: center; overflow: hidden; cursor: pointer; border: 1px dashed var(--line); }
.picthumb img { width: 100%; height: 100%; object-fit: cover; }
.picn { position: absolute; top: 6px; left: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 900; border-radius: 8px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: 14px; padding: 0 6px; }
.play .sheet { display: grid; gap: 8px; }
.play .pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.play .pitem { display: grid; gap: 6px; align-content: start; }
.play .pitem input { padding: 9px 10px; font-size: 15px; }
.play .pimg { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--well); display: grid; place-items: center; }
.play .pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play .pcap { font-size: 30px; text-align: center; padding: 6px; }
.play .saved { font-size: 11px; color: var(--muted); min-height: 1em; }
.play .pans { font-size: 13px; font-weight: 700; }
.play .pitem.ok input { border-color: var(--good); }
.play .pitem.no input { border-color: var(--bad); }
.screen .sgrid { display: grid; gap: 1.6vh; min-height: 0; flex: 1; align-content: start; }
.screen .sgrid { flex: none; }
.screen .stile { position: relative; background: var(--panel); border-radius: 1.6vh; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.screen .stile img { width: 100%; height: 100%; object-fit: contain; min-height: 0; background: #000; }
.screen .stile .scap { display: grid; place-items: center; font-size: 7vh; }
.screen .stile .snum { position: absolute; top: 1vh; left: 1vh; background: var(--accent); color: var(--accent-ink); font-weight: 900; font-size: 2.6vh; border-radius: 1vh; padding: .3vh 1.2vh; }
.screen .stile .sans { font-size: 2.4vh; font-weight: 800; padding: .8vh 1.2vh; background: var(--accent); color: var(--accent-ink); text-align: center; }
.screen .stile .sans.muted { background: transparent; color: var(--muted); }
.editor .zoompick { position: relative; display: inline-block; }
.editor .zoompick img { height: 60px; border-radius: 6px; cursor: crosshair; display: block; }
.editor .zoompick i { position: absolute; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--bad); transform: translate(-50%, -50%); pointer-events: none; }
.screen .sfoot-brand { position: absolute; right: 3vw; bottom: 1.2vh; padding: 0; font-size: 1.5vh; }
.screen .sfoot-brand img { width: 3.6vh; height: 3.6vh; }
.screen { position: relative; }
.play .opt { border-radius: 22px; }
.play .hint { display: inline-block; align-self: flex-start; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.play .hint b { font-weight: 900; letter-spacing: .06em; }
.play .qimgwrap { border-radius: 28px; overflow: hidden; background: #000; }
.play .qimgwrap .qimg { border-radius: 0; display: block; -webkit-touch-callout: none; user-select: none; pointer-events: none; transition: filter .15s linear; }
.play .bignum { font-size: 28px; text-align: center; font-weight: 800; }
.play .orderlist { display: grid; gap: 8px; }
.play .orderitem { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 2px solid color-mix(in srgb, var(--text) 40%, transparent); background: transparent; font-size: 18px; font-weight: 700; color: var(--text); }
.play .orderitem.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.play .orderitem .onum { flex: 0 0 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; font-weight: 900; background: color-mix(in srgb, var(--text) 12%, transparent); }
.play .orderitem.on .onum { background: var(--accent-ink); color: var(--accent); }
.play .bonus { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 4px 12px; font-weight: 800; margin: 6px 0; }
.play .standing { text-align: center; font-weight: 700; }
.play .standing .up { color: var(--good); font-weight: 900; }
.play .standing .down { color: var(--coral); font-weight: 900; }

/* big screen: game-show extras */
.fxbar { position: fixed; left: 50%; transform: translateX(-50%); top: 1.6vh; display: flex; gap: 8px; opacity: .35; transition: opacity .2s; z-index: 30; }
.fxbar:hover, .fxbar:has(.primary) { opacity: 1; }
.screen .shint { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1vh 2.6vh; font-size: 3.4vh; font-weight: 800; margin: 0 1vw 2vh 0; }
.screen .shint b { font-weight: 900; letter-spacing: .08em; }
.screen .simgwrap { border-radius: 28px; overflow: hidden; max-height: 44vh; max-width: 44vw; background: #000; flex: none; }
.screen .simgwrap img { display: block; max-height: 44vh; max-width: 44vw; border-radius: 0; transition: filter .15s linear; }
.screen .qwrap img { border-radius: 28px; }
.screen .simgwrap img.rev { will-change: transform, filter; }
.screen .sorder { display: flex; flex-wrap: wrap; gap: 1.6vh; }
.screen .sorder span { border: .35vh solid color-mix(in srgb, var(--text) 60%, transparent); border-radius: 999px; padding: 1.4vh 3vh; font-size: 3.6vh; font-weight: 800; }
.screen .feed { display: flex; flex-wrap: wrap; gap: 1vh; min-height: 5vh; margin-top: 2.4vh; }
.screen .feed span { background: var(--panel-2); border-radius: 999px; padding: .8vh 2vh; font-size: 2.4vh; font-weight: 700; }
.screen .feed span.new { animation: popin .45s cubic-bezier(.2,1.6,.4,1); background: var(--accent); color: var(--accent-ink); }
@keyframes popin { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.screen .sclock.urgent { color: var(--coral); animation: throb 1s infinite; }
@keyframes throb { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } }
.screen .rank .r.lb { animation: slidein .55s both cubic-bezier(.2,.9,.3,1); }
@keyframes slidein { from { transform: translateX(-6vw); opacity: 0; } to { transform: none; opacity: 1; } }
.screen .rank .r .mv { font-size: 2.6vh; font-weight: 900; min-width: 6vh; text-align: right; }
.screen .rank .r .mv.up { color: var(--good); }
.screen .rank .r .mv.down { color: var(--coral); }
.screen .rank .r.first .mv.up { color: var(--accent-ink); }
.screen .rank .r .zap { font-style: normal; color: var(--accent); font-weight: 900; }
.screen .rank .r.first .zap { color: var(--accent-ink); }
.screen .rank .r.first { background: var(--accent); color: var(--accent-ink); }
.screen .top5 { display: flex; gap: 3vw; align-items: center; margin-top: auto; padding-top: 2.4vh; border-top: 2px solid color-mix(in srgb, var(--text) 50%, transparent); font-size: 2.4vh; color: var(--text); white-space: nowrap; overflow: hidden; }
.screen .top5 .lab { color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.screen .top5 i { font-style: normal; color: var(--muted); }

/* ---------- branding & account messages ---------- */
.brand { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
.brand .brandlogo { height: 1.6em; max-width: 8em; object-fit: contain; margin-right: .45em; }
.brand .brandsub { text-transform: none; font-weight: 700; opacity: .85; margin-left: .35em; }
.tabs a.tab { text-decoration: none; }
.promo { color: var(--muted); font-size: 14px; text-align: center; margin: 6px 0 0; }
.qm-problem { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-content: center; gap: 14px; padding: 24px; text-align: center; }
.qm-problem .brand { justify-content: center; font-size: 28px; }
.qm-problem h2 { margin: 0; font-size: 26px; text-transform: uppercase; font-weight: 900; color: var(--accent); }
.qm-problem p { max-width: 420px; margin: 0 auto; }
.qm-problem .btn { justify-self: center; }
.pending-card { text-align: center; }
.pending-card .big { font-size: 48px; }
.fee { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 4px 12px; font-weight: 800; }
.brandgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.brandcol { display: flex; align-items: center; gap: 10px; background: var(--well); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 14px; }
.brandcol input[type=color] { width: 40px; height: 32px; padding: 0; border: 0; background: none; border-radius: 8px; flex: none; }
.pendingcard { border-color: var(--accent); }

/* ---------- bingo ---------- */
.ball { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; font-weight: 900; font-size: 20px; color: var(--ink);
  background: radial-gradient(circle at 24% 20%, rgba(255,255,255,.85) 0 7%, transparent 8%), radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--bc, #a9c7e8) 75%, #fff), var(--bc, #a9c7e8) 70%); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); flex: none; }
.ball.c0 { --bc: #a9c7e8; } .ball.c1 { --bc: #f5f0e1; } .ball.c2 { --bc: #ff7f50; } .ball.c3 { --bc: #3ccf8e; } .ball.c4 { --bc: #e6d9b8; }
.ball.c5 { --bc: #7fa6d1; } .ball.c6 { --bc: #ffd166; } .ball.c7 { --bc: #c7b8ea; } .ball.c8 { --bc: #a7aaad; }
.ball.big { width: 110px; height: 110px; font-size: 52px; }
.ball.small { width: 34px; height: 34px; font-size: 15px; }
.bcard { background: #f5f0e1; color: #002147; border-radius: 14px; padding: 8px; margin-bottom: 12px; border: 3px solid transparent; transition: border-color .2s; }
.bcard.hot { border-color: var(--coral); }
.bcard.win { border-color: var(--good); }
.bcard-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 0 4px 6px; }
.bgrid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.bcell { aspect-ratio: 1; border-radius: 7px; display: grid; place-items: center; font-weight: 900; font-size: clamp(13px, 4vw, 18px); border: 1.5px solid rgba(0,33,71,.18);
  background: #fff; color: #002147; user-select: none; -webkit-user-select: none; cursor: pointer; position: relative; padding: 0; }
.bcell.empty { background: rgba(0,33,71,.07); border-color: transparent; cursor: default; }
.bcell.dab { background: #002147; color: #f5f0e1; border-color: #002147; }
.bcell.dab::after { content: ''; position: absolute; inset: 3px; border-radius: 999px; border: 2px solid #ff7f50; }
.bcell.called { box-shadow: inset 0 0 0 3px #ff7f50; }
.bcall { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.bcall .nm { font-weight: 900; font-size: 18px; }
.bcall .recent { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.claim-btn { width: 100%; padding: 18px; font-size: 22px; font-weight: 900; border-radius: 999px; background: var(--good); color: #002147; border: 0; text-transform: uppercase; margin-bottom: 12px; animation: pulse 1s infinite; }
.pkgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pkg { background: var(--panel-2); border: 2px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; }
.pkg.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.winbar { background: var(--good); color: #002147; border-radius: 14px; padding: 10px 14px; font-weight: 800; margin-bottom: 12px; }
.bboard { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.bboard span { display: grid; place-items: center; aspect-ratio: 1.3; border-radius: 8px; background: color-mix(in srgb, var(--text) 8%, transparent); color: color-mix(in srgb, var(--text) 40%, transparent); font-weight: 800; }
.bboard span.on { background: var(--accent); color: var(--accent-ink); }
.bboard span.last { background: var(--coral); color: #002147; }
.bscreen { height: 100vh; display: grid; grid-template-columns: 38vw 1fr; gap: 3vw; padding: 3vh 3vw 6vh; }
.bscreen .left { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vh; text-align: center; }
.bscreen .ball.huge { width: 30vh; height: 30vh; font-size: 14vh; }
.bscreen .callname { font-size: 4.4vh; font-weight: 900; color: var(--accent); text-transform: uppercase; }
.bscreen .bboard { font-size: 3vh; gap: .8vh; align-content: center; }
.bscreen .bboard span { aspect-ratio: 1.7; }
.bscreen .stage { font-size: 3vh; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.bscreen .wins { font-size: 2.6vh; }
.bscreen .recent { display: flex; gap: 1vh; }
.bscreen .recent .ball { width: 7vh; height: 7vh; font-size: 3.2vh; }
.bscreen .qr img { width: 20vh; height: 20vh; background: #fff; border-radius: 16px; padding: 1vh; }
.bscreen .wincard { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: color-mix(in srgb, var(--bg) 92%, transparent); z-index: 20; gap: 2vh; }
.bscreen .wincard .t { font-size: 12vh; font-weight: 900; color: var(--good); text-transform: uppercase; line-height: .9; }
.bscreen .wincard .n { font-size: 5vh; font-weight: 900; }
.legal { background: var(--well); border: 1px solid var(--coral); border-radius: 12px; padding: 12px; font-size: 14px; }
.legal ul { margin: 6px 0 0 18px; padding: 0; }
@media (max-width: 800px) { .bscreen { grid-template-columns: 1fr; height: auto; } }
.bscreen .row { display: flex; flex-wrap: wrap; }
.offline-banner { position: fixed; top: 0; left: 0; right: 0; background: var(--coral); color: #002147; text-align: center; padding: 1vh; font-weight: 800; z-index: 40; }
.bhost .bigdraw { font-size: 26px; padding: 22px 30px; }
.bhost .lastball { display: flex; align-items: center; gap: 16px; }
a.btn { text-decoration: none; justify-content: center; text-align: center; }
.host label.row { flex-wrap: nowrap; }
.host label.row input[type=checkbox] { width: auto; flex: none; }
.host td a, .host .member a, .legal a { color: var(--accent); }
.host input[type=date] { width: auto; color-scheme: dark; }

/* ---------- game PIN ---------- */
.pinform { text-align: center; margin-top: 8vh; }
.pinbox { font-size: 44px !important; text-align: center; letter-spacing: .4em; padding: 14px 0 14px .4em !important; font-weight: 900; }
.center.stack { display: grid; gap: 14px; }
.pinline { display: flex; align-items: center; gap: 2vw; flex-wrap: wrap; font-size: 3.2vh; color: var(--accent); margin-top: 1vh; }
.pinline b { color: var(--text); }
.pinbig { font-size: 9vh; font-weight: 900; letter-spacing: .12em; color: var(--accent); line-height: 1; }
.pinbig.small { font-size: 4.5vh; }
.pinchip { background: var(--accent); color: var(--accent-ink) !important; border-radius: 999px; padding: 2px 10px; letter-spacing: .12em; }

/* ---------- super admin plans ---------- */
.plantable td, .plantable th { padding: 6px 8px; font-size: 14px; }
.plantable input[type=checkbox] { width: 18px; height: 18px; }
.featgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin-top: 8px; }
.featrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--well); border-radius: 10px; padding: 6px 10px; margin: 0; color: var(--text); }
.planlist { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }

/* ---------- join questions ---------- */
.fieldrow { background: var(--well); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.jtick { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 15px; margin: 0; }
.jtick input { width: 22px; height: 22px; flex: none; margin-top: 1px; }

/* ---------- adverts ---------- */
.adslot { margin: 8px 0 0; }
.adslot a, .adslot > div, .sad a, .sad > div { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.adslot img { display: block; width: 100%; max-height: 120px; object-fit: contain; }
.adslot .adtext { display: block; padding: 14px 16px; font-weight: 700; text-align: center; }
.adlabel { position: absolute; top: 4px; right: 6px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.45); color: #fff; border-radius: 6px; padding: 1px 5px; }
.sad { flex: none; height: 24vh; margin-top: 1.5vh; display: flex; justify-content: center; }
.sad[data-size=small] { height: 12vh; }
.sad[data-size=medium] { height: 18vh; }
.sad[data-size=large] { height: 24vh; }
.sad > div, .sad a { height: 100%; max-width: 92vw; display: flex; align-items: center; justify-content: center; }
.sad img { height: 100%; width: auto; max-width: 92vw; object-fit: contain; display: block; }
.sad[data-size=large] .adtext { font-size: 5vh; }
.sad .adtext { font-size: 3.6vh; font-weight: 900; padding: 0 4vw; }
.sad .adlabel { font-size: 1.3vh; }
.bwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.has-ad .bscreen { padding-top: 0; padding-bottom: 1vh; }
.bwrap .sad[data-size=large] { height: 21vh; }
.bwrap #root { flex: 1; min-height: 0; }
.bwrap .bscreen { height: 100%; }
.bwrap .sad { margin: 0 0 1.5vh; }
.adthumb { width: 200px; height: 50px; border-radius: 10px; background: var(--card); border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; cursor: pointer; flex: none; }
.adthumb img { width: 100%; height: 100%; object-fit: contain; }

/* leaderboards with more than 8 teams use two columns; everything stays on one screen */
.screen .sbody { overflow: hidden; }
.screen .rank.board { grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(8, auto); column-gap: 2vw; }
.screen .rank.board .r { font-size: 3vh; padding: 1.1vh 2vh; grid-template-columns: 6vh 1fr auto auto; }
body.has-ad .screen .title, .screen.has-ad .title { font-size: 6.5vh; margin-bottom: 1.4vh; }
body.has-ad .screen .rank { gap: .8vh; }
body.has-ad .screen .rank .r { font-size: 2.6vh; padding: .8vh 2vh; }
body.has-ad .screen .top5 { display: none; }
body.has-ad .screen .answer-banner { font-size: 4vh; padding: 1.2vh 3.4vh; margin-bottom: 1.6vh; }
