/* Quezioke – quiz night + karaoke
   Brand: maroon #6A1E1E (primary), gold #EFB95F (secondary), logo green for "correct". */
:root {
  --maroon: #6A1E1E;
  --maroon-700: #521616;
  --maroon-900: #3A0F0F;
  --maroon-50: #F7EEEC;
  --maroon-100: #EEDCD8;
  --gold: #EFB95F;
  --gold-600: #D99A33;
  --gold-50: #FDF4E3;
  --green: #1F8A4C;
  --green-50: #E7F4EC;
  --red: #C0392B;
  --red-50: #FBEAE7;

  --bg: #F5F2EF;
  --surface: #FFFFFF;
  --ink: #2A1717;
  --ink-2: #5E4B48;
  --muted: #8A7773;
  --line: #E7DFDB;
  --line-2: #D9CDC8;

  /* answer tiles: A maroon-red, B gold, C logo green, D slate blue */
  --A: #B4362F; --B: #E9A93E; --C: #1F8A4C; --D: #2E5E8E;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(58, 15, 15, .06), 0 4px 16px rgba(58, 15, 15, .05);
  --font: "Google Sans", "Product Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--maroon); text-underline-offset: 3px; }
a:hover { color: var(--maroon-700); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
code { background: var(--maroon-50); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 24px 56px; flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.big { font-size: 1.4rem; font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.inline { display: inline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- top bar ---------- */
.ic { width: 18px; height: 18px; flex: none; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(58,15,15,.02), 0 6px 18px -12px rgba(58,15,15,.18); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; display: block; }
.mainnav { display: flex; gap: 2px; flex: 1; align-self: stretch; }
.mainnav a {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem;
  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s;
}
.mainnav a .ic { opacity: .65; width: 17px; height: 17px; }
.mainnav a:hover { color: var(--maroon); }
.mainnav a.active { color: var(--maroon); border-bottom-color: var(--gold); font-weight: 700; }
.mainnav a.active .ic { opacity: 1; }
.userbox { display: flex; align-items: center; gap: 10px; flex: none; padding-left: 16px; border-left: 1px solid var(--line); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--maroon); color: var(--gold); font-weight: 700; font-size: .85rem; letter-spacing: .02em;
}
.who { display: flex; flex-direction: column; line-height: 1.2; }
.who b { font-size: .9rem; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); font-size: .75rem; }
@media (max-width: 1100px) { .mainnav a .ic { display: none; } .who { display: none; } }
@media (max-width: 900px) {
  .topbar-in { flex-wrap: wrap; gap: 0 12px; padding: 10px 20px 0; }
  .brand img { height: 28px; }
  .userbox { margin-left: auto; border-left: 0; padding-left: 0; }
  .icon-only-m span { display: none; }
  .mainnav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 6px -20px 0; padding: 0 12px; min-height: 46px; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a .ic { display: inline; }
  body.play .mainnav { display: none; }       /* focused game view on phones */
  body.play .topbar-in { padding-bottom: 10px; }
}

.foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); background: var(--surface); }
.foot img { opacity: .9; }

/* ---------- page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin-bottom: .15em; }
.page-head p { margin: 0; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 4px !important; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--maroon); }
.section-title { margin-top: 28px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 8px; }
.card h3 .ic { color: var(--maroon); }
.card.narrow { max-width: 440px; margin: 40px auto; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row.between { justify-content: space-between; align-items: center; }
.row > label { flex: 1; min-width: 160px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
details.card > summary { cursor: pointer; font-weight: 700; color: var(--maroon); list-style: none; display: flex; align-items: center; gap: 10px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before {
  content: "+"; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--maroon); color: #fff; font-size: 1.1rem; line-height: 1; transition: transform .2s;
}
details.card[open] > summary::before { transform: rotate(45deg); }
details[open] > summary { margin-bottom: 16px; }
.danger-zone { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); }

.empty { text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty p { max-width: 46ch; margin: 0 auto 18px; }
.empty-row { padding: 18px 4px !important; }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 11px 13px; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #B3A4A0; }
input:hover, select:hover, textarea:hover { border-color: #C4B4AE; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(106, 30, 30, .14); }
input[type=checkbox], input[type=radio] { accent-color: var(--maroon); }
select { appearance: none; padding-right: 38px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236A1E1E' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; }

.btn {
  font: inherit; font-size: .95rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; min-height: 42px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { border-color: var(--maroon); color: var(--maroon); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.btn.primary:hover { background: var(--maroon-700); border-color: var(--maroon-700); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--maroon-900); }
.btn.gold:hover { background: #F4C878; border-color: #F4C878; color: var(--maroon-900); }
.btn.on-dark { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn.on-dark:hover { border-color: #fff; color: #fff; }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--maroon-50); color: var(--maroon); border-color: transparent; }
.btn.danger { background: transparent; border-color: #E3B4AE; color: var(--red); }
.btn.danger:hover { background: var(--red-50); border-color: var(--red); color: var(--red); }
.btn.small { padding: 6px 13px; min-height: 34px; font-size: .85rem; gap: 6px; }
.btn.small .ic { width: 15px; height: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover { color: var(--ink); }
.danger-text { color: var(--red) !important; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions form { display: inline-flex; gap: 6px; align-items: center; }
.actions input { padding: 6px 10px; font-size: .85rem; }

/* ---------- flash ---------- */
.flash { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 16px; background: var(--gold-50); border: 1px solid #F3D9A6; color: #6B4A12; font-weight: 500; }
.flash.error { background: var(--red-50); border-color: #F0C6C0; color: #8E2A1F; }
.flash.success { background: var(--green-50); border-color: #BFE2CC; color: #17673A; }

/* ---------- badges & tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #F0EBE8; color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.live, .badge.singing { background: var(--maroon); color: #fff; }
.badge.live::before, .badge.singing::before { background: var(--gold); opacity: 1; animation: blink 1.4s infinite; }
.badge.open, .badge.queued { background: var(--gold-50); color: #8A5A0B; }
.badge.ended, .badge.done, .badge.active { background: var(--green-50); color: var(--green); }
.badge.skipped, .badge.disabled { background: var(--red-50); color: var(--red); }
@keyframes blink { 50% { opacity: .25; } }
.tag { display: inline-block; white-space: nowrap; font-size: .78rem; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: var(--maroon-50); color: var(--maroon); }

/* ---------- tables ---------- */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; box-shadow: var(--shadow); }
.table-wrap .table { margin: 0; border: 0; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r); margin-bottom: 16px; }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th.num, .table td.num { text-align: right; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th { font-size: .8rem; font-weight: 600; color: var(--muted); background: #FBF9F8; white-space: nowrap; }
.table tbody tr:hover td { background: #FCFAF9; }
.table tr.me td { background: var(--gold-50) !important; }
.table tr.dim td { opacity: .5; }
.card .table { border: 0; margin: 0; }
.card .table td { padding: 11px 4px; }

/* leaderboard */
.board-filter select { min-width: 260px; }
.board-table td { font-size: 1rem; }
.board-table .pts { font-weight: 700; color: var(--maroon); font-size: 1.15rem; }
.rank { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 50%; background: #F0EBE8; color: var(--ink-2); font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.rank.r1 { background: var(--gold); color: var(--maroon-900); }
.rank.r2 { background: #D9D4D2; color: #3E3634; }
.rank.r3 { background: #E3B590; color: #4A2A12; }

/* ---------- auth (login / register): form on the left, live-night video on the right ---------- */
body.auth { background: #2A0B0B; }
body.auth .wrap { max-width: none; padding: 0; display: flex; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); width: 100%; min-height: 100vh; }
.auth-panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px;
  padding: 40px 32px; color: #fff;
  background: radial-gradient(120% 80% at 0% 0%, #8A2A24 0%, var(--maroon) 38%, #3A0F0F 100%);
}
.auth-panel::after { /* stage floor in the answer colours */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--A) 0 25%, var(--B) 25% 50%, var(--C) 50% 75%, var(--D) 75%);
}
.auth-glow { position: absolute; width: 560px; height: 560px; right: -260px; top: -220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(239,185,95,.35), rgba(239,185,95,0) 65%); animation: glow 7s ease-in-out infinite alternate; }
@keyframes glow { to { transform: translate(-60px, 40px) scale(1.15); opacity: .7; } }
.auth-logo { position: relative; z-index: 1; }
.auth-logo img { width: 190px; height: auto; display: block; }
.auth-form {
  position: relative; z-index: 1; width: 100%; max-width: 410px; color: var(--ink); background: rgba(255,255,255,.97);
  border-radius: 24px; padding: 32px 30px 26px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(239,185,95,.35);
  animation: rise-in .6s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes rise-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.auth-kicker { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); }
.auth-form h2 { font-size: 1.85rem; margin: 0 0 .2em; color: var(--maroon-900); }
.auth-form > .muted { margin-bottom: 22px; }
.auth-form input { min-height: 48px; border-radius: 12px; }
.auth-form input:focus { border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(106,30,30,.14); }
.auth-form .btn { margin-top: 8px; min-height: 52px; font-size: 1.05rem; border-radius: 14px;
  background: linear-gradient(135deg, #8A2A24, var(--maroon)); box-shadow: 0 10px 24px -10px rgba(106,30,30,.8); }
.auth-form .btn:hover { filter: brightness(1.08); }
.auth-switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.auth-switch a { font-weight: 700; }
.auth-points { position: relative; z-index: 1; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; color: rgba(255,255,255,.85); font-size: .9rem; }
.auth-points li { display: flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.a { background: var(--gold); } .dot.b { background: #7CC79A; } .dot.c { background: #F28C80; }

.auth-media { position: relative; overflow: hidden; background: #160505 url('video/login-poster.jpg') center / cover no-repeat; }
.auth-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.am-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(20,4,4,.35) 0%, rgba(20,4,4,0) 30%, rgba(20,4,4,0) 50%, rgba(42,8,8,.9) 100%),
  linear-gradient(90deg, rgba(58,15,15,.55) 0%, rgba(58,15,15,0) 25%); }
.am-live { position: absolute; top: 24px; right: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px); color: #fff; font-weight: 600; font-size: .85rem; }
.am-live i { width: 9px; height: 9px; border-radius: 50%; background: #FF4D4D; box-shadow: 0 0 0 0 rgba(255,77,77,.7); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 10px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }
.am-float { position: absolute; left: 28px; top: 30%; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.am-chip { padding: 9px 15px; border-radius: 999px; background: rgba(255,255,255,.93); color: var(--maroon-900); font-weight: 700; font-size: .92rem;
  box-shadow: 0 10px 26px rgba(0,0,0,.35); animation: chip 9s ease-in-out infinite; opacity: 0; }
.am-chip.c2 { animation-delay: 3s; margin-left: 30px; background: var(--gold); }
.am-chip.c3 { animation-delay: 6s; margin-left: 10px; }
@keyframes chip { 0% { opacity: 0; transform: translateY(14px) scale(.9); } 6%, 30% { opacity: 1; transform: none; } 38%, 100% { opacity: 0; transform: translateY(-10px); } }
.am-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 40px 44px; color: #fff; }
.am-caption h2 { margin: 0 0 8px; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.02; letter-spacing: -.02em; text-shadow: 0 4px 20px rgba(0,0,0,.5); }
.am-caption h2::first-line { color: var(--gold); }
.am-caption p { margin: 0; max-width: 40ch; color: rgba(255,255,255,.85); font-size: 1.05rem; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-media { order: -1; height: 46vh; min-height: 300px; }
  .am-caption { padding: 20px 20px 26px; }
  .am-caption h2 { font-size: 2rem; }
  .am-caption p { font-size: .95rem; }
  .am-float { top: auto; bottom: 120px; left: auto; right: 16px; align-items: flex-end; }
  .am-chip { font-size: .8rem; padding: 7px 12px; }
  .am-chip.c2, .am-chip.c3 { margin-left: 0; }
  .am-live { top: 14px; right: 14px; }
  .auth-panel { justify-content: flex-start; padding: 0 18px 40px; gap: 18px; margin-top: -26px; border-radius: 26px 26px 0 0; z-index: 2; }
  .auth-logo { margin-top: 22px; }
  .auth-logo img { width: 150px; }
  .auth-form { padding: 24px 20px 20px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) { .am-chip { animation: none; opacity: 1; } .auth-glow { animation: none; } }

/* ---------- dashboard ---------- */
.session-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.session-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.session-card h2 { font-size: 1.3rem; margin-top: 12px; }
.session-card > p { margin: 0 0 6px; }
.session-card.live { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.session-card.live .muted { color: rgba(255,255,255,.72); }
.session-card.live .badge.live { background: var(--gold); color: var(--maroon-900); }
.session-card.live .badge.live::before { background: var(--maroon); }
.session-card.live .facts { border-color: rgba(255,255,255,.18); }
.session-card.live .facts dt { color: rgba(255,255,255,.65); }
.session-card.live .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--maroon-900); }
.session-card.live .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.session-card.ended { background: #FBF9F8; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding-right: 8px; }
.facts dt { font-size: .78rem; color: var(--muted); }
.facts dd { margin: 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.session-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ---------- question editor ---------- */
.opts-edit { display: grid; gap: 8px; }
.opts-edit > * { min-width: 0; }
.opt-edit input[name^="option_"] { width: 100%; }
.opt-edit { flex-direction: row; align-items: center; gap: 12px; }
.opt-edit input[name^="option_"] { flex: 1; }
.opt-edit input[type=radio] { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.opt-edit b { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.opt-edit:nth-child(1) b { background: var(--A); } .opt-edit:nth-child(2) b { background: var(--B); color: var(--maroon-900); }
.opt-edit:nth-child(3) b { background: var(--C); } .opt-edit:nth-child(4) b { background: var(--D); }
.qlist { list-style: none; padding: 0; margin: 0; }
.qcard h3 { font-size: 1.1rem; margin: 10px 0 0; }
.qnum { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--maroon); color: #fff; font-weight: 700; font-size: .85rem; margin-right: 6px; }
.optlist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.optlist li { padding: 6px 10px; border-radius: 6px; }
.optlist li.right { color: var(--green); font-weight: 700; background: var(--green-50); text-align: left; }
@media (max-width: 560px) { .optlist { grid-template-columns: 1fr; } }

/* ---------- live stage (player + host) ---------- */
.stage {
  position: relative; background: var(--maroon); color: #fff; border-radius: var(--r-lg); padding: 22px 28px 28px;
  box-shadow: 0 18px 40px -18px rgba(58, 15, 15, .55); overflow: hidden; min-width: 0;
  background-image: radial-gradient(circle at 100% 0, rgba(239,185,95,.20), rgba(239,185,95,0) 42%);
}
.stage > * { position: relative; }
.game { min-height: 520px; display: flex; flex-direction: column; }
.game .view { flex: 1; display: flex; flex-direction: column; }
.game-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.game-title { min-width: 0; }
.stage-kicker { margin: 0; color: var(--gold); font-weight: 600; font-size: .9rem; }
.stage-title { font-size: 1rem; font-weight: 500; color: rgba(255,255,255,.72); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scorechip, .playerchip { display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: var(--maroon-900); font-weight: 700; padding: 8px 16px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.scorechip small { font-weight: 600; opacity: .7; font-size: .85em; }
.playerchip { background: rgba(255,255,255,.12); color: #fff; font-weight: 500; }
.playerchip b { color: var(--gold); }

.segments { display: flex; gap: 4px; margin: 16px 0 6px; }
.segments:empty { display: none; }
.segments i { display: block; flex: 1; height: 4px; min-width: 0; border-radius: 4px; background: rgba(255,255,255,.16); transition: background .3s; }
.segments i.seg-done { background: rgba(239,185,95,.55); }
.segments i.seg-now { background: var(--gold); }

.stage-message { text-align: center; padding: 40px 12px 28px; }
.stage-message h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .3em; }
.stage-message p { color: rgba(255,255,255,.75); max-width: 44ch; margin: 0 auto; min-height: 3em; }
.beacon { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); margin: 0 auto 22px; box-shadow: 0 0 0 0 rgba(239,185,95,.6); animation: beacon 1.8s infinite; }
@keyframes beacon { 70% { box-shadow: 0 0 0 22px rgba(239,185,95,0); } 100% { box-shadow: 0 0 0 0 rgba(239,185,95,0); } }

/* question head: countdown ring + text */
.q-head { display: flex; gap: 20px; align-items: center; margin: 18px 0 4px; }
.q-body { min-width: 0; flex: 1; }
.qtext { font-size: clamp(1.45rem, 3.4vw, 2.3rem); line-height: 1.18; letter-spacing: -.02em; margin: 2px 0 0; font-weight: 700; }
.qmeta { color: rgba(255,255,255,.65); font-size: .9rem; margin: 0; }
.ring { position: relative; width: 76px; height: 76px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: rgba(255,255,255,.14); }
.ring-arc { stroke: var(--gold); stroke-linecap: round; transition: stroke .3s; }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring.low .ring-arc { stroke: #FF8A7A; }
.ring.low .ring-num { color: #FFB4A8; animation: tickpulse 1s infinite; }
.ring.over .ring-num { color: rgba(255,255,255,.5); }
@keyframes tickpulse { 50% { transform: scale(1.12); } }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
@media (max-width: 600px) { .options { grid-template-columns: 1fr; gap: 10px; } }
.opt {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; text-align: left;
  font: inherit; font-size: 1.12rem; font-weight: 600; color: #fff; border: 3px solid transparent; border-radius: var(--r);
  padding: 16px 18px; min-height: 76px; cursor: pointer; transition: transform .1s, opacity .2s, box-shadow .2s;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
}
.opt b { flex: none; display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.18); border-radius: 8px; padding: 5px 10px; font-size: .95rem; }
.opt b::before { font-size: .8rem; line-height: 1; }
.opt-A b::before { content: "▲"; } .opt-B b::before { content: "◆"; } .opt-C b::before { content: "●"; } .opt-D b::before { content: "■"; }
.opt span { position: relative; z-index: 1; flex: 1; }
.opt-A { background: var(--A); } .opt-B { background: var(--B); color: var(--maroon-900); } .opt-C { background: var(--C); } .opt-D { background: var(--D); }
.opt-B b { background: rgba(58,15,15,.12); }
button.opt:not(:disabled):hover { transform: translateY(-2px); }
button.opt:not(:disabled):active { transform: translateY(1px); }
.opt:disabled { cursor: default; opacity: .5; }
.opt.picked { opacity: 1; border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.opt.right { opacity: 1; border-color: #fff; box-shadow: 0 0 0 4px var(--gold); }
.opt.right::after { content: "✓"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--green); display: grid; place-items: center; font-weight: 700; z-index: 2; }
.opt.wrong { opacity: 1; border-color: rgba(255,255,255,.7); filter: saturate(.35); }
.opt.dim { opacity: .35; }
.host-opts .opt i { position: absolute; inset: auto auto 0 0; height: 6px; background: rgba(255,255,255,.75); transition: width .4s; }
.host-opts .opt em { font-style: normal; font-weight: 700; font-size: 1.5rem; z-index: 1; }
.host-opts .opt.right::after { display: none; }

.typed { display: flex; gap: 10px; margin-top: 22px; }
.typed input { flex: 1; font-size: 1.2rem; padding: 16px 18px; border: 0; border-radius: var(--r); background: #fff; }
.typed input:focus { box-shadow: 0 0 0 4px var(--gold); }
.typed .btn { min-height: 58px; padding: 0 24px; border-radius: var(--r); }
.typed .btn:disabled { opacity: .35; }
@media (max-width: 560px) { .typed { flex-direction: column; } }

/* reaction card after answering */
.reaction {
  margin-top: 18px; padding: 16px 20px; border-radius: var(--r); display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: rgba(255,255,255,.1); animation: pop .35s cubic-bezier(.2,1.4,.4,1);
}
.r-emoji { font-size: 2.6rem; line-height: 1; flex: none; animation: bounce .6s .1s both; }
.r-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.r-main strong { font-size: 1.5rem; line-height: 1.15; letter-spacing: -.01em; }
.r-main span { opacity: .85; }
.r-answer b { color: inherit; }
.r-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: rgba(0,0,0,.08); white-space: nowrap; }
.chip.gold { background: var(--gold); color: var(--maroon-900); }
.chip.up { background: var(--green-50); color: var(--green); }
.reaction.waiting { animation: none; }
.reaction.waiting .r-main strong { font-size: 1.15rem; }
.reaction.good { background: #fff; color: var(--ink); }
.reaction.good .r-main strong { color: var(--green); }
.reaction.bad { background: rgba(0,0,0,.24); color: #fff; }
.reaction.bad .r-main strong { color: #FFC2B8; }
.reaction.bad .chip { background: rgba(255,255,255,.14); }
.reaction.bad .r-answer b { color: var(--gold); }
@keyframes pop { from { transform: translateY(10px) scale(.96); opacity: 0; } }
@keyframes bounce { 0% { transform: scale(.3) rotate(-15deg); opacity: 0; } 60% { transform: scale(1.25) rotate(6deg); opacity: 1; } 100% { transform: none; } }
.text-answer { font-size: 1.4rem; margin: 22px 0 10px; display: flex; flex-direction: column; gap: 4px; }
.text-answer small { font-size: .85rem; color: var(--gold); font-weight: 600; }

/* sponsor slots */
.sponsor-label { margin: 0 0 10px; font-size: .85rem; font-weight: 600; color: var(--gold); text-align: center; }
.stage-sponsor { margin-top: auto; padding-top: 20px; }
.sponsor-slot { border-radius: var(--r); overflow: hidden; display: grid; place-items: center; margin: 0 auto; max-width: 720px; background: rgba(255,255,255,.06); }
.sponsor-slot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sponsor-slot.kind-banner { aspect-ratio: 8 / 3; }
.sponsor-slot.kind-poster { aspect-ratio: 4 / 5; max-width: 300px; }
.sponsor-slot.kind-logo { aspect-ratio: 8 / 3; background: #fff; padding: 20px 32px; }
.sponsor-slot.is-placeholder { aspect-ratio: 8 / 3; border: 2px dashed rgba(239,185,95,.55); background: rgba(0,0,0,.12); }
.sponsor-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px; }
.sponsor-ph img { width: 44px; height: auto; margin-bottom: 4px; }
.sponsor-ph b { font-size: 1.15rem; }
.sponsor-ph span { font-size: .85rem; opacity: .7; }
.break { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 0 6px; animation: fadein .25s ease-out; }
.break .sponsor-slot { width: 100%; }
.break .sponsor-slot.kind-poster { max-width: 340px; }
.break-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; margin: 18px auto 0; width: 100%; max-width: 720px; }
.break-bar i { display: block; height: 100%; width: 0; background: var(--gold); }
@keyframes fadein { from { opacity: 0; } }

/* final screen */
.final { text-align: center; padding: 26px 12px 8px; }
.final-emoji { font-size: 3.6rem; line-height: 1; animation: bounce .7s both; }
.final h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 12px 0 .2em; }
.final p { color: rgba(255,255,255,.78); margin: 0 auto 18px; }
.final-stats { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 6px 36px; padding: 14px 28px; border-radius: var(--r); background: rgba(0,0,0,.18); }
.final-stats b { display: block; font-size: 1.6rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.final-stats span { font-size: .8rem; color: rgba(255,255,255,.7); }
#view-ended .center { margin-top: 20px; }

/* host lobby: join details */
.join { display: flex; gap: 28px; align-items: center; justify-content: space-between; padding: 26px 0 8px; flex-wrap: wrap; }
.join-text { flex: 1; min-width: 240px; }
.join-text .sponsor-label { text-align: left; }
.join h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin: 0 0 .3em; }
.join-url { color: var(--gold); word-break: break-all; }
.join p { color: rgba(255,255,255,.75); margin: 0; }
.qr { background: #fff; padding: 12px; border-radius: var(--r); flex: none; line-height: 0; }
.qr img, .qr canvas { width: 168px; height: 168px; }
.host-foot a { display: inline-flex; align-items: center; gap: 6px; }
.host-subbar { display: flex; justify-content: flex-end; margin: -10px 0 14px; }
.host-head .controls .btn .ic { width: 16px; height: 16px; }
#hostShell:fullscreen { background: var(--maroon-900); padding: 28px; align-items: stretch; }
#hostShell:fullscreen .stage { min-height: calc(100vh - 56px); }
#hostShell:fullscreen .qtext { font-size: clamp(2rem, 4vw, 3.4rem); }

.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.play-layout:has(> .side-board[hidden]) { grid-template-columns: 1fr; }
@media (max-width: 900px) {
  .play-layout { grid-template-columns: 1fr; }
  .opt { min-height: 60px; padding: 12px 14px; font-size: 1.05rem; }
  .reaction { margin-top: 14px; padding: 14px 16px; gap: 12px; }
  .r-emoji { font-size: 2.1rem; }
  .r-main strong { font-size: 1.3rem; }
  .stage { padding: 18px 18px 22px; }
  .game { min-height: calc(100dvh - 150px); }
  .q-head { gap: 14px; }
  .ring { width: 60px; height: 60px; }
  .ring-num { font-size: 1.3rem; }
  .final-stats { gap: 6px 20px; padding: 12px 18px; }
}

/* mini boards */
.side-board h3 { margin-bottom: 12px; }
.side-board .btn { margin-top: 14px; }
.board { list-style: none; padding: 0; margin: 0; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: 0; }
.board li.me { background: var(--gold-50); border-radius: var(--r-sm); }
.board .name { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .pts { font-weight: 700; color: var(--maroon); font-variant-numeric: tabular-nums; }

/* host */
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toggle { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink-2); padding: 0 6px; }
.toggle input { width: 18px; height: 18px; }
.host-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .host-grid { grid-template-columns: 1fr; } }
body.host .qtext { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.host-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; font-size: .9rem; }

/* tv leaderboard */
body.tv { background: var(--maroon); color: #fff; }
body.tv .topbar, body.tv .foot, body.tv .board-filter, body.tv .wrap > p.small { display: none; }
body.tv .wrap { max-width: 1400px; padding-top: 36px; }
body.tv .page-head { justify-content: center; text-align: center; }
body.tv .page-head h1 { font-size: 3rem; }
body.tv .page-head .muted { color: var(--gold); }
body.tv .tv-logo { height: 48px; width: auto; margin: 0 auto 28px; }
body.tv .table-wrap { background: transparent; border-color: rgba(255,255,255,.15); }
body.tv .table, body.tv .table th { background: transparent; color: #fff; }
body.tv .table th { color: rgba(255,255,255,.6); font-size: 1rem; }
body.tv .table td { font-size: 1.6rem; padding: 18px 20px; border-color: rgba(255,255,255,.12); }
body.tv .table tbody tr:hover td { background: transparent; }
body.tv .board-table .pts { color: var(--gold); font-size: 1.9rem; }
body.tv .rank { width: 46px; height: 46px; font-size: 1.2rem; background: rgba(255,255,255,.12); color: #fff; }
body.tv .rank.r1 { background: var(--gold); color: var(--maroon-900); }
body.tv .rank.r2 { background: #D9D4D2; color: #3E3634; }
body.tv .rank.r3 { background: #E3B590; color: #4A2A12; }
.tv-logo { display: none; }
body.tv .tv-logo { display: block; }

/* ---------- karaoke ---------- */
.song-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-2); }
.song-row input { width: 100%; min-width: 0; }
.song-row input[name="video_url[]"] { grid-column: 1 / -1; }
.queue { padding: 0; margin: 0; list-style: none; counter-reset: q; }
.queue li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); counter-increment: q; }
.queue li:last-child { border-bottom: 0; }
.queue li::before { content: counter(q); width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--maroon-50); color: var(--maroon); font-size: .8rem; font-weight: 700; }
.queue li:first-child::before { background: var(--gold); color: var(--maroon-900); }
.queue li > div:first-child { flex: 1; min-width: 0; }
.queue li.me { background: var(--gold-50); border-radius: var(--r-sm); }
.queue li.muted::before { display: none; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--maroon-50); color: var(--maroon); font-size: .8rem; margin-left: 4px; vertical-align: 2px; }
.now { position: relative; overflow: hidden; background: var(--maroon); color: #fff; border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; display: grid; gap: 6px; }
.now::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--A) 0 25%, var(--B) 25% 50%, var(--C) 50% 75%, var(--D) 75%); }
.now.idle { background: var(--maroon-50); color: var(--ink-2); }
.now.idle::after { display: none; }
.now.idle .now-label { color: var(--maroon); }
.now-label { font-size: .8rem; font-weight: 600; color: var(--gold); }
.now-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.now-meta { color: inherit; opacity: .8; }
.now .row { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 600px) {
  .wrap { padding: 20px 16px 40px; }
  .page-head { margin-bottom: 18px; }
  .board-filter, .board-filter select { width: 100%; min-width: 0; }
  .card { padding: 16px; }
}

/* ---------- dashboard stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 8px; }
.stat { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--maroon-50); color: var(--maroon); flex: none; }
.stat b { display: block; font-size: 1.45rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .82rem; color: var(--muted); }
.stat:first-child .stat-ic { background: var(--maroon); color: var(--gold); }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .stat { padding: 12px; gap: 10px; } .stat-ic { width: 34px; height: 34px; } .stat b { font-size: 1.2rem; } }
.page-head .crumbs { margin-bottom: 2px !important; }
.btn .ic { width: 17px; height: 17px; }

/* ---------- leaderboard podium ---------- */
.live-note { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: blink 1.6s infinite; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 4px 0 22px; }
.podium-step { flex: 1; max-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r) var(--r) 6px 6px; padding: 18px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--shadow); }
.podium-step b { font-size: 1.05rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-step.p1 { padding-top: 30px; padding-bottom: 30px; background: var(--maroon); border-color: var(--maroon); color: #fff; }
.podium-step.p1 .podium-pts { color: var(--gold); }
.podium-step.p2 { padding-top: 22px; padding-bottom: 22px; }
.podium-step.me { outline: 3px solid var(--gold); outline-offset: 2px; }
.podium-pts { font-size: 1.6rem; font-weight: 700; color: var(--maroon); font-variant-numeric: tabular-nums; }
.podium-pts small { font-size: .8rem; font-weight: 500; opacity: .7; }
.podium .rank { width: 38px; height: 38px; }
body.tv .podium-step { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
body.tv .podium-step.p1 { background: var(--gold); color: var(--maroon-900); }
body.tv .podium-step.p1 .podium-pts { color: var(--maroon); }
body.tv .podium-pts { color: var(--gold); font-size: 2.2rem; }
body.tv .podium-step b { font-size: 1.4rem; }
@media (max-width: 560px) { .podium { gap: 8px; } .podium-step { padding: 12px 8px; } .podium-step b { font-size: .9rem; } .podium-pts { font-size: 1.2rem; } }

/* ---------- sponsors admin ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.sponsor-preview { background: var(--maroon); border-radius: var(--r); padding: 18px; color: #fff; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sponsor-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.sponsor-card.off { opacity: .6; }
.sponsor-thumb { aspect-ratio: 16 / 9; background: #F0EBE8; display: grid; place-items: center; }
.sponsor-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sponsor-thumb.kind-logo { background: #fff; padding: 16px; border-bottom: 1px solid var(--line); }
.sponsor-body { padding: 14px 16px 16px; }
.sponsor-body p { margin: 4px 0 12px; }
input[type=file] { padding: 9px; background: #FBF9F8; }
.split > * { min-width: 0; }
input[type=file], .split select { max-width: 100%; width: 100%; }

/* ---------- question pictures & fun facts ---------- */
.q-image { margin: 16px 0 0; border-radius: var(--r); overflow: hidden; background: rgba(0,0,0,.22); display: grid; place-items: center; height: clamp(160px, 32vh, 340px); }
.q-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.host .q-image { height: clamp(170px, 28vh, 360px); }
#hostShell:fullscreen .q-image { height: 36vh; }
@media (max-width: 900px) {
  .q-image { height: clamp(110px, 21vh, 200px); margin-top: 10px; }
  .q-image:not([hidden]) + .q-head { margin-top: 12px; }
  .q-image:not([hidden]) + .q-head .qtext { font-size: 1.25rem; }
  .q-image:not([hidden]) ~ .options { margin-top: 14px; gap: 8px; }
  .q-image:not([hidden]) ~ .options .opt { min-height: 52px; padding: 10px 14px; font-size: 1rem; }
}
.r-fact { margin-top: 6px; font-size: .92rem; opacity: .9; }
.reaction.good .r-fact { color: var(--ink-2); }
.fact { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r); background: rgba(0,0,0,.2); color: rgba(255,255,255,.92); }
.fact b { color: var(--gold); }
.media-row { align-items: flex-start; }
.current-img { display: flex; flex-direction: column; gap: 8px; }
.current-img img { height: 90px; width: auto; border-radius: 8px; border: 1px solid var(--line); }
.q-thumb { display: block; height: 110px; width: auto; max-width: 100%; border-radius: 8px; margin-top: 12px; border: 1px solid var(--line); }
.fact-line { margin: 12px 0 0; padding: 8px 12px; background: var(--gold-50); border-radius: 6px; color: var(--ink-2); }

/* ======================================================================
   Host screen extras: full screen shell, reaction bubbles, typed review
   ====================================================================== */
#hostShell:fullscreen { overflow: auto; }
#hostShell:fullscreen .host-head, #hostShell:fullscreen .host-subbar { color: #fff; }
#hostShell:fullscreen .host-head h1, #hostShell:fullscreen .crumbs a { color: #fff; }
#hostShell:fullscreen .host-head .btn:not(.primary):not(.danger) { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
#hostShell:fullscreen .side-board { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }

.bubbles { position: fixed; right: 22px; bottom: 18px; width: min(340px, 70vw); height: 70vh; pointer-events: none; z-index: 60; }
#hostShell:fullscreen .bubbles { right: 34px; }
.bubble {
  position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 9px 16px 9px 9px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 10px 28px rgba(0,0,0,.28);
  animation: rise 5.2s cubic-bezier(.25,.7,.3,1) forwards;
}
.bubble.pass { border: 2px solid var(--green); }
.bubble.fail { border: 2px solid var(--A); }
.b-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; color: #fff; background: var(--green); }
.bubble.fail .b-av { background: var(--A); }
.b-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.b-txt b { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-txt span { font-weight: 700; font-size: 1.02rem; }
@keyframes rise {
  0% { transform: translate(0, 20px) scale(.8); opacity: 0; }
  10% { transform: translate(0, 0) scale(1); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(var(--drift, -20px), -62vh) scale(.94); opacity: 0; }
}
.typed-review { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); background: rgba(0,0,0,.22); }
.typed-review h4 { margin: 0 0 10px; font-size: 1rem; color: var(--gold); }
.typed-review h4 small { color: rgba(255,255,255,.65); font-weight: 400; }
.typed-review ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.typed-review li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.07); border-left: 4px solid var(--A); }
.typed-review li.ok { border-left-color: #5BD08A; }
.typed-review .ta { flex: 1; min-width: 120px; opacity: .9; }
.tr-btns { display: flex; gap: 6px; }

/* question pictures: always the whole picture, over a soft blurred copy */
.q-image { position: relative; isolation: isolate; cursor: zoom-in; }
.q-image::before { content: ""; position: absolute; inset: -20px; z-index: -1; background: var(--img) center / cover no-repeat; filter: blur(22px) brightness(.55); }
@media (min-width: 1000px) {
  :is(body.play, #hostShell:fullscreen) .view.has-image:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: auto auto 1fr; column-gap: 26px; align-items: start; }
  :is(body.play, #hostShell:fullscreen) .view.has-image > .q-image { grid-column: 1; grid-row: 1 / span 4; height: auto; aspect-ratio: 4 / 3; max-height: 62vh; margin-top: 16px; }
  :is(body.play, #hostShell:fullscreen) .view.has-image > :not(.q-image) { grid-column: 2; }
}
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,6,6,.92); display: grid; place-items: center; padding: 18px; cursor: zoom-out; animation: fadein .2s; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.lightbox-x { position: absolute; top: 12px; right: 16px; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer; }
.r-line { font-weight: 600; font-style: italic; }

/* ======================================================================
   Karaoke screen
   ====================================================================== */
.kstage-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .kstage-grid { grid-template-columns: 1fr; } }
.kvideo { position: relative; aspect-ratio: 16 / 9; background: var(--maroon-900); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 18px 40px -18px rgba(58,15,15,.6); }
.kvideo iframe, .kvideo #ytPlayer { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kvideo-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 14px; color: rgba(255,255,255,.75);
  background: radial-gradient(circle at 80% 10%, rgba(239,185,95,.25), transparent 50%), var(--maroon); }
.kvideo-empty img { height: 54px; width: auto; margin: 0 auto; }
.khighlight { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #8C2A2A 0%, var(--maroon) 45%, var(--maroon-900) 100%); animation: fadein .3s; }
.khighlight > :not(.confetti) { position: relative; z-index: 1; }
.kh-kicker { margin: 0; color: var(--gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .9rem; }
.khighlight h2 { font-size: clamp(2rem, 6vw, 4.2rem); margin: 0; line-height: 1.05; animation: bounce .7s both; }
.kh-song { font-size: clamp(1rem, 2.2vw, 1.5rem); margin: 0; opacity: .9; }
.kh-cheer { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 700; color: var(--gold); margin: 10px 0 4px; }
.kh-next { margin: 0 0 12px; opacity: .8; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.kfinder { margin-top: 16px; }
.kfinder .row input { flex: 1; min-width: 200px; }
.kresults { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.kres { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 0 8px; cursor: pointer; overflow: hidden; font: inherit; display: flex; flex-direction: column; gap: 3px; }
.kres:hover { border-color: var(--maroon); }
.kres img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.kres b, .kres small { padding: 0 10px; } .kres b { font-size: .88rem; line-height: 1.25; }
#stageShell:fullscreen { background: var(--maroon-900); padding: 24px; overflow: auto; color: #fff; }
#stageShell:fullscreen .kstage-head h1, #stageShell:fullscreen .crumbs a { color: #fff; }
#stageShell:fullscreen .kside { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.12); }
.kbanner { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 70; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 16px; background: var(--maroon); color: #fff; box-shadow: 0 16px 40px rgba(58,15,15,.4); animation: pop .4s cubic-bezier(.2,1.4,.4,1); }
.kbanner.mine { background: var(--gold); color: var(--maroon-900); }
.kbanner > div { flex: 1; display: flex; flex-direction: column; }
.kbanner b { font-size: 1.1rem; } .kbanner span { opacity: .85; font-size: .92rem; }
.kb-emoji { font-size: 2rem; }
.kb-x { background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; }
@media (max-width: 900px) { .kbanner { top: 112px; } }

/* ======================================================================
   Manage quizzes: packs and nights
   ====================================================================== */
.live-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0 0; padding: 14px 18px; border-radius: var(--r); background: var(--maroon); color: #fff; box-shadow: var(--shadow); }
.live-banner > div { flex: 1; display: flex; flex-direction: column; min-width: 180px; }
.live-banner small { color: var(--gold); font-weight: 600; }
.live-banner .muted { color: rgba(255,255,255,.7); }
.live-banner .live-dot { background: var(--gold); width: 12px; height: 12px; }
.mgr-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 18px; }
.seg-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #EAE3DF; border-radius: 999px; flex-wrap: wrap; }
.seg-tabs button { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--ink-2); padding: 8px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.seg-tabs button span { font-size: .78rem; background: rgba(0,0,0,.08); padding: 1px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.seg-tabs button.on { background: var(--surface); color: var(--maroon); box-shadow: 0 1px 4px rgba(58,15,15,.15); }
.seg-tabs button.on span { background: var(--maroon); color: #fff; }
.mgr-bar .search input { width: min(280px, 100%); border-radius: 999px; padding-left: 16px; }
@media (max-width: 600px) { .mgr-bar .search, .mgr-bar .search input { width: 100%; } }

.pack { margin-bottom: 28px; }
.pack-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--line); }
.pack-head h2 { margin: 0; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.pack-head h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--gold); }
.pack-head p { margin: 2px 0 0 16px; }
.round-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.round-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.round-card:hover { transform: translateY(-2px); border-color: var(--maroon-100); box-shadow: 0 10px 24px -12px rgba(58,15,15,.35); }
.rc-top { display: flex; justify-content: space-between; align-items: center; }
.rc-num { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 12px; background: var(--maroon); color: var(--gold); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rc-num.sm { min-width: 36px; height: 36px; font-size: .92rem; border-radius: 10px; flex: none; }
.round-card h3 { margin: 2px 0 0; font-size: 1.08rem; line-height: 1.25; }
.rc-desc { margin: 0; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-chips { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rc-chips li { font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--maroon-50); color: var(--maroon); }
.rc-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.rc-actions .btn { flex: 1; justify-content: center; }

.night-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.night-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 14px 18px; flex-wrap: wrap; }
.night-card > summary::-webkit-details-marker { display: none; }
.night-card[open] > summary { border-bottom: 1px solid var(--line); background: #FBF8F6; }
.date-tile { width: 58px; flex: none; border-radius: 12px; overflow: hidden; text-align: center; background: var(--maroon); color: #fff; display: flex; flex-direction: column; line-height: 1.1; padding: 5px 0 6px; }
.date-tile small { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); font-weight: 600; }
.date-tile b { font-size: 1.45rem; }
.nc-main { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.nc-main b { font-size: 1.1rem; }
.nc-winner { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--gold-50); color: #7A4F08; font-size: .9rem; }
.nc-winner span { opacity: .8; }
.night-rounds { list-style: none; margin: 0; padding: 6px 10px 10px; }
.night-rounds li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.night-rounds li:last-child { border-bottom: 0; }
.nr-title { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
@media (max-width: 600px) {
  .night-card > summary { gap: 10px; padding: 12px; }
  .nc-board { width: 100%; justify-content: center; }
  .night-rounds .actions { width: 100%; }
  .night-rounds .actions .btn { flex: 1; justify-content: center; }
}
dialog.modal { border: 0; border-radius: var(--r-lg); padding: 22px; width: min(620px, calc(100% - 24px)); box-shadow: 0 30px 80px rgba(20,6,6,.45); color: var(--ink); }
dialog.modal::backdrop { background: rgba(30,8,8,.55); backdrop-filter: blur(2px); }
dialog.modal h2 { margin: 0; }
.night-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.night-mini { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.nm-body h3 { margin: 0; }
.nm-body p { margin: 2px 0 10px; }

/* ======================================================================
   Special menu
   ====================================================================== */
.menu-hero {
  position: relative; display: flex; align-items: center; gap: 24px; padding: 22px 28px; margin-bottom: 26px; border-radius: var(--r-lg); color: #fff; overflow: hidden;
  background: radial-gradient(circle at 85% -10%, rgba(239,185,95,.22), transparent 45%), linear-gradient(135deg, #6E1A17, #4A1210);
  box-shadow: 0 18px 40px -20px rgba(58,15,15,.6); border: 1px solid rgba(239,185,95,.35);
}
.mh-logo { width: 96px; height: auto; flex: none; border-radius: 12px; }
.mh-text { flex: 1; min-width: 0; }
.mh-kicker { margin: 0; color: rgba(255,255,255,.7); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.menu-hero h1 { margin: 2px 0 6px; color: #E9C27A; font-size: clamp(1.8rem, 5vw, 3.2rem); letter-spacing: .04em; text-transform: uppercase; line-height: 1.05; }
.mh-sub { margin: 0; opacity: .9; display: flex; gap: 8px; align-items: center; }
.mh-sub::before { content: "🔥"; animation: flicker 1.2s infinite alternate; }
.mh-where { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .82rem; color: rgba(255,255,255,.85); flex: none; }
.mh-where img { width: 76px; height: auto; border-radius: 8px; }
@media (max-width: 640px) {
  .menu-hero { flex-wrap: wrap; padding: 18px; gap: 14px; justify-content: center; text-align: center; }
  .mh-logo { width: 72px; } .mh-text { flex: 1 1 100%; } .mh-sub { justify-content: center; }
  .mh-where { order: 3; }
  .mh-where { flex-direction: row; text-align: left; }
}
.menu-section { margin-bottom: 26px; }
.menu-section.has-photo { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; align-items: center; padding: 22px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, #5E1714, #431010); border: 1px solid rgba(239,185,95,.3); box-shadow: 0 14px 34px -20px rgba(58,15,15,.6); }
.menu-section.has-photo.flip { grid-template-columns: minmax(0, 1fr) 240px; }
.menu-section.flip .ms-photo { order: 2; }
.ms-photo { margin: 0; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 5px solid #E9C27A; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.ms-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.has-photo .ms-head { background: none; border: 0; padding: 0 0 4px; margin-bottom: 12px; }
.has-photo .ms-head h2 { color: #E9C27A; font-size: 1.25rem; }
.ms-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: #660000; color: #fff; padding: 10px 16px; border-radius: 10px; border-left: 6px solid var(--gold); margin-bottom: 12px; }
.ms-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.ms-head p { margin: 0; opacity: .75; font-size: .88rem; }
.has-photo .menu-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 760px) {
  .menu-section.has-photo, .menu-section.has-photo.flip { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  .menu-section.flip .ms-photo { order: 0; }
  .ms-photo { width: min(200px, 60%); margin: 0 auto; }
  .has-photo .ms-head { justify-content: center; text-align: center; }
}
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.menu-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; transition: border-color .2s, box-shadow .2s; }
.menu-item.added { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-50); }
.menu-item.sold-out { opacity: .55; }
.mi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mi-top h3 { margin: 0; font-size: 1.08rem; line-height: 1.25; }
.mi-price { font-weight: 700; color: #660000; font-size: 1.15rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mi-price small { font-size: .7rem; font-weight: 600; color: var(--muted); }
.mi-serves { align-self: flex-start; font-size: .76rem; font-weight: 700; color: #660000; background: var(--maroon-50); padding: 2px 9px; border-radius: 999px; }
.mi-desc { margin: 0; color: var(--ink-2); font-style: italic; font-size: .92rem; flex: 1; }
.mi-buy { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.mi-choice { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.mi-choice select.shake { animation: shake .4s; border-color: var(--red); }
.mi-buy .btn[data-add] { flex: 1; justify-content: center; min-height: 42px; }
.mi-out { margin: 8px 0 0; font-weight: 600; color: var(--red); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; height: 42px; }
.stepper button { width: 40px; height: 100%; border: 0; background: #FBF8F6; font-size: 1.2rem; cursor: pointer; color: var(--maroon); }
.stepper output { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.cart-bar { position: fixed; z-index: 80; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 20px; border-radius: 999px; background: var(--maroon); color: #fff; box-shadow: 0 16px 40px rgba(58,15,15,.45); animation: pop .3s; }
.cart-bar > div { display: flex; flex-direction: column; line-height: 1.2; }
.cart-bar span { color: var(--gold); font-weight: 700; }
body.has-cart .wrap { padding-bottom: 90px; }
.cart-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cart-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #FBF8F6; border-radius: 10px; }
.cart-list small { display: block; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; margin: 4px 2px; }
.form-error { color: var(--red); font-weight: 600; margin: 0; }
.my-orders { margin-top: 10px; }
.my-order { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; }
.my-order.st-cancelled { opacity: .6; }
.mo-head { display: flex; justify-content: space-between; align-items: center; }
.mo-steps { list-style: none; display: flex; padding: 0; margin: 12px 0 8px; counter-reset: s; }
.mo-steps li { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); position: relative; padding-top: 22px; }
.mo-steps li::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--line-2); z-index: 1; }
.mo-steps li::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px; background: var(--line-2); }
.mo-steps li:first-child::after { display: none; }
.mo-steps li.done { color: var(--green); font-weight: 700; }
.mo-steps li.done::before, .mo-steps li.done::after { background: var(--green); }
.badge.new { background: var(--gold-50); color: #8A5A0B; }
.badge.preparing { background: var(--maroon); color: #fff; }
.badge.served { background: var(--green-50); color: var(--green); }
.badge.cancelled { background: var(--red-50); color: var(--red); }
.toast { position: fixed; z-index: 300; left: 50%; top: 80px; transform: translateX(-50%); background: var(--green); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pop .3s; }

.orders-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 26px; box-shadow: var(--shadow); }
.orders-board.ping { animation: ping 1.2s; }
@keyframes ping { 0%, 100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 6px var(--gold); } }
.ob-head h2 { margin: 0; }
.ob-stats { display: flex; gap: 16px; color: var(--ink-2); flex-wrap: wrap; }
.ob-stats b { color: var(--maroon); }
.orders-board .seg-tabs { margin: 14px 0; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.order-card { border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; background: #FFFDFB; }
.order-card.st-preparing { border-left-color: var(--maroon); }
.order-card.st-served { border-left-color: var(--green); }
.order-card.st-cancelled { border-left-color: var(--red); opacity: .7; }
.order-card header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.order-card p { margin: 0; }
.order-card ul { margin: 4px 0; padding-left: 18px; }
.order-note { background: var(--gold-50); padding: 6px 10px; border-radius: 8px; font-size: .9rem; }
.order-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

/* TV view of the menu (shown over the presentation screens) */
body.menu-tv { background: #2b0000; }
body.menu-tv .wrap { max-width: 1500px; padding-top: 18px; }
body.menu-tv .has-photo .menu-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
body.menu-tv .menu-item { background: rgba(255,255,255,.96); }
@media (max-width: 900px) { body.menu-tv .menu-grid { grid-template-columns: 1fr; } }

/* ---------- "Click Me! 🔥" special-menu pop-up (bottom-left on every screen) ---------- */
.menu-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 90; display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; text-decoration: none; color: var(--maroon-900) !important; font-weight: 800; font-size: 1.02rem;
  background: linear-gradient(135deg, #FFD27A, var(--gold) 45%, #FF8A3D); border: 2px solid #fff;
  box-shadow: 0 10px 26px rgba(106,30,30,.45); animation: fabPulse 1.6s ease-in-out infinite;
}
.menu-fab::before, .menu-fab::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 3px solid #FF8A3D; animation: fabRing 1.6s ease-out infinite; pointer-events: none; }
.menu-fab::after { animation-delay: .8s; border-color: var(--gold); }
.menu-fab:hover { animation-play-state: paused; transform: scale(1.06); }
.mf-fire { font-size: 1.2rem; display: inline-block; animation: flicker .5s ease-in-out infinite alternate; }
.mf-fire.f2 { animation-delay: .25s; }
.mf-tip {
  position: absolute; left: 0; bottom: calc(100% + 10px); white-space: nowrap; background: var(--maroon); color: #fff; font-size: .85rem; font-weight: 600;
  padding: 7px 12px; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.25); transform-origin: 20px 100%; animation: tipPop 7s ease-in-out infinite;
}
.mf-tip::after { content: ""; position: absolute; left: 22px; top: 100%; border: 7px solid transparent; border-top-color: var(--maroon); }
@keyframes fabPulse { 0%, 100% { transform: scale(1) rotate(0); } 10% { transform: scale(1.08) rotate(-3deg); } 20% { transform: scale(1.08) rotate(3deg); } 30% { transform: scale(1) rotate(0); } }
@keyframes fabRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.35, 1.7); opacity: 0; } }
@keyframes flicker { from { transform: scale(1) rotate(-6deg); filter: brightness(1); } to { transform: scale(1.25) rotate(6deg); filter: brightness(1.25); } }
@keyframes tipPop { 0%, 8% { opacity: 0; transform: scale(.6); } 14%, 62% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(.6); } }
body.host .menu-fab, body.tv .menu-fab { font-size: 1.15rem; padding: 13px 22px; }
:fullscreen .menu-fab { position: fixed; }
body.play .wrap, body.has-fab .wrap { padding-bottom: 84px; }
@media (max-width: 600px) { .menu-fab { left: 10px; bottom: 10px; padding: 9px 14px; font-size: .95rem; } .mf-tip { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .menu-fab, .menu-fab::before, .menu-fab::after, .mf-fire { animation: none; } }
.menu-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(20,4,4,.85); padding: 56px 16px 16px; animation: fadein .2s; }
.menu-overlay iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r-lg); background: #2b0000; }
.menu-overlay-x { position: absolute; top: 10px; right: 16px; }
.wrap { padding-bottom: 84px; }
body.menu-tv .menu-item { color: var(--ink); }
body.menu-tv .page-head, body.menu-tv .tv-logo { display: none; }

/* ---------- leaderboard: tonight / by night / overall ---------- */
.board-tabs { margin: 0 0 18px; }
.board-tabs a { text-decoration: none; font-weight: 600; color: var(--ink-2); padding: 9px 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; }
.board-tabs a span { font-size: .78rem; background: rgba(0,0,0,.08); padding: 1px 8px; border-radius: 999px; }
.board-tabs a.on { background: var(--surface); color: var(--maroon); box-shadow: 0 1px 4px rgba(58,15,15,.15); }
.board-tabs a.on span { background: var(--maroon); color: #fff; }
.night-picker { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; scroll-snap-type: x proximity; }
.np-card { flex: none; scroll-snap-align: start; display: flex; gap: 12px; align-items: center; padding: 10px 16px 10px 10px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); min-width: 200px; transition: transform .15s; }
.np-card:hover { transform: translateY(-2px); }
.np-card.on { border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-100), var(--shadow); }
.np-card .date-tile { width: 50px; }
.np-card .date-tile b { font-size: 1.25rem; }
.np-body { display: flex; flex-direction: column; line-height: 1.25; }
.np-body small { color: var(--muted); }
.np-body .np-win { color: #8A5A0B; font-weight: 600; }
.round-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.round-chips a { text-decoration: none; font-size: .88rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); }
.round-chips a.on { background: var(--maroon); border-color: var(--maroon); color: #fff; }
body.tv .board-tabs { margin-left: auto; margin-right: auto; display: flex; width: max-content; background: rgba(255,255,255,.1); }
body.tv .board-tabs a { color: rgba(255,255,255,.8); }
body.tv .board-tabs a.on { background: var(--gold); color: var(--maroon-900); }
body.tv .np-card { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; }
body.tv .np-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(239,185,95,.4); }
body.tv .np-body small { color: rgba(255,255,255,.7); }
body.tv .round-chips a { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
body.tv .round-chips a.on { background: var(--gold); color: var(--maroon-900); }

/* ---------- phone remote (quiz master) ---------- */
body.remote { background: #2A0B0B; }
body.remote .wrap { max-width: 560px; padding: 14px 14px 120px; color: #fff; }
body.remote .foot { display: none; }
body.remote .menu-fab { display: none; }
.rm-tabs { display: flex; width: 100%; margin-bottom: 12px; background: rgba(255,255,255,.1); }
.rm-tabs button { flex: 1; justify-content: center; color: rgba(255,255,255,.8); }
.rm-tabs button.on { background: var(--gold); color: var(--maroon-900); }
.rm-pick { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.7); margin-bottom: 12px; }
.rm-pick select { min-height: 48px; font-size: 1rem; border-radius: 12px; }
.rm-card { background: var(--maroon); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: 0 14px 30px -16px rgba(0,0,0,.6);
  background-image: radial-gradient(circle at 100% 0, rgba(239,185,95,.18), rgba(239,185,95,0) 45%); }
.rm-card h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.rm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rm-phase { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); }
.rm-phase.ph-question { background: #2FB36A; color: #fff; }
.rm-phase.ph-timeup { background: var(--gold); color: var(--maroon-900); }
.rm-phase.ph-lobby, .rm-phase.ph-sponsor { background: #3B74B8; }
.rm-groups { display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: var(--maroon-900); font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.rm-q { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.rm-q .ring { width: 64px; height: 64px; flex: none; }
.rm-progress { margin: 0; color: var(--gold); font-size: .85rem; font-weight: 600; }
.rm-qtext { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.rm-answer { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.25); display: flex; flex-direction: column; }
.rm-answer small { color: var(--gold); font-weight: 600; font-size: .75rem; }
.rm-answer b { font-size: 1.1rem; }
.rm-count { margin: 10px 0 0; color: rgba(255,255,255,.8); }
.rm-opts { display: grid; gap: 6px; margin-top: 10px; }
.rm-opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.08); }
.rm-opt b { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: .8rem; background: rgba(255,255,255,.15); flex: none; }
.rm-opt span { flex: 1; }
.rm-opt em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.rm-opt.is-right { background: rgba(47,179,106,.35); outline: 2px solid #2FB36A; }
.rm-board .board li { color: #fff; border-color: rgba(255,255,255,.12); }
.rm-board .btn { margin-top: 10px; }
.rm-review { margin-top: 0; margin-bottom: 12px; }
.rm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(30,6,6,.92); backdrop-filter: blur(8px); border-top: 1px solid rgba(239,185,95,.3); }
.rm-bar .btn { min-height: 58px; border-radius: 16px; font-size: 1.05rem; justify-content: center; }
.rm-main { flex: 1; font-size: 1.15rem !important; font-weight: 800; }
.rm-main:disabled { opacity: .55; }
.rm-side { flex: none; padding: 0 12px; font-size: .92rem !important; }
.rm-main { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .rm-side .ic { display: none; } }
.rm-bar .btn.wait { opacity: .6; pointer-events: none; }
@media (min-width: 600px) { .rm-bar { left: 50%; right: auto; transform: translateX(-50%); width: 560px; border-radius: 18px 18px 0 0; } }
.rm-song { margin: 4px 0 12px; display: flex; flex-direction: column; font-size: 1.05rem; }
.rm-song b { font-size: 1.3rem; }
.rm-song span { color: rgba(255,255,255,.75); }
.rm-kbtns { display: grid; gap: 8px; }
.rm-kbtns .btn { min-height: 52px; justify-content: center; border-radius: 14px; }
#pane-karaoke .queue li { color: #fff; border-color: rgba(255,255,255,.12); }
#pane-karaoke .queue li.me, #pane-karaoke .queue li { background: transparent; }
body.remote .muted { color: rgba(255,255,255,.6); }
.phone-qr { display: grid; place-items: center; margin: 16px auto 8px; background: #fff; padding: 14px; border-radius: 16px; width: max-content; }
.phone-url { text-align: center; font-weight: 600; color: var(--maroon); word-break: break-all; }
