/* Dedicated Buraco/Tranca geometry. Seat rails do not participate in meld packing. */
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-turn-bar{display:none!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-ribbon.clean{background:#248647!important;color:#fff!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-ribbon.complete{background:#7543ad!important;color:#fff!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-ribbon.royal{background:linear-gradient(100deg,#e7b63d,#ffdf80,#c49125)!important;color:#302207!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded)){position:absolute!important;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;gap:2px!important;padding:3px!important;width:42px!important;height:42px!important;min-height:0!important;max-height:none!important;max-width:none!important;border:1px solid #b79b50!important;border-radius:9px!important;box-shadow:none!important;z-index:12!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded)){width:78px!important;height:94px!important;background:#123e33!important;border-color:#ffe49a!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat img{width:32px!important;height:32px!important;margin:0!important;float:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat>:is(span:not(.turn-progress),small){font-size:12px!important;line-height:14px!important;grid-column:auto!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat .mini-hand{display:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat .turn-progress{position:absolute!important;left:0!important;right:0!important;bottom:-6px!important;top:auto!important;width:100%!important;height:5px!important;margin:0!important;display:block!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat) .turn-progress{display:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.seat-expanded,:not(.seat-expanded)){left:50%!important;right:auto!important;top:0!important;transform:translateX(-50%)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-west:is(.seat-expanded,:not(.seat-expanded)){left:0!important;right:auto!important;top:43%!important;transform:translateY(-50%)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-east:is(.seat-expanded,:not(.seat-expanded)){right:0!important;left:auto!important;top:43%!important;transform:translateY(-50%)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){left:0!important;right:auto!important;top:auto!important;bottom:0!important;transform:none!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{position:relative!important;inset:auto!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;flex-wrap:nowrap!important;width:100%!important;max-width:none!important;height:36px!important;gap:5px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading button{height:32px!important;min-height:32px!important;min-width:0!important;font-size:12px!important;padding:0 7px!important;white-space:nowrap}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{padding:0!important;display:grid!important;grid-template-rows:36px minmax(0,1fr)!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own{padding-bottom:0!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own h3{top:0!important;bottom:auto!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .match-result:not([hidden]){display:flex!important;position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%);z-index:1000;width:min(540px,94vw);max-height:92dvh;overflow:auto;box-sizing:border-box;flex-direction:column;gap:10px;padding:20px;background:#0b3029;border:2px solid #d4b35a;border-radius:18px;box-shadow:0 0 0 100vmax #000b;color:#fff}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .match-result h2{font-size:24px;text-align:center;margin:0;color:#ffe29a}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .match-result p{margin:0;text-align:center}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-breakdown table{width:100%;border-collapse:collapse;font-size:14px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-breakdown :is(th,td){padding:7px 5px;border-bottom:1px solid #ffffff26;text-align:center}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-breakdown tbody th{text-align:left;font-weight:400}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-breakdown tr:last-child{background:#24634c;font-weight:bold;font-size:18px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-teams{display:flex;justify-content:center;align-items:center;gap:18px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-teams img{width:40px;height:40px;border-radius:50%;border:2px solid #d4b35a}
@media(orientation:portrait){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) 135px!important;gap:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding:0 42px!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:48px minmax(0,1fr) 96px minmax(0,1fr) 44px!important;gap:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-other{grid-row:2!important;grid-column:1!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own{grid-row:4!important;grid-column:1!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){grid-row:3!important;grid-column:1!important;grid-template-columns:55px minmax(0,1fr) 45px!important;gap:6px!important;height:96px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card{width:51px!important;height:74px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) strong{top:52px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *){height:78px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>.dead-piles{width:44px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>.dead-piles .mini-back{width:37px!important;height:54px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .pile small,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .dead-piles small{font-size:9px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat.seat-north:is(.seat-expanded,:not(.seat-expanded)),body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){flex-direction:row!important;flex-wrap:wrap!important;width:148px!important;height:42px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat.seat-north img,body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat.seat-self img{display:none!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .felt{grid-template-rows:minmax(0,1fr) 240px!important}
}
@media(orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) 125px!important;gap:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding:0 44px!important;grid-template-columns:100px minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:44px minmax(0,1fr)!important;gap:5px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own{grid-column:2!important;grid-row:2!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-other{grid-column:3!important;grid-row:2!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){grid-column:1!important;grid-row:2!important;display:grid!important;grid-template-columns:48px 44px!important;grid-template-rows:1fr 1fr!important;height:100%!important;gap:3px!important;padding:0!important;align-items:start!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>#stockPile:not(.canasta-mobile *){grid-row:1!important;grid-column:1!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>.dead-piles{grid-row:1!important;grid-column:2!important;width:42px!important;height:56px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){grid-row:2!important;grid-column:1/3!important;height:60px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card{width:38px!important;height:55px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) strong{top:36px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>.dead-piles .mini-back{width:33px!important;height:47px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .discard-fan{height:55px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .pile small,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .dead-piles small{font-size:8px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){bottom:-40px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north):is(.seat-expanded,:not(.seat-expanded)){width:145px!important;height:38px!important;flex-direction:row!important;flex-wrap:wrap!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north) img{display:none!important}
}
@media(max-height:540px) and (orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) 100px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{grid-template-rows:32px minmax(0,1fr)!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{padding-left:150px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{padding-left:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .felt{grid-template-rows:minmax(0,1fr) 145px!important}
}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading :is(.sort-cycle,.expand-hand,.clear-cards,.hand-action){height:32px!important;min-height:32px!important;min-width:0!important;padding:0 7px!important;font-size:12px!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north):is(.seat-expanded,:not(.seat-expanded)){display:grid!important;grid-template-columns:32px 1fr!important;grid-template-rows:16px 16px!important;column-gap:5px!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north) img{display:block!important;grid-column:1!important;grid-row:1/3!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north)>:is(span:not(.turn-progress),small){grid-column:2!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north) .seat-count{display:none!important}
@media(orientation:portrait){#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) 155px!important}}
.canasta-tools{display:none}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools{position:absolute;right:8px;top:65px;z-index:20;display:flex;flex-direction:column;gap:6px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools button{width:36px;height:36px;min-height:36px;padding:0;font-size:26px;line-height:1;border:1px solid #d5b861;background:#092d25;border-radius:8px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{justify-content:flex-end!important;padding:0!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading .expand-hand{font-family:monospace;font-size:20px!important;letter-spacing:-5px;padding-right:12px!important;width:42px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .expanded-clear{display:none}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .expanded-clear{display:block}
.canasta-quick-actions button{min-height:44px;margin:5px;min-width:110px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-breakdown tr:last-child th,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .result-breakdown tr:last-child td{position:static}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .match-result>button{position:sticky;bottom:0;flex-shrink:0;min-height:44px;background:#e0ba4d;color:#17251b}
/* Three stacked chevrons retain a recognizable expand/collapse silhouette. */
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading .expand-hand{font-size:0!important;letter-spacing:0!important;padding:0!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .expand-hand:before{content:'⌃\a⌃\a⌃';white-space:pre;font:24px/7px monospace;display:block;padding-top:9px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .expand-hand:before{content:'⌄\a⌄\a⌄';padding-top:0;padding-bottom:9px}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded)){display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;justify-content:center!important;align-items:center!important;width:78px!important;height:94px!important;grid-template-columns:none!important;grid-template-rows:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-west,.seat-east) img{position:static!important;transform:none!important;width:32px!important;height:32px!important;align-self:center!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading .expand-hand:after{display:none!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools{top:8px;right:60px;flex-direction:row;gap:5px}
@media(max-width:420px){#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #matchName{max-width:calc(100vw - 155px);font-size:11px!important;white-space:normal}}
/* Fixed playing regions: expanding an avatar never resizes the table. */
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{overflow:hidden!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools{top:94px;right:8px;flex-direction:column}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools button,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .options-button,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .expand-hand{border-radius:5px!important;border:2px solid #e5d7af!important;color:#fff6dc!important;background:#08241eee!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) :is(.canasta-tools button,.options-button,.expand-hand) svg{display:block;width:26px;height:26px;margin:auto}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .expand-hand:before{display:none!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .expand-hand svg{transform:rotate(180deg)}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .options-button{top:48px!important;right:8px!important;width:36px!important;height:36px!important;min-height:36px!important;padding:3px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding-inline:20px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-hands{position:absolute;inset:0;pointer-events:none;z-index:4;overflow:hidden}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-hand{position:absolute}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{left:50%;top:-25px;transform:translateX(-50%);width:160px;height:54px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{top:48%;width:46px;height:120px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west{left:-28px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{right:-28px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-back{position:absolute;width:38px;height:54px;border:1px solid #dec98b;border-radius:3px;background:repeating-linear-gradient(45deg,#123e34 0 5px,#295449 5px 6px);box-shadow:0 1px 2px #0008}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north .edge-back{left:calc(var(--edge-i)*min(14px,122px / max(1,var(--edge-count) - 1)))}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) :is(.edge-west,.edge-east) .edge-back{top:calc(var(--edge-i)*min(10px,70px / max(1,var(--edge-count) - 1)));transform:rotate(90deg)}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-count{position:absolute;right:0;bottom:0;min-width:19px;text-align:center;background:#fff5dc;color:#112c23;border:1px solid #bca878;border-radius:3px;font-size:12px;z-index:2}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west .edge-count{right:-9px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east .edge-count{right:auto;left:-9px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{position:absolute!important;top:0!important;left:26px!important;right:auto!important;width:52px!important;height:42px!important;z-index:6;pointer-events:none}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back{position:absolute!important;left:0!important;top:0!important;width:26px!important;height:38px!important;transform:rotate(90deg)!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){left:9px!important;top:3px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles small{position:absolute!important;top:34px!important;left:-8px!important;font-size:8px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{background:#041c18b3!important;border-top:1px solid #d5c38a88;min-height:0!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #hand:not(.canasta-mobile *){min-height:0!important;height:100%!important;overflow:visible!important}
@media(orientation:portrait){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{grid-template-rows:38px minmax(0,1fr) 92px minmax(0,1fr) 12px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){grid-template-columns:55px minmax(0,1fr)!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own h3{top:auto!important;bottom:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own{padding-bottom:24px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){bottom:0!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.seat-expanded,:not(.seat-expanded)){top:-12px!important}
}
@media(orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{grid-template-columns:90px minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:30px minmax(0,1fr)!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){grid-template-columns:1fr!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){grid-column:1!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-zone{margin-right:10px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) 120px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{grid-template-rows:30px minmax(0,1fr)!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{height:30px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{top:-28px}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){bottom:-32px!important}
}
@media(orientation:portrait){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded)){top:34%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{top:46%}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.seat-expanded,:not(.seat-expanded)){top:0!important}
}
@media(orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding-left:80px!important;padding-right:38px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:90px!important;top:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){padding-top:8px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{top:52%;height:80px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-count{bottom:2px}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded)){top:36%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools{right:6px;top:90px;gap:3px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools button{width:30px;height:30px;min-height:30px}
}
@media(max-height:540px) and (orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .options-button{top:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools{top:4px;right:50px;flex-direction:row}
}
/* Aligned reference toolbar and timer-only player indicators. */
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded))>.seat-clock{display:none!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile){--reference-tool:34px;--reference-right:8px;--reference-top:52px}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .options-button{position:absolute!important;top:var(--reference-top)!important;right:var(--reference-right)!important;width:var(--reference-tool)!important;height:var(--reference-tool)!important;min-height:var(--reference-tool)!important;margin:0!important;padding:3px!important;box-sizing:border-box!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools{position:absolute!important;top:calc(var(--reference-top) + var(--reference-tool) + 6px)!important;right:var(--reference-right)!important;display:flex!important;flex-direction:column!important;gap:6px!important;margin:0!important;padding:0!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools button{width:var(--reference-tool)!important;height:var(--reference-tool)!important;min-height:var(--reference-tool)!important;box-sizing:border-box!important;margin:0!important;padding:3px!important;display:grid!important;place-items:center!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) :is(.options-button,.canasta-tools button) svg{width:24px!important;height:24px!important;margin:0 auto!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded)){height:72px!important}
@media(orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile){--reference-top:40px;--reference-tool:32px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) clamp(78px,24dvh,140px)!important;gap:0!important;border-radius:8px!important;padding:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding:0 42px 0 52px!important;grid-template-columns:120px minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:22px minmax(0,1fr)!important;gap:3px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-zone{margin:0!important;padding-bottom:22px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-zone h3{top:auto!important;bottom:0!important;font-size:15px!important;line-height:20px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){padding:0!important;grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;gap:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>#stockPile:not(.canasta-mobile *){justify-self:center!important;height:100%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){width:100%!important;height:100%!important;border:1px solid #c7d3c366!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card{height:clamp(45px,19dvh,110px)!important;width:clamp(31px,13.1dvh,76px)!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) strong{top:auto!important;bottom:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .pile small{font-size:9px!important;bottom:2px!important;right:4px!important;left:auto!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) small{display:none!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{position:relative!important;display:block!important;padding:0 46px 0 52px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{position:absolute!important;top:-34px!important;right:0!important;left:auto!important;width:auto!important;height:32px!important;z-index:25}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock #hand:not(.canasta-mobile *){height:100%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:65px!important;top:-13px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{left:51%;top:-35px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{top:36%;height:63%}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-west:is(.seat-expanded,:not(.seat-expanded)){top:5px!important;transform:none!important;left:0!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-east:is(.seat-expanded,:not(.seat-expanded)){top:auto!important;bottom:5px!important;right:0!important;transform:none!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){bottom:-45px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.seat-expanded,:not(.seat-expanded)){top:-20px!important;left:43%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .felt{grid-template-rows:minmax(0,1fr) 46dvh!important}
}
@media(orientation:portrait){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding:0 19px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-zone{border-radius:5px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{position:relative!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{position:absolute!important;top:0!important;right:0!important;width:auto!important;z-index:25}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #hand:not(.canasta-mobile *){padding-top:34px!important;box-sizing:border-box}
}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools{width:var(--reference-tool)!important;min-width:var(--reference-tool)!important;align-items:stretch!important;transform:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools :is(.sort-cycle,.clear-cards){position:static!important;inset:auto!important;transform:none!important;width:var(--reference-tool)!important;min-width:var(--reference-tool)!important;max-width:var(--reference-tool)!important;height:var(--reference-tool)!important;min-height:var(--reference-tool)!important;padding:3px!important;margin:0!important;flex:none!important}
@media(orientation:portrait){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{display:block!important;padding:36px 0 0!important;box-sizing:border-box!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #hand:not(.canasta-mobile *){padding:0!important}
}
@media(orientation:landscape){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.seat-expanded,:not(.seat-expanded)){top:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding-left:80px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:90px!important;top:0!important}
}
@media(orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{top:2px!important;right:2px!important;left:auto!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{z-index:20!important}
}
@media(orientation:landscape){#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena{z-index:21!important}}
/* A single compact hand strip; expansion allocates real rows of larger cards. */
@media(orientation:portrait){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) clamp(100px,15dvh,140px)!important;gap:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{padding:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-heading{top:-34px!important;right:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .felt{grid-template-rows:minmax(0,1fr) 44dvh!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .hand-dock{padding-bottom:42px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).hand-expanded .expanded-clear{position:absolute;top:calc(44dvh + 0px);right:calc(50vw - 65px);width:130px}
}
/* Avatars slide beyond the edge when idle, keeping their counters visible. */
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-west:is(.seat-expanded,:not(.seat-expanded)){transform:translate(-65%,-50%)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-east:is(.seat-expanded,:not(.seat-expanded)){transform:translate(65%,-50%)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-north:is(.seat-expanded,:not(.seat-expanded)){transform:translate(-50%,-65%)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-self:is(.seat-expanded,:not(.seat-expanded)){transform:translateY(65%)!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{overflow:hidden!important;width:48px!important;height:25px!important;left:26px!important;top:-6px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back{transform:none!important;width:40px!important;height:28px!important;left:0!important;top:-10px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){left:4px!important;top:-6px!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles small{display:none!important}
@media(orientation:landscape){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{grid-template-columns:clamp(115px,18vw,240px) minmax(0,1fr) minmax(0,1fr)!important;padding-left:58px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;padding:0!important;overflow:visible!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){position:relative!important;display:block!important;box-sizing:border-box!important;padding:2px!important;height:100%!important;min-height:0!important;overflow:hidden!important;border:1px solid #aabda988!important;border-radius:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).open-canasta #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .discard-fan{position:relative!important;width:100%!important;height:100%!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;padding:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .discard-fan .card{height:calc(100% - 4px)!important;width:auto!important;aspect-ratio:0.69!important;max-width:none!important;left:var(--discard-x)!important;top:0!important;bottom:auto!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .empty-pile{height:calc(100% - 4px)!important;width:auto!important;aspect-ratio:.69}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card-index b{font-size:20px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card-index i{font-size:12px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) small{background:#0b302ac9;z-index:3;font-size:9px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *){position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;min-height:0!important;padding:0!important;width:100%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back{height:calc(100% - 8px)!important;width:auto!important;aspect-ratio:.69;box-sizing:border-box!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) strong{position:absolute!important;left:50%!important;top:auto!important;bottom:6px!important;transform:translateX(-50%)!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:70px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-west:is(.seat-expanded,:not(.seat-expanded)){transform:translateX(-65%)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-east:is(.seat-expanded,:not(.seat-expanded)){transform:translateX(65%)!important}
}
@media(orientation:landscape){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;grid-template-areas:none!important;width:100%!important;min-width:0!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){grid-column:1/-1!important;grid-row:2!important;width:100%!important;max-width:none!important;min-width:0!important;justify-self:stretch!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *)>#stockPile:not(.canasta-mobile *){grid-column:1/-1!important;grid-row:1!important}
}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-line .canasta-ribbon{max-width:100%!important;box-sizing:border-box!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-self:is(.seat-expanded,:not(.seat-expanded)){clip-path:inset(0 0 65% 0)!important;pointer-events:none}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back{border-radius:3px!important;box-shadow:none!important}
/* Explicit card dimensions avoid percentage-height collapse in mobile Safari. */
@media(orientation:landscape){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){align-self:stretch!important;min-height:0!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:1fr 1fr!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){display:block!important;visibility:visible!important;opacity:1!important;align-self:stretch!important;min-width:0!important;width:100%!important;padding:3px!important;border:1px solid #bcc8b6!important;background:#103a30!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).open-canasta #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .discard-fan{height:var(--discard-height,60px)!important;min-height:var(--discard-height,60px)!important;width:100%!important;overflow:hidden!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .discard-fan .card{width:var(--discard-width,42px)!important;height:var(--discard-height,60px)!important;min-width:var(--discard-width,42px)!important;aspect-ratio:auto!important;position:absolute!important;top:0!important;transform:none!important}
}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:45px!important;top:-8px!important;width:70px!important;height:22px!important;overflow:hidden!important;transform:none!important;display:block!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back{left:0!important;top:-8px!important;width:60px!important;height:24px!important;transform:none!important;border:1px solid #e1d19d!important;background:repeating-linear-gradient(45deg,#143e33 0 5px,#32594c 5px 6px)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){left:3px!important;top:-3px!important}
@media(orientation:landscape){body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:66px!important;top:-9px!important}}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools .sort-cycle{display:flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;padding:3px!important;font-size:0!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools .sort-cycle svg{width:24px!important;height:24px!important;display:block!important;flex:none!important;margin:0!important}
/* Every seat uses the same expanded badge, including the partner and viewer. */
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.seat-expanded,:not(.seat-expanded)){display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;grid-template-columns:none!important;grid-template-rows:none!important;width:78px!important;height:78px!important;min-height:78px!important;max-height:78px!important;padding:3px!important;gap:2px!important;clip-path:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north,.seat-west,.seat-east) img{position:static!important;display:block!important;width:32px!important;height:32px!important;grid-area:auto!important;transform:none!important;margin:0!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north,.seat-west,.seat-east)>.seat-count{display:block!important;font-size:11px!important;line-height:12px!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat:is(.seat-self,.seat-north)>.seat-count{display:block!important}
@media(orientation:landscape){body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){bottom:0!important}}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .empty-pile{max-height:100%!important;box-sizing:border-box!important}
/* Piles retain card-sized geometry on tall desktop tables. */
@media(orientation:landscape){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){align-self:center!important;height:min(100%,300px)!important;max-height:300px!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back{max-height:138px!important;max-width:96px!important}
}
@media(min-width:1100px) and (min-height:650px){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{grid-template-columns:180px minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:48px minmax(0,1fr)!important;padding-top:12px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{top:-12px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.seat-expanded,:not(.seat-expanded)){top:12px!important;left:50%!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-west:is(.seat-expanded,:not(.seat-expanded)){top:32%!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-east:is(.seat-expanded,:not(.seat-expanded)){bottom:18%!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{top:0!important}
}
.discard-inspect-trigger{position:absolute!important;z-index:30!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;min-height:0!important;border-radius:4px!important;cursor:zoom-in}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.seat-expanded,:not(.seat-expanded)){bottom:-80px!important;left:0!important;transform:none!important;clip-path:none!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{padding-left:90px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .discard-inline-preview{position:absolute;left:0;bottom:0;width:min(72vw,520px);z-index:45;background:#103a30;border:1px solid #dbc783;border-radius:6px;padding:5px;box-sizing:border-box}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .discard-inline-cards{display:flex;gap:4px;overflow-x:auto;margin-bottom:4px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .discard-inline-cards .card{position:relative!important;transform:none!important;flex:0 0 55px!important;width:55px!important;height:80px!important;min-width:55px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .discard-inline-preview button{min-height:30px;padding:4px 10px;margin-right:6px}
}
@media(orientation:landscape) and (max-height:600px) and (pointer:coarse){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.active-seat.seat-self:is(.seat-expanded,:not(.seat-expanded)),body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:not(.active-seat).seat-self:is(.seat-expanded,:not(.seat-expanded)){bottom:-80px!important;transform:none!important;clip-path:none!important}
}

body.playing .table-options .options-roster{padding:6px 0;gap:8px}
body.playing .table-options .option-player{flex-direction:row;justify-content:center;gap:6px;margin-top:5px}
body.playing .table-options .option-player img{width:24px!important;height:24px!important;min-width:24px;object-fit:cover}

.table-options>.profile-modal-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative}
.table-options>.profile-modal-heading h2{margin:0;flex:1}
.table-options>.profile-modal-heading .modal-close{position:static!important;flex:0 0 36px!important;width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;transform:none!important;margin:0!important}
.table-options>.table-exit-actions{display:flex;gap:8px;margin:12px 0;flex-wrap:wrap}
.table-options>.table-exit-actions button{flex:1;min-width:130px}
#match:not(.canasta-mobile).truco-table>.options-button{background-image:none!important;display:grid;place-items:center}
#match:not(.canasta-mobile).truco-table>.options-button svg{display:block;width:24px;height:24px}
/* Desktop geometry is independent of the compact touch-screen table. */
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding:12px 96px 0!important;grid-template-columns:220px minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:76px minmax(0,1fr)!important;gap:8px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){align-self:start!important;margin-top:48px!important;height:min(360px,calc(100% - 48px))!important;max-height:360px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back{max-height:170px!important;max-width:118px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){transform:none!important;clip-path:none!important;width:64px!important;height:70px!important;min-height:70px!important;max-height:78px!important;pointer-events:auto}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){left:calc(50% - 32px)!important;top:4px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-west:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){left:8px!important;top:28%!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-east:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){right:8px!important;top:28%!important;bottom:auto!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){left:8px!important;bottom:-78px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{top:48%!important;width:66px!important;height:160px!important;left:8px!important;right:auto!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{left:auto!important;right:8px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{top:4px!important;left:calc(50% + 150px)!important;width:200px!important;height:72px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-back{width:48px!important;height:68px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north .edge-back{left:calc(var(--edge-i)*min(18px,150px / max(1,var(--edge-count) - 1)))}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:160px!important;top:86px!important;width:90px!important;height:44px!important;overflow:visible!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back{width:68px!important;height:40px!important;top:0!important;left:0!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){left:12px!important;top:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock{padding-left:96px!important;padding-right:96px!important}
}

/* Shared menu order: heading, compact teams, exits, table preferences. */
body.playing .table-options .options-roster{display:flex!important;flex-direction:column!important;gap:6px!important;padding:8px 0!important;margin:0!important}
body.playing .table-options .options-roster>div{display:flex;align-items:center;gap:10px;min-width:0;text-align:left}
body.playing .table-options .options-roster>div>strong{flex:0 0 72px;font-size:12px}
body.playing .table-options .option-player{display:flex;flex:1;min-width:0;flex-direction:row;justify-content:flex-start;gap:5px;margin:0;font-size:12px}
body.playing .table-options .option-player span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.playing .table-options .option-player img{flex:0 0 24px;width:24px!important;height:24px!important}

@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile){--desktop-deck:repeating-linear-gradient(45deg,#143e33 0 5px,#32594c 5px 6px)}
 body.playing[data-deck="blue"] #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile){--desktop-deck:repeating-linear-gradient(45deg,#142a46,#142a46 5px,#2d5370 6px)}
 body.playing[data-deck="wine"] #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile){--desktop-deck:repeating-linear-gradient(45deg,#51232c,#51232c 5px,#834050 6px)}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){height:calc(2 * (var(--desktop-pile-h,120px) + 12px))!important;max-height:none!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back{width:var(--desktop-pile-w,82.8px)!important;height:var(--desktop-pile-h,120px)!important;max-width:none!important;max-height:none!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .discard-fan .card{width:var(--desktop-pile-w,82.8px)!important;height:var(--desktop-pile-h,120px)!important;min-width:var(--desktop-pile-w,82.8px)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back,body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back,body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-back{background:var(--desktop-deck)!important}
}

/* Desktop reference: two horizontal team fields around a central draw lane. */
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding:82px 100px 8px!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) calc(var(--desktop-pile-h,120px) + 12px) minmax(0,1fr)!important;gap:10px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-other{grid-column:1!important;grid-row:1!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own{grid-column:1!important;grid-row:3!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){grid-column:1!important;grid-row:2!important;display:grid!important;grid-template-columns:calc(var(--desktop-pile-w,82.8px) + 24px) minmax(0,1fr) 110px!important;grid-template-rows:1fr!important;margin:0!important;height:100%!important;max-height:none!important;align-self:stretch!important;gap:16px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *)>#stockPile:not(.canasta-mobile *){grid-column:1!important;grid-row:1!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){grid-column:2!important;grid-row:1!important;background:transparent!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{left:auto!important;right:108px!important;top:calc(50% + 37px)!important;transform:translateY(-50%)!important;width:94px!important;height:var(--desktop-pile-h,120px)!important;display:flex!important;align-items:center!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back{width:var(--desktop-pile-h,120px)!important;height:var(--desktop-pile-w,82.8px)!important;left:0!important;top:18px!important;transform:scale(.7)!important;transform-origin:left center!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){width:var(--desktop-pile-w,82.8px)!important;height:var(--desktop-pile-h,120px)!important;left:22px!important;top:0!important;transform:scale(.8)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){left:110px!important;top:4px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{left:330px!important;top:4px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-east:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){top:70%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{top:30%!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west{top:52%!important}
}

.desktop-undo-path{display:none}
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools .desktop-undo-path{display:block}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools svg:has(.desktop-undo-path) .standard-control-path{display:none}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){width:78px!important;height:82px!important;min-height:82px!important;max-height:82px!important;box-sizing:border-box!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.active-seat,:not(.active-seat)) img{width:40px!important;height:40px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding-top:94px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{top:calc(50% + 43px)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){bottom:-90px!important}
}

body.playing .table-options .options-roster{margin-top:10px!important}
.table-options .desktop-fullscreen-action{display:none!important}
@media(min-width:1000px) and (pointer:fine){
 .table-options .table-exit-actions>.desktop-fullscreen-action{display:flex!important;flex:0 0 100%;justify-content:center;padding-top:4px}
 .table-options .desktop-fullscreen-action>button{flex:0 1 auto;min-width:180px}
}

/* Desktop player badges and card backs share one visual language. */
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;height:90px!important;min-height:90px!important;max-height:90px!important;padding:5px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-self,.seat-north,.seat-west,.seat-east)>:is(strong,.seat-count){display:block!important;position:static!important;font-size:11px!important;line-height:13px!important;margin:0!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-count{display:none!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding-top:104px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{top:calc(50% + 48px)!important;width:var(--desktop-pile-w,82.8px)!important;height:calc(var(--desktop-pile-h,120px) + 8px)!important;right:112px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back,
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){width:var(--desktop-pile-w,82.8px)!important;height:var(--desktop-pile-h,120px)!important;left:0!important;top:0!important;transform:none!important;box-sizing:border-box!important;font-size:0!important;border:2px solid #ded4b8!important;border-radius:6px!important;box-shadow:0 2px 3px #0005!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){top:8px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *) .deck-back{border:2px solid #ded4b8!important;border-radius:6px!important;box-shadow:2px 3px 0 #b8b39e,4px 6px 0 #ded4b8!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-back{border:2px solid #ded4b8!important;border-radius:5px!important;box-sizing:border-box!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-back::after,
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back::after{content:'♠';position:absolute;inset:0;display:grid;place-items:center;color:#e8ca78;font-size:26px;font-style:normal;line-height:1;transform:none}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back::after{font-size:32px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{left:340px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west{left:25px!important;top:calc(28% + 106px)!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{right:25px!important;top:calc(70% - 175px)!important}
}
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat:is(.seat-self,.seat-north,.seat-west,.seat-east):is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded))>:is(strong,.seat-count,span:not(.turn-progress):not(.seat-clock):not(.morto-owner)){display:block!important;visibility:visible!important;opacity:1!important;position:static!important;font-size:11px!important;line-height:13px!important;height:auto!important;width:auto!important;max-height:none!important;overflow:visible!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat .seat-count::after{content:' cartas'}
}
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card-index b{font-size:calc(var(--desktop-pile-h,120px)*.27)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card-index i{font-size:calc(var(--desktop-pile-h,120px)*.17)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .card-pip{font-size:calc(var(--desktop-pile-h,120px)*.38)!important}
}
.table-options #connection{display:none!important}
.table-options .option-tabs{display:flex;flex-wrap:wrap}
.table-options .option-tabs>[role=tab]{flex:1 1 28%;min-width:0}
@media(min-width:1000px) and (pointer:fine){
 .table-options.side-options{width:min(414px,92vw)!important}
 body.playing .table-options .option-player img{flex:0 0 30px!important;width:30px!important;height:30px!important;min-width:30px!important}
 .table-options .table-exit-actions>.desktop-fullscreen-action{padding:0 0 6px}
}

@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile){--reference-top:100px;--reference-right:24px}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:first-child{top:0!important;left:0!important;transform:rotate(90deg)!important;transform-origin:center!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles .mini-back:nth-child(2){top:0!important;left:0!important;transform:none!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .match-reference{display:flex!important;visibility:visible!important;position:absolute!important;left:calc(var(--desktop-pile-w,82.8px) + 40px)!important;right:126px!important;top:50%!important;bottom:auto!important;width:auto!important;max-width:none!important;transform:translateY(-50%)!important;justify-content:center!important;text-align:center!important;pointer-events:none!important;font-size:10px!important;opacity:.65!important;z-index:5!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .match-reference button{display:none!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .match-reference *{pointer-events:none!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){top:14px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-west:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){left:20px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-east:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){right:20px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){left:20px!important;bottom:-110px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{top:14px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .hand-dock #hand:not(.canasta-mobile *){transform:translateY(-6px)}
}
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{right:124px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){grid-template-columns:calc(var(--desktop-pile-w,82.8px) + 24px) minmax(0,1fr) 126px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .match-reference{right:142px!important}
}
.table-options details:has(>.rules-help-summary){margin-top:10px;padding-top:12px;border-top:1px solid #c9b97744}
.table-options .rules-help-summary{display:list-item;list-style:disclosure-closed inside;cursor:pointer;color:#efd17f}
.table-options details[open]>.rules-help-summary{list-style-type:disclosure-open}
.table-options .rules-help-summary::-webkit-details-marker{display:inline;color:#efd17f}
.table-rules-summary{width:100%;border-collapse:collapse;margin:14px 0;font-size:12px}
.table-rules-summary th,.table-rules-summary td{padding:9px 8px;border-bottom:1px solid #c9b97744}
.table-rules-summary th{text-align:left;font-weight:500}
.table-rules-summary td,.table-rules-summary thead th:last-child{text-align:center;width:84px}
.table-rules-summary .rule-yes,.table-rules-summary .rule-no{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;font-weight:800;font-size:16px}
.table-rules-summary .rule-yes{background:#17603e;color:#baffd0}
.table-rules-summary .rule-no{background:#7b2934;color:#ffd2d8}

/* Desktop seats share axes and reserve breathing room around the play fields. */
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt{grid-template-rows:minmax(0,1fr) 128px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{padding-top:120px!important;padding-left:116px!important;padding-right:116px!important;gap:18px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-north:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){left:20px!important;top:14px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-west:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)),
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-east:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){top:30%!important;bottom:auto!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north{left:218px!important;top:14px!important;height:90px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-north .edge-back{height:90px!important;width:62.1px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-west,#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{top:calc(30% + 112px)!important;width:78px!important;height:170px!important;left:20px!important;right:auto!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .edge-east{left:auto!important;right:20px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) :is(.edge-west,.edge-east) .edge-back{width:78px!important;height:53.82px!important;left:0!important;transform:none!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .table-arena>.dead-piles{top:calc(50% + 56px)!important;right:140px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){bottom:-104px!important}
}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools .desktop-undo-path{display:block}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .canasta-tools svg:has(.desktop-undo-path) .standard-control-path{display:none}
.mobile-discard-metadata{display:none}
@media(max-width:999px),(pointer:coarse){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *){position:relative!important;overflow:visible!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .match-reference,
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) small{display:none!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{display:flex;position:absolute;top:calc(100% + 3px);left:0;right:0;flex-direction:column;align-items:center;gap:1px;pointer-events:none;font-size:9px;line-height:11px;color:#d5cfad;z-index:4;text-align:center;overflow-wrap:anywhere}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata span:last-child{font-size:8px}
}
@media(max-width:999px) and (orientation:landscape),(pointer:coarse) and (orientation:landscape){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){height:calc(100% - 28px)!important;margin-bottom:28px!important}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{font-size:8px;line-height:9px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata span:last-child{font-size:7px}
}

/* Metadata belongs between the discard lane and the team's meld area. */
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) .match-reference,
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) small{display:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{display:flex!important;position:absolute;top:calc(100% + 3px);left:0;right:0;flex-direction:column;align-items:center;gap:1px;pointer-events:none;font-size:9px;line-height:11px;color:#e3d9b6;z-index:6;text-align:center;overflow-wrap:anywhere}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .discard-fan::before,
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .discard-fan::after{content:none!important;display:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .red-threes-summary{top:auto!important;bottom:3px!important;right:6px!important;z-index:12!important;background:#702c3a;color:#fff1dc;border:1px solid #efbc81;border-radius:5px;padding:2px 5px;font-size:10px!important;line-height:14px!important;font-weight:700;box-shadow:0 1px 4px #0008}
@media(orientation:portrait){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own{margin-top:25px!important;height:calc(100% - 25px)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){transform:none!important;clip-path:none!important;bottom:0!important;left:4px!important;width:64px!important;height:70px!important;min-height:70px!important;max-height:70px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;pointer-events:auto}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)) img{width:32px!important;height:32px!important}
}
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{row-gap:28px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{flex-direction:row;gap:18px;font-size:10px;line-height:18px}
}
@media(orientation:portrait){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded))>:is(span:not(.turn-progress):not(.seat-clock),.seat-count){display:block!important;position:static!important;font-size:10px!important;line-height:11px!important;margin:0!important}
}
@media(min-width:1000px) and (min-height:650px) and (pointer:fine){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{justify-content:center}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #center:not(.canasta-mobile *) #discardPile:not(.canasta-mobile *) .discard-fan{height:var(--desktop-pile-h,120px)!important;min-height:var(--desktop-pile-h,120px)!important;padding:0!important}
}
@media(max-width:999px) and (orientation:landscape),(pointer:coarse) and (orientation:landscape){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded)){transform:none!important;clip-path:none!important;bottom:-80px!important;left:4px!important;width:78px!important;height:78px!important;min-height:78px!important;max-height:78px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)) img{width:32px!important;height:32px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #opponents:not(.canasta-mobile *) .seat.seat-self:is(.active-seat,:not(.active-seat)):is(.seat-expanded,:not(.seat-expanded))>:is(span:not(.turn-progress):not(.seat-clock),.seat-count){display:block!important;position:static!important;font-size:10px!important;line-height:11px!important;margin:0!important}
}
/* A dedicated gap separates discard metadata from the own-meld field. */
@media(max-width:999px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{grid-template-rows:40px minmax(0,1fr) 82px 28px minmax(0,1fr)!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile):is(.four-seats,:not(.four-seats)) #center:not(.canasta-mobile *){grid-row:3!important;height:100%!important;min-height:0!important;align-self:stretch!important;margin-bottom:0!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .meld-own{grid-row:5!important;margin-top:0!important;height:100%!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{top:calc(100% + 3px)!important;height:24px;justify-content:center;font-size:9px;line-height:10px}
}

/* Tranca exposes only its top discard, with the lock label on that card. */
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *).locked-pile::after{content:none!important;display:none!important}
#match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #discardPile:not(.canasta-mobile *) .discard-lock-badge{position:absolute;left:0;right:0;bottom:8%;z-index:5;box-sizing:border-box;padding:4px 1px;background:#562631f5;color:#fff1c9;border-top:1px solid #d7ad61;border-bottom:1px solid #d7ad61;font-size:clamp(8px,1vw,11px);font-weight:700;line-height:1.3;text-align:center;white-space:nowrap;pointer-events:none}

body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .red-threes-summary{position:absolute!important;display:flex!important;align-items:flex-end;gap:0;padding:0!important;bottom:26px!important;background:none!important;border:0!important;box-shadow:none!important;pointer-events:none}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .red-threes-summary .card{position:relative!important;inset:auto!important;transform:none!important;margin:0!important;flex-shrink:0!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .red-threes-summary .card+.card{margin-left:calc(var(--red-card-w) * -.58)!important}

/* Reserve a separate red-three rail rather than covering playable melds. */
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .red-threes-summary{right:8px!important;bottom:30px!important;max-width:calc(var(--red-reserve,160px) - 12px);overflow:visible}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .red-threes-summary .card+.card{margin-left:calc(var(--red-card-w) * -.72)!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .red-threes-summary::before{content:'3 vermelhos';position:absolute;bottom:calc(100% + 4px);left:0;right:0;font-size:10px;line-height:13px;text-align:center;color:#ffe1c1;white-space:nowrap}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .pile.action-available::before{left:var(--purchase-arrow-x,50%)!important;top:var(--purchase-arrow-y,-19px)!important;transform:translateX(-50%)!important;width:20px!important;height:14px!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{display:grid!important;grid-template-columns:1fr 2fr 1fr!important;align-items:center!important;gap:6px!important;height:26px!important;line-height:18px!important;padding:0 4px}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-total{grid-column:1;font-size:15px!important;font-weight:700;text-align:left;white-space:nowrap}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-match-id{grid-column:2;font-size:10px!important;text-align:center;line-height:12px;overflow-wrap:anywhere}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).closed-discard-layout #discardPile:not(.canasta-mobile *){border-color:transparent!important;justify-self:start!important;width:auto!important;min-width:0!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).closed-discard-layout .meld-zone h3{top:auto!important;bottom:0!important;left:50%!important;transform:translateX(-50%)!important;margin:0!important}
@media(max-width:700px){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{grid-template-columns:100px minmax(0,1fr)!important;height:30px!important;gap:4px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-total{font-size:12px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-match-id{font-size:8px!important;line-height:10px}
 #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .felt .table-arena{grid-template-rows:40px minmax(0,1fr) 82px 36px minmax(0,1fr)!important}
}
@media(max-height:540px) and (orientation:landscape){body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-total{font-size:12px!important}}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).closed-discard-layout #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){width:calc(var(--desktop-pile-w,60px) + 8px)!important;min-width:0!important;max-width:100%!important}
@media(max-width:700px){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile).closed-discard-layout #center:not(.canasta-mobile *)>#discardPile:not(.canasta-mobile *){width:64px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{grid-template-columns:1fr!important;grid-template-rows:17px 12px!important;gap:0!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-total{grid-column:1;grid-row:1}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-match-id{grid-column:1;grid-row:2;font-size:9px!important;line-height:12px}
}
/* The metadata row owns this baseline; the stock remains labelled for assistive technology. */
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) #stockPile:not(.canasta-mobile *)>small{display:none!important}
body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr)!important}
@media(max-width:999px){
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:17px 12px!important;gap:0!important;height:30px!important}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-total{grid-column:1;grid-row:1}
 body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-match-id{grid-column:1;grid-row:2}
}
@media(max-width:999px) and (orientation:landscape){body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-match-id{font-size:8px!important;line-height:10px}}
@media(max-width:999px) and (orientation:landscape){body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata{grid-template-rows:17px auto!important;height:auto!important;min-height:30px!important}body.playing #match:not(.canasta-mobile).stbl-layout:not(.canasta-mobile) .mobile-discard-metadata .discard-match-id{min-width:0;max-width:100%}}
