* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background:
        radial-gradient(circle at 20% 0%, rgba(46, 125, 50, 0.30), transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(255, 215, 0, 0.12), transparent 50%),
        linear-gradient(135deg, #0d1f12 0%, #14241a 60%, #1a1a2e 100%);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 10px 10px calc(20px + env(safe-area-inset-bottom));
    color: #fff;
    /* Vertical scroll is allowed so tall layouts (waiting room with ready
       roster + buttons) never get clipped on short screens. Telegram's
       swipe-to-close is already disabled via disableVerticalSwipes(), and
       overscroll-behavior:contain stops scroll-chaining from closing the app. */
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.user-bar {
    margin: 0 auto 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    /* keep the balance/back row readable while the page scrolls under it */
    background: linear-gradient(180deg, #0d1f12 70%, rgba(13,31,18,0));
    padding-bottom: 6px;
}


/* Modal shell (tournament) */
.pk-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1100;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pk-modal.show { display: flex; }
.pk-modal-content {
    background: #1c1a2b;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 24px 22px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    position: relative;
    text-align: center;
}
.pk-modal-content h2 { margin-bottom: 14px; font-size: 20px; }
.pk-modal-close {
    position: absolute;
    top: 10px; right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}
.pk-modal-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.pk-modal-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #2ea6ff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.pk-modal-btn:active { transform: scale(0.98); }

.pk-online {
    max-width: 520px;
    margin: 0 auto 12px;
    display: none;            /* shown only in online mode */
}
body.pk-mode-online #pkOnline    { display: block; }

.pk-online-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 22px 20px;
    text-align: center;
}
.pk-online-card h2 { font-size: 20px; margin-bottom: 8px; }
.pk-online-card p  { color: rgba(255,255,255,0.7); font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.pk-online-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(46,125,50,0.4);
    -webkit-tap-highlight-color: transparent;
}
.pk-online-btn:active { transform: scale(0.98); }
.pk-online-btn--ghost {
    background: rgba(255,255,255,0.10);
    box-shadow: none;
    margin-top: 4px;
}

.pk-spinner {
    width: 40px; height: 40px;
    margin: 4px auto 14px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: #66bb6a;
    border-radius: 50%;
    animation: pkSpin 0.9s linear infinite;
}
@keyframes pkSpin { to { transform: rotate(360deg); } }

/* ── Live Hold'em table ───────────────────────────────────────────────── */
/* Seated: hide the online lobby cards, show the table. */
body.pk-at-table #pkOnline { display: none !important; }

.pk-table {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pkt-seat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}
.pkt-cards { display: flex; gap: 6px; }
.pkt-card {
    width: 46px; aspect-ratio: 2/3;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-weight: 800; background: #fafafa; color: #111;
}
.pkt-card.pkt-back  { background: repeating-linear-gradient(45deg,#1c5ca8 0 6px,#164a85 6px 12px); border: 2px solid #fff; }
.pkt-card.pkt-empty { background: rgba(255,255,255,0.05); border: 1px dashed rgba(255,255,255,0.15); box-shadow:none; }
.pkt-card.pkt-folded{ background: rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); box-shadow:none; opacity:.5; }
.pkt-card.pkt-red   { color: #d32f2f; }
.pkt-card .pkt-cr   { font-size: 16px; line-height: 1; }
.pkt-card .pkt-cs   { font-size: 20px; line-height: 1; }

.pkt-row { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.pkt-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pkt-stack { font-size: 13px; color: #ffd980; font-weight: 700; }
.pkt-dot { width: 9px; height: 9px; border-radius: 50%; background: #888; }
.pkt-dot.on  { background: #4caf50; box-shadow: 0 0 6px #4caf50; }
.pkt-dot.off { background: #f44336; }
.pkt-btn-chip {
    background: #ffd700; color: #1a1a2e; font-size: 11px; font-weight: 800;
    width: 18px; height: 18px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.pkt-betchip {
    min-height: 20px; font-size: 13px; font-weight: 700; color: #fff;
}
.pkt-betchip:not(:empty)::before { content: '🪙 '; }

.pkt-center {
    background: radial-gradient(ellipse at center, rgba(46,125,50,0.35), rgba(0,0,0,0.25));
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    padding: 14px 10px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.pkt-pot { font-size: 15px; font-weight: 700; color: #fff; }
.pkt-board { display: flex; gap: 5px; }
.pkt-board .pkt-card { width: 42px; }
.pkt-msg { font-size: 14px; font-weight: 600; color: #ffd980; min-height: 20px; text-align: center; }

.pkt-timerbar { height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.pkt-timerfill { height: 100%; width: 0%; background: #66bb6a; transition: width 0.2s linear; }

.pkt-actions { min-height: 52px; }
.pkt-actrow { display: flex; gap: 8px; }
.pkt-act {
    flex: 1; padding: 14px 8px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; color: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.pkt-act:active { transform: scale(0.97); }
/* Action-button colours live in ONE place — see "Canonical colours" below.
   A second palette here used to fight it (fold rendered grey-ish, which read as
   a disabled button while the tap was still being sent). */
.pkt-wait  { text-align: center; color: rgba(255,255,255,0.5); font-size: 14px; padding: 16px 0; }

.pkt-raisebox {
    margin-top: 8px; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 12px;
}
.pkt-raisebox input[type=range] { width: 100%; accent-color: #2ea6ff; }
.pkt-raiserow { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; }
.pkt-raiserow span { font-weight: 700; color: #ffd980; }
.pkt-quick { display: flex; gap: 6px; }
.pkt-quick button {
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    padding: 6px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; font-weight: 600;
}
.pkt-raisego { width: 100%; margin-top: 4px; }

.pkt-leave {
    align-self: center; margin-top: 4px;
    background: none; border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6); padding: 8px 18px; border-radius: 10px;
    font-size: 13px; cursor: pointer;
}
.pkt-leave:active { transform: scale(0.97); }

/* ── Live Hold'em table (duplicate guard) ─────────────────────────────── */
body.pk-at-table #pkOnline { display: none !important; }

/* While waiting (layout B), the felt + seats stay visible with readiness
   status; only the pot and board are hidden (the centre shows the waiting
   status instead) so there are no misleading card backs / "opponent's turn". */
body.pk-at-table.pk-table-waiting #pk6Table .pkt-pot,
body.pk-at-table.pk-table-waiting #pk6Table .pk6-blinds,
body.pk-at-table.pk-table-waiting #pk6Table .pkt-board { display: none; }

.pk-table {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}
.pkt-seat { text-align: center; }
.pkt-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
}
.pkt-name { color: #fff; }
.pkt-stack { font-size: 13px; color: #ffd980; margin-top: 2px; }
.pkt-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pkt-dot.on  { background: #66bb6a; box-shadow: 0 0 6px rgba(102,187,106,0.8); }
.pkt-dot.off { background: #f44336; }
.pkt-btn-chip {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; box-sizing: border-box;
    width: 18px; height: 18px; min-width: 18px; border-radius: 50%;
    background: #ffd700; color: #1a1a2e; font-size: 11px; font-weight: 800; line-height: 1;
}
.pkt-betchip {
    min-height: 20px; font-size: 13px; font-weight: 700; color: #ffd700;
}

.pkt-cards { display: flex; gap: 6px; justify-content: center; }
.pkt-card {
    width: 48px; aspect-ratio: 2/3; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.pkt-card.pkt-face { background: #fafafa; color: #111; font-weight: 800; }
.pkt-card.pkt-face.pkt-red { color: #d32f2f; }
.pkt-card .pkt-cr { font-size: 18px; line-height: 1; }
.pkt-card .pkt-cs { font-size: 20px; line-height: 1; }
.pkt-card.pkt-back {
    background: repeating-linear-gradient(45deg, #1c5ca8 0 6px, #164a85 6px 12px);
    border: 2px solid #fff;
}
.pkt-card.pkt-empty { background: rgba(255,255,255,0.05); border: 1px dashed rgba(255,255,255,0.15); box-shadow: none; }
.pkt-card.pkt-folded { background: rgba(255,255,255,0.04); opacity: 0.4; }

.pkt-center {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
}
.pkt-pot { font-size: 15px; font-weight: 700; color: #ffd980; margin-bottom: 10px; }
.pkt-board { display: flex; gap: 6px; justify-content: center; }
.pkt-board .pkt-card { width: 42px; }
.pkt-msg { margin-top: 10px; font-size: 14px; color: rgba(255,255,255,0.85); min-height: 1.2em; }

.pkt-timerbar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.pkt-timerfill { height: 100%; width: 0%; background: #66bb6a; transition: width 0.2s linear; }
#pktTimerbar { display: none; max-width: 460px; margin: 6px auto 0; }

.pkt-actions { min-height: 52px; }
.pkt-actrow { display: flex; gap: 8px; }
.pkt-act {
    flex: 1; padding: 14px 8px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer; color: #fff;
    -webkit-tap-highlight-color: transparent;
}
.pkt-act:active { transform: scale(0.97); }
.pkt-act:disabled { opacity: 0.55; pointer-events: none; }
/* Canonical colours (overrides the earlier HU-table palette further up the file):
   fold = red, check/call = blue, raise/bet = green — so fold never looks "greyed out". */
.pkt-fold  { background: linear-gradient(135deg, #c62828, #8e0000); }
.pkt-check { background: linear-gradient(135deg, #2ea6ff, #1c89e0); }
.pkt-call  { background: linear-gradient(135deg, #2ea6ff, #1c89e0); }
.pkt-raise { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
.pkt-wait  { text-align: center; color: rgba(255,255,255,0.5); font-size: 14px; padding: 16px 0; }

.pkt-raisebox {
    margin-top: 8px; background: rgba(255,255,255,0.06);
    border-radius: 12px; padding: 12px;
}
.pkt-raisebox input[type=range] { width: 100%; }
.pkt-raiserow { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; }
.pkt-raiserow #pktRaiseVal { font-weight: 700; color: #ffd980; }
.pkt-quick { display: flex; gap: 6px; }
.pkt-quick button {
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer;
}
.pkt-raisego { width: 100%; }

.pkt-leave {
    margin-top: 6px; padding: 10px; border: none; border-radius: 10px;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6);
    font-size: 13px; cursor: pointer;
}
.pkt-leave:active { transform: scale(0.98); }

/* ── Format switch (1v1 / 6-max) ──────────────────────────────────────── */
.pk-fmt-switch {
    display: flex; gap: 6px; margin: 4px 0 12px;
    background: rgba(255,255,255,0.06); border-radius: 10px; padding: 4px;
}
.pk-fmt {
    flex: 1; padding: 9px 0; border: none; border-radius: 8px;
    background: transparent; color: rgba(255,255,255,0.6);
    font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.pk-fmt.active { background: linear-gradient(135deg,#2e7d32,#1b5e20); color:#fff; }
.pk-online-msg { color:#66bb6a; font-size:13px; min-height:1em; margin-bottom:6px; }

/* ── 6-max layout B: felt with seats around it (dark-casino palette) ─────── */
/* Column layout (not `block`) so the felt below can flex-grow into the space
   left over by the action row and footer. */
body.pk-at-table #pk6Table { display: flex; flex-direction: column; }

/* Seated at the 6-max table: the felt claims every pixel left between the user
   bar and the action buttons, instead of stopping at a fixed height and leaving
   dead space under the footer on tall phones.
   min-height (not height) on the body keeps the page scrollable, so a tall
   waiting-room roster still can't get clipped on a short screen. */
body.pk-at-table { display: flex; flex-direction: column; }
/* In a column flex container the cross axis is WIDTH, and these elements center
   themselves with `margin: 0 auto`. An auto cross-axis margin cancels stretch,
   so without an explicit width they collapse to content width — and the felt,
   whose children are all absolutely positioned, collapses to ~2px. */
body.pk-at-table > .user-bar,
body.pk-at-table > .pk-table { width: 100%; }
body.pk-at-table #pk6Table { flex: 1 1 auto; min-height: 0; }
body.pk-at-table #pk6Table .pk6-felt { width: 100%; flex: 1 1 auto; height: auto; min-height: 260px; }

/* The felt: opponents placed around it, board+pot centre, hero at the bottom. */
.pk6-felt {
    position: relative;
    height: min(58vh, 460px);
    min-height: 380px;
    margin: 6px auto 10px;
    max-width: 460px;
    border-radius: 28px;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(46,125,50,0.45), rgba(16,34,22,0.7) 74%),
        rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5), 0 8px 22px rgba(0,0,0,0.4);
}

/* Seat slots */
.pk6-slot { position: absolute; display: flex; justify-content: center; }
.pk6-slot-tl { top: 8px;  left: 6px; }
.pk6-slot-tc { top: 2px;  left: 50%; transform: translateX(-50%); }
.pk6-slot-tr { top: 8px;  right: 6px; }
.pk6-slot-ml { top: 34%;  left: 4px; }
.pk6-slot-mr { top: 34%;  right: 4px; }

/* Centre: pot pill + board + status */
.pk6-center {
    position: absolute; top: 49%; left: 50%; transform: translate(-50%,-50%);
    width: 100%; display: flex; flex-direction: column; align-items: center;
    text-align: center; pointer-events: none;
}
.pk6-blinds {
    display: inline-block; margin: 0 auto 6px; padding: 3px 12px;
    border-radius: 999px; background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.75);
    letter-spacing: 0.02em;
}
.pk6-blinds.pk6-blinds-up {
    color: #ffd980;
    border-color: rgba(255,215,0,0.5);
    animation: pk6BlindUp 0.8s ease;
}
@keyframes pk6BlindUp {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}
.pkt-pot {
    display: inline-block; margin: 0 auto 10px; padding: 5px 16px;
    border-radius: 999px; background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,215,0,0.45);
    font-size: 14px; font-weight: 700; color: #ffd980;
}
.pkt-board { display: flex; gap: 5px; justify-content: center; }
.pkt-board .pkt-card { width: 42px; }
.pkt-board .pkt-card .pkt-cr { font-size: 18px; }
.pkt-board .pkt-card .pkt-cs { font-size: 20px; }
.pkt-msg { margin-top: 10px; font-size: 14px; color: rgba(255,255,255,0.85); min-height: 1.2em; }
.pk6-waittitle { display: block; font-size: 17px; font-weight: 700; color: #ffd700; }
.pk6-waitsub   { display: block; font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* Hero (you) — bottom-centre, larger */
.pk6-hero { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; }

/* Seat box (compact) */
.pk6-seat {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: rgba(0,0,0,0.34); border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px; padding: 6px 8px; min-width: 92px; text-align: center;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.pk6-seat.pk6-foldedseat { opacity: 0.42; }
.pk6-meseat { border-color: rgba(102,187,106,0.5); background: rgba(102,187,106,0.12); }
.pk6-seatmain { display: flex; align-items: center; gap: 7px; }
.pk6-av {
    flex: 0 0 auto; position: relative; overflow: hidden;
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.12); color: #fff; font-size: 13px; font-weight: 800;
    border: 1px solid rgba(255,255,255,0.2);
}
.pk6-avtxt { line-height: 1; }
.pk6-avimg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 50%; background: #14241a;
}
.pk6-av-me { width: 36px; height: 36px; font-size: 16px; border-color: #66bb6a; background: rgba(102,187,106,0.25); }
.pk6-pmeta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.pk6-seat .pkt-name { font-size: 13px; font-weight: 600; color: #fff; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.pk6-seat .pkt-stack { font-size: 11px; color: #ffd980; }
.pk6-mini .pkt-card { width: 26px; }
.pk6-mini .pkt-card .pkt-cr { font-size: 11px; }
.pk6-mini .pkt-card .pkt-cs { font-size: 13px; }

/* Hero seat — bigger avatar + cards */
.pk6-hero .pk6-seat { min-width: 150px; padding: 8px 12px; }
.pk6-hero .pk6-mini .pkt-card { width: 46px; }
.pk6-hero .pk6-mini .pkt-card .pkt-cr { font-size: 18px; }
.pk6-hero .pk6-mini .pkt-card .pkt-cs { font-size: 20px; }
.pk6-hero .pk6-seat .pkt-name { font-size: 14px; max-width: 120px; }

/* Empty slot */
.pk6-empty {
    width: 44px; height: 44px; border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.18);
}
.pk6-emptywait {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: auto; height: auto; border: none;
}
.pk6-emptywait .pk6-plus {
    width: 40px; height: 40px; border-radius: 50%; border: 2px dashed rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center; font-size: 20px; color: rgba(255,255,255,0.5);
}
.pk6-emptytxt { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 3px; }

/* Waiting-seat readiness */
.pk6-st { font-size: 11px; font-weight: 700; }
.pk6-st-ready { color: #7CFF8E; }
.pk6-st-wait  { color: rgba(255,255,255,0.5); }
.pk6-avwrap { position: relative; display: inline-flex; }
.pk6-readytick {
    position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px;
    border-radius: 50%; background: #1f8a5b; color: #fff; font-size: 9px;
    display: flex; align-items: center; justify-content: center; border: 1.5px solid #14241a;
}

/* ── Phase 6 polish: deal / chip / highlight animations ───────────────── */
@keyframes pktDealDrop {
    from { transform: translateY(-28px) scale(0.7); opacity: 0; }
    to   { transform: translateY(0)     scale(1);   opacity: 1; }
}
/* Board cards animate in as the street is dealt */
.pkt-board .pkt-card.pkt-justdealt {
    animation: pktDealDrop 0.34s cubic-bezier(0.2, 1.15, 0.4, 1) both;
}

/* Winner glow on the result screen */
@keyframes pktWinGlow {
    0%,100% { box-shadow: 0 0 0 rgba(255,215,0,0); }
    50%     { box-shadow: 0 0 18px rgba(255,215,0,0.7); }
}
.pk6-seat.pk6-winner, .pkt-seat.pkt-winner {
    animation: pktWinGlow 1.1s ease-in-out 2;
    border-color: #ffd700 !important;
}

/* Active-player pulse (subtle) */
@keyframes pktTurnPulse {
    0%,100% { box-shadow: 0 0 8px rgba(255,215,0,0.25); }
    50%     { box-shadow: 0 0 16px rgba(255,215,0,0.55); }
}
.pk6-seat.pk6-active { animation: pktTurnPulse 1.6s ease-in-out infinite; }

/* Pot bump when chips are added */
@keyframes pktPotBump { 0%{transform:scale(1);} 40%{transform:scale(1.18);} 100%{transform:scale(1);} }
.pkt-pot.pkt-bump { animation: pktPotBump 0.35s ease; display:inline-block; }

/* Chip fly to pot */
@keyframes pktChipFly {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to   { transform: translateY(-40px) scale(0.4); opacity: 0; }
}
.pkt-betchip.pkt-chipfly { animation: pktChipFly 0.5s ease-in both; }

.pkt-footer { display:flex; align-items:center; gap:8px; margin-top:6px; }
.pkt-footer .pkt-leave { flex:1; margin-top:0; }
.pkt-mute {
    flex:0 0 44px; height:40px; border:none; border-radius:10px;
    background:rgba(255,255,255,0.06); color:#fff; font-size:18px; cursor:pointer;
}
.pkt-mute:active { transform: scale(0.95); }
.pkt-rebuy {
    flex:0 0 auto; height:40px; padding:0 14px; border:none; border-radius:10px;
    background:linear-gradient(135deg,#2e7d32,#1b5e20); color:#fff;
    font-size:15px; font-weight:700; cursor:pointer; white-space:nowrap;
    -webkit-tap-highlight-color: transparent;
}
.pkt-rebuy:active { transform: scale(0.96); }

/* Bet-sizing tray: "размер ставки N" + preset chips + Назад/Поставить */
.pkt-betsize {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; font-size: 14px; color: rgba(255,255,255,0.7);
}
.pkt-betsize strong { font-size: 17px; font-weight: 800; color: #ffd700; }
.pkt-betgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.pkt-betopt {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 8px 4px; border: 1px solid rgba(255,255,255,0.14); border-radius: 10px;
    background: rgba(255,255,255,0.06); color: #fff;
    font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.pkt-betopt small { font-size: 10px; font-weight: 600; color: #ffd980; }
.pkt-betopt.on { background: linear-gradient(135deg, #2e7d32, #1b5e20); border-color: #66bb6a; }
.pkt-betopt.on small { color: rgba(255,255,255,0.85); }
.pkt-betopt:active { transform: scale(0.96); }


/* Waiting-room buttons (invite / start-now / accept) — uniform height + radius */
.pkt-waitrow { display: flex; gap: 8px; margin-top: 8px; }
.pkt-waitrow > * { flex: 1; width: auto !important; margin-top: 0 !important; }
.pkt-wait-btn {
    height: 52px; padding: 0 8px; border: none; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.10); color: #fff;
    font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.pkt-wait-btn:active { transform: scale(0.97); }
.pkt-wait-btn[disabled] { opacity: 0.6; cursor: default; }
.pkt-wait-btn[disabled]:active { transform: none; }
.pkt-invite { background: linear-gradient(135deg, #2ea6ff, #1c89e0); }
/* Pending ready/unready: the tap registered, we're waiting on the server. */
.pkt-waitbusy { gap: 8px; }
.pkt-spin {
    width: 15px; height: 15px; border-radius: 50%; flex: none;
    border: 2px solid rgba(255,255,255,0.28);
    border-top-color: #fff;
    animation: pktSpin 0.7s linear infinite;
}
@keyframes pktSpin { to { transform: rotate(360deg); } }
/* Full-width start buttons share the same 52px height */
.pkt-startnow, .pkt-startaccept {
    width: 100%; height: 52px; padding: 0; margin-top: 8px; border: none;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; color: #fff;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    -webkit-tap-highlight-color: transparent;
}
.pkt-startnow:active, .pkt-startaccept:active { transform: scale(0.98); }
/* "Не сейчас" — full-width, secondary, aligned under the accept button */
.pkt-waitrow + .pkt-wait-btn,
.pkt-startaccept + .pkt-wait-btn { width: 100%; margin-top: 8px; }

/* Live "players waiting" counter on the idle online screen */
.pk-wait-count {
    margin: 4px 0 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    min-height: 1.2em;
}
.pk-wait-count strong { color: #66bb6a; }

/* ── End-of-hand winner banner ────────────────────────────────────────── */
.pkt-winner-ov {
    /* A block ABOVE the table (not an overlay) so no seat/cards are covered. */
    display: flex; justify-content: center;
    margin: 0 auto 8px; padding: 0 6px;
    pointer-events: none;
    animation: pktWinnerFade 0.25s ease;
}
@keyframes pktWinnerFade { from { opacity: 0; } to { opacity: 1; } }
.pkt-winner-card {
    background: rgba(20, 36, 26, 0.92);
    border: 2px solid rgba(255,215,0,0.5);
    border-radius: 16px;
    padding: 10px 18px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55), 0 0 22px rgba(255,215,0,0.25);
    animation: pktWinnerPop 0.35s cubic-bezier(0.2,1.3,0.4,1);
    max-width: 90%;
}
.pkt-winner-card.pkt-won {
    border-color: #66bb6a;
    box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 30px rgba(102,187,106,0.45);
}
@keyframes pktWinnerPop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pkt-winner-title { font-size: 18px; font-weight: 800; color: #ffd700; margin-bottom: 2px; }
.pkt-winner-card.pkt-won .pkt-winner-title { color: #7CFF8E; }
.pkt-winner-sub  { font-size: 13px; font-weight: 600; color: #fff; }
.pkt-winner-combo {
    display: inline-block; margin-top: 6px;
    padding: 4px 12px; border-radius: 999px;
    background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.5);
    color: #ffd700; font-size: 13px; font-weight: 700;
}
.pkt-winner-card.pkt-won .pkt-winner-combo {
    background: rgba(102,187,106,0.14); border-color: #66bb6a; color: #7CFF8E;
}
.pkt-winner-next { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 10px; }

/* ── Per-player action chip + active turn marker ──────────────────────── */
.pkt-seatfoot { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 20px; margin-top: 2px; }
.pkt-actionchip {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px;
    background: rgba(255,255,255,0.14); color: #fff;
}
.pkt-actionchip.pkt-act-fold { background: rgba(244,67,54,0.30); color: #ffb0a8; }
/* active player gets a clear glowing ring + label */
.pk6-seat.pk6-active {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px #ffd700, 0 0 18px rgba(255,215,0,0.5);
    position: relative;
}
.pk6-seat.pk6-active::before {
    content: '⏳ ходит';
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #ffd700; color: #1a1a2e; font-size: 10px; font-weight: 800;
    padding: 2px 8px; border-radius: 8px; white-space: nowrap; z-index: 3;
}

/* Winning-combination card highlight */
.pkt-card.pkt-cardwin {
    outline: 3px solid #ffd700;
    box-shadow: 0 0 14px rgba(255,215,0,0.8);
    z-index: 2;
}

/* "Show my cards" button (losers, optional) */
.pkt-showcards { background: rgba(255,255,255,0.12); margin-bottom: 8px; }

/* ── Waiting-room ready roster (no timer) ─────────────────────────────── */
.pkt-lobby-title {
    text-align: center; font-size: 18px; font-weight: 800; color: #fff;
    margin-top: 8px;
}
.pkt-readylist {
    margin: 8px 0; display: flex; flex-direction: column; gap: 6px;
}
.pkt-readyrow {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.05); border-radius: 10px; padding: 8px 12px;
    font-size: 14px;
}
.pkt-rname { font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.pkt-rdy  { color: #7CFF8E; font-weight: 700; font-size: 13px; }
.pkt-nrdy { color: rgba(255,255,255,0.5); font-weight: 600; font-size: 13px; }
.pkt-unready { background: rgba(255,255,255,0.10); }

/* ── Tournament header button + modal ─────────────────────────────────────── */
.user-bar .top-up-btn.pk-thdr-btn {
    background: linear-gradient(135deg, #ffd24a, #f7a600);
    box-shadow: 0 2px 10px rgba(255, 199, 44, 0.5), inset 0 1px 0 rgba(255,255,255,0.35);
    font-size: 15px;
    animation: pkThdrPulse 1.8s ease-in-out infinite;
}
@keyframes pkThdrPulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(255,199,44,0.5), 0 0 0 0 rgba(255,199,44,0.45); }
    50%      { box-shadow: 0 2px 10px rgba(255,199,44,0.5), 0 0 0 7px rgba(255,199,44,0); }
}

.pk-tm-box {
    max-width: 370px; max-height: 84vh; overflow-y: auto;
    text-align: left; position: relative; padding: 20px 18px;
}
.pk-tm-close {
    position: absolute; top: 4px; right: 4px; z-index: 3;
    background: none; border: none; color: rgba(255,255,255,0.6);
    font-size: 20px; cursor: pointer; padding: 0;
    width: 44px; height: 44px; line-height: 44px; text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.pk-tm-close:active { color: #fff; transform: scale(0.9); }
.pk-tm-head { text-align: center; margin-bottom: 6px; }
.pk-tm-trophy { font-size: 46px; line-height: 1.1; filter: drop-shadow(0 4px 16px rgba(255,199,44,0.55)); }
.pk-tm-head h2 { font-size: 20px; margin: 2px 0; }
.pk-tm-when { font-size: 12.5px; color: #ffd24a; font-weight: 700; }

.pk-tm-podium { display: flex; gap: 8px; align-items: flex-end; margin: 14px 0 2px; }
.pk-tm-pod {
    flex: 1; text-align: center; border-radius: 12px 12px 7px 7px;
    padding: 10px 4px 8px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
}
.pk-tm-pod .m { font-size: 24px; line-height: 1.2; }
.pk-tm-pod .a { font-size: 13px; font-weight: 800; color: #ffd24a; }
.pk-tm-pod.first {
    padding: 18px 4px 12px;
    background: linear-gradient(180deg, rgba(255,199,44,0.24), rgba(255,199,44,0.05));
    border-color: rgba(255,199,44,0.55);
    box-shadow: 0 6px 20px rgba(255,168,37,0.25);
}
.pk-tm-pod.first .m { font-size: 32px; }
.pk-tm-pod.first .a { font-size: 15.5px; }

.pk-tm-sec {
    margin: 16px 0 7px; font-size: 11px; font-weight: 800;
    letter-spacing: 0.7px; text-transform: uppercase; color: rgba(255,255,255,0.5);
}
.pk-tm-rows { display: flex; flex-direction: column; gap: 3px; }
.pk-tm-row {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 9px; border-radius: 9px;
    background: rgba(255,255,255,0.045); font-size: 13.5px;
}
.pk-tm-row.me { background: rgba(121,80,242,0.32); }
.pk-tm-row .pl { width: 26px; text-align: center; flex-shrink: 0; }
.pk-tm-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-align: left; }
.pk-tm-row .net { font-size: 12px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pk-tm-row .net.pos { color: #7be89a; } .pk-tm-row .net.neg { color: #ff8a8a; }
.pk-tm-row .pz { font-size: 12.5px; font-weight: 800; color: #ffd24a; flex-shrink: 0; }
.pk-tm-empty { font-size: 13px; color: rgba(255,255,255,0.55); padding: 4px 2px; }
.pk-tm-me { margin-top: 7px; font-size: 12.5px; color: #b197fc; font-weight: 700; }
.pk-tm-rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pk-tm-rules li { font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,0.78); text-align: left; }
.pk-tm-rules b { color: #fff; }
#pkTmPlay { width: 100%; margin-top: 16px; }
