/* Gameplay uses the visible browser viewport; dialogs hold secondary details. */
.table-arena{position:relative;min-height:0}
.history-dialog .history-panel{padding:15px 0 0;background:none;border:0;min-height:0}
.history-dialog .history-panel ol{max-height:60dvh}
.activity-tabs{display:flex;gap:8px;margin:12px 0 8px}
.activity-tabs button{flex:1;min-height:44px;border:1px solid #91aa8255;border-radius:9px;background:transparent;color:#cbd8cb}
.activity-tabs button[aria-pressed=true]{background:#efb26420;border-color:var(--gold);color:var(--gold)}
.result-panel{text-align:center;padding-top:10px}
.result-panel h2{color:var(--gold);font-size:25px}
.result-panel p{font-size:14px;color:#b2c0b4}
.result-panel .primary-button{margin-top:20px}
.result-panel .result-summary{margin-top:15px}
.history-icon{position:relative}
.history-icon.has-result::after{content:'';position:absolute;right:3px;top:3px;width:6px;height:6px;border-radius:50%;background:var(--gold)}
.at-table .bid-wheel-labels{position:relative}
.at-table #precall-hint{position:absolute;left:50%;transform:translateX(-50%);font-size:11px;color:#9db4a1;white-space:nowrap}
.at-table #precall-hint.is-locked{color:var(--gold)}
.at-table #precall-hint.invalid{color:#f2b69d}
.at-table .bid-wheels.is-locked{border-color:var(--gold)}
.at-table #precall-toggle[aria-pressed=true]{color:var(--gold);border-color:var(--gold);background:#efb26418}
.rules-list+.solo-link{margin-top:5px}
.at-table{height:100dvh;overflow:hidden;overscroll-behavior:none}
.at-table .app{height:100%;max-width:1120px;padding:8px max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));display:grid;grid-template-rows:34px 25px minmax(0,1fr);gap:3px}
.at-table .topbar{min-height:0;padding:0 0 3px;gap:6px;flex-wrap:nowrap}
.at-table .brand{gap:7px;flex-shrink:0}
.at-table .brand-icon{height:28px;width:27px;border-radius:8px;font-size:28px}
.at-table .brand h1{font-size:18px;letter-spacing:1px;white-space:nowrap}
.at-table .brand h1 span,.at-table .brand p,.at-table .quiet-button span{display:none}
.at-table .topbar nav{gap:4px;min-width:0;margin-left:auto}
.at-table .topbar .quiet-button{font-size:12px;line-height:1.4;padding:7px 6px;border-radius:7px;white-space:nowrap}
.at-table .topbar nav .history-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;min-width:34px;min-height:32px;padding:5px}
.at-table .history-icon svg{flex-shrink:0;width:19px;height:19px}
.at-table .game-meta{padding:0;gap:7px;font-size:12px;flex-wrap:nowrap;min-width:0}
.at-table .mode-tag{font-size:12px;padding:1px 5px;white-space:nowrap}
.at-table #room-meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.at-table .connection-status{display:none}
.at-table .connection-status.offline{display:inline;white-space:nowrap}
.at-table .network-notice{position:fixed;z-index:20;left:10px;right:10px;top:45px;font-size:12px;margin:0;padding:7px 10px}
.at-table .footer,.at-table .side-panel{display:none}
.at-table .game-layout{display:block;min-height:0;height:100%}
.at-table .table{height:100%;min-height:0!important;padding:7px 9px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:22px minmax(0,1fr) 22px 38px auto;row-gap:2px;border-radius:18px;overflow:hidden}
.at-table .table::before{inset:45px 19px 260px;border-radius:45%;pointer-events:none}
.at-table .table-top{min-width:0;gap:4px;z-index:2}
.at-table .table-label{font-size:12px;letter-spacing:0}
.at-table .round-label{font-size:12px;line-height:18px;padding:0 7px;white-space:nowrap}
.at-table .table-arena{grid-row:2;isolation:isolate}
.at-table .seats{height:100%;margin:0;position:absolute;inset:0}
.at-table .seat{width:84px;height:76px;gap:0;transform:translateY(-50%)}
.at-table .seat:nth-child(1){left:50%;top:calc(100% - 38px);transform:translate(-50%,-50%)}
.at-table .seat:nth-child(2){left:0;top:calc(100% - 46px)}
.at-table .seat:nth-child(3){left:0;top:46px}
.at-table .seat:nth-child(4){left:50%;top:38px;transform:translate(-50%,-50%)}
.at-table .seat:nth-child(5){left:auto;right:0;top:46px}
.at-table .seat:nth-child(6){left:auto;right:0;top:calc(100% - 46px)}
.at-table .seat-card{padding:4px 5px;min-height:36px;grid-template-columns:17px minmax(0,1fr);gap:1px 4px;border-radius:9px}
.at-table .seat-avatar{height:18px;width:17px;font-size:12px;grid-row:1;line-height:1}
.at-table .seat-name{font-size:14px;line-height:19px;grid-column:2;letter-spacing:0}
.at-table .seat-role{display:none}
.at-table .seat-order{left:2px;top:3px;transform:translateX(-100%);font-size:10px;background:none;border:0;line-height:12px;width:9px;height:12px;opacity:.65}
.at-table .seat .score-dots{grid-column:1/-1;margin-top:1px;gap:4px;justify-content:center}
.at-table .seat .score-dots i{width:4px;height:4px}
.at-table .seat.is-turn .seat-card{box-shadow:0 0 0 2px #f2b86a2b;border-color:var(--gold)}
.at-table .seat.is-you .cup-space,.at-table .cup-space{display:flex;height:40px;width:100%;flex-shrink:0}
.at-table .dice-cup{height:48px;width:36px;top:-3px;filter:drop-shadow(0 2px 2px #0005)}
.at-table .table-hand{display:none}
.at-table .seat .seat-bid,.at-table .seat.is-you .seat-bid{display:flex;align-items:center;justify-content:center;gap:4px;position:absolute;inset:auto auto -1px 50%;transform:translateX(-50%);z-index:3;height:25px;min-width:67px;padding:2px 6px;line-height:1;white-space:nowrap;border-radius:7px;background:#142e23f5;border:1px solid #aabb8c66;color:#ffe0ad;font-size:12px}
.at-table .seat .seat-bid strong{font:600 17px/1 -apple-system,BlinkMacSystemFont,var(--font);font-variant-numeric:tabular-nums}
.at-table .seat .seat-bid .die{width:18px;height:19px;padding:3px;gap:1px;border-radius:4px;box-shadow:0 1px 0 #aaa88f;background:#ffe1b1}
.at-table .seat .seat-bid .pip{box-shadow:none}
.at-table .seat .seat-bid.no-call{height:20px;min-width:49px;color:#afc1b0;background:#142e23d9;border-color:#78957b55;font-size:12px}
.at-table .seat-remove{top:0;right:0;transform:translateY(-100%);font-size:10px;padding:1px 3px}
.at-table .center-stage,.at-table .center-stage:has(.current-bid:not([hidden])){position:absolute;left:50%;right:auto;top:50%;transform:translate(-50%,-50%);width:116px;height:auto;min-height:0;z-index:1;pointer-events:none}
.at-table .stage-eyebrow{font-size:12px;line-height:16px;letter-spacing:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.at-table .center-stage h2{font-size:18px;line-height:1.35;letter-spacing:0;margin-top:3px}
.at-table .center-stage p{display:none}
.at-table .current-bid{gap:6px;margin-top:1px;height:39px}
.at-table .bid-number{font-size:36px;line-height:1;letter-spacing:0}
.at-table .bid-unit{font-size:12px}
.at-table .current-bid .die{height:31px;width:29px;padding:6px;gap:2px;border-radius:6px}
.at-table .turn-message{grid-row:3;position:relative;margin:0;min-height:0;height:22px;font-size:12px;line-height:20px;gap:5px;white-space:nowrap}
.at-table .turn-clock{font-size:12px;line-height:18px;min-width:35px;padding:0 4px}
.at-table .your-hand{grid-row:4;padding:0;gap:9px;align-items:center;min-height:0}
.at-table .your-hand .die,.at-table .your-hand .die-placeholder{width:31px;height:33px;padding:6px;gap:2px;border-radius:7px;box-shadow:0 2px 0 #aaa88f}
.at-table .table #room-panel.action-panel{grid-row:5;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 8px;margin:0;padding:6px 3px 2px;background:none;border:0;border-top:1px solid #b7cca72e;border-radius:0;min-height:0;box-shadow:none}
.at-table .table #room-panel.action-panel>.panel-heading,.at-table #action-title,.at-table #action-description{display:none}
.at-table #bid-controls,.at-table .room-invite,.at-table .room-tools{grid-column:1/-1}
.at-table .room-invite{margin:0;padding:3px 7px}
.at-table .room-invite strong{font-size:17px;line-height:1.3}
.at-table .room-invite span{display:none}
.at-table .table #room-panel.action-panel:has(#bid-controls:not([hidden])) .room-invite{display:none}
.at-table .bid-wheel-labels{margin:0 0 2px;line-height:17px;font-size:14px}
.at-table .bid-wheels{border-radius:11px;background:#102219a6}
.at-table .bid-wheel{height:106px;padding:31px 0}
.at-table .wheel-number{font-size:30px}
.at-table .wheel-unit{font-size:14px}
.at-table .bid-wheel .die{width:31px;height:33px;padding:6px;gap:2px}
.at-table .bid-wheel-notes{display:none}
.at-table .bid-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.at-table .table #room-panel.action-panel>.primary-button,.at-table .table #room-panel.action-panel>.challenge-button{margin:0;padding:9px 5px;font-size:14px;line-height:22px;min-height:44px;border-radius:9px;align-self:stretch}
.at-table .table #room-panel.action-panel:has(#bid-controls:not([hidden])){grid-template-columns:repeat(3,minmax(0,1fr))}
.at-table #primary{grid-column:1}.at-table #precall-toggle{grid-column:2}.at-table #challenge{grid-column:3}
.at-table .table #room-panel.action-panel:has(#bid-controls[hidden]) #primary{grid-column:1/-1}
.at-table .room-tools{margin:0;gap:8px;min-height:0}
.at-table .room-tools .text-button{font-size:12px;padding:2px 0}
.at-table.practice .room-tools{display:none}
.at-table .is-revealed .dice-cup{transform:translateY(-10px) rotate(-9deg)}
.at-table .mp-toast{bottom:auto;top:8px;font-size:13px;padding:8px 12px;max-width:calc(100vw - 20px);pointer-events:none}
@media(min-width:900px) and (min-height:520px){
  .at-table .app{grid-template-rows:42px 28px minmax(0,1fr);padding:12px 18px 14px;gap:6px}
  .at-table .topbar .quiet-button{font-size:14px;padding:7px 12px}
  .at-table .table{grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:25px minmax(0,1fr) 28px 52px;gap:6px 18px;padding:14px 18px}
  .at-table .table-top{grid-column:1/-1}
  .at-table .table-arena{grid-column:1;grid-row:2}
  .at-table .turn-message{grid-column:1;grid-row:3}
  .at-table .your-hand{grid-column:1;grid-row:4}
  .at-table .table #room-panel.action-panel{grid-column:2;grid-row:2/-1;align-self:center;border:1px solid #b7cca733;border-radius:14px;padding:14px;gap:12px 8px;background:#122a21b0}
  .at-table .bid-wheel{height:176px;padding:66px 0}
  .at-table .seat{width:106px;height:104px}
  .at-table .seat:nth-child(1){top:calc(100% - 52px)}.at-table .seat:nth-child(2),.at-table .seat:nth-child(6){top:calc(100% - 70px)}
  .at-table .seat:nth-child(3),.at-table .seat:nth-child(5){top:70px}.at-table .seat:nth-child(4){top:52px}
  .at-table .seat-card{padding:7px;min-height:44px}.at-table .seat .cup-space{height:60px}.at-table .dice-cup{height:69px;width:52px}
  .at-table .seat .seat-bid{height:29px;min-width:77px}.at-table .seat .seat-bid .die{width:21px;height:22px}
  .at-table .center-stage,.at-table .center-stage:has(.current-bid:not([hidden])){width:150px}
  .at-table .center-stage h2{font-size:23px}.at-table .bid-number{font-size:48px}.at-table .current-bid{height:56px}.at-table .current-bid .die{width:37px;height:39px}
  .at-table .your-hand .die{width:40px;height:43px;padding:8px}
  .at-table .table::before{inset:50px 340px 86px 28px}
}
@media(orientation:landscape) and (max-height:519px){
  .at-table .app{grid-template-rows:30px minmax(0,1fr);padding:4px max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));gap:3px}
  .at-table .game-meta{display:none}
  .at-table .table{grid-template-columns:minmax(0,1fr) clamp(185px,32vw,245px);grid-template-rows:20px minmax(0,1fr) 20px 34px;gap:0 8px;padding:4px 8px}
  .at-table .table-top{grid-column:1/-1}.at-table .table-arena{grid-column:1;grid-row:2}
  .at-table .turn-message{grid-column:1;grid-row:3;font-size:12px}.at-table .your-hand{grid-column:1;grid-row:4}
  .at-table .table #room-panel.action-panel{grid-column:2;grid-row:2/-1;align-self:center;padding:6px;border:1px solid #b7cca72e;border-radius:11px;background:#102219b0;gap:6px}
  .at-table .table #room-panel.action-panel>.primary-button,.at-table .table #room-panel.action-panel>.challenge-button{font-size:13px}
  .at-table .seat{width:75px;height:62px}.at-table .seat-card{min-height:30px;padding:2px 4px}.at-table .seat-name{font-size:13px;line-height:17px}
  .at-table .seat:nth-child(1){top:calc(100% - 31px)}.at-table .seat:nth-child(2),.at-table .seat:nth-child(6){top:calc(100% - 34px)}
  .at-table .seat:nth-child(3),.at-table .seat:nth-child(5){top:34px}.at-table .seat:nth-child(4){top:31px}
  .at-table .seat .cup-space{height:32px}.at-table .dice-cup{height:38px;width:28px}
  .at-table .seat .seat-bid{height:23px;min-width:60px;padding:2px 4px;gap:3px}.at-table .seat .seat-bid strong{font-size:15px}
  .at-table .center-stage,.at-table .center-stage:has(.current-bid:not([hidden])){width:107px}
  .at-table .current-bid{height:29px}.at-table .bid-number{font-size:28px}.at-table .current-bid .die{width:23px;height:25px;padding:4px}
  .at-table .stage-eyebrow{font-size:11px;line-height:13px}.at-table .center-stage h2{font-size:15px;line-height:18px;margin-top:1px}
  .at-table .table::before{inset:30px 35% 55px 17px}
}
@media(max-width:360px) and (orientation:portrait){
  .at-table .app{padding-left:7px;padding-right:7px;grid-template-rows:32px 23px minmax(0,1fr)}
  .at-table .brand{gap:4px}.at-table .brand h1{font-size:17px}.at-table .brand-icon{width:23px;height:26px;font-size:25px}
  .at-table .topbar nav{gap:3px}.at-table .topbar .quiet-button{font-size:12px;padding:7px 5px}
  .at-table .seat{width:78px}.at-table .seat-name{font-size:13px}
  .at-table .center-stage,.at-table .center-stage:has(.current-bid:not([hidden])){width:109px}
}
@media(max-height:560px) and (orientation:portrait){
  .at-table .app{grid-template-rows:30px 22px minmax(0,1fr);padding-top:4px;padding-bottom:4px}
  .at-table .table{grid-template-rows:20px minmax(0,1fr) 20px 32px auto;padding-top:4px;padding-bottom:4px}
  .at-table .bid-wheel{height:88px;padding:22px 0}
  .at-table .seat{height:62px}.at-table .seat-card{min-height:30px;padding:2px 4px}.at-table .seat-name{font-size:13px;line-height:17px}
  .at-table .seat:nth-child(1){top:calc(100% - 31px)}.at-table .seat:nth-child(2),.at-table .seat:nth-child(6){top:calc(100% - 34px)}
  .at-table .seat:nth-child(3),.at-table .seat:nth-child(5){top:34px}.at-table .seat:nth-child(4){top:31px}
  .at-table .seat .cup-space{height:32px}.at-table .dice-cup{height:38px;width:28px}
  .at-table .seat .seat-bid{height:23px}
  .at-table .current-bid{height:29px}.at-table .bid-number{font-size:28px}.at-table .current-bid .die{width:23px;height:25px;padding:4px}
  .at-table .stage-eyebrow{display:none}.at-table .center-stage h2{font-size:15px;line-height:18px;margin-top:1px}
}

/* Keep leaving a room visible, separate from game actions and settings. */
.topbar .table-exit { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; gap:1px; min-width:58px; min-height:44px; padding:0 8px 0 4px; border:1px solid #aca0d542; border-radius:11px; background:#25223b; color:#e6e0fa; font:600 12px/1.2 var(--font); white-space:nowrap; cursor:pointer; touch-action:manipulation; }
.topbar .table-exit[hidden] { display:none; }
.topbar .table-exit svg { flex-shrink:0; }
.topbar .table-exit:focus-visible { outline:2px solid #79e5e8; outline-offset:2px; }
.topbar .table-exit:disabled { opacity:.5; cursor:wait; }
.at-table .topbar .brand-icon { display:none; }
@media (max-width:360px) { .at-table .topbar .brand h1 { font-size:16px; letter-spacing:0; } }
