/* ═══════════════════════════════════════════════════════════
   BINGO ROYALE — premium casino styling
   ═══════════════════════════════════════════════════════════ */
:root {
  --navy: #050a20;
  --navy-2: #0a1440;
  --royal: #1a3bb8;
  --royal-2: #2f5bff;
  --royal-3: #6f8dff;
  --gold: #f5c542;
  --gold-2: #ffe08a;
  --gold-3: #b9860f;
  --text: #eef2ff;
  --muted: #9aa6d6;
  --glass: rgba(20, 34, 96, 0.42);
  --glass-2: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(150, 175, 255, 0.18);
  --danger: #ff4d6d;
  --ok: #2fe08a;
  --warn: #ffb020;
  --ball-b: #2f7bff;
  --ball-i: #ff3b5c;
  --ball-n: #a26bff;
  --ball-g: #1fc773;
  --ball-o: #ff9f1c;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font-display: 'Bungee', 'Impact', system-ui, sans-serif;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { background: #050a20; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(47, 91, 255, 0.35), transparent 60%),
    radial-gradient(900px 600px at 110% 10%, rgba(245, 197, 66, 0.12), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgba(26, 59, 184, 0.45), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

#bg-particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ── Screens ─────────────────────────────────────────────── */
.screen { display: none; position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom)); }
.screen.active { display: block; animation: screenIn .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.glass {
  background: linear-gradient(160deg, rgba(40, 62, 160, 0.38), rgba(12, 22, 70, 0.55));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.eyebrow { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  --bg: var(--glass-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 1px solid transparent; border-radius: 14px;
  padding: .8em 1.3em; font-weight: 800; letter-spacing: .06em;
  background: var(--bg); color: var(--text);
  transition: transform .15s ease, box-shadow .25s ease, filter .2s ease, opacity .2s;
  user-select: none; touch-action: manipulation; position: relative; overflow: hidden;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.4); }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; }
.btn:hover:not(:disabled)::after { transform: translateX(120%); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold) 45%, var(--gold-3)); color: #2a1a00; box-shadow: 0 0 0 1px rgba(255, 224, 138, .5), 0 8px 26px rgba(245, 197, 66, .38), inset 0 2px 0 rgba(255,255,255,.55); text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn-gold:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(255, 224, 138, .7), 0 10px 38px rgba(245, 197, 66, .6), inset 0 2px 0 rgba(255,255,255,.55); }
.btn-blue { background: linear-gradient(180deg, #5b82ff, var(--royal-2) 50%, var(--royal)); box-shadow: 0 0 0 1px rgba(111, 141, 255, .6), 0 8px 26px rgba(47, 91, 255, .45), inset 0 2px 0 rgba(255,255,255,.3); }
.btn-blue:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(150, 175, 255, .8), 0 10px 38px rgba(47, 91, 255, .7), inset 0 2px 0 rgba(255,255,255,.3); }
.btn-glass { background: rgba(255, 255, 255, .07); border-color: var(--glass-border); }
.btn-glass:hover:not(:disabled) { background: rgba(255, 255, 255, .12); box-shadow: 0 0 22px rgba(111, 141, 255, .25); }
.btn-glass.on { background: rgba(47, 91, 255, .35); border-color: var(--royal-3); box-shadow: 0 0 18px rgba(47, 91, 255, .55); }
.btn-ghost { background: transparent; border-color: var(--glass-border); color: var(--muted); }
.btn-danger { background: linear-gradient(180deg, #ff7a90, var(--danger) 55%, #b3203d); box-shadow: 0 6px 20px rgba(255, 77, 109, .35); }
.btn-danger-ghost { background: rgba(255, 77, 109, .08); border-color: rgba(255, 77, 109, .45); color: #ffb3c0; }
.btn-xl { font-size: 1.2rem; padding: 1em 1.4em; width: 100%; border-radius: 18px; }
.btn-lg { font-size: 1.08rem; padding: .95em 1.4em; }
.btn-sm { font-size: .82rem; padding: .5em .9em; border-radius: 10px; }
.btn-block { width: 100%; }

.icon-btn { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.07); font-size: 1.15rem; display: inline-grid; place-items: center; transition: background .2s, transform .15s; }
.icon-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.mute-btn { position: fixed; z-index: 40; right: 14px; bottom: calc(14px + var(--safe-bottom)); width: 46px; height: 46px; border-radius: 50%; backdrop-filter: blur(10px); background: rgba(10, 20, 64, .7); box-shadow: 0 6px 20px rgba(0,0,0,.4); }

/* ── Main menu ───────────────────────────────────────────── */
.menu-wrap { max-width: 460px; margin: 0 auto; min-height: calc(100dvh - 32px); display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 10px 0 40px; }
.hero { text-align: center; position: relative; padding-top: 60px; }
.hero-balls { position: absolute; inset: 0 0 auto 0; height: 80px; display: flex; justify-content: center; gap: 10px; }
.hball { --c: var(--ball-b); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; align-content: center; font-family: var(--font-display); font-size: 1.05rem; line-height: .9; color: #fff;
  background: radial-gradient(circle at 32% 28%, #fff 0 6%, color-mix(in srgb, var(--c) 55%, #fff) 14%, var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000) 100%);
  box-shadow: 0 10px 22px rgba(0,0,0,.45), inset -4px -6px 10px rgba(0,0,0,.25); animation: floaty 3.6s ease-in-out infinite; }
.hball small { font-family: var(--font); font-weight: 800; font-size: .72rem; display: block; }
.hball.i { --c: var(--ball-i); animation-delay: -.7s; } .hball.n { --c: var(--ball-n); animation-delay: -1.4s; }
.hball.g { --c: var(--ball-g); animation-delay: -2.1s; } .hball.o { --c: var(--ball-o); animation-delay: -2.8s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(8deg); } }

.logo { margin: 18px 0 6px; font-family: var(--font-display); font-weight: 400; line-height: .9; display: flex; flex-direction: column; align-items: center; }
.logo-top { font-size: clamp(3.2rem, 15vw, 5.4rem); background: linear-gradient(180deg, #fff 0%, var(--gold-2) 35%, var(--gold) 60%, var(--gold-3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #6b4a00) drop-shadow(0 0 28px rgba(245,197,66,.45)); letter-spacing: .02em; }
.logo-bottom { font-size: clamp(1.4rem, 7vw, 2.2rem); letter-spacing: .5em; margin-right: -.5em; color: var(--royal-3); text-shadow: 0 0 18px rgba(47, 91, 255, .9); }
.tagline { color: var(--muted); margin: 6px 0 0; }
.menu-buttons { display: flex; flex-direction: column; gap: 14px; }
.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-row .btn { padding: .95em .6em; font-size: .92rem; }
#btn-install { align-self: center; }
.resume-card { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: rgba(245, 197, 66, .45); animation: glowGold 2.6s ease-in-out infinite; }
.resume-text { font-weight: 700; margin-top: 2px; }
.resume-actions { display: flex; gap: 8px; }
@keyframes glowGold { 50% { box-shadow: var(--shadow), 0 0 26px rgba(245, 197, 66, .35); } }

/* ── Pages / forms ───────────────────────────────────────── */
.panel-page { max-width: 560px; margin: 0 auto; padding-bottom: 60px; }
.panel-page.wide { max-width: 1100px; }
.page-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.page-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--gold-2); letter-spacing: .03em; }
.form-card { padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field-label { font-weight: 700; color: #cfd8ff; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.field-label b { color: var(--gold); font-size: 1.15rem; }
.field-label small { color: var(--muted); font-weight: 500; }
.text-input, .code-input { width: 100%; border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(3, 8, 30, .55); padding: .9em 1em; font-size: 1.1rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.text-input:focus, .code-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245, 197, 66, .18); }
.code-input { font-family: var(--font-display); font-size: 2rem; letter-spacing: .4em; text-align: center; text-transform: uppercase; padding: .5em .4em .5em .8em; color: var(--gold-2); }
.code-input::placeholder { color: rgba(255,255,255,.15); }
.join-info { min-height: 1.4em; font-size: .92rem; color: var(--muted); }
.join-info.ok { color: var(--ok); } .join-info.bad { color: var(--danger); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--gold) var(--fill, 50%), rgba(255,255,255,.12) var(--fill, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 50%, var(--gold-3)); box-shadow: 0 0 0 4px rgba(245, 197, 66, .2), 0 4px 10px rgba(0,0,0,.4); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 50%, var(--gold-3)); cursor: pointer; }
.range-ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.range-ticks i { font-style: normal; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 600; cursor: pointer; }
.switch { -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 52px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.14); position: relative; cursor: pointer; transition: background .25s; border: 1px solid var(--glass-border); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.switch:checked { background: linear-gradient(90deg, var(--gold-3), var(--gold)); }
.switch:checked::after { transform: translateX(22px); }

.segmented { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(3, 8, 30, .5); border: 1px solid var(--glass-border); }
.segmented button { flex: 1; border: 0; background: transparent; padding: .7em .6em; border-radius: 10px; font-weight: 700; color: var(--muted); transition: all .2s; }
.segmented button.on { background: linear-gradient(180deg, #5b82ff, var(--royal)); color: #fff; box-shadow: 0 4px 14px rgba(47, 91, 255, .5); }
.segmented.small button { padding: .45em .4em; font-size: .88rem; }
.segmented.disabled { opacity: .45; pointer-events: none; }

/* Pattern picker */
.pattern-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pattern-picker.compact { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pattern-opt { border: 1px solid var(--glass-border); background: rgba(3, 8, 30, .45); border-radius: 14px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; color: var(--muted); transition: all .2s; }
.pattern-opt:hover:not(:disabled) { border-color: var(--royal-3); color: var(--text); }
.pattern-opt.on { border-color: var(--gold); color: var(--gold-2); background: rgba(245, 197, 66, .1); box-shadow: 0 0 18px rgba(245, 197, 66, .25); }
.pattern-opt:disabled { opacity: .5; cursor: not-allowed; }
.compact .pattern-opt { padding: 7px 4px 6px; font-size: .68rem; }
.mini-pattern { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; width: 46px; height: 46px; }
.compact .mini-pattern { width: 34px; height: 34px; }
.mini-pattern i { border-radius: 2px; background: rgba(255,255,255,.12); }
.mini-pattern i.on { background: var(--gold); box-shadow: 0 0 6px rgba(245, 197, 66, .8); }
.mini-pattern i.alt { background: rgba(245, 197, 66, .35); }

/* ── How to play ─────────────────────────────────────────── */
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.howto-card { padding: 20px; position: relative; }
.howto-card h3 { margin: 6px 0 8px; color: var(--gold-2); }
.howto-card p { margin: 0; color: #c9d3ff; line-height: 1.5; }
.howto-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 45%, var(--gold-3)); color: #3b2600; box-shadow: 0 4px 14px rgba(245, 197, 66, .45); }
.howto-patterns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.howto-patterns div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); text-align: center; }

/* ── Game top bar ────────────────────────────────────────── */
.game-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.room-chip, .me-chip, .status-pill, .conn-pill, .host-badge { display: inline-flex; align-items: center; gap: 8px; padding: .5em .9em; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--glass-border); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.room-chip b { font-family: var(--font-display); font-weight: 400; color: var(--gold-2); letter-spacing: .12em; }
.me-chip { font-size: .95rem; }
.me-chip .me-score { color: var(--muted); font-weight: 500; }
.me-chip .me-score b { color: var(--gold); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--royal-2); flex: 0 0 auto; }
.status-pill { margin-left: auto; color: var(--gold-2); border-color: rgba(245, 197, 66, .35); }
.status-pill.live { color: #b8ffd9; border-color: rgba(47, 224, 138, .5); background: rgba(47, 224, 138, .1); }
.status-pill.paused { color: #ffe1a6; border-color: rgba(255, 176, 32, .5); background: rgba(255, 176, 32, .12); }
.conn-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.conn-pill.online i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.conn-pill.offline i { background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.host-badge { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #3a2700; border: 0; font-weight: 800; letter-spacing: .08em; }
.room-code-big { display: flex; flex-direction: column; line-height: 1.05; padding: 0 6px; }
.room-code-big b { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; letter-spacing: .14em; color: var(--gold-2); text-shadow: 0 0 18px rgba(245, 197, 66, .45); }
.share-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Panels ──────────────────────────────────────────────── */
.panel { padding: 16px; }
.panel-title { margin: 0 0 12px; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.count-badge { font-size: .85rem; color: var(--text); background: rgba(255,255,255,.08); padding: .15em .6em; border-radius: 99px; }
.collapsible > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .92rem; color: var(--gold-2); }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible[open] > summary { margin-bottom: 12px; }
.collapsible .chev { font-style: normal; transition: transform .25s; }
.collapsible:not([open]) .chev { transform: rotate(-90deg); }
.side-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ── Layout: player game ─────────────────────────────────── */
.game-grid { display: grid; grid-template-columns: minmax(260px, 310px) minmax(0, 1fr) minmax(260px, 320px); gap: 16px; align-items: start; max-width: 1400px; margin: 0 auto; }
.card-zone { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }
.pattern-banner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; }
.pattern-banner b { color: var(--gold-2); font-size: 1.05rem; }
.pattern-banner .mini-pattern { width: 36px; height: 36px; }

/* ── Ball machine ────────────────────────────────────────── */
.machine-panel, .host-machine { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.machine-wrap { position: relative; width: 100%; max-width: 280px; aspect-ratio: 1; }
.ball-machine { width: 100%; height: 100%; display: block; }
.chute { position: absolute; left: 50%; bottom: -6px; width: 54px; height: 20px; transform: translateX(-50%); border-radius: 0 0 14px 14px; background: linear-gradient(180deg, #c99a2a, #6e4c06); box-shadow: inset 0 3px 6px rgba(0,0,0,.45), 0 4px 10px rgba(0,0,0,.4); }
.current-ball-wrap { display: flex; align-items: center; gap: 16px; width: 100%; justify-content: center; }
.current-meta { display: flex; flex-direction: column; gap: 6px; }
.remaining { color: var(--muted); font-size: .92rem; }
.remaining b { color: var(--text); }

.ball { --c: var(--ball-b); border-radius: 50%; display: inline-grid; place-items: center; align-content: center; color: #12152b; font-weight: 800; position: relative;
  background: radial-gradient(circle at 32% 26%, #fff 0 5%, color-mix(in srgb, var(--c) 45%, #fff) 13%, var(--c) 46%, color-mix(in srgb, var(--c) 50%, #000) 100%);
  box-shadow: inset -3px -5px 10px rgba(0,0,0,.28), 0 4px 10px rgba(0,0,0,.35); }
.ball::before { content: ''; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #e8ecf8); box-shadow: inset 0 -2px 4px rgba(0,0,0,.18); }
.ball > * { position: relative; z-index: 1; }
.ball.B { --c: var(--ball-b); } .ball.I { --c: var(--ball-i); } .ball.N { --c: var(--ball-n); } .ball.G { --c: var(--ball-g); } .ball.O { --c: var(--ball-o); }

.current-ball { --c: var(--ball-b); width: 116px; height: 116px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; align-content: center; position: relative; color: #12152b;
  background: radial-gradient(circle at 32% 26%, #fff 0 5%, color-mix(in srgb, var(--c) 45%, #fff) 13%, var(--c) 46%, color-mix(in srgb, var(--c) 45%, #000) 100%);
  box-shadow: inset -6px -10px 18px rgba(0,0,0,.3), 0 0 0 4px rgba(255,255,255,.06), 0 0 40px color-mix(in srgb, var(--c) 65%, transparent); }
.current-ball::before { content: ''; position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #e3e8f6); box-shadow: inset 0 -3px 6px rgba(0,0,0,.2); }
.current-ball > span { position: relative; z-index: 1; line-height: .95; text-align: center; }
.cb-letter { font-family: var(--font-display); font-size: 1.15rem; color: color-mix(in srgb, var(--c) 80%, #000); }
.cb-num { font-family: var(--font-display); font-size: 2.3rem; }
.current-ball.empty { --c: #4a5486; }
.current-ball.empty .cb-num { color: #8890b8; }
.current-ball.B { --c: var(--ball-b); } .current-ball.I { --c: var(--ball-i); } .current-ball.N { --c: var(--ball-n); } .current-ball.G { --c: var(--ball-g); } .current-ball.O { --c: var(--ball-o); }
.current-ball.pop { animation: ballPop .9s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes ballPop {
  0% { transform: translateY(-80px) scale(.2) rotate(-200deg); opacity: 0; }
  55% { transform: translateY(6px) scale(1.12) rotate(10deg); opacity: 1; }
  75% { transform: translateY(-4px) scale(.96) rotate(-4deg); }
  100% { transform: none; }
}

.countdown { position: relative; width: 52px; height: 52px; }
.countdown svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cd-track { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 3; }
.cd-bar { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 0; filter: drop-shadow(0 0 4px rgba(245,197,66,.8)); transition: stroke-dashoffset .25s linear; }
.cd-text { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1rem; }
.countdown.urgent .cd-bar { stroke: var(--danger); filter: drop-shadow(0 0 4px rgba(255,77,109,.9)); }
.countdown.urgent .cd-text { animation: tickPulse .5s ease; }
@keyframes tickPulse { 50% { transform: scale(1.35); color: var(--danger); } }

.recent-strip { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 36px; }
.recent-strip .ball { width: 34px; height: 34px; font-size: .78rem; }
.recent-strip .ball:first-child { animation: slideIn .5s ease; }
@keyframes slideIn { from { transform: translateX(-20px) scale(.4); opacity: 0; } }

/* ── Bingo card ──────────────────────────────────────────── */
.bingo-card { --cell: clamp(52px, 11.5vw, 92px); display: grid; grid-template-columns: repeat(5, var(--cell)); gap: 8px; padding: 14px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 224, 138, .95), rgba(185, 134, 15, .95)); box-shadow: 0 0 0 2px rgba(255,255,255,.25) inset, 0 20px 60px rgba(0,0,0,.55), 0 0 50px rgba(245, 197, 66, .25); position: relative; }
.bingo-card::before { content: ''; position: absolute; inset: 6px; border-radius: 17px; background: linear-gradient(180deg, #0c1a55, #071036); z-index: 0; }
.bingo-card > * { position: relative; z-index: 1; }
.card-head { height: calc(var(--cell) * .72); display: grid; place-items: center; font-family: var(--font-display); font-size: calc(var(--cell) * .48); color: #fff; border-radius: 12px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.card-head.B { background: linear-gradient(180deg, #5c98ff, var(--ball-b)); } .card-head.I { background: linear-gradient(180deg, #ff6b85, var(--ball-i)); }
.card-head.N { background: linear-gradient(180deg, #c09bff, var(--ball-n)); } .card-head.G { background: linear-gradient(180deg, #52e397, var(--ball-g)); }
.card-head.O { background: linear-gradient(180deg, #ffc061, var(--ball-o)); }
.cell { width: var(--cell); height: var(--cell); border-radius: 14px; border: 0; position: relative; display: grid; place-items: center; font-weight: 800; font-size: calc(var(--cell) * .38); color: #18204a;
  background: linear-gradient(180deg, #ffffff, #dde4ff); box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 3px 8px rgba(0,0,0,.3); transition: transform .12s ease, box-shadow .2s; touch-action: manipulation; overflow: hidden; }
.cell:hover { transform: translateY(-2px); }
.cell:active { transform: scale(.94); }
.cell span { position: relative; z-index: 2; }
.cell::after { content: ''; position: absolute; inset: 9%; border-radius: 50%; z-index: 1; transform: scale(0); opacity: 0;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.75), rgba(255, 224, 138, .95) 25%, rgba(245, 197, 66, .92) 55%, rgba(185, 134, 15, .95)); transition: transform .35s cubic-bezier(.2, 1.6, .4, 1), opacity .2s; }
.cell.marked { color: #2a1800; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 0 0 2px rgba(245, 197, 66, .9), 0 0 22px rgba(245, 197, 66, .75); }
.cell.marked::after { transform: scale(1); opacity: 1; }
.cell.marked.just { animation: daub .6s ease; }
@keyframes daub { 0% { box-shadow: 0 0 0 0 rgba(245,197,66,.9); } 100% { box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 0 0 2px rgba(245,197,66,.9), 0 0 22px rgba(245,197,66,.75), 0 0 0 26px rgba(245,197,66,0); } }
.cell.free { background: linear-gradient(160deg, var(--gold-2), var(--gold) 50%, var(--gold-3)); color: #3b2600; font-size: calc(var(--cell) * .17); letter-spacing: .05em; cursor: default; flex-direction: column; }
.cell.free::after { display: none; }
.cell.free .star { font-size: calc(var(--cell) * .34); line-height: 1; }
.cell.callable:not(.marked) { animation: callable 1.4s ease-in-out infinite; }
@keyframes callable { 50% { box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 0 0 2px rgba(111,141,255,.95), 0 0 18px rgba(111,141,255,.85); } }
.cell.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.cell.winline { animation: winCell 1s ease-in-out infinite alternate; }
@keyframes winCell { to { box-shadow: 0 0 0 3px #fff, 0 0 30px rgba(255, 255, 255, .9), 0 0 50px rgba(245,197,66,.9); } }
.bingo-card.preview { --cell: clamp(40px, 9vw, 60px); gap: 6px; padding: 10px; }
.bingo-card.preview .cell { cursor: default; border-radius: 10px; }
.bingo-card.preview .cell:hover { transform: none; }
.bingo-card.disabled .cell:not(.free) { cursor: default; }

/* BINGO button */
.bingo-btn { font-family: var(--font-display); font-size: clamp(2rem, 7vw, 3rem); letter-spacing: .06em; border: 0; border-radius: 999px; padding: .32em 1.4em .38em; color: #3a2400;
  background: linear-gradient(180deg, #fff3c4, var(--gold-2) 25%, var(--gold) 55%, var(--gold-3)); box-shadow: 0 8px 0 #7a5600, 0 18px 40px rgba(0,0,0,.5), 0 0 40px rgba(245,197,66,.55), inset 0 3px 0 rgba(255,255,255,.7);
  text-shadow: 0 2px 0 rgba(255,255,255,.5); transition: transform .12s, box-shadow .12s, filter .2s; animation: bingoPulse 2.2s ease-in-out infinite; position: relative; overflow: hidden; touch-action: manipulation; }
.bingo-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.6) 50%, transparent 65%); animation: sheen 3s ease-in-out infinite; }
.bingo-btn:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 #7a5600, 0 8px 20px rgba(0,0,0,.5), 0 0 30px rgba(245,197,66,.55); }
.bingo-btn:disabled { filter: grayscale(.8) brightness(.6); animation: none; cursor: not-allowed; }
.bingo-btn:disabled::after { display: none; }
.bingo-btn.ready { animation: bingoReady .8s ease-in-out infinite alternate; }
@keyframes bingoPulse { 50% { transform: scale(1.03); box-shadow: 0 8px 0 #7a5600, 0 18px 40px rgba(0,0,0,.5), 0 0 60px rgba(245,197,66,.75), inset 0 3px 0 rgba(255,255,255,.7); } }
@keyframes bingoReady { to { transform: scale(1.08) rotate(-1deg); box-shadow: 0 8px 0 #7a5600, 0 18px 40px rgba(0,0,0,.5), 0 0 90px rgba(255,224,138,1), inset 0 3px 0 rgba(255,255,255,.7); } }
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.won-banner { font-weight: 800; color: var(--gold-2); background: rgba(245,197,66,.12); border: 1px solid rgba(245,197,66,.45); padding: .6em 1.2em; border-radius: 999px; animation: screenIn .5s; text-align: center; }

/* ── Called numbers board ────────────────────────────────── */
.called-board { display: grid; grid-template-columns: 26px repeat(15, 1fr); gap: 3px; }
.called-board .row-head { font-family: var(--font-display); font-size: .8rem; display: grid; place-items: center; border-radius: 6px; color: #fff; }
.called-board .row-head.B { background: var(--ball-b); } .called-board .row-head.I { background: var(--ball-i); } .called-board .row-head.N { background: var(--ball-n); } .called-board .row-head.G { background: var(--ball-g); } .called-board .row-head.O { background: var(--ball-o); }
.called-board .num { aspect-ratio: 1; display: grid; place-items: center; font-size: .68rem; font-weight: 700; border-radius: 50%; color: rgba(255,255,255,.28); background: rgba(255,255,255,.04); transition: all .35s; }
.called-board .num.on { color: #111633; background: radial-gradient(circle at 35% 30%, #fff, var(--gold-2) 40%, var(--gold)); box-shadow: 0 0 8px rgba(245, 197, 66, .6); }
.called-board .num.latest { animation: latestPulse 1.1s ease-in-out infinite; background: radial-gradient(circle at 35% 30%, #fff, #a9bcff 40%, var(--royal-2)); color: #fff; }
@keyframes latestPulse { 50% { transform: scale(1.3); box-shadow: 0 0 14px rgba(111,141,255,1); } }
.host-center .called-board .num { font-size: .78rem; }

/* ── Leaderboard ─────────────────────────────────────────── */
.leaderboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.leaderboard li { display: grid; grid-template-columns: 28px 30px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid transparent; transition: transform .5s cubic-bezier(.2, .9, .3, 1.1), background .3s; }
.leaderboard li.me { border-color: rgba(111, 141, 255, .6); background: rgba(47, 91, 255, .18); }
.leaderboard .rank { font-family: var(--font-display); font-size: .9rem; color: var(--muted); text-align: center; }
.leaderboard li:nth-child(1) .rank { color: var(--gold); } .leaderboard li:nth-child(2) .rank { color: #d8dff5; } .leaderboard li:nth-child(3) .rank { color: #e0a36b; }
.leaderboard .lb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard .lb-name small { color: var(--gold-2); font-weight: 700; margin-left: 4px; }
.leaderboard .lb-score { font-weight: 800; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.leaderboard .lb-score.bump { animation: bump .7s ease; }
@keyframes bump { 40% { transform: scale(1.5); color: #fff; text-shadow: 0 0 12px var(--gold); } }
.leaderboard .off { opacity: .5; }
.leaderboard.big li { padding: 12px 14px; font-size: 1.05rem; }

/* ── Player lists ────────────────────────────────────────── */
.player-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.player-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); animation: screenIn .4s ease; }
.player-list .pl-name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-list .pl-meta { color: var(--muted); font-size: .8rem; }
.player-list .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex: 0 0 auto; }
.player-list .dot.off { background: #737a9c; box-shadow: none; }
.player-list .kick { border: 1px solid rgba(255,77,109,.4); background: rgba(255,77,109,.1); color: #ffb3c0; border-radius: 8px; padding: .3em .6em; font-size: .78rem; font-weight: 700; }
.player-list .kick:hover { background: rgba(255,77,109,.3); }
.player-list .you-tag { font-size: .7rem; padding: .1em .5em; border-radius: 99px; background: var(--royal-2); color: #fff; font-weight: 700; }
.player-list .win-tag { font-size: .72rem; padding: .1em .55em; border-radius: 99px; background: var(--gold); color: #3a2400; font-weight: 800; }
.player-list .empty { color: var(--muted); justify-content: center; font-style: italic; background: transparent; border: 1px dashed var(--glass-border); }

/* ── Lobby ───────────────────────────────────────────────── */
.lobby-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.lobby-main { padding: 22px; }
.lobby-title { margin: 6px 0 4px; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 4vw, 1.9rem); color: var(--gold-2); }
.lobby-sub { color: var(--muted); margin: 0 0 14px; }
.lobby-pattern { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--muted); }
.lobby-pattern b { color: var(--text); }
.lobby-pattern .mini-pattern { width: 32px; height: 32px; }
.lobby-card { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lobby-score { color: var(--muted); } .lobby-score b { color: var(--gold); font-size: 1.2rem; }
.waiting-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.waiting-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); animation: dots 1.2s ease-in-out infinite; }
.waiting-dots i:nth-child(2) { animation-delay: .15s; background: var(--royal-3); } .waiting-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-10px); opacity: 1; } }

/* ── Host dashboard ──────────────────────────────────────── */
.host-top { gap: 12px; }
.host-grid { display: grid; grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(280px, 340px); gap: 16px; align-items: start; max-width: 1600px; margin: 0 auto; }
.host-controls { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.ctrl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ctrl-grid .ctrl { font-size: .78rem; padding: .85em .5em; letter-spacing: .03em; }
.ctrl-grid #hc-start, .ctrl-grid #hc-draw, .ctrl-grid #hc-auto, .ctrl-grid #hc-interval { grid-column: 1 / -1; }
.ctrl-grid #hc-draw { font-size: 1rem; padding: 1em; }
.ctrl-grid #hc-start { font-size: 1rem; padding: 1em; }
#hc-auto b { color: var(--muted); } #hc-auto.on b { color: var(--gold-2); }
.host-center { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.host-machine { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.host-machine .machine-wrap { max-width: 230px; }
.host-machine .current-ball-wrap { width: auto; flex-direction: column; }
.host-machine .current-meta { align-items: center; text-align: center; }
.host-machine .recent-strip { width: 100%; }

.observer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.obs-card { background: rgba(3, 8, 30, .5); border: 1px solid var(--glass-border); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; transition: border-color .3s, box-shadow .3s; }
.obs-card.won { border-color: var(--gold); box-shadow: 0 0 20px rgba(245, 197, 66, .35); }
.obs-card.offline { opacity: .6; }
.obs-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; }
.obs-head .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obs-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.obs-head .dot.off { background: #737a9c; }
.obs-head .mk { color: var(--muted); font-size: .75rem; }
.obs-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.obs-grid .h { font-family: var(--font-display); font-size: .62rem; text-align: center; color: var(--muted); }
.obs-grid .c { aspect-ratio: 1; display: grid; place-items: center; font-size: .7rem; font-weight: 700; border-radius: 5px; background: rgba(255,255,255,.08); color: #c9d3ff; }
.obs-grid .c.called { background: rgba(111, 141, 255, .28); color: #fff; }
.obs-grid .c.m { background: var(--gold); color: #2a1800; box-shadow: 0 0 6px rgba(245,197,66,.7); }
.obs-grid .c.free { background: var(--gold-3); color: #2a1800; font-size: .5rem; }
.obs-grid .c.wl { outline: 2px solid #fff; }
.obs-legend { display: flex; gap: 12px; color: var(--muted); font-size: .78rem; margin-bottom: 10px; flex-wrap: wrap; }
.obs-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }

.claims-log, .history-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.claims-log li, .history-log li { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: .86rem; display: flex; gap: 8px; align-items: center; animation: screenIn .35s; }
.claims-log .ok { color: var(--ok); font-weight: 800; } .claims-log .bad { color: var(--danger); font-weight: 800; }
.claims-log .t { margin-left: auto; color: var(--muted); font-size: .75rem; }
.claims-log .empty, .history-log .empty { color: var(--muted); font-style: italic; justify-content: center; }
.history-log li { flex-direction: column; align-items: flex-start; }
.history-log b { color: var(--gold-2); }

/* ── Overlays ────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.countdown-overlay { background: rgba(3, 6, 22, .55); backdrop-filter: blur(4px); pointer-events: none; }
.cd-big { font-family: var(--font-display); font-size: clamp(6rem, 30vw, 13rem); color: var(--gold-2); text-shadow: 0 0 40px rgba(245,197,66,.9), 0 8px 0 #6b4a00; }
.cd-big.go { animation: cdIn .8s cubic-bezier(.2,1.5,.4,1); }
@keyframes cdIn { from { transform: scale(2.6); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); } }

.notyet-overlay { pointer-events: none; }
.notyet-box { font-family: var(--font-display); text-align: center; font-size: clamp(2.6rem, 11vw, 5rem); line-height: 1; color: #fff; padding: .4em .8em; border-radius: 28px;
  background: linear-gradient(180deg, #ff7a90, var(--danger) 60%, #a01530); box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 20px 60px rgba(0,0,0,.55), 0 0 80px rgba(255,77,109,.6); text-shadow: 0 4px 0 rgba(0,0,0,.3);
  animation: notyet 1.8s ease forwards; }
@keyframes notyet { 0% { transform: scale(.3) rotate(-10deg); opacity: 0; } 15% { transform: scale(1.1) rotate(3deg); opacity: 1; } 22%, 34% { transform: rotate(-3deg); } 28%, 40% { transform: rotate(3deg); } 46% { transform: none; } 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.9) translateY(20px); } }

.victory-overlay { background: radial-gradient(circle at 50% 40%, rgba(47, 91, 255, .45), rgba(3, 6, 22, .88) 70%); backdrop-filter: blur(6px); }
#fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.victory-box { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: victoryIn .9s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes victoryIn { from { transform: scale(.3) translateY(60px); opacity: 0; } }
.victory-crown { font-size: 4rem; animation: floaty 2.4s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(245,197,66,.9)); }
.victory-title { font-family: var(--font-display); font-size: clamp(4rem, 18vw, 8rem); line-height: .9; background: linear-gradient(180deg, #fff, var(--gold-2) 35%, var(--gold) 60%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #6b4a00) drop-shadow(0 0 40px rgba(245,197,66,.7)); }
.victory-name { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 800; }
.victory-sub { color: var(--gold-2); font-weight: 700; font-size: 1.15rem; margin-bottom: 10px; }

.summary-overlay, .modal-overlay { background: rgba(3, 6, 22, .7); backdrop-filter: blur(6px); }
.summary-box { width: min(480px, 100%); padding: 24px; display: flex; flex-direction: column; gap: 12px; animation: victoryIn .6s cubic-bezier(.2, 1.3, .4, 1); max-height: 90vh; overflow: auto; }
.summary-title { font-family: var(--font-display); font-size: 1.8rem; text-align: center; color: var(--gold-2); }
.summary-reason { text-align: center; color: var(--muted); }
.summary-actions { display: flex; justify-content: center; margin-top: 6px; }
.modal-box { width: min(420px, 100%); padding: 22px; animation: victoryIn .35s ease; }
.modal-title { margin: 0 0 8px; color: var(--gold-2); }
.modal-text { color: #cbd5ff; margin: 0 0 18px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Toasts */
.toasts { position: fixed; z-index: 80; top: calc(12px + var(--safe-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { pointer-events: auto; padding: .7em 1.1em; border-radius: 14px; font-weight: 600; background: rgba(12, 22, 70, .92); border: 1px solid var(--glass-border); box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toastIn .35s cubic-bezier(.2,1.4,.4,1); backdrop-filter: blur(10px); text-align: center; }
.toast.error { border-color: rgba(255, 77, 109, .6); color: #ffd0d8; }
.toast.warn { border-color: rgba(255, 176, 32, .6); color: #ffe5b0; }
.toast.ok { border-color: rgba(47, 224, 138, .6); color: #c6ffe1; }
.toast.gold { border-color: var(--gold); color: var(--gold-2); }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { transform: translateY(-20px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-14px); opacity: 0; } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1250px) {
  .host-grid { grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); }
  .host-grid > .side-col { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 1100px) {
  .game-grid { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
  .game-grid > .side-col { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .screen { padding-left: 10px; padding-right: 10px; }
  .game-top { gap: 6px; }
  .game-top .room-chip { display: none; }
  .game-top .conn-pill span { display: none; }
  .game-top .conn-pill { padding: .65em; }
  #screen-game .game-top .status-pill { margin-left: auto; }
  .game-grid { grid-template-columns: 1fr; gap: 12px; }
  .game-grid > .side-col { grid-template-columns: 1fr; }
  .machine-panel { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 10px; gap: 10px; }
  .machine-panel .machine-wrap { width: 118px; flex: 0 0 auto; }
  .machine-panel .chute { display: none; }
  .machine-panel .current-ball-wrap { width: auto; gap: 10px; }
  .machine-panel .current-ball { width: 92px; height: 92px; }
  .machine-panel .cb-num { font-size: 1.8rem; }
  .machine-panel .recent-strip { width: 100%; }
  .recent-strip .ball { width: 28px; height: 28px; font-size: .68rem; }
  .card-zone { gap: 12px; }
  .bingo-card { --cell: min(16vw, 72px); gap: 5px; padding: 10px; }
  .cell { border-radius: 10px; }
  .bingo-btn { position: sticky; bottom: calc(10px + var(--safe-bottom)); z-index: 20; width: min(92vw, 420px); padding: .3em 0 .36em; }
  .host-grid { grid-template-columns: 1fr; }
  .host-controls { position: static; }
  .host-top .room-code-big b { font-size: 1.35rem; }
  .host-top .status-pill { margin-left: 0; }
  .lobby-grid { grid-template-columns: 1fr; }
  .lobby-card { order: -1; }
  .pattern-picker { grid-template-columns: repeat(3, 1fr); }
  .called-board { gap: 2px; grid-template-columns: 22px repeat(15, 1fr); }
  .called-board .num { font-size: .55rem; }
  .mute-btn { position: absolute; bottom: auto; top: calc(16px + var(--safe-top)); right: 10px; width: 42px; height: 42px; }
  #screen-game .game-top, #screen-host .game-top, #screen-lobby .game-top { padding-right: 46px; }
  .menu-wrap { padding-top: 30px; }
}
@media (max-width: 380px) {
  .hball { width: 44px; height: 44px; font-size: .9rem; }
  .me-chip .me-score { display: none; }
}

/* Reduced motion */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) { .hball, .bingo-btn, .bingo-btn::after { animation: none; } }
