/* ═══════════════════════════════════════════════════════════════════════
   Joe's Mixed Games — PokerNow-inspired layout  (v2)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── FADED SPADE card font ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,700;1,700&display=swap');
/* Faded Spade uses a serif with sharp ink-trap feel; Libre Baskerville
   is the closest freely available match for the rank numerals. */

/* ── RESET & BASE ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:           #1a1a2a;
    --felt:         #1a3a5c;
    --felt-dark:    #122a47;
    --rail:         #2a1f14;
    --rail-hi:      #5a3a1a;
    --gold:         #f0c040;
    --gold-dim:     rgba(240,192,64,0.35);
    --green:        #27ae60;
    --red:          #c0392b;
    --blue:         #2980b9;
    --bubble-bg:    rgba(10,20,40,0.82);
    --bubble-edge:  rgba(255,255,255,0.14);
    --text:         #e8e8e8;
    --text-dim:     #888;
    --ui-bg:        rgba(10,14,26,0.88);
    --ui-border:    rgba(255,255,255,0.1);
    --card-white:   #fafafa;

    /* Table is 25% larger: was 900×500, now 1125×625 */
    --tbl-w:   1125px;
    --tbl-h:    625px;
    --rail-w:    27px;   /* 22 * 1.25 */

    /* Hole card size: was 32×46, now 40×58 */
    --hc-w: 40px;
    --hc-h: 58px;

    /* Board card size: was 54×76, now 68×95 */
    --bc-w: 68px;
    --bc-h: 95px;
}

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    user-select: none;
}

.hidden { display: none !important; }

button {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    transition: filter 0.15s, opacity 0.15s;
}
button:hover  { filter: brightness(1.15); }
button:active { filter: brightness(0.9);  }
button:disabled { opacity: 0.4; cursor: default; filter: none; }

/* ── TABLE WRAP ────────────────────────────────────────────────────── */
#table-wrap {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ── POKER TABLE ───────────────────────────────────────────────────── */
/* #poker-table: transparent positioning container only.
   All visual styles live in #table-felt so it can rotate
   independently in portrait mode. */
#poker-table {
    position: relative;
    width:  var(--tbl-w);
    height: var(--tbl-h);
    pointer-events: none;
    overflow: visible;
}

/* ── TABLE FELT — visual oval (rotates in portrait) ──────────────── */
#table-felt {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 45%,
        #1e4a78 0%, var(--felt) 55%, var(--felt-dark) 100%);
    border: var(--rail-w) solid var(--rail);
    box-shadow:
        0 0 0 5px var(--rail-hi),
        0 24px 72px rgba(0,0,0,0.85),
        inset 0 3px 10px rgba(0,0,0,0.5);
    pointer-events: all;
    transition: transform 0.3s ease;
    z-index: 0;
}

/* ── BETTING LINE — solid oval ─────────────────────────────────────── */
#bet-line {
    position: absolute;
    inset: 35px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.22);   /* solid, not dashed */
    pointer-events: none;
    z-index: 1;
}

/* ── TABLE GAME LABEL — between pot and board ─────────────────────── */
/* Positioned absolutely between #pot-area (top:22%) and #board-cards (centre).
   We use top:34% so it sits in the visual gap between them. */
#table-game-label {
    position: absolute;
    top: 36%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.22);
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ── TABLE CENTRE ──────────────────────────────────────────────────── */
/* Pot sits at ~30% from top (halfway between rail and centre) */
#pot-area {
    position: absolute;
    top: 22%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.08em;
    text-shadow: 0 0 18px var(--gold-dim);
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
}

/* Board cards centred vertically */
#board-cards {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 8px;
    z-index: 2;
    pointer-events: none;
}

#paused-banner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, 40px);
    color: rgba(255,80,80,0.9);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

/* ── SEATS CONTAINER ───────────────────────────────────────────────── */
#seats-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 5;
}

/* ── SEAT ──────────────────────────────────────────────────────────── */
.seat {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    overflow: visible;
}

/* ── BUBBLE ────────────────────────────────────────────────────────── */
.bubble {
    background: var(--bubble-bg);
    border: 1px solid var(--bubble-edge);
    border-radius: 14px;
    padding: 7px 12px 6px;
    min-width: 138px;   /* was 110 × 1.25 */
    max-width: 175px;   /* was 140 × 1.25 */
    display: flex;
    flex-direction: column;
    gap: 5px;
    backdrop-filter: blur(4px);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.seat.acting .bubble {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-dim);
}
.seat.is-me .bubble {
    border-color: rgba(100,180,255,0.5);
}
.seat.is-away .bubble { opacity: 0.55; }
.seat.empty .bubble {
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.2);
    cursor: pointer;
}
.seat.empty:hover .bubble {
    border-color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.04);
}
.seat.pending .bubble {
    background: transparent;
    border: 1px dashed rgba(240,192,64,0.3);
}
.seat.no-click { pointer-events: none; opacity: 0.5; }

.bubble-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
}
.p-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.p-stack {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    flex-shrink: 0;
}
.seat-num {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.25);
    display: block;
    text-align: center;
}
.sit-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    text-align: center;
}
.seat.empty:hover .seat-num,
.seat.empty:hover .sit-label { color: rgba(255,255,255,0.65); }
.pending-label {
    font-size: 0.75rem;
    color: rgba(240,192,64,0.5);
    text-align: center;
    display: block;
}

/* ── SEAT POSITIONS (1125×625 table, 25% larger) ──────────────────── */
/*
 * Rotated layout (rotated index → screen position):
 *   4 = bottom-centre   (always "me" when seated)
 *   5 = bottom-right
 *   6 = right
 *   7 = top-right
 *   0 = top-centre
 *   1 = top-left
 *   2 = left
 *   3 = bottom-left
 */
.rpos-bot-centre { bottom: -88px;  left: 50%;   transform: translateX(-50%); }
.rpos-bot-right  { bottom: -69px;  right: 8%; }
.rpos-right      { top: 50%;       right: -150px; transform: translateY(-50%); }
.rpos-top-right  { top: -69px;     right: 8%; }
.rpos-top-centre { top: -88px;     left: 50%;   transform: translateX(-50%); }
.rpos-top-left   { top: -69px;     left: 8%; }
.rpos-left       { top: 50%;       left: -150px;  transform: translateY(-50%); }
.rpos-bot-left   { bottom: -69px;  left: 8%; }

/* ── DEALER BUTTON ─────────────────────────────────────────────────── */
/*
 * The dealer button sits ON the bet-line, in front of the seat (toward
 * the table centre). Each rpos variant positions it along that inward edge.
 */
.dealer-btn {
    position: absolute;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #fff 0%, #e0e0e0 60%, #bbb 100%);
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 28px;
    text-align: center;
    border: 2px solid #555;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    z-index: 12;
    pointer-events: none;
}
/* Place button on the inward edge (toward table centre) per rpos */
.rpos-bot-centre .dealer-btn  { top: -20px;   left: 50%; transform: translateX(-50%); }
.rpos-bot-right  .dealer-btn  { top: -18px;   left: 24px; }
.rpos-right      .dealer-btn  { top: 50%;     left: -20px; transform: translateY(-50%); }
.rpos-top-right  .dealer-btn  { bottom: -18px; left: 24px; }
.rpos-top-centre .dealer-btn  { bottom: -20px; left: 50%; transform: translateX(-50%); }
.rpos-top-left   .dealer-btn  { bottom: -18px; right: 24px; }
.rpos-left       .dealer-btn  { top: 50%;     right: -20px; transform: translateY(-50%); }
.rpos-bot-left   .dealer-btn  { top: -18px;   right: 24px; }

/* ── BET CHIP ──────────────────────────────────────────────────────── */
.bet-chip {
    position: absolute;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 35%,
        #e8e0c8 0%, #c8b060 40%, #9a7820 70%, #7a5800 100%);
    border: 3px solid #fff;
    outline: 3px dashed rgba(255,255,255,0.5);
    outline-offset: -9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.7);
    z-index: 8;
    font-size: 0.72rem;
    font-weight: 900;
    color: #1a1000;
    pointer-events: none;
}
/* Chips sit just inside the bet-line, toward table centre */
.rpos-bot-centre .bet-chip { bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%); }
.rpos-bot-right  .bet-chip { bottom: calc(100% + 10px); left: 18%; }
.rpos-right      .bet-chip { right: calc(100% + 10px);  top: 50%; transform: translateY(-50%); }
.rpos-top-right  .bet-chip { top: calc(100% + 10px);    left: 18%; }
.rpos-top-centre .bet-chip { top: calc(100% + 14px);    left: 50%; transform: translateX(-50%); }
.rpos-top-left   .bet-chip { top: calc(100% + 10px);    right: 18%; }
.rpos-left       .bet-chip { left: calc(100% + 10px);   top: 50%; transform: translateY(-50%); }
.rpos-bot-left   .bet-chip { bottom: calc(100% + 10px); right: 18%; }

/* ── HOLE CARD ROW ─────────────────────────────────────────────────── */
/*
 * Cards overlap ~30% (each card shifted left by 70% of card width).
 * The row is clipped at its right edge only — left overhang is fine.
 * z-index stacks left-to-right so rightmost card is on top.
 */
.card-row {
    display: flex;
    flex-direction: row;
    /* negative margin creates the overlap; each card gets margin-left override */
    padding: 2px 0 0;
    position: relative;
    /* min-height so bubble doesn't collapse */
    min-height: calc(var(--hc-h) + 4px);
}
.card-row .card {
    margin-left: -12px;   /* ~30% overlap of 40px card */
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}
.card-row .card:first-child {
    margin-left: 0;
}
/* Hover lifts card upward */
.card-row .card:hover {
    transform: translateY(-10px);
    box-shadow: 2px 8px 18px rgba(0,0,0,0.6);
    z-index: 20 !important;
}
/* z-index per child so rightmost is on top by default */
.card-row .card:nth-child(1) { z-index: 1; }
.card-row .card:nth-child(2) { z-index: 2; }
.card-row .card:nth-child(3) { z-index: 3; }
.card-row .card:nth-child(4) { z-index: 4; }
.card-row .card:nth-child(5) { z-index: 5; }
.card-row .card:nth-child(6) { z-index: 6; }
.card-row .card:nth-child(7) { z-index: 7; }

/* ── HOLE CARD ─────────────────────────────────────────────────────── */
.card {
    position: relative;
    width:  var(--hc-w);   /* 40px */
    height: var(--hc-h);   /* 58px */
    border-radius: 5px;
    background: var(--card-white);
    border: 1px solid #bbb;
    box-shadow: 1px 2px 6px rgba(0,0,0,0.5);
    overflow: hidden;
    flex-shrink: 0;
}

/* Rank — large, top-left, Faded Spade / Libre Baskerville */
.card-rank {
    position: absolute;
    top: 3px; left: 4px;
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;   /* large rank in top-left */
    font-weight: 700;
    line-height: 1;
}

/* Suit — large, dead centre */
.card-suit-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.55rem;   /* large suit pip */
    line-height: 1;
    opacity: 0.92;
}

/* Back of card */
.card.back {
    background: repeating-linear-gradient(
        45deg, #8b0000 0, #8b0000 4px, #a00000 4px, #a00000 8px);
    border: 1px solid #fff;
    cursor: default;
}
.card.back .card-rank,
.card.back .card-suit-center { display: none; }

/* ── BOARD CARDS ───────────────────────────────────────────────────── */
#board-cards .card {
    width:  var(--bc-w);   /* 68px */
    height: var(--bc-h);   /* 95px */
    border-radius: 6px;
    margin-left: 0;        /* board cards don't overlap */
    cursor: default;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.5);
}
#board-cards .card:hover { transform: none; box-shadow: 2px 3px 10px rgba(0,0,0,0.5); }

#board-cards .card-rank      { font-size: 1.4rem; top: 4px; left: 5px; }
#board-cards .card-suit-center { font-size: 2.4rem; }

/* ── UI OVERLAY PANELS ─────────────────────────────────────────────── */
/* ── TOP-LEFT ──────────────────────────────────────────────────────── */
#top-left {
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0;
}

#my-name-display {
    background: var(--ui-bg);
    border-bottom: 1px solid var(--ui-border);
    border-right: 1px solid var(--ui-border);
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.04em;
}

/* Icon menu — VERTICAL stack */
#icon-menu {
    display: flex;
    flex-direction: column;   /* ← vertical */
    gap: 0;
    background: var(--ui-bg);
    border-right: 1px solid var(--ui-border);
    border-bottom: 1px solid var(--ui-border);
    border-radius: 0 0 8px 0;
}
.icon-item {
    display: flex;
    flex-direction: row;      /* glyph + label side by side */
    align-items: center;
    padding: 9px 16px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 10px;
    border-bottom: 1px solid var(--ui-border);
}
.icon-item:last-child { border-bottom: none; }
.icon-item:hover { background: rgba(255,255,255,0.07); }
.icon-glyph { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.icon-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.icon-item.away-active .icon-glyph,
.icon-item.away-active .icon-label { color: var(--gold); }

/* Options bubble */
#options-bubble {
    position: fixed;
    top: 0;
    left: 160px;   /* pops to the right of the vertical icon strip */
    z-index: 200;
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    backdrop-filter: blur(12px);
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.opt-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding: 4px 14px 2px;
}
.opt-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 16px;
    background: transparent;
    color: var(--text);
    border-radius: 0;
    font-size: 0.88rem;
    font-weight: 400;
}
.opt-item:hover { background: rgba(255,255,255,0.08); }
.opt-divider { height: 1px; background: var(--ui-border); margin: 4px 0; }

/* ── TOP-RIGHT ─────────────────────────────────────────────────────── */
#top-right {
    position: fixed;
    top: 0; right: 0;
    z-index: 100;
    background: var(--ui-bg);
    border-left: 1px solid var(--ui-border);
    border-bottom: 1px solid var(--ui-border);
    border-radius: 0 0 0 10px;
    padding: 8px 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    min-width: 200px;
}
#owner-display {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.06em;
}
#game-stakes-display {
    font-size: 0.82rem;
    color: #ccc;
    font-weight: 600;
}
#tr-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.tr-btn {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    font-size: 0.95rem;
    padding: 0;
    border: 1px solid var(--ui-border);
    display: flex; align-items: center; justify-content: center;
}
.tr-btn:hover    { background: rgba(255,255,255,0.15); }
.tr-btn.btn-active { background: rgba(240,192,64,0.25); border-color: var(--gold); color: var(--gold); }
#admin-controls  { display: flex; gap: 5px; align-items: center; }
.admin-btn       { background: rgba(200,80,40,0.2); border-color: rgba(200,80,40,0.4); }
.admin-btn:hover { background: rgba(200,80,40,0.4); }

/* Game selector dropdown — floats below the top-right panel */
#game-selector-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    /* pushed down just below the top-right panel; JS could calc this but
       a fixed offset works fine since the panel height is stable */
    margin-top: 90px;
    z-index: 150;
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    border-radius: 0 0 0 10px;
    backdrop-filter: blur(12px);
    padding: 8px 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
#game-selector {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    width: 220px;
    outline: none;
}
#game-selector:focus {
    border-color: var(--gold);
}
#game-selector option {
    background: #1e2535;
    color: var(--text);
}

/* ── BOTTOM-RIGHT ──────────────────────────────────────────────────── */
#bottom-right {
    position: fixed;
    bottom: 0; right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#cof-row {
    padding: 6px 16px 4px;
    display: flex;
    justify-content: flex-end;
}
#cof-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    color: #aaa;
    font-size: 0.78rem;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}
#cof-btn.cof-active {
    background: rgba(39,174,96,0.25);
    border-color: var(--green);
    color: #7dffb0;
    box-shadow: 0 0 10px rgba(39,174,96,0.35);
}

#action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 16px;
    background: var(--ui-bg);
    border-top: 1px solid var(--ui-border);
    border-left: 1px solid var(--ui-border);
    border-radius: 10px 0 0 0;
    backdrop-filter: blur(10px);
}
.action-btn {
    min-width: 110px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 8px;
    letter-spacing: 0.03em;
}
.btn-red   { background: var(--red);   color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-blue  { background: var(--blue);  color: #fff; }
.btn-gold  { background: var(--gold);  color: #111; }
.btn-grey  { background: #555;         color: #eee; }

#raise-group { display: flex; align-items: center; gap: 8px; }
#raise-amount {
    width: 110px;
    padding: 10px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
}
#raise-amount:focus { outline: none; border-color: var(--blue); }

/* ── BOTTOM-LEFT ───────────────────────────────────────────────────── */
#bottom-left {
    position: fixed;
    bottom: 0; left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 260px;
}

#log-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: #aaa;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 6px 6px 0 0;
    margin-left: 8px;
    margin-bottom: -1px;
}
#log-btn:hover { background: rgba(255,255,255,0.12); }

#log-panel {
    width: 100%;
    background: var(--ui-bg);
    border-top: 1px solid var(--ui-border);
    border-right: 1px solid var(--ui-border);
    max-height: 200px;
    display: flex;
    flex-direction: column;
}
#log-tabs { display: flex; border-bottom: 1px solid var(--ui-border); }
.log-tab {
    flex: 1;
    padding: 6px;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.78rem;
    border-radius: 0;
    border-right: 1px solid var(--ui-border);
}
.log-tab:last-child { border-right: none; }
.log-tab.active { color: var(--text); background: rgba(255,255,255,0.06); }
.log-content { flex: 1; overflow-y: auto; padding: 4px 0; }
.log-empty { color: var(--text-dim); font-size: 0.82rem; padding: 10px 12px; }

#chat-window {
    width: 100%;
    background: var(--ui-bg);
    border-top: 1px solid var(--ui-border);
    border-right: 1px solid var(--ui-border);
    border-radius: 0 8px 0 0;
    display: flex;
    flex-direction: column;
}
#chat-messages {
    height: 100px;
    overflow-y: auto;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.chat-msg { font-size: 0.78rem; color: #ccc; line-height: 1.35; word-break: break-word; }
.chat-name { color: var(--gold); font-weight: 700; }
#chat-input-row { display: flex; border-top: 1px solid var(--ui-border); }
#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #eee;
    padding: 7px 10px;
    font-size: 0.82rem;
    outline: none;
}
#chat-input::placeholder { color: #555; }
#chat-input-row button {
    background: transparent;
    color: var(--gold);
    padding: 0 12px;
    font-size: 1rem;
    border-left: 1px solid var(--ui-border);
    border-radius: 0;
}

/* ── BUY-IN OVERLAY ────────────────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}
#buyin-modal {
    background: #1e2535;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 28px 32px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.7);
}
#buyin-modal h3 {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: 4px;
}
#buyin-modal input[type="text"],
#buyin-modal input[type="number"],
#buyin-modal input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 0.95rem;
}
#buyin-modal input:focus { outline: none; border-color: var(--gold); }
#buyin-modal input::placeholder { color: #555; }
.modal-btn { width: 100%; padding: 11px; font-size: 1rem; }

/* ── ADMIN POPUP ───────────────────────────────────────────────────── */
#admin-request-modal {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 250;
    background: #1e2535;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px 18px;
    min-width: 300px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.popup-request {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.popup-request:last-child { border-bottom: none; }
.popup-details { font-size: 0.88rem; color: #ddd; line-height: 1.6; }
.popup-btns { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.popup-action { min-width: 80px; padding: 6px 12px; font-size: 0.82rem; }

/* ── CUSTOM CONFIRM DIALOG ─────────────────────────────────────────── */
/* Replaces browser confirm() so "site says" header is hidden */
#confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}
#confirm-box {
    background: #1e2535;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    padding: 28px 32px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.7);
    text-align: center;
}
#confirm-box p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.5;
}
#confirm-box .confirm-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}
#confirm-box .confirm-btns button {
    min-width: 90px;
    padding: 9px 16px;
    font-size: 0.92rem;
}

/* ── Kill Hand dialog ───────────────────────────────────────────────── */
#kill-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex; align-items: center; justify-content: center;
    z-index: 500;
}
#kill-box {
    background: #1a2035;
    border: 1px solid rgba(255,80,80,0.45);
    border-radius: 12px;
    padding: 28px 32px;
    min-width: 320px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}
#kill-box p:first-child {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ff6b6b;
    margin: 0 0 8px;
}
.kill-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin: 0 0 20px !important;
    line-height: 1.5;
}

/* Kill button in admin bar */
.btn-kill {
    color: #ff6b6b !important;
}
.btn-kill:hover {
    background: rgba(255,80,80,0.18) !important;
    color: #ff4444 !important;
}
.btn-dimmed {
    opacity: 0.3;
    pointer-events: none;
}

/* ── DISCARD BAR ────────────────────────────────────────────────────── */
#discard-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 18px 16px;
    background: var(--ui-bg);
    border-top: 1px solid var(--ui-border);
    border-left: 1px solid var(--ui-border);
    border-radius: 10px 0 0 0;
    backdrop-filter: blur(10px);
}
#discard-hint {
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.04em;
    opacity: 0.85;
}
#discard-btns {
    display: flex;
    gap: 10px;
}

/* ── CARD WRAP (legacy - kept for show-hand phase only) ────────────── */
.card-wrap {
    display: contents;  /* invisible wrapper — preserves card-row overlap */
    cursor: pointer;
}
/* When a card is selected for discard: lift + gold ring */
.card-wrap .card.selected,
.card.selected {
    transform: translateY(-12px) !important;
    box-shadow: 0 0 0 2px var(--gold), 0 6px 16px rgba(0,0,0,0.6) !important;
    z-index: 30 !important;
}
/* Faint X overlay on selected cards */
.card.selected::after {
    content: '\2715';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: rgba(220, 60, 60, 0.75);
    pointer-events: none;
}

/* ── LOG ENTRIES ────────────────────────────────────────────────────── */
.log-entry {
    font-size: 0.79rem;
    color: #bbb;
    padding: 2px 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.log-header {
    color: var(--gold);
    font-weight: 700;
    padding-top: 6px;
    letter-spacing: 0.04em;
}
.log-win  { color: #7dffb0; font-weight: 700; }
.log-fold { color: var(--text-dim); }

/* ── LEDGER TABLE ───────────────────────────────────────────────────── */
.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.ledger-table th {
    color: var(--text-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-bottom: 1px solid var(--ui-border);
    text-align: left;
}
.ledger-table td {
    padding: 5px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #ddd;
}
.ledger-table td:last-child { text-align: right; font-weight: 700; }
.net-pos  { color: #7dffb0; }
.net-neg  { color: #ff7070; }
.net-zero { color: var(--text-dim); }

/* ── SHOW HAND BUTTON ───────────────────────────────────────────────── */
.show-hand-btn {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(240,192,64,0.18);
    border: 1px solid rgba(240,192,64,0.55);
    border-radius: 6px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
}
.show-hand-btn:hover {
    background: rgba(240,192,64,0.32);
}

/* ── DRAW ROUND INDICATOR ───────────────────────────────────────────── */
#draw-round-indicator {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(240,192,64,0.5);
    pointer-events: none;
    z-index: 3;
    white-space: nowrap;
}

/* ── DRAW ROUND — side-by-side cards with expanded bubble ───────────── */
.seat.in-draw-round .card-row .card {
    margin-left: 4px !important;  /* override the -12px overlap */
    cursor: pointer;
}
.seat.in-draw-round .card-row .card:first-child {
    margin-left: 0 !important;
}
.seat.in-draw-round .bubble {
    min-width: 220px;
    max-width: 280px;
}

/* Pending-back: slightly faded to distinguish from real cards */
.card.pending-back {
    opacity: 0.55;
    margin-left: 4px !important;
}
.card.pending-back:first-child {
    margin-left: 0 !important;
}

/* ── LOG ENTRY STYLES ───────────────────────────────────────────────── */
.log-hand-num {
    color: var(--gold);
    font-weight: 900;
    font-size: 0.88rem;
    padding-top: 8px;
    letter-spacing: 0.06em;
}
.log-err {
    color: #ff6b6b;
    font-weight: 700;
}

/* ── REBUY DIALOG ───────────────────────────────────────────────────── */
#rebuy-modal {
    background: #1e2535;
    border: 1px solid rgba(240,192,64,0.4);
    border-radius: 14px;
    padding: 28px 32px;
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.75);
    text-align: center;
}
#rebuy-modal h3 {
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}
#rebuy-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin: 0;
}
#rebuy-amount {
    width: 100%;
    padding: 10px 12px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 1rem;
    text-align: center;
    outline: none;
}
#rebuy-amount:focus { border-color: var(--gold); }

/* ── REBUY PENDING BANNER ───────────────────────────────────────────── */
#rebuy-pending-banner {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10,14,26,0.92);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 10px 24px;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    z-index: 200;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* ── REBUY WAITING BANNER (on table) ───────────────────────────────── */
#rebuy-banner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, 55px);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(240,192,64,0.9);
    text-shadow: 0 0 20px rgba(240,192,64,0.4);
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

/* ── WINNER GLOW at showdown ────────────────────────────────────────── */
.seat.winner .bubble {
    border-color: var(--gold) !important;
    box-shadow:
        0 0 0 2px var(--gold),
        0 0 24px 6px rgba(240,192,64,0.55),
        0 0 48px 12px rgba(240,192,64,0.25) !important;
    animation: winner-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes winner-pulse {
    from {
        box-shadow:
            0 0 0 2px var(--gold),
            0 0 18px 4px rgba(240,192,64,0.45),
            0 0 36px 8px rgba(240,192,64,0.2);
    }
    to {
        box-shadow:
            0 0 0 2px var(--gold),
            0 0 32px 10px rgba(240,192,64,0.7),
            0 0 60px 18px rgba(240,192,64,0.35);
    }
}

/* ── SHOWDOWN CARD DIM — unused cards greyed out ────────────────────── */
.card.card-dim {
    opacity: 0.32;
    filter: grayscale(70%);
    transform: none !important;  /* prevent hover lift on dim cards */
    box-shadow: none !important;
    cursor: default;
}
.card.card-dim:hover {
    transform: none !important;
    box-shadow: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════
   MOBILE & PWA — responsive layout for phones/tablets
   Desktop layout (≥900px) is completely unchanged.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── MOBILE NAV BAR ─────────────────────────────────────────────────── */
#mobile-nav {
    display: none; /* hidden on desktop */
}

@media (max-width: 899px) {

/* ── BASE OVERRIDES ──────────────────────────────────────────────────── */
html, body {
    overflow: hidden;
    /* safe area for notched phones */
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ── MOBILE NAV BAR ──────────────────────────────────────────────────── */
#mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: var(--ui-bg);
    border-top: 1px solid var(--ui-border);
    backdrop-filter: blur(12px);
    z-index: 300;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mnav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    color: var(--text-dim);
    border-radius: 0;
    border: none;
    padding: 6px 4px;
    font-size: 0;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    min-width: 44px;
}
.mnav-btn:hover, .mnav-btn:active { background: rgba(255,255,255,0.07); color: var(--text); }
.mnav-btn.active { color: var(--gold); }
.mnav-icon { font-size: 1.3rem; line-height: 1; }
.mnav-label { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: inherit; }

/* ── TABLE WRAP — leave room for action bar + nav only ──────────────── */
#table-wrap {
    position: fixed;
    left: 0; right: 0;
    top: 0;
    bottom: 140px; /* action bar ~84px + nav 56px */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
#poker-table {
    /* scale set by JS — transform-origin center center */
    flex-shrink: 0;
}

/* ── HIDE DESKTOP CORNER PANELS ──────────────────────────────────────── */
#top-left, #top-right, #bottom-left { display: none !important; }

/* ── MOBILE TOP INFO BAR — removed, no content ─────────────────────── */
#mobile-topbar { display: none; }

/* ── ACTION BAR — full-width above nav ───────────────────────────────── */
#bottom-right {
    position: fixed;
    left: 0; right: 0;
    bottom: 56px; /* sit on top of mobile-nav */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    z-index: 250;
    padding-bottom: 0;
}
#cof-row {
    justify-content: center;
    padding: 4px 16px 2px;
}
#action-bar {
    border-radius: 0;
    border-left: none;
    border-top: 1px solid var(--ui-border);
    padding: 10px 12px 12px;
    gap: 8px;
    justify-content: center;
}
.action-btn {
    flex: 1;
    min-width: 0;
    padding: 14px 8px;
    font-size: 0.95rem;
}
#raise-group { flex: 1.5; display: flex; gap: 6px; }
#raise-amount { flex: 1; min-width: 0; }
#discard-bar {
    border-radius: 0;
    border-left: none;
    align-items: stretch;
    padding: 10px 12px 12px;
}
#discard-btns { justify-content: center; }

/* ── MOBILE DRAWER ────────────────────────────────────────────────────── */
#mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 400;
    pointer-events: none;
}
#mobile-drawer.open {
    pointer-events: all;
}
#mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.28s;
    z-index: 1;   /* below the panel */
}
#mobile-drawer.open #mobile-drawer-backdrop {
    background: rgba(0,0,0,0.55);
}
#mobile-drawer-panel {
    position: absolute;
    bottom: 56px; left: 0; right: 0;
    background: #161c2c;
    border-top: 1px solid var(--ui-border);
    border-radius: 16px 16px 0 0;
    max-height: 72vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32,0.72,0,1);
    padding-bottom: env(safe-area-inset-bottom, 0);
    pointer-events: all;
    z-index: 2;   /* above the backdrop so clicks reach the panel */
}
#mobile-drawer.open #mobile-drawer-panel {
    transform: translateY(0);
}

/* Drawer inner styles */
.mdrawer-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding: 14px 18px 6px;
    border-bottom: 1px solid var(--ui-border);
}
.mdrawer-items {
    padding: 8px 0;
}
.mdrawer-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 20px;
    background: transparent;
    color: var(--text);
    border-radius: 0;
    font-size: 1rem;
    font-weight: 400;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mdrawer-item:last-child { border-bottom: none; }
.mdrawer-item:hover { background: rgba(255,255,255,0.06); }
.mdrawer-log-body {
    max-height: 44vh;
    overflow-y: auto;
    padding: 4px 0;
}
#mdrawer-log-tabs {
    display: flex;
    border-bottom: 1px solid var(--ui-border);
}

/* ── MOBILE SEAT BUBBLES — slightly smaller ──────────────────────────── */
body.is-mobile .bubble {
    min-width: 110px;
    max-width: 145px;
    padding: 5px 8px 4px;
    gap: 3px;
}
body.is-mobile .p-name  { font-size: 0.75rem; max-width: 70px; }
body.is-mobile .p-stack { font-size: 0.75rem; }
body.is-mobile .card { width: 32px; height: 46px; }
body.is-mobile .card-rank { font-size: 0.82rem; }
body.is-mobile .card-suit-center { font-size: 1.2rem; }
body.is-mobile #board-cards .card { width: 52px; height: 73px; }
body.is-mobile #board-cards .card-rank { font-size: 1.1rem; }
body.is-mobile #board-cards .card-suit-center { font-size: 1.8rem; }

/* Widen in-draw-round bubble on mobile */
body.is-mobile .seat.in-draw-round .bubble { min-width: 180px; max-width: 240px; }

} /* end @media (max-width: 899px) */

/* ── STUD UPCARD / DOWNCARD VISUAL ──────────────────────────────────── */

/* Downcard: shifted down 10px relative to upcards */
.card.card-down {
    transform: translateY(10px);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-row .card.card-down:hover {
    transform: translateY(0px);   /* hover lifts back to baseline */
    box-shadow: 2px 8px 18px rgba(0,0,0,0.6);
    z-index: 20 !important;
}

/* UP label — tiny text bottom-left of upcard */
.card-up-label {
    position: absolute;
    bottom: 3px;
    left: 4px;
    font-size: 0.42rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: rgba(0,0,0,0.38);
    line-height: 1;
    pointer-events: none;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Stud card-row: extra bottom padding to contain the downcard shift */
.card-row.stud-row {
    padding-bottom: 12px;   /* room for the 10px down-shift */
    align-items: flex-start; /* upcards at top; downcards hang below */
}

/* Bubble min-height grows automatically because card-row is taller */
/* Ensure bubble-info (name/stack) stays above the card row */
.seat .bubble {
    overflow: visible;  /* allow downcard to hang below bubble edge */
}

/* ── STUD 7-CARD ROW — tighter overlap + wider bubble ───────────────── */
/* 7 cards × 40px with 17px overlap = 40 + 6×23 = 178px — fits in 185px bubble */
.card-row.stud-row .card {
    margin-left: -17px !important;
}
.card-row.stud-row .card:first-child {
    margin-left: 0 !important;
}
.seat .bubble.stud-bubble {
    min-width: 158px;
    max-width: 195px;
    overflow: visible;
}

/* Mobile stud bubble */
@media (max-width: 899px) {
    body.is-mobile .bubble.stud-bubble {
        min-width: 128px;
        max-width: 165px;
    }
    body.is-mobile .card-row.stud-row .card {
        margin-left: -15px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   PORTRAIT MODE — felt oval rotates 90°; seats hug the rotated oval.
   Table container stays 1125×625. Felt rotates inside it.
   Rotated oval geometry (in table coord space):
     Center: (562, 312)   Semi-major: 562 (vertical)   Semi-minor: 312 (horizontal)
     Left edge:  x = 250   Right edge: x = 874
     Top edge:   y = -250  Bottom edge: y = 874
   Seat counter-scaling (making them readable) is done by JS injecting
   per-rpos transform rules into #portrait-seat-style. Only position
   and layout are defined here.
   ═══════════════════════════════════════════════════════════════════════ */

body.is-portrait #table-felt {
    transform: rotate(90deg);
}
/* table-wrap overflow:visible set by JS so seats outside the container show */
#table-wrap { overflow: visible; }

/* Centre content stays on top of felt */
body.is-portrait #pot-area,
body.is-portrait #board-cards,
body.is-portrait #table-game-label,
body.is-portrait #draw-round-indicator,
body.is-portrait #paused-banner,
body.is-portrait #rebuy-banner { z-index: 2; }

/* ── PORTRAIT SEAT POSITIONS ────────────────────────────────────────
   Positions place the seat div's nearest corner touching the oval edge.
   JS counter-scale grows the bubble outward from transform-origin.
   ──────────────────────────────────────────────────────────────────── */

/* ── PORTRAIT SEAT POSITIONS — rail-touching clock positions ────────
   Bottom seats anchor grows UPWARD (transform-origin:bottom in JS).
   ──────────────────────────────────────────────────────────────────── */

/* 12 o'clock */
body.is-portrait .rpos-top-centre {
    top: -250px; bottom: auto;
    left: 50%;   right: auto;
    transform: none;
}
/* 1:30 */
body.is-portrait .rpos-top-right {
    top: -85px;  bottom: auto;
    left: 783px; right: auto;
    transform: none;
}
/* 3:00 — slightly inward */
body.is-portrait .rpos-right {
    top: 50%;    bottom: auto;
    left: 730px; right: auto;
    transform: none;
}
/* 4:30 — bubble grows upward from anchor */
body.is-portrait .rpos-bot-right {
    top: 709px;  bottom: auto;
    left: 783px; right: auto;
    transform: none;
}
/* 6:00 — raised so upward-growing bubble clears action bar */
body.is-portrait .rpos-bot-centre {
    top: 810px;  bottom: auto;
    left: 50%;   right: auto;
    transform: none;
}
/* 7:30 */
body.is-portrait .rpos-bot-left {
    top: 709px;  bottom: auto;
    left: 341px; right: auto;
    transform: none;
}
/* 9:00 — slightly inward */
body.is-portrait .rpos-left {
    top: 50%;    bottom: auto;
    left: 240px; right: auto;
    transform: none;
}
/* 10:30 */
body.is-portrait .rpos-top-left {
    top: -85px;  bottom: auto;
    left: 341px; right: auto;
    transform: none;
}

/* ── PORTRAIT BUBBLE BASELINE SIZE ──────────────────────────────────
   These are pre-counter-scale sizes in table coordinate space.
   JS scales the .seat up by ~1/tableScale so these appear full-size
   on screen.  Keep them at normal desktop values.               ────── */
body.is-portrait .bubble {
    min-width: 138px;
    max-width: 175px;
}

/* ── PORTRAIT BET CHIP OVERRIDES ────────────────────────────────────
   Chips point toward table center so they don't overlap the seat box
   or spill into the action bar / off screen.                    ────── */
body.is-portrait .rpos-bot-centre .bet-chip {
    bottom: auto;
    top: calc(100% + 10px);   /* chip goes DOWN toward table — away from action bar */
    left: 50%; transform: translateX(-50%);
}
body.is-portrait .rpos-bot-left .bet-chip {
    bottom: auto;
    top: calc(100% + 10px);
    right: auto; left: 60%;
}
body.is-portrait .rpos-right .bet-chip {
    right: auto;
    left: auto;
    right: calc(100% + 10px);  /* chip to the LEFT toward center */
    top: 50%; transform: translateY(-50%);
}
body.is-portrait .rpos-bot-right .bet-chip {
    bottom: auto;
    top: calc(100% + 10px);
    right: auto; left: 20%;
}


/* ── STUD CARD ROW — fix 6/7 card overflow ──────────────────────────
   7 cards × 40px, overlap 20px: width = 40 + 6×20 = 160px.
   stud-bubble max-width 210px − 20px padding = 190px inner. 160 < 190.  */
.card-row.stud-row .card {
    margin-left: -20px !important;
}
.card-row.stud-row .card:first-child {
    margin-left: 0 !important;
}
.seat .bubble.stud-bubble {
    min-width: 160px;
    max-width: 210px;
    overflow: visible;
}

