/* OnlineRoundTable proportions: 6px edges, 5px gaps, compact spectators and a single own row. */
body.table-mode { height: 100dvh; min-height: 0; overflow: hidden; background: #193d38; }
body.table-mode > .topbar { display: none; }
body.table-mode > main { max-width: none; height: 100%; padding: env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px); }
.android-table { --card-w: clamp(30px,6.5dvh,58px); height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 5px; padding: 6px; }
.android-table .table { --side-w: clamp(120px,22vw,260px); --spectator-h: calc(var(--spectator-rows) * 40px); --opposite-h: min(95px,17dvh); flex: 1 1 0; height: auto; min-height: 0; }
.android-table .felt-ring { inset: var(--spectator-h) calc(var(--side-w) + 6px) 0; border: 1px solid #759487; border-radius: 9px; outline: none; background: radial-gradient(ellipse at center,#2e6053,#1d463d); box-shadow: inset 0 0 30px #102c2b55; }
.android-table .table-center { inset: calc(var(--spectator-h) + min(1,var(--opposite-count)) * var(--opposite-h)) calc(var(--side-w) + 6px) 0; display: grid; grid-template-columns: 42px minmax(0,1fr); grid-template-rows: minmax(0,1fr) 24px; gap: 4px; padding: 5px; }
.android-table .table-cards { grid-column: 2; grid-row: 1; gap: 5px; padding: 5px; align-content: center; max-height: 100%; }
.android-table .table-group { gap: 0; padding: 0; background: transparent; }
.android-table .table-group .card + .card { margin-left: calc(var(--card-w) * -.5); }
.android-table .deck { grid-column: 1; grid-row: 1; flex-direction: column; align-self: center; }
.android-table .deck .card { width: 34px; }
.android-table .deck > span:last-child { font-size: 9px; }
.android-table .played { position: absolute; left: 3px; bottom: 30px; gap: 2px; pointer-events: none; }
.android-table .played > span:last-child { display: none; }
.table-status { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; align-items: center; gap: 9px; font-size: 11px; color: #e2ebdf; white-space: nowrap; overflow: hidden; }
.table-status #deadline { color: #f6c453; min-width: 38px; }
.android-table .seat { width: var(--side-w); min-height: 0; padding: 4px; border-radius: 8px; background: #244e42; border-color: #51796a; box-shadow: none; transform: none; inset: auto; overflow: visible; }
.android-table .seat.active { background: #776029; border-color: #f6c453; box-shadow: 0 0 0 1px #f6c45388; }
.android-table .seat[data-seat-role="left"], .android-table .seat[data-seat-role="right"] { top: calc(var(--spectator-h) + var(--slot) * ((100% - var(--spectator-h) - (var(--slots) - 1) * 5px) / var(--slots) + 5px)); height: calc((100% - var(--spectator-h) - (var(--slots) - 1) * 5px) / var(--slots)); }
.android-table .seat[data-seat-role="left"] { left: 0; }
.android-table .seat[data-seat-role="right"] { right: 0; }
.android-table .seat[data-seat-role="opposite"] { top: var(--spectator-h); left: calc(var(--side-w) + 6px + var(--slot) * ((100% - var(--side-w) * 2 - 12px) / var(--slots))); width: calc((100% - var(--side-w) * 2 - 12px) / var(--slots) - 5px); height: calc(var(--opposite-h) - 5px); }
.android-table .seat[data-seat-role="spectator"] { top: calc(var(--spectator-row) * 40px); left: calc((100% - min(var(--slots),3) * min(31vw,260px) - (min(var(--slots),3) - 1) * 5px) / 2 + var(--spectator-col) * (min(31vw,260px) + 5px)); width: min(31vw,260px); height: 35px; display: flex; gap: 5px; align-items: center; justify-content: space-between; padding: 2px 6px; }
.android-table .seat[data-seat-role="spectator"] .seat-name { max-width: 50%; font-size: 12px; }
.android-table .seat[data-seat-role="spectator"] .seat-core { display: contents; }
.android-table .seat[data-seat-role="spectator"] .seat-cards { display: none; }
.android-table .seat[data-seat-role="spectator"] .seat-status { font-size: 9px; max-width: 70px; margin: 0; }
.android-table .seat[data-seat-role="spectator"] .seat-balance { display: flex; gap: 2px; align-items: center; }
.android-table .seat[data-seat-role="spectator"] .android-basket { width: 30px; height: 23px; }
.android-table .seat-name { font-size: 12px; line-height: 16px; }
.android-table .seat-status { margin: 0 auto; font-size: 9px; padding: 0 3px; }
.android-table .seat:not([data-seat-role="spectator"]) .seat-core { height: calc(100% - 28px); min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 48px; grid-template-rows: minmax(0,1fr); gap: 4px; align-items: center; }
.android-table .seat-cards { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.android-table .opponent-hand { height: 35%; min-height: 10px; max-height: 42px; margin: 1px 0; }
.android-table .opponent-hand .card { height: 100%; width: auto; max-height: 40px; aspect-ratio: 210/324; }
.android-table .opponent-hand .card + .card { margin-left: -2px; }
.android-table .opponent-hand > span:last-child { font-size: 9px; }
.android-table .seat-captured { margin: 0; padding: 2px; min-height: 0; flex: 1 1 0; max-height: 100%; overflow: hidden; border-radius: 5px; background: #16382e; }
.android-table .capture-count { font-size: 9px; line-height: 12px; white-space: nowrap; }
.captured-row { display: flex; flex: 1 1 0; align-items: center; gap: 5px; width: 100%; min-height: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 1px 2px; }
.captured-family { display: flex; flex: 0 0 auto; height: 100%; max-height: 28px; }
.captured-family .card { width: auto; height: 100%; border-radius: 2px; }
.captured-family .card + .card { margin-left: -6px; }
.android-table .seat-balance { margin: 0; color: #f6ead0; font-size: 13px; line-height: 16px; }
.android-basket { display: block; width: 48px; height: 43px; overflow: visible; margin: auto; }
.basket-number { display: inline; font-size: inherit !important; color: inherit !important; }
.android-table .seat[data-playing="false"]:not(.preparing):not(.choosing) > .seat-core { opacity: .23; filter: saturate(.15) brightness(.65); }
.android-table .forced-card { top: auto; bottom: 0; left: auto; right: 0; transform: none; margin: 0; }
.player-dock { flex: 0 0 clamp(75px,24dvh,100px); display: grid; grid-template-columns: minmax(104px,144px) minmax(140px,236px) 64px 44px minmax(72px,1fr); gap: 6px; align-items: stretch; justify-content: center; max-width: 940px; width: 100%; margin: 0 auto; }
.android-table.observing .player-dock { flex-basis: 64px; grid-template-columns: minmax(104px,144px) 54px 44px minmax(72px,100px); width: auto; gap: 8px; }
.android-table.observing .hand-area { display: none; }
.android-table.observing .own-basket .android-basket { width: 40px; height: 28px; }
.player-dock .own-tray { background: #214f42; border-color: #719483; }
.player-dock .own-tray .captured-row { height: calc((100% - 16px)/2); align-items: center; }
.player-dock .own-tray .captured-family { max-height: 36px; }
.player-dock .own-tray .card { width: auto; }
.player-dock .own-tray .card + .card { margin-left: -9px; }
.player-dock .own-tray .capture-count { font-size: 11px; }
.android-table .hand-area { position: relative; padding: 0; margin: 0; overflow: visible; min-width: 0; border-radius: 6px; }
.android-table .hand-area.active { box-shadow: inset 0 0 0 1px #f6c45366; }
.android-table .hand-label { height: 17px; margin: 0; font-size: 12px; line-height: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.android-table .hand { gap: 6px; width: 100%; min-width: 0; min-height: 0; height: calc(100% - 17px); align-items: center; padding: 2px 0; overflow: hidden; }
.android-table .hand .card { --card-w: min(50px,10.7dvh); width: min(var(--card-w),calc((100% - 18px)/4)); max-height: 100%; flex-shrink: 1; }
.android-table .hand .card-points { display: none; }
.own-basket { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.own-basket .android-basket { width: 62px; height: 56px; }
.own-basket .seat-balance { font-size: 14px; }
.own-basket button { min-height: 24px; min-width: 0; padding: 1px 4px; font-size: 10px; }
.android-table .chat-controls { position: relative; display: flex; align-items: center; justify-content: center; margin: 0; }
.android-table .chat-controls > button { padding: 5px; min-width: 42px; height: 42px; font-size: 11px; }
.android-table #chat-clock { position: absolute; bottom: 0; left: 0; right: 0; margin: 0; font-size: 9px; line-height: 11px; text-align: center; }
.android-table .chat-phrases { position: fixed; z-index: 30; bottom: max(110px,27dvh); right: max(8px,env(safe-area-inset-right)); width: 260px; padding: 10px; background: #1a342b; border: 1px solid #d3b46b; border-radius: 9px; }
.dock-actions { display: flex; flex-direction: column; justify-content: center; align-items: end; gap: 3px; }
.dock-actions button { min-height: 28px; max-height: 32px; padding: 3px 8px; font-size: 11px; background: #193d38; color: #fff7e4; border-color: #afba94; }
.dock-connection,.dock-actions .code-tag { font-size: 8px; color: #b9cfbf; }
.android-table .decision-panel { flex: 0 0 auto; min-height: 19px; width: auto; max-width: 100%; margin: 0 auto; padding: 0 6px; border: 0; background: transparent; gap: 12px; }
.android-table .decision-panel strong { font-size: 11px; line-height: 18px; }
.android-table .decision-panel .decision-buttons { gap: 6px; margin: 0; flex: none; }
.android-table .decision-buttons button { min-height: 32px; padding: 3px 12px; font-size: 12px; }
.android-table .decision-panel.actionable { color: #f6c453; box-shadow: none; }
.android-table .game-menu { top: auto; bottom: max(8px,env(safe-area-inset-bottom)); right: max(8px,env(safe-area-inset-right)); max-height: calc(100dvh - 16px); width: 285px; padding: 12px; }
.android-table .game-menu p { margin: 3px 0; font-size: 12px; }
.menu-scrim { position: fixed; inset: 0; z-index: 24; background: #071e1866; }
.install-entry { text-align: center; margin: 14px auto; }.install-entry button { background: transparent; color: #f5eddc; border-color: #78917a; }
.android-table .game-menu > button { min-height: 30px; margin: 4px 0; padding: 4px 8px; font-size: 12px; }
.android-table .ballot { position: fixed; z-index: 22; left: 50%; top: 10px; transform: translateX(-50%); width: min(380px,80vw); margin: 0; padding: 10px; }
.android-table .ballot h2 { font-size: 18px; margin: 0; }.android-table .ballot p { font-size: 12px; margin: 4px 0; }
.android-table .reseat-note { position: absolute; bottom: 105px; left: 25%; right: 25%; pointer-events: none; font-size: 10px; margin: 0; }
.android-table .entry-payment { position: absolute; top: 45%; left: 30%; right: 30%; font-size: 12px; }
.table-mode > #notice:not([hidden]) { position: fixed; z-index: 55; top: 6px; left: 15%; right: 15%; padding: 8px; }
.table-mode .pending { position: fixed; z-index: 35; top: 5px; left: 20%; right: 20%; margin: 0; padding: 6px; gap: 4px; font-size: 11px; }
.table-mode .pending button { min-height: 28px; padding: 3px 6px; font-size: 10px; }
.table-mode .inspection { width: min(760px,78vw); max-height: calc(100dvh - 16px); padding: 12px; }
.table-mode .inspection h2 { font-size: 18px; }.table-mode .inspection p { margin: 5px 0; font-size: 12px; }
.table-mode .inspection-cards .card { width: min(48px,10dvh); }
.hold-inspection,.hold-inspection .inspection-backdrop { pointer-events: none; }.hold-inspection [data-action="close-inspection"] { display: none; }
.table-mode .settlement { height: 100%; padding: 6px; overflow: auto; }
.table-mode .settlement h1 { font-size: 18px; margin: 2px 0 8px; }
.table-mode .settlement-players { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
.table-mode .settlement-player { min-width: 0; padding: 6px; }.table-mode .settlement-player h2 { font-size: 13px; margin: 0; }
.table-mode .settlement-player p { font-size: 11px; margin: 3px 0; }.table-mode .settlement-player button { min-height: 28px; padding: 3px; font-size: 11px; }
.table-mode .score-cards .card { width: min(23px,5dvh); }.table-mode .score-cards { min-height: 30px; }
.rotate-screen { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; padding: 24px; background: #193d38; }
.rotate-screen h1 { margin: 0; font-size: 30px; }.rotate-screen p { margin: 0; max-width: 340px; }.rotate-screen .fine { color: #b8cabb; font-size: 12px; }
.rotate-phone { font-size: 64px; color: #f6c453; }.rotate-screen button { min-width: 200px; }
.card-preview .card { width: auto; height: min(75dvh,340px); max-width: 85vw; }
.wealth-figure { width: 42px; height: 42px; display: block; animation: wealth-breathe 850ms ease-in-out infinite alternate; }
.wealth-mascot { width: 100%; height: 100%; animation: wealth-rock 1150ms ease-in-out infinite alternate; }
@keyframes wealth-breathe { from { transform: scale(.96); } to { transform: scale(1.06); } }
@keyframes wealth-rock { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.android-table .panel-announcement { padding: 3px; gap: 2px; }.android-table .panel-announcement strong { font-size: clamp(12px,3dvh,23px); }.android-table .panel-announcement > span:not(.card) { font-size: 9px; }
.android-table .panel-announcement .card.small { width: 24px; }.android-table .seat[data-seat-role="spectator"]:has(.panel-announcement) { height: min(100px,26dvh); z-index: 18; }
.android-table .chat-bubble { font-size: 12px; padding: 5px 8px; bottom: 100%; max-width: 160px; white-space: normal; }
.android-table [data-seat-role="left"] .chat-bubble { left: 100%; bottom: 50%; transform: none; }.android-table [data-seat-role="right"] .chat-bubble { left: auto; right: 100%; bottom: 50%; transform: none; }
@media (max-height: 360px) and (orientation: landscape) {
  .android-table { --card-w: 30px; padding: 3px; gap: 3px; }.android-table .table { --spectator-h: calc(var(--spectator-rows)*32px); --opposite-h: 51px; }
  .android-table .seat[data-seat-role="spectator"] { height: 28px; }.android-table .seat-name { font-size: 10px; line-height: 13px; }.android-table .seat-status { font-size: 8px; }
  .player-dock { flex-basis: 72px; grid-template-columns: 104px minmax(124px,200px) 52px 42px minmax(64px,1fr); gap: 4px; }
  .own-basket .android-basket { width: 48px; height: 44px; }.android-table .hand .card { --card-w: 35px; }.android-table .capture-count { font-size: 8px; }
  .android-table .seat:not([data-seat-role="spectator"]) .seat-core { height: calc(100% - 23px); grid-template-columns: minmax(0,1fr) 38px; }.android-table .seat-core .android-basket { width: 36px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .wealth-figure,.wealth-mascot { animation: none; } }
