/* ============================================================
   Ludo King — Stylesheet
   ============================================================ */

:root {
    --bg: #10131c;
    --bg-soft: #171b28;
    --card: #1c2130;
    --border: #2b3146;
    --text: #eef0f7;
    --text-dim: #9aa0b4;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.4);
    --font: "Hind Siliguri", "Segoe UI", sans-serif;

    --c-red: #ef4444;
    --c-red-soft: #7a2323;
    --c-green: #22c55e;
    --c-green-soft: #1c5c39;
    --c-yellow: #eab308;
    --c-yellow-soft: #6e5a10;
    --c-blue: #3b82f6;
    --c-blue-soft: #1e3f7a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: radial-gradient(circle at 50% -10%, #232a44 0%, var(--bg) 55%);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
}
.hidden { display: none !important; }

.back-pill {
    position: fixed; top: 14px; left: 14px; z-index: 80;
    font-size: 13px; font-weight: 600; color: var(--text);
    background: rgba(0,0,0,0.4); padding: 6px 14px; border-radius: 999px;
    text-decoration: none;
}
.sound-toggle {
    position: fixed; top: 14px; right: 14px; z-index: 80;
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: rgba(0,0,0,0.4); color: var(--text); font-size: 15px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s;
}
.sound-toggle:active { transform: scale(0.9); }

/* ---------- Lobby ---------- */
.lobby-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.lobby-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    text-align: center;
}
.lobby-dice-row { font-size: 1.6rem; margin-bottom: 10px; letter-spacing: 6px; }
.lobby-title { font-size: 1.9rem; font-weight: 800; margin-bottom: 6px; }
.lobby-sub { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 24px; }

.tabs { display: flex; background: var(--bg-soft); border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.tab-btn { flex: 1; padding: 9px; border: none; background: none; color: var(--text-dim); border-radius: 999px; font-weight: 700; font-family: inherit; cursor: pointer; }
.tab-btn.active { background: #4f46e5; color: #fff; }

.field { text-align: left; margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field select {
    width: 100%; padding: 11px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    font-size: 1rem; outline: none; font-family: inherit;
}
.field input:focus { border-color: #4f46e5; }

.seat-picker { display: flex; gap: 8px; }
.seat-opt {
    flex: 1; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--text-dim); font-weight: 700; font-family: inherit;
    font-size: 0.92rem; cursor: pointer; transition: all 0.15s;
}
.seat-opt.active { background: #4f46e5; border-color: #4f46e5; color: #fff; }

.lobby-actions { margin: 10px 0; }
.btn {
    width: 100%; padding: 12px; border: none; border-radius: 10px;
    background: #4f46e5; color: #fff; font-weight: 700; font-size: 1rem;
    cursor: pointer; font-family: inherit; transition: filter 0.15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }

.code-hint { color: var(--text-dim); font-size: 0.8rem; margin-top: 6px; }
.lobby-error { margin-top: 14px; background: rgba(239,68,68,0.12); color: #f87171; padding: 10px; border-radius: 10px; font-size: 0.85rem; }

/* ---------- Waiting room ---------- */
.waiting-panel {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow);
}
.room-code-box {
    background: var(--bg-soft); border-radius: 10px; padding: 14px; margin: 18px 0;
    font-size: 1.6rem; font-weight: 800; letter-spacing: 4px; color: #a5b4fc;
}
.room-code-box span { font-size: 0.7rem; letter-spacing: normal; display: block; color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }
.player-slot-list { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; text-align: left; }
.player-slot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-soft); border-radius: 10px; }
.player-slot .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.player-slot .pname { font-weight: 600; flex-grow: 1; }
.player-slot .host-tag { font-size: 0.72rem; color: #fbbf24; }
.empty-slot { opacity: 0.4; font-style: italic; }
.color-pick-row { display: flex; gap: 6px; flex-shrink: 0; }
.color-pick-dot {
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent;
    cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
    transition: transform 0.12s, border-color 0.12s;
}
.color-pick-dot:hover { transform: scale(1.15); }
.color-pick-dot.picked { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.5); }

/* ---------- Game screen ---------- */
.game-wrap { max-width: 980px; margin: 0 auto; padding: 60px 14px 30px; display: flex; flex-direction: column; align-items: center; gap: 18px; }

.turn-banner {
    width: 100%; max-width: 560px; text-align: center; padding: 10px 16px;
    border-radius: 12px; background: var(--card); border: 1px solid var(--border);
    font-weight: 700; font-size: 0.95rem;
}

.board-area { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; justify-content: center; width: 100%; }

.ludo-board {
    position: relative;
    width: min(92vw, 520px);
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 4px solid #1e2233;
}
.board-grid {
    position: absolute; inset: 0;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
}
.cell { position: relative; border: 1px solid #d7dae3; background: #ffffff; }
.cell.start-red { background: var(--c-red); }
.cell.start-green { background: var(--c-green); }
.cell.start-yellow { background: var(--c-yellow); }
.cell.start-blue { background: var(--c-blue); }

.safe-star {
    position: absolute; inset: 0; margin: auto;
    width: 46%; height: 46%;
    background: #94a3b8;
    clip-path: polygon(50% 0%, 63% 35%, 100% 38%, 72% 60%, 82% 96%, 50% 76%, 18% 96%, 28% 60%, 0% 38%, 37% 35%);
    pointer-events: none;
}
.cell.start-red .safe-star,
.cell.start-green .safe-star,
.cell.start-yellow .safe-star,
.cell.start-blue .safe-star { background: rgba(255,255,255,0.9); }

.cell.home-red { background: #fecaca; }
.cell.home-green { background: #bbf7d0; }
.cell.home-yellow { background: #fef08a; }
.cell.home-blue { background: #bfdbfe; }

.base-block { position: relative; margin: 0; }
.base-red { background: var(--c-red); }
.base-green { background: var(--c-green); }
.base-yellow { background: var(--c-yellow); }
.base-blue { background: var(--c-blue); }
.base-inner {
    position: absolute; inset: 12%;
    background: #ffffff;
    border-radius: 14%;
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
    gap: 8%;
    padding: 10%;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.12);
}
.base-slot { border-radius: 50%; border: 2.5px dashed rgba(0,0,0,0.14); }

.center-home {
    position: relative;
    background:
        conic-gradient(
            var(--c-green) 0deg 90deg,
            var(--c-yellow) 90deg 180deg,
            var(--c-blue) 180deg 270deg,
            var(--c-red) 270deg 360deg
        );
}
.center-home::after {
    content: "🏠";
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4em;
}

.token-layer { position: absolute; inset: 0; pointer-events: none; }
.token {
    position: absolute;
    width: 7%; height: 7%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: default;
    transition: left 0.2s linear, top 0.2s linear;
    border: 2px solid rgba(255,255,255,0.95);
    box-shadow:
        0 3px 6px rgba(0,0,0,0.45),
        inset -3px -4px 5px rgba(0,0,0,0.28),
        inset 3px 4px 5px rgba(255,255,255,0.45);
    z-index: 10;
}
/* when 2+ tokens share a cell they're spread out (see STACK_OFFSETS in
   game.js) and shrunk a touch so every color stays fully visible */
.token.token-stacked {
    width: 5.4%; height: 5.4%;
    z-index: 11;
}
.token.token-stacked.movable { z-index: 12; }
.token.token-red    { background: radial-gradient(circle at 35% 28%, #ff9d9d, var(--c-red) 55%, #a91d1d 100%); }
.token.token-green  { background: radial-gradient(circle at 35% 28%, #86efac, var(--c-green) 55%, #157a3d 100%); }
.token.token-yellow { background: radial-gradient(circle at 35% 28%, #fde68a, var(--c-yellow) 55%, #a16207 100%); }
.token.token-blue   { background: radial-gradient(circle at 35% 28%, #93c5fd, var(--c-blue) 55%, #1e40af 100%); }
.token.movable {
    cursor: pointer;
    animation: tokenPulse 0.9s infinite ease-in-out;
    box-shadow:
        0 0 0 4px rgba(255,255,255,0.55),
        0 3px 6px rgba(0,0,0,0.45),
        inset -3px -4px 5px rgba(0,0,0,0.28),
        inset 3px 4px 5px rgba(255,255,255,0.45);
}
@keyframes tokenPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* ---------- Dice control bar (sits under the board) ---------- */
.dice-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: min(92vw, 480px);
    background: #1a1f30;
    border: 3px solid #0f1320;
    border-radius: 999px;
    padding: 8px 10px 8px 8px;
    box-shadow: var(--shadow);
    margin-top: -22px;
    position: relative;
    z-index: 5;
}
.turn-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 6px;
    border-radius: 300px;
    background: rgba(255,255,255,0.06);
    font-weight: 700; font-size: 1.1rem;
    transition: background 0.2s, box-shadow 0.2s;
}
.turn-chip .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.turn-chip.active-turn { box-shadow: 0 0 0 2px currentColor; }

.dice-wrap {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; min-width: 150px; padding: 6px 4px;
}

/* A quiet player-color frame and a readable, tactile die. */
.dice-glow-ring {
    --dice-accent: #818cf8;
    display: flex; align-items: center; justify-content: center;
    padding: 8px; border-radius: 23px;
    border: 1px solid #39415a;
    background: linear-gradient(145deg, #30384e, #171c2b);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 5px 12px rgba(0,0,0,0.22);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dice-glow-ring.your-turn-glow,
.dice-glow-ring.awaiting-move {
    border-color: var(--dice-accent);
    box-shadow: 0 0 0 2px var(--dice-accent), 0 6px 18px rgba(0,0,0,0.3);
}
.dice-glow-ring.your-turn-glow { animation: diceReady 2s ease-in-out infinite; }
@keyframes diceReady {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
.dice-cube {
    position: relative;
    width: 64px; height: 64px;
    background: linear-gradient(145deg, #ffffff 0%, #f3f5fa 55%, #d9deea 100%);
    border: 1px solid #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 0 #a5aec1, 0 7px 12px rgba(0,0,0,0.3),
        inset 0 2px 1px #ffffff, inset 0 -3px 5px rgba(78,91,119,0.12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 12px; gap: 3px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s, box-shadow 0.15s;
}
/* A result remains fully legible while the player chooses a token. */
.dice-cube:disabled { cursor: default; opacity: 1; }
.dice-cube:focus-visible { outline: 3px solid var(--dice-accent); outline-offset: 5px; }
.dice-cube:hover:not(:disabled) { transform: translateY(-2px); }
.dice-cube:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #a5aec1; }
.dice-cube[data-value="0"]::after {
    content: '—'; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #66718a; font-size: 25px; font-weight: 700;
}
.dice-cube.rolling { animation: diceTumble 0.45s ease-in-out infinite; }
.dice-cube.rolling::after { content: '•'; }
@keyframes diceTumble {
    0%, 100% { transform: translateY(0) rotate(-9deg); }
    25% { transform: translateY(-6px) rotate(9deg); }
    50% { transform: translateY(-2px) rotate(-6deg); }
    75% { transform: translateY(-5px) rotate(7deg); }
}
.dice-cube .pip {
    border-radius: 50%; background: transparent;
    align-self: center; justify-self: center;
    width: 100%; aspect-ratio: 1;
}
.dice-cube .pip.on {
    background: radial-gradient(circle at 65% 70%, #36435e, #18243c 72%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.65), 0 1px 0 #ffffff;
}
.dice-result {
    color: #f1f5ff; font-size: 0.8rem; line-height: 1.4;
    font-weight: 700; min-height: 1.4em; text-align: center;
}
.dice-hint { font-size: 0.72rem; color: var(--text-dim); text-align: center; max-width: 140px; }
.dice-wrap .dice-hint { max-width: 175px; min-height: 2.8em; line-height: 1.4; }
@media (max-width: 400px) {
    .dice-wrap { min-width: 132px; }
    .dice-wrap .dice-hint { max-width: 145px; }
}
@media (prefers-reduced-motion: reduce) {
    .dice-glow-ring.your-turn-glow, .dice-cube.rolling { animation: none; }
    .dice-cube, .dice-glow-ring { transition: none; }
}

/* ---------- Side panel ---------- */
.side-panel { width: min(92vw, 260px); display: flex; flex-direction: column; gap: 14px; }
.panel-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.panel-box h4 { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

.players-mini { display: flex; flex-direction: column; gap: 8px; }
.player-mini { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 0.86rem; font-weight: 600; }
.player-mini .dot { width: 10px; height: 10px; border-radius: 50%; }
.player-mini.turn { background: rgba(255,255,255,0.06); }
.player-mini .offline-tag { color: var(--text-dim); font-size: 0.7rem; font-weight: 400; }

.chat-box textarea, .chat-input-row input {
    width: 100%; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--text); padding: 8px 10px; font-family: inherit; font-size: 0.85rem;
}
.chat-log { max-height: 120px; overflow-y: auto; font-size: 0.8rem; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.chat-input-row { display: flex; gap: 6px; }
.chat-input-row button { border: none; background: #4f46e5; color: #fff; border-radius: 8px; padding: 0 12px; font-weight: 700; cursor: pointer; }

.quit-btn { width: 100%; padding: 10px; background: rgba(239,68,68,0.15); color: #f87171; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; }

/* ---------- Result overlay ---------- */
.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px;
}
.overlay-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px; max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow);
}
.overlay-card h2 { font-size: 1.6rem; margin-bottom: 10px; }
.overlay-card p { color: var(--text-dim); margin-bottom: 20px; }

@media (max-width: 640px) {
    .board-area { flex-direction: column; align-items: center; }
}

/* ---------- Visitors / spectators ---------- */
.lobby-actions-col { display: flex; flex-direction: column; gap: 8px; }
.spectator-banner {
    width: 100%; max-width: 560px; margin: 0 auto 12px; padding: 9px 14px; border-radius: 12px;
    background: rgba(79,70,229,0.14); border: 1px solid rgba(129,140,248,0.45); color: #c7d2fe;
    font-size: 0.86rem; font-weight: 600; text-align: center;
}
.game-wrap .spectator-banner { margin-bottom: 0; }
.visitor-box { margin: -6px 0 16px; text-align: left; }
.visitor-head { font-size: 0.8rem; color: var(--text-dim); font-weight: 700; margin-bottom: 6px; }
.visitor-list { display: flex; flex-wrap: wrap; gap: 6px; }
.visitor-chip {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
    padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border);
    font-size: 0.8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.visitor-chip.me { border-color: #818cf8; }
.visitor-chip.offline { opacity: 0.5; }
.visitor-empty { color: var(--text-dim); font-size: 0.78rem; font-style: italic; }
.visitor-list-mini { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
.visitor-list-mini .visitor-chip { background: none; border: none; padding: 2px 8px; border-radius: 8px; font-size: 0.86rem; }
.chat-role { font-size: 0.8em; opacity: 0.8; }
/* keep the last rows (chat, leave button) scrollable above the fixed 🎤/🔊 voice buttons on phones */
@media (max-width: 640px) {
    .game-wrap { padding-bottom: 84px; }
    .lobby-wrap { padding-bottom: 84px; }
}

/* ---------- Player handover / seat management (running match) ---------- */
.side-panel { width: min(92vw, 300px); }
.seat-row { flex-direction: column; align-items: stretch; gap: 6px; padding: 7px 8px; border: 1px solid transparent; }
.seat-row.turn { border-color: rgba(255,255,255,0.10); }
.seat-main { display: flex; align-items: center; gap: 7px; min-width: 0; flex-wrap: wrap; }
.seat-main .dot { flex-shrink: 0; }
.seat-name { font-weight: 700; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.seat-row.vacant .seat-name { color: var(--text-dim); font-weight: 600; }
.seat-row.vacant { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 6px, transparent 6px 12px); border: 1px dashed var(--border); }
.seat-row.is-offline .seat-name { opacity: 0.7; }
.seat-prev { font-size: 0.7rem; color: var(--text-dim); font-weight: 400; }
.seat-tag { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.4px; padding: 1px 6px; border-radius: 999px; line-height: 1.5; }
.tag-host { background: rgba(251,191,36,0.16); color: #fbbf24; }
.tag-me { background: rgba(129,140,248,0.18); color: #c7d2fe; }
.seat-status { margin-left: auto; font-size: 0.66rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.st-on { color: #4ade80; background: rgba(34,197,94,0.12); }
.st-off { color: #f87171; background: rgba(239,68,68,0.12); }
.st-vacant { color: var(--text-dim); background: rgba(255,255,255,0.06); }
.seat-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 17px; }
.seat-btn {
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    font-family: inherit; font-size: 0.72rem; font-weight: 700; padding: 5px 9px; border-radius: 8px;
    cursor: pointer; line-height: 1.2; min-height: 30px; touch-action: manipulation;
}
.seat-btn:hover:not(:disabled) { border-color: #818cf8; }
.seat-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.seat-btn-danger { color: #fca5a5; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08); }
.seat-btn-go { color: #c7d2fe; border-color: rgba(129,140,248,0.45); background: rgba(79,70,229,0.14); }
.seat-btn-icon { padding: 5px 8px; }
.seat-self { width: 100%; margin-top: 4px; min-height: 36px; font-size: 0.8rem; }
.visitor-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.visitor-row .visitor-chip { flex: 1 1 auto; min-width: 0; }
.visitor-row .seat-btn { flex-shrink: 0; }
.turn-banner.paused-banner { background: rgba(234,179,8,0.12); border-color: rgba(234,179,8,0.45); color: #fde68a; }
.chat-system { color: var(--text-dim); font-style: italic; font-size: 0.76rem; }
.seat-modal { z-index: 250; }
.seat-card { max-width: 340px; padding: 22px; }
.seat-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.seat-choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.seat-choice {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    font-family: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; text-align: left;
}
.seat-choice .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.seat-choice small { margin-left: auto; color: var(--text-dim); font-weight: 400; font-size: 0.72rem; }
.seat-choice:hover:not(:disabled) { border-color: #818cf8; }
.seat-choice:disabled { opacity: 0.4; cursor: not-allowed; }
.seat-empty { color: var(--text-dim); font-size: 0.85rem; margin: 0; }
@media (max-width: 640px) {
    .side-panel { width: min(94vw, 560px); }
    .seat-btn { min-height: 34px; padding: 6px 10px; font-size: 0.76rem; }
}

/* ---------- GamesZone Global Admin + Game Reset (Host / Admin) ---------- */
.admin-panel { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.ga-btn, .ga-off, .ga-row button {
    border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer;
}
.ga-btn { width: 100%; color: #fcd34d; border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.08); }
.ga-on { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; color: #fcd34d; line-height: 1.4; }
.ga-on span { flex: 1 1 auto; min-width: 0; }
.ga-off { flex-shrink: 0; }
.ga-form label { display: block; font-size: 0.76rem; color: var(--text-dim); margin-bottom: 6px; }
.ga-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ga-row input {
    flex: 1 1 140px; min-width: 0; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
    border-radius: 8px; padding: 7px 9px; font-family: inherit; font-size: 0.85rem;
}
.ga-row .ga-go { background: #4f46e5; border-color: #4f46e5; color: #fff; }
#resetGameBtn {
    width: 100%; padding: 9px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 0.82rem; cursor: pointer;
    color: #fcd34d; background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.4);
}
#resetGameBtn.hidden, #resultResetBtn.hidden { display: none; }
.reset-modal { z-index: 260; }
.reset-card { max-width: 380px; }
.reset-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.reset-card p { color: var(--text); line-height: 1.6; margin-bottom: 18px; }
.reset-actions { display: flex; gap: 8px; }
.reset-actions .btn { flex: 1 1 0; margin: 0; }
.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.st-new { color: #fcd34d; background: rgba(245,158,11,0.12); }
.seat-row.seat-new { border-style: dotted; }
