/* Portrait remains in styles.css; table layout uses one real landscape viewport. */
.seat-avatar,.seat-display-name{display:none}
/* Keep the action slots reserved when it is another player's turn. */
.table-active .play-controls #hint[hidden],.table-active .play-controls #pass[hidden],.table-active .play-controls #play[hidden]{display:block!important;visibility:hidden;pointer-events:none}
.table-active .play-controls .submit-slot{display:grid}
.table-active .play-controls .submit-slot>button{grid-area:1/1}
@media (orientation:landscape) {
 html:has(body.table-active),body.table-active{height:var(--gd-viewport-height,100dvh);width:100%;overflow:hidden;overscroll-behavior:none;background:#10484d;color:#f8faf7}
 body.table-active{--hand-card-height:96px;--pile-step:clamp(16px,calc((var(--gd-viewport-height,100dvh) - var(--inset-top) - var(--inset-bottom) - var(--hand-card-height) - 104px)/9),21px);--hand-height:calc(var(--hand-card-height) + 3 * var(--pile-step) + 20px);--control-width:244px;--control-gap:6px;--public-width:min(104px,calc((var(--gd-viewport-width,100vw) - var(--inset-left) - var(--inset-right) - 168px)/4));--action-height:46px;--top-height:44px;--inset-left:max(8px,env(safe-area-inset-left));--inset-right:max(8px,env(safe-area-inset-right));--inset-top:env(safe-area-inset-top);--inset-bottom:max(3px,env(safe-area-inset-bottom));}
 body.table-active>.masthead,.table-active .room-bar,.table-active #practice-start-tools,.table-active #start-panel{display:none!important}
 .table-active main{position:fixed;inset:0;max-width:none;width:100%;height:100%;margin:0;padding:var(--inset-top) var(--inset-right) var(--inset-bottom) var(--inset-left);}
 .table-active #table-screen,.table-active .game-table{position:relative;display:block;height:100%;width:100%;min-height:0}
 .table-active .score-strip{position:absolute;left:0;right:0;top:0;height:var(--top-height);min-height:0;display:grid;grid-template-columns:44px 1fr 1.3fr 1fr 52px;gap:8px;margin:0;padding:0;background:#0a363ab3;border:0;border-radius:0 0 16px 16px;color:white;z-index:3}
 .table-active .table-navigation{display:block;min-width:44px;min-height:44px;padding:4px;color:white;font-size:12px}.table-active #table-back{font-size:28px}
 .table-active .team-score{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:8px;text-align:center;padding:0}
 .table-active .team-score small{font-size:11px;white-space:nowrap}.table-active .team-score small::first-letter{font-size:inherit}.table-active .team-score strong{font-size:22px;line-height:1}.table-active .team-score>span{display:none}
 .table-active .round-meta{display:flex;justify-content:center;align-items:center;gap:12px;min-width:0}.table-active .round-meta>span{font-size:11px}.table-active .round-meta>b{font-size:17px;white-space:nowrap}.table-active .round-meta>small{display:none}
 .table-active .felt-table{position:absolute;left:0;right:0;top:var(--top-height);bottom:calc(var(--hand-height) + var(--action-height));width:100%;height:auto;min-height:0;margin:0;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 30%,#247b6d,#10484d 90%);box-shadow:none;overflow:visible}
 .table-active .felt-table::after{inset:4px 65px;border-radius:65px;border-color:#b3d5b91c}
 .table-active .seat{width:92px;max-width:24%;padding:5px;background:#0c3c40b3;border:1px solid #80ac9d4f;border-radius:10px;font-size:12px;z-index:2}
 .table-active .seat-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.4;font-size:12px}
 .table-active .seat-sub{font-size:10px;line-height:1.3;margin:1px 0}.table-active .seat.pos-1{right:0;top:50%;transform:translateY(-50%)}.table-active .seat.pos-3{left:0;top:50%;transform:translateY(-50%)}
 .table-active .seat.pos-2{top:3px;left:50%;transform:translateX(-50%);width:140px;display:grid;grid-template-columns:1fr auto;column-gap:8px}.table-active .seat.pos-2 .seat-name{grid-column:1/-1}
 .table-active .seat.pos-0{bottom:0;width:130px;left:50%;transform:translateX(-50%)}.table-active.playing-table .seat.pos-0{visibility:hidden}
 .table-active .seat button{min-height:44px;min-width:44px;padding:4px 6px;font-size:11px;width:100%;margin:2px 0 0}.table-active .seat.pos-2 button{grid-column:1/-1}
 .table-active .table-center{position:absolute;left:50%;top:auto;bottom:0;transform:translateX(-50%);width:calc(100% - 200px);padding:0;text-align:center;z-index:0}
 .table-active #phase-label,.table-active #turn-detail,.table-active #public-pattern{display:none}.table-active #turn-title{font-size:13px;line-height:20px;margin:0;font-weight:600;color:#d6e9dc}
 .table-active .felt-table[data-phase="waiting"] .table-center{top:calc(100% + 20px);bottom:auto;transform:translate(-50%,-50%)}.table-active .felt-table[data-phase="waiting"] #turn-detail{display:none;font-size:12px;line-height:1.5;max-height:none;overflow:visible;margin:6px 0}
 .table-active .trick-play{max-width:170px}.table-active .trick-owner{display:none}.table-active .trick-play:not(.seat-latest){visibility:hidden}.table-active .trick-play.seat-latest{opacity:1;filter:none}
 .table-active .trick-play.trick-pos-0{left:50%;bottom:0;top:auto;transform:translateX(-50%)}.table-active .trick-play.trick-pos-2{left:calc(50% + 200px);top:3px;bottom:auto;transform:translateX(-50%)}
 .table-active .trick-play.trick-pos-1{right:100px;left:auto;top:45%;transform:none}.table-active .trick-play.trick-pos-3{left:100px;right:auto;top:45%;transform:none}
 .table-active .public-cards .card{height:42px;min-height:42px;width:30px;margin-left:-15px;padding:3px;font-size:18px;border-radius:4px}.table-active .public-cards .card:first-child{margin-left:0}
 .table-active .trick-pass-marker.trick-pos-0{left:calc(50% + 55px);bottom:24px;top:auto}.table-active .trick-pass-marker.trick-pos-2{left:calc(50% + 80px);top:20px}.table-active .trick-pass-marker.trick-pos-1{right:100px;top:42%}.table-active .trick-pass-marker.trick-pos-3{left:100px;top:42%}
 .table-active .hand-panel{position:absolute;left:0;right:0;bottom:0;width:100%;height:calc(var(--hand-height) + var(--action-height));min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
 .table-active .hand{position:absolute;top:calc(var(--action-height) + 7px);left:0;right:104px;bottom:0;display:flex;flex-direction:row;align-items:flex-end;justify-content:center;gap:3px;padding:0;margin:0;height:auto;overflow:visible;touch-action:none}
 .table-active .hand-column{flex:1 1 0;max-width:58px;min-width:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;position:relative;padding:0 0 6px;height:100%;min-height:0}
 .table-active .hand-column-label{position:absolute;top:0;left:0;right:0;text-align:center;font-size:9px;line-height:16px;color:#dceadf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
 .table-active .hand-column .card{position:relative;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0;flex-shrink:0;width:100%;height:66px;min-height:66px;margin:0;padding:1px 2px;background:#f8faf7;border:1px solid #cad7cc;border-radius:5px;color:#172e32;font:23px/1 Georgia,serif;box-shadow:0 2px 3px #082e3e40;text-align:left;touch-action:none}
 .table-active .hand-column .card+.card{margin-top:-45px}.table-active .hand-column .card>span:nth-child(2){font-size:17px;line-height:20px;margin:0}.table-active .hand-column .card.red{color:#b73549}
 .table-active .hand-column .card[aria-pressed=true]{transform:translateY(-7px);border-color:#e6bb62;box-shadow:0 0 0 2px #e6bb62b3,0 3px 5px #092d35;z-index:auto}
 .table-active .hand-column .card::before{display:none}.table-active .hand-column .card.wild::after,.table-active .hand-column .card .level-badge{font:700 9px/1 sans-serif;left:3px;bottom:4px;top:auto;right:auto;transform:none;padding:2px;margin:0;color:#735621;background:#f5ddb2;border-radius:3px}
 .table-active .hand-column .card.grouped{border-color:#d9bb70}.table-active .hand-column .card.joker .card-rank{font-size:12px;line-height:18px}
 .table-active .play-controls{position:absolute;top:0;left:50%;width:294px;transform:translateX(-50%);height:44px;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0;overflow:visible}
 .table-active .play-controls #sort{position:absolute;left:calc(50% + (var(--gd-viewport-width,100vw) - var(--inset-left) - var(--inset-right))/2 - 98px);top:calc(var(--action-height) + 73px);width:94px;height:44px;border-color:#f0d498;background:#e6bb62;color:#273e36}
 .table-active .play-controls #hint{grid-column:1}.table-active .play-controls #pass{grid-column:2}.table-active .play-controls .submit-slot{grid-column:3}
 .table-active .play-controls button,.table-active .play-controls .submit-slot>button{min-height:44px;height:44px;min-width:44px;margin:0;padding:6px;font-size:15px;border-radius:10px;background:#e2eae0;color:#214844;border-color:#a3bbae}
 .table-active .play-controls .submit-slot>.primary{background:#e6bb62;border-color:#f0d498;color:#263f36;font-weight:750}
 .table-active .hand-heading{position:absolute;right:0;top:calc(var(--action-height) + 9px);width:98px;height:50px;min-height:0;margin:0;display:block;text-align:center}.table-active .hand-heading h2{font-size:11px;line-height:15px;margin:0;color:#dceadc}.table-active .hand-heading h2 small{display:inline;margin-left:4px}
 .table-active #sort-shape{display:none!important}.table-active .hand-heading .hand-tools{position:absolute;right:0;top:24px;width:98px;height:44px;display:flex;justify-content:center;gap:0}
 .table-active .hand-tools button{min-height:44px;min-width:44px;margin:0;padding:4px;color:#dceadc;font-size:11px}.table-active #clear-selection{display:none!important}.table-active #group,.table-active #ungroup{position:absolute;right:0;top:92px;width:94px}
 .table-active .interpretation{position:absolute;left:0;right:0;top:-22px;height:22px;min-height:0;margin:0;overflow:visible;color:#eff4de;text-align:center;font-size:11px;line-height:20px;white-space:nowrap}
 .table-active #pattern-label{position:absolute;top:-47px;right:0;z-index:4;display:flex;align-items:center;gap:6px;margin:0;font-size:11px;background:#10484d;padding:0 4px;border-radius:6px}.table-active #pattern-choice{min-height:44px;height:44px;width:180px;padding:3px;font-size:11px;margin:0}
 .table-active #notice,.table-active #practice-message{position:fixed;left:calc(var(--inset-left) + 100px);right:calc(var(--inset-right) + 100px);top:auto;bottom:calc(var(--hand-height) + var(--action-height) + var(--inset-bottom));max-width:none;min-height:20px;height:auto;max-height:40px;padding:1px 5px;margin:0;border:0;border-radius:4px;background:#10484ded;box-shadow:none;color:#f1ddb4;text-align:center;font-size:11px;line-height:18px;z-index:6;pointer-events:none}
 .table-active #waiting-controls,.table-active #practice-next{position:absolute;left:0;right:0;bottom:14px;display:flex;justify-content:center;align-items:center;gap:12px;padding:0;margin:0;z-index:3}
 .table-active #waiting-controls button,.table-active #practice-next button{min-height:44px;min-width:100px;font-size:14px;padding:6px 12px}.table-active #configure-label{width:160px;font-size:11px;margin:0}.table-active #room-round-limit{min-height:44px;padding:4px;font-size:12px;margin:0}
 .table-active #practice-end-note{position:absolute;left:0;right:0;bottom:65px;text-align:center;font-size:12px}.table-active #practice-save-panel,.table-active #vote-panel,.table-active #swap-panel{position:absolute;left:20%;right:20%;top:var(--top-height);z-index:5;margin:0;padding:10px;background:#f8faf7;color:#142d4c;max-height:calc(100% - 70px)}
 .table-active .felt-table>.table-result{position:absolute;inset:8px 100px 0;height:auto;max-height:none;min-height:0;transform:none;overflow:visible;border:0;border-radius:12px;padding:10px 16px;background:#edf4ea;color:#214844;z-index:4;text-align:center}
 .table-active.result-table .felt-table>.table-result{bottom:auto;height:calc(var(--gd-viewport-height,100dvh) - var(--top-height) - var(--inset-top) - var(--inset-bottom) - 82px)}.table-active.result-table .hand-panel{display:none!important}.table-active.result-table .table-center{display:none}
 .table-active .table-result .record-mode{display:none}.table-active .table-result h2{font-size:18px;margin:0 0 6px}.table-active .table-result h3{font-size:16px;margin:0 0 7px}.table-active .table-result p{font-size:12px;line-height:1.4;margin:5px 0}.table-active .table-result .history-record{border:0;padding:0;margin:0}
 .table-active .overlay{position:fixed;inset:0;margin:0;padding:8px var(--inset-right) 8px var(--inset-left);height:var(--gd-viewport-height,100dvh);max-height:none;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#082e35cf;z-index:80}
 .table-active .overlay>.sheet{width:min(680px,100%);height:100%;max-height:100%;overflow:hidden;padding:48px 18px 52px;margin:0;position:relative;background:#f8faf7;color:#214844;border-radius:14px;}
 .table-active .sheet-close{position:absolute;right:12px;top:2px;min-height:44px;height:44px;margin:0}.table-active .sheet h2{font-size:19px}.table-active .sheet h3{font-size:15px}.table-active .sheet p{font-size:12px;line-height:1.5}.table-active .sheet .more-actions{gap:7px}
 .table-active .paged-content{position:absolute;inset:48px 18px 52px;overflow:hidden}.table-active .panel-pagination{position:absolute;bottom:3px;left:18px;right:18px;height:44px;display:flex;align-items:center;justify-content:center;gap:16px}.table-active .panel-pagination button{height:44px;min-height:44px;padding:5px 15px}.table-active .page-counter{font-size:12px;min-width:50px;text-align:center}
 .table-active .page-hidden{display:none!important}.table-active .page-container{display:contents!important}
 .table-active .table-result .paged-content{inset:10px 12px 48px}.table-active .table-result .panel-pagination{bottom:0}
 .table-active:has(#interpretation:not(:empty)) #turn-title,.table-active:has(#notice:not([hidden])) #turn-title,.table-active:has(#practice-message:not([hidden])) #turn-title{visibility:hidden}
 .table-active.playing-table .table-center{position:fixed;left:var(--inset-left);right:auto;top:auto;bottom:calc(var(--hand-height) + var(--inset-bottom) + 12px);width:calc((var(--gd-viewport-width,100vw) - var(--inset-left) - var(--inset-right) - 310px)/2);transform:none;text-align:center}
 .table-active.playing-table .seat .seat-sub:not(.seat-count){display:none}
 .table-active .interpretation{left:0;right:auto;top:2px;width:calc((100% - 310px)/2);height:44px;white-space:normal;display:flex;align-items:center;justify-content:center;font-size:11px;line-height:16px}
 .table-active #notice,.table-active #practice-message{left:var(--inset-left);right:auto;width:calc((var(--gd-viewport-width,100vw) - var(--inset-left) - var(--inset-right) - 310px)/2);bottom:calc(var(--hand-height) + var(--inset-bottom));min-height:44px;max-height:none;display:flex;align-items:center;justify-content:center;padding:2px}
 .table-active .felt-table[data-phase="waiting"] .seat.pos-1,.table-active .felt-table[data-phase="waiting"] .seat.pos-3{top:0;transform:none}
}
.panel-pagination{display:none}
@media (orientation:landscape) and (max-width:700px){
 .table-active .score-strip{gap:3px}.table-active .team-score{gap:4px}.table-active .team-score small{font-size:10px}.table-active .team-score strong{font-size:18px}.table-active .round-meta{gap:5px}.table-active .round-meta>span{font-size:10px}.table-active .round-meta>b{font-size:15px}
 .table-active .hand{gap:2px}.table-active .hand-column .card{font-size:18px;padding:2px 1px}.table-active .hand-column .card>span:nth-child(2){font-size:11px;line-height:17px}.table-active .hand-column-label{font-size:8px}
 .table-active .seat{width:80px}.table-active .seat.pos-2{width:120px}.table-active .trick-play.trick-pos-1{right:86px}.table-active .trick-play.trick-pos-3{left:86px}.table-active .public-cards .card{width:25px;height:34px;min-height:34px;font-size:15px;margin-left:-14px}
 .table-active .trick-play.trick-pos-2{left:calc(50% + 125px)}.table-active .public-cards .card{width:20px;font-size:12px;margin-left:-10px;padding:2px}
}

@media (orientation:landscape){.table-active .felt-table[data-phase="waiting"] .seat.pos-0{bottom:calc(92px - var(--hand-height) - var(--action-height))}}
@media (orientation:landscape) and (max-height:380px){body.table-active{--hand-card-height:82px}.table-active .hand-column .card{height:58px;min-height:58px;font-size:20px}.table-active .hand-column .card+.card{margin-top:-38px}}

/* A calm felt table, compact players, and a common baseline for all card piles. */
@media (orientation:landscape){
 html:has(body.table-active),body.table-active{background:#0d3d36}
 .table-active main{background:radial-gradient(ellipse at 50% 30%,#237b61 0%,#155644 65%,#0d3d36 100%)}
 .table-active .game-table::before{content:"";position:absolute;inset:46px 45px 10px;border-radius:48% / 32%;border:1px solid #cfdfb41c;box-shadow:inset 0 0 0 5px #041e2312,0 0 0 8px #d9d0a805;pointer-events:none}
 .table-active .game-table::after{content:"";position:absolute;inset:44px 0 0;background:repeating-linear-gradient(125deg,#fff0 0 3px,#ffffff02 3px 4px);pointer-events:none;z-index:0}
 .table-active .felt-table{background:transparent}
 .table-active .felt-table::after{display:none}
 .table-active .score-strip{background:linear-gradient(90deg,#062f2c85,#0a3e3430 45%,#062f2c85);border-radius:0;border-bottom:1px solid #d5e5cf0d;gap:8px}
 .table-active .score-strip:has(#table-sound:not([hidden])){grid-template-columns:44px 1fr 1.3fr 1fr 44px 44px}
 .table-active #table-sound{font-size:22px;line-height:1;padding:0;color:#e3e8d3}.table-active #table-sound[aria-pressed="false"]{color:#adbdac}
 .table-active .team-score{gap:9px}.table-active .team-score small{color:#c4d6c9;font-weight:500}
 .table-active .team-score strong{font-size:20px;color:#fff6df;font-weight:650}
 .table-active .round-meta{gap:10px}.table-active .round-meta>span{color:#c4d6c9;font-weight:500}.table-active .round-meta>b{background:#faf2d514;border:1px solid #dfd0a82c;border-radius:7px;padding:4px 10px;color:#f2d8a1;font-size:16px}
 .table-active .table-navigation{color:#e8efdf;border-radius:50%;font-weight:500}
 .table-active #table-more{font-size:0}.table-active #table-more::after{content:"•••";font-size:19px;letter-spacing:2px}
 .table-active .seat{width:84px;padding:0;background:transparent;border:0;box-shadow:none}
 .table-active .seat-avatar{display:grid;place-items:center;position:relative;width:38px;height:38px;margin:0 auto 4px;border:1px solid #cfdbca55;border-radius:13px;background:linear-gradient(145deg,#dfebdf,#9cbbaa);color:#25574a;box-shadow:0 3px 8px #052d293d;font-size:17px;font-weight:750}
 .table-active .seat.ai-seat .seat-avatar{font-family:ui-rounded,-apple-system,sans-serif;font-size:14px;letter-spacing:1px}
 .table-active .seat.pos-1 .seat-avatar,.table-active .seat.pos-3 .seat-avatar{background:linear-gradient(145deg,#eddfc9,#cbb7a0);color:#735740;border-color:#e9d9bb66}
 .table-active .seat-role{position:absolute;left:3px;right:3px;bottom:-3px;display:block;border-radius:4px;background:#1d7560;color:#ecf2e4;font-size:8px;font-weight:600;line-height:12px;letter-spacing:0}
 .table-active .seat.pos-1 .seat-role,.table-active .seat.pos-3 .seat-role{background:#746854;color:#fff0d7}
 .table-active .seat.current .seat-avatar{border-color:#f2d5a0;box-shadow:0 0 0 2px #f2d5a044,0 0 15px #f2d5a033}
 .table-active .seat-name{font-size:0;line-height:0;margin:0;white-space:nowrap;overflow:hidden}
 .table-active .seat-display-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;font-weight:550;color:#eef3e7}
 .table-active .seat-count{color:#d9e4cf;font-size:10px;line-height:15px;margin:0}
 .table-active .seat.pos-2{width:144px;display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:0 9px;text-align:left;top:5px}
 .table-active .seat.pos-2 .seat-avatar{grid-column:1;grid-row:1/3;margin:0;width:32px;height:32px}
 .table-active .seat.pos-2 .seat-name{grid-column:2;grid-row:1}.table-active .seat.pos-2 .seat-count{grid-column:2;grid-row:2}
 .table-active .seat.pos-2 .seat-sub:not(.seat-count){display:none}
 .table-active .seat.pos-2 button{grid-column:1/-1}
 .table-active .seat.pos-0{width:144px}.table-active .seat button{background:#e5eee2;color:#245444;border:1px solid #edf2df55;border-radius:10px;font-size:11px}
 .table-active .felt-table[data-phase="waiting"] .seat-sub:not(.seat-count){display:none}
 .table-active .felt-table[data-phase="waiting"] .seat.pos-0{display:grid;grid-template-columns:38px 1fr;align-items:center;column-gap:9px;text-align:left}
 .table-active .felt-table[data-phase="waiting"] .seat.pos-0 .seat-avatar{grid-row:1/3;margin:0}.table-active .felt-table[data-phase="waiting"] .seat.pos-0 .seat-count{grid-column:2}
 .table-active .hand-panel{z-index:2}
 .table-active .hand-column .card{height:var(--hand-card-height);min-height:var(--hand-card-height)}
 .table-active .hand-column .card+.card{margin-top:calc(var(--pile-step) - var(--hand-card-height))}
 .table-active .hand-column .card:not(:last-child) .card-rank{font-size:clamp(8px,calc(var(--pile-step) + 2px),23px)}
 .table-active .hand-column .card:not(:last-child) .card-suit{font-size:clamp(7px,calc(var(--pile-step) - 2px),17px);line-height:1}
 .table-active .hand-column .card{background:linear-gradient(105deg,#fffefa,#efefdf);border-color:#d6dacb;border-radius:5px;color:#243c34;box-shadow:0 1px 2px #061d2466,0 4px 8px #071e2026;font-weight:700}
 .table-active .hand-column .card .card-rank{letter-spacing:-.5px}
 .table-active .hand-column .card.red{color:#b92d36}
 .table-active .hand-column .card::before{content:attr(data-symbol);display:block;position:absolute;right:4px;bottom:7px;font-size:32px;line-height:1;opacity:.9;pointer-events:none}
 .table-active .hand-column .card.joker::before{color:#ba8c42;font-size:27px}
 .table-active .hand-column .card.wild{border-color:#dcb567;background:linear-gradient(105deg,#fff7d7,#f5edcc)}
 .table-active .hand-column .card.level-card{border-top-color:#cfa359}
 .table-active .hand-column .card[aria-pressed=true]{border-color:#eaca82;box-shadow:0 0 0 2px #efd39db3,0 5px 8px #06272899;background:#fff9e5}
 .table-active .hand-column-label{top:auto;bottom:6px;left:0;right:0;width:100%;max-width:none;height:44px;min-height:44px;min-width:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;z-index:2;overflow:visible;writing-mode:horizontal-tb;white-space:normal;pointer-events:auto}
 .table-active .group-stamp{position:absolute;left:3px;bottom:5px;line-height:11px;padding:2px 3px;border:1px solid #437c7480;border-radius:3px;font-size:8px;font-weight:600;background:#f5f6e7f5;color:#2b7263;writing-mode:vertical-rl}
 .table-active .hand-column-label[aria-pressed="true"] .group-stamp{background:#f8dfa5;color:#715627;border-color:#c3a26a}
 .table-active .hand-column[data-kind="single"]>.hand-column-label{display:none}
 .table-active .hand-column[data-kind="custom"] .group-stamp{color:#936830;border-color:#b78c5499}
 .table-active .hand-column .card.wild::after,.table-active .hand-column .card .level-badge{bottom:9px;left:3px;background:#edd49b;color:#7c5b22;border:1px solid #cfad6855}
 .table-active .play-controls{gap:9px}
 .table-active .play-controls button,.table-active .play-controls .submit-slot>button{border-radius:23px;background:linear-gradient(#f6f4df,#dfe7cf);border-color:#f2efcf80;color:#28563d;box-shadow:0 3px 0 #062d2c40,0 4px 10px #062d2c25;font-size:15px;font-weight:650}
 .table-active .play-controls .submit-slot>.primary{background:linear-gradient(#f7d68c,#e9ae4e);border-color:#f7dfa2;color:#634017;text-shadow:0 1px 0 #fff2c780}
 .table-active .play-controls button:disabled,.table-active .play-controls .submit-slot>button:disabled{opacity:1;background:#a9bcb136;border-color:#b9c7af26;box-shadow:none;color:#b9cbb58c;text-shadow:none}
 .table-active .play-controls #sort{background:linear-gradient(#f4d794,#e0b063);border-color:#f3dbaa;color:#65471d;top:calc(var(--hand-height) + var(--action-height) - 51px);border-radius:13px;font-size:14px}
 .table-active .hand-heading{top:auto;bottom:57px;height:67px}
 .table-active .hand-heading h2{font-size:10px;color:#c5d7c4;font-weight:500}.table-active .hand-heading h2 small{color:#c5d7c4;font-size:10px}
 .table-active .hand-heading .hand-tools{top:19px}.table-active .hand-tools button{font-size:12px;color:#e5ecd8;border:1px solid #dce7c427;border-radius:11px;background:#08392d30}
 .table-active #group,.table-active #ungroup{top:-29px;background:#133e35;border-color:#dce7c43b}
 .table-active .hand-heading:has(#group:not([hidden])) h2,.table-active .hand-heading:has(#ungroup:not([hidden])) h2{visibility:hidden}
 .table-active #turn-title{display:inline-block;font-size:11px;line-height:20px;font-weight:500;background:#082e2755;border:1px solid #dde8c618;border-radius:20px;padding:3px 9px;color:#e1e9d2}
 .table-active .interpretation{color:#f1ddb0;font-weight:500}
 .table-active #notice,.table-active #practice-message{background:#124f408f;color:#f4dfb7;border-radius:10px;font-size:10px}
 .table-active .felt-table[data-phase="waiting"] #turn-title{font-size:14px;background:transparent;border:0}
 .table-active #waiting-controls button,.table-active #practice-next button{border-radius:22px;background:#e5ecd9;color:#2f5842;border-color:#f0f1d970}
 .table-active #waiting-controls .primary,.table-active #practice-next .primary{background:linear-gradient(#f7d68c,#e9ae4e);border-color:#f7dfa2;color:#634017}
}
@media (orientation:landscape) and (max-width:700px){
 .table-active .seat{width:80px}.table-active .seat.pos-2{width:130px;gap:0 5px}.table-active .seat-avatar{width:32px;height:32px;font-size:15px;border-radius:10px}.table-active .seat.pos-2{grid-template-columns:32px 1fr}.table-active .seat-display-name{font-size:10px}
 .table-active .team-score small{font-size:9px}.table-active .team-score{gap:5px}.table-active .round-meta{gap:5px}.table-active .round-meta>b{padding:4px 6px;font-size:14px}.table-active .team-score strong{font-size:18px}
 .table-active .hand-column .card::before{right:2px;font-size:26px}.table-active .group-stamp{font-size:7px;padding:1px 2px;line-height:10px}
}

/* Whole card columns keep readable, count-independent spacing. Controls have their own area. */
@media (orientation:landscape){
 .table-active.playing-table .score-strip,.table-active.playing-table .score-strip:has(#table-sound:not([hidden])){grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) minmax(0,1.3fr) 44px 44px;gap:var(--control-gap)}
 .table-active.playing-table .score-strip .team-a{grid-column:2}.table-active.playing-table .score-strip .team-b{grid-column:3}.table-active.playing-table .score-strip .round-meta{grid-column:4;grid-row:1}
 .table-active.playing-table .score-strip #table-sound{grid-column:5;grid-row:1}.table-active.playing-table .score-strip #table-more{grid-column:6;grid-row:1}
 .table-active.playing-table .hand-panel{z-index:4}
 .table-active.playing-table .hand{left:64px;right:90px;gap:0;justify-content:flex-start}
 .table-active .hand-column{max-width:72px}
 .table-active .hand-column:last-child{flex:0 0 72px}
 .table-active .hand-column .card{width:72px;max-width:none}
 .table-active .hand-column-label{width:100%;max-width:none}
 /* Reserve the marked center region before fitting intact card columns. */
 body.table-active{--usable-height:calc(var(--gd-viewport-height,100dvh) - var(--inset-top) - var(--inset-bottom));--usable-width:calc(var(--gd-viewport-width,100vw) - var(--inset-left) - var(--inset-right));--hand-card-height:74px;--play-row-top:calc(var(--inset-top) + var(--usable-height) * .46);--play-row-left:calc(var(--inset-left) + (var(--usable-width) - 58px - var(--control-width))/2);--private-top:calc(var(--play-row-top) + 51px);--pile-step:calc((var(--gd-viewport-height,100dvh) - var(--inset-bottom) - 6px - var(--private-top) - var(--hand-card-height))/9);--partner-public-width:min(220px,calc(var(--usable-width) * .28));--side-public-width:min(126px,calc((var(--usable-width) - var(--partner-public-width))/2 - 128px));--partner-public-top:max(41px,calc(var(--usable-height) * .23 - var(--top-height)));--side-public-top:calc(var(--usable-height) * .27 - var(--top-height))}
 .table-active.playing-table .play-controls{position:fixed;left:var(--play-row-left);right:auto;top:var(--play-row-top);width:var(--control-width);height:44px;transform:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--control-gap);z-index:5}
 .table-active.playing-table .play-controls button{font-size:15px;padding:3px}
 .table-active.playing-table .play-controls #sort{position:fixed;left:auto;right:var(--inset-right);top:auto;bottom:calc(var(--inset-bottom) + 6px);width:80px;font-size:13px}
 .table-active.playing-table .hand-heading{position:fixed;right:var(--inset-right);top:auto;bottom:calc(var(--inset-bottom) + 57px);width:80px;height:44px;z-index:5}
 .table-active.playing-table .hand-heading h2{display:none}.table-active.playing-table .hand-heading .hand-tools{inset:0;width:80px;height:44px;display:flex;gap:0}
 .table-active.playing-table .hand-tools button{flex:1;min-width:44px;padding:3px;white-space:normal;line-height:14px}
 .table-active.playing-table #group{position:static;width:80px}.table-active.playing-table #ungroup{display:none!important}.table-active.playing-table #lock{position:fixed;right:var(--inset-right);top:auto;bottom:calc(var(--inset-bottom) + 108px);width:80px;height:44px;background:#d8e5cd;color:#2e583e}
 .table-active.playing-table #restore-sort{position:fixed;right:var(--inset-right);left:auto;top:auto;bottom:calc(var(--inset-bottom) + 159px);width:80px;height:44px;min-height:44px;border-radius:13px;background:#d8e5cd;color:#2e583e;font-size:13px;padding:3px}
 .table-active.playing-table #sort,.table-active.playing-table #group,.table-active.playing-table #lock{width:80px;height:44px;min-height:44px;min-width:80px;border-radius:13px;padding:3px;font-size:13px;line-height:16px;box-sizing:border-box;white-space:nowrap}
 .table-active.playing-table .seat.pos-1,.table-active.playing-table .seat.pos-3{top:49px;width:54px;max-width:none;height:68px;transform:none;display:block;text-align:center}
 .table-active.playing-table .seat.pos-1{right:58px}
 .table-active.playing-table .seat.pos-1 .seat-avatar,.table-active.playing-table .seat.pos-3 .seat-avatar{width:32px;height:32px;margin:0 auto 4px;border-radius:10px;font-size:14px}
 .table-active.playing-table .seat-display-name{font-size:10px;line-height:16px}.table-active.playing-table .seat-count{font-size:9px;line-height:14px}
 .table-active.playing-table .seat.pos-2{top:3px;width:144px;max-width:none;height:34px;grid-template-columns:32px minmax(0,1fr);transform:translateX(-50%)}
 /* Four player lanes stay beside their seats. Own cards and actions
    alternate within exactly the same central region. */
 .table-active.playing-table .trick-play.seat-latest{position:absolute;top:var(--side-public-top);bottom:auto;width:var(--side-public-width);max-width:var(--side-public-width);--public-width:var(--side-public-width);transform:none}
 .table-active.playing-table .trick-play.trick-pos-3{left:62px;right:auto}
 .table-active.playing-table .trick-play.trick-pos-1{left:auto;right:120px}
 .table-active.playing-table .trick-play.trick-pos-2{left:calc(50% - var(--partner-public-width)/2);right:auto;top:var(--partner-public-top);width:var(--partner-public-width);max-width:var(--partner-public-width);--public-width:var(--partner-public-width)}
 .table-active.playing-table .trick-play.trick-pos-0{left:calc(var(--play-row-left) - var(--inset-left));right:auto;top:calc(var(--play-row-top) - var(--inset-top) - var(--top-height) + 6px);width:var(--control-width);max-width:var(--control-width);--public-width:calc(var(--control-width) - 54px);padding-right:54px;box-sizing:border-box}
 .table-active.playing-table .trick-pass-marker{position:absolute;top:calc(var(--side-public-top) + 33px);bottom:auto;font-size:9px;line-height:12px;padding:1px 5px;transform:none}
 .table-active.playing-table .trick-pass-marker.trick-pos-3{left:62px;right:auto}.table-active.playing-table .trick-pass-marker.trick-pos-1{left:auto;right:120px}
 .table-active.playing-table .trick-pass-marker.trick-pos-2{left:calc(50% - 24px);right:auto;top:calc(var(--partner-public-top) + 33px)}
 .table-active.playing-table .trick-pass-marker.trick-pos-0{left:calc(var(--play-row-left) - var(--inset-left) + var(--control-width) - 48px);right:auto;top:calc(var(--play-row-top) - var(--inset-top) - var(--top-height) + 14px)}
 .table-active.playing-table[data-own-actions="true"] #trick-layer .trick-play.trick-pos-0,.table-active.playing-table[data-own-actions="true"] #trick-layer .trick-pass-marker.trick-pos-0{visibility:hidden;pointer-events:none}
 .table-active.playing-table .felt-table[data-phase="playing"] .table-center,.table-active.playing-table .felt-table[data-phase="tribute"] .table-center{display:none}
 /* Match the reference for common short columns; longer intact groups fit below actions. */
 .table-active .hand-column{container-type:inline-size;max-width:56px;--rank-font:24px;--suit-font:18px;--pile-step:max(1px,min(28px,calc((var(--gd-viewport-height,100dvh) - var(--inset-bottom) - 6px - var(--private-top) - var(--hand-card-height))/var(--pile-gap-count,3))))}
 .table-active .hand-column:last-child{flex:0 0 56px}
 .table-active .hand-column .card{width:56px;padding:0 1px;justify-content:flex-start;gap:1px}
 .table-active .hand-column[data-density=medium]{--hand-card-height:52px;--rank-font:18px;--suit-font:14px}
 .table-active .hand-column[data-compact=true]{--hand-card-height:28px;--rank-font:min(18px,var(--pile-step));--suit-font:min(14px,calc(var(--pile-step) - 1px))}
 .table-active .hand-column .card .card-rank,.table-active .hand-column .card:not(:last-child) .card-rank,.table-active .hand-column .card.ten .card-rank,.table-active .hand-column .card.ten:not(:last-child) .card-rank{font-family:Arial,sans-serif;font-size:min(var(--rank-font),calc(100cqw * .46),var(--pile-step));line-height:var(--pile-step);letter-spacing:0;transform:translateY(-.5px)}
 .table-active .hand-column .card>span.card-suit,.table-active.playing-table .hand-column .card:not(:last-child)>span.card-suit{font-family:Georgia,serif;font-size:min(var(--suit-font),calc(100cqw * .34),var(--pile-step));line-height:var(--pile-step);margin:0;transform:translateY(-.5px)}
 .table-active .hand-column .card.joker .card-rank{font-size:min(11px,calc(100cqw * .30),var(--pile-step));line-height:var(--pile-step);writing-mode:horizontal-tb;white-space:nowrap}
 .table-active .hand-column .card[aria-pressed=true]{transform:none;border-color:#d9ac4f;box-shadow:inset 0 0 0 1px #d9ac4f;background:#fff1ce}
 .table-active .hand-column .card::before{font-size:min(38px,calc(100cqw - 3px));left:0;right:auto;width:100cqw;text-align:center;bottom:5px}
 .table-active .hand-column[data-density=medium] .card::before{font-size:min(27px,calc(100cqw - 3px))}
 .table-active .hand-column[data-compact=true] .card::before{display:none}
 .table-active .group-stamp{display:none}
 .table-active .hand-column[data-kind=custom]:not([data-compact=true]) .group-stamp{display:block;writing-mode:horizontal-tb;font-size:7px;line-height:8px;padding:1px 2px;bottom:2px;left:2px}
 .table-active .hand-column .card.wild::after,.table-active .hand-column .card .level-badge{font-size:7px;bottom:3px;left:2px;padding:1px}

}
@media (orientation:landscape) and (max-width:700px){body.table-active{--control-width:166px;--control-gap:4px}.table-active.playing-table .round-meta>span{display:none}.table-active.playing-table .play-controls button{font-size:13px}}
@media (orientation:landscape) and (max-height:340px){body.table-active{--hand-card-height:62px}.table-active .hand-column{max-width:48px;--rank-font:20px;--suit-font:16px}.table-active .hand-column:last-child{flex-basis:48px}.table-active .hand-column .card{width:48px}.table-active .hand-column[data-density=medium]{--hand-card-height:44px;--rank-font:16px;--suit-font:12px}.table-active .hand-column[data-compact=true]{--hand-card-height:20px}.table-active .hand-column .card::before{font-size:min(30px,calc(100cqw - 3px))}.table-active .hand-column[data-density=medium] .card::before{font-size:min(23px,calc(100cqw - 3px))}}
/* Played cards are larger than the private candidates. The upper partner
   avatar sits beside its cards; fixed side lanes use two overlapping rows. */
@media (orientation:landscape){
 body.table-active{--played-width:62px;--played-height:80px;--played-side-width:152px;--played-side-row-step:44px;--played-center-width:220px;--played-own-width:220px;--played-side-left:34px;--played-side-right:34px;--played-side-top:min(var(--side-public-top),calc(var(--play-row-top) - var(--inset-top) - var(--top-height) + 39px - var(--played-height) - var(--played-side-row-step)))}
 .table-active.playing-table .seat.pos-1,.table-active.playing-table .seat.pos-3{width:32px;height:68px}
 .table-active.playing-table .seat.pos-1{right:0}
 .table-active.playing-table .seat.pos-2{left:calc(50% + var(--played-center-width)/2 + 8px);width:144px;height:32px;transform:none;top:2px}
 .table-active.playing-table .trick-play.seat-latest{top:var(--played-side-top);width:var(--played-side-width);max-width:var(--played-side-width);height:calc(var(--played-height) + var(--played-side-row-step));--public-width:var(--played-side-width)}
 .table-active.playing-table .trick-play.trick-pos-3{left:var(--played-side-left)}
 .table-active.playing-table .trick-play.trick-pos-1{right:var(--played-side-right)}
 .table-active.playing-table .trick-play.trick-pos-2{left:calc(50% - var(--played-center-width)/2);top:2px;width:var(--played-center-width);max-width:var(--played-center-width);height:var(--played-height);--public-width:var(--played-center-width)}
 .table-active.playing-table .trick-play.trick-pos-0{left:calc(var(--play-row-left) - var(--inset-left) + var(--control-width)/2 - var(--played-own-width)/2);top:calc(var(--play-row-top) - var(--inset-top) - var(--top-height) + 44px - var(--played-height));width:var(--played-own-width);max-width:var(--played-own-width);height:var(--played-height);--public-width:var(--played-own-width);padding:0}
 .table-active .public-cards{--played-step:min(28px,calc((var(--public-width) - var(--played-width))/max(1,var(--public-count) - 1)));display:flex;align-items:flex-start;justify-content:center;flex-wrap:nowrap;height:var(--played-height)}
 .table-active .trick-pos-1 .public-cards,.table-active .trick-pos-3 .public-cards{--played-step:min(28px,calc((var(--public-width) - var(--played-width))/max(1,min(5,var(--public-count)) - 1)));display:grid;justify-self:start;align-self:start;width:var(--public-width);grid-template-columns:repeat(4,var(--played-step)) var(--played-width);grid-template-rows:var(--played-side-row-step) var(--played-height);justify-content:start;height:100%;}
 .table-active .public-cards .card{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;width:var(--played-width);height:var(--played-height);min-height:var(--played-height);padding:1px;gap:1px;margin:0;border-radius:5px;font-size:min(24px,calc((var(--played-step) - 2px) * 1.25));line-height:1;font-family:Arial,sans-serif;letter-spacing:0;box-sizing:border-box}
 .table-active .public-cards .card+.card{margin-left:calc(var(--played-step) - var(--played-width))}
 .table-active .trick-pos-1 .public-cards .card+.card,.table-active .trick-pos-3 .public-cards .card+.card{margin:0}
 .table-active .public-cards .card.ten{font-size:min(24px,calc((var(--played-step) - 2px) * .86))}
 .table-active .public-cards .card-rank{font-size:inherit;line-height:1.05;margin:0;letter-spacing:0}
 .table-active .public-cards .card-suit{font-family:Georgia,serif;font-size:min(17px,calc(var(--played-step) - 3px));line-height:1.05;margin:0}
 .table-active .public-cards .card.joker .card-rank{writing-mode:vertical-rl;text-orientation:upright;font-size:min(14px,calc(var(--played-step) - 3px));line-height:1;width:1em;letter-spacing:0}
 .table-active.playing-table .trick-pass-marker.trick-pos-3{left:var(--played-side-left);top:calc(var(--played-side-top) + var(--played-height) + var(--played-side-row-step) - 16px)}
 .table-active.playing-table .trick-pass-marker.trick-pos-1{right:var(--played-side-right);top:calc(var(--played-side-top) + var(--played-height) + var(--played-side-row-step) - 16px)}
 .table-active.playing-table .trick-pass-marker.trick-pos-2{left:calc(50% + var(--played-center-width)/2 - 36px);top:calc(5px + var(--played-height) - 16px)}
 .table-active.playing-table .trick-pass-marker.trick-pos-0{left:calc(var(--play-row-left) - var(--inset-left) + var(--control-width)/2 + var(--played-own-width)/2 - 36px);top:calc(var(--play-row-top) - var(--inset-top) - var(--top-height) + 28px)}
}
@media (orientation:landscape) and (max-height:340px){body.table-active{--played-width:52px;--played-height:68px;--played-side-width:124px;--played-side-row-step:40px;--played-center-width:194px;--played-own-width:178px;--played-side-left:34px;--played-side-right:34px}.table-active.playing-table .seat.pos-2{width:140px;height:28px;grid-template-columns:28px minmax(0,1fr)}.table-active.playing-table .seat.pos-2 .seat-avatar{width:28px;height:28px}.table-active.playing-table .seat.pos-2 .seat-display-name{line-height:14px}.table-active.playing-table .seat.pos-2 .seat-count{line-height:12px}}

/* The empty left hand margin keeps undo clear of enlarged public cards. */
@media (orientation:landscape){.table-active.playing-table #restore-sort{left:var(--inset-left);right:auto;bottom:calc(var(--inset-bottom) + 6px);width:56px}}

/* Optional precise selection: big separate targets, one screen per page. */
.gd-picker-overlay{position:fixed;inset:0;z-index:80;padding:max(12px,var(--inset-top,env(safe-area-inset-top))) max(12px,var(--inset-right,env(safe-area-inset-right))) max(12px,var(--inset-bottom,env(safe-area-inset-bottom))) max(12px,var(--inset-left,env(safe-area-inset-left)));display:grid;place-items:center;background:#062f2ccb;touch-action:none;overscroll-behavior:none}
.gd-picker-sheet{width:min(640px,100%);padding:12px;display:grid;grid-template-rows:44px auto 44px;gap:8px;background:#194f40;border:1px solid #c2d3b84f;border-radius:18px;color:#eef1dd;box-shadow:0 12px 60px #041e2480}
.gd-picker-heading{display:flex;align-items:center;gap:6px}.gd-picker-heading>div{flex:1;min-width:0}.gd-picker-heading h2{font-size:16px;line-height:22px;margin:0}.gd-picker-heading small{font-size:11px;line-height:16px;color:#c9dbbc}
.gd-picker-heading button{width:44px;min-width:44px;height:44px;padding:0;background:#ffffff10;color:#e8efdc;border-color:#d9e4c12b;font-size:22px}
.gd-picker-cards{display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));grid-auto-rows:80px;grid-template-rows:repeat(2,80px);height:168px;gap:8px}
.gd-picker-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:5px 7px;height:80px;min-width:44px;min-height:44px;border-radius:6px;background:#fffdf2;color:#213b32;border:2px solid #d5d8c2;font-family:Georgia,serif}
.gd-picker-card.red{color:#b72f37}.gd-picker-card.wild{background:#fff1c8}.gd-picker-card[aria-pressed="true"]{border-color:#f4cc6f;box-shadow:0 0 0 2px #f4cc6f;background:#fff4cc}
.gd-picker-rank{font-size:25px;line-height:27px;font-weight:700;letter-spacing:-1px}.gd-picker-symbol{position:absolute;right:8px;top:29px;font-size:34px;line-height:36px}.gd-picker-card small{position:absolute;left:5px;bottom:5px;font:10px/12px sans-serif;color:#5a6954}
.gd-picker-tools{display:flex;gap:8px}.gd-picker-tools button{flex:1;min-width:44px;min-height:44px;height:44px;padding:4px;font-size:14px;background:#e2ebcf;color:#34523b;border-color:#c9d4b9}.gd-picker-tools [data-picker-done]{background:#f0c477;color:#68481a;border-color:#f4d492}
@media(max-width:440px){.gd-picker-cards{gap:5px}.gd-picker-rank{font-size:20px}.gd-picker-card{padding:5px 3px}.gd-picker-card small{font-size:8px}.gd-picker-symbol{font-size:26px;right:3px}}

/* Safari bars may leave a visual viewport smaller than the layout viewport.
   Native apps use the unchanged fallback; a browser supplies these lengths. */
@media (orientation:landscape){
 .table-active main{inset:auto;left:var(--gd-viewport-left,0px);top:var(--gd-viewport-top,0px);width:var(--gd-viewport-width,100%);height:var(--gd-viewport-height,100dvh)}
 .table-active.playing-table .play-controls{left:calc(var(--gd-viewport-left,0px) + var(--play-row-left));top:calc(var(--gd-viewport-top,0px) + var(--play-row-top))}
 .table-active.playing-table .play-controls #sort{right:calc(var(--gd-viewport-right,0px) + var(--inset-right));bottom:calc(var(--gd-viewport-bottom,0px) + var(--inset-bottom) + 6px)}
 .table-active.playing-table .hand-heading{right:calc(var(--gd-viewport-right,0px) + var(--inset-right));bottom:calc(var(--gd-viewport-bottom,0px) + var(--inset-bottom) + 57px)}
 .table-active.playing-table #lock{right:calc(var(--gd-viewport-right,0px) + var(--inset-right));bottom:calc(var(--gd-viewport-bottom,0px) + var(--inset-bottom) + 108px)}
 .table-active.playing-table #restore-sort{left:calc(var(--gd-viewport-left,0px) + var(--inset-left));bottom:calc(var(--gd-viewport-bottom,0px) + var(--inset-bottom) + 6px)}
 .table-active.playing-table .table-center,.table-active #notice,.table-active #practice-message{left:calc(var(--gd-viewport-left,0px) + var(--inset-left))}
 .table-active .overlay{inset:auto;top:var(--gd-viewport-top,0px);left:var(--gd-viewport-left,0px);width:var(--gd-viewport-width,100%);height:var(--gd-viewport-height,100dvh)}
 body.table-active.gd-short-viewport{--hand-card-height:26px;--play-row-top:calc(var(--inset-top) + var(--usable-height) * .44);--private-top:calc(var(--play-row-top) + 48px);--played-width:50px;--played-height:44px;--played-side-row-step:24px;--played-side-width:124px;--played-center-width:194px;--played-own-width:178px;--played-side-top:2px}
 .gd-short-viewport.table-active .hand-column{--rank-font:14px;--suit-font:12px;max-width:48px}
 .gd-short-viewport.table-active .hand-column:last-child{flex-basis:48px}
 .gd-short-viewport.table-active .hand-column .card{width:48px}
 .gd-short-viewport.table-active .hand-column[data-density=medium]{--hand-card-height:24px;--rank-font:12px;--suit-font:10px}
 .gd-short-viewport.table-active .hand-column[data-compact=true]{--hand-card-height:18px}
 .gd-short-viewport.table-active .hand-column .card::before{display:none}
 .gd-short-viewport.table-active .hand-column .card .level-badge,.gd-short-viewport.table-active .hand-column .card.wild::after{right:1px;left:auto;font-size:7px;bottom:1px}
 .gd-short-viewport.table-active.playing-table .seat.pos-1,.gd-short-viewport.table-active.playing-table .seat.pos-3{top:0}
 .gd-short-viewport.table-active.playing-table .seat.pos-2{height:28px;width:140px;grid-template-columns:28px minmax(0,1fr)}
 .gd-short-viewport.table-active.playing-table .seat.pos-2 .seat-avatar{height:28px;width:28px}
 .gd-short-viewport.table-active.playing-table .seat.pos-2 .seat-display-name{line-height:14px}
 .gd-short-viewport.table-active.playing-table .seat.pos-2 .seat-count{line-height:12px}
 .gd-short-viewport.table-active .public-cards .card{font-size:min(21px,calc((var(--played-step) - 2px) * 1.25))}
 .gd-short-viewport.table-active .public-cards .card-suit{font-size:min(14px,calc(var(--played-step) - 3px))}
}
.table-active .gd-picker-overlay{inset:auto;left:var(--gd-viewport-left,0px);top:var(--gd-viewport-top,0px);width:var(--gd-viewport-width,100%);height:var(--gd-viewport-height,100dvh);box-sizing:border-box}
.gd-short-viewport .gd-picker-sheet{--picker-card-height:max(44px,min(80px,calc(var(--gd-viewport-height,100dvh) - max(12px,var(--inset-top,0px)) - max(12px,var(--inset-bottom,0px)) - 130px)));grid-template-rows:44px var(--picker-card-height) 44px}
.gd-short-viewport .gd-picker-cards{grid-template-rows:var(--picker-card-height);grid-auto-rows:var(--picker-card-height);height:var(--picker-card-height)}
.gd-short-viewport .gd-picker-card{height:var(--picker-card-height)}
.gd-short-viewport .gd-picker-rank{font-size:20px;line-height:22px}
.gd-short-viewport .gd-picker-symbol{font-size:24px;line-height:24px;top:24px}
.gd-short-viewport .gd-picker-card small{left:auto;right:5px;font-size:9px;bottom:3px}
.gd-fullscreen-help{position:fixed;inset:auto;left:calc(var(--gd-viewport-left,0px) + 12px);right:calc(var(--gd-viewport-right,0px) + 12px);top:calc(var(--gd-viewport-top,0px) + 12px);width:min(620px,calc(var(--gd-viewport-width,100vw) - 24px));height:min(380px,calc(var(--gd-viewport-height,100dvh) - 24px));max-width:none;max-height:none;box-sizing:border-box;margin:0 auto;padding:0;border:1px solid #c2d3b84f;border-radius:16px;background:#f8faf7;color:#214844;overflow:hidden;z-index:100}
.gd-fullscreen-help::backdrop{background:#062f2ccb}
.gd-fullscreen-help-sheet{position:relative;height:100%;display:grid;grid-template-rows:44px minmax(0,1fr);gap:8px;padding:12px;box-sizing:border-box}
.gd-fullscreen-help-sheet h2{position:absolute;top:20px;left:12px;right:90px;font-size:18px;line-height:24px;margin:0}
.gd-fullscreen-help-sheet ol{margin:0 0 8px;padding-left:22px;font-size:13px;line-height:1.55}
.gd-fullscreen-help-sheet p{font-size:12px;line-height:1.45;margin:0 0 8px}
.gd-fullscreen-instructions{grid-row:2;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
#gd-fullscreen-help-close{grid-row:1;min-height:44px;justify-self:end;padding:6px 18px}
#gd-fullscreen-status{font-size:12px;line-height:1.5}
@media (orientation:landscape){
 /* Reserve the clock beside Play even while the action buttons are hidden. */
 .table-active.playing-table .turn-clock{position:fixed;left:calc(var(--gd-viewport-left,0px) + var(--play-row-left) + var(--control-width) + 8px);top:calc(var(--gd-viewport-top,0px) + var(--play-row-top) + 10px);transform:none;width:68px;min-width:68px;max-width:68px;height:24px;display:flex;gap:4px;padding:0}
 .table-active.playing-table .turn-automatic{position:fixed;left:calc(var(--gd-viewport-left,0px) + var(--inset-left) + 8px);top:calc(var(--gd-viewport-top,0px) + var(--inset-top) + var(--top-height) + 4px);transform:none;max-width:150px;padding:1px 6px;font-size:9px;line-height:14px;overflow:hidden;text-overflow:ellipsis;text-align:center}
 .table-active .cancel-managed{position:fixed;left:var(--cancel-left,calc(var(--gd-viewport-left,0px) + var(--play-row-left)));top:var(--cancel-top,calc(var(--gd-viewport-top,0px) + var(--play-row-top)));width:44px;height:44px;min-height:44px;transform:none;padding:4px;font-size:11px;line-height:14px;border-radius:10px}
 .table-active #table-sound.managed-covered{visibility:hidden;pointer-events:none}
}
@media (orientation:landscape) and (max-width:700px){
 body.table-active{--played-own-width:186px;--played-side-width:120px}
 .table-active.playing-table .turn-clock{left:calc(var(--gd-viewport-left,0px) + var(--play-row-left) + var(--control-width) + 12px);width:52px;min-width:52px;max-width:52px;gap:2px}
 .table-active.playing-table .turn-clock-arrow{width:12px;font-size:15px}
 .table-active.playing-table .turn-clock-seconds{font-size:18px}
}
@media (orientation:landscape) and (max-height:340px){
 body.table-active{--played-own-width:178px;--played-side-width:112px;--played-side-right:52px}
 .table-active.playing-table .turn-clock{left:calc(var(--gd-viewport-left,0px) + var(--play-row-left) + var(--control-width) + 8px);width:48px;min-width:48px;max-width:48px;gap:2px}
 .table-active.playing-table .turn-clock-arrow{width:12px;font-size:15px}
 .table-active.playing-table .turn-clock-seconds{font-size:18px}
 .table-active.playing-table #sort,.table-active.playing-table #group,.table-active.playing-table #lock,.table-active.playing-table .hand-heading,.table-active.playing-table .hand-heading .hand-tools{width:52px;min-width:52px}
 .table-active.playing-table #sort,.table-active.playing-table #group,.table-active.playing-table #lock{font-size:11px}
}
