/* Texas Hold'em trainer — viewport-scaled table layout */

.pkr-main-content { padding-bottom: 0; }
.pkr-content-wrapper {
    max-width: 100%;
    width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}
.pkr-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 8px 0 16px;
    color: #f2f2f2;
}
.pkr-table-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.pkr-archetype-label { font-size: .82rem; display: flex; gap: 5px; align-items: center; flex: 1 1 140px; }
.pkr-archetype-label .pkr-select { flex: 1; min-width: 0; }

/* Settings gear — on table rail (not clipped by felt overflow) */
.pkr-felt-settings {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 50;
    background: linear-gradient(145deg, #e0a82e, #c8941f);
    color: #1a1a1a;
    border: 2px solid rgba(255,255,255,.25);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,.45);
    transition: background .15s, transform .12s;
}
.pkr-felt-settings:hover { background: linear-gradient(145deg, #f0bc42, #d9a024); transform: scale(1.04); }

/* ── Poker table shell (oval rail — controls live in .pkr-hero-dock sibling) ── */
.pkr-poker-table {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #5a3a1a, #3a2410);
    padding: 14px;
    border-radius: 28px;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    margin-bottom: 0;
    overflow: visible;
}
.pkr-felt {
    --pkr-scale: 1;
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    background:
        radial-gradient(ellipse 92% 85% at 50% 45%, #2a6b4a 0%, #1d5238 55%, #133b27 100%);
    border-radius: 22px;
    border: 3px solid rgba(201,148,31,.55);
    box-shadow: inset 0 0 70px rgba(0,0,0,.45);
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    box-sizing: border-box;
}

/* Play area — seat ring lives here; controls are in hero-dock below */
.pkr-table-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
    padding: 44px 8px 4px;
    box-sizing: border-box;
}
/* ── Seat zones around the felt (all screen sizes) ── */
.pkr-zone--top {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: calc(8px * var(--pkr-scale));
    flex-wrap: nowrap;
    width: 100%;
    min-height: 0;
    z-index: 5;
    padding-right: 8px;
    box-sizing: border-box;
}
.pkr-zone--left,
.pkr-zone--right {
    position: absolute;
    top: 14%;
    bottom: 26%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    z-index: 5;
    width: calc(76px * var(--pkr-scale));
    max-width: 15%;
    pointer-events: none;
}
.pkr-zone--left .pkr-seat-bot,
.pkr-zone--right .pkr-seat-bot { pointer-events: auto; }
.pkr-zone--left {
    left: 1.5%;
    flex-direction: column-reverse;
}
.pkr-zone--right { right: 1.5%; }

.pkr-bottom-row {
    position: relative;
    width: 100%;
    z-index: 6;
    flex-shrink: 0;
    margin-top: auto;
    min-height: calc(96px * var(--pkr-scale));
    padding-bottom: 2px;
    box-sizing: border-box;
}
#pkr-seat-hero {
    position: relative;
    z-index: 7;
    margin: 0 auto;
    width: fit-content;
    max-width: 42%;
}
#pkr-bottom-left-seat {
    position: absolute;
    left: clamp(1%, 3vw, 8%);
    bottom: 6px;
    z-index: 5;
}
#pkr-bottom-right-seat {
    position: absolute;
    right: clamp(1%, 3vw, 8%);
    bottom: 6px;
    z-index: 5;
}
.pkr-zone--bottom-corner {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    max-width: calc(100px * var(--pkr-scale));
}
.pkr-zone--bottom-corner .pkr-seat-bot {
    flex-direction: column-reverse;
    max-width: 96px;
    padding-bottom: 0;
}

/* Middle row: center pot + board — keep above overlapping seat artifacts */
.pkr-table-middle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    z-index: 8;
    position: relative;
    min-height: calc(80px * var(--pkr-scale));
    padding: 0 18%;
    box-sizing: border-box;
}
.pkr-table-middle .pkr-center {
    flex: 1;
    max-width: 420px;
    position: relative;
    z-index: 8;
}

/* Bot seats in zones */
.pkr-zone .pkr-seat-bot {
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: auto;
    padding: 4px 5px;
    gap: 3px;
}
.pkr-zone--top .pkr-seat-bot { flex: 0 1 auto; max-width: 120px; }
.pkr-felt[data-bots="8"] .pkr-zone--top .pkr-seat-bot,
.pkr-felt[data-bots="9"] .pkr-zone--top .pkr-seat-bot { max-width: 100px; }

.pkr-felt[data-bots="8"],
.pkr-felt[data-bots="9"] { min-height: 360px; }

.pkr-felt[data-bots="9"] .pkr-zone--top {
    justify-content: space-evenly;
    padding: 0 12% 0 8%;
    gap: calc(3px * var(--pkr-scale));
}
.pkr-felt[data-bots="9"] .pkr-zone--top .pkr-seat-bot { max-width: calc(88px * var(--pkr-scale)); }
.pkr-felt[data-bots="9"] .pkr-table-middle { padding: 0 20%; }

/* Seats */
.pkr-seat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    min-height: 110px;
    width: 100%;
    max-width: 360px;
}
.pkr-seat-hero {
    position: relative;
    z-index: 6;
    flex-shrink: 0;
    width: auto;
    max-width: 200px;
    min-height: auto;
    padding: 6px 10px;
}
.pkr-seat-folded { opacity: .45; }
.pkr-seat-acting .pkr-seat-avatar {
    box-shadow: 0 0 0 2px #ffd54a, 0 0 12px rgba(255,213,74,.55);
}
.pkr-seat-avatar {
    width: calc(36px * var(--pkr-scale)); height: calc(36px * var(--pkr-scale)); border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #3a4a5a, #1a2330);
    border: 2px solid #c8941f; display: flex; align-items: center; justify-content: center;
    font-size: calc(.95rem * var(--pkr-scale)); color: #ffd54a;
}
.pkr-seat-info { text-align: center; }
.pkr-seat-name { font-weight: 800; letter-spacing: .04em; font-size: calc(.82rem * var(--pkr-scale)); }
.pkr-seat-stack { font-size: calc(.76rem * var(--pkr-scale)); color: #ffd54a; }
.pkr-hole-cards {
    display: flex; gap: calc(4px * var(--pkr-scale));
    min-height: calc(60px * var(--pkr-scale));
    align-items: center; perspective: 600px;
}

/* Wrapper lets side-seat CSS rotate the inner hole-cards without layout disruption */
.pkr-hole-wrapper { display: flex; align-items: center; justify-content: center; }

/* Left / right zones: rotate hole cards toward table center */
.pkr-zone--left .pkr-hole-wrapper {
    width: calc(58px * var(--pkr-scale)); height: calc(88px * var(--pkr-scale));
    position: relative; overflow: visible;
}
.pkr-zone--left .pkr-hole-wrapper .pkr-hole-cards {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg); min-height: auto;
}
.pkr-zone--right .pkr-hole-wrapper {
    width: calc(58px * var(--pkr-scale)); height: calc(88px * var(--pkr-scale));
    position: relative; overflow: visible;
}
.pkr-zone--right .pkr-hole-wrapper .pkr-hole-cards {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(90deg); min-height: auto;
}

.pkr-committed-chip {
    position: absolute;
    left: 50%; transform: translateX(-50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: #fff;
    border: 3px solid #888; color: #888; font-weight: 800; font-size: .62rem;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.55); z-index: 4;
}
/* Top bots: chip below seat toward pot */
.pkr-zone--top .pkr-seat-bot .pkr-committed-chip { bottom: -18px; top: auto; }
/* Bottom corner bots: chip above cards toward pot */
.pkr-zone--bottom-corner .pkr-seat-bot .pkr-committed-chip { top: -44px; bottom: auto; }
/* Side bots: chip toward center */
.pkr-zone--left .pkr-committed-chip {
    left: auto; right: -18px; bottom: auto; top: 50%; transform: translateY(-50%);
}
.pkr-zone--right .pkr-committed-chip {
    right: auto; left: -18px; bottom: auto; top: 50%; transform: translateY(-50%);
}
.pkr-seat-bot .pkr-committed-chip { bottom: -20px; top: auto; }
.pkr-seat-hero .pkr-committed-chip { top: -54px; bottom: auto; }
.pkr-dealer-button {
    position: absolute; right: 6px; width: 26px; height: 26px; border-radius: 50%;
    background: #fff; color: #1a1a1a; font-weight: 800; font-size: .8rem;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #c8941f; box-shadow: 0 2px 4px rgba(0,0,0,.4);
}
.pkr-seat-bot .pkr-dealer-button { bottom: 4px; }
/* Hero dealer chip sits beside stack info — never on top of hole cards */
.pkr-seat-hero .pkr-dealer-button {
    top: auto;
    bottom: 4px;
    left: -28px;
    right: auto;
    z-index: 12;
}

/* Center: pot + community */
.pkr-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pkr-pot {
    font-weight: 800; color: #ffd54a; font-size: .95rem; letter-spacing: .05em;
    background: rgba(0,0,0,.3); padding: 3px 14px; border-radius: 14px;
}
.pkr-board { display: flex; gap: 6px; min-height: 70px; align-items: center; perspective: 800px; }
.pkr-hand-summary { font-weight: 700; color: #ffe082; min-height: 20px; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* Flip-capable cards — scaled via --pkr-scale */
.pkr-card3d {
    width: calc(44px * var(--pkr-scale));
    height: calc(61px * var(--pkr-scale));
    position: relative;
}
.pkr-card3d-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d; transition: transform .5s cubic-bezier(.4,0,.2,1);
    transform: rotateY(180deg);
}
.pkr-card3d-inner.flipped { transform: rotateY(0deg); }
.pkr-card3d-face {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    border-radius: 5px; overflow: hidden; box-shadow: 0 3px 7px rgba(0,0,0,.5);
}
.pkr-card3d-front { transform: rotateY(0deg); }
.pkr-card3d-back { transform: rotateY(180deg); }
.pkr-card3d-face img { width: 100%; height: 100%; display: block; }
.pkr-card3d-back {
    background: #14532d;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255,255,255,.12) 5px, rgba(255,255,255,.12) 10px);
    border: 1px solid #0c3a1f;
}
@keyframes pkrDealIn { from { opacity: 0; transform: translateY(-70px) scale(.8); } to { opacity: 1; transform: translateY(0) scale(1); } }
.pkr-card3d.pkr-dealing { animation: pkrDealIn .38s ease-out; }

/* Flying chip — color set dynamically by JS */
.pkr-flying-chip {
    position: fixed; z-index: 9998; width: 32px; height: 32px; border-radius: 50%;
    background: #fff;
    border: 3px solid #888; color: #888; font-weight: 800; font-size: .58rem;
    display: flex; align-items: center; justify-content: center; pointer-events: none;
    box-shadow: 0 3px 8px rgba(0,0,0,.5);
    transition: transform .5s cubic-bezier(.25,.46,.45,.94), opacity .5s ease;
}

/* ── Hero control dock — sibling below felt ── */
.pkr-hero-dock {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
    z-index: 25;
}
.pkr-stake-row { width: 100%; }
.pkr-stake-row[style*="display: none"] + .pkr-actions { margin-top: 0; }

.pkr-stake-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(8, 18, 28, .72);
    border: 1px solid rgba(201, 148, 31, .35);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.pkr-stake-label {
    font-weight: 700;
    color: #e8f0fa;
    font-size: .88rem;
    letter-spacing: .03em;
}
.pkr-stake-label #pkr-blinds-display {
    color: #ffd54a;
    font-size: 1rem;
    margin-left: 4px;
}
.pkr-chip-deck {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}
.pkr-chip-select {
    width: calc(48px * var(--pkr-scale, 1));
    height: calc(48px * var(--pkr-scale, 1));
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    border: 3px dashed rgba(255,255,255,.45);
    font-weight: 800;
    font-size: calc(.76rem * var(--pkr-scale, 1));
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.15);
    position: relative;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    color: #fff;
}
.pkr-chip-select::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.3);
}
.pkr-chip-select:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0,0,0,.5); }
.pkr-chip-select.selected {
    border-style: solid;
    border-color: #ffd54a;
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 0 0 2px rgba(255,213,74,.35), 0 6px 14px rgba(0,0,0,.45);
}
.pkr-chip-deck.locked { opacity: .45; pointer-events: none; filter: grayscale(.3); }

/* Action bar */
.pkr-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
    background: rgba(8, 18, 28, .78);
    border: 1px solid rgba(46, 74, 102, .85);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    box-sizing: border-box;
}
.pkr-actions--compact { flex-wrap: nowrap; gap: 6px; }
.pkr-actions--compact .pkr-btn-action { padding: 10px 12px; font-size: .88rem; }
.pkr-actions--compact .pkr-input-raise { width: 68px; min-width: 60px; }

.pkr-btn {
    background: linear-gradient(180deg, #3a5f85 0%, #2e4a66 100%);
    color: #fff;
    border: 1px solid #4a7199;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s, transform .1s, box-shadow .12s;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.pkr-btn:hover { background: linear-gradient(180deg, #4a7199 0%, #3a6291 100%); transform: translateY(-1px); }
.pkr-btn:active { transform: translateY(0); }
.pkr-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.pkr-btn-sm { padding: 5px 12px; font-size: .85rem; }
.pkr-btn-primary {
    background: linear-gradient(180deg, #e0a82e 0%, #c8941f 100%);
    border-color: #f0c050;
    color: #1a1208;
}
.pkr-btn-primary:hover { background: linear-gradient(180deg, #f0bc42 0%, #d9a024 100%); }
.pkr-btn-deal {
    background: linear-gradient(180deg, #3cb56e 0%, #2f9e5c 100%);
    border-color: #4cd480;
    color: #fff;
    min-width: 100px;
    flex: 1 1 auto;
    max-width: 200px;
    font-size: 1rem;
    letter-spacing: .04em;
}
.pkr-btn-deal:hover { background: linear-gradient(180deg, #4cd480 0%, #38b56b 100%); }
.pkr-btn.selected { background: #c8941f; color: #1a1a1a; }
.pkr-input {
    background: #0a121a;
    color: #ffd54a;
    border: 2px solid #3a6291;
    border-radius: 8px;
    padding: 8px 10px;
    width: 90px;
    font-size: .95rem;
    font-weight: 700;
    text-align: center;
}
.pkr-input-raise:focus { outline: none; border-color: #c8941f; box-shadow: 0 0 0 2px rgba(200,148,31,.25); }
.pkr-input-wide { width: 100%; max-width: 360px; }

/* Logs — single target in Settings → Log tab */
.pkr-log {
    background: #0c1620;
    border: 1px solid #2e4a66;
    border-radius: 8px;
    padding: 8px;
    overflow-y: auto;
    font-size: .82rem;
}
.pkr-log-tab {
    height: calc(100vh - 340px);
    min-height: 180px;
    max-height: 520px;
    margin: 0;
}
.pkr-log-line { padding: 1px 0; border-bottom: 1px solid #16232f; }
.pkr-sizing-hint { font-size: .74rem; padding: 2px 7px; border-radius: 4px; text-align: center; cursor: default; white-space: nowrap; }
.pkr-sizing-good { color: #5cb85c; }
.pkr-sizing-warn { color: #e0a82e; }
.pkr-sizing-over { color: #d9534f; }
.pkr-history-row { font-size: .80rem; padding: 3px 0; border-bottom: 1px solid #1e3048; color: #c8d4e0; }
.pkr-history-row strong { color: #e8f0fa; }
.pkr-history-row em { font-style: normal; color: #a0b8d0; }

/* ── Settings drawer ── */
.pkr-settings-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 1040; }
.pkr-settings-overlay.open { opacity: 1; visibility: visible; }
.pkr-settings-drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: 460px; max-width: 94vw;
    background: #0e1822; border-left: 2px solid #2e4a66;
    transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 1041; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,.5);
}
.pkr-settings-drawer.open { transform: translateX(0); }
.pkr-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #2e4a66; background: #0a121a; }
.pkr-drawer-header h2 { margin: 0; font-size: 1.1rem; color: #ffd54a; }
.pkr-drawer-game-settings {
    padding: 12px 16px;
    border-bottom: 1px solid #2e4a66;
    background: #0a121a;
}
.pkr-drawer-game-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: #ffd54a;
    font-weight: 800;
}
.pkr-drawer-selectors {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pkr-drawer-selectors .pkr-archetype-label {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: 8px;
    flex: none;
    font-size: .84rem;
    margin: 0;
    min-height: 0;
}
.pkr-drawer-selectors .pkr-archetype-label .pkr-select {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 4px 8px;
    font-size: .82rem;
    line-height: 1.2;
}
/* ── Pro Gate ── */
.pkr-pro-gate {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 24px 16px; text-align: center;
    background: rgba(100,200,120,.05); border: 1px dashed rgba(100,200,120,.35);
    border-radius: 8px; margin: 8px 0;
}
.pkr-pro-gate-icon { font-size: 2rem; line-height: 1; }
.pkr-pro-gate-msg { color: #cfe3ff; font-size: .9rem; margin: 0; }
.pkr-pro-gate-msg strong { color: #78d49e; }
.pkr-pro-gate-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-bottom: 1px solid #2e4a66; background: #0e1822;
    color: #cfe3ff; font-size: .85rem;
}
.pkr-pro-gate-row .pkr-pro-gate-icon { font-size: 1.1rem; }
.pkr-strategy-trainer-wrap[data-pro-feature],
.pkr-tab-panel[data-pro-feature] { position: relative; }
.pkr-pro-gate-overlay { position: relative; z-index: 2; }
.pkr-pro-locked-body {
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
}

.pkr-strategy-trainer-row {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px 16px; border-bottom: 1px solid #2e4a66; background: #0e1822;
}
.pkr-strategy-trainer-switch.form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 0;
    min-height: auto;
    margin: 0;
}
.pkr-strategy-trainer-switch .form-check-input {
    width: 2.6em;
    height: 1.35em;
    margin: 0;
    margin-left: 0;
    float: none;
    position: static;
    flex-shrink: 0;
    cursor: pointer;
    background-color: #1b2b3a;
    border-color: #2e4a66;
}
.pkr-strategy-trainer-switch .form-check-input:checked {
    background-color: #c8941f;
    border-color: #c8941f;
}
.pkr-strategy-trainer-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(200, 148, 31, 0.25);
}
.pkr-strategy-trainer-label {
    font-weight: 700;
    font-size: .92rem;
    color: #ffd54a;
    cursor: pointer;
    margin: 0;
    padding-left: 0;
    line-height: 1.3;
}
.pkr-strategy-trainer-hint {
    font-size: .78rem;
    color: #9fb6cc;
    line-height: 1.35;
    padding-left: 0;
    display: block;
}
.pkr-drawer-close { background: none; border: none; color: #f2f2f2; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.pkr-drawer-tabs { display: flex; gap: 3px; padding: 8px 10px 0; border-bottom: 1px solid #2e4a66; flex-wrap: wrap; }
.pkr-tab-btn { background: #1b2b3a; color: #cfe3ff; border: 1px solid #2e4a66; border-bottom: none; border-radius: 8px 8px 0 0; padding: 6px 10px; font-weight: 700; cursor: pointer; font-size: .78rem; flex: 1 1 auto; min-width: 0; text-align: center; }
.pkr-tab-btn.selected { background: #2e5d44; color: #fff; border-color: #3a7a59; }
.pkr-drawer-body { padding: 14px; overflow-y: auto; flex: 1; }
.pkr-tab-panel { display: none; }

/* Common controls (tools) */
.pkr-select { background: #0c1620; color: #f2f2f2; border: 1px solid #2e4a66; border-radius: 6px; padding: 4px 8px; }
.pkr-select-sm { padding: 2px 6px; font-size: .8rem; }
.pkr-field-label { font-size: .82rem; opacity: .85; margin: 10px 0 4px; }
.pkr-field-label code { background: #0c1620; padding: 1px 5px; border-radius: 4px; color: #ffd54a; }
.pkr-status { font-size: .85rem; opacity: .85; min-height: 18px; margin: 8px 0; }
.pkr-run-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.pkr-run-row label { display: flex; gap: 5px; align-items: center; font-size: .85rem; }

/* Equity card picker */
.pkr-card-row { display: flex; gap: 6px; flex-wrap: wrap; min-height: 60px; align-items: center; }
.pkr-card-slot { width: 42px; height: 60px; border-radius: 5px; display: flex; align-items: center; justify-content: center; background: #0c1620; border: 1px dashed #2e4a66; cursor: pointer; color: #44607c; font-size: 1.4rem; }
.pkr-card-img { width: 42px; height: auto; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.pkr-target-toggle { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-size: .85rem; }
.pkr-card-picker { display: flex; flex-direction: column; gap: 3px; }
.pkr-picker-row { display: flex; gap: 3px; }
.pkr-picker-card { flex: 1; min-width: 0; padding: 5px 0; border-radius: 4px; border: 1px solid #2e4a66; background: #0c1620; color: #f2f2f2; font-size: .72rem; font-weight: 700; cursor: pointer; }
.pkr-suit-h, .pkr-suit-d { color: #ff6b6b; }
.pkr-suit-c, .pkr-suit-s { color: #e8e8e8; }
.pkr-card-used { opacity: .28; pointer-events: none; }

/* Range grid */
.pkr-range-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 1px; max-width: 420px; }
.pkr-range-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: .58rem; font-weight: 700; border: 1px solid #233747; cursor: pointer; color: #9fb6cc; user-select: none; }
.pkr-range-pair { background: #1f3a2a; }
.pkr-range-suited { background: #1b2e3f; }
.pkr-range-offsuit { background: #16202b; }
.pkr-range-cell.selected, .pkr-chart-open { background: #c8941f !important; color: #1a1a1a; }
.pkr-chart-grid .pkr-range-cell { cursor: default; }
.pkr-legend { font-size: .8rem; margin-top: 8px; }
.pkr-legend-open, .pkr-legend-fold { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: middle; }
.pkr-legend-open { background: #c8941f; }
.pkr-legend-fold { background: #16202b; border: 1px solid #233747; }

/* Equity results */
.pkr-equity-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin: 10px 0; font-size: .72rem; font-weight: 700; }
.pkr-eq-win { background: #2f9e5c; display: flex; align-items: center; justify-content: center; color: #fff; }
.pkr-eq-tie { background: #888; }
.pkr-eq-lose { background: #b04545; display: flex; align-items: center; justify-content: center; color: #fff; }
.pkr-equity-headline { font-size: 1.05rem; margin-bottom: 10px; }
.pkr-equity-headline strong { color: #ffd54a; }
.pkr-eq-sub { font-size: .8rem; opacity: .8; }
.pkr-pot-odds { background: #0c1620; border-radius: 8px; padding: 10px; margin: 10px 0; }
.pkr-pot-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pkr-pot-row label { display: flex; gap: 5px; align-items: center; font-size: .85rem; }
.pkr-pot-verdict { margin-top: 8px; font-size: .9rem; }
.pkr-call-good { color: #6fe09a; font-weight: 700; }
.pkr-call-bad { color: #ff8a8a; font-weight: 700; }

/* Strategy trainer math panel (SweetAlert2) */
.pkr-strategy-math-panel { margin-top: 14px; text-align: left; max-height: 42vh; overflow-y: auto; }
.pkr-strategy-math { font-size: .84rem; line-height: 1.45; color: #e8eef4; }
.pkr-strategy-math-section {
    background: rgba(12, 22, 32, .92); border: 1px solid #2e4a66;
    border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
}
.pkr-strategy-math-section h4 { margin: 0 0 6px; font-size: .88rem; color: #ffd54a; }
.pkr-strategy-math-section p { margin: 4px 0; }
.pkr-strategy-math-note { font-size: .78rem; opacity: .82; }
.pkr-strategy-math-loading { text-align: center; color: #9fb6cc; padding: 12px 0; }
.pkr-strategy-math-diff { border-color: #c8941f; }

/* Strategy trainer — Show Math button (SweetAlert2 deny) */
button.pkr-swal-math-btn.swal2-deny {
    background-color: #6ec8f0 !important;
    color: #0a121a !important;
    border: none !important;
}
button.pkr-swal-math-btn.swal2-deny:hover {
    background-color: #8ed4f5 !important;
}

.pkr-outs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; margin-top: 8px; }
.pkr-outs-result { color: #ffd54a; font-weight: 700; }
.pkr-outs-note { opacity: .7; font-size: .78rem; }

/* Ranges quiz */
.pkr-quiz-block { margin-top: 14px; }
.pkr-quiz-block h4 { color: #ffd54a; margin: 0 0 8px; }
.pkr-quiz-q { font-size: .95rem; min-height: 48px; margin-bottom: 8px; }
.pkr-red { color: #ff6b6b; } .pkr-black { color: #e8e8e8; }
.pkr-quiz-feedback { min-height: 20px; font-weight: 600; font-size: .88rem; }
.pkr-correct { color: #6fe09a; } .pkr-wrong { color: #ff8a8a; }
.pkr-quiz-score { font-size: .82rem; opacity: .85; margin-top: 6px; }

/* Tools */
.pkr-tool-card { background: #0c1620; border: 1px solid #2e4a66; border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.pkr-tool-card h4 { color: #ffd54a; margin: 0 0 10px; }
.pkr-tool-card label { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; margin-bottom: 8px; }
.pkr-tool-result { margin-top: 10px; font-size: .88rem; }
.pkr-var-line { margin: 3px 0; }
.pkr-honest-note { background: #2a2a1a; border-left: 3px solid #c8941f; padding: 6px 10px; font-size: .8rem; border-radius: 4px; margin-bottom: 10px; }
.pkr-icm-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.pkr-icm-table th, .pkr-icm-table td { padding: 4px 6px; border-bottom: 1px solid #2e4a66; text-align: left; }
.pkr-icm-table td:last-child, .pkr-icm-table td:nth-child(3) { color: #ffd54a; }

@media (max-width: 680px) {
    .pkr-main-content { margin-top: 0 !important; }
    .pkr-content-wrapper {
        max-width: none;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .pkr-container {
        max-width: none;
        padding: 0;
        min-height: calc(100dvh - 42px);
        display: flex;
        flex-direction: column;
    }
    .pkr-table-wrap {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .pkr-poker-table {
        flex: 1;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        min-height: 0;
    }
    .pkr-felt {
        flex: 1;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        min-height: 0;
    }
    .pkr-table-stage { padding: 38px 8px 2px; }
    .pkr-felt-settings {
        position: fixed;
        top: calc(42px + 10px);
        right: max(16px, env(safe-area-inset-right, 16px));
        width: 36px;
        height: 36px;
        font-size: .92rem;
        z-index: 55;
    }
    .pkr-settings-drawer { width: 100vw; }
    .pkr-table-middle { padding: 0 24%; }
    .pkr-zone--left,
    .pkr-zone--right { width: calc(56px * var(--pkr-scale)); max-width: 18%; }
    .pkr-zone--top { gap: 2px; padding: 0 14% 0 10%; }
    #pkr-bottom-left-seat { left: 0; }
    #pkr-bottom-right-seat { right: 0; }
    #pkr-seat-hero { max-width: calc(120px * var(--pkr-scale)); padding: 2px 4px; gap: 3px; }
    .pkr-seat-hero .pkr-hole-cards { min-height: calc(48px * var(--pkr-scale)); }
    .pkr-zone .pkr-seat-bot { padding: 1px 2px; gap: 1px; }
    .pkr-zone .pkr-seat-avatar { width: calc(18px * var(--pkr-scale)); height: calc(18px * var(--pkr-scale)); font-size: .5rem; }
    .pkr-zone .pkr-seat-name { font-size: calc(.5rem * var(--pkr-scale)); letter-spacing: 0; line-height: 1.1; }
    .pkr-zone .pkr-seat-stack { font-size: calc(.46rem * var(--pkr-scale)); line-height: 1.1; }
    .pkr-zone .pkr-dealer-button { width: calc(14px * var(--pkr-scale)); height: calc(14px * var(--pkr-scale)); font-size: .48rem; }
    .pkr-felt[data-bots="9"] .pkr-zone--top .pkr-seat-bot { max-width: calc(58px * var(--pkr-scale)); }
    .pkr-zone--bottom-corner .pkr-seat-bot .pkr-committed-chip { top: -28px; }
    .pkr-seat-hero .pkr-committed-chip { top: -38px; }
    .pkr-seat-hero .pkr-dealer-button {
        bottom: 2px;
        left: -22px;
        width: 18px;
        height: 18px;
        font-size: .55rem;
    }

    .pkr-hero-dock {
        padding: 8px 8px 10px;
        gap: 6px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        background: rgba(8, 18, 28, .85);
        border-top: 1px solid rgba(46, 74, 102, .6);
    }
    .pkr-stake-panel { padding: 8px 10px; gap: 8px; }
    .pkr-stake-label { font-size: .8rem; }
    .pkr-stake-label #pkr-blinds-display { font-size: .92rem; }
    .pkr-chip-deck { flex-wrap: nowrap; gap: 5px; }
    .pkr-chip-select {
        flex: 1 1 0;
        width: auto;
        height: 40px;
        min-width: 0;
        max-width: 46px;
        font-size: .58rem;
    }
    .pkr-chip-select.selected { transform: translateY(-2px) scale(1.04); }
    .pkr-actions {
        padding: 8px 8px;
        gap: 5px;
        flex-wrap: wrap;
    }
    .pkr-actions .pkr-btn-action {
        padding: 9px 8px;
        font-size: .8rem;
        flex: 1 1 0;
        min-width: 0;
    }
    .pkr-actions .pkr-input-raise {
        width: 52px;
        min-width: 48px;
        flex-shrink: 0;
        padding: 7px 4px;
        font-size: .85rem;
    }
    .pkr-actions .pkr-btn-deal {
        flex: 1 1 100%;
        max-width: none;
        padding: 11px 16px;
    }
    .pkr-actions .pkr-sizing-hint {
        order: 10;
        width: 100%;
        flex: 1 1 100%;
        font-size: .66rem;
        white-space: normal;
        text-align: center;
    }

    .pkr-log-tab {
        height: calc(100vh - 300px);
        max-height: none;
        min-height: 160px;
    }
    .pkr-hand-summary { font-size: calc(.72rem * var(--pkr-scale)); line-height: 1.3; padding: 0 4px; }
}

@media (min-width: 681px) {
    .pkr-main-content {
        min-height: calc(100vh - 48px);
        display: flex;
        flex-direction: column;
    }
    .pkr-content-wrapper {
        max-width: none;
        padding: 0 6px;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .pkr-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
        min-height: 0;
        max-width: min(1520px, 96vw);
        width: 100%;
        padding: 4px 0 16px;
    }
    .pkr-table-wrap {
        width: 100%;
        max-width: min(1480px, 95vw);
        margin: 0 auto;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
    }

    /* Classic stadium oval — rail wraps felt only */
    .pkr-poker-table {
        border-radius: 9999px;
        padding: 16px 20px;
        box-shadow: 0 12px 36px rgba(0,0,0,.55);
    }
    .pkr-felt {
        border-radius: 9999px;
        aspect-ratio: 2.25 / 1;
        min-height: 0;
        height: auto;
        max-height: min(calc(100vh - 272px), 660px);
        flex: 0 0 auto;
    }
    .pkr-felt[data-bots="8"],
    .pkr-felt[data-bots="9"] {
        min-height: 0;
        max-height: min(calc(100vh - 272px), 680px);
        aspect-ratio: 2.3 / 1;
    }
    .pkr-table-stage {
        padding: 32px 44px 34px;
    }
    .pkr-felt-settings {
        position: absolute;
        top: 16px;
        right: 28px;
        z-index: 50;
    }
    .pkr-zone--top {
        align-items: flex-start;
        flex-shrink: 0;
        min-height: calc(118px * var(--pkr-scale));
        padding: 0 22% 0 18%;
        gap: calc(18px * var(--pkr-scale));
    }
    .pkr-zone--top .pkr-seat-bot {
        flex-direction: column-reverse;
        gap: calc(4px * var(--pkr-scale));
        padding-bottom: 2px;
    }
    .pkr-zone--left,
    .pkr-zone--right {
        top: 22%;
        bottom: 34%;
        max-width: 10%;
        width: calc(96px * var(--pkr-scale));
    }
    .pkr-zone--left { left: 8%; }
    .pkr-zone--right { right: 8%; }
    /* Side seats: nudge rotated cards toward center so oval edge doesn't clip them */
    .pkr-zone--left .pkr-hole-wrapper,
    .pkr-zone--right .pkr-hole-wrapper {
        width: calc(66px * var(--pkr-scale));
    }
    .pkr-zone--left .pkr-hole-wrapper .pkr-hole-cards {
        transform: translate(-40%, -50%) rotate(-90deg);
    }
    .pkr-zone--right .pkr-hole-wrapper .pkr-hole-cards {
        transform: translate(-60%, -50%) rotate(90deg);
    }
    .pkr-table-middle {
        padding: calc(16px * var(--pkr-scale)) 30% 0;
        min-height: calc(175px * var(--pkr-scale));
    }
    .pkr-board { min-height: calc(72px * var(--pkr-scale)); }
    .pkr-felt[data-bots="9"] .pkr-zone--top {
        justify-content: space-between;
        padding: 0 30% 0 26%;
        gap: calc(16px * var(--pkr-scale));
    }
    .pkr-felt[data-bots="9"] .pkr-zone--top .pkr-seat-bot {
        max-width: calc(104px * var(--pkr-scale));
    }
    .pkr-felt[data-bots="9"] .pkr-table-middle {
        padding: calc(20px * var(--pkr-scale)) 32% 0;
        min-height: calc(185px * var(--pkr-scale));
    }
    .pkr-bottom-row {
        min-height: calc(168px * var(--pkr-scale));
        padding-bottom: 24px;
    }
    #pkr-bottom-left-seat { left: 26%; }
    #pkr-bottom-right-seat { right: 26%; }
    #pkr-seat-hero {
        max-width: 20%;
        padding-bottom: 14px;
    }
    .pkr-seat-hero .pkr-dealer-button {
        bottom: 6px;
        left: calc(-36px * var(--pkr-scale));
    }
    .pkr-zone--bottom-corner { max-width: calc(120px * var(--pkr-scale)); }

    /* Chip bet markers — keep off cards and out of pot/board lane */
    .pkr-zone--top .pkr-seat-bot .pkr-committed-chip {
        top: calc(100% + 6px);
        bottom: auto;
    }
    .pkr-zone--bottom-corner .pkr-seat-bot .pkr-committed-chip { top: -58px; }
    .pkr-seat-hero .pkr-committed-chip { top: -64px; }
    .pkr-zone--left .pkr-committed-chip { right: -28px; }
    .pkr-zone--right .pkr-committed-chip { left: -28px; }

    /* Controls below the oval rail — match table width */
    .pkr-hero-dock {
        padding: 0;
        gap: 12px;
        max-width: 100%;
        margin: 12px auto 0;
        width: 100%;
        box-sizing: border-box;
        flex-shrink: 0;
    }
    .pkr-stake-panel {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px 20px;
        padding: 10px 20px;
    }
    .pkr-stake-label { white-space: nowrap; }
    .pkr-chip-deck { flex-wrap: nowrap; width: auto; }
    .pkr-actions {
        flex-wrap: nowrap;
        padding: 12px 20px;
        justify-content: center;
    }
    .pkr-actions .pkr-btn-action { flex: 0 1 auto; min-width: 80px; }
    .pkr-actions .pkr-input-raise { flex: 0 0 80px; }
    .pkr-actions .pkr-btn-deal { flex: 0 1 auto; max-width: none; min-width: 110px; }
}

@media (max-width: 380px) {
    .pkr-actions--compact { flex-wrap: wrap; }
    .pkr-actions--compact .pkr-btn-action { flex: 1 1 28%; }
}

/* ── Multiplayer (lobby modal, table bar, entry button) ── */
.pkr-stake-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.pkr-btn-mp {
    align-self: center;
    background: linear-gradient(180deg, #7b52ab 0%, #5f3d8a 100%);
    border-color: #9a6fd0;
    font-size: .92rem;
    letter-spacing: .02em;
}
.pkr-btn-mp:hover { background: linear-gradient(180deg, #8f63c4 0%, #6f4aa0 100%); }
.pkr-btn-mp .fa-users { margin-right: 6px; }

.pkr-mp-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: none; align-items: center; justify-content: center;
    z-index: 1050; padding: 16px;
}
.pkr-mp-overlay.open { display: flex; }
.pkr-mp-modal {
    background: #0e1822; border: 2px solid #2e4a66; border-radius: 14px;
    width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,.6);
    display: flex; flex-direction: column;
    color: #c8d4e0;
}
.pkr-mp-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid #2e4a66; background: #0a121a;
    border-radius: 12px 12px 0 0;
}
.pkr-mp-header h3 { margin: 0; font-size: 1.1rem; color: #ffd54a; }
.pkr-mp-close {
    background: none; border: none; color: #c8d4e0; font-size: 1.6rem;
    line-height: 1; cursor: pointer; padding: 0 4px;
}
.pkr-mp-close:hover { color: #fff; }
.pkr-mp-note { padding: 10px 16px; font-size: .82rem; color: #a0b8d0; border-bottom: 1px solid #16232f; }
.pkr-mp-resume {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin: 10px 16px 0; padding: 8px 10px; font-size: .86rem;
    background: rgba(224,168,46,.12); border: 1px solid rgba(224,168,46,.4); border-radius: 8px;
}
.pkr-mp-tables { padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; min-height: 90px; }
.pkr-mp-empty { padding: 18px 6px; text-align: center; font-size: .86rem; color: #a0b8d0; }
.pkr-mp-table-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; background: rgba(8,18,28,.78);
    border: 1px solid rgba(46,74,102,.85); border-radius: 10px;
}
.pkr-mp-table-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pkr-mp-table-info strong { color: #e8f0fa; font-size: .95rem; }
.pkr-mp-table-meta { font-size: .78rem; color: #a0b8d0; }
.pkr-mp-table-state { font-size: .74rem; color: #78d49e; }
.pkr-mp-create {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px;
    padding: 12px 16px; border-top: 1px solid #2e4a66; background: #0a121a;
}
.pkr-mp-create-label { display: flex; align-items: center; gap: 6px; font-size: .84rem; margin: 0; color: #c8d4e0; }
.pkr-mp-status-line { min-height: 22px; padding: 0 16px 12px; text-align: center; font-size: .8rem; color: #e0a82e; }

.pkr-mp-bar {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px;
    width: 100%; margin: 0 0 8px; padding: 8px 12px;
    background: rgba(8,18,28,.78); border: 1px solid rgba(123,82,171,.6); border-radius: 12px;
    box-sizing: border-box; font-size: .84rem; color: #c8d4e0;
}
.pkr-mp-bar-info { font-weight: 700; color: #e8f0fa; }
.pkr-mp-bar-turn { color: #ffd54a; font-weight: 700; min-height: 1em; }
.pkr-mp-bar-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pkr-mp-leave { border-color: #d9534f; background: linear-gradient(180deg, #a94442 0%, #8a3230 100%); }
.pkr-mp-leave:hover { background: linear-gradient(180deg, #c25350 0%, #a03e3b 100%); }

@media (max-width: 680px) {
    .pkr-mp-modal { max-width: 96vw; }
    .pkr-mp-bar { font-size: .78rem; gap: 6px 10px; padding: 7px 10px; }
    .pkr-mp-bar .pkr-btn-sm { padding: 4px 10px; font-size: .78rem; }
}
