
:root{--paper:#191212;--surface:#241b1b;--ink:#e8dac7;--muted:#9f9286;--line:#493838;--green:#d5c8a4;--green-light:#3b3028;--gold:#d4c49e;--danger:#d17d70;--radius:3px;--shadow:none;font-family:var(--font-ui);background:#191212;color:#e8dac7;color-scheme:dark}html[data-theme=dark]{--paper:#191212;--surface:#241b1b;--ink:#e8dac7;--muted:#9f9286;--line:#493838;--green:#d5c8a4;--green-light:#3b3028;--gold:#d4c49e}body{font-family:var(--font-ui);background:#191212}button,input,select,textarea{font-family:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:1px solid #e8dac7;outline-offset:4px}.site-header{border-bottom:0}.wordmark{font-family:var(--font-ui);font-size:32px;font-weight:500;letter-spacing:0}.wordmark span{font-family:var(--font-ui);letter-spacing:0}.prototype-tag,.landing-badges span,.button,.entry-panel,.mode-choice,input,.panel,.action-panel,.notice,.toast{border-radius:3px}.button.primary{background:#d5c8a4;color:#211818;border-color:#d5c8a4}.button.primary:hover{background:#e8dac7}.button{background:#322525;border-color:#574848;color:#e8dac7;box-shadow:none;font-size:14px}.button:hover{background:#403030}.mode-choice:has(input:checked){border-color:#b9a982;background:#3b3028}input,textarea{color:#e8dac7;background:#211818}.landing-copy h1{font-family:var(--font-ui);font-size:45px;line-height:1.2;letter-spacing:-1px;font-weight:400}.landing-board{opacity:.5;overflow:hidden}.landing-board .board-svg{width:100%;height:auto}.entry-panel{background:#241b1b;border-color:#493838}.eyebrow{color:#a99a86}.site-footer{border-top:0}.connection.online{color:#b8c58c}.connection{font-size:12px}.loading-mark{font-family:var(--font-ui)}.notice{z-index:1000}.toast{background:#322525;color:#e8dac7;border:1px solid #574848;bottom:160px;font-size:15px}.muted{color:#9f9286}
body.playing{height:100dvh;overflow:hidden;background:#191212}
body.playing .site-header,body.playing .site-footer,body.playing .room-heading{display:none}
body.playing main#main{padding:0;margin:0;width:100%;max-width:none;min-height:100dvh}
body.playing #app,body.playing .game-shell{width:100%;height:100dvh;min-height:0;display:block}
body.playing #notice:not([hidden]){position:fixed;z-index:1000;top:18px;left:50%;transform:translateX(-50%);max-width:min(600px,90vw);background:#3b2524}
.game-frame,.table-stage{position:fixed;inset:0;overflow:clip;background:#191212}
.table-stage{--card-scale:1;--card-w:108px;--card-h:163px;--card-gap:4px;--card-visible:73px;--lift:76px;--field-size:844px;isolation:isolate}
.table-stage:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url('/assets/game-pattern.png') repeat;opacity:.2}
.table-menu-button{position:absolute;left:24px;top:24px;display:flex;align-items:center;border:0;padding:0;background:none;width:42px;height:42px;z-index:40}
.table-menu-button img,.pixel-bubble img{display:block;flex:none;max-width:none;margin:0}
.bubble-right{transform:scaleX(-1)}
.pixel-bubble{display:inline-flex;align-items:stretch;vertical-align:top;gap:0;height:32px;font:clamp(13px,1.05vw,16px)/1 var(--font-ui);color:#e8dac7;white-space:nowrap}
.seat-name{position:absolute;z-index:8;max-width:calc(100vw - 48px)}
.seat-name-0{left:min(calc(50% + var(--primary-hand-width,626px)/2 + 24px),calc(100% - 160px));bottom:calc(var(--card-visible) - 32px)}
.seat-name-1{left:24px;top:calc(50% + var(--side-hand-1,626px)/2 + 24px)}
.seat-name-2{right:calc(50% + var(--top-hand-width,626px)/2 + 24px);top:calc(var(--card-visible) - 32px)}
.seat-name-3{right:24px;top:calc(50% - var(--side-hand-3,626px)/2 - 56px)}
.seat-name small{display:block;color:#a99a86;font-size:12px;padding:5px 0}
.seat-name.current-seat:after{content:"";width:4px;height:4px;position:absolute;left:-11px;top:13px;background:var(--seat);box-shadow:0 0 0 2px #e8dac733}
.opponent-hand{position:absolute;z-index:2;pointer-events:none;transform-origin:0 0}
.opponent-hand>div{display:flex;align-items:center;gap:var(--card-gap);width:max-content}
.opponent-hand img{display:block;width:var(--card-w);height:var(--card-h);max-width:none}
.opponent-hand-2{left:calc(50% + var(--opponent-length)/2);top:var(--card-visible);transform:rotate(180deg)}
.opponent-hand-1{left:var(--card-visible);top:calc(50% - var(--opponent-length)/2);transform:rotate(90deg)}
.opponent-hand-3{left:calc(100% - var(--card-visible));top:calc(50% + var(--opponent-length)/2);transform:rotate(-90deg)}
.opponent-hand-0{display:none}
body.playing .board-wrap{position:absolute!important;left:50%;top:50%;transform:translate(-50%,-50%);width:var(--field-size)!important;height:var(--field-size)!important;min-height:0;max-width:none!important;max-height:none!important;padding:0!important;margin:0!important;aspect-ratio:1;background:none!important;border:0!important;border-radius:0;overflow:visible;box-shadow:none!important;isolation:auto}
body.playing .board-svg{display:block;width:100%!important;height:100%!important;max-width:none;max-height:none;filter:none;border-radius:0;overflow:visible;background:none}
.field-spot,.marble-node image,.path-hole{pointer-events:none}
.marble-node{filter:none!important;transition:none!important}
.marble-node .chip-hover{display:none}
.marble-node.movable{cursor:pointer}
.marble-node.hovered-marble .chip-normal{display:none}
.marble-node.hovered-marble .chip-hover{display:block}
.marble-node:focus-visible{outline:0}
.marble-node:focus-visible .chip-normal{display:none}
.marble-node:focus-visible .chip-hover{display:block}
.move-target{cursor:pointer;outline:0}
.move-target image{pointer-events:none}
.move-target .target-hit{stroke:none;fill:transparent}
.path-hole,.target-hit{stroke:none!important;filter:none!important}
.center-pile,.deck-pile,.discard-table-pile{position:absolute;width:var(--card-w);display:flex;flex-direction:column;align-items:center;gap:12px;z-index:1}
.center-pile{left:50%;top:50%;transform:translate(-50%,-50%)}
.deck-pile{left:64.33%;top:17.77%}
.discard-table-pile{left:23.7%;top:59.36%}
.table-card-stack{position:relative;width:var(--card-w);height:calc(var(--card-h) + 12px);flex:none}
.table-card-stack>img{position:absolute;left:0;top:calc(var(--stack-index)*3px);width:var(--card-w);height:var(--card-h);max-width:none;display:block}
.table-card-stack>.in-flight{visibility:hidden}
.empty-card-space{width:var(--card-w);height:calc(var(--card-h) + 12px);flex:none}
.center-pile .empty-card-space{outline:1px dashed #493838;outline-offset:-3px;opacity:.35}
.current-turn-label{font:clamp(12px,1.05vw,16px)/1.4 var(--font-ui);color:#e8dac7;white-space:nowrap;text-align:center;max-width:300px}
body.playing .table-stage .hands-stack{position:absolute!important;left:50%;bottom:calc(var(--card-visible) - var(--card-h));top:auto;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100% - 150px);display:block;gap:0;z-index:12;margin:0!important;padding:0!important;pointer-events:auto}
.hands-stack:before{content:"";position:absolute;inset:0;pointer-events:none}
.hands-stack:hover:before,.hands-stack:focus-within:before{top:calc(-1 * var(--lift));pointer-events:auto}
body.playing .table-stage .hand-panel{display:block!important;padding:0!important;margin:0!important;border:0!important;outline:0!important;box-shadow:none!important;background:none!important;border-radius:0;width:max-content;max-width:none;position:relative;pointer-events:auto;opacity:1!important}
body.playing .hand-panel .hand-heading,body.playing .hand-hint{display:none}
body.playing .table-stage .hand{display:flex!important;align-items:flex-start;gap:var(--card-gap);padding:0!important;overflow:visible!important;width:var(--hand-width);max-width:none;height:var(--card-h);margin:0;transform:translateY(0);transition:transform .32s cubic-bezier(.2,.7,.3,1)}
body.playing .hands-stack:hover .hand,body.playing .hands-stack:focus-within .hand{transform:translateY(calc(-1 * var(--lift)))}
body.playing .table-stage .hand .card-slot{display:block!important;flex:none;position:relative;overflow:visible;z-index:1;padding:0!important;margin:0!important;align-self:auto;width:var(--card-w)!important;min-width:var(--card-w)!important;max-width:none!important;height:var(--card-h)!important;min-height:var(--card-h)!important;max-height:none!important}
body.playing .card-slot:hover,body.playing .card-slot:focus-within{z-index:1}
body.playing .card-slot:before,body.playing .card-slot:after{display:none!important}
body.playing .table-stage .hand .card-slot .playing-card{position:relative;display:block!important;padding:0!important;margin:0!important;border:0!important;outline:0;border-radius:0;background:none!important;box-shadow:none!important;width:var(--card-w)!important;min-width:var(--card-w)!important;max-width:none!important;height:var(--card-h)!important;min-height:var(--card-h)!important;max-height:none!important;line-height:normal;aspect-ratio:auto!important;transform:scale(1)!important;transform-origin:center center;transition:transform .32s cubic-bezier(.2,.7,.3,1);opacity:1!important;filter:none!important;overflow:visible;pointer-events:auto;flex:none!important}
body.playing .table-stage .hand .card-slot:hover .playing-card.playable:not(:disabled),body.playing .table-stage .hand .card-slot:focus-within .playing-card.playable:not(:disabled){transform:scale(1.14)!important}
body.playing .playing-card:before,body.playing .playing-card:after{display:none!important}
body.playing .table-stage .playing-card .card-face{position:static!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;pointer-events:none}
body.playing .playing-card.surface-ready .card-face{visibility:hidden}
body.playing .playing-card:focus-visible{outline:1px solid #d1c19f;outline-offset:3px}
.card-slot.is-dragging{visibility:hidden!important;pointer-events:none!important}
.card-info{display:none!important}
.exchange-summary{position:absolute!important;top:calc(-1 * var(--lift) - 60px)!important;left:50%;transform:translateX(-50%);width:max-content;max-width:700px;display:flex;align-items:center;gap:15px;margin:0!important;padding:7px 10px;background:#322525;color:#e8dac7;font-size:14px;z-index:3}
.duel-hands .secondary-hand{position:absolute!important;right:calc(100% + 60px);left:auto;bottom:calc(var(--lift) + 30px);transform:scale(.72);transform-origin:bottom right}
.duel-hands .hand-heading{display:flex!important;position:absolute;top:-28px;left:0;right:0;color:#9f9286;justify-content:space-between;margin:0;font-size:12px}
.duel-hands .hand-heading h2{font:14px var(--font-ui);letter-spacing:0}
.card-surface-canvas{position:fixed;z-index:25;pointer-events:none;display:block}
.card-surface-canvas[hidden]{display:none}
.table-chat,.game-action-tray .action-panel{background:#241b1bf2;border:1px solid #493838;color:#e8dac7;border-radius:0;box-shadow:none}
.table-chat{position:absolute;z-index:45;left:24px;top:180px;width:370px;padding:10px}
.table-chat .panel{border:0;background:none;box-shadow:none}
.table-chat .chat-list{max-height:430px;min-height:200px}
.game-action-tray{position:absolute;left:calc(var(--card-visible) + 44px);top:31%;width:clamp(175px,15.625vw,300px);z-index:10;max-height:51%;overflow:auto;scrollbar-width:thin;scrollbar-color:#574848 transparent}
.game-action-tray .action-panel{padding:16px;font-size:14px}
.game-action-tray .action-panel:has(.team-score):not(:has(.seven-meter)):not(:has(.action-options)):not(.exchange-panel):not(.winner-panel){border:0;background:none;padding:0 6px}
.game-action-tray .action-panel h2{font:clamp(16px,1.05vw,20px)/1.4 var(--font-ui);font-weight:400;letter-spacing:0;margin:7px 0 9px}
.game-action-tray .action-panel p{font-size:clamp(12px,.75vw,14px);line-height:1.5}
.game-action-tray .team-score{display:none}
.action-options{display:grid;gap:6px}
.action-option{font-size:13px;line-height:1.5;color:#e8dac7;border:1px solid #574848;background:#322525;border-radius:0;padding:8px 10px}
.action-option:hover{border-color:#a99a86;background:#403131}
.move-list{font-size:12px;margin:10px 0;max-height:180px;overflow:auto}
.move-list summary{color:#9f9286}
.seven-meter{background:#322525;border-color:#493838;border-radius:0}
.seven-meter .remaining{font-family:var(--font-ui)}
.seven-segments i.available{background:#c3b68f}
.seven-segments i.used{background:#493838}
.target-picker,.tac-choice,.swap-progress{border-radius:0;background:#322525;color:#e8dac7}
.confirm-actions{display:flex;gap:7px;flex-wrap:wrap}
.confirm-actions .button{font-size:13px;padding:8px 10px}
.declarations-panel{margin-top:18px;background:#322525!important;border:1px solid #493838!important}
.declarations-panel h3{font-weight:400;font-size:14px}
.declarations-list{display:grid!important;grid-template-columns:1fr!important;gap:8px}
.declaration-row{display:flex;align-items:center;gap:8px;border-color:#493838;font-size:13px}
.declaration-row b{margin-left:auto;white-space:nowrap}
.has-exit{color:#b8c58c}.no-exit{color:#9f9286}
.card-ghost,.card-flight,.deal-flight{position:fixed;z-index:100;pointer-events:none;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;padding:0!important;overflow:visible;will-change:transform}
.card-ghost{translate:0 0;width:var(--drag-w,108px);height:var(--drag-h,163px);transform:translate(-50%,-50%) rotate(-3deg)}
.card-ghost img,.card-flight img{display:block;width:100%;height:100%;object-fit:fill}
.deal-card-flight{border:0!important;border-radius:0!important;background:url('/assets/cards/back.webp') center/100% 100% no-repeat!important;color:transparent!important;box-shadow:none!important}
dialog{background:#241b1b;color:#e8dac7;border:1px solid #574848;border-radius:0;font:15px/23px var(--font-ui)}
dialog::backdrop{background:#100b0bd9}dialog h2,dialog h3{font-family:var(--font-ui);letter-spacing:0;font-weight:400}.help-cards dt{color:#e8dac7}.settings-options label{background:#322525;border-color:#493838;border-radius:0}.settings-options small{color:#9f9286}
.demo-toolbar{position:absolute;top:calc(var(--card-visible) + 7px);left:50%;transform:translateX(-50%);z-index:30;display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:11px;color:#9f9286}
.demo-toolbar button,.demo-toolbar a{font:inherit;padding:4px 6px;color:#c4b7a6;background:#261e1c;border:0;border-radius:0;text-decoration:none}
.demo-toolbar button[aria-pressed=true]{color:var(--seat);box-shadow:inset 0 -1px var(--seat)}.demo-toolbar button:hover,.demo-toolbar a:hover{color:#efe3d0}
.surface-perf{position:fixed;left:12px;bottom:10px;z-index:1100;padding:6px 9px;background:#211a18de;color:#aaa18b;font:11px var(--font-ui);pointer-events:none}
@media(max-width:1180px){.game-action-tray{left:calc(var(--card-visible) + 15px);width:165px}.game-action-tray .action-panel{padding:10px}.seat-name-0{left:auto;right:20px}.demo-toolbar{gap:3px;font-size:10px}.demo-toolbar>span{display:none}}
@media(prefers-reduced-motion:reduce){body.playing .table-stage .hand,body.playing .table-stage .playing-card{transition:none!important}}
.current-turn-label{white-space:normal;width:max-content;max-width:calc(var(--card-w) + 54px)}
/* Updated TAC component states. The bubble has one continuous fill under its SVG caps. */
html,body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.seat-name.current-seat:after{display:none}
.empty-card-space{position:relative;height:var(--card-h);outline:none!important;opacity:1!important}
.empty-pile-base{width:100%;height:100%;display:block}
.empty-pile-logo{position:absolute;left:16.83%;top:25.55%;width:66.34%;height:auto}
.exit-declaration{width:20px;height:20px;margin-left:2px!important}
body.playing .exchanging .exchange-summary{top:0!important;left:calc(100% + 24px);transform:none;padding:0;background:none;height:42px}
.exchanging .exchange-summary>span{display:none}
body.playing .exchanging .card-slot.has-selected .playing-card{transform:translateY(-20px)!important;outline:2px solid #e8dac7;outline-offset:2px}
.marble-node .chip-active{display:none}
.marble-node.selected-marble .chip-normal,.marble-node.selected-marble .chip-hover{display:none}
.marble-node.selected-marble .chip-active{display:block}
.marble-node .selection-halo{display:none;fill:none;stroke:var(--seat);stroke-width:2;stroke-opacity:.45;filter:drop-shadow(0 0 3px var(--seat));pointer-events:none}
.marble-node.swap-selected-marble .selection-halo{display:block}
.marble-node.swap-selected-marble .chip-normal{display:block}
.marble-node.swap-selected-marble .chip-active,.marble-node.swap-selected-marble .chip-hover{display:none}
.marble-node.dragged-piece{cursor:grabbing!important}
.marble-node.dragged-piece .chip-normal{display:none}
.marble-node.dragged-piece .chip-hover{display:block}
.marble-node.dragged-piece .chip-active{display:none}
.path-hole,.future-chip{pointer-events:none!important}
.pixel-card-shadow{position:absolute!important;inset:0;display:block;width:100%;height:100%;transform:translate(8px,12px)!important;filter:brightness(0);opacity:.5;image-rendering:pixelated;pointer-events:none;z-index:-1}
.playing-card>.pixel-card-shadow{visibility:hidden}
.playing-card.held-card>.pixel-card-shadow{visibility:visible}
.card-ghost>.pixel-card-shadow{position:absolute!important;transform:translate(10px,16px)!important}
.card-ghost{isolation:isolate;cursor:grabbing}
.transfer-hidden{visibility:hidden!important}
.transfer-flight{z-index:95}
.preview-cell{pointer-events:none}
.preview-cell>.route-cell,.preview-cell>.final-cell{display:none}
.preview-cell.is-route>.route-cell,.preview-cell.is-final>.final-cell{display:block}
.transfer-flight .flight-back{position:absolute;inset:0}
.playing-card>.exchange-selection{display:none;position:absolute;left:-3.96%;top:-2.92%;width:107.92%;height:105.84%;max-width:none;pointer-events:none}
body.playing .exchanging .card-slot.has-selected .playing-card{outline:0}
.exchanging .card-slot.has-selected .exchange-selection{display:block}
.deck-pile:has(>.empty-card-space),.discard-table-pile:has(>.empty-card-space){padding-top:12px}
/* Two independent owned hands, fixed to the two bottom corners in a duel. */
body.playing .table-stage .hands-stack.duel-hands{left:0!important;right:0!important;transform:none!important;width:100%!important;max-width:none!important;height:var(--card-h);pointer-events:none}
.duel-hands:before{display:none}
body.playing .table-stage .duel-hands .hand-panel{position:absolute!important;bottom:0!important;left:auto;right:auto;transform:none!important;transform-origin:center;pointer-events:auto}
body.playing .table-stage .duel-hands .hand-panel[data-hand-side=left]{left:24px!important;right:auto!important}
body.playing .table-stage .duel-hands .hand-panel[data-hand-side=right]{right:24px!important;left:auto!important}
.duel-hands .hand-heading h2,.merged-hands .hand-heading h2{margin:0;font:16px/22px var(--font-ui);letter-spacing:0;font-weight:400}
.duel-hands .hand-heading>span,.merged-hands .hand-heading>span{font:12px/18px var(--font-ui)}
.hands-stack.duel-hands:hover .hand-heading,.hands-stack.duel-hands:focus-within .hand-heading,.hands-stack.merged-hands:hover .hand-heading,.hands-stack.merged-hands:focus-within .hand-heading{transform:translateY(calc(-1 * var(--lift)))}
body.playing .table-stage.exchanging .duel-hands .exchange-summary{top:calc(-1 * var(--lift) - 96px)!important;left:auto;right:0;max-width:none}
.exchanging .duel-hands .exchange-summary>span{display:block;font-size:12px}
.invite-room-note{font-size:14px;line-height:1.6;color:#b9aa93;margin:12px 0 20px}
/* Always-visible own hands; hover only changes the individual card surface/scale. */
body.playing .table-stage .hands-stack .hand,body.playing .table-stage .hands-stack:hover .hand,body.playing .table-stage .hands-stack:focus-within .hand{transform:none!important;transition:none!important}
body.playing .table-stage .hands-stack .hand-heading,body.playing .table-stage .hands-stack:hover .hand-heading,body.playing .table-stage .hands-stack:focus-within .hand-heading{transform:none!important;transition:none!important}
body.playing .table-stage .hands-stack:before{display:none!important}
body.playing .table-stage .hand-panel .hand-heading h2 .pixel-bubble,body.playing .table-stage .hand-panel .hand-heading h2 .pixel-bubble>span{font:16px/22px var(--font-ui)!important}
body.playing .table-stage .hand-panel .hand-heading>span{font:14px/22px var(--font-ui)!important}
/* The two closed hands face the player from the top edge. */
body.playing .duel-table .opponent-hand.duel-opponent-hand{top:calc(var(--card-h) - 22px);transform:rotate(180deg);right:auto}
body.playing .duel-table .duel-opponent-hand[data-enemy-hand-side=left]{left:calc(24px + var(--opponent-length))}
body.playing .duel-table .duel-opponent-hand[data-enemy-hand-side=right]{left:calc(100% - 24px)}
.table-stage .exchange-instruction{top:50%;bottom:auto;transform:translate(-50%,-50%);z-index:9}
/* Reset legacy compact game controls so SVG caps keep their exact 42px size. */
body.playing .table-stage.exchanging .hands-stack .exchange-summary{position:absolute!important;top:-52px!important;left:auto!important;right:0!important;bottom:auto!important;transform:none!important;width:max-content;max-width:calc(100% - 100px);height:42px;min-height:42px;max-height:none;display:flex;align-items:center;padding:0!important;margin:0!important;background:none;border:0;overflow:visible;flex-wrap:nowrap}
body.playing .table-stage.exchanging .hands-stack .hand-heading>span{display:none}
body.playing .table-stage.exchanging .exchange-summary>span{display:block;font:14px/22px var(--font-ui);white-space:nowrap}
.seven-allocation-picker{margin:10px 0;color:#e8dac7;font-size:13px;line-height:1.5}
.seven-allocation-picker>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:190px;overflow:auto;margin-top:8px}
.game-action-tray .seven-allocation-picker .seven-choice{font:12px/18px var(--font-ui);min-height:32px;padding:6px;white-space:normal;text-align:left}
body.playing .table-stage.exchanging .card-slot.has-selected .playing-card{transform:scale(1)!important}
body.playing .duel-table .duel-opponent-hand[data-enemy-hand-side=left]{left:calc(96px + var(--opponent-length))}
body.playing .duel-table .duel-opponent-hand[data-enemy-hand-side=right]{left:calc(100% - 96px)}
/* TAC / Game UPDATED, 30:722782. Board and four corner stations share one scale. */
.table-stage{--field-size:1004px;--card-gap:-36px;--ui-scale:1;--base-size:92px;--base-bottom:225px;--name-bottom:177px}
body.playing .table-stage .board-wrap{z-index:3;pointer-events:none}
body.playing .table-stage .board-svg{pointer-events:none}
.board-svg .marble-node,.board-svg .move-target{pointer-events:auto}
.board-svg .board-circle-line,.board-svg .home-arch{pointer-events:none}
body.playing .table-stage .hands-stack .hand-panel{position:absolute!important;bottom:0!important;top:auto!important;transform:none!important;pointer-events:auto}
body.playing .table-stage .hands-stack .hand-panel[data-corner=bottom-left]{left:24px!important;right:auto!important}
body.playing .table-stage .hands-stack .hand-panel[data-corner=bottom-right]{left:auto!important;right:24px!important}
body.playing .table-stage .hands-stack .hand-panel[data-corner=bottom-center]{left:50%!important;right:auto!important;transform:translateX(-50%)!important}
body.playing .table-stage .hand-panel .hand-heading{display:none!important}
body.playing .table-stage .opponent-hand{transform:none!important;transform-origin:0 0;pointer-events:none;z-index:2}
body.playing .table-stage .opponent-hand>div{gap:var(--card-gap)}
body.playing .table-stage .seat-name{display:block!important;font-size:16px;z-index:8}
body.playing .table-stage .pixel-bubble{font:16px/22px var(--font-ui)}
body.playing .table-stage .table-header-menu{position:absolute;left:50%;top:calc(50% - 74px * var(--ui-scale) - 100px);transform:translateX(-50%);display:flex;align-items:center;gap:8px;z-index:40;pointer-events:auto}
body.playing .table-header-menu .table-menu-button{position:relative;inset:auto;width:42px;height:42px;flex:none}
body.playing .table-stage .table-chat{left:50%;top:50%;transform:translate(-50%,-50%);width:min(370px,90vw)}
body.playing .table-stage .center-pile,body.playing .table-stage .deck-pile,body.playing .table-stage .discard-table-pile{top:calc(50% - 74px * var(--ui-scale));transform:none;gap:0;pointer-events:auto}
body.playing .table-stage .center-pile{left:50%;transform:translateX(-50%)}
body.playing .table-stage .deck-pile{left:calc(50% - 183px * var(--ui-scale))}
body.playing .table-stage .discard-table-pile{left:calc(50% + 83px * var(--ui-scale))}
body.playing .table-stage .table-card-stack{height:calc(var(--card-h) + 12px * var(--ui-scale))}
body.playing .table-stage .table-card-stack>img{top:calc(var(--stack-index) * 3px * var(--ui-scale))}
body.playing .table-stage .deck-pile>.pixel-bubble,body.playing .table-stage .discard-table-pile>.pixel-bubble{position:absolute;bottom:calc(100% + 4px * var(--ui-scale));left:50%;transform:translateX(-50%)}
body.playing .table-stage .deck-pile:has(>.empty-card-space),body.playing .table-stage .discard-table-pile:has(>.empty-card-space){padding-top:0}
body.playing .table-stage .deck-pile:has(>.empty-card-space)>.pixel-bubble,body.playing .table-stage .discard-table-pile:has(>.empty-card-space)>.pixel-bubble{bottom:calc(100% + 16px)}
body.playing .table-stage .current-turn-label{position:absolute;top:calc(var(--card-h) + 28px * var(--ui-scale));left:50%;transform:translateX(-50%);font:16px/22px var(--font-ui);white-space:nowrap;max-width:none;width:max-content}
body.playing .table-stage .game-action-tray{left:24px;top:calc(24px + var(--card-h) + 88px + var(--base-size));bottom:calc(24px + var(--card-h) + 88px + var(--base-size));width:min(300px,calc(50% - var(--field-size)/2 - 48px));max-height:none;z-index:9}
.game-action-tray.idle-action{display:none}
.game-action-tray .cancel-choice{display:none}
body.playing .table-stage .demo-toolbar{top:6px;left:50%;font-size:10px;opacity:.65}
.deal-card-flight{background-image:url('/assets/cards/back-updated.webp')!important}
/* Figma's negative card spacing is an overlap margin; CSS gap cannot be negative. */
body.playing .table-stage .hand,body.playing .table-stage .opponent-hand>div{gap:0!important;justify-content:flex-start;flex-wrap:nowrap}
body.playing .table-stage .hand .card-slot:not(:last-child){margin-right:var(--card-gap)!important}
body.playing .table-stage .opponent-hand img:not(:last-child){margin-right:var(--card-gap)}
body.playing .table-stage .deck-pile>.pixel-bubble,body.playing .table-stage .discard-table-pile>.pixel-bubble{bottom:calc(100% + 16px)}
body.playing .table-stage .board-wrap{pointer-events:auto}
/* Hover lifts one card without changing its dimensions. */
body.playing .table-stage .hands-stack .hand .card-slot:hover .playing-card.playable:not(:disabled),
body.playing .table-stage .hands-stack .hand .card-slot:focus-within .playing-card.playable:not(:disabled){transform:translateY(calc(-16px * var(--card-scale)))!important}
body.playing .table-stage.compact-table .game-action-tray{left:auto;right:calc(50% + 55px * var(--ui-scale));top:calc(50% + 150px * var(--ui-scale));bottom:auto;width:min(225px,calc(var(--field-size) * .25));max-height:calc(200px * var(--ui-scale))}
body.playing .table-stage.compact-table .game-action-tray .action-panel{padding:10px}

/* Lift does not change the order of overlapping cards; the held face is opaque. */
body.playing .table-stage .hand .card-slot,body.playing .table-stage .hand .card-slot:hover,body.playing .table-stage .hand .card-slot:focus-within{z-index:1!important}
.card-ghost{opacity:1!important}
.card-ghost>img:not(.pixel-card-shadow){opacity:1!important}
.preview-cell>.cracked-cell{display:none;pointer-events:none}
.preview-cell.is-cracked>.cracked-cell{display:block}
.marble-node.preview-captured>image,.marble-node.preview-captured>.selection-halo{visibility:hidden}

/* The reference uses the same faces and proportions as cards in the hand. */
#help-dialog .help-cards{grid-template-columns:108px minmax(0,1fr);column-gap:24px}
#help-dialog .help-cards dt,#help-dialog .help-cards dd{display:flex;align-items:center;padding:16px 0}
#help-dialog .help-cards dd{font-size:14px}
#help-dialog .help-cards img{display:block;width:108px;height:163px;object-fit:contain}
#surrender-dialog{width:min(460px,calc(100vw - 48px));padding:24px;background:var(--surface);color:var(--ink);border:1px solid var(--line)}
#surrender-dialog h2{font:400 26px/1.3 var(--font-ui);margin:8px 0}
#surrender-dialog p{font-size:14px;line-height:1.7}
#surrender-error{color:var(--danger)}
.surrender-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.surrender-actions .button{min-height:42px;padding:10px 16px}
.finished-game-panel .surrender-result{font-size:13px;line-height:1.6;color:var(--muted);margin:12px 0}
/* Open-table directory uses the same local typography and palette as the table. */
.landing.has-identity:has(.lobby-directory){max-width:1280px;margin:0 auto;gap:32px}
.landing.has-identity .landing-copy h1{font-size:32px;line-height:1.25;margin:12px 0}
.landing.has-identity .landing-copy>p{font-size:14px;max-width:none;margin:12px 0}
.lobby-panel{margin-top:28px;border-top:1px solid var(--line);padding-top:22px;min-width:0}
.lobby-heading{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:14px}
.lobby-heading h2{font:400 22px/1.3 var(--font-ui);margin:0}
.lobby-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px}
.lobby-controls select,.entry-panel select{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:3px;padding:10px;max-width:100%;font:inherit}
.entry-panel select{width:100%}
.lobby-table-scroll{overflow-x:auto}
.lobby-table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}
.lobby-table th{font-weight:400;color:var(--muted);padding:12px 8px;border-bottom:1px solid var(--line)}
.lobby-table td{padding:16px 8px;border-bottom:1px solid var(--line);vertical-align:middle}
.lobby-table td strong{font-weight:400;display:block;overflow-wrap:anywhere}
.lobby-table small,.lobby-players{display:block;color:var(--muted);font-size:11px;margin-top:6px;overflow-wrap:anywhere}
.lobby-table .button{font-size:12px;padding:9px 12px;min-height:38px}
.lobby-occupancy{white-space:nowrap}
.lobby-message{padding:20px 0}
.landing.table-lobby{grid-template-columns:minmax(0,1fr);gap:24px;align-items:start;max-width:1280px;margin:0 auto}
.table-lobby .landing-copy>p{max-width:none}
.lobby-name-form{display:flex;align-items:end;gap:12px;max-width:560px;margin:24px 0}
.lobby-name-form>.field{flex:1;min-width:0;margin:0}
.lobby-name-form>.button{flex:none;min-height:46px}
.landing.table-lobby.lobby-invitation{max-width:600px}
.lobby-invite-form{margin-top:24px}
.lobby-entry-actions{display:flex;gap:12px;flex-wrap:wrap}
@media(max-width:900px){.lobby-table{font-size:12px}.lobby-table td{padding:12px 5px}}

/* Directory and replay controls retain the table's local palette and typography. */
.lobby-directory{min-width:0}
.lobby-directory .lobby-heading{margin-bottom:16px}
.lobby-directory .lobby-controls{display:grid;grid-template-columns:minmax(140px,1fr) minmax(150px,190px) auto;align-items:end;gap:12px;margin-bottom:16px}
.lobby-search,.lobby-format-filter{display:grid;gap:8px;min-width:0}
.lobby-directory .lobby-controls label{font-size:12px;color:var(--muted)}
.lobby-directory .lobby-controls input,.lobby-directory .lobby-controls select{width:100%;min-width:0;min-height:40px;padding:8px 10px;margin:0;border:1px solid var(--line);border-radius:3px;font:12px/1.5 var(--font-ui);background:var(--surface);color:var(--ink)}
.lobby-directory .lobby-controls input::placeholder{color:var(--muted);opacity:1}
.lobby-directory .lobby-controls button{min-height:40px;font-size:12px;padding:8px 12px}
.lobby-directory select:focus-visible{outline:1px solid var(--ink);outline-offset:4px}
.lobby-refresh-status{color:var(--muted);font-size:12px;min-height:18px}
.lobby-room-list{display:grid;gap:12px}
.lobby-room{border:1px solid var(--line);background:var(--surface);padding:16px;min-width:0}
.lobby-room-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;min-width:0}
.lobby-room-heading h3{font:400 16px/1.5 var(--font-ui);margin:0;color:var(--ink);overflow-wrap:anywhere;min-width:0}
.lobby-room-status{font-size:11px;line-height:24px;white-space:nowrap;color:var(--muted)}
.lobby-room .lobby-room-format{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12px;line-height:1.5;margin:8px 0 16px;color:var(--ink)}
.lobby-room-format>span{color:var(--muted)}
.lobby-seats{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0;margin:0}
.lobby-seat{display:flex;align-items:center;gap:10px;min-width:0;border:1px solid var(--line);background:var(--paper);padding:10px}
.lobby-seat.is-vacant{border-style:dashed;background:transparent}
.lobby-colours{display:flex;gap:3px;flex:none;align-items:center}
.lobby-colour{display:block;width:9px;height:9px;border-radius:50%;background:var(--lobby-colour)}
.lobby-colour-0{--lobby-colour:#779d22}.lobby-colour-1{--lobby-colour:#b78949}.lobby-colour-2{--lobby-colour:#d64545}.lobby-colour-3{--lobby-colour:#2f96c0}
.lobby-seat-copy{display:grid;gap:4px;min-width:0;font-size:12px;line-height:1.4}
.lobby-seat-copy strong{font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lobby-seat-copy small{font-size:10px;color:var(--muted)}
.lobby-seat.is-vacant .lobby-seat-copy strong{color:var(--muted)}
.lobby-room-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px}
.lobby-room-footer .button{min-height:38px;font-size:12px;padding:8px 12px}
.lobby-room-footer .lobby-occupancy{font-size:14px}
.lobby-occupancy small{font-size:11px;color:var(--muted)}
.lobby-mine{margin-top:28px;padding-top:22px;border-top:1px solid var(--line)}
.lobby-mine-error{font-size:12px;line-height:1.5;color:var(--danger);margin:0 0 12px}
.lobby-mine>.muted{font-size:12px}
.lobby-return-list{display:grid;gap:8px}
.lobby-return-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0;padding:12px;border:1px solid var(--line);background:var(--surface)}
.lobby-return-row.is-playing{border-left:3px solid var(--gold)}
.lobby-return-copy{min-width:0}
.lobby-return-copy h3{margin:0;font:400 14px/1.5 var(--font-ui);overflow-wrap:anywhere}
.lobby-return-copy p{font-size:11px;line-height:1.5;margin:4px 0;color:var(--muted)}
.lobby-return-row.is-playing .lobby-return-copy p>span{color:var(--gold)}
.lobby-return-copy>small{display:block;font-size:11px;line-height:1.5;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lobby-return-row>.button{flex:none;max-width:190px;min-height:38px;padding:8px 12px;font-size:12px}
.lobby-more-mine{margin-top:12px;font-size:12px}
.lobby-more-mine>summary{cursor:pointer;color:var(--muted);padding:4px 0}
.lobby-more-mine>.lobby-return-list{margin-top:12px}
.finished-game-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:35;width:min(460px,calc(100vw - 48px));max-height:calc(100dvh - 64px);overflow:auto;padding:24px;background:var(--surface);border:1px solid var(--line);color:var(--ink);box-shadow:0 0 0 8px #191212cc;scrollbar-width:thin}
.finished-game-panel .action-panel{border:0;padding:0;background:none}
.finished-game-panel h2{font:400 24px/1.4 var(--font-ui);margin:8px 0 16px;color:var(--ink)}
.finished-game-panel .team-score{display:flex;gap:24px;margin:16px 0}
.finished-game-panel .team-score b{font-family:var(--font-ui);font-weight:400;color:var(--ink)}
.finished-game-panel .team-score>div{color:var(--muted)}
.rematch-controls{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}
.rematch-heading{display:flex;justify-content:space-between;align-items:start;gap:12px}
.rematch-heading h3{font:400 16px/1.5 var(--font-ui);margin:0;color:var(--ink)}
.rematch-count{white-space:nowrap;font-size:12px;line-height:24px;color:var(--gold)}
.rematch-controls p{font-size:12px;line-height:1.6;color:var(--muted);margin:12px 0}
.rematch-votes{list-style:none;margin:16px 0;padding:0;display:grid;gap:8px}
.rematch-votes li{display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:13px;line-height:1.5;min-width:0}
.rematch-votes li>span{overflow-wrap:anywhere;min-width:0}
.rematch-votes small{flex:none;font-size:11px;color:var(--muted)}
.rematch-votes .has-accepted small{color:var(--gold)}
.rematch-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.rematch-actions .button{min-height:40px;font-size:13px;padding:8px 16px}
.rematch-controls .rematch-note{font-size:11px;margin:12px 0 0}
@media(max-width:1100px){.lobby-directory .lobby-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.lobby-directory .lobby-search{grid-column:1 / -1}.lobby-directory .lobby-controls>button{justify-self:end}.lobby-room-heading{flex-wrap:wrap;gap:0 12px}}
@media(max-width:480px){.lobby-seats{grid-template-columns:minmax(0,1fr)}.lobby-room-footer{flex-wrap:wrap}.finished-game-panel{padding:20px}}

/* History / 2x2 (30:925235), Log Bubbles (38:159709). */
.table-history{position:absolute;left:24px;top:50%;transform:translateY(-50%);width:258px;height:248px;z-index:9;display:flex;flex-direction:column;gap:6px;justify-content:flex-start;align-items:flex-start}
.history-heading{border:0;background:none;padding:0 0 4px;color:#9f9286;font:14px/16px var(--font-ui);letter-spacing:1.54px;text-transform:uppercase;text-align:left;cursor:pointer}
.history-heading:hover,.history-heading:focus-visible{color:#e8dac7}
.history-preview{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;max-width:100%}
.history-preview-row{min-height:32px;flex:none}
.history-preview-row:nth-child(5){opacity:.5}.history-preview-row:nth-child(6){opacity:.25}
.history-bubble{display:inline-flex;align-items:stretch;vertical-align:top;flex:none;min-height:32px;color:#e8dac7;font:16px/22px var(--font-ui);white-space:nowrap}
.history-bubble img{display:block;flex:none;max-width:none;margin:0}
.history-text{display:flex;align-items:center;align-self:stretch;padding:3px 0 7px;box-sizing:border-box}
.history-pair{display:flex;align-items:center;align-self:stretch;gap:6px}
.history-four-chips{display:flex;align-items:center}.history-four-chips img+img{margin-left:-9px}
.history-empty{margin:0;color:#9f9286;font:13px/20px var(--font-ui)}
#history-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 48px));max-height:calc(100dvh - 48px);padding:24px;overflow:hidden}
#history-dialog[open]{display:flex;flex-direction:column;gap:16px}
#history-dialog .dialog-top{flex:none;margin:0}#history-dialog h2{margin:4px 0 0}
#history-summary{margin:0;font-size:13px}
.history-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;list-style:none;margin:0;padding:0 12px 0 0;scrollbar-color:#574848 #241b1b}
.history-entry{border-top:1px solid #493838;padding:16px 0;overflow-wrap:anywhere}
.history-entry-meta{color:#9f9286;font-size:12px;line-height:18px}.history-entry>p{margin:6px 0 10px;line-height:23px}
.history-entry-bubbles{display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px}
.history-details{margin:10px 0 0;padding-left:20px;color:#b9ac9c;font-size:13px;line-height:20px}
#close-history-bottom{align-self:flex-start;flex:none}
/* Icon Button (30:925513), 48px default / hover, and the current 24px icons. */
body.playing .table-stage .table-header-menu{top:28.984%}

.history-preview .player-nickname{display:block;max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}


/* Native four-corner frames: only the two fills stretch with content. */
.pixel-frame{position:relative;display:inline-flex;align-items:stretch;vertical-align:top;isolation:isolate;padding:0 5px;border:0;border-radius:0;background:transparent;clip-path:none;gap:0;color:#e8dac7;font:16px/22px var(--font-ui);box-sizing:border-box}
.pixel-skin{position:absolute;inset:0;z-index:-1;pointer-events:none}
.pixel-skin:before,.pixel-skin:after{content:"";position:absolute;background:var(--pixel-fill)}
.pixel-skin:before{inset:5px 0}.pixel-skin:after{inset:0 5px}
.pixel-skin .pixel-corner{position:absolute;width:5px;height:5px;max-width:none;margin:0;display:block}
.pixel-corner-tl{top:0;left:0}.pixel-corner-tr{top:0;right:0}.pixel-corner-bl{bottom:0;left:0}.pixel-corner-br{bottom:0;right:0}
.pixel-content{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box}
.pixel-bubble{height:auto;min-height:32px;white-space:nowrap}
.pixel-bubble>.pixel-content{padding:3px 6px 7px}
.seat-name .pixel-bubble{color:#e8dac7}.seat-name .active-bubble{color:#191212}
.pixel-button{cursor:pointer}.pixel-button:disabled{cursor:default}
.pixel-icon-button,body.playing .table-stage .table-header-menu .table-menu-button{width:48px;height:48px;min-height:48px;flex:none;padding:0 5px;cursor:pointer}
.pixel-icon-button>.pixel-content{width:38px;height:48px;padding:12px 7px}
.pixel-icon-button>.pixel-content>img{display:block;width:24px;height:24px;max-width:none}
.pixel-icon-button>.pixel-highlight{position:absolute;top:0;left:0;width:48px;height:5px;pointer-events:none}
.pixel-hover{display:none}.pixel-icon-button:is(:hover,:focus-visible,[aria-expanded=true]) .pixel-default{display:none}
.pixel-icon-button:is(:hover,:focus-visible,[aria-expanded=true]) .pixel-hover{display:block}
.history-bubble>.pixel-content{padding:0 2px;min-height:32px}
.history-player-bubble>.pixel-content{padding-left:6px;padding-right:5px}
.history-bubble-content{display:flex;align-items:center;gap:7px;min-height:32px}
.history-victims{display:flex;align-items:center;gap:7px}
.history-exiting{position:absolute;left:0;pointer-events:none}
.history-compact-button{display:none}
.table-stage.compact-history .table-history{width:48px;height:48px}
.compact-history .history-preview,.compact-history .history-heading{display:none}
.compact-history .history-compact-button{display:inline-flex}
.table-card-controls{position:absolute;top:63.147410%;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:10px;z-index:7;max-width:calc(100% - 48px);pointer-events:none}
.table-card-controls>*{pointer-events:auto;flex:none}
.table-change-card,.exchange-button.pixel-button{min-height:42px;color:#191212;white-space:nowrap}
.table-change-card>.pixel-content,.exchange-button.pixel-button>.pixel-content{padding:8px 8px 12px 10px}
.center-card-status{min-height:42px;max-width:100%;width:max-content}
.center-card-status>.pixel-content{padding:0 5px 0 6px;gap:7px;min-height:42px}
.center-card-status img{display:block;flex:none;max-width:none}
.center-card-label{display:flex;align-items:center;align-self:stretch;gap:6px}
.center-action-text{display:flex;align-items:center;padding:8px 0 12px}
.center-skip-label{white-space:nowrap}
.center-seven-dots{display:flex;align-items:center;gap:3px;padding:2px 0 0 4px}
.compact-controls .center-skip{font-size:14px}.compact-controls .center-skip-label{white-space:normal;text-align:left}
body.playing .card-slot:has(.playing-card:disabled),body.playing .playing-card:disabled{cursor:default!important}
body.playing .card-slot:has(.playing-card[data-illegal=true]),body.playing .playing-card[data-illegal=true]{cursor:not-allowed!important}
body.playing .board-svg .marble-node{cursor:default!important}
body.playing .board-svg .marble-node.movable{cursor:pointer!important}
body.playing .board-svg .marble-node.illegal-marble{cursor:not-allowed!important}
body.playing .board-svg .marble-node.dragged-piece{cursor:grabbing!important}

/* Design / 2x2 44:261581 and Trade 44:262639. */
body.playing .table-stage .hands-stack{left:0!important;right:0!important;bottom:72px!important;top:auto!important;transform:none!important;width:100%!important;max-width:none!important;height:var(--card-h);pointer-events:none;z-index:12}
body.playing .table-stage .hands-stack .hand-panel .hand-heading{display:none!important}
body.playing .table-stage .opponent-hand[data-corner=top-left]{top:72px!important;left:24px!important;right:auto!important;bottom:auto!important}
body.playing .table-stage .opponent-hand[data-corner=top-right]{top:72px!important;right:24px!important;left:auto!important;bottom:auto!important}
body.playing .table-stage .opponent-hand[data-corner=bottom-left]{bottom:72px!important;left:24px!important;right:auto!important;top:auto!important}
body.playing .table-stage .opponent-hand[data-corner=bottom-right]{bottom:72px!important;right:24px!important;left:auto!important;top:auto!important}
body.playing .table-stage .seat-name{display:flex!important;align-items:center;gap:6px;max-width:calc(50% - 36px);height:32px}
body.playing .table-stage .seat-name[data-corner=top-left]{top:24px!important;left:24px!important;bottom:auto!important;right:auto!important}
body.playing .table-stage .seat-name[data-corner=top-right]{top:24px!important;right:24px!important;bottom:auto!important;left:auto!important}
body.playing .table-stage .seat-name[data-corner=bottom-left]{bottom:24px!important;left:24px!important;top:auto!important;right:auto!important}
body.playing .table-stage .seat-name[data-corner=bottom-right]{bottom:24px!important;right:24px!important;top:auto!important;left:auto!important}
.seat-name[data-corner$=right]{flex-direction:row-reverse}
.player-info-bubble{height:32px;flex:none;white-space:nowrap}
.player-info-bubble>.pixel-content{gap:7px;padding:0 5px 0 6px;min-width:0}
.player-info-text{display:block;padding:3px 0 7px;overflow:hidden;text-overflow:ellipsis}
.player-info-name{min-width:0;flex:0 1 auto}.player-info-name>.pixel-content{min-width:0}
.base-indicator{display:flex;gap:3px;align-items:center;flex:none;pointer-events:none}
.team-badge{display:flex;align-items:center;justify-content:center;width:20px;height:20px;flex:none;color:inherit;cursor:help}
.team-badge svg{display:block;width:20px;height:20px;pointer-events:none}
.player-info-bubble img{display:block;width:20px;height:20px;flex:none;max-width:none;pointer-events:none;user-select:none}
.table-change-card{color:#e8dac7}.center-primary,.exchange-change-button{color:#191212}
.center-primary>.pixel-content{gap:7px;padding:0 5px 0 6px}
.center-primary img{display:block;flex:none;max-width:none}
.exchange-first-player{display:block;margin-top:2px}
.trade-slots{position:absolute;inset:0;pointer-events:none}
.trade-slot{position:absolute;width:18.924303%;height:18.924303%;pointer-events:auto;z-index:5}
.trade-slot[data-corner$=left]{left:16.932271%}.trade-slot[data-corner$=right]{left:64.143426%}
.trade-slot[data-corner^=top]{top:16.932271%}.trade-slot[data-corner^=bottom]{top:64.143426%}
.trade-slot[data-corner=top-left]{--trade-angle:135deg}.trade-slot[data-corner=top-right]{--trade-angle:-135deg}
.trade-slot[data-corner=bottom-left]{--trade-angle:45deg}.trade-slot[data-corner=bottom-right]{--trade-angle:-45deg}
.trade-card{position:absolute;top:50%;left:50%;width:108px;height:163px;transform:translate(-50%,-50%) rotate(var(--trade-angle)) scale(var(--trade-scale-x,1),var(--trade-scale-y,1)) scale(var(--ui-scale));pointer-events:none}
.trade-card>img{display:block;width:108px;height:163px;max-width:none;user-select:none}
.trade-slot[role=button]{cursor:pointer}.trade-slot:focus-visible{outline:1px solid #e8dac7;outline-offset:4px}
.exchange-change{position:absolute;left:50%;top:65.537849%;transform:translateX(-50%);pointer-events:auto;z-index:7}
.exchange-change-button{min-height:42px}.exchange-change-button>.pixel-content{padding:8px 8px 12px 10px}
.compact-controls .current-turn-label{font-size:14px!important;white-space:normal!important;text-align:center;max-width:calc(var(--field-size) - 70px)!important}
@media(max-width:1200px){.player-info-bubble{font-size:14px}.player-info-bubble>.pixel-content{gap:5px;padding-left:4px;padding-right:4px}.base-indicator{gap:1px}}

/* Piles follow board scale; hand cards keep their independent desktop size. */
body.playing .table-stage .board-wrap{--card-w:calc(108px * var(--ui-scale));--card-h:calc(163px * var(--ui-scale))}


/* State fills stay inside the four native corners. */
.pixel-button:not(:disabled):is(:hover,:focus-visible)>.pixel-default{display:none}
.pixel-button:not(:disabled):is(:hover,:focus-visible)>.pixel-hover{display:block}
.center-primary,.exchange-change-button{transition:transform 120ms ease-out}
.center-primary:not(:disabled):is(:hover,:focus-visible),.exchange-change-button:not(:disabled):is(:hover,:focus-visible){transform:translateY(-3px)}
@media(prefers-reduced-motion:reduce){.center-primary,.exchange-change-button{transition:none}}


.my-turn-announcement{position:fixed;transform:translateX(-50%);z-index:20;pointer-events:none;color:#e8dac7;font-family:var(--font-ui);font-weight:500;line-height:normal;text-align:center;text-transform:uppercase;white-space:nowrap}
.my-turn-announcement[hidden]{display:none}
.hand-turn-badge{position:absolute;left:0;bottom:calc(100% + 16px);height:32px;color:#191212;pointer-events:none;white-space:nowrap}
.hand-turn-badge>.pixel-content{padding:3px 5px 7px 6px}
.hand-panel[data-hand-side=right] .hand-turn-badge{left:auto;right:0}

.capture-ghost{pointer-events:none;transform-origin:0 0}

/* Design states: Piles 372×175, 24px between the new 108×163 cards. */
body.playing .table-stage .table-piles{position:absolute;left:50%;top:calc(50% - 10px * var(--ui-scale));transform:translate(-50%,-50%);display:flex;align-items:center;gap:calc(24px * var(--ui-scale));height:calc(var(--card-h) + 12px * var(--ui-scale));pointer-events:none;z-index:5}
body.playing .table-stage .table-piles>:is(.center-pile,.deck-pile,.discard-table-pile){position:relative;top:auto;left:auto;transform:none;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;width:var(--card-w);height:calc(var(--card-h) + 12px * var(--ui-scale));flex:none;pointer-events:auto}
body.playing .table-stage .table-piles .empty-card-space{position:relative;flex:none;display:block;width:var(--card-w);height:calc(var(--card-h) + 12px * var(--ui-scale));overflow:visible}
.empty-pile-art{position:absolute;left:50%;bottom:0;display:block;width:106px;height:161px;max-width:none;transform:translateX(-50%) scale(var(--ui-scale));transform-origin:center bottom}
.trade-card.trade-empty{width:106px;height:161px}
.trade-card.trade-empty>img{width:106px;height:161px}

/* Game / My Turn: exactly one badge follows the active hand in the viewer's POV. */
.table-stage>.active-player-badge{left:24px;right:auto;top:auto;bottom:calc(var(--card-h) + 88px);z-index:10}
.table-stage>.active-player-badge[data-corner$=right]{left:auto;right:24px}
.table-stage>.active-player-badge[data-corner^=top]{top:calc(var(--card-h) + 88px);bottom:auto}
.chip-highlighted{display:none}
.marble-node.highlighted-marble:not(.hovered-marble):not(.selected-marble):not(.dragged-piece):not(.swap-selected-marble):not(:focus-visible) .chip-normal{display:none}
.marble-node.highlighted-marble:not(.hovered-marble):not(.selected-marble):not(.dragged-piece):not(.swap-selected-marble):not(:focus-visible) .chip-highlighted{display:block}

/* Figma Design / In-game Menu Modal, 113:299332. A native modal keeps the board inert. */
#game-menu-dialog{box-sizing:border-box;width:480px;max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);margin:auto;padding:0;border:0;border-radius:0;background:transparent;color:#e8dac7;box-shadow:none;overflow:visible;overscroll-behavior:contain;font-family:var(--font-ui)}
#game-menu-dialog::backdrop{background:rgba(0,0,0,.3);backdrop-filter:none}
#game-menu-dialog h2{margin:0;padding:14px 23px;font:600 24px/30px var(--font-ui);letter-spacing:0;text-transform:uppercase;text-align:left}
.game-menu-list{display:flex;flex-direction:column;align-items:stretch;gap:20px;padding:24px;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
.game-menu-list::-webkit-scrollbar{display:none}
.game-menu-list hr{width:100%;height:1px;margin:0;border:0;background:#322525;flex:none}
.game-menu-toggle{display:flex;align-items:center;gap:8px;cursor:pointer}
.game-menu-check{position:relative;display:block;flex:none;width:20px;height:20px}
.game-menu-option{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}
.game-menu-option strong{font:600 18px/20px var(--font-ui)}
.game-menu-option>span{color:#aa9898;font:500 16px/19px var(--font-ui);overflow-wrap:break-word}
#game-menu-dialog .game-menu-action{display:block;width:100%;min-height:20px;margin:0;padding:0;border:0;border-radius:0;background:none;color:#e8dac7;text-align:left;font:600 18px/20px var(--font-ui);letter-spacing:0}
#game-menu-dialog .game-menu-surrender{color:#ef5454}
#game-menu-dialog .game-menu-action:hover:not(:disabled){color:#fff3e1}
#game-menu-dialog .game-menu-surrender:hover:not(:disabled){color:#ff8282}
#game-menu-dialog :focus-visible{outline:2px solid #e8dac7;outline-offset:4px}
#game-menu-dialog .modal-close:focus-visible{outline-offset:-5px}
