/* One balanced table, with all game controls floating above the felt. */
.game-shell.live-game{position:relative;padding:0!important;gap:0!important;background:#071e24;isolation:isolate}
.game-shell.live-game:not(.replay-game){--controls-lift:0px;--dock-height:160px;--action-lift:0px}
.game-shell.live-game>.table.seat-table{position:absolute!important;inset:12px!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;min-height:0;border:1px solid #b9d6b446;border-radius:26px;background:radial-gradient(ellipse at 50% 45%,#246755 0%,#12453d 59%,#0c302f 100%);box-shadow:inset 0 0 65px #021e2740;z-index:0;overflow:hidden}
.table-watermark{position:absolute;top:70px;left:50%;transform:translateX(-50%);z-index:2;max-width:64%;font-size:13px;letter-spacing:1px;white-space:nowrap;text-align:center;color:#c3d3b781;pointer-events:none;user-select:none}
.table-settings{position:absolute;top:23px;right:82px;z-index:45;width:34px;height:34px;padding:6px;display:grid;place-items:center;color:#d7dfcb;background:#082f3066;border:1px solid #c7d6bf30;border-radius:50%;cursor:pointer}
.table-settings svg,.sound-button svg{display:block;width:21px;height:21px}
.table-settings:hover{background:#144b4488;color:#ffe1a1}.table-settings:focus-visible{outline:2px solid #edcb80;outline-offset:3px}
.game-shell.live-game>.table .table-hud{top:10px;gap:7px;padding:0 6px;border:0;background:transparent;box-shadow:none;max-height:44px;font-size:10px;color:#b4c9b8}
.game-shell.live-game .table-hud b{font-size:17px;color:#efd28c}.game-shell.live-game .table-hud .mini .card{width:23px;min-width:23px;height:34px;font-size:12px;line-height:1.1;margin:0 1px;border-radius:4px}
.game-shell.live-game .table-hud .mini .card small{font-size:11px;line-height:1}.game-shell.live-game .table-hud .wild-indicator>small{font-size:9px}
.game-shell.live-game .table-status{top:86px;font-size:10px;line-height:1.2;color:#bbd1bd9c;pointer-events:none;max-height:20px}

/* Avatars have no surrounding player card. Identity detail is available by hold. */
.game-shell.live-game .table-player{position:absolute;top:46px;width:72px;min-width:0;padding:0!important;display:flex;flex-direction:column;align-items:flex-start;gap:4px;background:none!important;border:0!important;outline:none!important;box-shadow:none!important;border-radius:0;z-index:5;overflow:visible}
.game-shell.live-game .table-player.player-left{left:11px}.game-shell.live-game .table-player.player-right{right:11px;align-items:flex-end}
.player-avatar{position:relative;display:block;flex:0 0 auto;width:42px;height:42px;padding:0!important;min-width:0;min-height:0;background:transparent;border:0;border-radius:50%;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.game-shell.live-game .player-avatar .avatar{display:block;width:100%;height:100%;margin:0!important;border:1px solid #e4dfc13b;border-radius:50%;object-fit:cover;pointer-events:none}
.game-shell.live-game .table-player.active .player-avatar,.game-shell.live-game .self-player.active .player-avatar{box-shadow:0 0 0 3px #e8c572,0 0 16px #e5bd5544}
.player-nickname{display:block;max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;line-height:1.25;color:#e6eddd;text-shadow:0 1px 3px #08231c}
.landlord-hat{position:absolute;left:3px;top:-14px;width:36px;height:23px;overflow:visible;pointer-events:none;filter:drop-shadow(0 2px 2px #0004)}
.player-avatar:focus-visible{outline:2px solid #ffe7ac;outline-offset:5px}
.table-player .avatar-clock{position:absolute;right:0;top:12px;display:grid;place-items:center;height:24px;min-width:24px;font-size:13px;margin:0;border-width:1px;pointer-events:none}

/* The dock is transparent so the felt and equal outside margins remain visible. */
.game-shell.live-game .hand-dock{position:fixed;bottom:12px!important;left:50%;transform:translateX(-50%);width:calc(100% - 24px)!important;max-width:none;height:192px!important;background:transparent!important;z-index:10;overflow:clip}
.game-shell.live-game .hand-dock.hand-entering{overflow:visible}
.game-shell.live-game .hand-dock .self-player{position:absolute;top:36px!important;left:12px!important;right:auto!important;max-width:180px!important;display:flex;flex-direction:row;align-items:center;gap:9px;font-size:12px;line-height:1.2;background:none!important;border:0!important;outline:none!important;box-shadow:none!important;padding:0;border-radius:0}
.self-player .player-avatar{width:42px;height:42px}.self-caption{min-width:0;max-width:120px;display:flex;flex-direction:column;gap:5px}.self-caption strong{font-size:12px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.self-caption small{font-size:11px;font-weight:400;letter-spacing:.3px;color:#d4c58e}
.game-shell.live-game:not(.replay-game) .hand-dock .actions{position:absolute;top:20px!important;left:50%!important;right:auto!important;transform:translateX(-50%) translateY(calc(-1 * var(--controls-lift,0px)));width:max-content;max-width:calc(100% - 180px);height:32px;min-height:32px!important;gap:7px;flex-wrap:nowrap;align-items:center;z-index:20}
.game-shell.live-game .hand-dock .actions button{height:32px;min-height:32px;min-width:60px;padding:5px 10px;font-size:13px;line-height:20px;border-radius:10px;white-space:nowrap;box-shadow:0 3px 9px #06272033}
.game-shell.live-game .hand-dock .actions .action-clock{height:28px;min-width:46px;font-size:16px;padding:0 3px}.game-shell.live-game .action-clock .alarm-icon{font-size:19px}
.game-shell.live-game .hand-dock .hand{position:absolute;top:88px!important;left:16px;right:16px;height:96px;margin:0;padding:0}
.game-shell.live-game .hand .card{height:96px!important;border-radius:9px;border-width:1px;box-shadow:-2px 1px 5px #0005}
.game-shell.live-game .hand .card.selected{transform:translateY(-16px);border-color:#e4bc68;background:linear-gradient(135deg,#fff0bb,#efd58d)}
.game-shell.live-game .hand .card-corner{top:3px!important;left:-1px!important;width:var(--exposed-width);font-size:var(--rank-size)!important;line-height:1;gap:1px;font-weight:800}
.game-shell.live-game .hand .card small{font-size:calc(var(--rank-size)*.8)!important;line-height:1}.game-shell.live-game .hand .replacement .card-rank{font-size:12px!important;letter-spacing:0;line-height:1}
.game-shell.live-game .hand .card-watermark{top:57px;font-size:45px;opacity:.09}

/* Exact centering accounts for the two-pixel border of exposed table cards. */
.game-shell .seat-table .stacked-cards .card-corner{left:-2px!important;width:min(36px,var(--play-exposed-width,25px));align-items:center;text-align:center}
.game-shell.live-game>.seat-table .played-seat{max-width:none;width:28%;gap:3px}
.game-shell.live-game>.seat-table .seat-left{left:10%;top:21px}
.game-shell.live-game>.seat-table .seat-right{right:10%;top:21px}
.game-shell.live-game>.seat-table .seat-left.plain-play,.game-shell.live-game>.seat-table .seat-right.plain-play{top:46px}
.game-shell.live-game>.seat-table .seat-left.pass-seat,.game-shell.live-game>.seat-table .seat-right.pass-seat{top:58px}
.game-shell.live-game>.seat-table .seat-self{left:50%;top:auto;bottom:184px;width:30%;transform:translateX(-50%)}
.game-shell.live-game>.seat-table .play-owner{display:none}
.game-shell.live-game>.seat-table .combo-name{font-size:21px;color:#efd698;font-weight:750;text-shadow:0 2px 4px #0b382a}
.game-shell.live-game>.seat-table .pass-label{font-size:22px;font-weight:700;color:#d9c48b;letter-spacing:2px}

/* SVG letters avoid minimum-font-size and vertical text clipping in Android WebView. */
.game-shell.live-game .card.joker .card-rank{writing-mode:horizontal-tb!important;text-orientation:mixed!important;font-size:0!important;line-height:0!important;height:auto!important;min-height:0;transform:none!important;margin:0!important;letter-spacing:0;flex:0 0 auto}
.joker-word{display:block;width:11px;height:42px;overflow:hidden;flex:none}
.game-shell.live-game .hand .joker .card-corner{top:3px!important;gap:0}
.game-shell.live-game .hand .joker small{height:8px;line-height:8px;font-size:8px!important;margin:0;display:block}
.game-shell .seat-table .stacked-cards .joker .joker-word{width:9px;height:32px}
.game-shell .seat-table .stacked-cards .joker small{display:none!important}
.game-shell .seat-table .two-rows .joker .joker-word{width:7px;height:24px}
.game-shell .seat-table .table-hud .joker-word{width:7px;height:27px}
.game-shell .seat-table .table-hud .joker small{display:none}
.game-shell .seat-table .stacked-cards .joker .card-corner{top:3px;gap:0}

/* Replay uses the same table, identity, faces and watermark, with a bottom transport. */
.game-shell.replay-game .table-player{top:46px}
.game-shell.replay-game .replay-side-hand{top:128px;bottom:auto;width:25%;max-width:270px;gap:3px}
.game-shell.replay-game .replay-side-hand.side-left{left:9px}.game-shell.replay-game .replay-side-hand.side-right{right:9px}
.game-shell.replay-game .replay-hand-row.stacked-cards{height:clamp(26px,calc(20vh - 42px),34px);flex-basis:clamp(26px,calc(20vh - 42px),34px)}
.game-shell.replay-game .replay-hand-row.stacked-cards .card{height:clamp(26px,calc(20vh - 42px),34px)}
.game-shell.replay-game .replay-hand-row .card-corner{font-size:min(var(--play-rank-size),clamp(12px,calc(4vh - 1px),15px))!important;top:1px}
.game-shell.replay-game .replay-hand-row .joker-word{height:22px}
.game-shell.replay-game>.seat-table .seat-left{left:20%;width:15%;top:21px}
.game-shell.replay-game>.seat-table .seat-right{right:20%;width:15%;top:21px}
.game-shell.replay-game>.seat-table .seat-left.plain-play,.game-shell.replay-game>.seat-table .seat-right.plain-play{top:46px}
.game-shell.replay-game>.seat-table .seat-left.pass-seat,.game-shell.replay-game>.seat-table .seat-right.pass-seat{top:58px}
.game-shell.replay-game>.seat-table .seat-self{bottom:132px;width:14%}
.game-shell.replay-game>.seat-table .combo-name{font-size:17px;letter-spacing:0}.game-shell.replay-game>.seat-table .pass-label{font-size:18px;letter-spacing:0}
.game-shell.replay-game .hand-dock{bottom:50px!important}
.game-shell.replay-game .hand-dock .self-player{top:62px!important;max-width:185px!important}
.game-shell.replay-game .self-player .player-avatar{width:32px;height:32px}.game-shell.replay-game .self-caption strong{font-size:11px}.game-shell.replay-game .self-caption small{font-size:10px}
.game-shell.replay-game .hand .card-corner{font-size:min(22px,var(--rank-size))!important}.game-shell.replay-game .hand .card small{font-size:min(18px,calc(var(--rank-size)*.8))!important}
.replay-exit{position:absolute;left:82px;top:23px;width:34px;height:34px;display:grid;place-items:center;z-index:40;background:#082f3044;border:1px solid #c7d6bf28;color:#cfdbcb;border-radius:50%;font-size:24px;line-height:1;padding:0}
.game-shell.replay-game .replay-overlay-controls{bottom:20px;width:min(94%,900px);height:34px;padding:3px 7px;background:#072d2a99;border-color:#d5dfc324;backdrop-filter:blur(7px)}
.settings-section-title{font-size:13px;font-weight:500;color:#aebfb6;margin:0 0 2px}
.player-detail-heading{display:flex;align-items:center;gap:14px;padding:12px 0}.player-detail-heading .avatar{width:58px;height:58px;border:0;border-radius:50%}.player-detail-heading strong{display:block;font-size:19px}.player-detail-heading small{display:block;font-size:12px;color:#c5bb94;margin-top:6px}
.player-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:10px 0}.player-detail-grid>div{border-top:1px solid #cbdac526;padding-top:12px}.player-detail-grid dt{font-size:12px;color:#aabfb4}.player-detail-grid dd{margin:8px 0 0;font-size:20px;font-weight:650;color:#efcf8a}
@media(orientation:portrait){.table-watermark{top:75px;max-width:65%;font-size:11px}.game-shell.live-game .table-player{top:98px;left:12px}.game-shell.live-game .table-player.player-right{left:auto;right:12px}.game-shell.live-game>.seat-table .seat-left,.game-shell.live-game>.seat-table .seat-right{top:190px}.game-shell.live-game>.seat-table .table-status{top:160px}.game-shell.live-game .hand-dock .self-player{top:0!important}.game-shell.live-game:not(.replay-game) .hand-dock .actions{top:20px!important;max-width:98%;gap:6px}.game-shell.live-game .hand-dock .hand{top:104px!important}.game-shell.replay-game .replay-side-hand{top:195px;width:29%}}

@media(orientation:landscape) and (max-height:380px){.game-shell.replay-game .hand-dock .self-player{left:28%!important;top:70px!important;max-width:100px!important;gap:6px}.game-shell.replay-game .self-player .player-avatar{width:24px;height:24px}.game-shell.replay-game .self-caption{max-width:70px;gap:2px}.game-shell.replay-game .self-caption strong,.game-shell.replay-game .self-caption small{font-size:10px}}

/* Keep avatar edges aligned with the local player's 24px screen margin. */
.player-nickname,.player-count{width:72px;max-width:72px;text-align:center;line-height:1.25}
.player-left .player-nickname,.player-left .player-count{margin-left:-15px}
.player-right .player-nickname,.player-right .player-count{margin-right:-15px}
.player-count{font-size:11px;color:#c2d3c0;font-weight:500}
.landlord-badge{position:absolute;top:-30px;left:2px;width:38px;padding:1px 0;font-size:10px;line-height:13px;font-weight:700;letter-spacing:1px;text-align:center;color:#ffe3a0;background:#70482fe6;border:1px solid #c89c54;border-radius:5px;pointer-events:none}
.table-player.player-left .avatar-clock{left:48px;right:auto}.table-player.player-right .avatar-clock{right:48px;left:auto}
.game-shell.replay-game .table-watermark{font-size:11px;max-width:40%}

/* All local cards finish above the felt border instead of extending below it. */
.game-shell.live-game:not(.replay-game) .self-player .player-avatar{width:36px;height:36px}
.self-player .landlord-hat{left:2px;top:-14px;width:32px;height:22px}
.self-player .landlord-badge{top:auto;bottom:0;left:0;width:36px;font-size:9px;line-height:11px;letter-spacing:0}
.game-shell.replay-game .hand-dock .hand{top:118px!important;height:66px}
.game-shell.replay-game .hand .card{height:66px!important}
.game-shell.replay-game .hand-dock .self-player{top:70px!important}
.game-shell.replay-game .self-player .landlord-hat{width:26px;height:18px;left:0;top:-11px}
.game-shell.replay-game .self-player .landlord-badge{width:24px;font-size:8px;line-height:9px;bottom:-3px}
@media(orientation:portrait){.game-shell.live-game:not(.replay-game) .hand-dock .hand{top:88px!important}.game-shell.live-game:not(.replay-game) .hand-dock .actions{top:20px!important}}
