/* Tambola number caller – standalone app page (system fonts so it looks right offline) */
:root {
  --navy: #1d2450; --navy-2: #2b3467; --navy-3: #3a4482; --red: #c52b1e; --yellow: #f8c630; --gold: #f0a21a;
  --ink: #1f2330; --muted: #5e6475; --line: #e3e5ec; --bg: #eef0f7; --card: #fff; --green: #1e7f4f;
  --called: #2b3467; --radius: 14px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
a { color: var(--navy-2); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hp { position: absolute; left: -9999px; }

/* ---------- sign-up ---------- */
.reg { min-height: 100vh; padding: 24px 16px 40px; background: radial-gradient(circle at 20% 0%, #3a4482 0, var(--navy) 60%); display: flex; justify-content: center; }
.reg-card { width: 100%; max-width: 520px; background: var(--card); border-radius: 20px; padding: 24px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); align-self: flex-start; }
.reg-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); text-decoration: none; }
.reg-brand img { border-radius: 10px; }
.reg h1 { font-size: 1.7rem; line-height: 1.2; margin: 16px 0 8px; color: var(--navy); letter-spacing: -.01em; }
.reg-lead { margin: 0 0 18px; color: var(--muted); }
.reg-form label { display: block; font-weight: 600; margin-bottom: 14px; font-size: .95rem; }
.reg-form label small { font-weight: 400; color: var(--muted); }
.reg-form input:not([type=checkbox]) { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 1.05rem; background: #fafbfe; }
.reg-form input:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(58,68,130,.15); }
.reg-form .tick { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink); font-size: .9rem; }
.reg-form .tick small { color: var(--muted); }
.reg-form .tick input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy-2); flex: none; }
.reg-err { background: #fdecea; color: #a3231a; padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; }
.fine { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.reg-feats { list-style: none; padding: 18px 0 0; margin: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: .93rem; }
.reg-feats li { padding-left: 26px; position: relative; }
.reg-feats li::before { content: ''; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 4px #fff3c4; }
.reg-shop { margin: 18px 0 0; font-size: .93rem; }

/* ---------- buttons ---------- */
.btn-main, .btn-sec, .btn-danger { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 1rem; }
.btn-main { background: var(--red); color: #fff; width: 100%; box-shadow: 0 4px 0 #8f1f16; }
.btn-main:active { transform: translateY(2px); box-shadow: 0 2px 0 #8f1f16; }
.btn-main.big { font-size: 1.25rem; padding: 16px; }
.btn-main.pause { background: var(--navy-2); box-shadow: 0 4px 0 #141a3d; }
.btn-sec { background: #e9ecf6; color: var(--navy); }
.btn-danger { background: #fdecea; color: #a3231a; }
.icon-btn { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 12px; padding: 8px 10px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; }

/* ---------- app: always exactly one screen high, nothing scrolls; the board takes the space that is left ---------- */
body.app-on { height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
.app { height: 100vh; height: 100dvh; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; }
.top { flex: none; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 4px; }
.top-title { flex: 1; min-width: 0; }
.game-title { background: none; border: 0; color: #fff; padding: 0; font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 6px; text-align: left; max-width: 100%; letter-spacing: -.01em; }
.game-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-title svg { width: 15px; height: 15px; opacity: .6; }
.is-tv .game-title svg { display: none; }
.host { margin: 1px 0 0; font-size: .8rem; color: #c9cfee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.host b { color: var(--yellow); font-weight: 700; }
.top-btns { display: flex; gap: 6px; flex: none; }
.icon-btn { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 11px; padding: 6px 8px; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; font-size: .66rem; min-width: 46px; }
.icon-btn svg { width: 20px; height: 20px; }
.install-top { background: var(--yellow); color: var(--navy); font-weight: 700; }

.stage { flex: none; background: var(--navy); color: #fff; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 4px 12px 10px; border-radius: 0 0 22px 22px; }
.prev, .count { text-align: center; }
.prev span, .count span { display: block; font-size: .68rem; color: #aeb5dc; text-transform: uppercase; letter-spacing: .06em; }
.prev b, .count b { font-size: clamp(1.3rem, 4.2dvh, 2rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.prev b { color: #dfe3f7; }
.count b { color: var(--yellow); }
.ball { --b: clamp(76px, 17dvh, 168px); width: var(--b); height: var(--b); border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle at 32% 28%, #fff7d1 0, var(--yellow) 30%, var(--gold) 70%, #c97a06 100%); box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 -8px 18px rgba(0,0,0,.15); display: grid; place-items: center; }
.ball-in { width: 70%; height: 70%; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: inset 0 2px 6px rgba(0,0,0,.12); }
.ball-in b { font-size: calc(var(--b) * .38); font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
.ball.pop { animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.6) rotate(-25deg); opacity: .3; } to { transform: none; opacity: 1; } }
.timer { grid-column: 1 / -1; height: 4px; background: rgba(255,255,255,.12); border-radius: 4px; margin: 8px 12% 0; overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: var(--yellow); transform-origin: left; }
.timer.run i { animation: drain linear forwards; }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.timer-txt { grid-column: 1 / -1; margin: 3px 0 0; text-align: center; font-size: .76rem; color: #c9cfee; font-variant-numeric: tabular-nums; line-height: 1.2; }
.recent { grid-column: 1 / -1; list-style: none; display: flex; justify-content: center; gap: 6px; margin: 8px 0 0; padding: 0; min-height: 30px; }
.recent li { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-3); color: #fff; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .82rem; }
.recent li:last-child { background: #fff; color: var(--navy); }
.won-line { grid-column: 1 / -1; margin: 6px 0 0; text-align: center; font-size: .78rem; color: #dfe3f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.won-line b { color: var(--yellow); }

.controls { flex: none; margin: -6px 10px 0; background: var(--card); border-radius: var(--radius); padding: 10px; box-shadow: 0 6px 20px rgba(29,36,80,.12); position: relative; display: grid; gap: 8px; }
.ctrl-top { display: flex; gap: 6px; align-items: stretch; }
.ctrl-top .btn-main { flex: 1; min-width: 0; padding: 10px 8px; font-size: 1.08rem; }
.delay-pick { flex: none; display: flex; flex-direction: column; justify-content: center; background: #f1f3fa; border-radius: 12px; padding: 2px 6px 4px; font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.delay-pick select { border: 0; background: none; font-weight: 700; font-size: .92rem; color: var(--navy); padding: 0; text-align: center; }
.ctrl { flex: none; width: 54px; background: #f1f3fa; border: 0; border-radius: 12px; padding: 5px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: .64rem; font-weight: 600; color: var(--navy); }
.ctrl i { display: contents; }
.ctrl svg { width: 20px; height: 20px; }
#btn-voice .ic-off, #btn-voice.off .ic-on { display: none; }
#btn-voice.off .ic-off { display: block; }
#btn-voice.off { color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: #f1f3fa; border-radius: 11px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; border-radius: 9px; padding: 6px 4px; font-weight: 600; font-size: .84rem; color: var(--muted); }
.seg button[aria-checked=true] { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.mode-hint { margin: 0; font-size: .76rem; color: var(--muted); line-height: 1.3; }

.board-wrap { flex: 1; min-height: 0; margin: 8px 10px; background: var(--card); border-radius: var(--radius); padding: 6px; box-shadow: 0 2px 10px rgba(29,36,80,.06); display: flex; align-items: center; justify-content: center; container-type: size; }
.board { display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(9, 1fr); gap: 3px; width: 100%; height: 100%; }
@supports (width: 1cqw) { .board { width: min(100cqw, 100cqh * 10 / 9 * 1.4); height: min(100cqh, 100cqw * .9); } } /* cells may be a bit wider than tall, never taller */
.cell { min-height: 0; min-width: 0; border: 0; border-radius: 7px; background: #f3f4f9; color: #9aa0b4; font-weight: 700; font-size: clamp(.72rem, min(3.6vw, 3.2dvh), 1.4rem); display: grid; place-items: center; font-variant-numeric: tabular-nums; padding: 0; transition: background .25s, color .25s; }
.cell.on { background: var(--called); color: #fff; }
.cell.last { background: var(--red); color: #fff; box-shadow: 0 0 0 3px var(--yellow); animation: glow 1.4s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 5px rgba(248,198,48,.55); } }
.mode-mark .cell:not(.on) { color: var(--navy); background: #e7eaf6; }

.bottom { flex: none; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.bottom button, .bottom a { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: .7rem; font-weight: 600; color: var(--navy); text-decoration: none; padding: 3px; }
.bottom svg { width: 20px; height: 20px; }
.bottom .shop-link { color: var(--red); }

/* shorter phones: drop the extras first, then shrink */
@media (max-height: 760px) { .mode-hint { display: none; } }
@media (max-height: 640px) { .recent, .won-line, .host { display: none; } .stage { padding-bottom: 8px; } .seg button { padding: 5px 4px; } }
@media (max-height: 540px) and (orientation: portrait) { .timer-txt { display: none; } .bottom span { display: none; } }

.toast { position: fixed; left: 50%; bottom: calc(64px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #11152f; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .9rem; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25); display: flex; gap: 12px; align-items: center; }
.toast button { background: var(--yellow); border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 700; color: var(--navy); flex: none; }

/* ---------- sheets (dialogs) ---------- */
.sheet { border: 0; padding: 0 18px 18px; border-radius: 20px 20px 0 0; width: 100%; max-width: 560px; max-height: 88vh; margin: auto auto 0; overflow: auto; background: #fff; color: var(--ink); }
.sheet.small { border-radius: 20px; margin: auto; max-width: 420px; }
.sheet::backdrop { background: rgba(10,13,35,.55); }
.sheet header { position: sticky; top: 0; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 16px 0 8px; z-index: 1; }
.sheet h2 { font-size: 1.2rem; margin: 0; color: var(--navy); }
.sheet h2 small { font-weight: 500; color: var(--muted); font-size: .9rem; }
.sheet h3 { font-size: 1rem; margin: 0 0 6px; color: var(--navy); }
.x { border: 0; background: #f1f3fa; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
.sheet-actions { display: flex; gap: 10px; margin-top: 12px; }
.sheet-actions > * { flex: 1; }
.sheet textarea, .sheet input:not([type=checkbox]):not([type=range]), .sheet select { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fafbfe; font-size: 1rem; }
.called-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.called-list li { background: #f1f3fa; border-radius: 10px; padding: 6px 4px; text-align: center; font-weight: 800; font-size: 1.2rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.called-list li small { display: block; font-size: .68rem; font-weight: 500; color: var(--muted); }
.called-list li:first-child { background: var(--red); color: #fff; }
.called-list li:first-child small { color: #ffd9d4; }
.check-out { margin-top: 14px; }
.check-out .verdict { padding: 12px 14px; border-radius: 12px; font-weight: 700; margin-bottom: 10px; }
.verdict.ok { background: #e6f4ea; color: #1e6b34; }
.verdict.no { background: #fdecea; color: #a3231a; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { min-width: 40px; text-align: center; padding: 6px 8px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chips .y { background: var(--called); color: #fff; }
.chips .n { background: #fff; color: #a3231a; box-shadow: inset 0 0 0 2px #f2b8b1; }
.prizes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.prizes li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: #f6f7fb; border-radius: 12px; padding: 8px 10px; }
.prizes li.won { background: #fff7dc; }
.prizes input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); }
.prizes .p-name { font-weight: 700; color: var(--navy); }
.prizes .p-win { margin-top: 4px; padding: 7px 10px !important; font-size: .92rem !important; }
.prizes .p-del { border: 0; background: none; color: var(--muted); padding: 4px; }
.prizes .p-del svg { width: 18px; height: 18px; }
.add-prize { display: flex; gap: 8px; margin-top: 12px; }
.add-prize .btn-sec { flex: none; }
.tv-opt { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 10px; }
.tv-opt p { margin: 0 0 10px; font-size: .92rem; color: var(--muted); }
.set-group { border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 12px; }
.set-group:first-of-type { border-top: 0; padding-top: 4px; }
.row { display: grid; gap: 6px; font-weight: 600; font-size: .93rem; }
.row.sw { grid-template-columns: 1fr auto; align-items: center; font-weight: 500; }
.row.sw input { width: 46px; height: 26px; appearance: none; -webkit-appearance: none; background: #d5d9e6; border-radius: 999px; position: relative; transition: background .2s; margin: 0; }
.row.sw input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.row.sw input:checked { background: var(--green); }
.row.sw input:checked::after { transform: translateX(20px); }
.row input[type=range] { width: 100%; accent-color: var(--navy-2); }
.warn { background: #fff4d6; color: #7a5300; border-radius: 10px; padding: 10px 12px; margin: 0; font-size: .88rem; }

/* ---------- landscape phones, tablets, laptops: controls left, board right – still one screen, no scrolling ---------- */
@media (orientation: landscape) and (min-width: 560px) {
  .app { max-width: none; display: grid; grid-template-columns: minmax(280px, 36%) 1fr; grid-template-rows: auto 1fr auto auto; }
  .top { grid-column: 1 / -1; padding: 8px 18px 4px; }
  .stage { grid-column: 1; grid-row: 2; border-radius: 0 0 24px 0; align-content: center; min-height: 0; }
  .ball { --b: clamp(64px, min(22vh, 16vw), 200px); }
  .controls { grid-column: 1; grid-row: 3; margin: 8px 10px; }
  .board-wrap { grid-column: 2; grid-row: 2 / 4; margin: 8px 12px 8px 4px; }
  .bottom { grid-column: 1 / -1; grid-row: 4; }
  .cell { font-size: clamp(.75rem, min(2.4vw, 4dvh), 2rem); }
  .mode-hint { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) { .recent, .won-line, .host, .timer-txt { display: none; } .bottom span { display: none; } .stage { padding: 2px 10px 6px; } }
/* big screen (for screen mirroring): no controls */
/* big screen (phone sideways for screen mirroring / TV): ball + call buttons on the left, board on the right, Exit at the top */
.exit-big { display: none !important; background: var(--red); }
.big-screen .exit-big { display: inline-flex !important; }
.big-screen .install-top, .big-screen [data-open="dlg-tv"], .big-screen .bottom, .big-screen .mode-hint { display: none !important; }
.big-screen .app { max-width: none; display: grid; grid-template-columns: minmax(290px, 38%) 1fr; grid-template-rows: auto 1fr auto; }
.big-screen .top { grid-column: 1 / -1; }
.big-screen .stage { grid-column: 1; grid-row: 2; border-radius: 0 0 24px 0; align-content: center; min-height: 0; }
.big-screen .controls { grid-column: 1; grid-row: 3; margin: 6px 8px calc(6px + env(safe-area-inset-bottom)); padding: 8px; gap: 6px; min-width: 0; }
.big-screen .board-wrap { grid-column: 2; grid-row: 2 / 4; margin: 8px 12px 8px 4px; }
.big-screen .ball { --b: clamp(64px, min(34vh, 22vw), 300px); }

/* TV receiver / TV window: display only, readable from the sofa */
.is-tv { background: var(--navy); }
.is-tv .app { max-width: none; display: grid; grid-template-columns: 38% 1fr; grid-template-rows: auto 1fr auto; min-height: 100vh; padding: 0; }
.is-tv .top { grid-column: 1 / -1; padding: 2.2vh 3vw 1vh; background: none; }
.is-tv .game-title { font-size: 4.2vh; }
.is-tv .host { font-size: 2.4vh; }
.is-tv .stage { grid-column: 1; grid-row: 2; border-radius: 0; background: none; align-content: center; }
.is-tv .ball { --b: min(26vw, 40vh); }
.is-tv .prev b, .is-tv .count b { font-size: 6vh; }
.is-tv .prev span, .is-tv .count span { font-size: 1.8vh; }
.is-tv .recent li { width: 6vh; height: 6vh; font-size: 2.6vh; }
.is-tv .won-line { font-size: 2.4vh; }
.is-tv .board-wrap { grid-column: 2; grid-row: 2; margin: 1vh 3vw 1vh 1vw; background: rgba(255,255,255,.06); padding: 1.4vh; }
.is-tv .board { gap: .8vh; }

.is-tv .cell { background: rgba(255,255,255,.07); color: rgba(255,255,255,.35); font-size: 4vh; border-radius: 1.2vh; }
.is-tv .cell.on { background: #fff; color: var(--navy); }
.is-tv .cell.last { background: var(--red); color: #fff; }
.is-tv .tv-foot { grid-column: 1 / -1; margin: 0; padding: 1vh 3vw 2vh; color: #aeb5dc; font-size: 2vh; text-align: right; }
.is-tv .tv-foot b { color: var(--yellow); }
.nojs { padding: 20px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .ball.pop, .cell.last { animation: none; } }

/* install notices */
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; }
.badges li { background: #fff3c4; color: #7a5300; font-weight: 700; font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
.install-card { display: flex; align-items: center; gap: 12px; background: #eef1fb; border: 1.5px dashed #9aa3d6; border-radius: 14px; padding: 12px 14px; margin: 0 0 18px; }
.install-card div { flex: 1; min-width: 0; line-height: 1.3; }
.install-card strong { display: block; color: var(--navy); font-size: .95rem; }
.install-card span { font-size: .82rem; color: var(--muted); }
.btn-install { flex: none; border: 0; background: var(--navy-2); color: #fff; font-weight: 700; border-radius: 10px; padding: 10px 14px; white-space: nowrap; }
.install-hl { animation: hl 1.2s ease-in-out 3; }
@keyframes hl { 50% { box-shadow: 0 0 0 4px rgba(248,198,48,.7); } }

.reg-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.reg-more summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.reg-more .reg-feats { border-top: 0; margin-top: 8px; padding-top: 6px; }
@media (max-height: 760px) { .reg { padding-top: 12px; } .reg-card { padding: 18px; } .reg h1 { font-size: 1.45rem; margin-top: 10px; } .reg-form label { margin-bottom: 10px; } }

/* sideways phones and big screen: compact controls so they always fit the left column and the height */
@media (orientation: landscape) and (min-width: 560px) {
  .ctrl-top { gap: 5px; }
  .ctrl-top .btn-main { font-size: 1rem; padding: 8px 6px; }
  .ctrl { width: 46px; font-size: .6rem; }
  .delay-pick { padding: 2px 4px; }
  .seg button { font-size: .78rem; padding: 5px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .controls { min-width: 0; }
}
@media (orientation: landscape) and (max-height: 430px) {
  .top { padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 2px; }
  .game-title { font-size: 1rem; }
  .icon-btn { padding: 4px 6px; min-width: 40px; }
  .icon-btn span { font-size: .6rem; }
  .stage { padding: 2px 8px 6px; }
  .ball { --b: clamp(56px, 30vh, 150px) !important; }
  .prev b, .count b { font-size: 1.3rem; }
  .ctrl-top .btn-main { padding: 6px; }
  .ctrl svg { width: 18px; height: 18px; }
  .seg button { padding: 4px 2px; }
}
@media (orientation: landscape) and (max-height: 330px) {
  .ctrl span, .delay-pick span { display: none; }
  .ctrl { width: 40px; }
  .host, .recent, .won-line, .timer-txt { display: none; }
}
@media (orientation: landscape) and (min-width: 560px) { .toast { bottom: auto; top: calc(56px + env(safe-area-inset-top)); left: auto; right: 12px; transform: none; max-width: 60%; } }
.big-screen .toast { bottom: auto; top: calc(56px + env(safe-area-inset-top)); left: auto; right: 12px; transform: none; max-width: 60%; }

/* sign-up: country code + mobile */
.reg-form > label[for=reg-phone] { margin-bottom: 6px; }
.phone-row { display: flex; gap: 8px; margin-bottom: 4px; }
.cc-wrap { position: relative; flex: none; }
.cc-btn { height: 100%; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fafbfe; font-size: .98rem; white-space: nowrap; }
.cc-btn svg { width: 16px; height: 16px; color: var(--muted); }
.cc-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(300px, calc(100vw - 48px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(29,36,80,.2); padding: 8px; }
.cc-pop input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; font-size: 1rem; margin: 0 0 6px; }
.cc-pop ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.cc-pop li { display: flex; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.cc-pop li b { margin-left: auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-pop li:hover, .cc-pop li.on { background: #eef1fb; }
.cc-pop li.none { color: var(--muted); cursor: default; }
.phone-row input { flex: 1; min-width: 0; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 1.05rem; background: #fafbfe; letter-spacing: .03em; }
.phone-row input:focus, .phone-row select:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(58,68,130,.15); }
.phone-row input.bad { border-color: #d64545; }
.phone-row input.good { border-color: var(--green); }
.field-msg { margin: 0 0 12px; font-size: .82rem; color: #a3231a; }
.field-msg.ok { color: var(--green); }

/* sharing */
.share-prizes { display: grid; gap: 8px; margin: 12px 0 4px; }
.btn-wa { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 1rem; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn-wa svg { width: 22px; height: 22px; }
.thanks { text-align: center; padding-top: 18px; }
.thanks .thanks-top { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.thanks .thanks-top b { color: var(--navy); font-size: 1rem; letter-spacing: .01em; }
.thanks h2 { margin: 8px 0 6px; font-size: 1.35rem; color: var(--navy); }
.thanks p { margin: 0 0 14px; }
.thanks button { width: 100%; margin-bottom: 8px; }
.thanks .muted { margin: 4px 0 0; }
.thanks button:focus:not(:focus-visible) { outline: none; }
.btn-donate { display: block; text-align: center; text-decoration: none; border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 1rem; background: #fff4f2; color: var(--red); border: 1.5px solid #f6c5bf; margin-bottom: 8px; }
