/* =====================================================================
   Musical Housie – frosted glass, pastel tiles, Inter.
   ===================================================================== */

/* ---------- Themes (generated – keep in sync with THEMES in js/common.js) ---------- */
:root, [data-theme="bollywood"] { --bg: #120d1c; --glow1: #5b2a86; --glow2: #a8325e; --glow3: #2a3d7a; --pink: #ff7aa8; --gold: #ffd84d; }
[data-theme="royal"] { --bg: #0a0f1f; --glow1: #23408f; --glow2: #6b5a1d; --glow3: #1d5a7a; --pink: #8cb4ff; --gold: #f5cf5a; }
[data-theme="midnight"] { --bg: #070b14; --glow1: #12355e; --glow2: #3a1f5e; --glow3: #0f4a5a; --pink: #7fc8ff; --gold: #ffc46b; }
[data-theme="mehendi"] { --bg: #07120f; --glow1: #1d5e4a; --glow2: #5a5a1d; --glow3: #1a4a5a; --pink: #7ee0c3; --gold: #e9d27a; }
[data-theme="neon"] { --bg: #08070c; --glow1: #6a1a7a; --glow2: #0f5a6a; --glow3: #3a1a6a; --pink: #ff7ae0; --gold: #7ef0ff; }
[data-theme="sunset"] { --bg: #170b10; --glow1: #8a2a4a; --glow2: #8a4a1a; --glow3: #4a1a3a; --pink: #ff8f7e; --gold: #ffc46b; }
[data-theme="velvet"] { --bg: #14070c; --glow1: #6a1030; --glow2: #3a0f4a; --glow3: #5a2010; --pink: #ff8fb1; --gold: #ffcf7a; }
[data-theme="emerald"] { --bg: #04120c; --glow1: #0f5a3a; --glow2: #4a5a10; --glow3: #0f3a5a; --pink: #6fe3b0; --gold: #f2d16b; }
[data-theme="noir"] { --bg: #0b0b0d; --glow1: #3a3a44; --glow2: #26262e; --glow3: #4a4a55; --pink: #e8e8ee; --gold: #ffd84d; }
[data-theme="monsoon"] { --bg: #061214; --glow1: #0f4a52; --glow2: #1f2f6a; --glow3: #2a5a3a; --pink: #74e0e6; --gold: #b8f06a; }
[data-theme="ivory"] { --bg: #f6f1e8; --glow1: #f3d9b8; --glow2: #e8c9d9; --glow3: #d6e4f0; --pink: #c2410c; --gold: #b45309; }
[data-theme="rose"] { --bg: #fbf0f3; --glow1: #f6c6d3; --glow2: #f9dcc4; --glow3: #e3d1f5; --pink: #d6336c; --gold: #c2410c; }
[data-theme="mint"] { --bg: #eef8f2; --glow1: #bfe8cf; --glow2: #e2f3b5; --glow3: #c7e6ef; --pink: #15803d; --gold: #0f766e; }
[data-theme="sky"] { --bg: #eef5fc; --glow1: #c4ddf7; --glow2: #dfe8fb; --glow3: #f9e3c8; --pink: #1d4ed8; --gold: #0369a1; }
[data-theme="lemon"] { --bg: #fcf8e6; --glow1: #f7e7a1; --glow2: #fbd3b0; --glow3: #d8f0c0; --pink: #a16207; --gold: #c2410c; }
[data-theme="lavender"] { --bg: #f4f1fb; --glow1: #d9ccf5; --glow2: #f1d4ea; --glow3: #cfe0f7; --pink: #6d28d9; --gold: #be185d; }
[data-theme="sandstone"] { --bg: #f7ede4; --glow1: #f2c9a5; --glow2: #eab3a0; --glow3: #f3dcb2; --pink: #b4532a; --gold: #9a3412; }
[data-theme="pearl"] { --bg: #f5f5f7; --glow1: #e3e3ea; --glow2: #e9e4f0; --glow3: #dde7ee; --pink: #18181b; --gold: #52525b; }
[data-theme="chai"] { --bg: #f3e7d7; --glow1: #e6c7a0; --glow2: #d9a77a; --glow3: #efe0c8; --pink: #ffb36b; --gold: #ffd84d; }
[data-theme="peacock"] { --bg: #e6f1ef; --glow1: #9ed3cb; --glow2: #9fb8e6; --glow3: #c6e3b0; --pink: #4fd1c5; --gold: #ffd84d; }
[data-theme="marble"] { --bg: #ededef; --glow1: #d4d4dc; --glow2: #e2dccf; --glow3: #cfd8e2; --pink: #e8e8ee; --gold: #ffd84d; }
[data-theme="coconut"] { --bg: #eaf3e2; --glow1: #b9dca0; --glow2: #f1e2a9; --glow3: #a9d6d0; --pink: #9be37a; --gold: #ffd84d; }
[data-theme="diwali"] { --bg: #170b07; --glow1: #8a3b12; --glow2: #9a2b2b; --glow3: #6a4a10; --pink: #ffa463; --gold: #ffd84d; }
[data-theme="holi"] { --bg: #fdf6fb; --glow1: #ffb3d9; --glow2: #b3e5ff; --glow3: #fff2a8; --pink: #db2777; --gold: #ea580c; }
[data-theme="navratri"] { --bg: #12081c; --glow1: #8a1a6a; --glow2: #c2410c; --glow3: #1a5a8a; --pink: #ff7ad9; --gold: #ffc84d; }
[data-theme="eid"] { --bg: #04110e; --glow1: #0f4a3a; --glow2: #3a3a10; --glow3: #0f2f4a; --pink: #7ee0c3; --gold: #f2d16b; }
[data-theme="christmas"] { --bg: #0a1210; --glow1: #6a1020; --glow2: #0f4a2a; --glow3: #3a1a1a; --pink: #ff8f8f; --gold: #ffd84d; }
[data-theme="newyear"] { --bg: #07060f; --glow1: #3a2a8a; --glow2: #8a2a6a; --glow3: #1a4a8a; --pink: #c4a3ff; --gold: #ffd84d; }
[data-theme="independence"] { --bg: #f7f7f4; --glow1: #ffcf9f; --glow2: #ffffff; --glow3: #b8e6b8; --pink: #ea580c; --gold: #15803d; }
[data-theme="ganesh"] { --bg: #fbeedd; --glow1: #ffb366; --glow2: #ff8c66; --glow3: #ffe0a3; --pink: #ff9f5c; --gold: #ffd84d; }
[data-theme="onam"] { --bg: #fbf7e9; --glow1: #f9d77a; --glow2: #fca5a5; --glow3: #bbe5b3; --pink: #c2410c; --gold: #15803d; }
[data-theme="lohri"] { --bg: #fff4e5; --glow1: #ffc48a; --glow2: #a8d8ff; --glow3: #ffe58a; --pink: #c2410c; --gold: #1d4ed8; }
[data-theme="valentine"] { --bg: #fff0f4; --glow1: #ffb8cc; --glow2: #ffd6e0; --glow3: #f5c2e7; --pink: #e11d48; --gold: #be185d; }
[data-theme="sangeet"] { --bg: #fdeee6; --glow1: #f7b9a0; --glow2: #f9d48a; --glow3: #e9b3c9; --pink: #ff9ec7; --gold: #ffd84d; }
[data-theme="birthday"] { --bg: #f4f6ff; --glow1: #c7d2fe; --glow2: #fbcfe8; --glow3: #bbf7d0; --pink: #4f46e5; --gold: #db2777; }
[data-theme="durga"] { --bg: #fbeaea; --glow1: #f4a3a3; --glow2: #ffd6a3; --glow3: #f7c6c6; --pink: #ff8f7e; --gold: #ffd84d; }

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hl: 255 255 255;
  --text: #f4f4f6;
  --muted: rgba(244, 244, 246, .64);
  --faint: rgba(244, 244, 246, .4);
  --on-text: #17171b;
  --well: rgba(0, 0, 0, .22);
  --well-2: rgba(0, 0, 0, .3);
  --pop: rgba(22, 22, 28, .92);
  --vignette: rgba(0, 0, 0, .55);
  --ok-text: #b8f06a;
  --warn-text: #ffd84d;
  --danger-text: #ffb3a8;
  --ink: #17171b;
  --ink-2: rgba(23, 23, 27, .68);
  --glass: rgba(26, 26, 32, .54);
  --glass-rail: rgba(16, 16, 20, .42);
  --glass-2: rgb(var(--hl) / .065);
  --glass-3: rgb(var(--hl) / .11);
  --stroke: rgb(var(--hl) / .08);
  --stroke-2: rgb(var(--hl) / .15);
  /* pastel tiles */
  --t-yellow: #ffd84d; --t-orange: #ff9f5c; --t-purple: #c4a3ff; --t-green: #b8f06a; --t-blue: #8ccfff; --t-pink: #ff9ec7;
  --green: #b8f06a; --red: #ff8a7a; --blue: #8ccfff;
  --r-xl: 30px; --r-lg: 22px; --r: 16px; --r-sm: 12px;
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  background: transparent;
  letter-spacing: -0.005em;
}
/* Light themes: dark text on milky glass. "Dark & light": light backdrop, dark panels. */
[data-mode="light"] {
  --hl: 24 22 34;
  --text: #17161d;
  --muted: rgba(23, 22, 29, .62);
  --faint: rgba(23, 22, 29, .42);
  --on-text: #ffffff;
  --glass: rgba(255, 255, 255, .56);
  --glass-rail: rgba(255, 255, 255, .34);
  --glass-2: rgba(255, 255, 255, .5);
  --glass-3: rgba(24, 22, 34, .07);
  --stroke: rgba(24, 22, 34, .09);
  --stroke-2: rgba(24, 22, 34, .16);
  --well: rgba(255, 255, 255, .6);
  --well-2: rgba(255, 255, 255, .85);
  --pop: rgba(255, 255, 255, .94);
  --vignette: rgba(80, 60, 60, .14);
  --ok-text: #2f7a12;
  --warn-text: #8a5a00;
  --danger-text: #b3261e;
}
[data-mode="mixed"] { --vignette: rgba(80, 60, 60, .12); --glass: rgba(24, 20, 28, .86); --glass-rail: rgba(12, 10, 16, .45); --pop: rgba(24, 20, 28, .96); }
[data-mode="mixed"] .frame { box-shadow: 0 40px 100px rgba(60, 40, 30, .35), inset 0 1px 0 rgba(255,255,255,.06); }
[data-mode="mixed"] .player, [data-mode="mixed"] .fit { background: var(--glass); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border-radius: 0 0 26px 26px; min-height: 100dvh; }
[data-mode="light"] .frame, [data-mode="light"] .card { box-shadow: 0 30px 80px rgba(80, 60, 70, .16), inset 0 1px 0 rgba(255,255,255,.7); }
[data-mode="light"] .qr { box-shadow: 0 0 0 1px var(--stroke); }
[data-mode="light"] body::after { opacity: .28; }

/* Atmospheric backdrop: soft blurred colour fields + film grain + vignette */
body::before {
  content: ""; position: fixed; inset: -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 46% at 18% 22%, color-mix(in srgb, var(--glow1) 85%, transparent), transparent 70%),
    radial-gradient(34% 42% at 82% 18%, color-mix(in srgb, var(--glow3) 80%, transparent), transparent 70%),
    radial-gradient(46% 50% at 70% 88%, color-mix(in srgb, var(--glow2) 75%, transparent), transparent 70%),
    radial-gradient(30% 36% at 30% 85%, color-mix(in srgb, var(--glow3) 55%, transparent), transparent 70%),
    var(--bg);
  filter: blur(40px) saturate(1.1);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, var(--vignette) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.35'/></svg>");
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.12; letter-spacing: -0.022em; font-weight: 650; }
h1 i, h2 i, .title i { font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--faint); }
a:hover { text-decoration-color: var(--text); }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ic { flex: none; display: block; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; cursor: pointer;
  background: var(--glass-3); color: var(--text);
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  transition: background .15s, transform .08s, opacity .15s; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: rgb(var(--hl) / .17); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--text); color: var(--on-text); }
.btn.primary:hover { opacity: .9; }
.btn.gold { background: var(--t-yellow); color: var(--ink); }
.btn.gold:hover { background: #ffe27a; }
.btn.green { background: var(--t-green); color: var(--ink); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--stroke-2); }
.btn.ghost:hover { background: var(--glass-2); }
.btn.danger { background: rgba(255, 138, 122, .16); color: var(--danger-text); }
.btn.danger:hover { background: rgba(255, 138, 122, .26); }
.btn.big { padding: 14px 26px; font-size: 1.02rem; }
.btn.huge { padding: 18px 34px; font-size: 1.2rem; }
.btn.sm { padding: 7px 13px; font-size: .84rem; }
.icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 14px; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 11px; }
.btn.on { background: var(--text); color: var(--on-text); }

/* ---------- Inputs ---------- */
label { display: block; font-weight: 600; margin: 16px 0 7px; font-size: .9rem; }
input[type=text], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--stroke);
  background: var(--well); outline: none; transition: border-color .15s, background .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--stroke-2); background: var(--well-2); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 220px; resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88rem; }
select option { background: var(--bg); color: var(--text); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 14px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--t-green); }
.big-input { font-size: 1.45rem !important; padding: 15px 18px !important; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Glass ---------- */
.glass, .card {
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(28px) saturate(1.35); backdrop-filter: blur(28px) saturate(1.35);
  box-shadow: inset 0 1px 0 rgb(var(--hl) / .05);
}
.card { padding: 20px; }
.soft { background: var(--glass-2); border: 1px solid var(--stroke); border-radius: var(--r-lg); }
.frame {
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--r-xl);
  -webkit-backdrop-filter: blur(36px) saturate(1.4); backdrop-filter: blur(36px) saturate(1.4);
  box-shadow: 0 40px 120px rgba(0,0,0,.45), inset 0 1px 0 rgb(var(--hl) / .06);
  overflow: hidden;
}
.frame > .frame-main .card, .frame .card { background: var(--glass-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
.rail { background: var(--glass-rail); border-right: 1px solid var(--stroke); display: flex; flex-direction: column; min-height: 0; }

.pill { padding: 5px 11px; border-radius: 99px; background: var(--glass-3); font-size: .8rem; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.eyebrow, .wiz-kicker { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.section-title { font-size: 1.05rem; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Avatars */
.av { display: inline-grid; place-items: center; border-radius: 50%; background: var(--av); color: var(--ink); font-weight: 700; flex: none; letter-spacing: 0; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }

/* ---------- Pastel tiles ---------- */
.tile {
  border-radius: var(--r-lg); padding: 16px 18px; color: var(--ink); position: relative; min-width: 0;
  display: flex; flex-direction: column; gap: 6px; overflow: hidden;
}
.tile .t-label { font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.tile .t-btn { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,0,0,.08); color: var(--ink); border: 0; cursor: pointer; }
.tile .t-big { display: flex; align-items: center; gap: 10px; font-size: 2.5rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .t-big small { font-size: 1.1rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-2); }
.tile .t-note { font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
.tile .t-note b { color: var(--ink); }
.tile.yellow { background: var(--t-yellow); } .tile.orange { background: var(--t-orange); }
.tile.purple { background: var(--t-purple); } .tile.green { background: var(--t-green); }
.tile.blue { background: var(--t-blue); } .tile.pink { background: var(--t-pink); }
.track { position: relative; height: 6px; border-radius: 99px; background: rgba(0,0,0,.12); margin-top: 6px; }
.track > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--ink); transition: width .3s; }
.track .pin { position: absolute; top: 50%; transform: translate(-50%, -50%); transition: left .5s; }
.track .pin .av { box-shadow: 0 0 0 2px var(--t-yellow); }

/* Segmented control (like Friends · Bookclub · Global) */
.seg, .tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); }
.seg button, .tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: .88rem; }
.seg button.on, .tabs button.on, .tabs .btn.on { background: rgb(var(--hl) / .16); color: var(--text); box-shadow: 0 1px 0 rgb(var(--hl) / .08) inset; }
.tabs .btn { box-shadow: none; }

#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 160%); z-index: 999;
  background: var(--pop); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--stroke-2); color: var(--text); padding: 12px 18px; border-radius: 14px;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2); max-width: calc(100% - 32px); text-align: center; font-weight: 550; box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
#toast.show { transform: translate(-50%, 0); }

/* Equaliser: uneven bars; stops dead when .off */
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; vertical-align: middle; }
.eq i { width: 3px; height: 4px; border-radius: 2px; background: currentColor; animation: eqA .62s infinite ease-in-out alternate; }
.eq i:nth-child(2) { animation: eqB .48s infinite ease-in-out alternate; }
.eq i:nth-child(3) { animation: eqC .81s infinite ease-in-out alternate; }
.eq i:nth-child(4) { animation: eqA .55s infinite ease-in-out alternate-reverse; }
.eq i:nth-child(5) { animation: eqB .7s infinite ease-in-out alternate-reverse; }
.eq i:nth-child(6) { animation: eqC .44s infinite ease-in-out alternate; }
.eq.off i { animation: none; height: 3px; opacity: .45; }
@keyframes eqA { 0% { height: 4px } 30% { height: 15px } 55% { height: 8px } 80% { height: 18px } 100% { height: 5px } }
@keyframes eqB { 0% { height: 9px } 25% { height: 4px } 50% { height: 17px } 75% { height: 10px } 100% { height: 13px } }
@keyframes eqC { 0% { height: 13px } 35% { height: 5px } 60% { height: 18px } 100% { height: 7px } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0 } 100% { transform: none; opacity: 1 } }
@keyframes rise { from { transform: translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes shake { 20%,60% { transform: translateX(-7px) } 40%,80% { transform: translateX(7px) } }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .8; } }

/* Lists */
.song-row { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--stroke); }
.song-row:last-child { border-bottom: 0; }
.song-row .n { width: 26px; color: var(--faint); font-weight: 600; font-size: .85rem; flex: none; font-variant-numeric: tabular-nums; }
.song-row .t { flex: 1; min-width: 0; }
.song-row .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.song-row .t span { font-size: .8rem; color: var(--muted); font-style: italic; }
.song-row.done, .song-row.removed { opacity: .45; }
.song-row.removed .t b { text-decoration: line-through; }
.cover { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--glass-3); flex: none; }
.cover-ph { width: 48px; height: 48px; border-radius: 10px; background: var(--glass-3); display: grid; place-items: center; flex: none; color: var(--muted); }

/* ---------- Prize spotlight (cycles one prize at a time) ---------- */
.prize-spot { text-align: center; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 22px; }
.prize-spot .ps-body { animation: rise .45s ease; }
.prize-spot .ps-cat { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: color-mix(in srgb, var(--c) 60%, var(--text)); }
.prize-spot .ps-cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.prize-spot .ps-rank { color: var(--muted); font-weight: 500; font-size: .95rem; margin-top: 2px; }
.prize-spot .ps-prize { font-weight: 650; letter-spacing: -0.04em; line-height: 1.02; margin: 8px 0 4px; font-size: clamp(2.2rem, 5vw, 4.4rem); }
.prize-spot .ps-sub { color: var(--muted); font-style: italic; }
.prize-spot .ps-dots { display: flex; gap: 5px; justify-content: center; margin-top: 12px; }
.prize-spot .ps-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--hl) / .2); }
.prize-spot .ps-dots i.on { background: var(--c); width: 18px; border-radius: 4px; }
.prize-mini { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 10px; }
.prize-mini div { background: var(--c); color: var(--ink); border-radius: var(--r); padding: 12px 14px; }
.prize-mini b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }
.prize-mini span { font-size: .85rem; color: var(--ink-2); }

/* ---------- Winners table ---------- */
.wtable { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-variant-numeric: tabular-nums; }
.wtable th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 0 14px 2px; font-weight: 700; }
.wtable td { padding: 11px 14px; color: var(--ink); }
.wtable tr.win td { background: var(--t-green); }
.wtable tr.late td { background: var(--red); }
.wtable tr.me.win td { background: #cbff85; }
.wtable tr.me b { text-decoration: underline; text-underline-offset: 3px; }
.wtable td:first-child { border-radius: 12px 0 0 12px; white-space: nowrap; font-weight: 650; }
.wtable td:last-child { border-radius: 0 12px 12px 0; text-align: right; font-weight: 700; white-space: nowrap; }
.wtable .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; box-shadow: 0 0 0 1.5px rgba(0,0,0,.5); }
.wtable .tm { white-space: nowrap; font-size: .9em; }
.wtable .tm small { color: var(--ink-2); }
.wtable .tm2 { display: none; }

/* =====================================================================
   HOME
   ===================================================================== */
.page { max-width: 980px; margin: 0 auto; padding: 32px 16px 60px; }
.home { max-width: 1000px; margin: 6vh auto 40px; padding: 0 16px; }
.home .frame { padding: 34px; }
.home-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.logo { width: 44px; height: 44px; border-radius: 14px; background: var(--t-yellow); color: var(--ink); display: grid; place-items: center; flex: none; }
.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.home h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 6px; }
.home .lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 28px; max-width: 34em; }
.choices { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.choice { gap: 12px; padding: 22px; }
.choice h2 { font-size: 1.5rem; margin: 6px 0 2px; }
.choice p { margin: 0; color: var(--ink-2); }
.choice input { background: rgba(255,255,255,.55); border-color: transparent; color: var(--ink); font-weight: 700; }
.choice input::placeholder { color: rgba(23,23,27,.4); }
.choice .btn.primary { background: var(--ink); color: #fff; }
.choice .btn.ghost { box-shadow: inset 0 0 0 1.5px rgba(23,23,27,.3); color: var(--ink); }
.choice .btn.ghost:hover { background: rgba(0,0,0,.06); }
.choice .push { margin-top: auto; }
#codeErr { color: #8a1c10; min-height: 1.2em; font-size: .85rem; font-weight: 600; }
@media (max-width: 720px) { .choices { grid-template-columns: 1fr; } .home .frame { padding: 22px; } }
.scanner { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,10,.88); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; text-align: center; }
.scanner video { width: min(88vw, 420px); aspect-ratio: 1; object-fit: cover; border-radius: 26px; box-shadow: 0 0 0 3px var(--t-yellow), 0 30px 80px rgba(0,0,0,.6); background: #000; }

/* =====================================================================
   HOST – sign in
   ===================================================================== */
.signin { max-width: 460px; margin: 12vh auto; padding: 0 16px; }
.signin .frame { padding: 32px; text-align: center; }
.signin h1 { font-size: 2.2rem; }
.g-logo { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 800; display: inline-grid; place-items: center; font-size: .85rem; }

/* =====================================================================
   HOST – wizard
   ===================================================================== */
.wiz-shell { max-width: 1320px; margin: 24px auto; padding: 0 16px; }
.wiz-frame { display: grid; grid-template-columns: 250px 1fr 300px; min-height: calc(100vh - 48px); }
.wiz-rail { padding: 22px 16px; gap: 18px; }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.rail-user b { display: block; font-size: .92rem; }
.rail-user div span { font-size: .78rem; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.rail-label { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; font-weight: 650; color: var(--muted); padding: 0 6px; margin-bottom: 6px; }
.wiz-steps { display: flex; flex-direction: column; gap: 2px; }
.wiz-steps .ws { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 12px; color: var(--muted); font-weight: 550; font-size: .92rem; }
.wiz-steps .ws .num { width: 26px; height: 26px; border-radius: 8px; background: var(--glass-3); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.wiz-steps .ws.done { color: var(--text); cursor: pointer; }
.wiz-steps .ws.done .num { background: var(--t-green); color: var(--ink); }
.wiz-steps .ws.on { background: rgb(var(--hl) / .1); color: var(--text); }
.wiz-steps .ws.on .num { background: var(--text); color: var(--on-text); }
.wiz-steps .ws.done:hover { background: var(--glass-2); }
.sp-chip { background: color-mix(in srgb, var(--ok-text) 14%, transparent); color: var(--ok-text); }
.sp-chip .btn { color: var(--text); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.rail-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--muted); background: none; border: 0; cursor: pointer; font-weight: 550; text-align: left; width: 100%; text-decoration: none; font-size: .9rem; }
.rail-link:hover { background: var(--glass-2); color: var(--text); }

.wiz-main { padding: 34px 40px 28px; display: flex; flex-direction: column; min-width: 0; }
.wiz-card { flex: 1; }
.wiz-card section { animation: rise .35s ease; max-width: 720px; }
.wiz-card h2 { font-size: 2.1rem; margin: 6px 0 8px; }
.wiz-card > section > p.muted { margin-top: 0; font-size: 1rem; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; max-width: 720px; }
.wiz-aside { padding: 26px 20px; border-left: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 12px; background: rgb(var(--hl) / .03); min-width: 0; }
.sum-card { padding: 14px 16px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--stroke); }
.sum-card .eyebrow { font-size: .68rem; }
.sum-card b { display: block; margin-top: 3px; font-weight: 600; font-size: .98rem; }
.sum-card span { color: var(--muted); font-size: .84rem; }
.sum-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sum-tiles .tile { padding: 12px 14px; border-radius: 16px; }
.sum-tiles .t-big { font-size: 1.7rem; }
@media (max-width: 1100px) { .wiz-frame { grid-template-columns: 220px 1fr; } .wiz-aside { display: none; } }
@media (max-width: 760px) {
  .wiz-frame { grid-template-columns: 1fr; }
  .wiz-rail { border-right: 0; border-bottom: 1px solid var(--stroke); }
  .wiz-steps { flex-direction: row; overflow-x: auto; }
  .wiz-steps .ws span { display: none; }
  .wiz-main { padding: 22px 18px; }
  .wiz-card h2 { font-size: 1.6rem; }
  .rail-foot { display: none; }
}
.edit-banner { background: color-mix(in srgb, var(--warn-text) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn-text) 35%, transparent); color: var(--warn-text); border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; max-width: 720px; }
.edit-banner b { color: var(--text); }
.edit-banner a { margin-left: auto; color: var(--text); }
.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.idea-chips button { background: var(--glass-2); border: 1px solid var(--stroke); border-radius: 99px; padding: 8px 14px; cursor: pointer; font-weight: 550; font-style: italic; }
.idea-chips button:hover { background: var(--glass-3); }
.games-list { display: flex; flex-direction: column; gap: 8px; }
.game-row { display: flex; gap: 4px; align-items: center; padding: 8px 8px 8px 14px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--stroke); }
.game-row .g-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; cursor: pointer; text-align: left; padding: 4px 0; }
.game-row .g-open .grow b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-row .g-open .grow span { font-size: .8rem; color: var(--muted); }
.game-row .icon-btn { background: transparent; color: var(--muted); }
.game-row .icon-btn:hover { background: var(--glass-3); color: var(--text); }
.game-row .icon-btn.danger:hover { background: rgba(255,138,122,.2); color: var(--danger-text); }

.dd { position: relative; margin-top: 12px; }
.dd-btn { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; background: var(--glass-2); border: 1px solid var(--stroke); border-radius: var(--r); padding: 10px 14px; cursor: pointer; }
.dd-btn:hover { background: var(--glass-3); }
.dd-btn::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); margin: 0 6px 0 auto; }
.dd-btn img, .dd-list img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--glass-3); flex: none; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.dd-btn b, .dd-list b { display: block; font-weight: 600; }
.dd-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--pop); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid var(--stroke-2); border-radius: var(--r); max-height: 380px; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.55); padding: 6px; }
.dd-list button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0; border-radius: 12px; padding: 8px 10px; cursor: pointer; }
.dd-list button:hover { background: var(--glass-3); }
.dd-list button.off { opacity: .4; }
.track-grid { margin-top: 12px; max-height: 360px; overflow: auto; border-radius: var(--r); padding: 4px 14px; background: var(--well); border: 1px solid var(--stroke); }
.track-grid .btn.ghost { box-shadow: none; color: var(--faint); padding: 6px 10px; }
.track-grid .btn.ghost:hover { color: var(--text); }

.stepper { display: inline-flex; align-items: center; gap: 6px; padding: 5px; border-radius: 16px; background: var(--well); border: 1px solid var(--stroke); }
.stepper button { width: 38px; height: 38px; border-radius: 11px; border: 0; background: var(--glass-3); font-size: 1.25rem; font-weight: 600; cursor: pointer; }
.stepper button:hover { background: rgb(var(--hl) / .18); }
.stepper input { width: 64px; text-align: center; font-size: 1.15rem; font-weight: 700; background: none !important; border: 0 !important; padding: 6px !important; font-variant-numeric: tabular-nums; }
.stepper.big { padding: 8px; border-radius: 22px; }
.stepper.big button { width: 54px; height: 54px; font-size: 1.6rem; border-radius: 15px; }
.stepper.big input { width: 150px; font-size: 2.6rem; letter-spacing: -0.04em; }
.quick-picks { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.quick-picks button { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--stroke); background: var(--glass-2); cursor: pointer; font-weight: 650; font-variant-numeric: tabular-nums; }
.quick-picks button.on { background: var(--t-yellow); color: var(--ink); border-color: transparent; }

.prize-cat { border-radius: var(--r-lg); padding: 16px 16px 14px; margin-bottom: 12px; background: var(--glass-2); border: 1px solid var(--stroke); }
.prize-cat header { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.prize-cat h3 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.prize-cat h3::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.prize-cat header .small { padding-left: 22px; font-style: italic; }
.prize-rank { display: grid; grid-template-columns: 46px auto 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.prize-rank .rk { font-weight: 700; color: var(--muted); font-size: .88rem; }
.prize-rank .seg button { padding: 6px 12px; }
.prize-rank .seg button.on { background: var(--c, var(--t-yellow)); color: var(--ink); }
.money { position: relative; display: block; }
.money::before { content: "₹"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 650; }
.money input { padding-left: 28px; }
@media (max-width: 560px) { .prize-rank { grid-template-columns: 40px 1fr; } .prize-rank .val { grid-column: 1 / -1; } }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.theme-card { border: 1px solid var(--stroke); border-radius: var(--r-lg); padding: 10px 10px 14px; cursor: pointer; background: var(--glass-2); text-align: left; font-weight: 600; transition: transform .15s; }
.theme-card:hover { transform: translateY(-2px); }
.theme-card.on { box-shadow: 0 0 0 2px var(--text); }
.theme-card .sw { height: 88px; border-radius: 15px; margin-bottom: 12px; display: flex; align-items: flex-end; gap: 5px; padding: 10px; }
.theme-card .sw i { width: 20px; height: 20px; border-radius: 6px; }
.theme-card b { padding-left: 4px; font-weight: 600; }

.opt { display: flex; gap: 12px; align-items: center; border: 1px solid var(--stroke); border-radius: var(--r); padding: 16px 18px; margin-top: 10px; cursor: pointer; background: var(--glass-2); font-weight: 600; flex-wrap: wrap; }
.opt:has(input:checked) { box-shadow: 0 0 0 2px var(--text); }
.opt input[type=radio] { width: 18px; height: 18px; accent-color: var(--t-green); margin: 0; }
.opt input[type=datetime-local] { width: auto; margin-left: auto; }
.summary { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.summary div { padding: 12px 14px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--stroke); }
.summary div span { color: var(--muted); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 2px; }
details summary { cursor: pointer; font-weight: 600; margin-top: 18px; color: var(--muted); }
details[open] summary { color: var(--text); }
.waiting { text-align: center; padding: 14px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--stroke); }

/* =====================================================================
   HOST – big screen
   ===================================================================== */
body.host { overflow: hidden; }
.stage { position: fixed; inset: 18px; display: grid; grid-template-columns: 260px minmax(0, 1fr) 340px; }
.st-rail { padding: 20px 16px; gap: 16px; }
.st-brand { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.st-brand .logo { width: 38px; height: 38px; border-radius: 12px; }
.st-brand b { display: block; font-size: .95rem; }
.st-brand span { display: block; font-size: .78rem; color: var(--muted); }
.side-qr { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--stroke); }
.side-qr .qr { width: 84px; height: 84px; padding: 6px; border-radius: 12px; flex: none; }
.side-qr b { display: block; font-size: 1rem; letter-spacing: .06em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.names { overflow: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; margin: 0 -6px; padding: 0 6px; }
.names div { display: flex; align-items: center; gap: 11px; padding: 6px; border-radius: 12px; font-weight: 550; font-size: .92rem; animation: rise .4s ease; }
.names div b { font-weight: 550; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.names div > span:not(.av) { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.count-badge { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 8px; background: var(--glass-3); display: inline-grid; place-items: center; font-size: .75rem; color: var(--text); font-variant-numeric: tabular-nums; }
.st-rail .rail-foot .rail-link .ic { opacity: .8; }

.st-center { padding: 26px 30px 20px; display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow: hidden; }
.hero { display: flex; gap: 28px; align-items: flex-start; }
.hero .art { position: relative; width: 172px; height: 172px; flex: none; }
.hero .art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; box-shadow: 0 22px 44px rgba(0,0,0,.55); }
.hero .art img.glow { position: absolute; inset: 0; z-index: 0; filter: blur(28px) saturate(1.7); transform: translateY(24px) scale(.9); opacity: .9; box-shadow: none; }
.hero .art.ph { border-radius: 14px; background: var(--glass-3); display: grid; place-items: center; color: var(--muted); box-shadow: 0 22px 44px rgba(0,0,0,.4); }
.hero .h-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hero .h-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.hero .h-actions .btn { background: rgb(var(--hl) / .14); }
.hero .h-actions .btn:hover { background: rgb(var(--hl) / .22); }
.hero .h-actions .btn.go { background: var(--text); color: var(--on-text); }
.hero h1 { font-size: clamp(2.2rem, 3.8vw, 3.4rem); margin: 0; letter-spacing: -0.035em; font-weight: 650; }
.hero h1 i { display: block; font-weight: 350; }
.hero .meta { color: var(--muted); font-size: .95rem; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero .meta b { color: var(--text); font-weight: 600; }
.hero .join-code { font-size: 2rem; font-weight: 650; letter-spacing: .06em; color: var(--text); font-variant-numeric: tabular-nums; }
.hero .qr { width: 172px; height: 172px; flex: none; padding: 12px; border-radius: 18px; box-shadow: 0 22px 44px rgba(0,0,0,.45); }
.qr { background: #fff; border-radius: 16px; }
.qr svg { width: 100%; height: 100%; display: block; }
.join-url { color: var(--muted); font-size: .9rem; word-break: break-all; }
.auto-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.auto-row .check { margin: 0; font-size: .9rem; }
.auto-row .ctl-input { width: 62px !important; padding: 7px 8px !important; text-align: center; }
.auto-row select { width: auto; padding: 7px 10px; font-size: .88rem; max-width: 220px; }

.tiles { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: 14px; }
.tiles.five { grid-template-columns: 1.6fr 1fr 1fr 1fr; grid-template-rows: auto auto; }
.tiles.five .tile.wide { grid-column: 1; grid-row: 1 / 3; }
.tiles .tile.wide .t-big { font-size: 3.2rem; }
.st-lyrics { padding: 14px 24px; text-align: center; display: flex; flex-direction: column; gap: 2px; border-radius: var(--r-lg); background: var(--glass-2); border: 1px solid var(--stroke); }
.st-lyrics .ly { font-size: 1.05rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.45em; }
.st-lyrics .ly.cur { font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-weight: 600; color: var(--text); letter-spacing: -0.02em; font-style: italic; }
.st-lyrics[data-mode="info"] .ly.cur { font-size: 1rem; font-weight: 500; color: var(--muted); }

.board { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.board-head h2 { font-size: 1.2rem; margin: 0; }
.board-body { flex: 1; min-height: 0; overflow: auto; border-radius: var(--r-lg); background: var(--glass-2); border: 1px solid var(--stroke); padding: 6px 14px; display: flex; flex-direction: column; }
.board-body .prize-spot { flex: 1; background: none; border: 0; }
.board-body .wtable td { padding: 9px 12px; }
.lobby-start { display: flex; align-items: center; gap: 16px; }
.lobby-start .btn.huge { box-shadow: 0 16px 40px rgba(0,0,0,.35); }

.st-main.lobby .live-only, .st-main.live .lobby-only { display: none !important; }
.feed-col { border-left: 1px solid var(--stroke); padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; min-height: 0; background: rgb(var(--hl) / .03); }
.feed-col h2 { font-size: 1.15rem; margin: 0; }
.feed { overflow: auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; padding-right: 2px; }
.fc { display: flex; gap: 12px; padding: 14px; border-radius: 20px; background: var(--glass-2); border: 1px solid var(--stroke); animation: rise .4s ease; }
.fc.reply { margin-left: 20px; }
.fc .f-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--glass-3); color: var(--text); }
.fc .f-ico img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.fc .f-body { flex: 1; min-width: 0; }
.fc .f-top { display: flex; justify-content: space-between; gap: 8px; }
.fc .f-top b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc .f-top time { font-size: .75rem; color: var(--faint); flex: none; font-variant-numeric: tabular-nums; }
.fc .f-text { color: var(--muted); font-size: .92rem; line-height: 1.35; }
.fc .f-text em { color: var(--text); font-style: italic; }
.fc .f-tag { display: inline-block; margin-top: 7px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 8px; color: var(--ink); background: var(--c, var(--t-green)); }
.fc.win { background: color-mix(in srgb, var(--t-green) 16%, transparent); border-color: color-mix(in srgb, var(--t-green) 35%, transparent); }
.fc.late { background: color-mix(in srgb, var(--red) 14%, transparent); border-color: color-mix(in srgb, var(--red) 32%, transparent); }
.fc.late .f-tag { background: var(--red); }
.feed-empty { color: var(--faint); font-size: .9rem; text-align: center; padding: 30px 10px; }

.controls.collapsed .rail-link:not(.always) { display: none; }

.sidebar { position: fixed; top: 18px; right: 18px; bottom: 18px; width: min(430px, 92vw); border-radius: var(--r-xl); transform: translateX(calc(100% + 30px)); transition: transform .3s cubic-bezier(.2,.9,.3,1); z-index: 50; display: flex; flex-direction: column; background: var(--pop); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border: 1px solid var(--stroke-2); box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.sidebar.open { transform: none; }
.sidebar header { padding: 18px 18px 12px; display: flex; gap: 8px; align-items: center; }
.sidebar header b { font-size: 1.05rem; }
.sidebar .tabs { margin: 0 18px 10px; align-self: flex-start; }
.sidebar .list { overflow: auto; flex: 1; padding: 4px 18px 20px; }
.sidebar #sbSearch { margin-bottom: 8px; }

/* Winner flash */
.flash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; text-align: center; color: var(--ink); background: var(--c); padding: 24px; animation: flashIn .5s ease; }
.flash::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 40%, rgba(255,255,255,.45), transparent 70%); pointer-events: none; }
@keyframes flashIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.flash-in { position: relative; width: min(960px, 92vw); }
.flash .cat { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1rem, 1.8vw, 1.4rem); font-weight: 750; text-transform: uppercase; letter-spacing: .12em; background: rgba(0,0,0,.1); padding: 8px 18px; border-radius: 99px; }
.flash .who { font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 650; letter-spacing: -0.045em; line-height: 1; margin: 22px 0 14px; animation: pop .6s cubic-bezier(.2,1.4,.4,1); }
.flash .prz { display: inline-block; font-size: clamp(1.6rem, 3.6vw, 3rem); font-weight: 650; font-style: italic; letter-spacing: -0.03em; }
.flash-table { margin-top: 26px; text-align: left; background: rgba(255,255,255,.35); border-radius: 22px; padding: 10px; }
.res-row { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 18px; border-radius: 14px; margin: 4px 0; font-variant-numeric: tabular-nums; font-size: clamp(1rem, 1.7vw, 1.35rem); color: var(--ink); }
.res-row .pl { font-weight: 750; }
.res-row b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-row .tm { font-size: .82em; color: var(--ink-2); }
.res-row .pz { font-weight: 700; text-align: right; }
.res-row.win { background: var(--t-green); }
.res-row.late { background: var(--red); }

.winners-full { position: fixed; inset: 18px; z-index: 90; border-radius: var(--r-xl); background: var(--pop); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border: 1px solid var(--stroke-2); display: flex; flex-direction: column; padding: 30px 38px; gap: 18px; }
.winners-full header { display: flex; align-items: center; gap: 12px; }
.winners-full h1 { margin: 0; flex: 1; font-size: 2.4rem; }
.winners-full .body { overflow: auto; flex: 1; }
.winners-full .wtable td { font-size: 1.2rem; padding: 14px 18px; }
.banner { position: fixed; top: 0; left: 0; right: 0; background: var(--red); color: var(--ink); padding: 10px; text-align: center; font-weight: 700; z-index: 60; }

/* =====================================================================
   PLAYER – phone
   ===================================================================== */
.player { max-width: 520px; margin: 0 auto; padding: 14px 14px 30px; }
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 2px 14px; }
.p-head .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-head .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-head .logo { width: 34px; height: 34px; border-radius: 11px; }
.p-me { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--glass-3); flex: none; }
.player > .card, .player .card { background: var(--glass); }
.player h2 { font-size: 1.8rem; letter-spacing: -0.03em; }

.fit { height: 100dvh; display: flex; flex-direction: column; gap: 12px; padding: 14px; max-width: 520px; margin: 0 auto; overflow: hidden; }
.wait-card { text-align: left; padding: 22px; }
.wait-card h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); margin: 6px 0 4px; letter-spacing: -0.035em; }
.wait-card h1 i { font-weight: 350; }
.wait-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--t-yellow); color: var(--ink); display: grid; place-items: center; animation: pulse 2.4s infinite ease-in-out; }
.wait-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wait-count { display: flex; align-items: baseline; gap: 6px; }
.fit .prize-spot { flex: 1; min-height: 0; padding: 14px; }
.fit .ps-prize { font-size: clamp(2rem, 11vw, 3.2rem); }
.fit .prize-mini div { padding: 10px; }
.fit .prize-mini b { font-size: .66rem; }
.fit .prize-mini span { font-size: .74rem; }

.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 12px; }
.chip { background: var(--glass-2); border: 1px solid var(--stroke); border-radius: 13px; padding: 8px 6px; text-align: center; font-size: .72rem; font-weight: 700; position: relative; overflow: hidden; }
.chip::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.chip small { display: block; font-weight: 500; color: var(--muted); font-size: .66rem; margin-top: 1px; }
.chip.mine { background: var(--c); color: var(--ink); border-color: transparent; }
.chip.mine small { color: var(--ink-2); }
.chip.gone { opacity: .42; }
.play-state { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 11px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--stroke); font-weight: 600; margin-bottom: 10px; text-align: center; font-size: .92rem; }
.play-state.ready { background: var(--t-green); color: var(--ink); border-color: transparent; }
.status-line { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin: 0 4px 10px; font-variant-numeric: tabular-nums; }
.side { margin-bottom: 14px; }
.side h3 { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 4px 8px; font-weight: 700; }
.side h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 8px; }
.side h3 > span { margin-left: auto; font-variant-numeric: tabular-nums; }
.song { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--stroke); border-radius: 18px; padding: 13px 14px; margin-bottom: 7px; cursor: pointer; transition: transform .08s, background .2s; -webkit-tap-highlight-color: transparent; color: var(--text); }
.song:active { transform: scale(.985); }
.song .t { flex: 1; min-width: 0; }
.song .t b { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.song .t span { font-size: .82rem; color: var(--muted); font-style: italic; }
.song .sel { flex: none; width: 30px; height: 30px; border-radius: 10px; border: 2px solid var(--stroke-2); display: grid; place-items: center; }
.song.on { background: var(--t-green); border-color: transparent; color: var(--ink); }
.song.on .t span { color: var(--ink-2); }
.song.on .sel { border-color: transparent; background: var(--ink); }
.song.on .sel::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid var(--t-green); border-bottom: 2.5px solid var(--t-green); transform: rotate(-45deg) translate(1px, -1px); }
.song.on .t b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.song.pending { opacity: .6; }
.song.bad { animation: shake .4s; box-shadow: 0 0 0 2px var(--red); }
.song.disabled { opacity: .5; }
.song.disabled .sel { border-style: dashed; }
.locked { background: rgba(255,138,122,.18); color: var(--danger-text); border-radius: 14px; padding: 12px; text-align: center; font-weight: 650; margin-bottom: 12px; }
.win-pop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; text-align: center; background: var(--c); color: var(--ink); padding: 26px; animation: flashIn .4s ease; }
.win-pop h1 { font-size: 2.8rem; letter-spacing: -0.04em; }
.win-pop h2 { font-weight: 400; font-style: italic; font-size: 1.6rem; }
.win-pop .prz { font-size: 2.2rem; font-weight: 650; letter-spacing: -0.03em; margin: 6px 0; }
.phone-results { margin: 6px 0 14px; padding: 16px 12px; }
.phone-results h3 { margin: 0 0 6px 4px; font-size: 1.05rem; }
.phone-results .wtable { table-layout: fixed; }
.phone-results .wtable td { font-size: .8rem; padding: 8px 7px; overflow: hidden; text-overflow: ellipsis; }
.phone-results .wtable th { padding: 0 7px 2px; font-size: .6rem; }
.phone-results .wtable th:nth-child(4), .phone-results .wtable td.tm { display: none; }
.phone-results .wtable th:nth-child(1) { width: 30%; } .phone-results .wtable th:nth-child(2) { width: 14%; } .phone-results .wtable th:nth-child(5) { width: 27%; }
.phone-results .wtable .tm2 { display: block; font-size: .68rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.phone-results .wtable td:last-child { white-space: normal; }

/* ---------- Live centre: the song is the star ---------- */
.st-center { position: relative; }
.now { display: flex; gap: 34px; align-items: center; flex: 1; min-height: 0; padding: 6px 4px; }
.now .art { position: relative; width: clamp(200px, 22vw, 320px); aspect-ratio: 1; flex: none; }
.now .art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,.55); }
.now .art img.glow { position: absolute; inset: 0; z-index: 0; filter: blur(34px) saturate(1.8); transform: translateY(30px) scale(.88); opacity: .95; box-shadow: none; }
.now .art.ph { border-radius: 20px; background: var(--glass-3); display: grid; place-items: center; color: var(--faint); box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.now .art .ph-ic { position: absolute; inset: 0; display: grid; place-items: center; }
.now .h-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.now-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.now-eyebrow .eq { color: var(--ok-text); }
.now-eyebrow #nowNum { color: var(--faint); }
.now-title { margin: 0; font-size: clamp(2.6rem, 4.6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 650; }
.now-title span { display: block; }
.now-title i { display: block; font-weight: 300; font-size: .62em; letter-spacing: -0.03em; color: var(--text); opacity: .82; margin-top: 6px; }
.now-progress { display: flex; align-items: center; gap: 14px; max-width: 640px; }
.now-progress .track { flex: 1; margin: 0; background: rgb(var(--hl) / .12); height: 5px; }
.now-progress .track > i { background: var(--text); }
.now-progress span { font-size: .85rem; color: var(--muted); min-width: 120px; }
.controls-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.controls-row .btn.big { padding: 14px 24px; }
.controls-row .check { margin: 0 0 0 6px; color: var(--muted); font-size: .9rem; }
.controls-row .ctl-input { width: 64px !important; padding: 9px 8px !important; text-align: center; }
.controls-row select { width: auto; max-width: 220px; padding: 10px 12px; font-size: .88rem; }
.tiles.mini { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tiles.mini .tile { padding: 14px 16px; border-radius: 20px; }
.tiles.mini .t-big { font-size: 2rem; }
.tiles.mini .t-big small { font-size: .95rem; }
.st-main.live .st-lyrics { flex: none; }

/* Winner panel: covers the centre only, then slides away */
.st-center .flash { position: absolute; inset: 0; z-index: 30; border-radius: 0; }
.st-center .flash-in { width: min(820px, 94%); }
.st-center .flash .who { font-size: clamp(2.6rem, 6vw, 5.6rem); }
.st-center .flash-table .res-row { font-size: clamp(.95rem, 1.35vw, 1.2rem); padding: 11px 16px; }

/* Lobby centre */
.st-main.lobby .tiles { grid-template-columns: 1.4fr 1fr 1fr; }
.st-main.lobby .board { flex: 1; min-height: 0; }
.st-main.lobby .board-body { min-height: 150px; }
@media (max-height: 820px) {
  .hero .qr { width: 140px; height: 140px; }
  .now .art { width: clamp(170px, 18vw, 240px); }
  .now-title { font-size: clamp(2.2rem, 3.8vw, 3.6rem); }
}
.side-qr b { white-space: nowrap; font-size: .95rem; letter-spacing: .04em; }
.side-qr > div:last-child { min-width: 0; }
.game-row .g-open .grow b, .game-row .g-open .grow span { display: block; }
.logo .ic { width: 55%; height: 55%; }

/* ---------- Welcome screen (before the start) ---------- */
.st-main.lobby { grid-template-columns: 260px minmax(0, 1fr); }
.st-main.lobby .feed-col { display: none; }
.banner-art { position: absolute; left: 0; right: 0; top: 0; height: 150px; pointer-events: none; z-index: 0; opacity: .95; }
.banner-art svg { width: 100%; height: 100%; display: block; }
.st-main.lobby.has-banner .st-center { padding-top: 132px; }
.st-center > * { position: relative; z-index: 1; }
.st-center > .banner-art { position: absolute; z-index: 0; }
.kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 14px; }
.kpis .tile { padding: 16px 18px; }
.kpis .t-big { font-size: 2.3rem; }
.welcome { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 34px; align-items: center; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 22px; border-radius: 30px; background: var(--glass-2); border: 1px solid var(--stroke); box-shadow: 0 30px 70px rgba(0,0,0,.28); }
.qr-card .qr { width: min(44vh, 30vw, 440px); height: min(44vh, 30vw, 440px); padding: 18px; border-radius: 22px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--pink) 55%, transparent); }
.qr-meta { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.qr-meta .join-code { font-size: 2.4rem; font-weight: 650; letter-spacing: .08em; font-variant-numeric: tabular-nums; line-height: 1; }
.qr-meta .join-url { font-size: .85rem; }
.welcome-brand { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.welcome-kicker { display: inline-flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--pink) 70%, var(--text)); }
.welcome-brand h1 { font-size: clamp(3rem, 5.6vw, 5.6rem); line-height: .98; letter-spacing: -0.05em; margin: 0; font-weight: 700; }
.welcome-brand h1 i { display: block; font-weight: 300; color: color-mix(in srgb, var(--pink) 45%, var(--text)); }
.welcome-brand .tagline { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 30em; }
.welcome-brand .prize-spot { padding: 18px 20px; border-radius: var(--r-lg); }
.welcome-brand .ps-prize { font-size: clamp(2rem, 3.6vw, 3.4rem); }
.welcome .lobby-start { margin-top: 4px; }
@media (max-height: 820px) { .qr-card .qr { width: min(38vh, 26vw); height: min(38vh, 26vw); } .welcome-brand h1 { font-size: clamp(2.6rem, 4.6vw, 4.4rem); } }

/* Phone banner strip */
.p-banner { height: 70px; margin: -14px -14px 0; pointer-events: none; }
.p-banner svg { width: 100%; height: 100%; display: block; }

/* Look step: theme cards show light/dark/mixed and festival banners */
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 430px; overflow: auto; padding: 4px; margin-left: -4px; }
.theme-card .sw { position: relative; overflow: hidden; height: 96px; }
.theme-card .sw .sw-ban { position: absolute; left: 0; right: 0; top: 0; height: 44px; }
.theme-card .sw .sw-ban svg { width: 100%; height: 100%; display: block; }
.theme-card .sw .sw-panel { position: absolute; right: 10px; bottom: 10px; width: 54px; height: 34px; border-radius: 8px; background: rgba(26,26,32,.6); border: 1px solid rgba(255,255,255,.1); }
.theme-card .sw.sw-light .sw-panel { background: rgba(255,255,255,.65); border-color: rgba(0,0,0,.06); }
.theme-card .sw i { position: relative; z-index: 1; }
.theme-card b { display: block; }
.theme-card .tc-sub { display: block; padding-left: 4px; font-size: .74rem; color: var(--muted); font-weight: 500; }
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.banner-card { border: 1px solid var(--stroke); border-radius: 16px; background: var(--glass-2); padding: 8px 8px 10px; cursor: pointer; text-align: left; }
.banner-card.on { box-shadow: 0 0 0 2px var(--text); }
.banner-card .bc-art { display: grid; place-items: center; height: 54px; border-radius: 10px; overflow: hidden; background: linear-gradient(180deg, #241a2e, #3a2a40); margin-bottom: 8px; }
.banner-card .bc-art svg { width: 100%; height: 100%; display: block; }
.banner-card b { font-size: .84rem; font-weight: 600; padding-left: 2px; }
.sum-banner { padding: 0; overflow: hidden; height: 64px; background: linear-gradient(180deg, #241a2e, #3a2a40); }
.sum-banner svg { width: 100%; height: 100%; display: block; }

/* ---------- Admin ---------- */
.admin-frame { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 48px); }
.admin-main { padding: 32px 36px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.admin-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.admin-kpis .t-big { font-size: 2.2rem; }
.admin-sec { scroll-margin-top: 20px; }
.table-wrap { overflow: auto; border-radius: var(--r-lg); background: var(--glass-2); border: 1px solid var(--stroke); }
.atable { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.atable th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.atable td { padding: 11px 14px; border-bottom: 1px solid var(--stroke); vertical-align: middle; }
.atable tr:last-child td { border-bottom: 0; }
.atable .r { text-align: right; }
.atable b { font-weight: 600; }
.pill.st-live { background: var(--t-green); color: var(--ink); }
.pill.st-ended { background: var(--glass-3); color: var(--muted); }
a.ws { text-decoration: none; }
@media (max-width: 1100px) { .admin-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .admin-frame { grid-template-columns: 1fr; } .admin-main { padding: 22px 16px; } }
.welcome-brand .prize-mini { display: none; }
.welcome { align-items: center; }
.welcome-brand { gap: 12px; }
.atable td:first-child { min-width: 240px; }
.atable td:first-child b, .atable td:first-child .small { white-space: nowrap; }
.atable td:nth-child(2) { white-space: nowrap; }

/* ---------- GanaHousie brand ---------- */
.brand-logo { display: block; width: 168px; aspect-ratio: 1191 / 291; background: url("../img/logo-dark.png") left center / contain no-repeat; flex: none; }
[data-mode="light"] .brand-logo { background-image: url("../img/logo.png"); }
.brand-logo.sm { width: 132px; }
.brand-logo.lg { width: 250px; }
.brand-logo.xl { width: min(320px, 70vw); }
.signin .brand-logo { margin: 0 auto; }
.mark { width: 34px; height: 34px; object-fit: contain; flex: none; display: block; }
.mark.xs { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; }
.rail-brand { display: block; padding: 4px 6px 0; }
.rail-brand .brand-logo { width: 176px; }
.rail-email { font-size: .78rem; color: var(--muted); padding: 0 6px; margin-top: -8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-brand .brand-logo { width: 196px; }
.home-head { margin-bottom: 30px; }
.powered { display: inline-flex; gap: 4px; align-items: center; font-size: .74rem; color: var(--faint); text-decoration: none; padding: 6px 10px; letter-spacing: .01em; }
.powered b { font-weight: 650; color: var(--muted); }
.powered:hover b { color: var(--text); }
.home-foot { text-align: center; margin-top: 14px; }
.p-foot { text-align: center; margin: 22px 0 4px; }
.fit .p-foot { flex: none; }
.p-head .brand { font-weight: 650; }
.fit { gap: 10px; }
.fit .wait-card { padding: 16px 18px; }
.fit .wait-card h1 { font-size: clamp(1.6rem, 7vw, 2rem); margin: 4px 0 2px; }
.fit .wait-icon { width: 36px; height: 36px; border-radius: 11px; }
.fit .tile { padding: 12px 14px; border-radius: 18px; }
.fit .tile .t-big { font-size: 1.9rem; }
.fit .prize-spot { padding: 10px 14px; }
.fit .ps-prize { font-size: clamp(1.8rem, 10vw, 2.8rem); margin: 4px 0 2px; }
.fit .p-foot .powered { padding: 0 8px; }
