/* Kings arena theme: presentation only; existing seat geometry and card assets remain intact. */
:root{
 --kings-purple:#5a2d81;--kings-bright:#8950bd;--kings-silver:#a7a9ac;
 --wood-dark:#121116;--wood-mid:#24202d;--wood-light:#393044;
 --parchment:#f5f4f8;--parchment-dark:#c7c3d0;--brass:#bcb5ce;--brass-soft:#efedf4;--brass-dark:#6d458b;
 --leather:#19161f;--leather-dark:#100e15;--leather-mid:#262130;--leather-light:#352b42;
 --text-main:#f7f6fa;--text-muted:#cbc6d5;--table-bg:#251532;--table-mid:#38204a;--table-edge:#17101f;--table-dark:#100d16;
 --gold:#bdb5cf;--gold-dk:#69428c;--gold-lt:#ece7f4;--txt:#f7f6fa;--dim:#cbc6d5;--dim2:#a69eb4;
 --team-red:#f1eef7;--team-blue:#c8a5ee;--panel-bg:rgba(19,16,26,.96);--panel-border:#6c587e;--focus-ring:#c9a3f0;
 --shad:0 16px 38px #0008;--panel-shadow:var(--shad);--kings-heading:'Teko','Arial Narrow',sans-serif;
}
html,body,button,input,select,textarea{font-family:'Barlow','DM Sans',sans-serif;}
html,body{background:#100d16;color:var(--txt);}
#table{background:#17101f;}
#table::before{background:linear-gradient(#100b1860,#100b1820),url('/assets/kings-arena.png') center/cover no-repeat!important;}
#table::after{display:none!important;}
#table-light{background:radial-gradient(ellipse at 50% 0%,#8245af22,transparent 65%)!important;box-shadow:none!important;}
#scoreboard{background:linear-gradient(150deg,#21192df5,#111017f5)!important;border:1px solid #a7a9ac!important;border-radius:10px!important;padding:12px!important;box-shadow:0 8px 26px #0007!important;filter:none!important;}
#scoreboard::before{content:'♛  KINGS of PINOCHLE';display:block;font-family:var(--kings-heading);font-size:24px;letter-spacing:.08em;color:#e3deec;text-align:center;border-bottom:1px solid #71617f;margin-bottom:9px;padding-bottom:4px;}
#scoreboard .sb-name,#scoreboard .sb-score,#scoreboard .sb-bid{font-family:var(--kings-heading)!important;font-weight:600;}
#scoreboard .sb-name{font-size:18px!important;letter-spacing:.06em;}
#scoreboard .sb-score{font-size:54px!important;}
#scoreboard .t0{color:#f2eff7!important;}#scoreboard .t1{color:#c8a5ee!important;}
#scoreboard .sb-label,#scoreboard .sb-goal,#scoreboard .sb-hand-heading{color:#c5bfce!important;}
#scoreboard .sb-hand-heading,#scoreboard .sb-goal{border-color:#655873;}
.contract-progress{background:#262030;color:#eee9f5;border-color:#77628b;}
.contract-progress .cp-team{color:#dcc0f7;}.contract-progress .cp-detail{color:#c7c2d0;}
.strategy-panel{background:linear-gradient(165deg,#241632f5,#111017fa)!important;border:1px solid #766586!important;box-shadow:0 10px 30px #0007!important;}
.strategy-title-text{font-family:var(--kings-heading)!important;font-size:30px!important;letter-spacing:.05em;color:#fff!important;}
.strategy-section,.strategy-chat-section,.table-overview-stat{background:#17131f!important;border-color:#554762!important;color:#f1edf8!important;}
.strategy-section-title,.strategy-chat-title,.table-overview-label{color:#c5afd9!important;}
.strategy-player-row,.strategy-panel-head{border-color:#51455d!important;}
.table-overview-value,.table-overview-suit-name,.table-overview-bid{color:#f4f0f9!important;}
.avatar,.avatar.ai-avatar,.avatar.human{background:radial-gradient(circle at 50% 30%,#624178,#21132c)!important;border:3px solid #c0b9cb!important;box-shadow:0 8px 24px #0008!important;}
.avatar-art{object-fit:cover;}.ai-avatar .avatar-art{object-fit:cover;object-position:50% 38%;transform:none;}
.avatar.active,.pzone.seat-user-turn .avatar{border-color:#dfbaff!important;box-shadow:0 0 0 3px #8950bd55,0 8px 26px #0008!important;animation:none!important;}
.ntag{font-family:var(--kings-heading)!important;font-size:23px!important;font-weight:600!important;letter-spacing:.035em;text-transform:uppercase;background:linear-gradient(#211c2c,#121018)!important;border:1px solid #8e819e!important;color:#fff!important;text-shadow:none!important;}
.bid-bubble,.bid-call-badge{background:linear-gradient(#282130,#131018)!important;border:2px solid #b3a7c3!important;color:#fff!important;box-shadow:0 8px 20px #0008!important;}
.bid-bubble::before,.bid-bubble::after,.bid-call-badge::before,.bid-call-badge::after{display:none!important;}
.bub-main,.bid-call-badge .mt-value{font-family:var(--kings-heading)!important;color:#fff!important;text-shadow:none!important;font-weight:600!important;}
.bub-hist,.mt-title,.bchip{color:#c9c1d5!important;background:#21192c!important;border-color:#675377!important;}
#phase-lbl,.rs-item span{color:#d6cae3!important;}#round-status-rail{background:#15111de8!important;border-color:#756084!important;box-shadow:0 8px 20px #0006!important;}
.rs-item strong{color:#fff!important;font-family:var(--kings-heading);font-size:23px!important;}.rs-turn.is-you strong{color:#dcc0fa!important;}
#bid-dialog-box{background:linear-gradient(145deg,#261a33fa,#131019fc)!important;border:1.5px solid #a599b6!important;box-shadow:0 20px 55px #0009!important;color:#fff!important;}
.bid-dialog-title,.place-bid-btn,.bid-secondary-action,.hand-action-btn,.move-bid-action,.move-bid-submit{font-family:var(--kings-heading)!important;letter-spacing:.04em;}
.bid-dialog-title{color:#fff!important;font-size:30px!important;}.bid-dialog-close,.bid-dialog-reset{color:#dcc0fa!important;}
.bid-info-chip,.bid-strategy-stat,.bid-primary-layer,.bid-context-hint,.move-bid-spinner{background:#17121f!important;border-color:#675277!important;color:#eee8f6!important;}
.bid-info-chip span,.bid-strategy-stat span,.bid-amount-label{color:#c9b6dc!important;}
.bid-info-chip strong,.bid-strategy-stat strong,.bid-amount-value{color:#fff!important;}
.bid-amount-value{font-family:var(--kings-heading)!important;font-size:52px!important;}
.place-bid-btn,.move-bid-submit,.gbtn,.splash-play-btn{background:linear-gradient(135deg,#8246b0,#5a2d81)!important;border:1px solid #bc96d9!important;color:#fff!important;box-shadow:0 8px 22px #0005!important;}
.place-bid-btn{font-size:27px!important;}.place-bid-btn:hover,.gbtn:hover,.splash-play-btn:hover{filter:brightness(1.15);}
.bid-secondary-action,.hand-action-btn,.move-bid-action,.bid-step-btn,.move-bid-step,.cbtn{background:linear-gradient(#2a2235,#17121f)!important;border-color:#8b7a9d!important;color:#f2edf9!important;box-shadow:0 4px 12px #0005!important;}
.bid-secondary-action,.hand-action-btn{font-size:19px!important;}.bid-step-btn{font-family:var(--kings-heading);font-size:32px;}
.move-bid-card{background:#262030!important;color:#f5f0fa!important;border-color:#8d739e!important;}.move-bid-label,.move-bid-sub{color:#dbd1e8!important;}
.player-status-badge{background:#252030!important;border-color:#746186!important;color:#e7dfee!important;}
.player-status-badge.turn.user-turn,.player-status-badge.you{background:#5a2d81!important;color:#fff!important;border-color:#cfa7f0!important;}
.player-status-badge.dealer,#dealer-chip{background:linear-gradient(#eeebf4,#a7a9ac)!important;color:#21142d!important;border-color:#fff!important;}
.player-status-badge.bidder,.first-bidder-pip{background:#352044!important;border-color:#9671b5!important;color:#ead7ff!important;}
img.card-face,.modal-meld-fan-card,.phs-hand-card img,.meld-mini-card,.meld-strip-card,.last-trick-card,.meld-card{filter:none;}
.card.is-trump::after{border-color:#9c64c6!important;box-shadow:0 0 7px #9c64c650!important;}
.card.playable{box-shadow:0 0 0 2px #bb8ce1,0 10px 22px #0006!important;}
#south-hand .suit-sep::after{background:#19131fe8!important;color:#eee8f4!important;}#south-hand .suit-sep.red::after{color:#ffadb7!important;}
#action-panel.passive .albl,.ai-banter-bubble{background:#21192f!important;color:#f5f0fa!important;border-color:#a08ab7!important;}
.ai-banter-bubble::after{border-top-color:#21192f!important;}
#modal .mbox,.modal-box,.modal-content,.last-trick-panel,.lbox:not(.splash-shell),.phs-summary{background:linear-gradient(#261c33,#131019)!important;color:#eee8f5!important;border-color:#8b739e!important;}
h1,h2,h3,.gameover-title,.modal-title{font-family:var(--kings-heading)!important;color:#f1edf7;letter-spacing:.045em;}
#splash{background:linear-gradient(#100b1880,#100b18a0),url('/assets/kings-arena.png') center/cover!important;}
.splash-shell{border:1px solid #79648b!important;background:#17111f!important;box-shadow:0 24px 60px #0008!important;}
.splash-hero{aspect-ratio:1.5;background:linear-gradient(#170d2330,#170d2370),url('/assets/kings-arena.png') center/cover!important;display:flex;align-items:center;justify-content:center;}
.kings-splash-brand{text-align:center;padding:24px 24px 130px;color:#fff;}
.kings-splash-crown{font-size:80px;color:#c8a6e8;line-height:1;}
.kings-splash-brand h1{font-size:clamp(46px,8vw,110px);line-height:.95;margin:12px 0;color:#fff!important;letter-spacing:.06em;text-shadow:0 4px 25px #000;}
.kings-splash-brand p{font-size:clamp(12px,1.6vw,20px);letter-spacing:.18em;font-weight:600;color:#e0d4ed;}
.kings-splash-brand .kings-matchup{margin-top:20px;letter-spacing:.06em;color:#c5addb;}
.splash-play-btn{font-family:var(--kings-heading)!important;font-size:26px!important;letter-spacing:.06em;}
.splash-cta-layer{background:linear-gradient(transparent,#100c19e8)!important;}.splash-cta-link{color:#ece6f5!important;}
.splash-section{background:#18121fe8!important;border-color:#6d5581!important;}
@media(max-width:980px){#scoreboard{padding:8px!important;}#scoreboard::before{font-size:19px;}#scoreboard .sb-score{font-size:44px!important;}.ntag{font-size:20px!important;}.kings-splash-crown{font-size:58px;}}
@media(max-width:560px){#scoreboard::before{font-size:16px;}#scoreboard .sb-name{font-size:14px!important;}#scoreboard .sb-score{font-size:34px!important;}.kings-splash-brand{padding-bottom:120px;}.kings-splash-brand p{letter-spacing:.06em;}.kings-matchup{display:none;}}
#modal-box,.modal{background:linear-gradient(#251b31,#131019)!important;border:1px solid #8e759e!important;color:#eee8f5!important;box-shadow:0 20px 55px #0008!important;}
#modal-box input,#modal-box select,#modal-box textarea,.chat-input{background:#17121f!important;border-color:#82718f!important;color:#f4f0f9!important;}
#modal-box input::placeholder,.chat-input::placeholder{color:#bfb5cb;}
#modal-wrap{background:#0d0917b3!important;}
.chat-input-wrap,.chat-body,.chat-list,.chat-reaction-rail{background:#17121f!important;border-color:#675277!important;color:#eee8f6!important;}
.chat-reaction,.chat-send,.hand-sort-btn{background:#31203f!important;border-color:#877099!important;color:#fff!important;}
#action-panel,.hand-action-inner,#table-overview,.bid-history-panel{background:#17121feb!important;border-color:#77608b!important;color:#ede7f4!important;}
#lobby{background:linear-gradient(#100b1870,#100b18a0),url('/assets/kings-arena.png') center/cover!important;}
#south-zone{background:linear-gradient(#191322ed,#100d17fa)!important;border-top-color:#746084!important;}
#my-meld-chip{background:#31203f!important;border-color:#89729c!important;color:#e3d3f1!important;}
#north-zone .ntag,#east-zone .ntag,#west-zone .ntag{font-family:var(--kings-heading)!important;font-size:20px!important;letter-spacing:.035em!important;}
#bid-dialog.show #bid-dialog-box{background:linear-gradient(145deg,#261a33fa,#131019fc)!important;border-color:#ad9abb!important;}
#bid-dialog .bid-dialog-title{font-family:var(--kings-heading)!important;font-size:28px!important;color:#fff!important;text-transform:uppercase!important;letter-spacing:.05em!important;}
#bid-dialog .bid-choice,#bid-dialog .bid-step-btn{background:#2b2038!important;border-color:#957ca8!important;color:#f2eafa!important;font-family:var(--kings-heading)!important;}
#bid-dialog .bid-choice .t{font-size:20px!important;letter-spacing:.035em!important;}
#bid-dialog .bid-choice .d{color:#c7b9d6!important;}
#bid-dialog .bid-choice.primary,#bid-dialog.show .bid-place-btn{background:linear-gradient(#8246b0,#5a2d81)!important;color:#fff!important;border-color:#c19add!important;font-family:var(--kings-heading)!important;}
#bid-dialog .bid-meld-line,#bid-dialog .bid-hint,#bid-dialog .bid-hint-line{background:#241a30!important;border-color:#776089!important;color:#ded3eb!important;}
#brb-notice{background:linear-gradient(#322040,#17111f)!important;border-color:#ba95d5!important;color:#fff!important;box-shadow:0 18px 60px #0008!important;}
#brb-notice h2{font-family:var(--kings-heading)!important;}.brb-notice-kicker{color:#d7b6ed!important;}
#brb-return{background:#5a2d81!important;border-color:#c4a0de!important;color:#fff!important;}
#bid-dialog .bid-amount-value{font-family:var(--kings-heading)!important;color:#fff!important;}
#bid-dialog .bid-info-chip span{color:#c9b6dc!important;}
#bid-dialog.show .bid-jump-60{background:#5a2d81!important;color:#fff!important;border-color:#c4a0de!important;}
#bid-dialog.show .bid-meld-line{background:#241a30!important;color:#ded3eb!important;border-color:#89729c!important;font-family:'Barlow',sans-serif!important;}
#bid-dialog .bid-choice.primary .d{color:#e6d8f2!important;}
#brb-toggle.is-brb{background:#5a2d81!important;color:#fff!important;border-color:#bfa0d8!important;}
@media(max-width:700px){#scoreboard::before{font-size:16px!important;}#scoreboard .sb-score{font-size:34px!important;}#scoreboard .sb-name{font-size:14px!important;}#north-zone .ntag,#east-zone .ntag,#west-zone .ntag{font-size:17px!important;}}
#bid-dialog.show .bid-step-btn{background:#30213e!important;color:#fff!important;border-color:#a68bbb!important;}
#bid-dialog.show .bid-step-btn:hover{border-color:#dcc0f4!important;}
#bid-dialog.show .bid-dialog-title{font-family:var(--kings-heading)!important;font-size:26px!important;color:#fff!important;letter-spacing:.06em!important;}
/* One clear trump tile replaces the former status strip. */
#round-status-rail{display:flex!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:76px!important;max-width:none!important;min-height:0!important;background:none!important;border:0!important;box-shadow:none!important;overflow:visible!important;}
#round-status-rail .rs-item.rs-trump-tile{display:flex!important;align-items:center;justify-content:center;width:76px;height:76px;padding:0!important;border:1px solid #d9d4df!important;border-radius:10px;background:#fff!important;box-shadow:0 5px 18px #0005;}
#rs-trump{display:flex;align-items:center;justify-content:center;font-family:Georgia,serif!important;font-size:58px!important;line-height:1!important;color:#17131c!important;}
#rs-trump.rs-suit-red{color:#c52f44!important;}
.basketball-turn{position:absolute;display:block;width:44px;height:44px;z-index:22;filter:drop-shadow(0 3px 5px #0009);pointer-events:none;}
.basketball-turn[hidden]{display:none!important;}
.basketball-turn img{display:block;width:100%;height:100%;}
#west-zone .basketball-turn{top:50%;left:calc(var(--opp-avatar-size) + 16px);transform:translateY(-50%);}
#east-zone .basketball-turn{top:50%;right:calc(var(--opp-avatar-size) + 16px);transform:translateY(-50%);}
#north-zone .basketball-turn{top:12px;left:calc(50% - 90px);}
#south-info .basketball-turn{position:static;flex:0 0 38px;width:38px;height:38px;order:-1;}
@media(max-height:730px) and (min-width:701px){#west-zone .basketball-turn{left:102px;}#east-zone .basketball-turn{right:102px;}#north-zone .basketball-turn{top:6px;}}
@media(max-width:700px){#round-status-rail{left:58%!important;top:8px!important;width:60px!important;}#round-status-rail .rs-item.rs-trump-tile{width:60px;height:60px;}#rs-trump{font-size:46px!important;}.basketball-turn{width:34px;height:34px;}}
#round-status-rail #rs-trump .rs-trump-symbol{font-family:Georgia,serif!important;font-size:58px!important;line-height:1!important;color:inherit!important;letter-spacing:0!important;text-transform:none!important;}
@media(max-width:700px){#round-status-rail #rs-trump .rs-trump-symbol{font-size:46px!important;}}

/* Compact scoreboard leaves the original left seat clear. */
#scoreboard #contract-progress{display:none!important;}
#scoreboard .sb-score-wrap{display:flex;align-items:center;justify-content:center;gap:12px;}
#scoreboard .sb-score-wrap .sb-dots{flex-direction:column;gap:6px;}
#scoreboard .sb-hand-heading{border-top:1px solid #655873;margin-top:6px;}
@media(min-width:701px){#west-zone{left:30px!important;}}
@media(max-height:730px) and (min-width:701px){#west-zone{top:48%!important;}}
/* Kings arena meld review. */
#meld-review-screen{padding:18px!important;background:linear-gradient(#100b18b8,#100b1880),url('/assets/kings-arena.png') center/cover!important;overflow:auto!important;}
#meld-review-screen .meld-review-scrim{background:transparent!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;padding:0!important;}
#meld-review-dialog{width:min(1180px,100%)!important;max-width:1180px!important;min-width:0!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;overflow:visible!important;}
#meld-review-dialog .meld-review-header{background:none!important;border:0!important;text-align:center!important;padding:0 0 12px!important;}
.kings-review-crown{color:white;font-size:27px;line-height:1;}
#meld-review-dialog .meld-review-title{font:600 clamp(36px,4vw,62px)/1 var(--kings-heading)!important;color:#fff!important;letter-spacing:.055em!important;text-shadow:0 3px 8px #0007;}
#meld-review-dialog .meld-review-subtitle{color:#e6deef!important;font:16px 'Barlow',sans-serif!important;margin-top:6px!important;}
#meld-review-dialog .meld-review-body{padding:0!important;overflow:visible!important;}
.kings-meld-status{display:flex;align-items:center;justify-content:center;gap:22px;width:fit-content;max-width:100%;margin:0 auto 14px;padding:8px 24px;background:#17151fed;border:1px solid #9983b4;border-radius:12px;color:#fff;}
.kings-meld-status>div:not(.kings-meld-trump){display:flex;flex-direction:column;text-align:center;border-left:1px solid #79658e;padding-left:22px;}
.kings-meld-status span{font:18px var(--kings-heading);letter-spacing:.07em;color:#bab0c9;}
.kings-meld-status strong{font:600 30px/1.1 var(--kings-heading);}
.kings-meld-trump{width:60px;height:60px;flex-shrink:0;background:#fff;color:#19151e;display:grid;place-items:center;border-radius:8px;font:50px/1 Georgia;}.kings-meld-trump.red{color:#bd3044;}
#meld-review-dialog .meld-table-layout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-areas:none!important;gap:12px!important;padding:0!important;min-height:0!important;background:none!important;border:0!important;}
#meld-review-dialog .meld-center-mark{display:none!important;}
#meld-review-dialog .meld-seat-meld{position:relative!important;inset:auto!important;grid-area:auto!important;transform:none!important;display:block!important;min-width:0!important;width:auto!important;padding:12px!important;overflow:visible!important;background:linear-gradient(135deg,#24222df5,#191620f5)!important;border:1px solid #9a83b9!important;border-radius:12px!important;box-shadow:0 6px 18px #0005!important;}
.kings-player-head{display:flex;align-items:center;gap:12px;margin-bottom:8px;}
.kings-meld-avatar{width:64px;height:64px;flex:0 0 64px;border:3px solid #8d48cf;border-radius:50%;overflow:hidden;background:#393140;}
.kings-meld-avatar img,.kings-meld-avatar .modal-player-avatar-bg{width:100%;height:100%;object-fit:cover;display:block;background-size:cover;background-position:center;}
.modal-player-avatar-fallback{display:grid;place-items:center;width:100%;height:100%;font:26px var(--kings-heading);color:#ddd;}
.kings-player-head h3{font:600 25px/1.05 var(--kings-heading);color:white;letter-spacing:.025em;flex:1;}
.kings-meld-total{display:flex;align-items:center;gap:8px;white-space:nowrap;}.kings-meld-total span{font:16px var(--kings-heading);color:#bbb0cc;}.kings-meld-total strong{font:600 42px/1 var(--kings-heading);color:#fff;}
.kings-meld-cards{position:relative;min-width:0;}
#meld-review-dialog .modal-meld-card-fan{display:flex!important;flex-wrap:nowrap!important;align-items:flex-start!important;width:100%!important;min-width:0!important;height:calc(var(--modal-meld-card-w,80px) * .83)!important;overflow:hidden!important;padding:0!important;gap:0!important;}
#meld-review-dialog .modal-meld-fan-card{width:var(--modal-meld-card-w,80px)!important;height:auto!important;flex:0 0 var(--modal-meld-card-w,80px)!important;margin:0 0 0 var(--modal-meld-overlap,-48px)!important;border-radius:5px!important;transform:none!important;filter:none!important;opacity:1!important;box-shadow:0 0 0 1px #777!important;}
#meld-review-dialog .modal-meld-fan-card:first-child{margin-left:0!important;}
#meld-review-dialog .modal-meld-suit-gap{width:8px!important;min-width:8px!important;flex:0 0 8px!important;height:1px!important;margin:0!important;}
#meld-review-dialog .modal-player-meld-fan-empty{color:#bdb2ca;padding:20px 0;}
.kings-full-hand-pop{display:none;position:absolute;left:0;bottom:calc(100% + 10px);width:min(760px,calc(100vw - 64px));padding:16px;background:#17131ffb;border:2px solid #b18cdb;border-radius:12px;box-shadow:0 14px 45px #000b;z-index:100;}
.kings-hand-preview-trigger:hover .kings-full-hand-pop,.kings-hand-preview-trigger:focus-within .kings-full-hand-pop{display:block;}
.kings-hand-preview-trigger{cursor:help;}
.kings-full-hand-pop h3{font:26px var(--kings-heading);color:#fff;margin-bottom:12px;}.kings-full-hand-pop h3 span{font:14px 'Barlow';color:#c6b5d9;margin-left:14px;}
#meld-review-dialog .kings-full-hand-fan{height:calc(var(--modal-meld-card-w,96px) * 1.23)!important;}
#meld-review-dialog .meld-modal-footer{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-top:14px!important;padding:12px!important;background:#1c1629ed!important;border:1px solid #9983b4!important;border-radius:12px!important;}
.kings-team-meld{display:flex;align-items:center;gap:14px;font:600 24px var(--kings-heading);color:#fff;}.kings-team-meld strong{color:#c798f4;font:600 38px/1 var(--kings-heading);}
#meld-review-cta{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;}
#meld-review-dialog .meld-modal-primary,#meld-review-dialog .meld-pushbtn{font-family:var(--kings-heading)!important;color:white!important;background:linear-gradient(#974cce,#5a278c)!important;border:1px solid #c3a1e2!important;border-radius:9px!important;box-shadow:0 3px 12px #7530ab44!important;}
#meld-review-dialog .meld-modal-primary{font-size:25px!important;padding:10px 22px!important;}
#meld-review-dialog .meld-pushbtn.challenge{background:linear-gradient(#573777,#30203f)!important;border-color:#bba0d4!important;}
#meld-review-dialog .meld-modal-secondary{font:18px var(--kings-heading)!important;color:#cfbedf!important;background:#21172e!important;border:1px solid #705787!important;border-radius:8px!important;}
#meld-review-dialog .modal-history-panel{background:#1c1629!important;color:#eee!important;border-color:#9983b4!important;}
@media(max-width:800px){.kings-meld-avatar{width:44px;height:44px;flex-basis:44px;}.kings-player-head{gap:6px;}.kings-player-head h3{font-size:20px;}.kings-meld-total{gap:4px;}.kings-meld-total span{font-size:12px;}.kings-meld-total strong{font-size:32px;}}
@media(max-width:560px){#meld-review-dialog .meld-table-layout{grid-template-columns:minmax(0,1fr)!important;}.kings-meld-status{gap:10px;padding:8px;}.kings-meld-status>div:not(.kings-meld-trump){padding-left:10px;}.kings-meld-status strong{font-size:23px;}.kings-meld-status-label{display:none;}.kings-full-hand-pop{width:calc(100vw - 64px);}.kings-team-meld{font-size:20px;}}
#meld-review-screen.meld-review-modal-host{background:linear-gradient(#100b18b8,#100b1880),url('/assets/kings-arena.png') center/cover!important;}
#meld-review-screen .meld-review-scrim{width:100%!important;min-width:0!important;}
#meld-review-dialog{max-height:none!important;flex-shrink:0!important;}
#meld-review-dialog .meld-review-body{flex:0 0 auto!important;}
#meld-review-dialog .meld-modal-footer{flex:0 0 auto!important;}
#meld-review-dialog .kings-player-head h3{text-transform:uppercase;}
#meld-review-dialog .kings-own-meld:hover,#meld-review-dialog .kings-own-meld:focus-within{z-index:110!important;}
#meld-review-dialog .meld-pushbtn .mpb-main{font:600 20px/1.1 var(--kings-heading)!important;}
#meld-review-dialog .meld-pushbtn .mpb-sub{font:11px/1.2 'Barlow',sans-serif!important;color:#ded0eb;}
#meld-review-dialog .meld-pushbtn.locked{background:#32203f!important;box-shadow:none!important;transform:none!important;}
/* Lift the bid dialog above the court with a bright rim and directional light. */
#bid-dialog.show #bid-dialog-box{background:radial-gradient(ellipse at 50% 0%,#68448780,transparent 65%),linear-gradient(145deg,#322141fc,#171020fc)!important;border:2px solid #bfa0d9!important;box-shadow:0 22px 65px #000c,0 0 0 5px #9568b51c,0 0 28px #a15fd33b,inset 0 1px 0 #ead6ff66!important;}
#bid-dialog.show .bid-dialog-title{text-shadow:0 2px 8px #0008;}
#bid-dialog.show .bid-place-btn{background:linear-gradient(#a05ed2,#692e96)!important;box-shadow:inset 0 1px 0 #efd7ff66,0 4px 10px #0006!important;}
/* Finish each suit fan before starting the next one. */
#meld-review-dialog .modal-meld-suit-gap + .modal-meld-fan-card{margin-left:0!important;}
/* Scores flank a centered action group; history gets its own centered row. */
#meld-review-dialog .meld-modal-footer{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;}
#meld-review-dialog .meld-modal-footer>.kings-team-meld:first-child{grid-column:1;grid-row:1;justify-self:start;}
#meld-review-dialog .meld-modal-footer>.kings-team-meld:nth-of-type(2){grid-column:3;grid-row:1;justify-self:end;}
#meld-review-dialog #meld-review-cta{grid-column:2;grid-row:1;justify-content:center!important;}
#meld-review-dialog .meld-modal-footer>.meld-modal-secondary{grid-column:1 / -1;grid-row:2;justify-self:center;}
@media(max-width:850px){#meld-review-dialog .meld-modal-footer{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;}#meld-review-dialog .meld-modal-footer>.kings-team-meld:nth-of-type(2){grid-column:2;}#meld-review-dialog #meld-review-cta{grid-column:1 / -1;grid-row:2;}#meld-review-dialog .meld-modal-footer>.meld-modal-secondary{grid-row:3;}}
/* Keep bidding labels readable at laptop and tablet sizes. */
#bid-dialog.show .bid-choice .t{font:600 24px/1.15 var(--kings-heading)!important;letter-spacing:.025em!important;}
#bid-dialog.show .bid-choice .t .bid-place-amt{font:inherit!important;}
#bid-dialog.show .bid-step-btn.bid-jump-60{font:600 30px/1 var(--kings-heading)!important;}
#bid-dialog.show .bid-choice{min-height:48px!important;}
/* Trump sits immediately beside the scoreboard. */
#round-status-rail{left:calc(16px + var(--score-panel-w,252px) + 16px)!important;top:14px!important;transform:none!important;}
@media(max-width:700px){#round-status-rail{left:206px!important;top:14px!important;}}
/* Center the three amount controls independently of the shortcut. */
#bid-dialog.show .bid-stepper{display:grid!important;grid-template-columns:minmax(0,1fr) 44px 86px 44px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;width:100%!important;}
#bid-dialog.show .bid-stepper>.bid-step-btn:first-child{grid-column:2;}
#bid-dialog.show .bid-stepper>.bid-amount-value{grid-column:3;width:86px!important;min-width:0!important;padding:0!important;text-align:center!important;}
#bid-dialog.show .bid-stepper>.bid-step-btn:not(:first-child):not(.bid-jump-60){grid-column:4;}
#bid-dialog.show .bid-stepper>.bid-step-btn{display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;width:44px!important;height:44px!important;}
#bid-dialog.show .bid-stepper>.bid-jump-60{grid-column:5;justify-self:start;margin-left:20px!important;width:48px!important;}
@media(max-width:560px){#bid-dialog.show .bid-stepper{grid-template-columns:minmax(0,1fr) 40px 64px 40px minmax(0,1fr)!important;gap:6px!important;}#bid-dialog.show .bid-stepper>.bid-amount-value{width:64px!important;}#bid-dialog.show .bid-stepper>.bid-jump-60{margin-left:12px!important;}}
/* Setup and reviews share the arena's purple, charcoal and silver surfaces. */
#modal-box:has(.kings-setup),#modal-box:has(.kings-game-review),#modal-box:has(.player-hand-screen){background:linear-gradient(145deg,#261b34f7,#121019fc)!important;border:1px solid #ad95c2!important;border-radius:16px!important;box-shadow:0 24px 80px #000a,0 0 30px #7933a826!important;padding:22px!important;max-height:calc(100dvh - 32px)!important;overflow-y:auto!important;color:#eee9f5!important;}
#modal-box:has(.kings-setup){width:min(720px,calc(100vw - 32px))!important;}
.kings-screen-header{text-align:center;padding:4px 0 20px;}
.kings-eyebrow{display:block;font:16px var(--kings-heading);letter-spacing:.1em;color:#c1a1de;}
.kings-screen-header h2,#modal-box .phs-title h2{font:600 clamp(32px,4vw,48px)/1 var(--kings-heading)!important;letter-spacing:.045em!important;color:#fff!important;margin:8px 0!important;}
.kings-screen-header p,.kings-setup p{font:15px/1.4 'Barlow',sans-serif;color:#c8bdd4;margin-top:6px;}
.kings-back,.kings-discard{border:0;background:none;color:#bba3cf;font:14px 'Barlow';cursor:pointer;padding:8px 0;}
.kings-back:hover,.kings-discard:hover{color:#fff;text-decoration:underline;}
.kings-resume,.kings-new-game{background:linear-gradient(140deg,#30213f,#1a1424);border:1px solid #806196;border-radius:12px;padding:20px;margin-bottom:16px;}
.kings-resume{border-color:#ba94df;box-shadow:inset 3px 0 0 #a26adb;}
.kings-setup h3{font:600 28px/1.1 var(--kings-heading);color:white;margin:6px 0;}
.kings-resume-score{display:flex;gap:28px;margin:12px 0;color:#d6c9e2;font-size:14px;}.kings-resume-score b{font:600 32px var(--kings-heading);margin-left:8px;color:#fff;}
.kings-setup .splash-play-btn{width:100%!important;min-height:50px!important;padding:12px!important;margin-top:16px!important;font:600 27px/1 var(--kings-heading)!important;border-radius:9px!important;}
.kings-discard{display:block;margin:8px auto 0;}
.kings-setup #bot-picker-popup-offline{background:#17112080!important;border:0!important;padding:14px!important;}
.kings-setup #bot-picker-popup-offline>div:not(:first-child){display:grid!important;grid-template-columns:48px 130px minmax(0,1fr)!important;gap:12px!important;align-items:center;padding:8px 0;margin:0!important;}
.kings-setup #bot-picker-popup-offline img{width:44px!important;height:44px!important;border:2px solid #9a6bc4!important;}
.kings-setup #bot-picker-popup-offline label{font:15px 'Barlow'!important;color:#ddd2e8!important;width:auto!important;}
.kings-setup #bot-picker-popup-offline select{font:16px 'Barlow'!important;min-height:44px!important;background:#261b32!important;border-color:#9371ab!important;}
.kings-setup #bot-picker-popup-offline span{grid-column:3;font-size:12px!important;}
#modal-box .player-hand-screen{background:transparent!important;border:0!important;padding:0!important;color:#eee9f5!important;box-shadow:none!important;height:auto!important;max-height:none!important;overflow:visible!important;}
#modal-box .phs-top{justify-content:center!important;text-align:center!important;border:0!important;}
#modal-box .phs-sub{font:15px/1.4 'Barlow'!important;color:#d4c4e1!important;}
#modal-box .phs-hands{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto auto!important;grid-template-areas:"north east" "south west"!important;gap:12px!important;overflow:visible!important;}
#modal-box .phs-hand-panel,#modal-box .phs-card,#modal-box .phs-grade-card{background:linear-gradient(135deg,#292332,#19151f)!important;border:1px solid #816997!important;border-radius:10px!important;padding:12px!important;color:#eee9f5!important;}
#modal-box .phs-hand-name,#modal-box .phs-grade-name{font:600 24px var(--kings-heading)!important;color:#fff!important;}
#modal-box .phs-hand-seat,#modal-box .phs-grade-meta,#modal-box .phs-note{color:#bfb0cc!important;}
#modal-box .phs-summary,#modal-box .phs-score-table,#modal-box .phs-sc-strip{background:#1c1426!important;color:#eee9f5!important;border-color:#806196!important;}
#modal-box .phs-score-table th{background:#30213f!important;color:#d4c0e3!important;}
#modal-box .phs-score-table td{border-color:#695079!important;}
#modal-box .phs-score-table .total,#modal-box .phs-grade-num{color:#cba0f0!important;}
#modal-box .phs-btn,#modal-box .kings-review-actions .nbtn{font:600 22px var(--kings-heading)!important;min-height:44px!important;background:#32203f!important;color:#fff!important;border:1px solid #a081b7!important;border-radius:8px!important;}
#modal-box #next-hand-btn,#modal-box .kings-review-actions .nbtn:first-child{background:linear-gradient(#9752ca,#602d89)!important;border-color:#c4a1df!important;}
#modal-box .phs-actions,.kings-review-actions{justify-content:center!important;gap:10px!important;padding-top:16px!important;}
.kings-game-review{width:100%;color:#eee9f5;}.kings-game-review .sub2{font:16px 'Barlow';color:#d2c1df!important;}
.kings-final-score{font:600 62px var(--kings-heading)!important;align-items:center;border-bottom:1px solid #7d608f;padding-bottom:18px;}
.kings-game-review .potg-block{background:linear-gradient(135deg,#49315d,#24182f)!important;border:1px solid #b48bd6!important;border-radius:12px!important;}
.kings-game-review .potg-block img,.kings-game-review .potg-block>div:first-child>div{border-color:#b48bd6!important;border-radius:50%!important;}
.kings-game-review .potg-block>div:nth-child(2)>div:first-child{color:#d3b5ea!important;font:18px var(--kings-heading)!important;}
.kings-game-review .potg-block>div:nth-child(2)>div:nth-child(2){font:600 32px var(--kings-heading)!important;}
.kings-score-details{margin-top:16px;background:#1b1424;border:1px solid #715482;border-radius:10px;padding:12px;}.kings-score-details summary{font:22px var(--kings-heading);color:#dac1ee;cursor:pointer;}.kings-score-details table{margin-top:12px;}
.kings-game-review table{color:#eee9f5!important;} .kings-game-review th{background:#30213f!important;color:#dac1ee!important;}
@media(max-width:700px){#modal-box .phs-hands{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"north" "east" "south" "west"!important;}.kings-setup #bot-picker-popup-offline>div:not(:first-child){grid-template-columns:44px minmax(0,1fr)!important;}.kings-setup #bot-picker-popup-offline select{grid-column:1 / -1;}.kings-setup #bot-picker-popup-offline span{grid-column:1 / -1;}}
@media(min-width:801px){#modal-box:has(.kings-setup){width:min(960px,calc(100vw - 40px))!important;}.kings-setup{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:16px;}.kings-setup>.kings-back,.kings-setup>.kings-screen-header{grid-column:1 / -1;}.kings-setup>.kings-back{justify-self:start;}.kings-setup>.kings-screen-header{padding-bottom:4px;}.kings-setup .kings-resume,.kings-setup .kings-new-game{margin:0;}.kings-setup .kings-resume{display:flex;flex-direction:column;justify-content:center;}.kings-setup:not(:has(.kings-resume)) .kings-new-game{grid-column:1 / -1;}.kings-setup #bot-picker-popup-offline>div:not(:first-child){grid-template-columns:44px 110px minmax(0,1fr)!important;gap:8px!important;}}
#modal-box:has(.player-hand-screen){width:min(1120px,calc(100vw - 32px))!important;}
.kings-final-score .c0{color:#f3eef8!important;}.kings-final-score .c1{color:#c89dec!important;}
.kings-final-score::before{content:'FINAL SCORE';font:16px var(--kings-heading);color:#baa1cc;letter-spacing:.08em;align-self:center;margin-right:12px;}
#modal-box .phs-actions{display:flex!important;justify-content:center!important;}
#meld-review-screen #meld-review-dialog{width:min(1280px,100%)!important;max-width:1280px!important;}
.kings-challenge-control{position:relative;}
.kings-challenge-control>.meld-pushbtn:hover + .challenge-help-pop,.kings-challenge-control>.meld-pushbtn:focus + .challenge-help-pop,.kings-challenge-control>.challenge-help-pop:hover{display:block;}
#meld-review-dialog .challenge-help-pop{background:#21172dfc!important;border-color:#b08acb!important;color:#eee7f5!important;font-family:'Barlow',sans-serif!important;}
#meld-review-dialog .challenge-help-pop b{color:#d8b5f2!important;}
#meld-review-dialog .challenge-help-pop li::before{background:#c799e9!important;}
/* Lower the hand tray, keeping the readable top two-thirds of each card. */
#south-zone{bottom:calc(var(--tray-card-h) / -3)!important;}
#table{--visible-tray-card-h:calc(var(--tray-card-h) * 2 / 3);}
#center{top:calc((100vh - var(--visible-tray-card-h) - 64px) * .64)!important;}
@media(min-width:701px){#west-zone,#east-zone{top:52%!important;}}
/* Trumping reads face inward; aces-around cards keep the space above avatars. */
#west-zone .trump-suit-ind{left:calc(var(--opp-avatar-size) + 16px)!important;right:auto!important;top:calc(50% - 58px)!important;transform:none!important;}
#east-zone .trump-suit-ind{right:calc(var(--opp-avatar-size) + 16px)!important;left:auto!important;top:calc(50% - 58px)!important;transform:none!important;}
#north-zone .trump-suit-ind{left:50%!important;right:auto!important;top:150px!important;transform:translateX(-50%)!important;}
@media(max-height:730px) and (min-width:701px){#west-zone .trump-suit-ind{left:102px!important;}#east-zone .trump-suit-ind{right:102px!important;}#north-zone .trump-suit-ind{top:126px!important;}}

/* Review screens fit the viewport; the fitter scales only when content needs it. */
#meld-review-screen.meld-review-modal-host{overflow:hidden!important;padding:12px!important;}
#meld-review-screen .meld-review-scrim{height:100%!important;min-height:0!important;align-items:center!important;overflow:visible!important;}
#meld-review-screen #meld-review-dialog{height:auto!important;max-height:none!important;flex:0 0 auto;transform-origin:center center!important;}
#meld-review-dialog .meld-review-body{max-height:none!important;overflow:visible!important;}
#meld-review-dialog .meld-table-layout{align-items:start!important;}
#meld-review-dialog .meld-seat-meld{grid-column:auto!important;order:initial!important;}
#meld-review-dialog .modal-meld-card-fan{justify-content:flex-start!important;align-items:flex-start!important;height:auto!important;min-height:0!important;overflow:visible!important;}
#meld-review-dialog .modal-meld-fan-card{height:calc(var(--modal-meld-card-w,80px) * 183 / 149)!important;object-fit:fill;box-sizing:border-box;}
#meld-review-dialog .modal-meld-suit-gap + .modal-meld-fan-card{margin-left:0!important;}
#meld-review-dialog .kings-full-hand-fan{height:auto!important;}
#meld-review-dialog .meld-modal-footer{position:static!important;}
#modal-wrap:has(.viewport-review){overflow:hidden!important;padding:12px;}
#modal-box.viewport-review{animation:none!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;flex:0 0 auto;transform-origin:center center!important;}
#modal-box.viewport-review .phs-hands{flex:0 0 auto!important;min-height:0!important;max-height:none!important;}
#modal-box.viewport-review .phs-hand-cards{flex-wrap:nowrap!important;justify-content:flex-start!important;padding:0!important;}
#modal-box.viewport-review .phs-hand-card{width:var(--review-card-w,64px)!important;flex:0 0 var(--review-card-w,64px)!important;transition:none!important;margin-left:var(--review-card-overlap,-40px)!important;}
#modal-box.viewport-review .phs-hand-card:first-child,#modal-box.viewport-review .phs-suit-sep + .phs-hand-card{margin-left:0!important;}
#modal-box.viewport-review .phs-suit-sep{width:6px!important;min-width:6px!important;flex:0 0 6px!important;min-height:0!important;margin:0!important;}
#modal-box.viewport-review .phs-hand-card:hover{transform:none!important;}
#modal-box.viewport-review .phs-hand-panel{min-width:0!important;min-height:0!important;}
#modal-box.viewport-review .phs-hand-head{flex-wrap:wrap;}
#modal-box.viewport-review .phs-hand-name{white-space:normal!important;}
#modal-box.viewport-review .kings-score-details>div{overflow:visible!important;max-height:none!important;}
@media(max-width:700px){
  #meld-review-dialog .meld-table-layout{grid-template-columns:minmax(0,1fr)!important;gap:8px!important;}
  #meld-review-dialog .meld-seat-meld{padding:8px!important;}
  #meld-review-dialog .kings-meld-avatar{width:40px;height:40px;flex-basis:40px;}
  #meld-review-dialog .kings-player-head{gap:8px;margin-bottom:5px;}
  #meld-review-dialog .kings-player-head h3{font-size:20px;}
  #meld-review-dialog .kings-meld-total span{font-size:12px;}
  #meld-review-dialog .kings-meld-total strong{font-size:30px;}
  #meld-review-dialog .kings-meld-status{gap:10px;padding:6px 10px;margin-bottom:8px;}
  #meld-review-dialog .kings-meld-status>div:not(.kings-meld-trump){padding-left:10px;}
  #meld-review-dialog .meld-modal-footer{gap:8px!important;margin-top:8px!important;padding:8px!important;}
}

/* Kings hand controls: readable silver text on dark purple surfaces. */
:root{--dim:#d8d1e3;--dim2:#c7bed3;--text-muted:#d8d1e3;}
button,input,summary{-webkit-tap-highlight-color:transparent;}
button:focus-visible,input:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #e4c8ff!important;outline-offset:3px;}
#table .hand-toolbar{display:grid;grid-template-columns:auto minmax(210px,1fr) auto;align-items:center;gap:12px;max-width:1500px;}
#table .hand-tools{display:flex;flex-wrap:wrap;max-width:420px;gap:6px;justify-content:flex-end;}
#table #my-meld-chip{order:-1;flex:0 0 100%;box-sizing:border-box;background:#24192f!important;color:#f5f0fa!important;border:1px solid #a698b4!important;min-height:36px;padding:5px 10px!important;gap:8px;font:14px/1.4 'Barlow',sans-serif;white-space:nowrap;}
#table #my-meld-chip .tag{color:#e4dcea!important;opacity:1;font-size:13px!important;}
#table #my-meld-chip b{color:#fff!important;font-size:18px!important;}
#table #my-meld-chip .dot{opacity:1;color:#c7bed3;}
.hand-chat{position:relative;min-width:0;max-width:520px;width:100%;justify-self:center;box-sizing:border-box;border:1px solid #a496b4;border-radius:14px;background:rgba(26,17,36,.82);padding:6px 10px;color:#f5f0fa;font:14px/1.4 'Barlow',sans-serif;}
.hand-chat-recent{height:40px;overflow:auto;overflow-wrap:anywhere;scrollbar-width:thin;}
.hand-chat-message{font-size:14px;line-height:20px;color:#f5f0fa;}
.hand-chat-message strong{color:#e1c5ff;}
.hand-chat-empty{color:#d8d1e3;line-height:40px;}
.hand-chat-composer{display:flex;gap:6px;align-items:center;margin-top:4px;}
#table .hand-chat input{min-width:0;width:100%;height:40px;box-sizing:border-box;background:#19111f!important;border:1px solid #9e8daf!important;border-radius:8px;padding:6px 10px;color:#fff!important;font:16px 'Barlow',sans-serif;}
#table .hand-chat input::placeholder{color:#d8d1e3;opacity:1;}
.hand-chat button,.hand-chat summary{display:flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;box-sizing:border-box;border:1px solid #ac96bc;border-radius:8px;background:#4c266b;color:#fff;font:600 14px 'Barlow',sans-serif;cursor:pointer;}
.hand-chat-composer>button{padding:0 10px;}
.hand-chat-reactions summary{font-size:24px;list-style:none;}
.hand-chat-reactions summary::-webkit-details-marker{display:none;}
.hand-chat-reaction-menu{position:absolute;bottom:52px;left:4px;z-index:450;display:grid;grid-template-columns:repeat(4,44px);gap:5px;padding:8px;border:1px solid #b5a4c4;border-radius:12px;background:#201329;box-shadow:0 8px 24px #0008;}
.hand-chat-reaction-menu button{font-size:20px;min-height:44px;}
#table .strategy-panel.collapsed{display:none!important;}
#table .strategy-panel:not(.collapsed){background:#1b1325!important;color:#f5f0fa;border-color:#9d89b3!important;}
#table .chat-time,#table .chat-empty,#table .chat-reply-snip{color:#d8d1e3!important;opacity:1;}
#table .chat-name{color:#e1c5ff!important;}
#table .chat-text,#table .strategy-chat-title{color:#f5f0fa!important;}
#table .chat-msg{background:#24192f!important;border-color:#9d89b3!important;}
#table .chat-reply-btn{color:#ead7ff!important;}
#table #bid-dialog .bid-cols{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important;}
#table #bid-dialog .bid-cols .bid-col{display:flex!important;flex-direction:column;gap:7px;min-width:0;}
#table #bid-dialog .bid-decline-col{border-right:1px solid #ac91ba;padding-right:13px;}
#table #bid-dialog .bid-choice.support,#table #bid-dialog .bid-choice.exit{border:2px solid #ed9ba9!important;background:#361d30!important;color:#fff0f3!important;box-shadow:none!important;}
#table #bid-dialog .bid-choice.primary,#table #bid-dialog .bid-choice.meld,#table #bid-dialog .bid-choice.save{border:2px solid #c4a0e4!important;background:#45235e!important;color:#fff!important;}
#table #bid-dialog .bid-choice.primary{background:#62338b!important;}
#table #bid-dialog .bid-choice.is-suggested{box-shadow:0 0 0 2px #f0defe!important;}
#table #bid-dialog .bid-choice:disabled{opacity:1!important;background:#251f2b!important;border-color:#776b80!important;color:#c9c0d2!important;cursor:not-allowed;}
#table #bid-dialog .bid-suggested-tag{color:#fff!important;background:#492660!important;}
#table #bid-dialog .bid-choice .t{color:inherit!important;}
#table #bid-dialog .bid-turn-context,#table #bid-dialog .bid-meld-line,#table #bid-dialog .bid-recommendation,#table #bid-dialog .bid-context-hint{color:#e4dbea!important;opacity:1;}
#table #bid-dialog .bid-choice{min-height:44px!important;}
#table #bid-dialog-box{overflow-y:auto!important;overscroll-behavior:contain;}
#table .sb-label,#table .sb-hand-heading,#table .contract-progress,#table .cp-detail{color:#ded6e8!important;opacity:1;}
#table .sb-name,#table .player-status-badge,#table .ntag,#table .cbtn{color:#f5f0fa!important;}
#table .sb-score,#table .sb-bid,#table .sb-sub{color:#fff!important;}
#table img.card-face{filter:none!important;}
.human-chat-bubble{background:#24172f!important;border-color:#bda9cf!important;color:#f5f0fa!important;}
.human-chat-bubble::after{border-top-color:#24172f!important;}
/* Keep the full history an explicit overlay; it never consumes hand width. */
#table.strategy-panel-open{--strategy-reserved-right:0px!important;}
#table.strategy-panel-open #controls{right:24px!important;}
#table .strategy-panel:not(.collapsed){position:fixed!important;top:72px!important;bottom:auto!important;right:16px!important;width:min(340px,calc(100vw - 32px))!important;max-height:calc(100dvh - 100px)!important;z-index:450!important;}
@media(max-width:1180px){
 #table .hand-toolbar{grid-template-columns:minmax(160px,1fr) minmax(250px,1.4fr);gap:6px 12px;}
 #table #south-info{grid-column:1;grid-row:1;}
 #table .hand-chat{grid-column:2;grid-row:1 / span 2;max-width:none;}
 #table .hand-tools{grid-column:1;grid-row:2;max-width:none;justify-content:flex-start;}
 #table #my-meld-chip{justify-content:flex-start;}
 #table #round-status-rail{max-width:calc(100vw - 280px)!important;width:auto!important;}
}
@media(max-width:700px){
 #table{--tray-card-h:clamp(100px,23dvh,170px);}
 #table .hand-toolbar{grid-template-columns:minmax(0,1fr);gap:5px;}
 #table #south-info{grid-column:1;grid-row:1;flex-wrap:wrap!important;}
 #table .hand-tools{grid-column:1;grid-row:2;align-items:center;gap:5px;}
 #table #my-meld-chip{flex:1 0 100%;font-size:13px;justify-content:center;}
 #table .hand-chat{grid-column:1;grid-row:3;max-width:none;padding:4px 8px;}
 .hand-chat-recent{height:20px;}
 .hand-chat-empty{line-height:20px;}
 .hand-chat-composer{margin-top:3px;}
 #table #south-zone{padding:5px 8px calc(7px + env(safe-area-inset-bottom))!important;}
 #table .hand-sort-btn{font-size:12px!important;min-height:36px!important;padding:5px 8px!important;}
 #table #hand-sort-controls{margin-left:auto;}
 #table #hand-sort-controls button{min-height:36px;}
 #table #scoreboard{width:158px!important;min-width:158px!important;left:8px!important;top:8px!important;}
 #table #scoreboard .sb-name{font-size:12px!important;}
 #table #round-status-rail{right:8px!important;left:auto!important;max-width:calc(100vw - 184px)!important;}
 #table #controls,#table.strategy-panel-open #controls,#table.strategy-panel-collapsed #controls{right:8px!important;top:8px!important;}
 #table .utility-primary{display:none!important;}
 #table #chat-toggle{display:flex!important;}
 #table #bid-dialog.show #bid-dialog-box{width:calc(100vw - 24px)!important;max-height:calc(100dvh - var(--bid-dock-bottom,300px) - 12px)!important;padding:8px 10px!important;}
 #table #bid-dialog .bid-choice .t{font-size:15px!important;}
 #table #bid-dialog .bid-cols{gap:10px!important;}
 #table #bid-dialog .bid-decline-col{padding-right:9px;}
 #table .strategy-panel:not(.collapsed){top:58px!important;right:8px!important;width:calc(100vw - 16px)!important;max-height:calc(100dvh - 80px)!important;}
}
@media(max-height:600px) and (min-width:701px){
 #table{--tray-card-h:clamp(90px,24dvh,140px);}
 #table .hand-toolbar{grid-template-columns:auto minmax(200px,1fr) auto;gap:8px;}
 #table #south-info,#table .hand-chat,#table .hand-tools{grid-column:auto;grid-row:auto;}
 #table .hand-tools{max-width:330px;}
 .hand-chat-recent{height:20px;}
 .hand-chat-empty{line-height:20px;}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;}}
/* Keep the hand toolbar anchored to the bottom of the viewport. */
#table #south-zone{bottom:0!important;}
#table #bid-dialog.show #bid-dialog-box{max-height:calc(100dvh - var(--bid-dock-bottom,250px) - 8px)!important;}
#table #bid-dialog.show .bid-choice.exit{margin-top:0!important;}
@media(max-width:1180px) and (min-width:701px){
 #table{--tray-card-h:clamp(150px,25dvh,200px);}
 #table #east-zone,#table #west-zone{top:34%!important;}
}
@media(max-width:700px){
 #table #bid-dialog.show #bid-dialog-box{max-height:calc(100dvh - var(--bid-dock-bottom,300px) - 8px)!important;}
}
@media(max-width:700px){
 #table #scoreboard{display:block!important;width:192px!important;min-width:0!important;padding:5px 8px!important;max-height:78px;}
 #table #scoreboard::before,#table #scoreboard .sb-stats,#table #scoreboard .sb-hand-heading,#table #scoreboard .sb-dots,#table #contract-progress,#table #challenge-banner{display:none!important;}
 #table #scoreboard .sb-name{font:600 12px/1.2 'Barlow',sans-serif!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 #table #scoreboard .sb-score{font-size:27px!important;line-height:1!important;}
 #table #scoreboard .sb-head{gap:3px 8px!important;}
 #table #round-status-rail{top:58px!important;right:8px!important;}
 #table #round-status-rail .rs-trump-tile{width:40px!important;min-width:40px!important;height:32px!important;min-height:32px!important;}
}
#table{height:var(--game-viewport-height,100dvh)!important;}
#table #bid-dialog.show #bid-dialog-box{max-height:calc(var(--game-viewport-height,100dvh) - var(--bid-dock-bottom,250px) - 8px)!important;}
@media(max-width:700px) and (max-height:600px){
 #table{--tray-card-h:100px;}
 #table .hand-chat-recent{display:none;}
 #table #south-info{display:none!important;}
 #table .hand-tools{grid-row:1;}
 #table .hand-chat{grid-row:2;}
 #table #my-meld-chip{min-height:28px;}
}
/* Preserve large faces, but reserve only the top two thirds in the hand tray.
   Clip only below the tray so hover lifts remain visible above it. */
#table #south-hand{
 height:calc(var(--tray-card-h) * 2 / 3)!important;
 min-height:calc(var(--tray-card-h) * 2 / 3)!important;
 align-items:flex-start!important;
 transform-origin:center top!important;
 clip-path:inset(-100vh -100vw 0);
}
#table #south-hand .card{height:var(--tray-card-h)!important;width:calc(var(--tray-card-h) * .815)!important;}
#table #south-hand .suit-sep{height:calc(var(--tray-card-h) * 2 / 3)!important;min-height:calc(var(--tray-card-h) * 2 / 3)!important;}
#table #center{top:calc((var(--game-viewport-height,100dvh) - var(--hand-zone-height,330px) + 100px) / 2)!important;}
@media(min-width:981px) and (max-width:1180px){
 #table .hand-toolbar{grid-template-columns:auto minmax(220px,1fr) auto;}
 #table #south-info,#table .hand-chat,#table .hand-tools{grid-column:auto;grid-row:auto;}
 #table .hand-tools{max-width:330px;}
}
@media(max-width:980px){#table #chat-toggle{display:flex!important;}}
@media(min-width:701px) and (max-height:800px){
 #table:not(.bid-dialog-open) #north-zone{top:12px!important;}
 #table:not(.bid-dialog-open) #north-zone .avatar{width:48px!important;height:48px!important;}
 #table #west-zone{left:calc(var(--score-panel-w,252px) + 20px)!important;}
}
#chat-toggle .chat-unread{background:#a92342!important;color:#fff!important;}
.nbtn{background:#4c266b!important;border:1px solid #bca1d1!important;color:#fff!important;}
@media(min-width:701px) and (max-width:950px) and (max-height:500px){
 #table{--tray-card-h:90px;}
 #table .hand-toolbar{grid-template-columns:auto minmax(190px,1fr) auto;gap:8px;}
 #table #south-info,#table .hand-chat,#table .hand-tools{grid-column:auto;grid-row:auto;}
 #table .hand-tools{max-width:290px;}
 #table .hand-chat-recent{height:20px;}
 #table #scoreboard{width:180px!important;min-width:180px!important;padding:5px 8px!important;}
 #table #scoreboard::before,#table #scoreboard .sb-stats,#table #scoreboard .sb-hand-heading,#table #scoreboard .sb-dots,#table #contract-progress,#table #challenge-banner{display:none!important;}
 #table #scoreboard .sb-name{font-size:12px!important;}
 #table #scoreboard .sb-score{font-size:26px!important;line-height:1!important;}
 #table #center{top:calc((var(--game-viewport-height,100dvh) - var(--hand-zone-height,210px)) / 2)!important;transform:translate(-50%,-50%) scale(.55)!important;}
 #table #north-zone .avatar,#table #west-zone .avatar,#table #east-zone .avatar{width:36px!important;height:36px!important;}
 #table #west-zone{left:200px!important;top:24%!important;}
 #table #east-zone{right:20px!important;top:24%!important;}
 #table #north-zone .player-status-stack{display:none!important;}
}
/* One single-line chat box, with borderless controls inside the same surface. */
#table .hand-chat{padding:0;border:0;background:none;border-radius:0;}
#table .hand-chat-recent{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;clip-path:inset(50%);overflow:hidden!important;white-space:nowrap;}
#table .hand-chat-composer{margin:0;gap:0;min-height:44px;border:1px solid #a496b4;border-radius:13px;background:rgba(26,17,36,.82);}
#table .hand-chat input{height:44px;background:transparent!important;border:0!important;border-radius:0;padding:6px 8px;}
#table .hand-chat-composer>button,#table .hand-chat-reactions summary{min-width:44px;min-height:44px;border:0;background:transparent;color:#f5f0fa;}
#table .hand-chat-composer>button{border-radius:0 12px 12px 0;}
#table .hand-chat-reactions summary{border-radius:12px 0 0 12px;}
#table .hand-chat-composer>button:hover,#table .hand-chat-reactions summary:hover{background:#4c266b;}
#table #bid-dialog{z-index:300!important;}
@media(min-width:701px){
 #table #west-zone,#table #east-zone{top:calc((var(--game-viewport-height,100dvh) - var(--hand-zone-height,330px)) * .65)!important;}
}
/* Chat shares the existing 44px toolbar; it never adds a row to the card tray. */
#table .hand-toolbar{position:relative;grid-template-columns:auto minmax(140px,1fr) auto;min-height:44px;gap:8px;}
#table #south-info,#table .hand-chat,#table .hand-tools{grid-column:auto;grid-row:1;}
#table .hand-chat{align-self:center;max-width:520px;min-width:0;}
#table .hand-tools{flex-wrap:nowrap;max-width:370px;}
#table #my-meld-chip{flex:0 1 auto;order:0;min-height:36px;}
#table .hand-chat-composer{height:44px;min-height:44px;background:rgba(26,17,36,.18);border-color:rgba(189,169,207,.5);}
#table .hand-chat input{color:#fff!important;}
#table .hand-chat input::placeholder{color:#e8e0f0!important;}
.kings-brand-of{font-family:'Barlow',sans-serif;font-size:.35em;letter-spacing:0;text-transform:none;vertical-align:middle;}
@media(max-width:700px){
 #table .hand-toolbar{grid-template-columns:70px minmax(0,1fr);gap:6px;}
 #table #south-info{display:flex!important;grid-column:1;grid-row:1;max-width:70px;min-width:0;}
 #table #south-info .player-status-stack{display:none!important;}
 #table .hand-chat{grid-column:2;grid-row:1;width:100%;}
 #table .hand-tools{position:absolute;right:0;top:-36px;grid-column:auto;grid-row:auto;max-width:100%;}
 #table #my-meld-chip{min-height:28px;padding:3px 8px!important;}
 #table .hand-chat-composer>button{padding:0 7px;font-size:12px;}
 #table .hand-chat-composer>button,#table .hand-chat-reactions summary{min-width:36px;}
}
@media(max-width:700px){
 #table .hand-toolbar{grid-template-columns:104px minmax(0,1fr);}
 #table #south-info{flex-wrap:nowrap!important;max-width:104px;gap:4px!important;}
}
/* Dealer ring and the Kings hand-chat tools. */
#table .avatar.is-dealer,
#table .pzone.seat-user-turn .avatar.is-dealer,
#table .avatar.is-dealer.active{
 border-color:#88e6a7!important;
 outline:none!important;
 box-shadow:0 0 18px 6px #42c97888,0 8px 24px #0008!important;
}
#table #south-info .avatar{display:flex!important;align-items:center;justify-content:center;width:38px!important;height:38px!important;min-width:38px;flex:0 0 38px;border-radius:50%;font-size:20px;}
#table .hand-chat-cluster{display:grid;grid-template-columns:auto minmax(150px,1fr) auto;align-items:center;gap:12px;min-width:0;width:100%;grid-row:1;}
#table .hand-chat-cluster .hand-chat{grid-column:2;grid-row:1;max-width:none;width:100%;}
#table .hand-chat-cluster #my-meld-chip{grid-column:1;grid-row:1;flex:none;flex-direction:column;gap:1px;min-height:54px;margin:0;padding:6px 10px!important;border-radius:10px;background:linear-gradient(145deg,#382344,#21172e)!important;border-color:#bda4ce!important;box-shadow:inset 0 1px #e4d1ef22,0 3px 9px #0004;font-variant-numeric:tabular-nums;}
#table .hand-chat-cluster #my-meld-chip .tag{font-size:11px!important;letter-spacing:.12em;color:#e1c5ff!important;}
#table .hand-chat-cluster #my-meld-chip .meld-pair{font-size:16px;color:#f5f0fa;white-space:nowrap;}
#table .hand-chat-cluster #my-meld-chip b{font-size:20px!important;}
#table .hand-chat-cluster .meld-separator{padding:0 2px;color:#bda4ce;}
#table .hand-chat-reaction-rail{grid-column:3;grid-row:1;position:static;display:grid;grid-template-columns:repeat(4,40px);gap:3px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;}
#table .hand-chat-reaction-rail button{display:flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:0;border:1px solid #9d83b2;border-radius:9px;background:linear-gradient(#382344,#21172e);font-size:22px;line-height:1;cursor:pointer;}
#table .hand-chat-reaction-rail button:hover{background:#593574;border-color:#e1c5ff;}
@media(max-width:1180px){
 #table .hand-toolbar{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;}
 #table #south-info{grid-column:1;grid-row:1;max-width:none;}
 #table .hand-tools{position:absolute;right:0;bottom:calc(100% + 8px);top:auto;grid-column:auto;grid-row:auto;}
 #table .hand-chat-cluster{grid-column:1 / -1;grid-row:2;}
 #table .hand-chat-reaction-rail{grid-template-columns:repeat(8,40px);}
}
@media(max-width:700px){
 #table .hand-chat-cluster{gap:8px;grid-template-columns:auto minmax(100px,1fr) auto;}
 #table .hand-chat-reaction-rail{grid-template-columns:repeat(2,40px);}
 #table .hand-chat-cluster #my-meld-chip{padding:5px 6px!important;}
 #table .hand-chat-cluster #my-meld-chip b{font-size:17px!important;}
 #table #south-info{max-width:none;}
}
@media(max-width:420px){
 #table .hand-chat-cluster{grid-template-columns:auto minmax(0,1fr);}
 #table .hand-chat-cluster .hand-chat{grid-column:2;}
 #table .hand-chat-reaction-rail{grid-column:1 / -1;grid-row:2;grid-template-columns:repeat(8,minmax(0,1fr));width:100%;}
 #table .hand-chat-reaction-rail button{min-width:0;}
}
/* Challenge decisions keep the table, score panel and the full hand in view. */
#modal-wrap:has(.challenge-decision){align-items:flex-start;justify-content:flex-end;padding:84px 18px 0;box-sizing:border-box;background:transparent!important;backdrop-filter:none!important;}
#modal-box:has(.challenge-decision){width:min(460px,calc(100vw - 36px));max-width:none;max-height:calc(var(--game-viewport-height,100dvh) - var(--hand-zone-height,300px) - 104px);padding:0!important;overflow:hidden;border-radius:15px!important;}
.challenge-decision{display:flex;flex-direction:column;max-height:inherit;min-height:0;text-align:left;color:#f5f0fa;}
.challenge-decision header{padding:14px 18px 10px;border-bottom:1px solid #9d83b255;flex:0 0 auto;}
.challenge-decision-eyebrow{font:700 11px 'Barlow',sans-serif;color:#e1c5ff;text-transform:uppercase;letter-spacing:.12em;}
.challenge-decision h2{font-size:28px;line-height:1.05;margin:5px 0 0!important;}
.challenge-decision-body{padding:12px 18px;min-height:0;overflow-y:auto;overscroll-behavior:contain;font:14px/1.4 'Barlow',sans-serif;}
.challenge-score-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.challenge-score-grid>div{background:#171020;border:1px solid #a496b466;border-radius:9px;padding:8px 10px;}
.challenge-score-grid span{display:block;font-size:12px;color:#ded2e7;}
.challenge-score-grid strong{font-size:27px;color:#fff;line-height:1.2;font-variant-numeric:tabular-nums;}
.challenge-contract-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px 12px;margin:12px 0;}
.challenge-contract-grid div{display:flex;align-items:baseline;justify-content:space-between;gap:6px;border-bottom:1px solid #9d83b244;padding-bottom:4px;}
.challenge-contract-grid dt{color:#ded2e7;font-size:12px;}
.challenge-contract-grid dd{margin:0;color:#fff;font-weight:700;}
.challenge-targets p{margin:6px 0;}
.challenge-scoring-details{margin-top:10px;}
.challenge-scoring-details summary{color:#e1c5ff;cursor:pointer;padding:6px 0;font-weight:600;}
.challenge-scoring-details p{margin:8px 0;}
.challenge-hand-hint{color:#d8d1e3;font-size:12px;margin:10px 0 0;}
.challenge-decision-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 18px 14px;border-top:1px solid #9d83b255;background:#21172e;flex:0 0 auto;}
.challenge-decision-actions .nbtn{min-height:44px;margin:0;font:700 16px 'Barlow',sans-serif;}
.challenge-decision-actions .challenge-accept{background:#24513e!important;border:1px solid #88e6a7!important;}
.challenge-decision-actions .challenge-decline{background:#4c266b!important;border:1px solid #bda4ce!important;}
@media(max-width:700px){
 #modal-wrap:has(.challenge-decision){padding:12px 10px 0;}
 #modal-box:has(.challenge-decision){width:calc(100vw - 20px);max-height:calc(var(--game-viewport-height,100dvh) - var(--hand-zone-height,300px) - 28px);}
 .challenge-decision h2{font-size:24px;}
 .challenge-decision header{padding:10px 14px 8px;}
 .challenge-decision-body{padding:10px 14px;}
}
/* Readable live targets and game-out paths, without taking space from the hand. */
#table #scoreboard #contract-progress:not([hidden]){display:none!important;position:absolute;left:calc(100% + 8px);top:0;width:280px;box-sizing:border-box;text-align:left;padding:12px;margin:0!important;max-height:calc(100dvh - 40px);overflow-y:auto;background:#21172e;border:1px solid #a496b4;border-radius:12px;box-shadow:0 10px 28px #0008;z-index:200;font:13px/1.35 'Barlow',sans-serif;}
#table #scoreboard:hover #contract-progress:not([hidden]),#table #scoreboard:focus-within #contract-progress:not([hidden]){display:block!important;}
#table #scoreboard #contract-progress::before{content:'';position:absolute;left:-10px;top:0;width:10px;height:100%;}
#table #scoreboard .contract-progress .cp-detail{font-size:12px;line-height:1.4;margin-top:5px;}
.game-out-status{border-top:1px solid #9d83b266;margin-top:9px;padding-top:8px;}
.game-out-rule{display:block;color:#e1c5ff;font-size:12px;font-weight:700;}
.game-out-note{display:block;color:#cfc3d9;font-size:11px;line-height:1.4;margin-top:6px;}
.hand-score-explained{padding:12px!important;}
.hand-score-verdict{font:700 16px/1.4 'Barlow',sans-serif;color:#fff;margin-bottom:10px;}
.hand-score-teams{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.hand-score-team{padding:12px;background:#1a1224;border:1px solid #9d83b2;border-radius:11px;min-width:0;}
.hand-score-team h3{font-size:23px;line-height:1.2;margin:0 0 10px!important;}
.hand-score-team h3 span{font:600 12px 'Barlow',sans-serif;color:#e1c5ff;white-space:nowrap;}
.hand-score-lines{margin:0;font:14px/1.4 'Barlow',sans-serif;}
.hand-score-lines>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;}
.hand-score-lines dt{color:#e4dbea;}
.hand-score-lines small{color:#cfc3d9;font-size:12px;}
.hand-score-lines dd{margin:0;font-weight:700;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap;}
.hand-score-lines .neg{color:#ffb4b9;}.hand-score-lines .pos{color:#a4e8bb;}
.hand-score-change{border-top:1px solid #9d83b266;margin-top:5px;padding-top:9px!important;font-weight:700;}
.hand-score-game{border-top:1px solid #9d83b266;font-size:16px;}
.hand-score-note{color:#ded2e7;font:13px/1.4 'Barlow',sans-serif;margin:8px 0 0;}
@media(max-width:700px){
 #table #scoreboard{max-height:42dvh!important;overflow-y:auto;}
 #table #scoreboard #contract-progress:not([hidden]){padding:6px;margin-top:5px;}
 .hand-score-teams{grid-template-columns:1fr;}
}
/* Keep the score panel compact; detailed targets and game-out paths are hover-only. */
#table #scoreboard{max-height:none!important;overflow:visible;}
#table #scoreboard::before{font-size:17px!important;line-height:1.3!important;white-space:nowrap;margin-bottom:6px!important;padding-bottom:6px!important;}
/* Equal opponent avatars, including north during bidding and aces-around displays. */
#table #north-zone .avatar,#table #west-zone .avatar,#table #east-zone .avatar,
#table.bid-dialog-open #north-zone .avatar,#table:not(.bid-dialog-open) #north-zone .avatar,
#table #north-zone.has-aces-around .avatar{width:var(--opp-avatar-size)!important;height:var(--opp-avatar-size)!important;border-radius:50%!important;}
/* Center the avatar itself in every phase; older bid layouts offset the seat or
   centered a horizontal avatar/name row, leaving the portrait off-center. */
#table #north-zone,
#table.bid-dialog-open #north-zone{
 left:50%!important;
 transform:translateX(-50%)!important;
 flex-direction:column!important;
 align-items:center!important;
}
#table #south-info{display:none!important;}
#table #south-info .basketball-turn{display:none!important;}
#table #round-status-rail[hidden]{display:none!important;}
/* A compact chat input with one small, permanently visible reaction row. */
#table .hand-toolbar{grid-template-columns:minmax(0,1fr) auto;gap:8px;max-width:none;}
#table .hand-chat-cluster{grid-column:1;grid-row:1;grid-template-columns:minmax(90px,1fr) minmax(240px,320px) minmax(261px,1fr);gap:16px;width:100%;max-width:100%;justify-self:stretch;}
#table .hand-chat-cluster .hand-chat{width:100%;max-width:320px;justify-self:center;}
#table .hand-tools{position:absolute;right:0;bottom:calc(100% + 8px);top:auto;grid-column:auto;grid-row:auto;}
#table .hand-chat-reaction-rail{grid-column:3;grid-row:1;grid-template-columns:repeat(8,30px);gap:3px;width:auto;justify-self:end;}
#table .hand-chat-reaction-rail button{width:30px;height:30px;min-width:30px;min-height:30px;font-size:18px;border-radius:6px;}
#table .hand-chat-cluster #my-meld-chip{justify-self:start;min-height:40px;padding:4px 8px!important;}
#table .hand-chat-cluster #my-meld-chip b{font-size:18px!important;}
@media(max-width:900px){
 #table .hand-toolbar{grid-template-columns:minmax(0,1fr);}
 #table .hand-tools{grid-column:auto;grid-row:auto;justify-self:end;}
 #table .hand-chat-cluster{grid-column:1;grid-row:1;grid-template-columns:auto minmax(180px,320px) auto;justify-content:space-between;gap:12px;}
}
@media(max-width:600px){
 #table .hand-chat-cluster{width:100%;grid-template-columns:auto minmax(0,320px);justify-content:space-between;}
 #table .hand-chat-reaction-rail{grid-column:1 / -1;grid-row:2;justify-content:center;grid-template-columns:repeat(8,28px);justify-self:center;}
 #table .hand-chat-reaction-rail button{width:28px;height:28px;min-width:28px;min-height:28px;}
 #table #scoreboard #contract-progress:not([hidden]){left:0;top:calc(100% + 6px);width:min(280px,calc(100vw - 24px));max-height:50dvh;}
}

/* Grey callouts with readable Kings purple text. One surface, without nested borders. */
#table .bid-bubble{background:#dedce2!important;border:1px solid #aea7b7!important;border-radius:14px!important;color:#4a2468!important;box-shadow:0 6px 18px #0005!important;}
#table .bid-bubble .bid-call-badge{background:transparent!important;border:0!important;border-radius:inherit!important;box-shadow:none!important;color:#4a2468!important;}
#table .bid-bubble .bid-call-badge .mt-value,#table .bid-bubble .bub-main{color:#4a2468!important;text-shadow:none!important;}
#table .bid-bubble .bid-call-badge .mt-title,#table .bid-bubble .bub-hist{color:#624576!important;background:transparent!important;text-shadow:none!important;}
.human-chat-bubble{background:#dedce2!important;border-color:#aea7b7!important;color:#4a2468!important;}
.human-chat-bubble::after{border-top-color:#dedce2!important;}
