/* The live table is a viewport, not a document. Club pages keep normal scrolling. */
body[data-screen=table]:has(.game-screen){height:100vh;height:var(--app-viewport-height,100dvh);min-height:0;overflow:hidden;overscroll-behavior:none;padding:var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom) var(--app-safe-left);display:flex;flex-direction:column}
body[data-screen=table]:has(.game-screen) .topbar{width:100%;max-width:1200px;height:30px;min-height:30px;padding:0 14px;gap:8px}
body[data-screen=table]:has(.game-screen) .topbar .brand{font-size:10px;min-height:28px;letter-spacing:1px}
body[data-screen=table]:has(.game-screen) .topbar .brand-mark{width:22px;height:22px;font-size:19px}
body[data-screen=table]:has(.game-screen) .topbar .brand-caption{display:none}
body[data-screen=table]:has(.game-screen) .topbar .language{min-height:28px;padding:4px 8px;font-size:10px}
body[data-screen=table]:has(.game-screen) main{flex:1;min-height:0;width:100%;max-width:1200px;margin:0 auto;padding:0 12px 8px;display:flex}
.game-screen{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0;width:100%;max-width:none;gap:8px;margin:0}
.game-screen .table-header{flex:none;height:42px;min-height:42px;gap:9px;margin:0}
.game-screen .table-header h1{font-size:24px;line-height:1.05;margin:0}
.game-screen .table-header p{font-size:10px;margin:3px 0 0;white-space:nowrap}
.game-screen .table-header .icon-button,.game-screen .table-menu>summary{width:40px;height:40px;min-height:40px;padding:0}
.game-screen .table-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:minmax(0,1fr);gap:16px;flex:1;min-height:0;min-width:0;max-width:none;width:100%;margin:0}
.game-screen .table-layout.completed-layout{grid-template-columns:minmax(0,1fr)}
.game-screen .game-arena{--seat-w:min(144px,calc((100cqw - 16px)/3));--depth:2;--own-rows:0;--public-w:max(36px,min(62px,calc((var(--seat-w) - 4px)/2),calc((100cqh - 160px)/(var(--depth)*1.8))));--seat-h:calc(32px + var(--public-w)*1.333 + 16px);--own-h:calc(32px + var(--own-rows)*(var(--public-w)*1.333 + 16px));height:100%;min-height:0;min-width:0;margin:0;padding:10px 8px;border-radius:32px;container-type:size;display:block}
.game-screen .game-arena[data-card-depth="1"]{--depth:1}
.game-screen .game-arena[data-card-depth="3"]{--depth:3}
.game-screen .game-arena[data-card-depth="4"]{--depth:4}
.game-screen .game-arena[data-own-rows="1"]{--own-rows:1}
.game-screen .game-arena[data-own-rows="2"]{--own-rows:2}
.game-screen .game-arena:is(.players-2,.players-3){--seat-w:min(150px,calc((100cqw - 12px)/2))}
.game-screen .game-arena:before{inset:24px 36px;border-color:#b4a87940}
.game-screen .table-orbit{position:relative;display:block;width:100%;height:100%;min-height:0}
.game-screen .table-seat{position:absolute;left:50%;top:auto;bottom:auto;width:var(--seat-w);max-width:none;margin:0;padding:0;transform:translateX(-50%);border:0;background:none}
.game-screen .slot-0{bottom:0;left:50%}
.game-screen .slot-1{top:0;left:25%}
.game-screen .slot-2{top:0;left:75%}
.game-screen .players-2 .slot-1{left:50%}
.game-screen .players-4 .slot-2{top:0;left:50%}
.game-screen :is(.players-4,.players-5) .slot-1{top:50%;left:calc(var(--seat-w)/2);transform:translate(-50%,-50%)}
.game-screen .players-4 .slot-3,.game-screen .players-5 .slot-4{top:50%;left:calc(100% - var(--seat-w)/2);transform:translate(-50%,-50%)}
.game-screen .players-5 .slot-2{top:0;left:32%;transform:translateX(-50%)}
.game-screen .players-5 .slot-3{top:0;left:68%;transform:translateX(-50%)}
.game-screen .players-6 .slot-3{top:0;left:50%}
.game-screen .players-6 :is(.slot-2,.slot-4){top:max(0px,calc((100% - 2*var(--seat-h))/4));margin:0}
.game-screen .players-6 :is(.slot-1,.slot-5){top:auto;bottom:max(0px,calc((100% - 2*var(--seat-h))/4));margin:0}
.game-screen .players-6 :is(.slot-1,.slot-2){left:calc(var(--seat-w)/2)}
.game-screen .players-6 :is(.slot-4,.slot-5){left:calc(100% - var(--seat-w)/2)}
.game-screen .seat-person{min-height:30px;padding:1px;gap:4px;border-radius:8px;align-items:center}
.game-screen .table-seat .avatar{width:24px;height:24px;font-size:12px;box-shadow:none}
.game-screen .table-seat.own-seat .avatar{font-size:9px}
.game-screen .table-seat strong{font-size:10px;line-height:1.1}
.game-screen .seat-meta{font-size:9px;line-height:1.1;gap:2px 4px;margin-top:3px;min-height:10px;flex-wrap:nowrap}
.game-screen .seat-meta>span{white-space:nowrap}
.game-screen .own-seat .seat-meta{flex-wrap:wrap}
.game-screen .targetable .seat-person{min-height:36px;padding:3px 1px}
.game-screen .chosen-target .seat-person{padding:2px 0}
.game-screen .influence-backs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:center;gap:4px;margin-top:4px;align-items:start}
.game-screen .influence-backs:not(:has(.revealed-card)){display:flex;height:36px}
.game-screen .influence-backs:empty{display:none}
.game-screen .concealed-cards{justify-content:center;align-items:flex-start;max-width:100%;padding:0}
.game-screen .influence-backs .card-back{width:min(27px,var(--public-w));height:36px;border-radius:3px;box-shadow:0 1px 3px #102c24}
.game-screen .concealed-cards .card-back+.card-back{margin-left:-17px}
.game-screen .revealed-card{width:100%;flex:none;border-radius:5px;min-height:0;align-items:center}
.game-screen .revealed-card .role-portrait{width:var(--public-w);max-width:100%}
.game-screen .game-arena .revealed-card:only-child{grid-column:1/-1;justify-self:center;width:calc((100% - 4px)/2);flex:none;margin-inline:auto}
.game-screen .revealed-card-title{font-size:10px;line-height:1.1;padding:3px 0;white-space:nowrap;hyphens:none;overflow-wrap:normal;letter-spacing:-.2px}
.game-screen .revealed-card-title[data-long-name=true]{font-size:9px}
/* Narrow places use a portrait beside its full name; neither needs a tiny type size. */
.game-screen :is(.players-4,.players-5,.players-6){--mini-portrait:clamp(24px,min(calc((100cqh - 100px)/(var(--depth)*4)),calc(var(--seat-w)*.28)),44px);--mini-height:max(40px,calc(var(--mini-portrait)*1.333 + 2px));--seat-h:calc(36px + 2*(var(--mini-height) + 4px))}
.game-screen :is(.players-4,.players-5,.players-6) .influence-backs:has(.revealed-card){grid-template-columns:minmax(0,1fr)}
.game-screen :is(.players-4,.players-5,.players-6) .revealed-card{display:flex;flex-direction:row;gap:3px;min-height:var(--mini-height);text-align:left}
.game-screen :is(.players-4,.players-5,.players-6) .revealed-card .role-portrait{width:var(--mini-portrait);flex:none}
.game-screen :is(.players-4,.players-5,.players-6) .revealed-card-title{font-size:clamp(8px,2.5cqw,11px);letter-spacing:-.2px;padding:2px 1px 2px 0;text-align:left;width:auto;flex:1}
.game-screen .table-seat .cosmetic-title{font-size:7px;line-height:1.1;margin-top:1px}
.game-screen .table-seat .cosmetic-badge{font-size:8px;right:0}
.game-screen .table-event{position:absolute;left:50%;top:50%;width:calc(100% - 2*var(--seat-w) - 10px);max-width:200px;min-height:0;padding:0;transform:translate(-50%,-50%);pointer-events:none}
.game-screen :is(.players-2,.players-3) .table-event{width:80%;top:auto;bottom:calc(var(--own-h) + 12px);transform:translateX(-50%)}
.game-screen .table-event h2{font-size:clamp(16px,4.2cqw,26px);line-height:1.12;overflow-wrap:normal}
.game-screen .table-event h2 small{font-size:12px}
.game-screen .table-event p{font-size:10px;line-height:1.2;margin:4px 0 0}
.game-screen .table-event .eyebrow{font-size:8px;letter-spacing:.5px;line-height:1.2;margin:0 0 4px}
.game-screen .table-flourish{display:none}
.game-screen .table-crown{font-size:26px;line-height:1;margin:0 0 5px}
.game-screen .current-bid{gap:5px;flex-wrap:wrap}
.game-screen .current-bid>strong{font-size:28px}
.game-screen .current-bid .die{width:28px;height:28px;padding:4px}
.game-screen .current-bid .die i{width:4px;height:4px}
.game-screen .decision-area{display:flex;flex-direction:column;gap:8px;min-height:0;justify-content:center}
.game-screen .hand-zone{padding:0;flex:none}
.game-screen .hand-heading{margin:0 0 5px}
.game-screen .hand-heading h2{font-size:10px}
.game-screen .private-mark{font-size:10px;gap:8px}
.game-screen .hand{gap:6px}
.game-screen .role-card{width:80px;flex:0 1 80px;max-width:96px;border-width:1px;border-radius:6px}
.game-screen .role-title{min-height:18px;font-size:10px;line-height:1;padding:4px 1px;white-space:nowrap;hyphens:none;overflow-wrap:normal;letter-spacing:-.2px}
.game-screen .role-title[data-long-name=true]{font-size:9px}
.game-screen .exchange-hand{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;justify-items:center}
.game-screen .exchange-hand .role-card{width:100%;max-width:104px}
.game-screen .exchange-hand .role-portrait{width:auto;max-width:100%;height:64px}
.game-screen .exchange-hand .role-title{font-size:10px}
.game-screen .decision-dock{padding:10px;border-radius:14px;flex:none;min-width:0;box-shadow:none}
.game-screen .decision-heading{margin-bottom:7px;gap:6px;min-height:32px}
.game-screen .decision-heading h2{font-size:14px}
.game-screen .decision-clock{max-width:65%;gap:4px;flex-wrap:nowrap}
.game-screen .timer{font-size:10px;min-width:38px;padding:5px 6px}
.game-screen .decision-clock .time-extension{font-size:10px;padding:6px;min-height:36px}
.game-screen .turn-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.game-screen .turn-actions button{min-height:44px;padding:5px;gap:5px}
.game-screen .turn-actions strong{font-size:11px}
.game-screen .turn-actions small{font-size:8px;margin-top:3px;white-space:nowrap}
.game-screen .action-glyph{width:24px;height:32px}
.game-screen .action-cost{font-size:9px}
.game-screen .decision-copy,.game-screen .decision-dock>.hint{font-size:11px;line-height:1.25;margin:0 0 7px}
.game-screen .decision-dock>.hint:last-child{margin-bottom:0}
.game-screen .thinking-status{display:block;width:100%;min-height:26px;font-size:10px;font-weight:500;padding:4px 6px;margin:0 0 5px;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-screen .button-row{gap:6px}
.game-screen .button-row>button,.game-screen .reaction-actions>button{min-height:40px;padding:8px 7px;font-size:12px}
.game-screen .reaction-actions{gap:6px}
.game-screen .reaction-actions>*{min-width:85px}
.game-screen .result-panel{max-width:none;width:100%;margin:0;flex:none;padding:0}
.game-screen .result-panel>h2,.game-screen .result-panel>.hint{display:none}
.game-screen .result-footer>.button-row{display:grid;grid-template-columns:1fr 1fr auto}
.game-screen .table-footer{flex:none;margin:0}
.game-screen:has([data-do="show-predictions"]) .table-footer>details>summary{display:none}
.game-screen .table-sheet{margin:0;border:0;padding:0}
.game-screen .table-sheet>summary{display:flex;align-items:center;justify-content:center;min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--card);font-size:11px;font-weight:600;list-style:none}
.game-screen .table-sheet>summary::-webkit-details-marker{display:none}
dialog.overlay-content{position:fixed;inset:var(--app-safe-top) var(--app-safe-right) calc(100% - var(--app-viewport-height,100dvh) + var(--app-safe-bottom)) var(--app-safe-left);max-height:calc(var(--app-viewport-height,100dvh) - var(--app-safe-top) - var(--app-safe-bottom) - 24px);max-width:min(560px,calc(100% - var(--app-safe-left) - var(--app-safe-right) - 24px));width:calc(100% - 24px);padding:0;border-radius:18px;overflow:hidden}
dialog.overlay-content[open]{display:flex;flex-direction:column}
.overlay-content::backdrop{background:#132b2499;backdrop-filter:blur(3px)}
.sheet-header{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line);flex:none}
.sheet-header h2{font-size:21px;margin:0;flex:1}
.sheet-header button{min-height:36px;padding:6px 10px}
.sheet-toast{flex:none;margin:8px 16px 0;padding:10px;border-radius:9px;background:#e6ebdc;font-size:12px;line-height:1.35;overflow-wrap:anywhere}.sheet-toast.error{background:#f0ded4;color:#873d31}.sheet-toast button{min-height:36px;margin-left:5px}
.sheet-body{padding:16px;min-height:0;overflow:auto;overscroll-behavior:contain}
.sheet-body>.panel{margin:0;padding:0;border:0;box-shadow:none;background:none}
.sheet-body .final-hand .role-card{width:80px;flex-basis:80px}
.role-title,.revealed-card-title{white-space:nowrap;hyphens:none;overflow-wrap:normal}
@media(max-width:700px) and (min-height:501px){
 .game-screen{gap:6px}
 .game-screen .table-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:8px}
 .game-screen .table-layout.completed-layout{grid-template-rows:minmax(0,1fr)}
 .game-screen .decision-area{gap:6px}
 .game-screen .role-card{width:70px;flex-basis:70px;max-width:80px}
 .game-screen .hand[data-count="4"] .role-card{max-width:76px}
 .game-screen .role-title{font-size:9px;min-height:17px}
 .game-screen .role-title[data-long-name=true]{font-size:8.5px}
 .game-screen .turn-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 .game-screen .turn-actions button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:48px;gap:2px;padding:4px 2px}
 .game-screen .turn-actions strong{font-size:9px;line-height:1.08}
 .game-screen .turn-actions small{display:none}
 .game-screen .action-glyph{width:18px;height:22px}
 .game-screen .action-glyph>span{font-size:18px}
 .game-screen .action-cost{position:absolute;top:3px;right:3px;font-size:8px}
 .game-screen .target-layout .decision-dock{order:0}
 .game-screen .exchange-hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .game-screen .exchange-hand .role-card{width:100%;max-width:110px}
 .game-screen .exchange-hand .role-title{font-size:10px;letter-spacing:-.2px;padding-inline:1px}
 .game-screen .exchange-hand .role-title[data-long-name=true]{font-size:9px}
 .game-screen .exchange-hand .role-card input{width:16px;height:16px;min-height:16px;top:2px;right:2px}
 .game-screen .result-footer>.button-row{grid-template-columns:1fr 1fr}
 .game-screen .result-footer .table-sheet{grid-column:1/-1}
 .game-screen .result-footer .table-sheet>summary{min-height:30px;padding:4px 8px;border:0;background:none}
}
@media(max-height:700px) and (min-height:501px) and (max-width:700px){
 body[data-screen=table]:has(.game-screen) .topbar{height:26px;min-height:26px}
 body[data-screen=table]:has(.game-screen) main{padding:0 8px 6px}
 .game-screen .table-header{height:36px;min-height:36px}
 .game-screen .table-header h1{font-size:20px}
 .game-screen .table-header p{font-size:9px}
 .game-screen .table-header .icon-button,.game-screen .table-menu>summary{width:36px;height:36px;min-height:36px}
 .game-screen .role-card{width:62px;flex-basis:62px;max-width:62px}
 .game-screen .hand[data-count="4"] .role-card{max-width:62px}
 .game-screen .role-title{font-size:8px;min-height:15px;padding:3px 0}
 .game-screen .role-title[data-long-name=true]{font-size:7.5px}
 .game-screen .decision-dock{padding:7px}
 .game-screen .decision-heading{margin-bottom:5px}
 .game-screen .turn-actions button{min-height:44px}
 .game-screen .hand-heading{margin-bottom:3px}
 .game-screen .exchange-hand .role-portrait{height:48px}
}
@media(max-height:500px){
 body[data-screen=table]:has(.game-screen) .topbar{height:24px;min-height:24px}
 body[data-screen=table]:has(.game-screen) main{padding:0 8px 6px}
 .game-screen .table-header{height:34px;min-height:34px}
 .game-screen .table-header h1{font-size:20px}
 .game-screen .table-header p{font-size:9px}
 .game-screen .table-header .icon-button,.game-screen .table-menu>summary{width:34px;height:34px;min-height:34px}
 .game-screen .table-layout{grid-template-columns:minmax(0,1fr) minmax(240px,38%);gap:10px}
 .game-screen .decision-area{gap:4px;justify-content:center}
 .game-screen .role-card{width:60px;flex-basis:60px;max-width:60px}
 .game-screen .role-title,.game-screen .role-title[data-long-name=true]{font-size:8px;min-height:13px;padding:3px 0}
 .game-screen .exchange-hand{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 .game-screen .exchange-hand .role-card{width:100%;max-width:100px}
 .game-screen .exchange-hand .role-portrait{height:46px}
 .game-screen .exchange-hand .role-title{font-size:9px}
 .game-screen .hand-heading{margin:0 0 3px}
 .game-screen .decision-dock{padding:7px}
 .game-screen .decision-heading{margin-bottom:4px;min-height:30px}
 .game-screen .turn-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 .game-screen .turn-actions button{min-height:40px;padding:3px;gap:3px}
 .game-screen .turn-actions strong{font-size:9px}
 .game-screen .turn-actions small,.game-screen .action-glyph{display:none}
 .game-screen .action-cost{font-size:8px}
 .game-screen .thinking-status{font-size:9px}
 .game-screen .dice-hand{margin:0;gap:5px}
 .game-screen .dice-hand .die{width:32px;height:32px;padding:5px}
 .game-screen .dice-hand .die i{width:5px;height:5px}
}

@container (max-height:440px){.game-screen .completed-layout .table-crown{display:none}}
.game-screen .game-arena[data-own-rows="0"]:not(.players-2):not(.players-3) .table-event{transform:translate(-50%,calc(-50% + 18px))}
.thinking-list{margin-bottom:16px}.thinking-list h3{font-size:14px}.thinking-list ul{padding-left:20px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.game-screen .table-event .eyebrow,.game-screen .table-event h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-screen .table-event p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.game-screen .table-event .eyebrow{display:block;width:100%}
@media(max-height:500px){
 .game-screen .game-arena{--landscape-portrait:max(24px,min(56px,calc((100cqh - 130px)/var(--depth))));--seat-h:calc(32px + var(--landscape-portrait) + 16px)}
 .game-screen .table-layout.watching-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:6px}
 .game-screen :is(.completed-layout,.watching-layout) .game-arena{--seat-w:calc((100cqw - 16px)/3)}
 .game-screen :is(.completed-layout,.watching-layout) .game-arena:is(.players-2,.players-3){--seat-w:calc((100cqw - 12px)/2)}
 .game-screen .game-arena:is(.players-4,.players-5,.players-6) .influence-backs:has(.revealed-card),
 .game-screen :is(.completed-layout,.watching-layout) .influence-backs:has(.revealed-card){display:flex;flex-wrap:nowrap;align-items:start}
 .game-screen .game-arena .revealed-card{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;gap:0;align-items:center}
 .game-screen .game-arena .revealed-card .role-portrait{height:var(--landscape-portrait);width:auto;max-width:100%;flex:none}
 .game-screen .game-arena .revealed-card-title{font-size:10px;text-align:center;width:100%;padding:3px 0;line-height:1.1;flex:none}
 .game-screen .game-arena .revealed-card:only-child .revealed-card-title{font-size:min(10px,calc((var(--seat-w) - 10px)/14.5))}
 .game-screen .game-arena .influence-backs[data-size="3"] .revealed-card-title{font-size:clamp(7px,calc(var(--seat-w)/24),10px)}
 .game-screen .game-arena .influence-backs[data-size="4"] .revealed-card-title{font-size:8px}
 .game-screen .game-arena:is(.players-4,.players-5,.players-6) .influence-backs[data-size="2"] .revealed-card-title{font-size:clamp(7px,calc(var(--seat-w)/16),10px)}
 .game-screen :is(.completed-layout,.watching-layout) .game-arena:is(.players-2,.players-3) .table-event{top:50%;bottom:auto;transform:translate(-50%,-50%);width:45%}
 .game-screen .watching-layout .decision-dock{display:flex;gap:10px;align-items:center;padding:5px 8px;min-height:40px}
 .game-screen .watching-layout .decision-heading{margin:0;min-height:0;flex:none}
 .game-screen .watching-layout .decision-dock>.hint{margin:0;font-size:10px;flex:1}
 .game-screen .watching-layout .decision-dock>.full{margin:0;width:auto;min-height:36px;padding:6px 10px;font-size:11px;flex:none}
 .game-screen .watching-layout .decision-clock{display:none}
 .game-screen .turn-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
 .game-screen .turn-actions button{min-height:44px;font-size:9px}
 .game-screen .hand-zone .role-portrait{height:32px;width:auto;max-width:100%}
 .game-screen .role-card{flex:1;max-width:64px}
 .game-screen .hand-zone .role-title,.game-screen .hand-zone .role-title[data-long-name=true]{font-size:8px}
 .game-screen .exchange-hand .role-card{max-width:100px}
 .game-screen .exchange-hand .role-title,.game-screen .exchange-hand .role-title[data-long-name=true]{font-size:9px}
 .game-screen .thinking-status{min-height:22px;font-size:9px;padding:3px 5px;margin-bottom:4px}
}
@media(max-height:350px){
 .game-screen .table-layout:not(.completed-layout):not(.watching-layout){grid-template-columns:minmax(0,1fr) minmax(250px,42%)}
 .game-screen .hand{gap:4px}
 .game-screen .hand-zone .role-title[data-long-name=true]{font-size:7.5px;letter-spacing:-.3px}
 .game-screen .exchange-hand .role-title[data-long-name=true]{font-size:9px}
 .game-screen .bid-controls{margin-bottom:4px;gap:7px}
 .game-screen .quantity-control select{font-size:20px;padding:3px;min-height:32px}
 .game-screen .quantity-control .icon-button{height:32px;min-height:32px;width:32px}
 .game-screen .face-choices{margin-bottom:5px}
 .game-screen .face-choices button{min-height:38px}
}

.game-screen:has([data-do="show-predictions"]) .table-footer{position:absolute}
@media(max-height:500px){
 .game-screen :is(.completed-layout,.watching-layout) .table-event{display:flex;align-items:center;justify-content:center;gap:5px}
 .game-screen :is(.completed-layout,.watching-layout) .table-event .eyebrow{display:none}
 .game-screen :is(.completed-layout,.watching-layout) .table-event h2{font-size:18px;min-width:0}
 .game-screen .completed-layout .game-arena .table-crown{display:block;font-size:18px;line-height:1;margin:0;flex:none}
 .game-screen .watching-layout .table-event h2{font-size:16px}
}
.game-screen .overlay-content .sheet-body .role-card{width:88px;flex:0 1 88px;max-width:96px}
.overlay-content .sheet-body .role-title,.overlay-content .sheet-body .role-title[data-long-name=true]{font-size:10px;min-height:22px;padding:5px 1px;letter-spacing:-.2px}
.game-screen .players-3 .table-event{--top-h:calc(32px + (var(--depth) - var(--own-rows))*(var(--public-w)*1.333 + 16px));top:calc((100% + var(--top-h) - var(--own-h))/2);bottom:auto;transform:translate(-50%,-50%)}
@media(max-width:700px) and (min-height:501px) and (max-height:700px){
 .game-screen .hand-zone .role-portrait{height:40px;width:auto;max-width:100%}
 .game-screen .exchange-hand .role-portrait{height:48px}
}
@media(max-height:500px){.game-screen :is(.completed-layout,.watching-layout) .players-3 .table-event{top:50%;transform:translate(-50%,-50%)}}

@media(max-height:500px){.game-screen .players-3{--public-w:calc(var(--landscape-portrait)/1.333)}}

/* Keep the illustrations prominent: paired portrait cards use the available table area. */
@media(min-height:501px){
 .game-screen .game-arena{
  --seat-w:min(196px,calc((100cqw - 16px)/3));
  --portrait-min:36px;
  --public-w:max(var(--portrait-min),min(96px,calc((var(--seat-w) - 4px)/2),calc((100cqh - 200px)/(var(--depth)*1.5))));
  --seat-h:calc(34px + var(--public-w)*1.333 + 17px);
  --back-w:clamp(27px,calc(var(--public-w)*.7),46px);
 }
 .game-screen .game-arena:is(.players-2,.players-3){--portrait-min:28px;--seat-w:min(204px,calc((100cqw - 12px)/2));--own-h:calc(34px + var(--own-rows)*(var(--public-w)*1.333 + 22px))}
 .game-screen .players-3 .table-event{--top-h:calc(34px + (var(--depth) - var(--own-rows))*(var(--public-w)*1.333 + 22px))}
 .game-screen .game-arena .influence-backs:has(.revealed-card){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 .game-screen .game-arena .revealed-card{display:flex;flex-direction:column;gap:0;min-height:0;text-align:center;align-items:center}
 .game-screen .game-arena .revealed-card .role-portrait{width:var(--public-w);height:auto;max-width:100%;flex:none}
 .game-screen .game-arena .revealed-card-title{font-size:clamp(8px,calc((var(--seat-w) - 10px)/10),11px);width:100%;padding:3px 0;line-height:1.1;text-align:center;letter-spacing:-.25px;flex:none}
 .game-screen .game-arena .revealed-card-title[data-long-name=true]{font-size:clamp(6px,calc((var(--seat-w) - 10px)/14.5),11px)}
 .game-screen .game-arena .revealed-card:only-child .revealed-card-title[data-long-name=true]{font-size:min(11px,calc((var(--seat-w) - 10px)/14.5))}
 .game-screen .game-arena .revealed-card[data-role=duke] .revealed-card-title{font-size:clamp(7px,calc((var(--seat-w) - 10px)/12.5),11px)}
 .game-screen .game-arena .influence-backs:not(:has(.revealed-card)){height:calc(var(--back-w)*1.333)}
 .game-screen .game-arena .influence-backs .card-back{width:var(--back-w);height:calc(var(--back-w)*1.333);border-radius:5px}
 .game-screen .game-arena .concealed-cards .card-back+.card-back{margin-left:calc(var(--back-w)*-.35)}
 .game-screen .hand-zone .role-card{width:104px;flex-basis:104px;max-width:104px}
 .game-screen .hand-zone .hand[data-count="4"] .role-card{max-width:90px}
 .game-screen .hand-zone .role-title{font-size:11px;line-height:1.2;min-height:20px}
 .game-screen .hand-zone .role-title[data-long-name=true]{font-size:10px}
 .game-screen .exchange-hand .role-card{width:100%;max-width:110px}
 .game-screen .exchange-hand .role-portrait{height:86px}
}
@media(max-width:700px) and (min-height:501px) and (max-height:700px){
 .game-screen .hand-zone .role-portrait{height:76px;width:auto;max-width:100%}
 .game-screen .hand-zone .role-card{width:76px;flex-basis:76px;max-width:76px}
 .game-screen .hand-zone .hand[data-count="4"] .role-card{max-width:70px}
 .game-screen .hand-zone .role-title,.game-screen .hand-zone .role-title[data-long-name=true]{font-size:8.5px;min-height:16px}
 .game-screen .exchange-hand .role-portrait{height:56px}
 .game-screen .exchange-hand .role-card{max-width:110px}
}

/* Private hints mark a held role without restricting legal bluff actions. */
.game-screen :is(.turn-actions,.reaction-actions) .role-backed{position:relative;background:#e2ead8;border-color:#73946e;box-shadow:inset 0 0 0 1px #73946e;color:#244832}
.game-screen :is(.turn-actions,.reaction-actions) .role-backed:not(:disabled):hover{background:#d7e4c9}
.game-screen :is(.turn-actions,.reaction-actions) .role-backed::before{content:'✓';position:absolute;left:4px;top:3px;font-size:9px;line-height:1;color:#3a6c3e}
.game-screen .turn-actions button:disabled{background:#e9e8e3;border-color:#d3d2cb;color:#8b8b83;opacity:1;box-shadow:none;cursor:not-allowed}
.game-screen .turn-actions button:disabled .action-glyph{filter:grayscale(1);opacity:.45}
.game-screen .turn-actions button:disabled .action-cost{color:#7c7c74}

.game-screen .turn-actions button.role-backed:disabled::before{color:#7c7c74}

/* Physical pieces live beside the cards; numeric balances remain authoritative. */
.game-screen .seat-coins{display:flex;justify-content:center;align-content:center;flex-wrap:wrap;gap:2px;max-width:112px;min-height:15px;margin:4px auto 0;line-height:0}
.table-coin,.bank-coin{display:inline-block;width:13px;height:13px;flex:none;border-radius:50%;border:1px solid #b28330;background:radial-gradient(circle at 35% 25%,#fff1b4,#e3bf61 53%,#b9832b 95%);box-shadow:inset 0 0 0 2px #e8cd80,inset 0 0 0 3px #aa7a2a,0 2px 1px #10291f80}
.game-screen .table-supplies{display:flex;justify-content:center;align-items:center;gap:16px;margin:0 auto 12px;height:68px}
.game-screen .table-deck{position:relative;width:39px;height:53px;flex:none}
.game-screen .deck-stack{position:absolute;inset:0;display:block;border-radius:4px;transform:rotate(-7deg);box-shadow:2px 2px 0 #d7ca98,3px 3px 0 #806e3f,5px 5px 0 #d7ca98,6px 6px 0 #806e3f,0 6px 8px #10291f99}
.game-screen .deck-stack img{width:100%;height:100%;object-fit:cover;border-radius:4px;display:block}
.game-screen .supply-count{position:absolute;right:-11px;bottom:-6px;background:#f6e7ba;color:#3c422f;border:1px solid #bfa05b;border-radius:20px;min-width:23px;height:23px;display:grid;place-items:center;font-size:11px;font-weight:700;box-shadow:0 2px 4px #15312680}
.game-screen .table-deck[data-count="0"] .deck-stack{opacity:.2;box-shadow:none;transform:none}
.game-screen .table-bank{width:51px;flex:none;align-self:center}
.game-screen .bank-pile{display:block;position:relative;height:38px;width:51px}
.game-screen .bank-coin{position:absolute;width:19px;height:19px}
.game-screen .bank-coin-0{left:2px;top:13px}.game-screen .bank-coin-1{left:18px;top:17px}.game-screen .bank-coin-2{left:30px;top:12px}.game-screen .bank-coin-3{left:8px;top:18px}.game-screen .bank-coin-4{left:21px;top:10px}.game-screen .bank-coin-5{left:0;top:9px}.game-screen .bank-coin-6{left:11px;top:5px}.game-screen .bank-coin-7{left:30px;top:6px}.game-screen .bank-coin-8{left:20px;top:2px}.game-screen .bank-coin-9{left:5px;top:2px}.game-screen .bank-coin-10{left:16px;top:7px}
.game-screen .supply-label{display:block;margin-top:4px;font-size:9px;color:#ddce9a;text-align:center;line-height:1}
.game-screen .game-arena[data-game="coup"] .table-event h2{font-size:clamp(14px,3.3cqw,22px)}
.game-screen .game-arena[data-game="coup"] .table-event p{font-size:9px}
.game-screen .game-arena[data-game="coup"] .table-event .eyebrow{overflow-wrap:anywhere}
@media(min-height:501px){
 .game-screen .game-arena[data-game="coup"]{--seat-h:calc(53px + var(--public-w)*1.333 + 17px);--own-h:calc(53px + var(--own-rows)*(var(--public-w)*1.333 + 22px))}
 .game-screen .players-3[data-game="coup"] .table-event{--top-h:calc(53px + (var(--depth) - var(--own-rows))*(var(--public-w)*1.333 + 22px))}
}
@media(max-width:420px),(max-height:600px){
 .game-screen .seat-coins{gap:1px;max-width:80px;min-height:11px;margin-top:3px}
 .game-screen .seat-coins .table-coin{width:10px;height:10px;box-shadow:inset 0 0 0 1px #e8cd80,inset 0 0 0 2px #aa7a2a,0 1px 1px #10291f80}
 .game-screen .table-supplies{gap:10px;height:45px;margin-bottom:8px}
 .game-screen .table-deck{width:27px;height:36px}
 .game-screen .table-bank{width:36px}.game-screen .bank-pile{transform:scale(.7);transform-origin:top left;height:27px}
 .game-screen .supply-count{min-width:19px;height:19px;font-size:10px;right:-9px;bottom:-5px}
 .game-screen .supply-label{font-size:8px;margin-top:1px}
}

/* Shared supplies keep one fixed origin; the surrounding seats reserve its space. */
.game-screen .game-arena[data-game="coup"]{--supplies-w:116px;--supplies-h:68px}
.game-screen .game-arena[data-game="coup"][data-own-rows] .table-event.center-fixed{inset:0;max-width:none;width:100%;height:100%;transform:none}
.game-screen .center-fixed .table-supplies{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:var(--supplies-w);height:var(--supplies-h);margin:0;padding:0 5px}
.game-screen .center-fixed .table-message{position:absolute;left:50%;transform:translateX(-50%);width:160px;max-width:100%}
.game-screen .center-compact .table-message :is(.eyebrow,p){display:none}
.game-screen .table-center-reserved .players-6 :is(.slot-2,.slot-4){top:0}
.game-screen .table-center-reserved .players-6 :is(.slot-1,.slot-5){bottom:0}
.game-screen .table-center-reserved .game-arena:is(.players-4,.players-5,.players-6){--seat-w:min(196px,calc((100cqw - 16px)/3),calc((100cqw - var(--supplies-w) - 12px)/2))}
.game-screen .table-center-reserved .influence-backs[data-size="3"]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.game-screen .table-center-reserved .game-arena .seat-person{min-height:26px}
@media(max-width:420px),(max-height:600px){
 .game-screen .game-arena[data-game="coup"]{--supplies-w:88px;--supplies-h:46px}
 .game-screen .center-fixed .table-message{width:104px}
}
@media(max-width:700px) and (min-height:501px) and (max-height:700px){
 .game-screen .table-center-reserved .hand-zone .role-portrait{height:40px}
 .game-screen .table-center-reserved .exchange-hand .role-card{display:flex;flex-direction:row;align-items:center;width:100%;max-width:110px;min-height:44px}
 .game-screen .table-center-reserved .exchange-hand .role-portrait{height:40px;flex:none}
 .game-screen .table-center-reserved .exchange-hand .role-title{flex:1;min-width:0;min-height:0;font-size:7.5px;padding:3px 1px}
 .game-screen .table-center-reserved .decision-dock{padding:5px}
 .game-screen .table-center-reserved .decision-copy{margin-bottom:3px}
 .game-screen .table-center-reserved .hand-heading{margin-bottom:0}
 .game-screen .table-center-reserved .decision-heading{min-height:30px;margin-bottom:3px}
}
@media(max-height:350px){
 .game-screen .game-arena .influence-backs[data-size="2"] .revealed-card-title[data-long-name=true]{font-size:min(10px,calc((var(--seat-w) - 10px)/14.5))}
 .game-screen .game-arena .influence-backs[data-size="3"] .revealed-card-title{font-size:clamp(5px,calc((var(--seat-w) - 10px)/21),9px)}
 .game-screen .table-center-reserved .game-arena .seat-person{min-height:22px}
 .game-screen .table-center-reserved .game-arena .table-seat .avatar{width:20px;height:20px}
 .game-screen .table-center-reserved .game-arena .seat-meta{font-size:8px;line-height:1;margin-top:1px;min-height:8px}
 .game-screen .table-center-reserved .influence-backs{margin-top:2px}
 .game-screen .table-center-reserved .influence-backs:not(:has(.revealed-card)){height:calc(var(--back-w,21px)*4/3)}
 .game-screen .table-center-reserved .influence-backs .card-back{width:var(--back-w,21px);height:calc(var(--back-w,21px)*4/3)}
 .game-screen .table-center-reserved .concealed-cards .card-back+.card-back{margin-left:calc(var(--back-w,21px)*-.55)}
 .game-screen .table-center-reserved.watching-layout{grid-template-columns:minmax(0,1fr) minmax(250px,42%);grid-template-rows:minmax(0,1fr)}
 .game-screen .table-center-reserved.watching-layout .decision-dock{flex-direction:column;align-items:stretch}
}
