/* ==========================================================
   Halloween Costume Contest
   Charcoal night, drifting nebula, glowing stars, pumpkin light.
   ========================================================== */
@font-face { font-family: "Rubik"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/rubik-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/rubik-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-weight: 900; font-style: normal; font-display: swap; src: url("../fonts/rubik-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-800-normal.woff2") format("woff2"); }
:root {
    --ink: #15151A;
    --panel: #1C1C21;
    --panel-2: #24242B;
    --panel-3: #2E2E37;
    --line: rgba(255, 255, 255, .09);
    --text: #F2EFEA;
    --muted: #A7A2B0;
    --pumpkin: #F2700F;
    --pumpkin-hi: #FF8A2A;
    --gold: #E8C24A;
    --violet: #7A3FC4;
    --violet-soft: #B98CE0;
    --ecto: #2E9E6B;
    --ecto-hi: #43C98A;
    --blood: #C8102E;
    --a0: #F2700F; --a1: #7A3FC4; --a2: #2E9E6B; --a3: #C8102E;
    --radius: 6px;
    --display: "Rubik", "Inter", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
    --body: "Inter", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    background: var(--ink);
    color: var(--text);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); pointer-events: none; }
.nebula { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; will-change: transform; }
.nebula-a { width: 70vmax; height: 55vmax; left: -18vmax; top: -20vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 55%, transparent), transparent); animation: drift-a 18s ease-in-out infinite; }
.nebula-b { width: 60vmax; height: 50vmax; right: -20vmax; bottom: -22vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--pumpkin) 32%, transparent), transparent); animation: drift-b 22s ease-in-out infinite; }
.nebula-c { width: 45vmax; height: 40vmax; left: 30vw; top: 25vh; background: radial-gradient(closest-side, color-mix(in srgb, var(--ecto) 18%, transparent), transparent); animation: drift-c 26s ease-in-out infinite; }
@keyframes drift-a { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(8vw,5vh) scale(1.08); } 66% { transform: translate(3vw,10vh) scale(.95); } }
@keyframes drift-b { 0%,100% { transform: translate(0,0) scale(1); } 40% { transform: translate(-9vw,-6vh) scale(1.1); } 75% { transform: translate(-4vw,-12vh) scale(.94); } }
@keyframes drift-c { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-10vw,6vh); } }
.star { position: absolute; border-radius: 50%; animation-name: twinkle; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
@keyframes twinkle { 0%,100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
.page { position: relative; z-index: 1; }

/* ---------- Shared controls ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    min-height: 44px; padding: .6em 1.1em; border: 0; border-radius: var(--radius);
    background: var(--pumpkin); color: #fff; font-weight: 700; letter-spacing: .01em;
    cursor: pointer; text-decoration: none; transition: background .15s, transform .08s;
}
.btn:hover { background: var(--pumpkin-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-dark { background: var(--panel-3); }
.btn-dark:hover { background: color-mix(in srgb, var(--panel-3) 80%, #fff 8%); }
.btn-violet { background: var(--violet); }
.btn-violet:hover { background: color-mix(in srgb, var(--violet) 85%, #fff); }
.btn-ecto { background: var(--ecto); }
.btn-ecto:hover { background: color-mix(in srgb, var(--ecto) 85%, #fff); }
.btn-danger { background: var(--blood); }
.btn-danger:hover { background: color-mix(in srgb, var(--blood) 85%, #fff); }
.btn-sm { min-height: 34px; padding: .35em .75em; font-size: .85rem; }
.btn-block { width: 100%; }

.field { display: grid; gap: .35rem; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.input, .select, .textarea {
    width: 100%; min-height: 44px; padding: .6em .75em;
    background: color-mix(in srgb, var(--ink) 80%, #000); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--pumpkin); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pumpkin) 20%, transparent); }
.inline-err { color: #ff6b81; font-size: .85rem; font-weight: 600; }
.muted { color: var(--muted); }

/* ---------- Header brand (title, logo, or both) ---------- */
.brand { display: flex; align-items: center; gap: .6em; min-width: 0; }
.brand-logo { display: block; width: auto; height: auto; object-fit: contain; }
.brand-title { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }

/* ==========================================================
   PHONE
   ========================================================== */
.ph-top {
    position: sticky; top: 0; z-index: 20;
    background: #000;
    border-bottom: 2px solid var(--pumpkin);
    padding: calc(env(safe-area-inset-top) + .6rem) 1rem .6rem;
}
.ph-top-row { display: flex; align-items: center; gap: .75rem; }
.ph-title { flex: 1; min-width: 0; margin: 0; font-size: 1.3rem; }
.ph-title .brand-logo { max-height: 42px; max-width: 60vw; }
.ph-tabs { flex: none; display: flex; background: var(--panel); border-radius: var(--radius); padding: 3px; }
.ph-tab { border: 0; background: none; padding: .45em .9em; border-radius: 4px; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; }
.ph-tab[aria-selected="true"] { background: var(--pumpkin); color: #fff; }

.ph-main { max-width: 640px; margin: 0 auto; padding: 1rem 1rem calc(env(safe-area-inset-bottom) + 2rem); }

.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem 0 .75rem; scrollbar-width: none; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: .35em; scroll-snap-align: start;
    min-height: 40px; padding: .4em .85em; border-radius: 999px;
    border: 1px solid var(--line); background: var(--panel); color: var(--text);
    font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ecto-hi); box-shadow: 0 0 8px var(--ecto-hi); }
.chip.is-done .dot { background: var(--pumpkin); box-shadow: 0 0 8px var(--pumpkin); }
.chip.is-closed .dot { background: var(--muted); box-shadow: none; }
.chip.is-waiting .dot { background: transparent; border: 1.5px solid var(--muted); box-shadow: none; }
.chip.is-live:not(.is-done) .dot { animation: live-dot 1.2s ease-in-out infinite; }
@keyframes live-dot { 50% { transform: scale(1.5); } }
.notice.is-waiting { border-left-color: var(--muted); }

.cat-head { display: flex; align-items: flex-start; gap: .6rem; margin: .25rem 0 1rem; }
.cat-emoji { font-size: 1.5rem; line-height: 1.7rem; height: 1.7rem; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--pumpkin) 45%, transparent)); }
.cat-name { margin: 0; font-family: var(--display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.cat-desc { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }

.notice {
    display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; padding: .75rem .9rem;
    background: var(--panel); border-left: 4px solid var(--gold); border-radius: var(--radius); font-weight: 600;
}
.notice.is-closed { border-left-color: var(--muted); }

.grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 520px) { .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
    position: relative; display: flex; flex-direction: column; text-align: left;
    padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden;
    background: var(--panel); cursor: pointer; transition: border-color .15s, transform .12s, box-shadow .2s;
}
.card:active { transform: scale(.98); }
.card:disabled { cursor: default; }
.card-photo { position: relative; aspect-ratio: 1 / 1; background: var(--panel-2); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.sigil { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--display); font-size: 3rem; font-weight: 900; color: rgba(255, 255, 255, .85); background: radial-gradient(circle at 30% 25%, var(--violet), color-mix(in srgb, var(--violet) 30%, #000) 70%); }
.card-num { position: absolute; top: .45rem; left: .45rem; min-width: 2rem; padding: .1rem .45rem; border-radius: 4px; background: rgba(21, 21, 26, .82); font-weight: 800; font-size: .8rem; text-align: center; }
.card-body { padding: .6rem .7rem .75rem; }
.card-name { font-weight: 800; font-size: .98rem; line-height: 1.2; }
.card-sub { margin-top: .15rem; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.card.is-mine { border-color: var(--pumpkin); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pumpkin) 25%, transparent), 0 0 26px color-mix(in srgb, var(--pumpkin) 35%, transparent); }
.card-check { position: absolute; top: .45rem; right: .45rem; display: none; align-items: center; gap: .3em; padding: .15rem .5rem; border-radius: 4px; background: var(--pumpkin); font-weight: 800; font-size: .75rem; }
.card.is-mine .card-check { display: inline-flex; }
/* after voting: the pick stays lit, the rest fade back */
.grid-cards.has-vote .card:not(.is-mine) { filter: grayscale(.9) brightness(.45); }
.grid-cards.has-vote .card:not(.is-mine):active { filter: grayscale(.5) brightness(.7); }
.notice.is-voted { border-left-color: var(--ecto-hi); }
/* vote confirmation sheet */
dialog.vote-confirm { width: min(380px, calc(100% - 2rem)); text-align: center; }
.vc-body { justify-items: center; gap: .35rem; padding: 1.4rem 1.2rem 1rem; }
.vc-photo { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; border: 4px solid var(--pumpkin); box-shadow: 0 0 30px color-mix(in srgb, var(--pumpkin) 45%, transparent); margin-bottom: .6rem; }
.vc-photo img { width: 100%; height: 100%; object-fit: cover; }
.vc-photo .sigil { font-size: 3rem; }
.vc-cat { font-weight: 700; color: var(--gold); font-size: .9rem; }
.vc-name { font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; }
.vc-sub { color: var(--muted); font-size: .92rem; }
.vc-foot { justify-content: stretch; }
.vc-foot .btn { flex: 1; }
.card.is-winner { border-color: var(--gold); box-shadow: 0 0 30px color-mix(in srgb, var(--gold) 45%, transparent); }

.winner-strip { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; padding: .75rem; border-radius: 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, #000), color-mix(in srgb, var(--gold) 10%, #000)); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); }
.winner-strip .ws-photo { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; flex: none; }
.winner-strip .ws-label { font-size: .78rem; font-weight: 800; color: var(--gold); }
.winner-strip .ws-name { font-family: var(--display); font-size: 1.4rem; font-weight: 800; line-height: 1; }

/* phone trivia */
.tv-card { background: var(--panel); border-radius: 12px; padding: 1.25rem; text-align: center; }
.tv-big { font-family: var(--display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.05; margin: .25rem 0 .5rem; }
.tv-emoji { font-size: 3.2rem; }
.tv-join { display: grid; gap: .75rem; text-align: left; }
.tv-q { font-weight: 800; font-size: 1.15rem; line-height: 1.3; margin: 0 0 1rem; text-align: left; }
.tv-timer { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin-bottom: 1rem; }
.tv-timer > i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.answers { display: grid; gap: .65rem; }
.answer {
    display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 64px; padding: .7rem 1rem;
    border: 0; border-radius: 10px; color: #fff; font-weight: 800; font-size: 1.05rem; text-align: left; cursor: pointer;
    transition: transform .08s, opacity .2s, box-shadow .2s;
}
.answer .glyph { font-size: 1.6rem; flex: none; }
.answer:active { transform: scale(.98); }
.answer.a0 { background: var(--a0); }
.answer.a1 { background: var(--a1); }
.answer.a2 { background: var(--a2); }
.answer.a3 { background: var(--a3); }
.answers.is-tf .answer.a0 { background: var(--ecto); }
.answers.is-tf .answer.a1 { background: var(--blood); }
.answers.is-locked .answer { opacity: .35; cursor: default; }
.answers.is-locked .answer.is-picked { opacity: 1; box-shadow: 0 0 0 3px #fff; }
.result { margin-top: 1rem; padding: 1rem; border-radius: 10px; font-weight: 800; font-size: 1.15rem; text-align: center; }
.result.good { background: color-mix(in srgb, var(--ecto) 20%, transparent); border: 1px solid var(--ecto-hi); }
.result.bad { background: color-mix(in srgb, var(--blood) 18%, transparent); border: 1px solid #ff6b81; }
.score-line { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1rem; color: var(--muted); font-weight: 700; }
.score-line b { display: block; font-size: 1.6rem; color: var(--text); }

.toast {
    position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.25rem); z-index: 50;
    transform: translateX(-50%) translateY(150%); max-width: calc(100% - 2rem);
    padding: .75rem 1rem; border-radius: var(--radius); background: var(--panel-3); font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: transform .25s ease;
}
.toast.is-on { transform: translateX(-50%) translateY(0); }

/* ==========================================================
   ADMIN
   ========================================================== */
.ad-top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
    padding: .7rem 1.25rem; background: #000; border-bottom: 2px solid var(--pumpkin);
}
.ad-brand { font-family: var(--display); font-size: 1.3rem; font-weight: 800; line-height: 1; flex: 1; min-width: 0; }
.ad-nav { display: flex; gap: .25rem; overflow-x: auto; min-width: 0; }
@media (max-width: 1100px) {
    /* brand and Sign Out on top, the section links scroll on their own row underneath */
    .ad-top { flex-wrap: wrap; row-gap: .5rem; }
    .ad-nav { order: 3; flex-basis: 100%; }
}
.ad-nav a { padding: .45em .8em; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.ad-nav a:hover { color: var(--text); background: var(--panel-2); }
.ad-main { max-width: 1680px; margin: 0 auto; padding: 1.25rem 1rem 4rem; display: grid; gap: 1.5rem; }
.ad-section { scroll-margin-top: 80px; }
.ad-h { display: flex; align-items: center; gap: .75rem; margin: 0 0 .75rem; }
.ad-h h2 { margin: 0; flex: 1; font-size: 1.1rem; font-weight: 800; }
.panel { background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); border-radius: 10px; }
.panel-head { padding: .65rem 1rem; background: color-mix(in srgb, var(--ink) 80%, #000); border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; font-weight: 800; font-size: .92rem; display: flex; align-items: center; gap: .6rem; }
.panel-body { padding: 1rem; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { position: relative; overflow: hidden; padding: 1rem 1.1rem; border-radius: 10px; color: #fff; }
.stat b { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.stat span { font-size: .85rem; font-weight: 600; opacity: .9; }
.stat i { position: absolute; right: -.1em; bottom: -.25em; font-style: normal; font-size: 4.6rem; opacity: .18; line-height: 1; }
.stat-pumpkin { background: linear-gradient(135deg, var(--pumpkin), color-mix(in srgb, var(--pumpkin) 70%, #000)); }
.stat-violet { background: linear-gradient(135deg, var(--violet), color-mix(in srgb, var(--violet) 55%, #000)); }
.stat-ecto { background: linear-gradient(135deg, var(--ecto), color-mix(in srgb, var(--ecto) 60%, #000)); }
.stat-gold { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 88%, #000), color-mix(in srgb, var(--gold) 55%, #000)); }

.deck { display: grid; gap: 1rem; }
@media (min-width: 900px) { .deck { grid-template-columns: 1.3fr 1fr; } }
.screen-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .5rem; }
.screen-btn { display: grid; gap: .25rem; justify-items: center; padding: .8rem .5rem; border: 2px solid var(--line); border-radius: 10px; background: var(--panel-2); cursor: pointer; font-weight: 700; font-size: .88rem; }
.screen-btn .e { font-size: 1.7rem; }
.screen-btn[aria-pressed="true"] { border-color: var(--pumpkin); background: color-mix(in srgb, var(--pumpkin) 16%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--pumpkin) 25%, transparent); }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-3); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--ecto); }
.switch input:checked + span::after { transform: translateX(22px); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; padding: .55rem .75rem; font-size: .8rem; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: .3em; padding: .15em .55em; border-radius: 4px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.badge-open { background: color-mix(in srgb, var(--ecto) 20%, transparent); color: var(--ecto-hi); }
.badge-closed { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.badge-wait { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.badge-live { background: color-mix(in srgb, var(--pumpkin) 20%, transparent); color: var(--pumpkin-hi); }
.mini-bars { display: grid; gap: .3rem; min-width: 220px; }
.mini-bar { display: grid; grid-template-columns: minmax(80px, 140px) 1fr 2.5rem; gap: .5rem; align-items: center; font-size: .82rem; }
.mini-bar .track { height: 8px; background: var(--panel-3); border-radius: 4px; overflow: hidden; }
.mini-bar .fill { height: 100%; background: var(--pumpkin); border-radius: 4px; transition: width .6s ease; }
.mini-bar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar .ct { text-align: right; font-weight: 800; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.person { background: var(--panel-2); border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); text-align: left; padding: 0; }
.person:hover { border-color: var(--pumpkin); }
.person .card-photo { aspect-ratio: 4 / 3; }
.person .p-body { padding: .55rem .65rem .7rem; }
.person .p-name { font-weight: 800; font-size: .92rem; }
.person .p-cats { margin-top: .25rem; font-size: .9rem; letter-spacing: .1em; }
.person-add { display: grid; place-items: center; min-height: 180px; border: 2px dashed var(--line); background: none; color: var(--muted); font-weight: 700; }
.person-add:hover { color: var(--text); border-color: var(--pumpkin); }

.show-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .9rem 1rem; }
.show-now { flex: 1; min-width: 220px; }
.show-now .k { font-size: .78rem; color: var(--muted); font-weight: 700; }
.show-now .v { font-weight: 800; font-size: 1.05rem; }
.btn-next { min-height: 56px; padding: .7em 1.6em; font-size: 1.1rem; }
.round-block + .round-block { margin-top: 1rem; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-item { display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; align-items: center; padding: .55rem .75rem; border-top: 1px solid var(--line); }
.q-item.is-used { opacity: .55; }
.q-item.is-live { background: color-mix(in srgb, var(--pumpkin) 12%, transparent); opacity: 1; }
.q-num { font-weight: 800; color: var(--muted); text-align: center; }
.q-text { font-weight: 600; font-size: .92rem; min-width: 0; }
.q-meta { font-size: .78rem; color: var(--muted); }
.q-actions { display: flex; gap: .3rem; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius); background: var(--panel-3); cursor: pointer; font-size: .9rem; }
.icon-btn:hover { background: color-mix(in srgb, var(--panel-3) 80%, #fff 8%); }

.flash { padding: .75rem 1rem; border-radius: var(--radius); background: color-mix(in srgb, var(--ecto) 18%, transparent); border: 1px solid var(--ecto); font-weight: 600; }
.ad-msg { font-size: .88rem; font-weight: 600; color: var(--gold); min-height: 1.2em; }

/* modal */
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal > form.main, dialog.modal > form#hd-new-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
dialog.modal { width: min(680px, calc(100% - 1.5rem)); max-height: calc(100dvh - 2rem); overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog.modal::backdrop { background: rgba(8, 8, 12, .72); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; background: color-mix(in srgb, var(--ink) 80%, #000); border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; flex: 1; font-size: 1.05rem; font-weight: 800; }
.modal-body { padding: 1.1rem; display: grid; gap: .9rem; overflow-y: auto; min-height: 0; flex: 1 1 auto; align-content: start; }
.modal-head, .modal-foot { flex: none; }
.modal-foot { display: flex; gap: .5rem; justify-content: flex-end; padding: .85rem 1.1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
.two { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.check { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--ink) 80%, #000); cursor: pointer; font-weight: 600; font-size: .9rem; }
.check:has(input:checked) { border-color: var(--pumpkin); background: color-mix(in srgb, var(--pumpkin) 14%, transparent); }
.opt-row { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: center; }
.opt-row input[type="radio"] { width: 20px; height: 20px; accent-color: var(--ecto); }
.photo-drop { display: flex; align-items: center; gap: .9rem; }
.photo-drop .prev { width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--panel-2); flex: none; }
.photo-drop .prev img { width: 100%; height: 100%; object-fit: cover; }
.file-pick { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.file-pick .btn { cursor: pointer; }

/* login */
.login-wrap { min-height: calc(100dvh - 60px); display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: min(380px, 100%); background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 2rem 1.5rem 1.5rem; display: grid; gap: 1rem; text-align: center; }
.login-card h1 { margin: 0; font-family: var(--display); font-size: 1.9rem; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
    .star, .nebula { animation: none !important; }
    * { transition-duration: .01ms !important; }
}

/* ==========================================================
   PHOTO DESK (helpers)
   ========================================================== */
.hd-head { display: flex; align-items: center; gap: .75rem; margin: .25rem 0 .9rem; }
.hd-head .cat-name { flex: 1; min-width: 0; }
.hd-search { margin-bottom: .1rem; }
.hd-card .card-photo { aspect-ratio: 1 / 1; }
.hd-nophoto { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: .25rem; color: var(--muted); font-weight: 700; font-size: .85rem; background: repeating-linear-gradient(135deg, var(--panel) 0 12px, var(--panel-2) 12px 24px); }
.hd-nophoto span { font-size: 2rem; }
.hd-nophoto.big { min-height: 240px; border-radius: 10px; font-size: 1rem; }
.hd-nophoto.big span { font-size: 3rem; }
.hd-preview { border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.hd-preview img { width: 100%; max-height: 52vh; object-fit: contain; background: #000; }
.hd-busy { min-height: 240px; display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.hd-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.hd-pick .btn { cursor: pointer; }
.hd-head .cat-name { font-size: 1.45rem; white-space: nowrap; }
.hd-pick .btn { white-space: nowrap; font-size: .92rem; padding-left: .6em; padding-right: .6em; }

/* theme picker (Back Stage settings) */
.theme-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.theme-pick { position: relative; display: grid; justify-items: center; gap: .3rem; padding: .7rem .5rem; border: 2px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--ink) 80%, #000); cursor: pointer; text-align: center; }
.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick:has(input:checked) { border-color: var(--pumpkin); box-shadow: 0 0 18px color-mix(in srgb, var(--pumpkin) 30%, transparent); }
.theme-pick:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.tp-icon { font-size: 1.8rem; line-height: 1; }
.tp-name { font-weight: 800; font-size: .9rem; }
.tp-sw { display: flex; gap: 3px; }
.tp-sw i { width: 14px; height: 14px; border-radius: 3px; }
.tp-glyphs { font-size: .85rem; letter-spacing: .05em; }

/* phone: countdown before a category opens, and the closing clock */
.ph-cd { margin-bottom: 1rem; padding: 1rem; border-radius: 12px; text-align: center; background: color-mix(in srgb, var(--pumpkin) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--pumpkin) 50%, transparent); }
.ph-cd .muted { font-weight: 700; }
.ph-cd-num { font-family: var(--display); font-weight: 900; font-size: 4.2rem; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px color-mix(in srgb, var(--pumpkin) 60%, transparent); }
.notice.is-clock { border-left-color: var(--ecto-hi); }
.notice.is-clock b { font-variant-numeric: tabular-nums; }
.grid-cards.is-waiting .card { filter: brightness(.8); }

/* phone: bonus question alert */
.ph-bonus { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--pumpkin) 55%, #000), color-mix(in srgb, var(--violet) 45%, #000) 75%); border: 2px solid var(--gold); animation: ph-bonus-in .5s cubic-bezier(.2, 1.4, .3, 1) both; }
.ph-bonus.is-triple { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gold) 55%, #000), color-mix(in srgb, var(--blood) 50%, #000) 75%); }
.ph-bonus::before { content: ""; position: absolute; inset: -50%; background: repeating-conic-gradient(color-mix(in srgb, var(--gold) 30%, transparent) 0 10deg, transparent 10deg 24deg); animation: ph-rays 8s linear infinite; }
.ph-bonus > * { position: relative; }
.ph-bonus .muted { color: #fff; opacity: .85; }
.ph-bonus-coin { width: 150px; height: 150px; margin: .5rem auto 1rem; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #FFF6C8, var(--gold) 40%, color-mix(in srgb, var(--gold) 55%, #000)); box-shadow: inset 0 0 0 8px color-mix(in srgb, var(--gold) 70%, #fff), 0 0 40px color-mix(in srgb, var(--gold) 80%, transparent); animation: coin-bounce 1s ease-in-out infinite; }
.ph-bonus-coin span { font-family: var(--display); font-weight: 900; font-size: 4.2rem; color: #fff; text-shadow: 0 4px 0 color-mix(in srgb, var(--gold) 45%, #000); }
@keyframes ph-bonus-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ph-rays { to { transform: rotate(360deg); } }
@keyframes coin-bounce { 0%, 60% { transform: none; } 80% { transform: translateY(-8px) rotateY(180deg); } 100% { transform: rotateY(360deg); } }
.ph-mult { display: inline-block; margin-bottom: .6rem; padding: .2rem .6rem; border-radius: 4px; background: var(--gold); color: #1a1400; font-weight: 800; font-size: .85rem; }

/* phone: menu, join, leaderboard, vote nudge */
.ph-menu-btn { flex: none; width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: var(--panel); color: var(--text); font-size: 1.2rem; cursor: pointer; }
dialog.ph-menu { width: min(360px, calc(100% - 2rem)); }
.ph-menu .modal-body { gap: .6rem; }
.pm-who { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pm-staff { justify-self: center; margin-top: .4rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.join-card { text-align: center; }
.join-card .tv-join { margin-top: .75rem; }
.nudge { width: 100%; margin-top: 1rem; border: 0; color: var(--text); text-align: left; font: inherit; font-weight: 700; cursor: pointer; background: color-mix(in srgb, var(--ecto) 18%, var(--panel)); }
.ph-board { margin-top: 1rem; background: var(--panel); border-radius: 12px; overflow: hidden; }
.ph-board summary { padding: .85rem 1rem; font-weight: 800; cursor: pointer; list-style: none; }
.ph-board summary::-webkit-details-marker { display: none; }
.ph-board ol { list-style: none; margin: 0; padding: 0 .5rem .6rem; }
.ph-board li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .5rem; align-items: center; padding: .55rem .5rem; border-radius: 8px; font-weight: 700; }
.ph-board li + li { border-top: 1px solid var(--line); }
.ph-board li.is-me { background: color-mix(in srgb, var(--pumpkin) 18%, transparent); }
.ph-board .rk { text-align: center; color: var(--muted); }
.ph-board .sc { color: var(--gold); font-variant-numeric: tabular-nums; }

/* phone: answer result celebration */
.ph-win { position: relative; overflow: hidden; display: grid; justify-items: center; gap: .15rem; padding: 1.1rem 1rem 1.2rem; animation: ph-bonus-in .5s cubic-bezier(.2, 1.5, .3, 1) both; }
.ph-win-icon { font-size: 2.6rem; line-height: 1; animation: coin-bounce 1.2s ease-in-out 2; }
.ph-win-title { font-family: var(--display); font-weight: 900; font-size: 1.7rem; }
.ph-win-pts { font-family: var(--display); font-weight: 900; font-size: 2.4rem; line-height: 1; color: var(--gold); text-shadow: 0 0 18px color-mix(in srgb, var(--gold) 60%, transparent); }
.ph-win-sub { font-size: .85rem; font-weight: 600; color: var(--muted); }
.ph-confetti { position: absolute; inset: 0; pointer-events: none; }
.ph-confetti i { position: absolute; left: 50%; top: 40%; width: 8px; height: 12px; border-radius: 2px; background: var(--gold); opacity: 0;
    animation: ph-conf 1.3s var(--d) cubic-bezier(.2, .8, .3, 1) forwards; }
.ph-confetti i[style*="--c:1"] { background: var(--pumpkin); }
.ph-confetti i[style*="--c:2"] { background: var(--ecto-hi); }
@keyframes ph-conf { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(calc(var(--x) * 3.2px), calc(60px + var(--c) * 40px)) rotate(540deg); } }
.ph-miss { animation: ph-shake .45s ease; }
@keyframes ph-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.rehearsal-pill { margin-left: .5rem; vertical-align: middle; font-family: var(--body); animation: banner-pulse 1.6s ease-in-out infinite; }
@keyframes banner-pulse { 50% { opacity: .55; } }

.parade-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .6rem .75rem; border-radius: 8px; background: color-mix(in srgb, var(--violet) 22%, var(--panel)); border: 1px solid color-mix(in srgb, var(--violet) 55%, transparent); }
.parade-bar[hidden] { display: none; }
.pb-label { flex: 1; min-width: 180px; font-weight: 800; }

/* phone: announcement banner and live reaction bar */
.ph-ann { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 10px; background: color-mix(in srgb, var(--pumpkin) 85%, #000); font-weight: 800; box-shadow: 0 0 24px color-mix(in srgb, var(--pumpkin) 40%, transparent); animation: ph-bonus-in .45s cubic-bezier(.2, 1.4, .3, 1) both; }
.ph-ann span { flex: 1; }
.ph-ann button { border: 0; background: none; color: #fff; font-size: 1rem; cursor: pointer; opacity: .8; }
.react-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; justify-content: space-around; padding: .6rem .5rem calc(env(safe-area-inset-bottom) + .6rem); background: color-mix(in srgb, #000 88%, transparent); border-top: 2px solid var(--pumpkin); backdrop-filter: blur(8px); }
.react-bar[hidden] { display: none; }
.react-bar button { width: 54px; height: 54px; border: 0; border-radius: 50%; background: var(--panel-2); font-size: 1.7rem; cursor: pointer; }
.react-bar button.pop { animation: react-pop .35s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes react-pop { 50% { transform: scale(1.35); } }
body.has-react .ph-main { padding-bottom: calc(env(safe-area-inset-bottom) + 6rem); }
.react-float { position: fixed; bottom: 70px; z-index: 30; font-size: 2rem; pointer-events: none; animation: react-up 1.2s ease-out forwards; }
@keyframes react-up { to { transform: translateY(-160px) scale(1.4); opacity: 0; } }

.singer-list { display: grid; gap: .4rem; }
.singer-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem .7rem; border-radius: 8px; background: var(--panel-2); }

.pending-box { margin-bottom: 1rem; border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.person.is-pending { cursor: default; }
.person.is-pending:hover { border-color: var(--line); }

/* recap page */
.recap-page { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; display: grid; gap: 1.5rem; }
.rc-hero { text-align: center; }
.rc-kicker { color: var(--gold); font-weight: 800; }
.rc-title { margin: .3rem 0 .8rem; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1; letter-spacing: -.02em; }
.rc-stats { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; color: var(--muted); font-weight: 700; }
.rc-stats b { color: var(--text); font-size: 1.3rem; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.rc-card { display: grid; justify-items: center; gap: .35rem; padding: 1.2rem 1rem; border-radius: 14px; text-align: center; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.rc-award { font-weight: 800; color: var(--gold); }
.rc-photo { width: 150px; height: 150px; margin: .4rem 0; border-radius: 50%; overflow: hidden; border: 4px solid var(--gold); box-shadow: 0 0 30px color-mix(in srgb, var(--gold) 35%, transparent); }
.rc-photo img { width: 100%; height: 100%; object-fit: cover; }
.rc-name { font-family: var(--display); font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.rc-detail { color: var(--muted); font-size: .92rem; }
.rc-votes { font-weight: 800; font-size: .85rem; color: var(--ecto-hi); }
.rc-runners { display: grid; gap: .2rem; margin-top: .4rem; font-size: .88rem; font-weight: 600; }
.rc-runners em { font-style: normal; color: var(--muted); margin-left: .3rem; }
.rc-trivia h2 { margin: 0 0 .75rem; font-family: var(--display); font-weight: 900; }
.ph-board-list { list-style: none; margin: 0; padding: .5rem; border-radius: 12px; background: var(--panel); }
.ph-board-list li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .5rem; align-items: center; padding: .55rem .5rem; font-weight: 700; }
.ph-board-list li + li { border-top: 1px solid var(--line); }
.ph-board-list .rk { text-align: center; color: var(--muted); }
.ph-board-list .sc { color: var(--gold); }

.archive-link { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .7rem; border-radius: 8px; background: var(--panel-2); color: var(--text); font-weight: 700; text-decoration: none; }
.archive-link:hover { background: var(--panel-3); }

/* question editor: picture answers */
.pic-row { display: grid; grid-template-columns: auto 56px auto 1fr auto; gap: .5rem; align-items: center; }
.pic-row input[type="radio"] { width: 20px; height: 20px; accent-color: var(--ecto); }
.pic-prev { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--panel-2); font-size: 1.4rem; }
.pic-prev img { width: 100%; height: 100%; object-fit: cover; }
.pic-row .btn { cursor: pointer; }

/* phone: question pictures and picture answers */
.tv-img { margin: 0 0 1rem; border-radius: 10px; overflow: hidden; background: #000; }
.tv-img img { width: 100%; max-height: 38vh; object-fit: contain; }
.answers.is-pics { grid-template-columns: 1fr 1fr; }
.answers.is-pics .answer { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .35rem .4rem; padding: .45rem; min-height: 0; font-size: .95rem; }
.answers.is-pics .ans-pic { grid-column: 1 / -1; }
.answers.is-pics .answer .glyph { font-size: 1.1rem; }
.ans-pic { display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .25); }
.ans-pic img { width: 100%; height: 100%; object-fit: cover; }

/* staff sign in: a real tappable button, quieter than the guest actions */
.pm-staff-btn { margin-top: .4rem; background: transparent; border: 1.5px solid var(--line); color: var(--muted); }
.pm-staff-btn:hover { background: var(--panel-2); color: var(--text); }

.keys-list { grid-template-columns: 1fr 1fr; gap: .6rem 1rem; }
kbd { display: inline-block; min-width: 1.8rem; margin-right: .5rem; padding: .15rem .45rem; border-radius: 5px; background: var(--panel-3); border: 1px solid var(--line); border-bottom-width: 3px; font-family: var(--body); font-weight: 800; text-align: center; }

.voter-group { padding: .6rem .75rem; border-radius: 8px; background: var(--panel-2); }
.vg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.vg-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.vg-list span { padding: .2rem .55rem; border-radius: 999px; background: var(--panel-3); font-size: .85rem; font-weight: 700; }
.vg-list em { font-style: normal; font-weight: 500; color: var(--muted); }
.activity-box { max-height: 420px; overflow-y: auto; }

.team-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.team-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .3rem .25rem .7rem; border-radius: 999px; background: var(--panel-2); font-weight: 700; }
.team-chip .icon-btn { width: 26px; height: 26px; font-size: .75rem; border-radius: 50%; }

.team-pick { display: grid; gap: .5rem; margin-top: 1rem; }
.team-pick .btn { justify-content: space-between; min-height: 52px; font-size: 1.05rem; }
.team-pick em { font-style: normal; padding: .1rem .55rem; border-radius: 999px; background: var(--pumpkin); font-size: .85rem; }
.ph-board em { font-style: normal; font-size: .8rem; }

/* phone remote */
.rm { display: grid; gap: .8rem; }
.rm-now { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.rm-now > div { display: grid; gap: .1rem; padding: .7rem .8rem; border-radius: 10px; background: var(--panel); font-size: .8rem; }
.rm-now b { font-size: 1rem; }
.rm-big { min-height: 60px; font-size: 1.15rem; }
.rm-sub { text-align: center; font-size: .85rem; font-weight: 600; margin-top: -.3rem; }
.rm-card { display: grid; gap: .6rem; padding: .9rem; border-radius: 12px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); }
.rm-h { font-weight: 800; display: flex; justify-content: space-between; }
.rm-q { font-size: .85rem; font-weight: 600; }
.rm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.rm-grid2:has(> [hidden]) > :not([hidden]) { grid-column: 1 / -1; }
.rm-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.rm-grid3 .btn { padding: .5rem .3rem; font-size: .88rem; }
.rm-screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.rm-screens .screen-btn { padding: .55rem .2rem; font-size: .75rem; }
.rm-screens .screen-btn .e { font-size: 1.3rem; }
.rm-status { font-size: .85rem; font-weight: 700; }

.seg-list { list-style: none; margin: 0; padding: 0; }
.seg-item { display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; align-items: center; padding: .55rem .75rem; border-bottom: 1px solid var(--line); }
.seg-item.is-now { background: color-mix(in srgb, var(--ecto) 16%, transparent); box-shadow: inset 4px 0 0 var(--ecto-hi); }
.seg-label { font-weight: 700; }
.seg-add { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: .5rem; padding: .75rem; }
@media (max-width: 700px) { .seg-add { grid-template-columns: 1fr; } }

.tv-timer-pick { min-width: 150px; }
.tv-timer-pick span { font-size: .75rem; }
.tv-timer-pick .select { min-height: 36px; padding: .35em .6em; }

.pause-btn.is-paused, #rm-pause.is-paused { background: var(--gold); color: #1a1400; animation: soft-pulse 1.4s ease-in-out infinite; }
@keyframes soft-pulse { 50% { opacity: .7; } }
.ph-paused { border-left-color: var(--gold); }

/* karaoke look switcher in the Projector panel and on the remote */
.ka-looks { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .75rem; border-radius: 8px; background: color-mix(in srgb, var(--violet) 14%, var(--panel)); }
.kl-label { font-weight: 800; margin-right: .25rem; }
.ka-looks .seg { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 7px; background: var(--ink); }
.ka-looks .seg button { border: 0; border-radius: 5px; padding: .4rem .7rem; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.ka-looks .seg button:hover { color: var(--text); }
.ka-looks .seg button[aria-pressed="true"] { background: var(--violet); color: #fff; }
.rm-card .ka-looks { padding: 0; background: none; }

.tv-auto { gap: .5rem; padding: .35rem .6rem; border-radius: 6px; background: var(--ink); white-space: nowrap; }

/* Back Stage tabs */
.ad-section.is-hidden { display: none; }
.ad-nav a[aria-current] { color: #fff; background: color-mix(in srgb, var(--pumpkin) 85%, #000); }
.stabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: .9rem; border-radius: 10px; background: var(--panel); width: fit-content; max-width: 100%; }
.stabs button { border: 0; border-radius: 7px; padding: .5rem .95rem; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.stabs button:hover { color: var(--text); }
.stabs button[aria-selected="true"] { background: var(--pumpkin); color: #fff; }
.settings-deck { grid-template-columns: minmax(0, 860px); }
.settings-deck [hidden], .sgroup[hidden] { display: none !important; }
.sgroup { display: grid; gap: .9rem; }

.tv-q-emoji { margin-right: .4rem; font-size: 1.3em; vertical-align: -.1em; }
/* question editor: emoji field with a picker */
.emoji-field { display: flex; gap: .5rem; align-items: center; }
.emoji-field .input { width: 5rem; text-align: center; font-size: 1.5rem; padding: .3rem; }
.emoji-pop { position: relative; }
.emoji-pop emoji-picker { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; --background: var(--panel); --border-color: var(--line); --input-border-color: var(--line); --input-font-color: var(--text); --indicator-color: var(--pumpkin); --button-hover-background: var(--panel-3); --outline-color: var(--pumpkin); height: 340px; box-shadow: 0 16px 40px rgba(0,0,0,.5); border-radius: 10px; }

/* trivia rounds as accordions, DJ style: Up Next, then Skipped and Played tucked away */
details.round-acc > summary, details.up-next > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
details.round-acc > summary::-webkit-details-marker, details.up-next > summary::-webkit-details-marker, .ra-sub > summary::-webkit-details-marker { display: none; }
.ra-chev { display: inline-block; transition: transform .2s; color: var(--muted); }
details[open] > summary .ra-chev { transform: rotate(90deg); }
.ra-title { flex: 1; min-width: 180px; }
.ra-counts { display: flex; gap: .3rem; flex-wrap: wrap; }
.round-acc.is-current { border-color: color-mix(in srgb, var(--ecto) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ecto) 40%, transparent); }
.round-acc.is-current .ra-title::after { content: " • Playing"; color: var(--ecto-hi); font-size: .8rem; }
.ra-group-title { padding: .6rem .9rem .2rem; font-size: .75rem; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.ra-sub { border-top: 1px solid var(--line); }
.ra-sub > summary { list-style: none; cursor: pointer; padding: .6rem .9rem; font-weight: 700; color: var(--muted); }
.ra-sub > summary:hover { color: var(--text); }
.q-item.is-skipped { opacity: .6; }
.up-next { margin-top: -.5rem; }
.person[hidden], #guests tr[hidden] { display: none !important; }
.list-search { min-height: 34px; padding: .35rem .7rem; }

/* Live: the Projector panel runs full width now that the Join Link column is gone */
.live-deck { grid-template-columns: 1fr; }
/* Live: trivia by round */
.live-rounds .panel-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.lr-list { max-height: 460px; overflow-y: auto; }
.lr-item { border-top: 1px solid var(--line); }
.lr-item > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; cursor: pointer; }
.lr-item > summary::-webkit-details-marker { display: none; }
.lr-item.is-current { background: color-mix(in srgb, var(--ecto) 12%, transparent); box-shadow: inset 4px 0 0 var(--ecto-hi); }
.lr-emoji { font-size: 1.4rem; }
.lr-title { flex: 1; font-weight: 800; }
.lr-meta { color: var(--muted); font-size: .8rem; font-weight: 600; }
.lr-questions { margin: 0; padding: 0 .9rem .6rem 2.6rem; display: grid; gap: .25rem; }
.lr-questions li { display: flex; align-items: center; gap: .6rem; justify-content: space-between; font-size: .88rem; padding: .25rem 0; }
.lr-questions li > span { flex: 1 1 auto; min-width: 0; }
.lr-questions li.is-done span { color: var(--muted); text-decoration: line-through; }
.lr-questions li.is-skipped span { color: var(--muted); font-style: italic; }
.lr-questions li.is-live span { color: var(--ecto-hi); font-weight: 800; }
.lr-questions .btn { flex: none; padding: .2rem .55rem; font-size: .75rem; }
.venue-links { display: grid; grid-template-columns: auto 1fr; gap: .3rem .75rem; font-size: .9rem; }
.venue-links span { color: var(--muted); font-weight: 600; }
.venue-links a { color: var(--gold); font-weight: 700; word-break: break-all; }

/* Live: controls that follow the projector screen */
.ctx-bar { display: flex; align-items: center; gap: .75rem; }
.ctx-label { flex: 1; font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.ctx { display: grid; gap: .75rem; }
.ctx[hidden] { display: none !important; }
.ctx-title { font-weight: 800; }
.ctx-note { padding: .8rem 1rem; border-radius: 8px; background: var(--ink); color: var(--muted); font-weight: 600; }
.ctx-more { border-radius: 8px; background: color-mix(in srgb, var(--ink) 70%, transparent); }
.ctx-more > summary { cursor: pointer; padding: .6rem .9rem; font-weight: 700; color: var(--muted); list-style: none; }
.ctx-more > summary::before { content: "▸ "; }
.ctx-more[open] > summary::before { content: "▾ "; }
.ctx-more > :not(summary) { margin: 0 .9rem .9rem; }
.live-cats { display: grid; gap: .4rem; }
.lc-item { border-radius: 8px; background: var(--ink); border: 1px solid var(--line); }
.lc-item.is-open { border-color: color-mix(in srgb, var(--ecto) 60%, transparent); box-shadow: inset 4px 0 0 var(--ecto-hi); }
.lc-item.is-focus .lc-name::after { content: " • On Screen"; color: var(--gold); font-size: .75rem; }
.lc-item > summary { list-style: none; display: flex; align-items: center; gap: .55rem; padding: .55rem .8rem; cursor: pointer; flex-wrap: wrap; }
.lc-item > summary::-webkit-details-marker { display: none; }
.lc-emoji { font-size: 1.35rem; }
.lc-name { flex: 1; font-weight: 800; min-width: 120px; }
.lc-votes { color: var(--muted); font-size: .8rem; font-weight: 700; }
.lc-leaders { display: grid; gap: .3rem; padding: .2rem .9rem .8rem 2.6rem; }
.lc-bar { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 3ch; align-items: center; gap: .6rem; font-size: .85rem; font-weight: 600; }
.lc-bar i { display: block; height: 8px; border-radius: 4px; background: var(--pumpkin); min-width: 2px; }
.lc-bar b { text-align: right; color: var(--gold); }
.live-rounds[hidden] { display: none !important; }

/* ---------- party gallery ---------- */
.gal-main { max-width: 1200px; margin: 0 auto; padding: 1rem 1rem 4rem; }
.gal-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.gal-head h1 { flex: 1; margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 5vw, 2.4rem); }
.gal-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--panel); width: fit-content; max-width: 100%; margin-bottom: 1rem; }
.gal-tabs button { border: 0; border-radius: 7px; padding: .45rem .9rem; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.gal-tabs button[aria-selected="true"] { background: var(--pumpkin); color: #fff; }
.gal-grid { columns: 4 220px; column-gap: .75rem; }
.gal-item { position: relative; display: block; width: 100%; margin: 0 0 .75rem; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; break-inside: avoid; background: var(--panel); }
.gal-item img { display: block; width: 100%; height: auto; transition: transform .4s; }
.gal-item:hover img { transform: scale(1.04); }
.gal-cap { position: absolute; inset: auto 0 0 0; padding: 1.2rem .7rem .55rem; text-align: left; font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.gal-cap small { display: block; font-weight: 600; opacity: .8; }
.gal-empty { padding: 2rem; text-align: center; }
.gal-lightbox { max-width: 94vw; max-height: 94vh; padding: 0; border: 0; border-radius: 14px; background: #000; color: #fff; }
.gal-lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.gal-lightbox img { display: block; max-width: 94vw; max-height: 84vh; }
.gal-lb-cap { padding: .7rem 1rem; font-weight: 700; }
.gal-x { position: absolute; top: .5rem; right: .5rem; z-index: 2; }
@media (max-width: 560px) { .gal-grid { columns: 2 140px; column-gap: .5rem; } .gal-item { margin-bottom: .5rem; } }

.share-prev img { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 10px; }

/* Photos tab */
.nav-count { display: inline-grid; place-items: center; min-width: 1.3em; height: 1.3em; padding: 0 .3em; margin-left: .25em; border-radius: 999px; background: var(--blood); color: #fff; font-size: .72rem; }
.photo-switches { display: grid; gap: .6rem; }
.sw-row { justify-content: space-between; background: color-mix(in srgb, var(--ink) 80%, #000); border-radius: 6px; padding: .55rem .8rem; gap: 1rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.photo-card { border-radius: 10px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); display: grid; }
.photo-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.pc-cap { padding: .5rem .65rem 0; font-weight: 700; font-size: .85rem; }
.pc-cap small { display: block; color: var(--muted); font-weight: 600; }
.pc-actions { display: flex; gap: .4rem; padding: .5rem .65rem .65rem; flex-wrap: wrap; }
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; } }

/* Photo desk: phone first, but uses the room on a laptop too */
@media (min-width: 900px) {
    .helper-page .ph-main { max-width: 1200px; }
    .helper-page .grid-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
.helper-page .ph-top-row { gap: .5rem; }

/* ---------- Back Stage on a phone ---------- */
@media (max-width: 700px) {
    .ad-main { padding: .75rem .6rem 4rem; gap: 1rem; }
    .ad-brand { font-size: 1.1rem; }
    .stat-cards, .stats { grid-template-columns: 1fr 1fr !important; }
    .deck, .two, .settings-deck { grid-template-columns: 1fr !important; }
    .screen-btns { grid-template-columns: repeat(3, 1fr) !important; }
    .ad-section table { display: block; overflow-x: auto; white-space: nowrap; }
    .panel-head { flex-wrap: wrap; }
    .lc-item > summary, .lr-item > summary { gap: .4rem; }
    .lc-name, .lr-title { min-width: 0; flex-basis: 50%; }
    .lc-bar { grid-template-columns: minmax(70px, 110px) 1fr 3ch; }
    .ka-looks { flex-direction: column; align-items: stretch; }
    .ka-looks .seg { justify-content: space-between; }
    .stabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; }
    .q-actions { flex-wrap: wrap; }
}

.lr-group { padding: .5rem .9rem .3rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); border-top: 1px solid var(--line); }

/* phone: your own standing during the leaderboard */
.my-standing { text-align: center; }
.my-standing .ms-icon { font-size: 3.4rem; line-height: 1; animation: pop .6s cubic-bezier(.2, 1.6, .35, 1) both; }
.my-standing .ms-title { margin-top: .4rem; font-family: var(--display); font-weight: 900; font-size: 1.6rem; }
.my-standing.is-good .ms-title { color: var(--ecto-hi); }
.my-standing .ms-pts { font-family: var(--display); font-weight: 900; font-size: 2.2rem; color: var(--gold); }
.my-standing .ms-rank { margin-top: .5rem; font-weight: 800; font-size: 1.25rem; }
.ms-up { color: var(--ecto-hi); } .ms-down { color: var(--blood); }
.my-standing .ms-gap { margin-top: .3rem; color: var(--muted); font-weight: 600; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

.pace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }

/* ---------- phone wins: loud, bright, and fun ---------- */
.ph-win.is-fastest, .my-standing.is-fastest { position: relative; overflow: hidden; color: #1a1000;
    background: radial-gradient(circle at 50% 30%, #fff6b0, #ffc93b 35%, #ff8a1f 70%, #e2530b); border: 3px solid #fff3a8;
    box-shadow: 0 0 34px rgba(255, 190, 40, .75), inset 0 -6px 0 rgba(0, 0, 0, .15); animation: win-slam .6s cubic-bezier(.2, 1.7, .35, 1) both, win-glow 1.4s .6s ease-in-out infinite; }
.ph-win.is-correct, .my-standing.is-correct { position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(circle at 50% 30%, #6ff0b0, #2fbf7c 45%, #16784c); border: 3px solid #b8ffd9; box-shadow: 0 0 28px rgba(60, 220, 140, .6); animation: win-slam .6s cubic-bezier(.2, 1.7, .35, 1) both; }
.is-fastest .ph-win-title, .is-fastest .ms-title { color: #3a1d00 !important; text-shadow: 0 2px 0 rgba(255, 255, 255, .6); }
.is-fastest .ph-win-pts, .is-fastest .ms-pts { color: #fff; text-shadow: 0 3px 0 #b3470a, 0 0 18px rgba(255, 255, 255, .8); font-size: 3rem; }
.is-correct .ph-win-title, .is-correct .ms-title { color: #fff !important; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.is-correct .ph-win-pts, .is-correct .ms-pts { color: #fff6b0; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.is-fastest .ph-win-sub, .is-fastest .ms-rank, .is-fastest .ms-gap, .is-correct .ms-gap, .is-correct .ph-win-sub { color: inherit; opacity: .85; }
.is-fastest .ph-win-icon, .is-fastest .ms-icon { font-size: 4.4rem; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .2)); animation: icon-zap .8s cubic-bezier(.2, 1.8, .35, 1) both, coin-bounce 1.2s .8s ease-in-out infinite; }
.win-rays { position: absolute; left: 50%; top: 35%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: .35; z-index: 0;
    background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .9) 0deg 9deg, transparent 9deg 22deg); animation: rays-spin 9s linear infinite; }
.win-rain { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.win-rain i { position: absolute; top: -12%; left: calc(var(--x) * 1%); font-style: normal; font-size: 1.4rem; animation: rain-fall var(--t) var(--d) linear infinite; }
.ph-win > :not(.win-rays):not(.win-rain), .my-standing > :not(.win-rays):not(.win-rain) { position: relative; z-index: 1; }
@keyframes win-slam { 0% { transform: scale(.4) rotate(-6deg); opacity: 0; } 60% { transform: scale(1.06) rotate(2deg); opacity: 1; } 100% { transform: none; } }
@keyframes win-glow { 50% { box-shadow: 0 0 55px rgba(255, 210, 60, 1), inset 0 -6px 0 rgba(0, 0, 0, .15); } }
@keyframes icon-zap { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.3) rotate(8deg); } 100% { transform: none; } }
@keyframes rays-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes rain-fall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(560px) rotate(300deg); opacity: 0; } }
@keyframes coin-bounce { 50% { transform: translateY(-6px) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .win-rays, .win-rain { display: none; } }
.is-fastest .score-line, .is-correct .score-line { position: relative; z-index: 1; color: inherit; }
.is-fastest .score-line div, .is-correct .score-line div { color: inherit; opacity: .9; }
.is-fastest .score-line b { color: #3a1d00; } .is-correct .score-line b { color: #fff; }

/* ---------- guest phone pages: black cards like the header, so they stand out on the starfield ---------- */
.guest-page .tv-card, .guest-page .ph-board, .guest-page .card, .guest-page .notice, .guest-page .ph-tabs, .guest-page .ph-menu-btn,
.guest-page .modal, .guest-page .gal-tabs, .guest-page .gal-item, .guest-page .ph-ann, .guest-page .cat-tabs, .guest-page .tv-opt-wrap {
    background: #000; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 6px 24px rgba(0, 0, 0, .55);
}
.guest-page .ph-board li + li { border-top-color: rgba(255, 255, 255, .1); }
.guest-page .ph-board li.is-me { background: color-mix(in srgb, var(--pumpkin) 30%, #000); }
.guest-page .input, .guest-page .select, .guest-page .textarea { background: #111; border-color: rgba(255, 255, 255, .18); }
.guest-page .btn-dark { background: #1a1a1f; border: 1px solid rgba(255, 255, 255, .14); }
.guest-page .ph-win.is-fastest, .guest-page .my-standing.is-fastest { background: radial-gradient(circle at 50% 30%, #fff6b0, #ffc93b 35%, #ff8a1f 70%, #e2530b); border: 3px solid #fff3a8; }
.guest-page .ph-win.is-correct, .guest-page .my-standing.is-correct { background: radial-gradient(circle at 50% 30%, #6ff0b0, #2fbf7c 45%, #16784c); border: 3px solid #b8ffd9; }
.guest-page .chip { background: #000; border: 1px solid rgba(255, 255, 255, .14); }
.guest-page .chip[aria-selected="true"], .guest-page .chip.is-on { background: #f2efea; color: #111; }

/* ---------- phone results: every outcome gets a moment ---------- */
.ph-win { text-align: center; margin: .6rem 0; }
.guest-page .ph-win.is-wrong, .ph-win.is-wrong { position: relative; overflow: hidden; color: #fff; border: 3px solid #ff9db0;
    background: radial-gradient(circle at 50% 30%, #ff6b8b, #c8102e 45%, #5b1277); box-shadow: 0 0 28px rgba(230, 40, 90, .55);
    animation: win-slam .5s cubic-bezier(.2, 1.7, .35, 1) both, wrong-wobble .6s .55s ease-in-out 2; }
.guest-page .ph-win.is-miss, .ph-win.is-miss { position: relative; overflow: hidden; color: #fff; border: 3px solid #a9c4ff;
    background: radial-gradient(circle at 50% 30%, #7d93c9, #3b4a7a 50%, #1b2140); box-shadow: 0 0 24px rgba(110, 140, 220, .45); animation: win-slam .5s cubic-bezier(.2, 1.7, .35, 1) both; }
.is-wrong .ph-win-icon, .is-miss .ph-win-icon { font-size: 3.6rem; line-height: 1; animation: icon-zap .7s cubic-bezier(.2, 1.8, .35, 1) both, sad-droop 2.4s 1s ease-in-out infinite; }
.is-wrong .ph-win-title, .is-miss .ph-win-title { color: #fff !important; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.ph-win .ph-win-sub { position: relative; z-index: 1; margin-top: .3rem; font-weight: 700; font-size: .92rem; opacity: .92; color: inherit; }
.zzz { position: absolute; right: 16%; top: 12%; pointer-events: none; }
.zzz i { position: absolute; font-style: normal; font-weight: 900; font-size: 1.4rem; opacity: 0; animation: zzz 2.4s var(--d) ease-out infinite; }
@keyframes zzz { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(24px, -60px) scale(1.3); opacity: 0; } }
@keyframes wrong-wobble { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes sad-droop { 50% { transform: translateY(4px) rotate(-6deg); } }
.change-note { background: color-mix(in srgb, var(--ecto) 22%, #000) !important; border: 1px solid color-mix(in srgb, var(--ecto) 50%, transparent); font-weight: 700; }
.lock-note { background: #111 !important; border: 1px solid rgba(255, 255, 255, .15); font-weight: 800; }
.answers.is-locked .answer:not(.is-picked) { opacity: .45; }
.answer.is-picked { outline: 3px solid #fff; outline-offset: 2px; transform: scale(1.02); }

/* ---------- one color per outcome on phones ----------
   Fastest: gold. 2nd fastest: silver blue. 3rd fastest: bronze. Right: green.
   Wrong: red. Fast but wrong: hot pink. No answer: slate blue. */
.guest-page .ph-win.is-second, .ph-win.is-second { position: relative; overflow: hidden; color: #0d1b2e; border: 3px solid #eaf3ff;
    background: radial-gradient(circle at 50% 30%, #ffffff, #cfe0f5 40%, #7f9cc2 80%); box-shadow: 0 0 28px rgba(190, 215, 255, .7); animation: win-slam .6s cubic-bezier(.2, 1.7, .35, 1) both; }
.guest-page .ph-win.is-third, .ph-win.is-third { position: relative; overflow: hidden; color: #2a1200; border: 3px solid #ffd2a6;
    background: radial-gradient(circle at 50% 30%, #ffd9b0, #d9894a 45%, #8c4a1c); box-shadow: 0 0 28px rgba(230, 140, 70, .6); animation: win-slam .6s cubic-bezier(.2, 1.7, .35, 1) both; }
.is-second .ph-win-title, .is-third .ph-win-title { color: inherit !important; text-shadow: 0 2px 0 rgba(255, 255, 255, .5); }
.is-second .ph-win-pts { color: #1d3d6b; text-shadow: 0 2px 0 #fff; font-size: 2.8rem; }
.is-third .ph-win-pts { color: #fff; text-shadow: 0 3px 0 #7a3a10; font-size: 2.8rem; }
.guest-page .ph-win.is-wrong, .ph-win.is-wrong { background: radial-gradient(circle at 50% 30%, #ff7a7a, #d11a2a 45%, #7a0010); border-color: #ffb3b3; box-shadow: 0 0 28px rgba(230, 30, 50, .6); }
.guest-page .ph-win.is-fastwrong, .ph-win.is-fastwrong { position: relative; overflow: hidden; color: #fff; border: 3px solid #ffb6ec;
    background: radial-gradient(circle at 50% 30%, #ff7ad9, #d0249b 45%, #6a0a5a); box-shadow: 0 0 28px rgba(230, 40, 170, .6);
    animation: win-slam .5s cubic-bezier(.2, 1.7, .35, 1) both, wrong-wobble .6s .55s ease-in-out 2; }
.is-fastwrong .ph-win-icon { font-size: 3.6rem; line-height: 1; animation: icon-zap .7s cubic-bezier(.2, 1.8, .35, 1) both, sad-droop 2.4s 1s ease-in-out infinite; }
.is-fastwrong .ph-win-title { color: #fff !important; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }

/* Time's Up on phones */
.tv-card { position: relative; }
.ph-timesup { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: .8rem; padding: 1rem; border-radius: inherit;
    background: radial-gradient(circle at 50% 45%, rgba(200, 16, 46, .55), rgba(0, 0, 0, .88) 70%); animation: tu-bg-ph .4s ease both; }
.pt-stamp { font-family: var(--display); font-weight: 900; font-size: 2.4rem; color: #fff; padding: .4rem 1.1rem; border: 4px solid #fff; border-radius: 14px;
    background: var(--blood); transform: rotate(-4deg); box-shadow: 0 0 30px rgba(230, 30, 50, .8); animation: pt-slam .5s cubic-bezier(.2, 1.6, .35, 1) both; }
.pt-sub { color: #fff; font-weight: 800; text-align: center; max-width: 16rem; animation: wn-rise .4s .35s ease both; }
@keyframes tu-bg-ph { from { opacity: 0; } to { opacity: 1; } }
@keyframes pt-slam { 0% { transform: scale(3) rotate(-14deg); opacity: 0; } 60% { transform: scale(.92) rotate(-4deg); opacity: 1; } 100% { transform: rotate(-4deg); } }
@keyframes wn-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* the player's screen name on their result, like "RNE" above "Fastest Right Answer!" */
.ph-win-who, .pt-who { position: relative; z-index: 1; display: inline-block; margin-top: .35rem; padding: .15rem .8rem; border-radius: 999px; font-weight: 900; font-size: .95rem; letter-spacing: .03em;
    background: rgba(0, 0, 0, .35); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.pt-who { font-size: 1.1rem; }

/* ---------- result colors by place (latest word from the host) ----------
   1st right (fastest): green. 2nd: purple. 3rd: gold. Everyone else right: blue.
   Wrong: red. Fast but wrong: hot pink. No answer: slate. */
.guest-page .ph-win.is-fastest, .ph-win.is-fastest { color: #fff; border: 3px solid #b8ffd9; background: radial-gradient(circle at 50% 30%, #7dffbf, #22c47a 40%, #0d6b40); box-shadow: 0 0 36px rgba(60, 230, 140, .8); animation: win-slam .6s cubic-bezier(.2, 1.7, .35, 1) both, win-glow-g 1.4s .6s ease-in-out infinite; }
@keyframes win-glow-g { 50% { box-shadow: 0 0 60px rgba(90, 255, 170, 1); } }
.is-fastest .ph-win-title { color: #fff !important; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.is-fastest .ph-win-pts { color: #fff; text-shadow: 0 3px 0 #0a5a34, 0 0 18px rgba(255, 255, 255, .7); }
.guest-page .ph-win.is-second, .ph-win.is-second { color: #fff; border: 3px solid #e2c8ff; background: radial-gradient(circle at 50% 30%, #d6a8ff, #8a3fe0 45%, #3e1180); box-shadow: 0 0 30px rgba(160, 90, 255, .7); }
.is-second .ph-win-title { color: #fff !important; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.is-second .ph-win-pts { color: #fff; text-shadow: 0 3px 0 #3e1180; }
.guest-page .ph-win.is-third, .ph-win.is-third { color: #2a1a00; border: 3px solid #fff3a8; background: radial-gradient(circle at 50% 30%, #fff6b0, #ffc93b 40%, #e08a12); box-shadow: 0 0 30px rgba(255, 200, 50, .7); }
.is-third .ph-win-title { color: #3a2200 !important; text-shadow: 0 2px 0 rgba(255, 255, 255, .5); }
.is-third .ph-win-pts { color: #fff; text-shadow: 0 3px 0 #a55a00; }
.guest-page .ph-win.is-correct, .ph-win.is-correct { color: #fff; border: 3px solid #bfe6ff; background: radial-gradient(circle at 50% 30%, #8fd4ff, #2a8fd6 45%, #0d3f73); box-shadow: 0 0 28px rgba(70, 170, 240, .6); }
.is-correct .ph-win-pts { color: #fff6b0; }

.pt-lock { font-family: var(--display); font-weight: 900; font-size: 1.9rem; color: #fff; padding: .45rem 1.1rem; border-radius: 14px; border: 3px solid rgba(255, 255, 255, .8);
    background: #111; box-shadow: 0 0 24px rgba(255, 255, 255, .25); animation: pt-slam .45s cubic-bezier(.2, 1.6, .35, 1) both; transform: none; }
.ph-timesup { background: radial-gradient(circle at 50% 45%, rgba(40, 40, 60, .6), rgba(0, 0, 0, .9) 70%); }
.pt-lock { font-size: 1.55rem; white-space: nowrap; animation: lock-pop .45s cubic-bezier(.2, 1.6, .35, 1) both; }
@keyframes lock-pop { 0% { transform: scale(2); opacity: 0; } 60% { transform: scale(.95); opacity: 1; } 100% { transform: none; } }

.pt-lock-line { font-weight: 900; font-size: 1.05rem; color: #fff; padding: .25rem .8rem; border-radius: 999px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .35); animation: wn-rise .35s .3s ease both; }
.ph-timesup { background: radial-gradient(circle at 50% 45%, rgba(200, 16, 46, .55), rgba(0, 0, 0, .9) 70%); }

.ph-board li:nth-child(1) .rk, .ph-board li:nth-child(1) .sc { color: #2fd683; }
.ph-board li:nth-child(2) .rk, .ph-board li:nth-child(2) .sc { color: #a86bff; }
.ph-board li:nth-child(3) .rk, .ph-board li:nth-child(3) .sc { color: var(--gold); }
.ph-win-pts.is-minus { color: #fff !important; text-shadow: 0 3px 0 rgba(0, 0, 0, .35) !important; }

/* wrong and missed cards pop, then shrink to a slim bar so the answer and your standing take over */
.ph-win.is-wrong, .ph-win.is-miss { transition: padding .45s ease, max-height .45s ease, margin .45s ease; max-height: 420px; }
.ph-win.is-shrunk { max-height: 64px; padding-top: .55rem; padding-bottom: .55rem; animation: none; }
.ph-win.is-shrunk .ph-win-icon, .ph-win.is-shrunk .ph-win-sub, .ph-win.is-shrunk .win-rain, .ph-win.is-shrunk .zzz, .ph-win.is-shrunk .ph-win-who { display: none; }
.ph-win.is-shrunk .ph-win-title { font-size: 1.2rem; }
.ph-win.is-shrunk .ph-win-pts { font-size: 1.2rem; display: inline-block; margin-left: .4rem; }
.ph-win.is-shrunk { display: flex; justify-content: center; align-items: center; gap: .6rem; }

/* ---------- a penalty that hurts ---------- */
.ouch-flash { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background: radial-gradient(circle, rgba(255, 0, 30, .15), rgba(200, 0, 20, .75)); animation: ouch-flash .9s ease-out forwards; }
@keyframes ouch-flash { 0% { opacity: 0; } 8% { opacity: 1; } 20% { opacity: .3; } 32% { opacity: .85; } 100% { opacity: 0; } }
body.ouch-shake .page { animation: ouch-shake .6s cubic-bezier(.36, .07, .19, .97); }
@keyframes ouch-shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(5px, -2px) rotate(.6deg); } 30%, 50%, 70% { transform: translate(-9px, 2px) rotate(-1deg); } 40%, 60% { transform: translate(9px, -1px) rotate(1deg); } }
.ph-win-pts.is-minus { position: relative; z-index: 1; display: inline-block; font-size: 3.4rem !important; color: #fff !important; text-shadow: 0 4px 0 #5a0008, 0 0 24px rgba(255, 60, 60, .9) !important;
    animation: minus-slam .7s .15s cubic-bezier(.2, 1.8, .35, 1) both, minus-throb .5s .9s ease-in-out 3; }
.ph-win-pts.is-minus span { position: relative; }
.ph-win-pts.is-minus::after { content: ""; position: absolute; left: -6%; right: -6%; top: 52%; height: 5px; border-radius: 3px; background: #fff; box-shadow: 0 0 10px #ff2a3a; transform: rotate(-8deg) scaleX(0); transform-origin: left; animation: slash .35s .8s ease-out forwards; }
@keyframes minus-slam { 0% { transform: translateY(-60px) scale(2.2); opacity: 0; } 55% { transform: translateY(6px) scale(.9); opacity: 1; } 100% { transform: none; } }
@keyframes minus-throb { 50% { transform: scale(1.12); color: #ffd0d4; } }
@keyframes slash { to { transform: rotate(-8deg) scaleX(1); } }
.money-fly { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.money-fly i { position: absolute; left: calc(var(--x) * 1%); top: 55%; font-style: normal; font-size: 1.6rem; opacity: 0; animation: money-away 1.6s calc(.7s + var(--d)) ease-out forwards; }
@keyframes money-away { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc((var(--x) - 50) * 1.4px), -220px) rotate(40deg); } }
.score-line b.is-dropping { color: #ff4d5e !important; text-shadow: 0 0 14px rgba(255, 40, 60, .7); animation: score-drop .3s linear infinite; }
@keyframes score-drop { 50% { transform: translateY(2px); } }
.ph-win.is-shrunk .money-fly { display: none; }
.ph-win.is-shrunk .ph-win-pts.is-minus { font-size: 1.2rem !important; animation: none; }
.ph-win.is-shrunk .ph-win-pts.is-minus::after { display: none; }
@media (prefers-reduced-motion: reduce) { .ouch-flash, .money-fly { display: none; } body.ouch-shake .page { animation: none; } }

/* ---------- phone leaderboard: always open, animated ---------- */
.ph-lb li { position: relative; transition: background .4s; }
.ph-lb li.is-gliding { transition: transform .8s cubic-bezier(.25, 1.25, .4, 1), background .4s; }
.ph-lb li.is-gain .sc { color: #7dffbf; }
.ph-lb li.is-new { animation: wn-rise .6s ease both; }
.ph-move { position: absolute; right: 5.2rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .72rem; font-weight: 900; padding: .1rem .4rem; border-radius: 999px; animation: pop .5s .7s both; }
.ph-move.up { background: #2fd683; color: #062b18; } .ph-move.down { background: #d11a2a; color: #fff; }
.ph-board summary { pointer-events: none; }
.next-up { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px;
    background: #000; border: 1px solid rgba(255, 255, 255, .15); font-weight: 800; }
.next-up b { font-family: var(--display); font-size: 1.8rem; color: var(--gold); min-width: 2ch; text-align: right; }
.next-up i { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--gold); transform-origin: left; transition: transform .2s linear; }
.next-up.is-soon { border-color: #ff4d5e; animation: soft-pulse .5s steps(2) infinite; }
.next-up.is-soon b { color: #ff4d5e; }
@keyframes soft-pulse { 50% { opacity: .7; } }

/* ---------- double and triple points take over the phone ---------- */
.ph-takeover { position: fixed; inset: 0; z-index: 9990; display: grid; place-items: center; overflow: hidden; text-align: center; color: #fff;
    background: radial-gradient(circle at 50% 42%, #ffcf3b, #ff7a1a 35%, #c21d5a 70%, #3b0a4f); animation: to-in .35s ease both; }
.ph-takeover.is-triple { background: radial-gradient(circle at 50% 42%, #7dffe3, #2fb8ff 35%, #7a3fc4 70%, #200a45); }
.ph-takeover.is-out { animation: to-out .45s ease forwards; }
@keyframes to-in { from { opacity: 0; transform: scale(1.2); } to { opacity: 1; transform: none; } }
@keyframes to-out { to { opacity: 0; transform: scale(.8); } }
.pt-rays { position: absolute; left: 50%; top: 42%; width: 260vmax; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .35;
    background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .95) 0deg 8deg, transparent 8deg 20deg); animation: rays-spin 6s linear infinite; }
.pt-bulbs { position: absolute; inset: 10px; border-radius: 18px; background: radial-gradient(circle, #fff 0 3px, transparent 4px) 0 0 / 22px 22px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 8px; animation: bulbs .35s steps(2) infinite; }
@keyframes bulbs { 50% { opacity: .35; } }
.pt-rain { position: absolute; inset: 0; pointer-events: none; }
.pt-rain i { position: absolute; top: -10%; left: calc(var(--x) * 1%); font-style: normal; font-size: 2rem; animation: rain-fall var(--t) var(--d) linear infinite; }
.pt-core { position: relative; display: grid; justify-items: center; gap: .6rem; padding: 1rem; }
.pt-coin { width: 44vw; max-width: 200px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle at 35% 30%, #fff7c2, #ffd23b 45%, #d18a00 80%); border: 6px solid #fff3a8; box-shadow: 0 0 40px rgba(255, 220, 80, .9), inset 0 -8px 0 rgba(0, 0, 0, .2);
    animation: coin-in .7s cubic-bezier(.2, 1.6, .35, 1) both, coin-spin 1.4s .7s ease-in-out infinite; }
.pt-coin span { font-family: var(--display); font-weight: 900; font-size: clamp(3.5rem, 18vw, 6rem); color: #fff; text-shadow: 0 4px 0 #a86500, 0 0 16px rgba(255, 255, 255, .8); }
@keyframes coin-in { from { transform: scale(0) rotate(-200deg); } to { transform: none; } }
@keyframes coin-spin { 50% { transform: rotateY(180deg); } }
.pt-word { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 11vw, 3.2rem); line-height: 1; text-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 20px rgba(255, 255, 255, .6); }
.pt-word i { display: inline-block; font-style: normal; animation: letter-drop .45s cubic-bezier(.2, 1.8, .35, 1) both; }
@keyframes letter-drop { from { transform: translateY(-60px) scale(2); opacity: 0; } to { transform: none; opacity: 1; } }
.pt-sub { font-weight: 800; font-size: 1.05rem; opacity: .95; }
.pt-count { font-family: var(--display); font-weight: 900; font-size: 4rem; line-height: 1; color: #fff; text-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.pt-count.bump { animation: count-bump .5s cubic-bezier(.2, 1.8, .35, 1); }
@keyframes count-bump { from { transform: scale(2.2); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pt-rays, .pt-rain, .pt-bulbs { display: none; } }
.pt-word { font-size: clamp(1.8rem, 9.5vw, 3rem); }
.pt-w { display: inline-block; white-space: nowrap; }
@keyframes coin-spin { 50% { transform: scale(1.08) rotate(8deg); } }

/* the result card's second life: a clean slim bar, no half-collapsed step and no replay */
.ph-win.is-wrong, .ph-win.is-miss { transition: opacity .2s ease; max-height: none; }
.ph-win.is-fading { opacity: 0; }
.ph-win.is-still { animation: bar-in .3s ease both !important; display: flex; justify-content: center; align-items: center; gap: .7rem; padding: .7rem 1rem; max-height: none; }
.ph-win.is-still .ph-win-title { font-size: 1.15rem; margin: 0; }
.ph-win.is-still .ph-win-pts { font-size: 1.2rem !important; margin: 0; animation: none !important; text-shadow: 0 2px 0 rgba(0, 0, 0, .3) !important; }
.ph-win.is-still .ph-win-pts::after { display: none; }
@keyframes bar-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.next-up.is-done { border-color: rgba(47, 214, 131, .6); }
.next-up.is-done b { color: inherit; }

/* ---------- phone: a round starts ---------- */
.guest-page .tv-card.round-start { position: relative; overflow: hidden; text-align: center; color: #fff; border: 2px solid rgba(255, 255, 255, .25);
    background: radial-gradient(circle at 50% 30%, #8b5cf6, #5b21b6 45%, #1e0b3d); animation: win-slam .6s cubic-bezier(.2, 1.7, .35, 1) both; }
.rs-rays { position: absolute; left: 50%; top: 32%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .22; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .9) 0deg 7deg, transparent 7deg 20deg); animation: rays-spin 12s linear infinite; }
.round-start > :not(.rs-rays) { position: relative; z-index: 1; }
.rs-kicker { font-weight: 900; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #e2c8ff; animation: wn-rise .4s .1s both; }
.rs-emoji { font-size: 4.6rem; line-height: 1.1; margin: .2rem 0; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .25)); animation: rs-spin .8s .15s cubic-bezier(.2, 1.6, .35, 1) both, coin-bounce 1.6s 1s ease-in-out infinite; }
@keyframes rs-spin { from { transform: scale(0) rotate(-360deg); } to { transform: none; } }
.rs-title { font-family: var(--display); font-weight: 900; font-size: clamp(1.7rem, 8.5vw, 2.4rem); line-height: 1.05; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.rs-title i { display: inline-block; font-style: normal; animation: letter-drop .45s cubic-bezier(.2, 1.8, .35, 1) both; }
.rs-ready { margin-top: .6rem; display: inline-block; padding: .35rem 1.1rem; border-radius: 999px; font-family: var(--display); font-weight: 900; letter-spacing: .08em;
    background: var(--gold); color: #2a1a00; box-shadow: 0 0 20px rgba(255, 210, 60, .7); animation: pop .5s 1.1s both, ready-pulse .9s 1.6s ease-in-out infinite; }
@keyframes ready-pulse { 50% { transform: scale(1.1); box-shadow: 0 0 34px rgba(255, 220, 80, 1); } }
.rs-ring { position: relative; width: 84px; height: 84px; margin: .9rem auto .2rem; }
.rs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rs-ring circle { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 8; }
.rs-ring .fg { stroke: #fff; stroke-dasharray: 276.5; stroke-linecap: round; transition: stroke-dashoffset .15s linear; }
.rs-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 2rem; }
.round-start .score-line { color: #fff; } .round-start .score-line b { color: #fff; }

/* the next-question countdown gets its own color so it never blends with the result bar */
.guest-page .next-up { background: linear-gradient(90deg, #0f2a5c, #1e4fa3); border: 1px solid #6ea0ff; color: #fff; }
.guest-page .next-up b { color: #ffe066; }
.guest-page .next-up i { background: #ffe066; }
.guest-page .next-up.is-soon { background: linear-gradient(90deg, #5c0f1e, #a31e3a); border-color: #ff7a8a; }
.guest-page .next-up.is-done { background: linear-gradient(90deg, #0d4a2e, #17804d); border-color: #6ff0b0; }

/* ---------- Next Question In: a bright, full-height progress bar that drains ---------- */
.guest-page .next-up { background: #1b1030 !important; border: 2px solid #ffffff55 !important; padding: .95rem 1.1rem; box-shadow: 0 0 22px rgba(255, 120, 200, .35); }
.guest-page .next-up i { top: 0; bottom: 0; height: auto !important; border-radius: 10px; z-index: 0; opacity: 1;
    background: linear-gradient(90deg, #ff3d8b, #ff8a1f, #ffd23b, #3be08a, #3bc8ff) !important; background-size: 200% 100% !important; animation: nu-shimmer 2s linear infinite; }
@keyframes nu-shimmer { to { background-position: -200% 0; } }
.guest-page .next-up span, .guest-page .next-up b { position: relative; z-index: 1; color: #fff !important; text-shadow: 0 2px 0 rgba(0, 0, 0, .45), 0 0 8px rgba(0, 0, 0, .35); }
.guest-page .next-up b { font-size: 2rem; }
.guest-page .next-up.is-soon { background: #3a0712 !important; border-color: #ff7a8a !important; animation: none; }
.guest-page .next-up.is-soon i { background: linear-gradient(90deg, #ff1f4b, #ff6a3d) !important; animation: soft-pulse .5s steps(2) infinite; }
.guest-page .next-up.is-done { background: linear-gradient(90deg, #17804d, #3be08a) !important; }

/* what's on the big screen now */
.ph-now { display: grid; gap: .35rem; margin: .75rem 1rem 0; padding: .8rem 1rem; border-radius: 12px; color: #fff; text-align: center;
    background: linear-gradient(135deg, #7a3fc4, #c21d7a); border: 1px solid rgba(255, 255, 255, .3); box-shadow: 0 6px 24px rgba(0, 0, 0, .5); animation: wn-rise .4s ease both; }
.ph-now b { font-family: var(--display); font-size: 1.25rem; }
.ph-now .btn { justify-self: center; margin-top: .2rem; }
.ph-now[hidden] { display: none; }
/* end of a round */
.round-done { margin-top: 1rem; padding: 1.2rem 1rem; border-radius: 14px; text-align: center; color: #fff; display: grid; gap: .5rem;
    background: radial-gradient(circle at 50% 20%, #3be08a, #17804d 55%, #0b3d25); border: 2px solid #b8ffd9; box-shadow: 0 0 26px rgba(60, 220, 140, .45); animation: win-slam .6s cubic-bezier(.2, 1.7, .35, 1) both; }
.rd-flag { font-size: 3rem; line-height: 1; animation: coin-bounce 1.4s ease-in-out infinite; }
.rd-title { font-family: var(--display); font-weight: 900; font-size: 1.8rem; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.rd-sub { font-weight: 700; opacity: .95; }
.rd-next { margin-top: .3rem; padding: .6rem .8rem; border-radius: 10px; background: rgba(0, 0, 0, .35); display: grid; gap: .1rem; }
.rd-next span { font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.rd-next b { font-size: 1.1rem; }
.rd-actions { display: grid; gap: .5rem; margin-top: .3rem; }

/* Wheel Of Fortune puzzle board (phone) */
.tv-q .wof { display: flex; flex-direction: column; gap: .5rem; }
.tv-q .wof-cat { font-size: .8rem; color: var(--gold); }
.tv-q .wof-board { display: flex; flex-wrap: wrap; gap: .45rem .9rem; }
.tv-q .wof-word { display: inline-flex; gap: 3px; white-space: nowrap; }
.tv-q .wof-tile { width: 1.35rem; height: 1.75rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; background: color-mix(in srgb, var(--ecto) 70%, #000); font-size: 1.05rem; color: #15151A; }
.tv-q .wof-tile.is-on { background: #F2EFEA; }
.tv-q .wof-tile.is-mark { background: transparent; color: inherit; width: auto; }
.ph-mult.is-crowd { background: var(--violet); color: #fff; }

/* ---------- Trivia tab: scoreboard, rounds on the left, the picked round on the right ---------- */
.tv-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.sb-body { max-height: 340px; overflow-y: auto; }
.sb-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 5.5rem auto; gap: .5rem; align-items: center; padding: .45rem .9rem; border-top: 1px solid var(--line); }
.sb-rank { color: var(--muted); font-weight: 800; text-align: right; }
.sb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.sb-name small { color: var(--muted); font-weight: 600; margin-left: .35rem; }
.sb-score { font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 1.1rem; text-align: right; color: var(--gold); }
.sb-actions { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sb-actions .btn { padding: .25rem .5rem; }
.sb-set { width: 5.5rem; padding: .3rem .45rem; }
.tv-work { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1rem; align-items: start; }
.tv-rounds { position: sticky; top: 1rem; display: flex; flex-direction: column; max-height: calc(100vh - 2rem); }
.tv-round-list { overflow-y: auto; min-height: 0; flex: 1; padding-bottom: .5rem; }
.tv-round { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; width: 100%; padding: .5rem .9rem; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.tv-round:hover { background: color-mix(in srgb, var(--pumpkin) 8%, transparent); }
.tv-round.is-active { background: color-mix(in srgb, var(--pumpkin) 18%, transparent); box-shadow: inset 4px 0 0 var(--pumpkin); }
.tv-round.is-current .tr-title::after { content: " • On Screen"; white-space: nowrap; color: var(--ecto-hi); font-size: .78rem; font-weight: 700; }
.tr-emoji { font-size: 1.3rem; }
.tr-title { font-weight: 800; min-width: 0; line-height: 1.25; }
.tr-count { color: var(--muted); font-size: .8rem; font-weight: 700; }
.tv-detail { min-height: 300px; }
.tvd-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; padding: .9rem 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; border-radius: 12px 12px 0 0; }
.tvd-title { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.tvd-title h3 { margin: 0; font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 1.35rem; }
.tvd-emoji { font-size: 2rem; }
.tvd-counts { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .25rem; font-size: .85rem; }
.tvd-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tvd-actions form { margin: 0; }
.tv-detail .ra-body { padding: .25rem 0 .75rem; }
@media (max-width: 1000px) {
    .tv-top, .tv-work { grid-template-columns: 1fr; }
    .tv-rounds { position: static; max-height: 45vh; }
}

/* ---------- Live tab: projector on the left, the active screen's controls on the right ---------- */
.ls-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.ls-left { position: sticky; top: 1rem; }
.ls-screens { display: grid; grid-template-columns: 1fr; gap: .4rem; }
.ls-screens .screen-btn { width: 100%; justify-content: flex-start; text-align: left; }
.ls-sep { margin-top: .5rem; color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ls-right { display: grid; gap: 1rem; min-width: 0; }
.ls-right > .ctx-bar { margin: 0; }
.ls-stack { display: grid; gap: 1rem; }
.ls-right > .ctx:not(.ls-stack) { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.lc { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.5fr); gap: 1rem; align-items: center; padding: 1rem; }
.lc-phase { font-family: Rubik, Inter, sans-serif; font-weight: 900; font-size: 1.1rem; color: var(--gold); }
.lc-q { font-weight: 800; font-size: 1.05rem; margin-top: .2rem; }
.lc-answered { font-weight: 700; font-size: .85rem; margin-top: .2rem; }
.lc-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: flex-end; }
.lc-actions .btn-next { min-width: 8rem; }
.mix-list { max-height: 45vh; overflow-y: auto; display: grid; gap: .15rem; border: 1px solid var(--line); border-radius: 8px; padding: .4rem; }
.mix-item { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; padding: .3rem .4rem; border-radius: 6px; cursor: pointer; }
.mix-item:hover { background: rgba(255, 255, 255, .05); }
@media (max-width: 1000px) {
    .ls-grid { grid-template-columns: 1fr; }
    .ls-left { position: static; }
    .ls-screens { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .lc { grid-template-columns: 1fr; }
    .lc-actions { justify-content: flex-start; }
}
.ls-screens .screen-btn { display: flex; align-items: center; gap: .6rem; justify-items: start; padding: .6rem .8rem; }
.ls-screens .screen-btn .e { font-size: 1.25rem; }
.gst-tbl th[data-sort] { cursor: pointer; user-select: none; }
.gst-tbl th[data-sort]::after { content: attr(data-dir); margin-left: .3rem; color: var(--gold); }
.gst-actions { display: flex; gap: .15rem; justify-content: flex-end; align-items: center; white-space: nowrap; }
.gst-actions form { margin: 0; }
.gst-filter button.is-on { background: var(--pumpkin); color: #fff; }
.gst-filter { display: flex; gap: 3px; padding: 3px; border-radius: 7px; background: var(--ink); }
.gst-filter button { border: 0; border-radius: 5px; padding: .4rem .7rem; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.gst-filter button:hover { color: var(--text); }
