:root {
    --bg: #120e0b;
    --panel: rgba(34, 26, 20, .88);
    --panel-2: rgba(48, 35, 25, .8);
    --text: #f7ead4;
    --muted: #b8a58c;
    --border: rgba(231, 196, 137, .18);
    --gold: #e4b75d;
    --gold-2: #ffdc8a;
    --danger: #d65f5f;
    --green: #69ba83;
    --felt: #17382d;
    --felt-2: #0f2a22;
    --shadow: 0 18px 60px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -20%, rgba(128,71,35,.28), transparent 35%),
        linear-gradient(180deg, #17110d 0%, #0f0c0a 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.hidden { display: none !important; }
.stack { display: grid; gap: 16px; }
.muted { color: var(--muted); }
.ambient { position: fixed; width: 380px; height: 380px; border-radius: 50%; filter: blur(110px); opacity: .12; pointer-events: none; }
.ambient-a { background: #d68a3d; top: -100px; left: -100px; }
.ambient-b { background: #4e8d68; right: -150px; top: 38%; }
.site-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(145deg, #5d3820, #2b1a11); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 1.45rem; }
.brand strong { display: block; font: 800 1.08rem/1.1 Georgia, serif; letter-spacing: .03em; }
.brand small { color: var(--muted); font-size: .72rem; }
.connection { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .8rem; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #7b6656; box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.connection-dot.online { background: var(--green); box-shadow: 0 0 0 4px rgba(105,186,131,.12); }
.panel { background: linear-gradient(180deg, rgba(49,36,27,.88), rgba(29,22,18,.92)); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.eyebrow { color: var(--gold); font-weight: 800; letter-spacing: .16em; font-size: .68rem; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }
h1 { font-size: clamp(2.3rem, 6vw, 5.2rem); line-height: .98; margin: 14px 0 20px; max-width: 850px; }
h2 { margin: 6px 0 0; font-size: 1.55rem; }
.lobby-layout { display: grid; gap: 22px; padding: 34px 0 80px; }
.panel-hero { padding: clamp(26px, 5vw, 58px); overflow: hidden; position: relative; }
.panel-hero::after { content: "🐉"; position: absolute; font-size: clamp(10rem, 30vw, 25rem); right: -5%; bottom: -35%; opacity: .045; transform: rotate(-12deg); }
.hero p { max-width: 720px; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.hero-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-features span { border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; background: rgba(0,0,0,.15); font-size: .85rem; }
.lobby-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-card { padding: 24px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .82rem; font-weight: 700; }
input, select { width: 100%; background: #16110e; color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; outline: none; }
input:focus, select:focus { border-color: rgba(228,183,93,.7); box-shadow: 0 0 0 3px rgba(228,183,93,.08); }
.code-input { text-transform: uppercase; letter-spacing: .18em; font-weight: 900; }
.join-role { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-choice { cursor: pointer; }
.role-choice input { position: absolute; opacity: 0; pointer-events: none; }
.role-choice span { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: rgba(0,0,0,.14); }
.role-choice small { color: var(--muted); font-weight: 500; }
.role-choice input:checked + span { border-color: var(--gold); background: rgba(228,183,93,.09); box-shadow: inset 0 0 0 1px rgba(228,183,93,.25); }
.btn { border: 1px solid transparent; border-radius: 12px; padding: 11px 15px; font-weight: 800; color: var(--text); transition: transform .15s ease, filter .15s ease, opacity .15s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(180deg, #b98535, #8f6426); color: #18100a; border-color: #d7ad68; }
.btn-secondary { background: #34271e; border-color: var(--border); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: rgba(153,55,55,.24); border-color: rgba(214,95,95,.45); color: #ffd2d2; }
.error { min-height: 20px; color: #ffaaaa; font-weight: 700; font-size: .9rem; padding: 0 4px; }
.game-layout { display: grid; gap: 18px; padding-bottom: 54px; }
.game-toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 20px; }
.toolbar-stats { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 8px; }
.toolbar-stats span { display: grid; gap: 1px; }
.toolbar-stats small { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.toolbar-stats strong { font-size: .95rem; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.table-wrap { padding: 6px 0; }
.wood-ring { padding: clamp(9px, 1.7vw, 18px); border-radius: 46px; background: linear-gradient(135deg, #6d4529, #2b1b12 48%, #825536); box-shadow: 0 25px 70px rgba(0,0,0,.42), inset 0 0 0 2px rgba(255,220,160,.11); }
.felt-table { min-height: 560px; border-radius: 36px; padding: clamp(18px, 3vw, 34px); background:
    radial-gradient(circle at center, rgba(92,150,119,.18), transparent 50%),
    repeating-radial-gradient(circle at center, rgba(255,255,255,.012) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, var(--felt), var(--felt-2));
    border: 1px solid rgba(210,255,225,.08); position: relative; overflow: hidden;
}
.felt-table::before { content: "DRAGON ANTE"; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%) rotate(-6deg); font: 800 clamp(2.2rem, 8vw, 7rem) Georgia, serif; letter-spacing: .12em; color: rgba(255,255,255,.025); white-space: nowrap; }
.table-center { display: grid; place-items: center; gap: 10px; padding: 6px 0 20px; position: relative; z-index: 2; }
.pot-chip { width: 94px; height: 94px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 35% 30%, #f6d486, #a87524 60%, #63400d); color: #221406; border: 5px double rgba(63,38,7,.55); box-shadow: 0 13px 30px rgba(0,0,0,.34); }
.pot-chip span { font-size: 1.2rem; line-height: 1; }
.pot-chip strong { font-size: 1.5rem; line-height: 1.1; }
.pot-chip small { font-size: .55rem; font-weight: 900; letter-spacing: .12em; }
.phase-prompt { color: #d6c7ae; font-size: .9rem; text-align: center; min-height: 22px; }
.players-ring { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 12px; align-items: stretch; }
.player-seat { background: rgba(9,22,17,.52); border: 1px solid rgba(233,239,222,.12); border-radius: 16px; padding: 12px; min-width: 0; transition: .2s ease; }
.player-seat.current { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(228,183,93,.18), 0 0 28px rgba(228,183,93,.10); transform: translateY(-2px); }
.player-seat.you { background: rgba(68,75,46,.24); }
.player-seat.folded { opacity: .45; filter: grayscale(.5); }
.player-meta { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.player-meta > div { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.player-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.coins { white-space: nowrap; color: #f4d080; font-weight: 800; font-size: .86rem; }
.tiny-badge { font-size: .52rem; border: 1px solid rgba(228,183,93,.35); color: var(--gold-2); padding: 2px 5px; border-radius: 999px; letter-spacing: .06em; }
.tiny-badge.danger { color: #ffb0b0; border-color: rgba(214,95,95,.45); }
.tiny-badge.muted-badge { color: #aaa; border-color: rgba(255,255,255,.15); }
.mini-flight { display: flex; gap: 6px; margin-top: 12px; }
.mini-card { width: 48px; height: 66px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 5px; box-shadow: 0 7px 12px rgba(0,0,0,.16); }
.mini-card.new-card { animation: cardDrop .24s ease both; }
.mini-card strong { align-self: flex-end; font-size: .9rem; }
.empty-slot { background: rgba(255,255,255,.025); border-style: dashed; color: rgba(255,255,255,.15); display: grid; place-items: center; box-shadow: none; }
.hand-count { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.42); margin-top: 10px; min-height: 20px; font-size: .72rem; }
.hand-count span { color: var(--muted); }
.hand-section { padding-top: 6px; }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 12px; }
.section-heading.compact { margin-bottom: 8px; }
.hand { display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; }
.dragon-card { width: min(250px, 100%); min-height: 350px; border-radius: 20px; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 18px 35px rgba(0,0,0,.28), inset 0 0 50px rgba(255,255,255,.035); padding: 15px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.dragon-card::after { content: "🐲"; position: absolute; font-size: 9rem; opacity: .05; right: -22px; top: 58px; transform: rotate(-10deg); pointer-events: none; }
.dragon-card.playable { cursor: pointer; outline: 2px solid rgba(228,183,93,.0); transition: .18s ease; }
.dragon-card.playable:hover { transform: translateY(-8px) rotate(-.5deg); outline-color: rgba(228,183,93,.65); filter: brightness(1.06); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.dragon-icon { font-size: 2.35rem; }
.power-orb { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 900; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.28); }
.card-body { position: relative; z-index: 1; }
.card-body > small { text-transform: uppercase; letter-spacing: .12em; opacity: .72; font-size: .62rem; }
.card-body h3 { margin: 6px 0 16px; font-size: 1.4rem; }
.ability { padding: 11px; border-radius: 12px; background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.09); }
.ability strong { font-size: .82rem; letter-spacing: .02em; }
.ability p { margin: 4px 0 0; font-size: .78rem; line-height: 1.4; color: rgba(255,255,255,.82); }
.card-body em { display: block; color: rgba(255,255,255,.5); margin-top: 14px; font: italic .76rem/1.4 Georgia, serif; }
.card-play { width: 100%; margin-top: 16px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.red { background: linear-gradient(145deg, #72241e, #351412); }
.blue { background: linear-gradient(145deg, #175a7d, #112a3c); }
.green { background: linear-gradient(145deg, #2a6940, #133322); }
.gold { background: linear-gradient(145deg, #80631b, #3c2d0d); }
.black { background: linear-gradient(145deg, #423d4c, #15141a); }
.empty-hand, .spectator-note { color: var(--muted); padding: 24px; border: 1px dashed var(--border); border-radius: 16px; width: 100%; text-align: center; }
.bet-panel { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: rgba(228,183,93,.32); }
.bet-copy p { color: var(--muted); margin: 6px 0 0; }
.bet-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; justify-content: flex-end; }
.raise-group { display: flex; align-items: end; gap: 6px; }
.raise-group label { width: 110px; }
.raise-group input { padding: 10px 11px; }
.side-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: start; }
.results, .log-panel { padding: 20px; }
.results > p { color: var(--muted); }
.score-list { display: grid; gap: 7px; margin-top: 15px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding: 10px 0; }
.result-row > div:first-child { display: grid; gap: 3px; }
.result-row small { color: var(--muted); font-size: .7rem; }
.result-row > div:last-child { display: flex; gap: 10px; align-items: center; }
.result-row > div:last-child span { color: var(--muted); font-size: .8rem; }
.result-row > div:last-child strong { font-size: 1.2rem; color: var(--gold-2); }
.result-row.winner { background: rgba(228,183,93,.04); }
.action-log { display: grid; }
.log-entry { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding: 9px 0; font-size: .78rem; }
.log-entry small { color: var(--muted); white-space: nowrap; }
.spectators-panel { padding: 14px 18px; color: var(--muted); }
.footer { color: #7e7161; font-size: .74rem; padding: 8px 0 34px; text-align: center; }
.rules-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: #2f6f4e;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.rules-button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

@keyframes dealIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cardDrop { from { opacity: 0; transform: translateY(-7px) rotate(-3deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .mini-card.new-card { animation: none; }
    .player-seat, .dragon-card.playable, .btn { transition: none; }
}
@media (max-width: 900px) {
    .side-grid { grid-template-columns: 1fr; }
    .game-toolbar, .bet-panel { align-items: stretch; flex-direction: column; }
    .toolbar-actions, .bet-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
    .shell { width: min(100% - 20px, 1180px); }
    .site-header { min-height: 70px; }
    .lobby-layout { padding-top: 18px; }
    .lobby-forms { grid-template-columns: 1fr; }
    .panel-hero { padding: 24px; }
    .hero-features { gap: 6px; }
    .game-toolbar { padding: 15px; }
    .toolbar-stats { gap: 12px; }
    .wood-ring { border-radius: 28px; padding: 8px; }
    .felt-table { border-radius: 22px; min-height: 470px; padding: 14px; }
    .players-ring { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .player-meta { display: grid; }
    .mini-card { width: 38px; height: 54px; }
    .dragon-card { width: calc(50% - 7px); min-height: 330px; }
    .section-heading { align-items: start; }
}
@media (max-width: 500px) {
    .brand small { display: none; }
    .connection span:last-child { display: none; }
    .join-role { grid-template-columns: 1fr; }
    .players-ring { grid-template-columns: 1fr; }
    .player-meta { display: flex; }
    .dragon-card { width: 100%; min-height: 325px; }
    .raise-group { width: 100%; }
    .raise-group label { flex: 1; }
    .bet-actions .btn { flex: 1; }
    .toolbar-actions .btn { flex: 1; }
}




/* ---------------------------------------------------------
   v2.2 Mobile UX
   --------------------------------------------------------- */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
button,
.btn,
.rules-button,
.role-choice {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.btn,
.rules-button,
input,
select {
    min-height: 44px;
}

@media (hover: none), (pointer: coarse) {
    .btn:hover,
    .rules-button:hover,
    .dragon-card.playable:hover {
        transform: none;
        filter: none;
    }
    .btn:active,
    .rules-button:active {
        transform: scale(.985);
        filter: brightness(.96);
    }
    .dragon-card.playable:active {
        outline-color: rgba(228,183,93,.65);
        transform: scale(.99);
    }
}

@media (max-width: 720px) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .shell {
        width: min(100% - 16px, 1180px);
    }

    .site-header {
        min-height: 64px;
        gap: 8px;
    }
    .brand {
        gap: 8px;
        min-width: 0;
    }
    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        flex: 0 0 40px;
    }
    .brand strong {
        font-size: .98rem;
        white-space: nowrap;
    }
    .rules-button {
        min-height: 40px;
        padding: 8px 11px;
        white-space: nowrap;
        font-size: .82rem;
    }
    .connection {
        gap: 0;
    }
    .connection-dot {
        width: 10px;
        height: 10px;
    }

    .lobby-layout {
        gap: 14px;
        padding: 12px 0 40px;
    }
    .panel {
        border-radius: 16px;
    }
    .panel-hero {
        padding: 20px;
    }
    .panel-hero::after {
        right: -20%;
        bottom: -18%;
    }
    h1 {
        font-size: clamp(2rem, 11vw, 3.2rem);
        margin: 10px 0 14px;
    }
    h2 {
        font-size: 1.3rem;
    }
    .hero p {
        font-size: .95rem;
        line-height: 1.5;
    }
    .hero-features {
        margin-top: 18px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .hero-features::-webkit-scrollbar { display: none; }
    .hero-features span {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .lobby-forms {
        gap: 14px;
    }
    .form-card {
        padding: 18px;
    }
    input,
    select {
        min-height: 48px;
        padding: 12px 13px;
        font-size: 16px; /* prevents iOS form zoom */
    }
    .role-choice span {
        min-height: 54px;
        justify-content: center;
    }

    .game-layout {
        gap: 12px;
        padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }
    .game-toolbar {
        padding: 12px;
        gap: 12px;
    }
    .toolbar-stats {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        margin-top: 8px;
    }
    .toolbar-stats span {
        min-width: 0;
        padding: 8px;
        border: 1px solid rgba(231,196,137,.10);
        border-radius: 10px;
        background: rgba(0,0,0,.12);
    }
    .toolbar-stats small {
        font-size: .55rem;
    }
    .toolbar-stats strong {
        font-size: .8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .toolbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .toolbar-actions .btn:only-child {
        grid-column: 1 / -1;
    }

    .table-wrap {
        padding: 0;
        margin-inline: -8px;
    }
    .wood-ring {
        border-radius: 22px;
        padding: 6px;
    }
    .felt-table {
        min-height: 0;
        border-radius: 17px;
        padding: 12px 10px 14px;
        overflow: hidden;
    }
    .felt-table::before {
        font-size: clamp(1.8rem, 12vw, 4rem);
    }
    .table-center {
        gap: 6px;
        padding: 2px 0 12px;
    }
    .pot-chip {
        width: 72px;
        height: 72px;
        border-width: 4px;
    }
    .pot-chip span { font-size: .95rem; }
    .pot-chip strong { font-size: 1.25rem; }
    .phase-prompt {
        min-height: 18px;
        padding-inline: 6px;
        font-size: .78rem;
        line-height: 1.3;
    }

    /* Player seats become a swipe carousel instead of a tall 10-player list. */
    .players-ring {
        display: flex;
        grid-template-columns: none;
        gap: 9px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 2px;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        padding: 2px 2px 8px;
        scrollbar-width: none;
    }
    .players-ring::-webkit-scrollbar { display: none; }
    .player-seat {
        flex: 0 0 min(78vw, 285px);
        scroll-snap-align: center;
        padding: 10px;
        border-radius: 14px;
    }
    .player-seat.current {
        transform: none;
    }
    .player-meta {
        display: flex;
    }
    .player-meta strong {
        max-width: 155px;
    }
    .mini-flight {
        gap: 5px;
        margin-top: 9px;
    }
    .mini-card {
        width: 42px;
        height: 58px;
    }
    .hand-count {
        margin-top: 7px;
    }

    .hand-section {
        min-width: 0;
        padding-top: 2px;
    }
    .section-heading {
        gap: 10px;
        margin-bottom: 8px;
    }
    #yourTurn {
        flex: 0 0 auto;
        font-size: .82rem;
        color: var(--gold-2);
    }

    /* Cards are finger-swiped horizontally; no enormous vertical stack. */
    .hand {
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 1px;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        padding: 2px 1px 12px;
        scrollbar-width: none;
    }
    .hand::-webkit-scrollbar { display: none; }
    .dragon-card {
        flex: 0 0 min(84vw, 300px);
        width: auto;
        min-height: 315px;
        scroll-snap-align: center;
        border-radius: 18px;
        padding: 14px;
    }
    .dragon-card::after {
        font-size: 7rem;
    }
    .dragon-icon {
        font-size: 2rem;
    }
    .power-orb {
        width: 44px;
        height: 44px;
        font-size: 1.35rem;
    }
    .card-body h3 {
        margin: 5px 0 12px;
        font-size: 1.28rem;
    }
    .card-play {
        min-height: 48px;
    }

    /* Betting is always reachable with one thumb while it is your phase. */
    .bet-panel:not(.hidden) {
        position: sticky;
        bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 30;
        padding: 12px;
        gap: 10px;
        border-color: rgba(228,183,93,.55);
        box-shadow: 0 -8px 32px rgba(0,0,0,.35), var(--shadow);
        backdrop-filter: blur(12px);
    }
    .bet-copy h2 {
        font-size: 1.15rem;
    }
    .bet-copy p {
        font-size: .76rem;
        line-height: 1.35;
    }
    .bet-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }
    .bet-actions > .btn {
        width: 100%;
        min-height: 48px;
    }
    .raise-group {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        align-items: end;
        gap: 8px;
    }
    .raise-group label {
        width: auto;
        min-width: 0;
    }
    .raise-group input {
        min-height: 46px;
    }
    .raise-group .btn {
        min-height: 46px;
    }

    .side-grid {
        gap: 12px;
    }
    .results,
    .log-panel {
        padding: 15px;
    }
    .result-row {
        align-items: start;
    }
    .result-row > div:last-child {
        flex: 0 0 auto;
    }
    .log-entry {
        line-height: 1.35;
    }
    .spectators-panel {
        padding: 12px 14px;
        font-size: .82rem;
    }
    .empty-hand,
    .spectator-note {
        padding: 18px 14px;
    }
}

@media (max-width: 430px) {
    .site-header {
        gap: 6px;
    }
    .brand strong {
        font-size: .9rem;
    }
    .brand-mark {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 1.2rem;
    }
    .rules-button {
        min-height: 36px;
        padding: 7px 9px;
        font-size: .76rem;
    }
    .toolbar-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .toolbar-actions {
        grid-template-columns: 1fr;
    }
    .toolbar-actions .btn {
        width: 100%;
    }
    .player-seat {
        flex-basis: 82vw;
    }
    .dragon-card {
        flex-basis: 88vw;
        min-height: 305px;
    }
    .section-heading {
        align-items: flex-start;
    }
    .result-row {
        gap: 8px;
    }
    .result-row small {
        line-height: 1.35;
    }
}
