/*
 * Pok Deng grand-table presentation
 *
 * This file is intentionally isolated from Blackjack, Baccarat, and the
 * shared casino rules. It is loaded after index.html's embedded styles and
 * only applies while the Pok Deng table is active.
 */

:root {
    --pok-ref-gold:#e9bc55;
    --pok-ref-gold-bright:#ffe08a;
    --pok-ref-gold-deep:#8d5b12;
    --pok-ref-ivory:#fff1cf;
    --pok-ref-mint:#a9ff92;
    --pok-ref-felt:#06462f;
    --pok-ref-felt-dark:#012319;
    --pok-ref-panel:rgba(1,26,18,.94);
    --pok-ref-panel-soft:rgba(3,48,32,.88);
    --pok-ref-red:#74160f;
}

body.pok-deng-reference-view {
    color:var(--pok-ref-ivory);
    background:#00110c;
}

#casinoTableGameScreen[data-game="pok_deng"] {
    min-height:100svh;
    overflow-x:hidden;
    background:
        radial-gradient(circle at 50% -10%,rgba(22,126,82,.34),transparent 42%),
        linear-gradient(rgba(0,16,11,.78),rgba(0,10,7,.92)),
        var(--poker-casino-background),
        #00110c;
    background-position:center top;
    background-size:auto,auto,cover;
    background-attachment:fixed;
}

#casinoTableGameScreen[data-game="pok_deng"] > .casino-table-shell {
    width:100%;
    max-width:none;
    padding:8px 8px 28px;
    overflow:visible;
    border:0;
    background:transparent;
}

/* Reference header: one clean information bar. */
#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header {
    width:min(1680px,calc(100vw - 16px));
    min-height:70px;
    margin:0 auto 10px;
    padding:9px 18px;
    flex-wrap:nowrap;
    border:1px solid rgba(216,168,60,.72);
    border-radius:20px;
    background:linear-gradient(180deg,rgba(1,27,19,.98),rgba(0,17,12,.98));
    box-shadow:0 12px 36px rgba(0,0,0,.55),inset 0 1px rgba(255,255,255,.05);
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header > div:first-child {
    display:flex;
    min-width:0;
    align-items:center;
    gap:22px;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header h2 {
    flex:0 1 auto;
    max-width:480px;
    overflow:hidden;
    margin:0;
    color:var(--pok-ref-ivory);
    font:700 clamp(24px,2.1vw,36px)/1.1 Georgia,"Times New Roman",serif;
    letter-spacing:-.015em;
    text-overflow:ellipsis;
    text-shadow:0 2px 2px #000;
    white-space:nowrap;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header p {
    flex:0 0 auto;
    margin:0;
    color:#f4e5bf;
    font-size:14px;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header p strong {
    color:#fff7dd;
    font-size:16px;
}

#casinoTableGameScreen[data-game="pok_deng"] .how-to-play-button {
    min-height:46px;
    margin:0;
    padding:8px 24px;
    border:1px solid var(--pok-ref-gold);
    border-radius:999px;
    background:linear-gradient(180deg,#183921,#0b2417);
    color:#ffe08c;
    font-size:13px;
    font-weight:900;
    white-space:nowrap;
}

#casinoTableGameScreen[data-game="pok_deng"] .game-nav-menu > summary {
    min-width:136px;
    min-height:48px;
    border-color:rgba(216,168,60,.68);
    border-radius:13px;
    background:#061d14;
    color:#fff4d7;
    font-size:16px;
}

#casinoTableGameScreen[data-game="pok_deng"] .mobile-table-nav,
#casinoTableGameScreen[data-game="pok_deng"] .rotate-device-prompt,
#casinoTableGameScreen[data-game="pok_deng"] #casinoVisualPlayers,
#casinoTableGameScreen[data-game="pok_deng"] #casinoPlayControls,
#casinoTableGameScreen[data-game="pok_deng"] #casinoGameStageTitle {
    display:none !important;
}

/* The full reference table shell. */
#casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
    position:relative !important;
    inset:auto !important;
    isolation:isolate;
    width:min(1680px,calc(100vw - 16px));
    height:auto !important;
    min-height:850px;
    margin:0 auto;
    padding:22px;
    overflow:visible;
    border:1px solid rgba(219,171,65,.78);
    border-radius:34px;
    background:
        radial-gradient(ellipse at 52% 33%,rgba(12,108,70,.88),rgba(2,48,33,.94) 52%,rgba(0,20,14,.99) 100%),
        var(--poker-table-art);
    background-position:center;
    background-size:auto,cover;
    box-shadow:
        0 32px 100px rgba(0,0,0,.78),
        inset 0 0 0 4px rgba(1,12,9,.86),
        inset 0 0 0 7px rgba(180,128,35,.72),
        inset 0 0 90px rgba(0,0,0,.62);
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage::before {
    content:"";
    position:absolute;
    inset:11px;
    z-index:0;
    pointer-events:none;
    border:1px solid rgba(255,210,105,.3);
    border-radius:25px;
    box-shadow:inset 0 0 44px rgba(0,0,0,.45);
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage::after {
    content:"";
    position:absolute;
    inset:0;
    z-index:0;
    pointer-events:none;
    border-radius:inherit;
    background:
        radial-gradient(circle at 50% 44%,transparent 40%,rgba(0,0,0,.28) 100%),
        repeating-linear-gradient(118deg,rgba(255,255,255,.012) 0 1px,transparent 1px 5px);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
    position:relative;
    z-index:2;
    display:grid;
    width:100%;
    min-width:0;
    grid-template-columns:minmax(250px,300px) minmax(560px,1fr) minmax(250px,300px);
    grid-template-areas:"leader main rail";
    gap:clamp(16px,1.7vw,28px);
    align-items:start;
    justify-items:stretch;
    color:var(--pok-ref-ivory);
    text-align:left;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[hidden] {
    display:none !important;
}

.pok-reference-leaderboard,
.pok-reference-panel {
    min-width:0;
    overflow:hidden;
    border:1px solid rgba(225,177,68,.78);
    border-radius:26px;
    background:
        linear-gradient(180deg,rgba(2,35,24,.97),rgba(0,22,15,.97));
    box-shadow:inset 0 0 38px rgba(0,0,0,.52),0 18px 34px rgba(0,0,0,.3);
}

.pok-reference-leaderboard {
    grid-area:leader;
    min-height:690px;
    padding:18px 10px 14px;
}

.pok-reference-heading {
    padding:0 12px 15px;
    border-bottom:1px solid rgba(211,164,63,.58);
    text-align:center;
}

.pok-reference-heading strong {
    display:block;
    color:var(--pok-ref-gold-bright);
    font:700 clamp(22px,1.8vw,31px)/1 Georgia,"Times New Roman",serif;
    letter-spacing:.035em;
}

.pok-reference-heading span {
    display:block;
    margin-top:7px;
    color:#ddc17d;
    font-size:12px;
}

.pok-reference-leaderboard ol {
    display:grid;
    gap:0;
    margin:10px 0 0;
    padding:0;
    list-style:none;
}

.pok-reference-leaderboard li {
    display:grid;
    min-width:0;
    min-height:76px;
    grid-template-columns:38px 48px minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    padding:8px 6px;
    border-bottom:1px solid rgba(108,141,113,.28);
    border-radius:14px;
}

.pok-reference-leaderboard li.is-viewer {
    border:1px solid #80e65a;
    background:linear-gradient(90deg,rgba(13,101,47,.8),rgba(2,52,31,.9));
    box-shadow:0 0 21px rgba(70,255,104,.22),inset 0 0 16px rgba(84,255,113,.08);
}

.pok-reference-rank {
    display:grid;
    width:34px;
    height:34px;
    place-items:center;
    border:1px solid #c99332;
    border-radius:50%;
    color:#fff0bd;
    background:#10231a;
    font:900 17px/1 Georgia,serif;
}

.pok-reference-leaderboard li:nth-child(1) .pok-reference-rank {
    color:#2b1b00;
    border-color:#ffe27f;
    background:linear-gradient(145deg,#fff09a,#bf770c);
    box-shadow:0 0 12px rgba(255,205,62,.4);
}

.pok-reference-leaderboard li:nth-child(2) .pok-reference-rank {
    color:#202020;
    border-color:#f5f4ef;
    background:linear-gradient(145deg,#fff,#939a9c);
}

.pok-reference-leaderboard li:nth-child(3) .pok-reference-rank {
    color:#2c1606;
    border-color:#eaa064;
    background:linear-gradient(145deg,#f7b47b,#a95220);
}

.pok-reference-avatar {
    width:45px;
    height:45px;
    padding:2px;
    object-fit:contain;
    border:1px solid rgba(222,174,67,.75);
    border-radius:50%;
    background:#063525;
    filter:drop-shadow(0 5px 5px rgba(0,0,0,.52));
}

.pok-reference-player-copy {
    min-width:0;
}

.pok-reference-player-copy strong,
.pok-reference-player-copy small {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.pok-reference-player-copy strong {
    color:#fff3d4;
    font-size:14px;
}

.pok-reference-player-copy small {
    margin-top:3px;
    color:#b7cbbd;
    font-size:9px;
    text-transform:uppercase;
}

.pok-reference-leaderboard li.is-viewer .pok-reference-player-copy strong,
.pok-reference-leaderboard li.is-viewer .pok-reference-chips {
    color:#9dff79;
}

.pok-reference-chips {
    color:#f5cf6a;
    font:900 16px/1.05 Georgia,serif;
    text-align:right;
}

.pok-reference-chips small {
    display:block;
    margin-top:4px;
    color:#deb953;
    font:800 8px/1 system-ui,sans-serif;
    letter-spacing:.08em;
}

.pok-reference-empty {
    display:block !important;
    min-height:100px !important;
    padding:30px 12px !important;
    color:#c6d6cc;
    text-align:center;
}

.pok-reference-expand {
    width:calc(100% - 20px);
    min-height:45px;
    margin:14px 10px 0;
    border:1px solid rgba(215,166,65,.72);
    border-radius:13px;
    background:#062c1e;
    color:#f5cf6d;
    font-size:11px;
    font-weight:900;
}

.pok-reference-main {
    grid-area:main;
    display:flex;
    min-width:0;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
}

/* The legacy mobile Pok Deng rules assign order values directly to the hand
   panels. Pin the complete reference sequence so the exit can never jump
   ahead of the dealer or player hand. */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-reference-title { order:1; }
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > #pokDengPhase { order:2; }
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-hand-zone.dealer { order:3; }
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > #pokOpponentStrip { order:4; }
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-hand-zone.yours { order:5; }
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > #pokDengActions { order:6; }
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-reference-exit { order:7; }

.pok-reference-title {
    display:flex;
    min-height:50px;
    align-items:center;
    justify-content:center;
    gap:18px;
    color:var(--pok-ref-gold-bright);
    font:700 clamp(30px,2.5vw,44px)/1 Georgia,"Times New Roman",serif;
    letter-spacing:.065em;
    text-align:center;
    text-shadow:0 3px 2px #000,0 0 22px rgba(239,186,71,.25);
}

.pok-reference-title::before,
.pok-reference-title::after {
    content:"";
    width:min(85px,10vw);
    height:1px;
    background:linear-gradient(90deg,transparent,var(--pok-ref-gold));
}

.pok-reference-title::after {
    transform:scaleX(-1);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase {
    width:min(520px,100%);
    min-height:42px;
    margin:-3px auto 1px;
    padding:8px 22px;
    border:1px solid #d9a942;
    border-radius:999px;
    background:linear-gradient(180deg,#0a5b36,#03341f);
    color:#bdff7b;
    box-shadow:inset 0 1px rgba(255,255,255,.08),0 8px 18px rgba(0,0,0,.35);
    font-size:15px;
    letter-spacing:.08em;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone {
    width:100%;
    margin:0;
    border:1px solid rgba(223,174,67,.76);
    border-radius:23px;
    background:linear-gradient(165deg,rgba(3,73,48,.92),rgba(0,37,25,.97));
    box-shadow:inset 0 0 32px rgba(0,0,0,.54),0 12px 27px rgba(0,0,0,.28);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.dealer {
    display:grid;
    min-height:176px;
    grid-template-columns:145px minmax(260px,1fr) 150px;
    align-items:center;
    gap:18px;
    padding:15px 24px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-dealer-avatar {
    width:132px;
    height:132px;
    place-self:center;
    object-fit:contain;
    filter:drop-shadow(0 12px 13px rgba(0,0,0,.7));
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-hand-copy {
    min-width:0;
    text-align:center;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-hand-copy > span,
#casinoTableGameScreen[data-game="pok_deng"] .pok-player-title > span {
    display:block;
    margin:0 0 9px;
    color:#f3cf73;
    font:800 14px/1 system-ui,sans-serif;
    letter-spacing:.16em;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.dealer > strong {
    display:grid;
    min-height:82px;
    place-items:center;
    margin:0;
    padding:10px;
    border:1px solid rgba(213,165,67,.45);
    border-radius:17px;
    background:rgba(0,24,17,.72);
    color:#ffe19a;
    font-size:14px;
    line-height:1.35;
    text-align:center;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-cards {
    display:flex;
    min-height:136px;
    align-items:center;
    justify-content:center;
    gap:13px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-card {
    display:flex;
    width:94px;
    height:132px;
    align-items:flex-start;
    justify-content:flex-start;
    padding:10px;
    border:2px solid #ead192;
    border-radius:11px;
    background-color:#fff9e9;
    background-image:var(--poker-card-front);
    background-position:center;
    background-size:100% 100%;
    color:#111;
    box-shadow:0 10px 18px rgba(0,0,0,.58);
    font:900 27px/1 Georgia,serif;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-card.red {
    color:#b11d24;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-card.concealed {
    padding:0;
    border-color:#e6c978;
    background-color:#063c2a;
    background-image:var(--poker-card-back),repeating-linear-gradient(45deg,#063f2b 0 5px,#c89534 5px 7px);
    background-position:center;
    background-size:100% 100%;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokOpponentStrip {
    display:none;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.yours {
    display:grid;
    min-height:216px;
    align-content:center;
    padding:14px 22px 17px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-player-title {
    text-align:center;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-player-title > strong {
    display:block;
    color:#fff1bd;
    font-size:15px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-player-hand-row {
    display:grid;
    min-width:0;
    grid-template-columns:minmax(0,1fr) 190px;
    align-items:center;
    gap:20px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.yours .pok-card {
    width:106px;
    height:150px;
    font-size:30px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-card {
    display:grid;
    min-height:120px;
    grid-template-columns:1fr auto;
    align-items:center;
    gap:11px 16px;
    padding:15px;
    border:1px solid rgba(215,166,64,.4);
    border-radius:16px;
    background:rgba(0,25,18,.78);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-card span {
    color:#d5b45f;
    font-size:10px;
    font-weight:900;
    letter-spacing:.08em;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-card strong {
    color:#ffe094;
    font-size:20px;
}

/* Large reference chip rail and action row. */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
    display:grid;
    width:100%;
    grid-template-columns:minmax(120px,.78fr) minmax(120px,.95fr) minmax(210px,1.35fr);
    gap:10px;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips {
    order:1;
    grid-column:1/-1;
    display:grid;
    width:100%;
    grid-template-columns:repeat(6,minmax(74px,1fr));
    gap:clamp(7px,1vw,14px);
    padding:12px 22px;
    overflow:visible;
    border:1px solid rgba(218,169,65,.62);
    border-radius:999px;
    background:linear-gradient(180deg,rgba(1,34,23,.96),rgba(0,20,14,.97));
    box-shadow:inset 0 0 28px rgba(0,0,0,.56);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button {
    position:relative;
    display:grid;
    width:82px;
    height:82px;
    min-width:82px;
    place-items:center;
    justify-self:center;
    padding:0;
    overflow:visible;
    border:0;
    border-radius:50%;
    background-color:transparent;
    background-position:center;
    background-repeat:no-repeat;
    background-size:contain;
    color:#fff9dd;
    filter:drop-shadow(0 9px 8px rgba(0,0,0,.7));
    font:900 14px/1 Georgia,serif;
    text-shadow:0 2px 3px #000,0 0 4px #000;
    transition:transform .18s ease,filter .18s ease;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button > span {
    position:relative;
    z-index:2;
    min-width:48%;
    padding:4px 5px;
    border:1px solid rgba(255,232,154,.78);
    border-radius:999px;
    background:rgba(3,24,16,.9);
    box-shadow:0 2px 7px rgba(0,0,0,.62);
    color:#fff5c7;
    font-size:12px;
    line-height:1;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button::after {
    content:attr(data-chip-caption);
    position:absolute;
    top:calc(100% + 1px);
    left:50%;
    color:#f0ca67;
    font:800 11px/1 system-ui,sans-serif;
    text-shadow:0 2px 2px #000;
    transform:translateX(-50%);
    white-space:nowrap;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button:hover:not(:disabled),
#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button:focus-visible {
    transform:translateY(-5px) scale(1.06);
    filter:drop-shadow(0 0 11px rgba(255,209,75,.8));
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button.active {
    border:0;
    outline:3px solid #ffe174;
    outline-offset:3px;
    background-color:transparent;
    box-shadow:0 0 24px rgba(255,200,52,.72);
    filter:drop-shadow(0 0 10px #ffcf42);
    transform:translateY(-6px) scale(1.07);
}

/* The supplied theme pack stops at $100. Build the reference's purple $500
   chip in CSS so it remains crisp at every resolution. */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button[data-value="500"] {
    border:5px dashed #f1deaa;
    background-image:
        radial-gradient(circle at center,transparent 0 33%,#e4c984 34% 38%,transparent 39%),
        repeating-conic-gradient(#f4e2b1 0 8deg,#562164 8deg 30deg) !important;
    background-color:#542063;
    box-shadow:inset 0 0 0 7px #3d154a,inset 0 0 0 10px #d1af61;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button:disabled {
    opacity:.48;
    filter:grayscale(.45) drop-shadow(0 6px 5px rgba(0,0,0,.65));
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-preview {
    order:2;
    grid-column:1/-1;
    min-height:27px;
    margin:0;
    padding:5px 10px;
    color:#ead08d;
    font-size:12px;
    text-align:center;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button {
    width:100%;
    min-width:0;
    min-height:60px;
    margin:0;
    padding:9px 13px;
    border:1px solid rgba(219,171,66,.72);
    border-radius:14px;
    background:linear-gradient(180deg,#0a432c,#03271b);
    color:#f6d98c;
    font-size:14px;
    font-weight:900;
    line-height:1.15;
    text-align:center;
    box-shadow:inset 0 1px rgba(255,255,255,.05),0 8px 18px rgba(0,0,0,.32);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokReferenceUndo { order:3; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengClear { order:4; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm { order:5; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengDraw { order:3; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengStay { order:4; }

#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] #pokDengActions {
    grid-template-columns:repeat(2,minmax(0,1fr));
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button:hover:not(:disabled),
#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button:focus-visible {
    border-color:#ffe183;
    background:linear-gradient(180deg,#12633f,#06412c);
    box-shadow:0 0 20px rgba(242,193,76,.33);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button.primary {
    background:linear-gradient(180deg,#f4c75e,#bb7b13);
    color:#171000;
    text-shadow:0 1px rgba(255,255,255,.35);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button.primary:hover:not(:disabled),
#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button.primary:focus-visible {
    background:linear-gradient(180deg,#ffe080,#d8951d);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button:disabled {
    opacity:.42;
    cursor:not-allowed;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm strong,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm small {
    display:block;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm strong {
    font-size:16px;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm small {
    margin-top:4px;
    font-size:10px;
}

.pok-reference-exit {
    width:100%;
    min-height:68px;
    margin-top:0;
    border:1px solid #e0ae43;
    border-radius:15px;
    background:linear-gradient(180deg,#841d15,#55100d);
    color:#f9d986;
    box-shadow:inset 0 0 0 3px rgba(255,220,119,.08),0 10px 22px rgba(0,0,0,.42);
    font:700 clamp(18px,1.7vw,27px)/1 Georgia,"Times New Roman",serif;
    letter-spacing:.02em;
}

.pok-reference-exit:hover,
.pok-reference-exit:focus-visible {
    border-color:#ffe283;
    background:linear-gradient(180deg,#a4291e,#68130f);
    box-shadow:0 0 22px rgba(236,173,51,.28);
}

.pok-reference-rail {
    grid-area:rail;
    display:grid;
    min-width:0;
    align-content:start;
    gap:20px;
}

.pok-reference-panel {
    padding:18px;
}

.pok-reference-panel h4 {
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 0 14px;
    color:#f0c964;
    font:800 16px/1.2 system-ui,sans-serif;
}

.pok-reference-panel h4::before {
    display:grid;
    width:25px;
    height:25px;
    place-items:center;
    flex:0 0 25px;
    border:1px solid #e2b446;
    border-radius:50%;
    color:#f5cf69;
    font:900 13px/1 Georgia,serif;
}

.pok-reference-howto h4::before {
    content:"?";
}

.pok-reference-history h4::before {
    content:"↶";
}

.pok-reference-howto ul {
    display:grid;
    gap:10px;
    margin:0;
    padding:0 0 0 20px;
    color:#f5e8c9;
    font-size:13px;
    line-height:1.45;
}

.pok-reference-howto li::marker {
    color:#e3ae42;
}

.pok-reference-history-head,
.pok-reference-history-row {
    display:grid;
    min-width:0;
    grid-template-columns:52px minmax(0,1fr) 66px;
    align-items:center;
    gap:7px;
}

.pok-reference-history-list {
    margin:0;
    padding:0;
    list-style:none;
}

.pok-reference-history-head {
    min-height:32px;
    color:#dcb655;
    font-size:9px;
    font-weight:900;
    letter-spacing:.06em;
}

.pok-reference-history-row {
    min-height:46px;
    padding:7px 0;
    border-top:1px solid rgba(93,129,103,.3);
    color:#f4ead1;
    font-size:11px;
}

.pok-reference-history-row > b:last-child {
    font-weight:900;
    text-align:right;
}

.pok-reference-history-row.win > strong,
.pok-reference-history-row.win > b:last-child {
    color:#6eff73;
}

.pok-reference-history-row.loss > strong,
.pok-reference-history-row.loss > b:last-child {
    color:#ff5a52;
}

.pok-reference-history-row.push > strong {
    color:#f4cf74;
}

/* a round's own line above its seats: number and the dealer's hand */
.pok-reference-history-round {
    display:grid;
    min-width:0;
    grid-template-columns:52px minmax(0,1fr) 66px;
    align-items:center;
    gap:7px;
    min-height:30px;
    margin-top:4px;
    padding:6px 0 2px;
    border-top:1px solid rgba(227,174,66,.45);
    color:#dcb655;
    font-size:11px;
    font-weight:900;
}

.pok-reference-history-round > span {
    font-size:13px;
}

.pok-reference-history-round + .pok-reference-history-row {
    border-top:0;
}

.pok-reference-history-row {
    min-height:34px;
    padding:4px 0;
}

.pok-reference-history-row > span {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:10px;
    color:#c9d7cc;
}

.pok-reference-history-row.you > span {
    color:#fff2c6;
    font-weight:900;
}

.pok-reference-history-row > strong {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.pok-reference-history-empty {
    min-height:88px;
    display:grid;
    place-items:center;
    border-top:1px solid rgba(93,129,103,.3);
    color:#aebfb4;
    font-size:11px;
    text-align:center;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActivity {
    display:grid;
    width:100%;
    min-height:62px;
    grid-template-columns:1fr;
    gap:5px;
    margin:12px 0 0;
    padding:10px 12px;
    border:1px solid rgba(205,158,59,.34);
    border-radius:12px;
    background:rgba(0,20,14,.66);
    text-align:left;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActivity > strong {
    color:#d8af52;
    font-size:9px;
    letter-spacing:.1em;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActivity > span {
    overflow:visible;
    color:#f1e4c7;
    font-size:10px;
    line-height:1.35;
    text-overflow:clip;
    white-space:normal;
}

/* A 1440 × 900 laptop is the common desktop target. Preserve the complete
   reference composition—including the exit—without shrinking text or chips
   into the unreadable sizes of the previous table. */
@media (min-width:1241px) and (max-height:920px) {
    #casinoTableGameScreen[data-game="pok_deng"] > .casino-table-shell {
        padding-bottom:8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header {
        min-height:66px;
        margin-bottom:7px;
        padding-block:7px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
        min-height:calc(100svh - 88px);
        padding:14px 20px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main {
        gap:7px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-title {
        min-height:40px;
        font-size:38px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase {
        min-height:36px;
        padding-block:5px;
        font-size:13px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.dealer {
        min-height:150px;
        grid-template-columns:118px minmax(240px,1fr) 132px;
        gap:12px;
        padding:8px 18px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-dealer-avatar {
        width:108px;
        height:108px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.dealer > strong {
        min-height:66px;
        font-size:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-copy > span,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-player-title > span {
        margin-bottom:5px;
        font-size:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-cards {
        min-height:114px;
        gap:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-card {
        width:80px;
        height:112px;
        padding:8px;
        font-size:24px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.yours {
        min-height:180px;
        padding:8px 18px 10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.yours .pok-card {
        width:88px;
        height:124px;
        font-size:27px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-card {
        min-height:98px;
        padding:10px 12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
        gap:7px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips {
        gap:8px;
        padding:7px 18px 11px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button {
        width:68px;
        height:68px;
        min-width:68px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-preview {
        min-height:20px;
        padding:2px 8px;
        font-size:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button {
        min-height:50px;
        padding-block:6px;
        font-size:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-exit {
        min-height:54px;
        font-size:22px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
        min-height:670px;
        padding-top:14px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-panel {
        padding:14px;
    }
}

/* Intermediate widths keep the table large instead of scaling everything. */
@media (max-width:1240px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns:240px minmax(0,1fr);
        grid-template-areas:
            "leader main"
            "rail rail";
    }

    .pok-reference-leaderboard {
        min-height:670px;
    }

    .pok-reference-rail {
        grid-template-columns:1fr 1fr;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.dealer {
        grid-template-columns:112px minmax(220px,1fr) 112px;
        padding-inline:14px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-dealer-avatar {
        width:104px;
        height:104px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips {
        padding-inline:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button {
        width:72px;
        height:72px;
        min-width:72px;
    }
}

/* Phone/tablet layout: full-size controls in a vertical flow, no compression. */
@media (max-width:780px) {
    body.pok-deng-reference-view {
        height:auto !important;
        min-height:100svh;
        overflow-x:hidden !important;
        overflow-y:auto !important;
        padding-bottom:calc(10px + env(safe-area-inset-bottom));
    }

    #casinoTableGameScreen[data-game="pok_deng"] {
        position:static !important;
        inset:auto !important;
        min-height:100svh;
        overflow:visible !important;
        padding:0;
    }

    #casinoTableGameScreen[data-game="pok_deng"] > .casino-table-shell {
        position:static !important;
        width:100%;
        height:auto !important;
        padding:0 0 calc(8px + env(safe-area-inset-bottom));
        overflow:visible !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header {
        width:calc(100vw - 10px);
        min-height:58px;
        margin:5px auto 7px;
        padding:8px 10px;
        display:flex;
        border-radius:15px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header > div:first-child {
        width:100%;
        justify-content:center;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header h2 {
        max-width:100%;
        font-size:21px;
        text-align:center;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header p,
    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header .how-to-play-button,
    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header > .game-nav-menu {
        display:none !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .mobile-table-nav {
        display:grid !important;
        width:100%;
        margin-top:7px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .mobile-core-actions {
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .mobile-core-actions button {
        min-height:44px;
        padding:5px 3px;
        border-color:rgba(218,168,62,.6);
        background:#05281b;
        color:#f3d47d;
        font-size:8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .mobile-overflow-menu {
        display:none;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
        width:calc(100vw - 8px);
        min-height:0;
        margin:0 auto;
        padding:12px 8px;
        overflow:visible;
        border-radius:25px;
        box-shadow:
            0 18px 50px rgba(0,0,0,.7),
            inset 0 0 0 3px rgba(1,12,9,.88),
            inset 0 0 0 5px rgba(180,128,35,.72);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage::before {
        inset:7px;
        border-radius:19px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        display:grid;
        grid-template-columns:minmax(0,1fr);
        grid-template-areas:
            "main"
            "leader"
            "rail";
        gap:10px;
    }

    .pok-reference-title {
        min-height:38px;
        font-size:29px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase {
        min-height:42px;
        margin-bottom:0;
        font-size:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.dealer {
        min-height:150px;
        grid-template-columns:78px minmax(0,1fr);
        gap:6px;
        padding:9px;
        border-radius:20px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-dealer-avatar {
        width:72px;
        height:82px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.dealer > strong {
        grid-column:1/-1;
        min-height:38px;
        padding:5px 8px;
        font-size:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-copy > span,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-player-title > span {
        margin-bottom:6px;
        font-size:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-cards {
        min-height:94px;
        gap:6px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-card {
        width:62px;
        height:90px;
        padding:7px;
        border-width:1px;
        border-radius:8px;
        font-size:20px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.yours {
        min-height:220px;
        padding:11px 8px;
        border-radius:20px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-player-title > strong {
        font-size:12px;
        line-height:1.3;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-player-hand-row {
        grid-template-columns:minmax(0,1fr) 112px;
        gap:7px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-zone.yours .pok-card {
        width:72px;
        height:104px;
        font-size:23px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-card {
        min-height:104px;
        grid-template-columns:1fr;
        gap:3px;
        padding:8px 5px;
        text-align:center;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-card span {
        font-size:8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-card strong {
        font-size:15px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
        position:static;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:6px;
        padding:0;
        background:transparent;
        backdrop-filter:none;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips {
        display:flex;
        grid-column:1/-1;
        width:100%;
        justify-content:flex-start;
        gap:8px;
        padding:12px 14px 18px;
        overflow-x:auto;
        overflow-y:hidden;
        border-radius:19px;
        scroll-snap-type:x proximity;
        scrollbar-width:none;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips::-webkit-scrollbar {
        display:none;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button {
        width:68px;
        height:68px;
        min-width:68px;
        flex:0 0 68px;
        scroll-snap-align:center;
        font-size:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips button::after {
        font-size:9px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-preview {
        font-size:10px;
        line-height:1.35;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > button {
        min-height:54px;
        padding:7px 5px;
        font-size:11px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm {
        grid-column:1/-1;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengDraw,
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengStay {
        grid-column:auto;
    }

    .pok-reference-exit {
        min-height:60px;
        font-size:19px;
    }

    .pok-reference-leaderboard {
        min-height:0;
        padding:14px 8px;
        border-radius:21px;
    }

    .pok-reference-heading strong {
        font-size:24px;
    }

    .pok-reference-leaderboard ol {
        display:flex;
        gap:6px;
        padding:2px 0 6px;
        overflow-x:auto;
        scroll-snap-type:x proximity;
        scrollbar-width:none;
    }

    .pok-reference-leaderboard ol::-webkit-scrollbar {
        display:none;
    }

    .pok-reference-leaderboard li {
        min-width:250px;
        flex:0 0 250px;
        scroll-snap-align:start;
        border:1px solid rgba(100,139,108,.3);
    }

    .pok-reference-expand {
        display:none;
    }

    .pok-reference-rail {
        grid-template-columns:minmax(0,1fr);
        gap:10px;
    }

    .pok-reference-panel {
        padding:15px;
        border-radius:20px;
    }
}

/* Short landscape phones must scroll; shrinking this table makes it unusable. */
@media (max-height:700px) and (orientation:landscape) {
    body.pok-deng-reference-view {
        height:auto !important;
        min-height:100svh;
        overflow-x:hidden !important;
        overflow-y:auto !important;
        padding:0 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] {
        position:static !important;
        inset:auto !important;
        min-height:100svh;
        overflow:visible !important;
        padding:0 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] > .casino-table-shell {
        position:static !important;
        width:100% !important;
        height:auto !important;
        padding:4px 4px 16px !important;
        overflow:visible !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header {
        position:relative !important;
        width:calc(100vw - 8px);
        height:auto;
        min-height:48px;
        margin:0 auto 5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
        position:relative !important;
        inset:auto !important;
        width:calc(100vw - 8px) !important;
        height:auto !important;
        min-height:0 !important;
        margin:0 auto !important;
        overflow:visible !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns:220px minmax(540px,1fr);
        grid-template-areas:
            "leader main"
            "rail rail";
    }

    .pok-reference-rail {
        grid-template-columns:1fr 1fr;
    }
}

@media (prefers-reduced-motion:reduce) {
    #casinoTableGameScreen[data-game="pok_deng"] *,
    #casinoTableGameScreen[data-game="pok_deng"] *::before,
    #casinoTableGameScreen[data-game="pok_deng"] *::after {
        scroll-behavior:auto !important;
        transition:none !important;
    }
}

/* -------------------------------------------------------------------------
   Blackjack presentation parity

   Pok Deng keeps its own rules and rendering functions. These final rules
   only align its lobby, table composition and wagering surface with the
   current Blackjack experience. They also give the shared six-chip selector
   a full-width grid slot; without that slot its generated wrapper collapsed
   to one action column and exposed only one oversized chip at a time.
   ------------------------------------------------------------------------- */

.casino-table-brand-logo {
    display:none;
}

/* Pok Deng table lobby: same hierarchy, density and controls as Blackjack. */
#casinoTableLobbyScreen[data-game="pok_deng"],
#casinoTableLobbyScreen[data-game="pok_deng"] * {
    box-sizing:border-box;
}

#casinoTableLobbyScreen[data-game="pok_deng"] {
    width:min(1080px,100%);
    min-height:calc(100vh - 30px);
    margin:0 auto;
}

#casinoTableLobbyScreen[data-game="pok_deng"] > .casino-table-shell {
    width:100%;
    max-width:none;
    display:flex;
    flex-direction:column;
    padding:24px;
    border:1px solid #315342;
    border-radius:22px;
    background:rgba(5,17,11,.94);
    box-shadow:0 30px 90px rgba(0,0,0,.62);
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-header {
    order:1;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin:0 0 16px;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-header h2 {
    margin:0;
    color:#fcd34d;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-header p {
    margin:5px 0 0;
    color:#9fd1b9;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-toolbar {
    display:flex;
    flex:1 1 560px;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-toolbar > button {
    flex:1 1 150px;
    min-height:50px;
    padding:8px 16px;
    border:1px solid #3f7656;
    border-radius:10px;
    background:#0a2116;
    color:#fff;
    font-weight:800;
}

#casinoTableLobbyScreen[data-game="pok_deng"] #casinoQuickPlayButton {
    order:1;
    background:linear-gradient(135deg,#22c55e,#15803d);
}

#casinoTableLobbyScreen[data-game="pok_deng"] #casinoCreateTableButton { order:2; }
#casinoTableLobbyScreen[data-game="pok_deng"] #casinoTableRefreshButton { order:3; }
#casinoTableLobbyScreen[data-game="pok_deng"] #casinoTableBackButton { order:4; }
#casinoTableLobbyScreen[data-game="pok_deng"] #casinoTableThemeButton { display:none; }

#casinoTableLobbyScreen[data-game="pok_deng"] > .casino-table-shell > .casino-lobby-section-title {
    order:2;
    margin:24px 0 10px;
}

#casinoTableLobbyScreen[data-game="pok_deng"] #casinoTableLobbyStatus {
    order:3;
    min-height:22px;
    margin:0 0 12px;
    color:#fca5a5;
    text-align:center;
}

#casinoTableLobbyScreen[data-game="pok_deng"] #casinoTableGrid {
    order:4;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin:0;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-card {
    min-width:0;
    padding:16px;
    border:1px solid #315342;
    border-radius:15px;
    background:rgba(3,13,8,.82);
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-card h3 {
    margin:0 0 7px;
    color:#fff;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-card p {
    min-height:42px;
    margin:4px 0;
    color:#9fd1b9;
    font-size:13px;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-room-join {
    width:100%;
    min-height:40px;
    margin-top:10px;
    background:linear-gradient(135deg,#22c55e,#15803d);
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-room-join:disabled {
    opacity:.45;
    cursor:not-allowed;
}

#casinoTableLobbyScreen[data-game="pok_deng"] .casino-theme-section {
    order:5;
    margin-top:24px;
    border-top:1px solid #315342;
}

/* The playable table uses Blackjack's header and three-column composition. */
#casinoTableGameScreen[data-game="pok_deng"] > .casino-table-shell {
    padding:6px 14px 28px;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header {
    width:min(1840px,100%);
    min-height:74px;
    margin:0 auto 10px;
    padding:9px 18px;
    border-color:rgba(209,173,60,.42);
    border-radius:20px;
    background:linear-gradient(180deg,rgba(1,24,16,.98),rgba(0,13,9,.98));
    box-shadow:0 13px 30px rgba(0,0,0,.42),inset 0 1px rgba(255,255,255,.035);
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header > div:first-child {
    flex:0 1 auto;
    gap:16px;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-brand-logo {
    display:block;
    width:clamp(58px,5vw,86px);
    height:45px;
    object-fit:contain;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header h2 {
    max-width:360px;
    color:#fff;
    font:1000 clamp(24px,2vw,36px)/1.1 system-ui,sans-serif;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header p {
    display:grid;
    min-width:130px;
    min-height:52px;
    place-items:center;
    padding:5px 14px;
    border:1px solid rgba(85,139,102,.45);
    border-radius:18px;
    background:rgba(0,15,10,.72);
    color:#c7d7cc;
    font-size:10px;
    font-weight:800;
    text-align:center;
    white-space:normal;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-table-header p strong {
    color:#fff;
    font-size:14px;
}

#casinoTableGameScreen[data-game="pok_deng"] .how-to-play-button {
    margin-left:10px;
    padding:10px 19px;
    background:linear-gradient(180deg,rgba(58,43,8,.74),rgba(20,17,6,.94));
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
    position:relative !important;
    inset:auto !important;
    width:min(1840px,100%);
    min-height:0;
    margin:0 auto;
    padding:0;
    overflow:visible;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}

#casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage::before,
#casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage::after {
    display:none;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
    display:grid;
    grid-template-columns:minmax(250px,326px) minmax(610px,1fr) minmax(250px,306px);
    grid-template-areas:"leader main rail";
    align-items:start;
    gap:14px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main {
    display:flex;
    flex-direction:column;
    gap:10px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-reference-table {
    order:1;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > #pokDengActions {
    order:2;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-reference-exit-bar {
    order:3;
}

.pok-reference-leaderboard,
.pok-reference-panel {
    border-color:rgba(207,167,55,.68);
    border-radius:24px;
    background:
        radial-gradient(circle at 50% 0,rgba(15,85,52,.25),transparent 38%),
        linear-gradient(160deg,rgba(1,29,19,.98),rgba(0,14,9,.98));
    box-shadow:0 18px 42px rgba(0,0,0,.46),inset 0 1px rgba(255,255,255,.035);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
    position:sticky;
    top:8px;
    min-height:min(820px,calc(100svh - 106px));
    max-height:calc(100svh - 106px);
    padding:18px 8px 14px;
    overflow:auto;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
    position:relative;
    isolation:isolate;
    width:min(900px,100%);
    margin-inline:auto;
    aspect-ratio:4 / 3;
    min-height:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:6px;
    /* the inset felt: nothing may spill onto the trim */
    padding:9% 10% 8%;
    overflow:hidden;
    border:2px solid #957120;
    border-radius:34px;
    background-color:#043d28;
    background-image:
        radial-gradient(ellipse at 50% 46%,rgba(9,115,72,.42),rgba(0,52,34,.28) 45%,rgba(0,19,13,.78) 82%),
        var(--poker-table-art);
    background-position:center;
    /* contained, not stretched -- the art keeps its own proportions */
    background-size:cover,cover;
    background-repeat:no-repeat,no-repeat;
    box-shadow:
        inset 0 0 0 7px rgba(2,24,16,.76),
        inset 0 0 0 10px rgba(218,174,48,.38),
        inset 0 0 95px rgba(0,0,0,.7),
        0 22px 50px rgba(0,0,0,.55);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table::before {
    content:"";
    position:absolute;
    z-index:0;
    inset:14px;
    border:1px solid rgba(236,197,76,.62);
    border-radius:inherit;
    pointer-events:none;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > * {
    position:relative;
    z-index:1;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-title {
    min-height:42px;
    margin:0;
    font-size:clamp(25px,2.2vw,36px);
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase {
    width:min(520px,88%);
    min-height:39px;
    margin:0 auto;
    padding:7px 20px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone {
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
    min-height:180px;
    grid-template-columns:118px minmax(230px,1fr) 125px;
    gap:12px;
    padding:5px 12px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-dealer-avatar {
    width:108px;
    height:108px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer > strong {
    min-height:76px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards {
    min-height:114px;
    gap:10px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card {
    width:80px;
    height:112px;
    padding:8px;
    font-size:24px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
    min-height:190px;
    padding:6px 18px 8px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours .pok-card {
    width:88px;
    height:124px;
    font-size:27px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-exposure-card {
    min-height:98px;
    padding:10px 12px;
}

/* Blackjack-style action surface. */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] #pokDengActions {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:9px;
    margin:0;
    padding:12px 14px 13px;
    overflow:visible;
    border:1px solid rgba(79,138,98,.54);
    border-radius:22px;
    background:linear-gradient(180deg,rgba(1,26,17,.97),rgba(0,14,9,.98));
    box-shadow:0 16px 34px rgba(0,0,0,.46),inset 0 1px rgba(255,255,255,.035);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-heading,
#casinoTableGameScreen[data-game="pok_deng"] .pok-chip-heading {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    color:#e8dbb2;
    font-size:10px;
    font-weight:900;
    letter-spacing:.11em;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-heading::before,
#casinoTableGameScreen[data-game="pok_deng"] .pok-action-heading::after,
#casinoTableGameScreen[data-game="pok_deng"] .pok-chip-heading::before,
#casinoTableGameScreen[data-game="pok_deng"] .pok-chip-heading::after {
    content:"";
    flex:1;
    height:1px;
    background:linear-gradient(90deg,transparent,rgba(207,167,55,.52));
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-heading::after,
#casinoTableGameScreen[data-game="pok_deng"] .pok-chip-heading::after {
    transform:scaleX(-1);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-heading { order:1; }
#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons {
    order:2;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
}
#casinoTableGameScreen[data-game="pok_deng"] .pok-chip-heading { order:3; }

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .shared-chip-selector,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > #pokDengChips {
    order:4;
    grid-column:1/-1;
    width:100%;
    min-width:0;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .shared-chip-selector > #pokDengChips {
    order:0;
    grid-column:2;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .shared-chip-selector .shared-chip-tray,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > #pokDengChips {
    border:1px solid rgba(218,169,65,.44);
    border-radius:18px;
    background:rgba(0,24,16,.72);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-preview {
    order:5;
    grid-column:1/-1;
    min-height:20px;
    padding:1px 8px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button {
    min-width:0;
    min-height:64px;
    margin:0;
    padding:9px 13px;
    border:1px solid rgba(205,166,55,.52);
    border-radius:15px;
    background:linear-gradient(180deg,#0b4029,#052719);
    color:#f4e4bd;
    font-size:14px;
    font-weight:900;
    cursor:pointer;
    box-shadow:inset 0 1px rgba(255,255,255,.05),0 8px 18px rgba(0,0,0,.32);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button.primary {
    border-color:#ffdf6d;
    background:linear-gradient(180deg,#f3c95b,#c79018);
    color:#171000;
    box-shadow:inset 0 1px #fff3b0,0 8px 18px rgba(0,0,0,.36);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button:hover:not(:disabled),
#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button:focus-visible {
    transform:translateY(-2px);
    filter:brightness(1.12);
    box-shadow:0 0 0 3px rgba(255,218,95,.17),0 10px 22px rgba(0,0,0,.4);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button:disabled {
    cursor:not-allowed;
    filter:saturate(.35) brightness(.62);
    opacity:.62;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] .pok-action-buttons {
    grid-template-columns:repeat(2,minmax(0,1fr));
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-exit-bar {
    width:100%;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-exit {
    min-height:68px;
    border-radius:16px;
    background:linear-gradient(180deg,#7f1c17,#4b0d0c);
    font-size:clamp(18px,1.7vw,26px);
}

@media (max-width:1370px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns:minmax(220px,270px) minmax(570px,1fr) minmax(210px,245px);
        gap:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        min-height:510px;
        padding-inline:34px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
        grid-template-columns:102px minmax(210px,1fr) 112px;
        min-height:155px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-dealer-avatar {
        width:92px;
        height:92px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
        min-height:168px;
    }
}

@media (max-width:1120px) {
    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-brand-logo {
        display:none;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns:minmax(220px,270px) minmax(0,1fr);
        grid-template-areas:
            "leader main"
            "rail main";
        align-items:start;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
        position:static;
        min-height:390px;
        max-height:520px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-rail {
        grid-template-columns:minmax(0,1fr);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        min-height:540px;
        padding-inline:22px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
        grid-template-columns:82px minmax(190px,1fr) 92px;
        gap:7px;
        padding-inline:5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-dealer-avatar {
        width:76px;
        height:82px;
    }
}

@media (max-width:780px) {
    #casinoTableGameScreen[data-game="pok_deng"] > .casino-table-shell {
        padding:3px 4px calc(10px + env(safe-area-inset-bottom));
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header {
        position:relative;
        top:auto;
        width:100%;
        min-height:44px;
        height:44px;
        margin:0 0 4px;
        padding:3px 6px;
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        gap:5px;
        border-radius:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header > div:first-child {
        width:auto;
        min-width:0;
        justify-content:flex-start;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-brand-logo {
        display:block;
        width:68px;
        height:34px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header h2,
    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header p,
    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header .how-to-play-button,
    #casinoTableGameScreen[data-game="pok_deng"] .mobile-table-nav {
        display:none !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header > .game-nav-menu {
        display:block !important;
        min-width:82px;
        width:auto;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .game-nav-menu > summary {
        min-width:82px;
        min-height:44px;
        height:44px;
        padding:4px 7px;
        font-size:11px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .game-nav-panel {
        position:fixed;
        top:46px;
        right:4px;
        width:min(270px,calc(100vw - 8px));
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns:minmax(0,1fr);
        grid-template-areas:
            "main"
            "leader";
        gap:8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-rail,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-exit-bar {
        display:none !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main {
        gap:4px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        min-height:420px;
        padding:10px 8px 12px;
        gap:2px;
        border-radius:31px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table::before {
        inset:6px;
        border-radius:25px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-title {
        min-height:32px;
        font-size:24px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-title::before,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-title::after {
        width:42px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase {
        width:min(310px,88%);
        min-height:35px;
        padding:5px 10px;
        font-size:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
        min-height:126px;
        grid-template-columns:66px minmax(0,1fr) 74px;
        gap:3px;
        padding:2px 5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-dealer-avatar {
        width:62px;
        height:70px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer > strong {
        grid-column:auto;
        min-height:54px;
        padding:4px;
        font-size:8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-copy > span,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > span {
        margin-bottom:3px;
        font-size:8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards {
        min-height:82px;
        gap:4px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours .pok-card {
        width:56px;
        height:80px;
        padding:5px;
        font-size:18px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
        min-height:156px;
        padding:3px 7px 5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
        font-size:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-hand-row {
        grid-template-columns:minmax(0,1fr) 96px;
        gap:4px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-exposure-card {
        min-height:82px;
        grid-template-columns:1fr;
        gap:2px;
        padding:5px 3px;
        text-align:center;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-exposure-card span { font-size:7px; }
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-exposure-card strong { font-size:13px; }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions,
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] #pokDengActions {
        padding:5px;
        gap:4px;
        border-radius:15px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-heading,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-chip-heading {
        gap:6px;
        font-size:8px;
        line-height:1;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons {
        gap:4px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button {
        min-height:48px;
        height:48px;
        padding:4px 2px;
        border-radius:10px;
        font-size:9px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .shared-chip-selector {
        grid-template-columns:minmax(0,1fr) !important;
        gap:0 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions .shared-chip-scroll {
        display:none !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .shared-chip-selector .shared-chip-tray,
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > #pokDengChips {
        width:100% !important;
        max-width:100% !important;
        display:flex !important;
        justify-content:center !important;
        gap:3px !important;
        padding:4px 2px 5px !important;
        overflow:visible !important;
        border-radius:12px;
        scroll-snap-type:none !important;
        scrollbar-width:none !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .shared-chip-selector > #pokDengChips {
        grid-column:1;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips > .chip-option,
    #casinoTableGameScreen[data-game="pok_deng"] .shared-chip-selector #pokDengChips > .chip-option {
        flex:0 1 clamp(44px,14vw,54px) !important;
        width:clamp(44px,14vw,54px) !important;
        min-width:42px !important;
        max-width:54px !important;
        height:clamp(44px,14vw,54px) !important;
        min-height:42px !important;
        max-height:54px !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-exposure-preview {
        min-height:12px;
        padding:0;
        font-size:8px;
        line-height:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
        min-height:0;
        max-height:none;
        margin:0;
        padding:12px 7px 9px;
        overflow:visible;
    }
}

@media (max-width:600px) {
    #casinoTableLobbyScreen[data-game="pok_deng"] > .casino-table-shell {
        padding:14px;
    }

    #casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-header {
        display:block;
    }

    #casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-toolbar {
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        margin-top:10px;
    }

    #casinoTableLobbyScreen[data-game="pok_deng"] .casino-table-toolbar > button {
        min-width:0;
        min-height:48px;
        padding:7px 5px;
        font-size:10px;
    }

    #casinoTableLobbyScreen[data-game="pok_deng"] #casinoTableGrid {
        grid-template-columns:minmax(0,1fr);
    }
}

@media (min-width:781px) and (max-height:700px) and (orientation:landscape) {
    #casinoTableGameScreen[data-game="pok_deng"] > .casino-table-shell {
        width:100% !important;
        padding:4px 6px 16px !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-table-header {
        width:100%;
        min-height:52px;
        margin-bottom:5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
        width:100% !important;
        padding:0 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns:minmax(200px,240px) minmax(0,1fr) !important;
        grid-template-areas:
            "leader main"
            "rail main" !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        min-height:470px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-rail {
        grid-template-columns:minmax(0,1fr);
    }
}

/* Final Pok Deng control hierarchy: mirror Blackjack without a scrollable chip rail. */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    padding:12px 14px 14px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-heading,
#casinoTableGameScreen[data-game="pok_deng"] .pok-chip-heading {
    width:100%;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button {
    display:grid;
    min-width:0;
    min-height:62px;
    place-content:center;
    gap:4px;
    margin:0;
    padding:8px 12px;
    border:1px solid rgba(205,166,55,.52);
    border-radius:15px;
    background:linear-gradient(180deg,#0b4029,#052719);
    color:#f4e4bd;
    font-size:14px;
    font-weight:900;
    line-height:1.05;
    text-align:center;
    box-shadow:inset 0 1px rgba(255,255,255,.05),0 8px 18px rgba(0,0,0,.32);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button.primary {
    border-color:#ffdf6d;
    background:linear-gradient(180deg,#f3c95b,#c79018);
    color:#171000;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button small {
    color:inherit;
    font-size:10px;
    font-weight:700;
    opacity:.72;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    min-width:0;
    order:3;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface .pok-chip-heading,
#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface .pok-exposure-preview {
    order:0;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface > .shared-chip-selector {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    width:100% !important;
    min-width:0;
    gap:0 !important;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface .shared-chip-scroll {
    display:none !important;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips {
    display:grid !important;
    grid-column:1 !important;
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    align-items:center;
    justify-items:center;
    width:min(100%,644px) !important;
    max-width:100% !important;
    margin-inline:auto !important;
    gap:4px !important;
    padding:8px 6px 10px !important;
    overflow:visible !important;
    border:1px solid rgba(218,169,65,.44);
    border-radius:18px;
    background:rgba(0,24,16,.72);
    scroll-snap-type:none !important;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips > .chip-option {
    width:min(100px,100%) !important;
    min-width:0 !important;
    max-width:100px !important;
    height:auto !important;
    min-height:56px !important;
    max-height:none !important;
    aspect-ratio:1;
    margin:0;
    scroll-snap-align:none;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-row {
    display:grid;
    grid-template-columns:minmax(190px,.85fr) minmax(190px,.82fr) minmax(230px,1.2fr);
    gap:10px;
    align-items:stretch;
    min-width:0;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    min-width:0;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools > button,
#casinoTableGameScreen[data-game="pok_deng"] .pok-confirm-bet {
    min-width:0;
    min-height:58px;
    margin:0;
    padding:7px 9px;
    border:1px solid rgba(205,166,55,.58);
    border-radius:14px;
    background:linear-gradient(180deg,#0b4029,#052719);
    color:#f4e4bd;
    font-size:12px;
    font-weight:900;
    line-height:1.12;
    text-align:center;
    box-shadow:inset 0 1px rgba(255,255,255,.05),0 8px 18px rgba(0,0,0,.28);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-confirm-bet.primary {
    border-color:#ffdf6d;
    background:linear-gradient(180deg,#f3c95b,#c79018);
    color:#171000;
    font-size:14px;
    box-shadow:inset 0 1px #fff3b0,0 8px 18px rgba(0,0,0,.36);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools > button:hover:not(:disabled),
#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools > button:focus-visible,
#casinoTableGameScreen[data-game="pok_deng"] .pok-confirm-bet:hover:not(:disabled),
#casinoTableGameScreen[data-game="pok_deng"] .pok-confirm-bet:focus-visible {
    transform:translateY(-2px);
    filter:brightness(1.12);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools > button:disabled,
#casinoTableGameScreen[data-game="pok_deng"] .pok-confirm-bet:disabled {
    cursor:not-allowed;
    filter:saturate(.35) brightness(.62);
    opacity:.62;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-row .pok-exposure-preview {
    display:grid;
    grid-template-rows:auto auto;
    min-width:0;
    min-height:58px;
    place-content:center;
    gap:3px;
    margin:0;
    padding:6px 10px;
    border:1px solid rgba(205,166,55,.58);
    border-radius:14px;
    background:rgba(0,24,16,.82);
    color:#f2cf70;
    font-size:11px;
    font-weight:800;
    line-height:1.18;
    text-align:center;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-wager-row .pok-exposure-preview::before {
    content:"CURRENT WAGER";
    color:#fff0b0;
    font-size:9px;
    font-weight:900;
    letter-spacing:.08em;
}

@media (max-width:780px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
        gap:5px;
        padding:6px;
        border-radius:15px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons {
        gap:5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button {
        min-height:46px;
        padding:4px 5px;
        border-radius:10px;
        font-size:11px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button small {
        font-size:8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface {
        gap:5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips {
        width:100% !important;
        gap:2px !important;
        padding:5px 3px 6px !important;
        border-radius:12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips > .chip-option {
        width:min(62px,100%) !important;
        max-width:62px !important;
        min-height:50px !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-row {
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools {
        grid-column:1/-1;
        gap:5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools > button,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-confirm-bet,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-row .pok-exposure-preview {
        min-height:46px;
        padding:4px 5px;
        border-radius:10px;
        font-size:9px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-confirm-bet.primary {
        font-size:10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-row .pok-exposure-preview::before {
        font-size:7px;
    }
}


/* =========================================================
   POK DENG: BLACKJACK-STYLE TABLE
   The wager moves to the floating button on the felt, the
   hand label sits under the cards with the score on the
   right, and the chips sit shoulder to shoulder.
   ========================================================= */

/*
 * Every direct child of the felt is forced to position:relative above, which
 * would drop the floating button back into the flow. It is inset from the
 * corner because the felt is an ellipse and would clip a square corner.
 */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .floating-bet-dock {
    position: absolute;
    z-index: 12;
    top: 7%;
    right: 9%;
}

/* the hand caption now reads under the cards, score on the right */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    width: min(620px, 96%);
    margin: 6px auto 0;
    padding: 6px 18px;
    border: 1px solid rgba(218, 169, 65, .4);
    border-radius: 999px;
    background: rgba(0, 24, 16, .58);
    text-align: left;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > span {
    flex: 0 0 auto;
    letter-spacing: .1em;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
    display: block;
    flex: 1 1 auto;
    color: #ffe9a6;
    font-size: clamp(19px, 1.9vw, 27px);
    font-weight: 1000;
    text-align: right;
}

/* the exposure card is gone, so the cards take the whole row */
#casinoTableGameScreen[data-game="pok_deng"] .pok-player-hand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0;
}

/* your cards open one tap at a time */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reveal-card {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reveal-card .pok-card {
    pointer-events: none;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reveal-card.ready {
    animation: card-ready-pulse 1s ease-in-out infinite alternate;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reveal-card:disabled {
    cursor: default;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .floating-bet-dock {
        top: 5%;
        right: 6%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title {
        width: 96%;
        padding: 5px 12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
        font-size: clamp(16px, 4.6vw, 22px);
    }
}

/* =========================================================
   POK DENG: BLACKJACK CONTAINER PARITY
   The felt is a fixed-ratio rounded rectangle now, so the
   hands, badges and floating controls all anchor inside it
   rather than against the old oval's outer pixel offsets.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > * {
    max-width: 100%;
    min-width: 0;
}

/* the hands sit on the felt, never over the leather */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone {
    width: 100%;
    min-width: 0;
    margin-inline: auto;
}

/* the status banner truncates instead of pushing the felt wider */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
 * Down beside your own hand rather than up over the title: it sits where
 * the caption used to, which is both where the eye already is and where a
 * thumb lands after tapping chips.
 */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .floating-bet-dock {
    top: auto;
    bottom: 4%;
    right: 6%;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-dealer-avatar {
    flex: 0 0 auto;
    border-radius: 50%;
    aspect-ratio: 1;
    object-fit: cover;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        width: 100%;
        aspect-ratio: 3 / 4;
        padding: 10% 7% 8%;
        border-radius: 24px;
    }
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table::before {
        inset: 9px;
    }
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .floating-bet-dock {
        top: auto;
        bottom: 3%;
        right: 4%;
    }
}

/*
 * Pok Deng deals the shared themed card now, so it needs the same kind of
 * sizing the other tables give it rather than the flat panel's fixed box.
 */
#casinoTableGameScreen[data-game="pok_deng"] .pok-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-cards .card {
    width: clamp(58px, 6.4vw, 88px);
    height: clamp(82px, 9vw, 124px);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reveal-card .card {
    width: 100%;
    height: 100%;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-cards .card {
        width: clamp(48px, 15vw, 68px);
        height: clamp(68px, 21vw, 96px);
    }
}

/*
 * With the label gone the strip carries only the hand itself, so it centres
 * rather than sitting hard against one edge.
 */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title {
    justify-content: center;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
    flex: 0 1 auto;
    text-align: center;
}

/* the strip is empty until there is a hand to describe */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title:not(:has(strong:not(:empty))) {
    visibility: hidden;
}


/* =========================================================
   ONE CENTRED STACK
   =========================================================

   Both hand zones were laid out as three columns for a dealer portrait, a
   hand, and a points panel. The portrait was taken out of the markup and
   nothing shrank the grid to match, so the cards were squeezed into the
   118px column meant for the picture while the points panel sprawled across
   the one meant for the cards.

   They are a single centred column now, banker above and your hand below,
   the way the Blackjack felt reads.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 10px;
    min-height: 0;
    padding: 14px 18px 16px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-copy {
    width: 100%;
}

/* the points read at a glance; the panel around them does not need the room */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer > strong {
    width: max-content;
    max-width: 100%;
    min-height: 0;
    padding: 7px 22px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
    justify-items: center;
    gap: 10px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-hand-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: 100%;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
    font-size: 22px;
    font-weight: 900;
}


/* =========================================================
   PLACE YOUR BET
   =========================================================

   A finger under the chip while it is still asking for a wager. It goes as
   soon as the bet is in, so it points at something that can be pressed.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock {
    position: absolute;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock.wants-bet::after {
    content: "\1F446";
    position: absolute;
    top: 100%;
    left: 50%;
    pointer-events: none;
    transform: translate(-50%, 2px);
    font-size: 30px;
    line-height: 1;
    filter: drop-shadow(0 4px 9px rgba(0, 0, 0, .75));
    animation: pok-bet-hint 1s ease-in-out infinite;
}

@keyframes pok-bet-hint {
    0%, 100% { transform: translate(-50%, 2px); }
    50%      { transform: translate(-50%, 12px); }
}


/* =========================================================
   THE RESULT BANNER
   =========================================================

   It used to say "press OK to continue" whether or not there was an OK on
   screen to press. Now the banner itself is the thing you press.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase.is-tappable {
    border-color: #ffdf6d;
    background: linear-gradient(180deg, #f3c95b, #c79018);
    color: #171000;
    cursor: pointer;
    animation: pok-phase-invite 1.1s ease-in-out infinite alternate;
}

@keyframes pok-phase-invite {
    from { box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
    to   { box-shadow: 0 6px 16px rgba(0, 0, 0, .45), 0 0 24px rgba(255, 214, 90, .95); }
}


/* =========================================================
   UNDO AND CLEAR, BESIDE THE CHIPS
   ========================================================= */

@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface {
        grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
        align-items: center;
        gap: 14px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface > #pokDengChips {
        grid-column: 1 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface > .pok-wager-row {
        grid-column: 2;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools > button {
        min-height: 56px;
        font-size: 16px;
        letter-spacing: .03em;
    }
}

/* on a phone they stay under the chips, side by side, but readable */
@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-row {
        grid-template-columns: minmax(0, 1fr);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-wager-tools > button {
        min-height: 50px;
        font-size: 14px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer > strong,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
        font-size: 17px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock.wants-bet::after {
        font-size: 24px;
    }
}


/* =========================================================
   UNDO AND CLEAR, ON THE FELT
   =========================================================

   They belong with the wager, so they sit on the lower rail beside the bet
   chip rather than in the panel underneath. That also hands the whole width
   of the panel back to the chip rail.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row {
    position: absolute;
    z-index: 39;
    right: calc(6% + clamp(96px, 9vw, 132px) + 22px);
    bottom: 5%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(380px, 44%);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row .pok-wager-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    grid-column: 1 / -1;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-wager-tools > button {
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 13px;
    font-size: 15px;
    letter-spacing: .03em;
    backdrop-filter: blur(3px);
}

/* the panel below is chips and nothing else now */
#casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface {
    grid-template-columns: minmax(0, 1fr);
}


/* =========================================================
   THE FINGER, ON THE CHIP'S SHOULDER
   =========================================================

   Above and to the right of the chip, angled back at it, rather than
   underneath where the rail already is.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock.wants-bet::after {
    top: -6px;
    right: -30px;
    bottom: auto;
    left: auto;
    transform: rotate(28deg) translateY(0);
    font-size: 34px;
    animation: pok-bet-hint-shoulder 1s ease-in-out infinite;
}

@keyframes pok-bet-hint-shoulder {
    0%, 100% { transform: rotate(28deg) translate(0, 0); }
    50%      { transform: rotate(28deg) translate(-7px, 7px); }
}


/* =========================================================
   CHIPS AT TABLE SIZE
   ========================================================= */

@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips {
        width: min(100%, 860px) !important;
        gap: 12px !important;
        padding: 12px 10px 14px !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips > .chip-option {
        width: min(128px, 100%) !important;
        max-width: 128px !important;
        min-height: 100px !important;
    }
}

@media (max-width: 900px) {
    /* the felt is narrow here, so the pair tucks into the opposite corner */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row {
        right: auto;
        bottom: 3%;
        left: 4%;
        width: min(54%, 230px);
        gap: 6px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row .pok-wager-tools {
        gap: 6px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-wager-tools > button {
        min-height: 40px;
        padding: 5px 6px;
        font-size: 11px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock.wants-bet::after {
        right: -22px;
        font-size: 26px;
    }
}


/* =========================================================
   THE FACE-DOWN CARDS HAD NO SIZE
   =========================================================

   Your two cards are wrapped in a button so they can be tapped open, and
   the card inside it is sized at 100% of that button -- but nothing ever
   gave the button a size of its own, so both collapsed to a few pixels.
   The hand looked like it had vanished, and because the cards could not be
   tapped the reveal never finished, which is why the result popup never
   arrived either.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reveal-card {
    width: clamp(58px, 6.4vw, 88px);
    height: clamp(82px, 9vw, 124px);
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reveal-card {
        width: clamp(48px, 15vw, 68px);
        height: clamp(68px, 21vw, 96px);
    }
}

/* the banner is a status line again, never a button */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase {
    cursor: default;
}


/* =========================================================
   THE FINGER, POINTING AT THE CHIP
   =========================================================

   Sitting on the chip's top-right shoulder it has to point down and to the
   left. A finger that already points up, tilted further up, was aiming at
   the ceiling.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock.wants-bet::after {
    content: "\1F447";
    top: -20px;
    right: -34px;
    bottom: auto;
    left: auto;
    transform: rotate(40deg);
    font-size: 48px;
    animation: pok-bet-hint-shoulder 1s ease-in-out infinite;
}

@keyframes pok-bet-hint-shoulder {
    0%, 100% { transform: rotate(40deg) translate(0, 0); }
    50%      { transform: rotate(40deg) translate(-6px, 6px); }
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock.wants-bet::after {
        top: -14px;
        right: -24px;
        font-size: 36px;
    }
}


/* =========================================================
   YOUR CARDS
   =========================================================

   Your half of the felt had no caption, so the banker's points panel sat
   directly on top of your hand and read as though it belonged to it. A
   small label of its own separates the two, and there is room to breathe
   between them.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-your-cards-label {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 5px 16px;
    border: 1px solid rgba(213, 165, 67, .45);
    border-radius: 999px;
    background: rgba(0, 24, 17, .72);
    color: #f3cf73;
    font: 800 12px/1 system-ui, sans-serif;
    letter-spacing: .16em;
    text-align: center;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
    gap: 12px;
    padding-top: 18px;
}

/* the banker's panel keeps clear of the label below it */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
    padding-bottom: 22px;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDealerHand[hidden] {
    display: none;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-your-cards-label {
        padding: 4px 12px;
        font-size: 10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
        gap: 8px;
        padding-top: 12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
        padding-bottom: 14px;
    }
}

/* =========================================================
   DRAW AND STAY
   =========================================================

   Two buttons stretched the full width of the panel read as banners rather
   than as a choice. They sit as a centred pair over the chip rail now --
   squarer, with the word itself set large enough to hit at a glance.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] .pok-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 238px));
    justify-content: center;
    gap: 16px;
    width: 100%;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button {
    min-height: 104px;
    gap: 7px;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 25px;
    letter-spacing: .01em;
    line-height: 1.1;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button small {
    font-size: 13px;
    font-weight: 800;
    opacity: .78;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons,
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] .pok-action-buttons {
        grid-template-columns: repeat(2, minmax(0, 170px));
        gap: 10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button {
        min-height: 80px;
        padding: 9px 10px;
        border-radius: 16px;
        font-size: 19px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons > button small {
        font-size: 11px;
    }
}

/* =========================================================
   THE FELT, WITHOUT THE FURNITURE
   =========================================================

   The title and the phase bar both said what the table already shows: the
   game is named on the tab and in the lobby, and the chip on the felt reads
   PLACE YOUR BETS or NO MORE BETS by itself. Taking them out gives the two
   hands the height they were short of, which is why your cards were
   spilling over the lower trim.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-table-title,
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table #pokDengPhase {
    display: none !important;
}

/* the two hands now share the felt evenly, clear of the trim at both ends */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
    justify-content: center;
    gap: clamp(10px, 2.2vh, 26px);
    padding: 7% 10% 9%;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
    padding-top: 4px;
    padding-bottom: 8px;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
    padding-top: 6px;
    padding-bottom: 2px;
}


/* =========================================================
   UNDO AND CLEAR, CENTRED ON THE RAIL
   =========================================================

   Anchored to the chip's edge they drifted to one side. They now centre in
   the space beside the chip, which is the middle of the rail as it reads.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row {
    right: calc(6% + clamp(96px, 9vw, 132px));
    left: 0;
    margin-inline: auto;
    width: min(380px, 46%);
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        padding: 6% 7% 8%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row {
        right: calc(4% + clamp(96px, 9vw, 132px));
        left: 0;
        width: min(240px, 52%);
    }
}

/*
 * The rail is absolutely positioned, so the felt has to reserve its height
 * or the hand's score line runs straight through UNDO and CLEAR BET.
 */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
    padding-bottom: 15%;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        padding-bottom: 15%;
    }
}

/* =========================================================
   TWO COLUMNS, AND A FOOTER
   =========================================================

   The right rail held how to play and the round history. How to play is on
   the header button, and the history belongs under the table where the eye
   lands after a hand -- so the rail is gone and the page is the leaderboard
   and the table.
   ========================================================= */

@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns: minmax(250px, 300px) minmax(560px, 1fr);
        grid-template-areas: "leader main";
    }
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    align-items: start;
    gap: 14px;
    width: 100%;
    margin-top: 12px;
    order: 4;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer > .pok-reference-history {
    min-width: 0;
    margin: 0;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer > .pok-reference-exit {
    min-height: 76px;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.25;
}


/* =========================================================
   UNDO AND CLEAR: SOLID, AND ON THE CENTRE LINE
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    margin-inline: 0;
    width: min(400px, 56%);
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-wager-tools > button {
    border: 1px solid rgba(233, 191, 84, .85);
    background: linear-gradient(180deg, #0d4b30, #04291a);
    color: #ffeec2;
    box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 8px 18px rgba(0, 0, 0, .5);
    backdrop-filter: none;
    opacity: 1;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-wager-tools > button:disabled {
    filter: none;
    opacity: .58;
}


/* =========================================================
   THE HANDS, ON THE FELT'S OWN CENTRE LINE
   =========================================================

   The felt reserves a band at the foot for the wager rail, so centring the
   hands inside the remaining space means matching that band at the top.
   Anything less and the pair rides high, which is exactly what it did.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
    padding-top: 13%;
    padding-bottom: 13%;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
        grid-template-columns: minmax(0, 1fr);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer > .pok-reference-exit {
        min-height: 56px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row {
        width: min(260px, 62%);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        padding-top: 12%;
        padding-bottom: 12%;
    }
}

/* =========================================================
   TWO HANDS, SIDE BY SIDE
   =========================================================

   Stacked, the two hands shared the felt's height and the cards had to stay
   small to fit. Set beside each other they each get half the width and all
   of the height, so the cards can be half again as large: the banker on the
   left, yours on the right.
   ========================================================= */

@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-content: center;
        align-items: center;
        justify-items: center;
        column-gap: clamp(16px, 3vw, 56px);
        row-gap: 0;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
        grid-column: 1;
        width: 100%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
        grid-column: 2;
        width: 100%;
    }

    /* half the felt each, so the cards stop being postage stamps */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards .card {
        width: clamp(88px, 9vw, 134px);
        height: clamp(124px, 12.6vw, 188px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-reveal-card {
        width: clamp(88px, 9vw, 134px);
        height: clamp(124px, 12.6vw, 188px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards {
        gap: clamp(8px, 1vw, 16px);
    }
}

/*
 * The history does not need the whole width to say what happened in one
 * round, and the way out was a small tab in the corner. They share the
 * footer now: the log on the left, the exit centred in the space beside it
 * and large enough to aim at.
 */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer > .pok-reference-exit {
    justify-self: center;
    align-self: center;
    width: min(360px, 100%);
    min-height: 104px;
    border-radius: 20px;
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1.25;
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
        grid-template-columns: minmax(0, 1fr);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer > .pok-reference-exit {
        width: 100%;
        min-height: 62px;
        font-size: 17px;
    }
}

/*
 * The felt shows two different card elements: .pok-card for the face-down
 * placeholders in the markup, and .card for anything the deal renders. Both
 * have to grow, or the hand shrinks the moment it is dealt.
 */
@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards .card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-reveal-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours .pok-card {
        width: clamp(96px, 7.6vw, 138px);
        height: clamp(134px, 10.6vw, 193px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-reveal-card .card {
        width: 100%;
        height: 100%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card {
        font-size: clamp(26px, 2.3vw, 38px);
    }
}

/*
 * A drawn third card takes the hand past its half of the felt, so a hand of
 * three tightens into a small fan rather than pushing into the other side.
 */
@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards:has(> :nth-child(3)) > * + * {
        margin-left: calc(-1 * clamp(26px, 2.6vw, 44px));
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards:has(> :nth-child(3)) > * {
        box-shadow: 0 10px 18px rgba(0, 0, 0, .62), -6px 0 12px rgba(0, 0, 0, .34);
    }
}

/* =========================================================
   THE PHONE: ONE COLUMN, ONE SCREEN
   =========================================================

   The table comes first and the leaderboard sits under it, the same order
   the desktop reads in. Everything is sized to land inside one viewport, so
   a hand can be played without scrolling for the chips or the cards.
   ========================================================= */

@media (max-width: 900px) {

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas:
            "main"
            "leader" !important;
        gap: 6px !important;
        align-content: start;
    }

    /* the felt keeps the two hands stacked, and stays short enough to fit */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        aspect-ratio: auto;
        min-height: 0;
        height: min(46vh, 360px);
        margin: 0 auto;
        padding: 5% 6% 17%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards .card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-reveal-card {
        width: clamp(46px, 13.5vw, 66px);
        height: clamp(64px, 19vw, 92px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
        gap: 4px;
        padding-block: 2px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-your-cards-label {
        padding: 3px 10px;
        font-size: 9px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-copy > span {
        margin-bottom: 4px;
        font-size: 10px;
    }

    /* the action panel and chip rail, tightened to what they need */
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
        gap: 5px;
        padding: 7px 8px 8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips {
        gap: 3px !important;
        padding: 5px 3px 6px !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips > .chip-option {
        min-height: 42px !important;
    }

    /* the round history and the way out, side by side and compact */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
        grid-template-columns: minmax(0, 1fr) 116px !important;
        align-items: center;
        gap: 8px;
        margin-top: 6px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer > .pok-reference-exit {
        width: 100%;
        min-height: 54px;
        font-size: 12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-history {
        padding: 8px 10px 10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-history-list {
        max-height: 72px;
        overflow-y: auto;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActivity {
        display: none;
    }

    /* the leaderboard reads under the table, a short scrollable list */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
        position: static;
        min-height: 0 !important;
        max-height: 168px;
        padding: 8px 10px 10px;
        overflow-y: auto;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard .pok-reference-heading strong {
        font-size: 15px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-expand {
        min-height: 38px;
        font-size: 10px;
    }

    /* nothing below the leaderboard, so the page ends with it */
    #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
        padding: 6px 8px 10px !important;
    }
}

/* =========================================================
   WHAT FITS ABOVE THE FOLD
   =========================================================

   The felt used to be sized by its 4:3 ratio, which on a wide screen made
   it tall enough to push the chip rail off the bottom -- you had to scroll
   to place a bet. It is sized to the viewport now: the table and the chips
   together land on the first screen, and the round history and the way out
   sit below, which is where you go looking for them anyway.

   The width freed up by that goes into the cards.
   ========================================================= */

@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        aspect-ratio: auto;
        width: min(1040px, 100%);
        height: min(54vh, 540px);
        min-height: 380px;
        padding: 8% 8% 15%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards .card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-reveal-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours .pok-card {
        width: clamp(104px, 8.2vw, 150px);
        height: clamp(146px, 11.5vw, 210px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card {
        font-size: clamp(30px, 2.6vw, 42px);
    }

    /* the panel under the felt stays compact so the chips clear the fold */
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
        padding: 9px 14px 11px;
        gap: 7px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips > .chip-option {
        min-height: 64px !important;
    }
}

/* the history and the way out start below the first screen, not peeking */
@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
        margin-top: 18vh;
    }
}

/*
 * The phone budget: header, felt, chips, history and leaderboard have to
 * add up to one screen. Every part below is sized against that total rather
 * than to taste.
 */
@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        height: min(38vh, 300px);
        padding: 4% 6% 16%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main {
        gap: 5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-history-list {
        max-height: 46px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-history {
        padding: 6px 9px 8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-history h4 {
        margin-bottom: 4px;
        font-size: 12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
        max-height: 132px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
        margin-top: 4px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-expand {
        display: none;
    }
}

/*
 * The last of the phone budget: the leaderboard's own list has to obey the
 * cap, and the top-up hint repeats what the wallet at the top already says.
 */
@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard > ol {
        max-height: 84px;
        overflow-y: auto;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .casino-topup-row,
    #casinoTableGameScreen[data-game="pok_deng"] #casinoGameResult:empty {
        display: none !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #casinoGameResult {
        margin: 4px 0 0;
        padding: 4px 8px;
        font-size: 11px;
    }
}

/*
 * An older rule still declared five grid rows for a layout that now has
 * two, leaving a 260px empty track under the leaderboard and a page that
 * scrolled into nothing.
 */
@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-rows: auto auto !important;
        min-height: 0 !important;
    }
}

@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
        padding-bottom: 0 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
        margin-bottom: 0;
    }
}

/* =========================================================
   THE BET CHIP LIVES IN THE COLUMN NOW
   =========================================================

   It used to sit inside the felt, which clips its own overflow -- so it
   could never be placed below the table on a phone. It is a sibling of the
   felt instead, pinned back onto the felt's lower right on a wide screen
   and laid out in the grid on a narrow one.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main {
    position: relative;
}

@media (min-width: 901px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > #pokDengBetDock {
        position: absolute;
        z-index: 40;
        right: 3%;
        /* the felt's own height, written the same way, so the two stay together */
        top: calc(max(380px, min(54vh, 540px)) - 150px);
        bottom: auto;
        left: auto;
    }
}


/* =========================================================
   THE PHONE, LAID OUT AS ASKED
   =========================================================

       felt
       chips
       leaderboard | bet chip
       leaderboard | exit
       round history        <- the only thing below the fold

   `display: contents` lets the column and the footer hand their children
   straight to this grid, so parts that live in different wrappers can still
   share a row.
   ========================================================= */

@media (max-width: 900px) {

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
        grid-template-columns: minmax(0, 1fr) 132px !important;
        grid-template-rows: auto auto auto auto auto !important;
        grid-template-areas:
            "felt felt"
            "chips chips"
            "leader dock"
            "leader exit"
            "history history" !important;
        gap: 8px !important;
        align-content: start;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
        display: contents !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table { grid-area: felt; }
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions { grid-area: chips; }
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard { grid-area: leader; }
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-history { grid-area: history; }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock {
        position: static !important;
        grid-area: dock;
        display: grid;
        place-items: center;
        margin: 0;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock .floating-bet-button {
        width: 118px;
        height: 118px;
        padding: 0 22%;
        font-size: 10px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengExitButton {
        grid-area: exit;
        width: 100%;
        min-height: 74px;
        margin: 0;
        padding: 8px 6px;
        font-size: 12px;
        line-height: 1.2;
    }

    /* the leaderboard fills its two rows rather than floating in them */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard {
        max-height: none;
        height: 100%;
        margin: 0;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard > ol {
        max-height: 150px;
    }

    /* the two hands sit side by side here too: banker left, yours right */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-content: center;
        align-items: center;
        justify-items: center;
        column-gap: 8px;
        row-gap: 0;
        height: min(34vh, 290px);
        padding: 4% 4% 16%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer {
        grid-column: 1;
        width: 100%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
        grid-column: 2;
        width: 100%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards .card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-reveal-card {
        width: clamp(44px, 11.5vw, 62px);
        height: clamp(62px, 16vw, 87px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards {
        gap: 5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards:has(> :nth-child(3)) > * + * {
        margin-left: -18px;
    }

    /* undo and clear stay on the felt's own rail, centred */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table > .pok-wager-row {
        width: min(250px, 80%);
    }
}

/* =========================================================
   BOTH HANDS ON THE SAME LINES
   =========================================================

   The two sides were built differently -- the banker's caption and cards
   share a wrapper, yours are three separate parts -- so each side centred
   on its own content and the cards sat at different heights. Worse, the
   score panel grew when a hand was dealt and shoved that side's cards
   upward.

   `display: contents` on the banker's wrapper hands its caption and cards
   straight to the zone grid, so both sides now run on the same three rows:
   caption, cards, score. The cards line up whatever is written above or
   below them.
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-copy {
    display: contents;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer,
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
    display: grid;
    grid-template-rows: 26px auto minmax(30px, auto);
    align-content: start;
    align-self: start;
    justify-items: center;
    row-gap: 8px;
    padding-block: 0;
}

/* the score is one short line, not a panel that pushes the hand around */
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer > strong,
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
    width: max-content;
    max-width: 100%;
    min-height: 0;
    padding: 5px 14px;
    border: 1px solid rgba(213, 165, 67, .45);
    border-radius: 999px;
    background: rgba(0, 24, 17, .72);
    font-size: clamp(12px, 1.2vw, 17px);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title {
    display: grid;
    justify-items: center;
    width: 100%;
}


/* =========================================================
   THE LEADERBOARD FITS ITS BOX
   ========================================================= */

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard,
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard > ol {
    overflow-x: hidden;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard li {
    min-width: 0;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-player-copy {
    min-width: 0;
    overflow: hidden;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-player-copy > strong,
#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-player-copy > small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


@media (max-width: 900px) {

    /* bigger cards, and numbers you can read at arm's length */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-cards .card,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-reveal-card {
        width: clamp(64px, 17.5vw, 88px);
        height: clamp(90px, 24.5vw, 123px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .card-rank {
        font-size: clamp(20px, 5.6vw, 30px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .card-suit {
        font-size: clamp(22px, 6vw, 32px);
        margin-top: 1px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-card {
        font-size: clamp(20px, 5.6vw, 30px);
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table {
        height: min(38vh, 320px);
        padding: 3% 3% 15%;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.yours {
        grid-template-rows: 20px auto minmax(24px, auto);
        row-gap: 5px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-hand-zone.dealer > strong,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-table .pok-player-title > strong {
        padding: 3px 10px;
        font-size: 11px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-your-cards-label,
    #casinoTableGameScreen[data-game="pok_deng"] .pok-hand-copy > span {
        margin: 0;
        padding: 2px 8px;
        font-size: 9px;
        letter-spacing: .1em;
    }

    /* the leaderboard shows what it can hold, and holds what it shows */
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard li {
        grid-template-columns: 22px 30px minmax(0, 1fr) auto;
        gap: 6px;
        min-height: 0;
        padding: 5px 7px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-avatar {
        width: 30px;
        height: 30px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-player-copy > strong {
        font-size: 12px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-player-copy > small {
        font-size: 8px;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-chips {
        font-size: 12px;
    }
}

/*
 * On a phone the leaderboard list is styled elsewhere as a horizontal rail
 * -- a flex row that scrolls sideways. Here it is a plain vertical list
 * that fits its box: one player per line, names trimmed to the width they
 * have rather than running off the edge.
 */
@media (max-width: 900px) {
    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard > ol {
        display: grid !important;
        grid-auto-flow: row !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 4px !important;
        margin: 8px 0 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard > ol > li {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
    }
}


/* The wager confirmation belongs beside the chip rail. Its existing event
   handler and wager state remain unchanged; only the host and material change. */
@media (min-width:781px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions,
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] #pokDengActions {
        grid-template-columns:minmax(0,1fr) clamp(210px,16vw,276px) !important;
        align-items:center !important;
        column-gap:14px !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-action-buttons {
        grid-column:1 / -1 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface {
        grid-column:1 !important;
        min-width:0 !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock {
        position:static !important;
        grid-column:2 !important;
        align-self:stretch !important;
        display:grid !important;
        place-items:center !important;
        width:100% !important;
        min-width:0 !important;
        transform:none !important;
        animation:none !important;
        filter:none !important;
    }
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm[data-chip] {
    width:100% !important;
    min-width:0 !important;
    max-width:276px !important;
    height:auto !important;
    min-height:74px !important;
    aspect-ratio:3 / 1 !important;
    padding:0 18% !important;
    border:0 !important;
    border-radius:0 !important;
    color:#241502 !important;
    background-color:transparent !important;
    background-image:url('/assets/luxury-themes-20/shared/gold-cta.png') !important;
    background-position:center !important;
    background-size:100% 100% !important;
    background-repeat:no-repeat !important;
    font:950 clamp(14px,1.15vw,19px)/1.05 Georgia,'Times New Roman',serif !important;
    letter-spacing:.02em !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    text-shadow:0 1px rgba(255,255,255,.5) !important;
    filter:drop-shadow(0 9px 13px rgba(0,0,0,.48)) !important;
    animation:none !important;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm:disabled {
    opacity:.58 !important;
    filter:grayscale(.22) drop-shadow(0 6px 10px rgba(0,0,0,.38)) !important;
}

@media (max-width:780px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions,
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] #pokDengActions {
        grid-template-columns:minmax(0,1fr) !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock {
        position:static !important;
        grid-column:1 !important;
        display:grid !important;
        place-items:center !important;
        width:100% !important;
        transform:none !important;
        animation:none !important;
    }

    #casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm,
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm[data-chip] {
        width:min(100%,290px) !important;
        min-height:64px !important;
        font-size:14px !important;
    }
}

/* pok-deng-control-rail-20260906: one aligned desktop rail; no tutorial finger */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock::after,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock.wants-bet::after {
  content:none !important;
  display:none !important;
  animation:none !important;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm[data-chip] {
  appearance:none !important;
  display:grid !important;
  place-items:center !important;
  box-sizing:border-box !important;
  width:100% !important;
  min-width:0 !important;
  max-width:240px !important;
  min-height:88px !important;
  height:auto !important;
  aspect-ratio:auto !important;
  padding:13px 18px !important;
  border:2px solid #e3ba54 !important;
  border-radius:18px !important;
  background-color:#063522 !important;
  background-image:radial-gradient(circle at 50% 0,rgba(105,255,181,.22),transparent 46%),linear-gradient(180deg,#11714b 0%,#075038 48%,#03261a 100%) !important;
  background-size:auto !important;
  color:#fff0b8 !important;
  font:950 clamp(15px,1.05vw,19px)/1.08 Inter,system-ui,sans-serif !important;
  letter-spacing:.055em !important;
  white-space:normal !important;
  text-align:center !important;
  text-shadow:0 2px 2px #00160d,0 0 10px rgba(255,218,105,.32) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),inset 0 -8px 16px rgba(0,0,0,.28),0 5px 0 #3d2909,0 9px 18px rgba(0,0,0,.48),0 0 18px rgba(224,180,69,.24) !important;
  filter:none !important;
  transform:translateY(0) !important;
  transition:transform .12s ease,filter .12s ease,box-shadow .12s ease !important;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm:hover:not(:disabled),
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm:focus-visible {
  filter:brightness(1.12) !important;
  transform:translateY(-2px) !important;
  outline:3px solid rgba(255,224,119,.42) !important;
  outline-offset:3px !important;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm:active:not(:disabled) {
  transform:translateY(3px) scale(.985) !important;
  box-shadow:inset 0 2px 8px rgba(0,0,0,.3),0 2px 0 #3d2909,0 5px 10px rgba(0,0,0,.4) !important;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm:disabled {
  opacity:.52 !important;
  filter:saturate(.45) brightness(.72) !important;
}

@media (min-width:901px) {
  #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-reference-table,
  #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > #pokDengActions {
    width:min(1040px,100%) !important;
    max-width:1040px !important;
    margin-inline:auto !important;
    box-sizing:border-box !important;
  }
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions,
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-phase="player_action"] #pokDengActions {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 240px !important;
    column-gap:20px !important;
    row-gap:8px !important;
    align-items:center !important;
    padding:14px 18px 16px !important;
  }
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .pok-action-buttons {
    grid-column:1 / -1 !important;
  }
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .pok-action-buttons:not(:has(button:not([hidden]))) {
    display:none !important;
  }
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions > .pok-betting-surface {
    grid-column:1 !important;
    grid-row:auto !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
  }
  #casinoTableGameScreen[data-game="pok_deng"] .pok-betting-surface #pokDengChips {
    display:grid !important;
    grid-template-columns:repeat(6,minmax(60px,76px)) !important;
    justify-content:space-between !important;
    align-items:center !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:11px 12px 13px !important;
    gap:clamp(6px,.65vw,11px) !important;
    box-sizing:border-box !important;
  }
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock {
    position:static !important;
    grid-column:2 !important;
    grid-row:auto !important;
    align-self:center !important;
    display:grid !important;
    place-items:center !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    margin:0 !important;
    transform:none !important;
    animation:none !important;
    filter:none !important;
  }
}

@media (max-width:900px) {
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm,
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm[data-chip] {
    width:min(100%,270px) !important;
    max-width:270px !important;
    min-height:64px !important;
    padding:10px 16px !important;
    font-size:14px !important;
  }
}


/* pok-deng-stage-compose-20260906 */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm::before {
  content: none !important;
  display: none !important;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard > #pokDengExitButton {
  display: grid !important;
  place-items: center !important;
  width: calc(100% - 20px) !important;
  min-height: 74px !important;
  margin: 14px 10px 16px !important;
  padding: 10px 14px !important;
  line-height: 1.05 !important;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(1040px, 100%) !important;
  margin-inline: auto !important;
}

#casinoTableGameScreen[data-game="pok_deng"] .pok-reference-history {
  width: 100% !important;
  min-width: 0 !important;
}

@media (min-width: 901px) {
  #casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
    width: min(1860px, calc(100vw - 18px)) !important;
    max-width: 1860px !important;
    margin-inline: auto !important;
    padding: clamp(34px, 2.4vw, 54px) !important;
    box-sizing: border-box !important;
    background-size: cover !important;
    background-position: center center !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual {
    width: 100% !important;
    max-width: 1740px !important;
    margin-inline: auto !important;
    grid-template-columns: minmax(270px, 300px) minmax(0, 1fr) !important;
    gap: clamp(20px, 1.8vw, 34px) !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-reference-table,
  #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > #pokDengActions,
  #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-main > .pok-reference-footer {
    width: min(1040px, 100%) !important;
    max-width: 1040px !important;
    margin-inline: auto !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions {
    display: grid !important;
    grid-template-columns: minmax(0, 680px) minmax(230px, 270px) !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 12px 16px !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions .pok-action-buttons {
    grid-column: 1 / -1 !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengActions .pok-betting-surface {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips {
    display: flex !important;
    width: max-content !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 10px 14px 12px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(8px, 0.65vw, 12px) !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengChips > .chip-option {
    flex: 0 0 clamp(78px, 4.7vw, 88px) !important;
    width: clamp(78px, 4.7vw, 88px) !important;
    min-width: clamp(78px, 4.7vw, 88px) !important;
    max-width: 88px !important;
    height: clamp(78px, 4.7vw, 88px) !important;
    min-height: clamp(78px, 4.7vw, 88px) !important;
    max-height: 88px !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengBetDock {
    grid-column: 2 !important;
    grid-row: auto !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    align-self: center !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm,
  #casinoTableGameScreen[data-game="pok_deng"] #pokDengConfirm[data-chip] {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    max-width: 270px !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 1 !important;
    margin: 0 auto !important;
    padding: 0 18% !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: url('/assets/luxury-themes-20/shared/gold-cta.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    color: #181305 !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: clamp(14px, 1vw, 18px) !important;
    font-weight: 950 !important;
    line-height: 1.05 !important;
    letter-spacing: 0.01em !important;
    text-align: center !important;
    text-shadow: 0 1px 0 rgba(255, 246, 184, 0.65) !important;
    filter: drop-shadow(0 8px 13px rgba(0, 0, 0, 0.45)) !important;
  }
}

@media (max-width: 900px) {
  #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-leaderboard > #pokDengExitButton {
    width: 100% !important;
    min-height: 54px !important;
    margin: 8px 0 0 !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] .pok-reference-footer {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* pok-deng-gold-cta-specificity-20260906 */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual #pokDengConfirm::before {
  content: none !important;
  display: none !important;
}

#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual #pokDengConfirm,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual #pokDengConfirm[data-chip] {
  display: grid !important;
  place-items: center !important;
  width: min(100%, 270px) !important;
  max-width: 270px !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 3 / 1 !important;
  margin: 0 auto !important;
  padding: 0 18% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: url('/assets/luxury-themes-20/shared/gold-cta.png') !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 100% 100% !important;
  box-shadow: none !important;
  color: #181305 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: clamp(14px, 1vw, 18px) !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  letter-spacing: 0.01em !important;
  text-align: center !important;
  text-shadow: 0 1px 0 rgba(255, 246, 184, 0.65) !important;
  filter: drop-shadow(0 8px 13px rgba(0, 0, 0, 0.45)) !important;
}

@media (min-width: 901px) {
  #casinoTableGameScreen#casinoTableGameScreen[data-game="pok_deng"] .casino-game-stage {
    width: min(1860px, calc(100vw - 18px)) !important;
    max-width: 1860px !important;
    padding: clamp(34px, 2.4vw, 54px) !important;
    background-size: cover !important;
    background-position: center center !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual #pokDengActions {
    grid-template-columns: minmax(0, 680px) minmax(230px, 270px) !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 18px !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual #pokDengChips {
    display: flex !important;
    width: max-content !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    justify-content: center !important;
    gap: clamp(8px, 0.65vw, 12px) !important;
  }

  #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual #pokDengChips > .chip-option {
    flex: 0 0 clamp(78px, 4.7vw, 88px) !important;
    width: clamp(78px, 4.7vw, 88px) !important;
    min-width: clamp(78px, 4.7vw, 88px) !important;
    max-width: 88px !important;
    height: clamp(78px, 4.7vw, 88px) !important;
    min-height: clamp(78px, 4.7vw, 88px) !important;
    max-height: 88px !important;
  }
}


/* =========================================================
   THE HOST'S TABLE -- the bank's hand on the left, opened by hand;
   every seat at the table listed on the right, row by row
   ========================================================= */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-hand-zone.yours {
    display:none !important;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table #pokOpponentStrip {
    display:grid !important;
    grid-column:2;
    grid-row:1 !important;
    align-self:stretch !important;
    align-content:start;
    grid-template-columns:minmax(0,1fr);
    grid-auto-rows:max-content;
    gap:0;
    width:100%;
    min-width:0;
    min-height:0;
    max-height:100%;
    margin:0;
    padding:0 4px 0 0;
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:thin;
    order:0;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table #pokOpponentStrip:empty::before {
    content:"No players seated yet";
    display:block;
    padding:14px 6px;
    color:#c9b27a;
    font-size:12px;
    font-style:italic;
    text-align:center;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"name status" "cards cards" "note note";
    align-items:center;
    gap:2px 6px;
    width:100%;
    min-width:0;
    min-height:0;
    margin:0;
    padding:6px 2px 7px;
    border:0;
    border-bottom:1px solid rgba(233,206,120,.42);
    border-radius:0;
    background:transparent;
    color:#f4e6c3;
    text-align:left;
    scroll-snap-align:none;
    position:relative;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > img { display:none !important; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > strong {
    grid-area:name;
    overflow:hidden;
    color:#ffe9a8;
    font-size:clamp(11px,1.1vw,14px);
    font-weight:900;
    letter-spacing:.06em;
    text-overflow:ellipsis;
    text-transform:uppercase;
    white-space:nowrap;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > small {
    grid-area:status;
    color:#b9d2c0;
    font-size:clamp(8px,.8vw,10px);
    white-space:nowrap;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent.is-turn > strong { color:#9dffc2; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards {
    grid-area:cards;
    display:flex;
    flex-wrap:wrap;
    gap:3px;
    min-height:34px;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card {
    flex:0 0 auto !important;
    width:clamp(26px,2.6vw,38px) !important;
    max-width:38px !important;
    height:auto !important;
    aspect-ratio:5/7 !important;
    min-width:0 !important;
    min-height:0 !important;
    padding:0 !important;
    border-radius:4px !important;
    box-shadow:0 2px 5px #0007 !important;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card-rank { font-size:clamp(10px,1vw,14px) !important; line-height:1; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card-suit { margin-top:1px !important; font-size:clamp(9px,.9vw,13px) !important; line-height:1; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-note {
    grid-area:note;
    color:#e2c987;
    font-size:clamp(9px,.85vw,11px);
    font-style:normal;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent.result-win .pok-opponent-note { color:#7ef0a6; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent.result-loss .pok-opponent-note { color:#ff9a9a; }
/* the lucky charm rides the name, not the felt beside the row */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > .lucky-charm-attachment {
    --charm-size:22px;
    right:2px !important;
    top:2px !important;
    left:auto !important;
    bottom:auto !important;
}
@media (max-width:600px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > .lucky-charm-attachment { display:none !important; }
}
/* the bank's cards are buttons for the host: the same reveal card as a player's own hand */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table #pokDealerCards .pok-reveal-card {
    flex:0 0 auto;
}
@media (max-width:600px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent { padding:4px 0 5px; }
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > strong { font-size:10px; }
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > small { font-size:9px; }
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card { width:26px !important; }
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card-rank { font-size:10px !important; }
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card-suit { font-size:9px !important; }
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-note { font-size:9px; }
}
/* a hidden hand label stays hidden even where the zone lays its children out as a grid */
#casinoTableGameScreen[data-game="pok_deng"] #pokDealerHand[hidden],
#casinoTableGameScreen[data-game="pok_deng"] #pokPlayerHand[hidden] { display:none !important; }
/* a settled seat says its result once, in the note, not again in the status */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent.result-win > small,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent.result-loss > small,
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent.result-push > small { display:none; }
/* a card in the host's seat list keeps its height even when it has nothing printed on it */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card {
    height:clamp(36px,3.64vw,53px) !important;
    min-height:36px !important;
    border:1px solid #dfc98e !important;
    background-color:#fff8e8 !important;
    color:#16241f !important;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card.red { color:#b32330 !important; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card.back {
    background-color:#063c2a !important;
    background-image:var(--poker-card-back),repeating-linear-gradient(45deg,#063f2b 0 5px,#c89534 5px 7px);
    background-position:center;
    background-repeat:no-repeat;
    background-size:100% 100%;
    border:1px solid #e6c978 !important;
}
@media (max-width:600px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent-cards .card { height:36px !important; }
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table #pokOpponentStrip.is-scrollable::before {
    content:'↓ SCROLL TO SEE ALL PLAYERS';
    position:sticky;
    top:0;
    z-index:2;
    display:block;
    padding:4px;
    border-radius:5px;
    background:#073c2f;
    color:#ffe6a1;
    font-size:9px;
    font-weight:900;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table .pok-opponent > strong {
    white-space:normal;
    overflow:visible;
    overflow-wrap:anywhere;
    line-height:1.25;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="dealer"] .pok-reference-table #pokOpponentStrip {
    scroll-padding-top:26px;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    scrollbar-width:thin;
    scrollbar-color:#d8b45d #103b2e;
    overscroll-behavior:contain;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengPhase { color:#ffdf7e !important; }

/* A player sees every other seat below the felt. The host keeps the compact
   in-felt list above; the public round already limits which cards may show. */
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip {
    display:grid !important;
    order:3 !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    width:100%;
    padding:14px 10px 10px;
    border:1px solid rgba(214,180,86,.65);
    border-radius:18px;
    background:linear-gradient(145deg,#07382b,#031e19);
    overflow:visible;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip::before {
    content:"AT THIS TABLE · OTHER PLAYERS";
    grid-column:1/-1;
    color:#ffe5a0;
    font-size:11px;
    font-weight:900;
    letter-spacing:.08em;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent {
    display:grid;
    width:100%;
    min-width:0;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    gap:3px 6px;
    padding:8px;
    border:1px solid rgba(226,192,112,.4);
    border-radius:11px;
    background:#082c24;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent > img { display:none; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent > strong {
    overflow:visible;
    min-width:0;
    overflow-wrap:anywhere;
    color:#fff0c4;
    font-size:12px;
    line-height:1.25;
    white-space:normal;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent > small {
    color:#b9dec9;
    font-size:10px;
    white-space:normal;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent-cards {
    display:flex;
    grid-column:1/-1;
    flex-wrap:wrap;
    gap:3px;
    min-height:46px;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent-cards .card {
    flex:0 0 32px !important;
    width:32px !important;
    height:45px !important;
    min-width:0 !important;
    min-height:0 !important;
    padding:2px !important;
    border-radius:4px !important;
    border:1px solid #dfc98e !important;
    background:#fff8e8 !important;
    color:#16241f !important;
}
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent-cards .card.red { color:#b32330 !important; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .card-rank { font-size:16px !important; line-height:1; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .card-suit { font-size:17px !important; line-height:1; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent-cards .card.back { background:#07513b var(--poker-card-back) center/cover !important; }
#casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip .pok-opponent-note {
    grid-column:1/-1;
    color:#e4cf93;
    font-size:10px;
    font-weight:800;
}
@media(max-width:780px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:350px) {
    #casinoTableGameScreen[data-game="pok_deng"] #pokDengVisual[data-viewer="player"] .pok-reference-main > #pokOpponentStrip { grid-template-columns:1fr; }
}
