/* Mobile table redesign: dedicated card stage, compact decisions, quiet chrome. */
:root{--table-bg:#101e24;--table-panel:#192c33;--table-felt:#24574e;--table-accent:#edc889;--table-text:#faf5e9;--table-muted:#9bb4b8;--table-radius:16px;--table-gap:12px}
body.poker-game-active{background:var(--table-bg)}
body.poker-game-active .shell,body.poker-game-active .main{background:var(--table-bg)}
.poker-page .poker-command{background:var(--table-panel);border:0;border-radius:20px;padding:16px!important}
.poker-page .poker-compact-heading{font-size:14px;color:var(--table-text);margin-bottom:12px;justify-content:space-between}
.poker-page .poker-compact-heading .poker-countdown{border:0;background:#edc88915;color:var(--table-accent);border-radius:8px;height:28px;min-width:52px;flex-direction:row;align-items:center;font-size:13px;gap:3px}
.poker-page .poker-compact-heading .poker-countdown small{font-size:10px}
.poker-page .poker-compact-heading .poker-peek{display:none}
.poker-page .poker-compact-command .poker-action-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px}
.poker-page .poker-compact-command .poker-action-grid button{min-height:48px;font-size:15px;border-radius:12px}
.poker-page .poker-compact-command .poker-action-grid .poker-raise-toggle{background:var(--table-accent);color:#30271d}
.poker-page .poker-compact-command .poker-action-grid .poker-primary{background:#326b60;color:var(--table-text)}
.poker-page .poker-compact-command .poker-action-grid .poker-fold-action{background:#223940;border:0;color:#c1cdd0}
.poker-page .poker-compact-command .poker-raise{display:none;margin-top:14px;padding-top:14px;border-color:#9bb4b820}
.poker-page .poker-compact-command .poker-raise.raise-open{display:block}
.poker-page .poker-custom-raise{display:block;padding-top:10px}
.poker-page .poker-raise-presets{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.poker-page .poker-raise-presets button{font-size:12px;min-height:36px;background:#28434a;border:0;color:#d2dedb}
.poker-page .poker-raise-input-label{font-size:12px;flex-wrap:nowrap}
.poker-page #pokerRaiseTo{width:110px;max-width:110px;background:#101e24;border:1px solid #577174;border-radius:10px;color:var(--table-accent);font-size:24px;min-height:44px;text-align:center}
.poker-page .poker-raise-stepper{display:none!important}
.poker-page .poker-raise-range{height:32px;min-height:32px;margin:8px 0;accent-color:var(--table-accent)}
.poker-page .poker-compact-command .poker-raise-cost{font-size:11px;margin:4px 0;color:var(--table-muted)}
.poker-page .poker-compact-command .poker-raise-confirm{min-height:46px;margin-top:10px;background:var(--table-accent);color:#30271d;border-radius:12px;font-size:15px}
.poker-page .poker-sheet-secondary{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.poker-page .poker-sheet-secondary button{font-size:11px;min-height:32px;border:0;background:transparent;color:var(--table-muted);padding:4px 0}
.poker-page .poker-sheet-secondary .poker-allin-action{color:#efa68d;background:transparent!important;min-height:32px;font-size:11px}
.poker-page .poker-hand-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;margin:8px 0 12px;border-radius:16px;background:#192c3399;color:var(--table-muted);font-size:11px}
.poker-page .poker-hand-bar strong{display:block;color:var(--table-accent);font-size:22px;font-variant-numeric:tabular-nums;margin-top:2px}
.poker-page .poker-hand-bar .poker-my-hand{position:static;transform:none;width:auto;max-width:none;margin:0;text-align:center}
.poker-page .poker-hand-bar .poker-hand{margin:0;gap:8px}
.poker-page .poker-hand-bar .poker-my-hand .playing-card{width:48px!important;flex:0 0 48px!important;height:66px!important;border-radius:8px}
.poker-page .poker-hand-bar .poker-my-hand small{display:none}
.poker-page .poker-chat{display:flex;gap:8px;margin:12px 0!important;max-width:none}
.poker-page .poker-chat input{background:#192c33;border:1px solid #344b53;color:var(--table-text);border-radius:12px;min-height:40px;font-size:12px}
.poker-page .poker-chat button{background:#28434a;color:#cbdad9;border-radius:12px;min-height:40px;font-size:12px;white-space:nowrap}
.poker-page .poker-chat-hint{font-size:10px;color:var(--table-muted)}
@media(max-width:700px){
 body.poker-game-active .topbar{display:none}
 body.poker-game-active .bottom-nav{display:none}
 body.poker-game-active .main{padding:16px 16px 20px!important}
 .poker-page{padding:0;max-width:440px}
 .poker-page .game-back{background:none;border:0;color:var(--table-muted);font-size:11px;min-height:28px;margin:0 0 8px;padding:0}
 .poker-page .poker-page-header{display:flex!important;margin:0 0 16px}
 .poker-page-header h1{font-size:21px;letter-spacing:.03em;color:var(--table-text)}
 .poker-page-header .eyebrow{font-size:8px;letter-spacing:.18em;color:var(--table-accent)}
 .poker-page-header p{display:none}
 .poker-page-header .poker-wallet{display:none}
 .poker-page>.poker-guidance{display:none}
 .poker-page .poker-table-tabs{display:flex;gap:8px;margin:0 0 16px}
 .poker-page .poker-table-tabs button{flex:1;padding:8px 6px;min-height:42px;background:#192c33;border:0;border-radius:12px;color:var(--table-muted)}
 .poker-page .poker-table-tabs button.active{background:#edc889;color:#312a1d}
 .poker-page .poker-table-tabs b{font-size:12px}
 .poker-page .poker-table-tabs small{font-size:9px}
 .poker-page .poker-decision-layout{gap:0}
 .poker-page .poker-table{height:340px!important;min-height:340px!important;max-width:none;width:100%;margin:0}
 .poker-page .poker-table:before{inset:30px 23px 34px;border-radius:46%;border:3px solid #78918a55;background:radial-gradient(ellipse,#2f6b5b,#214e45);box-shadow:inset 0 0 0 6px #163b3580,inset 0 0 45px #112f3580,0 12px 32px #0002}
 .poker-page .poker-table:after{inset:44px 37px 48px;border:1px solid #d5d2a820;border-radius:46%}
 .poker-page .poker-table .poker-seat{width:64px!important;max-width:64px!important;min-height:54px!important;padding:5px 3px;border:1px solid #46646b;border-radius:12px;background:#172d34;box-shadow:0 4px 12px #07131840}
 .poker-page .poker-table .poker-seat.empty{width:48px!important;max-width:48px!important;min-height:30px!important;border:0;background:transparent;box-shadow:none;font-size:9px;color:#91b1a0;opacity:.6}
 .poker-page .poker-table .poker-seat.mine{border-color:#edc889}
 .poker-page .poker-table .s0{--x:50%;--y:94%}.poker-page .poker-table .s1{--x:14%;--y:78%}.poker-page .poker-table .s2{--x:9%;--y:48%}.poker-page .poker-table .s3{--x:21%;--y:17%}.poker-page .poker-table .s4{--x:50%;--y:7%}.poker-page .poker-table .s5{--x:79%;--y:17%}.poker-page .poker-table .s6{--x:91%;--y:48%}.poker-page .poker-table .s7{--x:86%;--y:78%}
 .poker-page .poker-seat .avatar{width:22px;height:22px;min-width:22px;font-size:14px}
 .poker-page .poker-seat-name{font-size:10px;margin:3px 0 1px;line-height:13px}
 .poker-page .poker-seat-balance{font-size:11px;line-height:13px}
 .poker-page .poker-board{top:39%!important;width:calc(100% - 134px)!important;max-width:254px}
 .poker-page .poker-pot{font-size:13px;margin:0 0 12px;line-height:18px;color:#f0dba6}
 .poker-page .poker-board-label{top:-22px;font-size:9px;color:#a5c4b4}
 .poker-page .poker-community{gap:5px}
 .poker-page .poker-community .playing-card{max-width:none;height:60px!important;width:auto!important;aspect-ratio:auto;border-radius:6px;background:#fcf7e8}
 .poker-page .poker-community .card-corner b{font-size:18px}
 .poker-page .poker-community .card-suit{font-size:24px}
 .poker-page .poker-table .poker-seat-bet{font-size:9px;background:#163b35;top:calc(100% + 4px)}
 .poker-page .poker-phase-track{display:none}
 .poker-page .poker-command.my-turn{position:relative!important;inset:auto!important;transform:none!important;margin:0!important;width:100%;z-index:auto}
 .poker-page .poker-table .poker-danmaku{display:block!important;top:68%!important;height:28px!important;left:60px;right:60px}
 .poker-page .poker-table .poker-danmaku .live-table-message{font-size:10px!important;top:0!important;border-radius:20px;background:#0a252ae0;color:#e6eee8}
 .poker-page .poker-table .poker-action-bubble{display:none}
 .poker-page .poker-rules,.poker-page .poker-settings{font-size:11px;color:var(--table-muted)}
 .poker-page .poker-hand-bar .poker-my-hand .card-corner b{font-size:23px}
 .poker-page .poker-hand-bar .poker-my-hand .card-suit{font-size:29px}
}
/* Mahjong uses one quiet table and a single full-width hand rail. */
#mahjongRoot.mj-root.mj-landscape{background:var(--table-bg);color:var(--table-text);grid-template-rows:34px minmax(0,1fr) auto;gap:10px;padding:10px 18px 12px;--mj-tile-h:clamp(52px,calc(var(--mj-stage-h) * .17),76px)}
#mahjongRoot.mj-root.mj-landscape .mj-heading h2{color:var(--table-text);font-size:17px;letter-spacing:.1em}
#mahjongRoot.mj-root.mj-landscape .mj-footer button{background:#192c33;color:#acbfc1;border:0;border-radius:9px;font-size:11px}
#mahjongRoot.mj-root.mj-landscape .mj-topbar{height:34px;position:relative}
#mahjongRoot.mj-root.mj-landscape .mj-sound{color:var(--table-muted)}
#mahjongRoot.mj-root.mj-landscape .mj-table{border:1px solid #65827966;border-radius:24px;background:radial-gradient(ellipse,#2b6053,#1b463e);box-shadow:inset 0 0 0 5px #173c3560;margin:0}
#mahjongRoot.mj-root.mj-landscape .mj-seat{background:#163137cc;border:1px solid #54777a70;border-radius:12px;padding:6px 10px;color:#f1eee1}
#mahjongRoot.mj-root.mj-landscape .mj-seat small{color:#a9c0b6}
#mahjongRoot.mj-root.mj-landscape .mj-seat.pos-2{top:10px}
#mahjongRoot.mj-root.mj-landscape .mj-seat.pos-1{right:12px;top:50%}
#mahjongRoot.mj-root.mj-landscape .mj-seat.pos-3{left:12px;top:50%}
#mahjongRoot.mj-root.mj-landscape .mj-center{top:50%;background:none;border:0;width:180px;height:72px;color:#e9dfb8;padding:4px 8px;box-shadow:none}
#mahjongRoot.mj-root.mj-landscape .mj-center strong{font-size:17px;letter-spacing:.12em}
#mahjongRoot.mj-root.mj-landscape .mj-center small{color:#b9ccbd;font-size:10px}
#mahjongRoot.mj-root.mj-landscape .mj-center .mj-clock{font-size:18px;color:#edc889}
#mahjongRoot.mj-root.mj-landscape .mj-public-toggle{background:#153732!important;border:1px solid #66897a66;color:#b5cbb9;font-size:10px!important;padding:6px 9px!important;min-height:28px;top:10px;right:12px}
#mahjongRoot.mj-root.mj-landscape .mj-river small{font-size:9px;color:#a8c3b3}
#mahjongRoot.mj-root.mj-landscape .mj-river.pos-0{left:calc(50% - 152px);bottom:12px;width:138px}
#mahjongRoot.mj-root.mj-landscape .mj-river.pos-2{left:calc(50% + 152px);top:12px;width:138px}
#mahjongRoot.mj-root.mj-landscape .mj-player-dock{background:transparent;border:0;box-shadow:none;border-radius:0;gap:7px}
#mahjongRoot.mj-root.mj-landscape .mj-player-dock>.mj-controls-dock{background:transparent;min-height:44px;height:auto;padding:0}
#mahjongRoot.mj-root.mj-landscape .mj-overlay{background:transparent;grid-template-columns:140px minmax(0,1fr);padding:0 3px;gap:4px 12px;color:#c7d6cc}
#mahjongRoot.mj-root.mj-landscape .mj-overlay header h3{font-size:12px;color:#cbdad3}
#mahjongRoot.mj-root.mj-landscape .mj-overlay header [data-mj-clock]{font-size:15px;color:#edc889}
#mahjongRoot.mj-root.mj-landscape .mj-overlay>p{display:none}
#mahjongRoot.mj-root.mj-landscape .mj-action-buttons>button{border:0;border-radius:12px;min-height:44px;box-shadow:none;font-size:14px}
#mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-confirm-discard{background:#edc889;color:#312a1d;min-width:182px;font-size:15px}
#mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-confirm-discard:disabled{background:#294047;color:#8aa3a6}
#mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-compact-cancel,#mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-move-pass{background:#22383f;color:#afc0c0}
#mahjongRoot.mj-root.mj-landscape .mj-hand-zone{padding:0 3px;border:0;background:none}
#mahjongRoot.mj-root.mj-landscape .mj-hand-header{font-size:9px;min-height:15px;margin:0 0 7px;color:#93acb0}
#mahjongRoot.mj-root.mj-landscape .mj-hand-header strong{font-size:10px;color:#b6ccc2}
#mahjongRoot.mj-root.mj-landscape .mj-hand{gap:4px;max-width:none;padding:0}
#mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile{background:#fcf8ec;border-radius:6px;border:1px solid #f0ead8;border-bottom:5px solid #b4c4b1;box-shadow:0 3px 6px #0003}
#mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile[aria-pressed=true]{background:#fff0b9;transform:translateY(-8px);box-shadow:0 0 0 2px #edc889,0 6px 12px #0004}
#mahjongRoot.mj-root.mj-landscape .mj-wait-action{background:transparent;min-height:44px;padding:0;color:#b6ccc2}
#mahjongRoot.mj-root.mj-landscape .mj-wait-action small{display:none}
#mahjongRoot.mj-root.mj-landscape .mj-chat-toggle{background:#223940;color:#c1d0ce;border:0;border-radius:9px;min-height:32px;font-size:11px;padding:5px 12px}
.mj-chat-panel{position:absolute;right:12px;top:46px;z-index:40;width:300px;display:flex;gap:7px;padding:10px;background:#192c33;border:1px solid #52676b;border-radius:14px;box-shadow:0 6px 24px #0004}
.mj-chat-panel[hidden]{display:none}
.mj-chat-panel input{min-width:0;width:100%;min-height:40px;font-size:12px;background:#101e24;color:#faf5e9;border:1px solid #52676b;border-radius:9px;padding:8px}
.mj-chat-panel button{min-height:40px;padding:7px 12px;font-size:12px;background:#edc889;color:#30271d;white-space:nowrap}
.mj-danmaku{position:absolute;left:100px;right:100px;bottom:8px;height:27px;z-index:9;container-type:inline-size;overflow:hidden;pointer-events:none}
.mj-danmaku .live-table-message{position:absolute;left:0;top:0;white-space:nowrap;font-size:11px;padding:4px 10px;background:#0e292de8;color:#f0eedc;border-radius:18px;animation:tableMessageTravel 10000ms linear var(--elapsed,0ms) 1 both}
@media(orientation:portrait){#mahjongRoot.mj-root.mj-landscape{padding:10px 18px 12px}}
@media(prefers-reduced-motion:reduce){.mj-danmaku .live-table-message{animation-name:tableMessageStill}}
.live-table-danmaku .live-table-message{visibility:hidden;animation-fill-mode:forwards!important}
#mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile{padding:1px 0}
#mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile .mj-face{width:100%;height:100%;max-width:100%;display:block;overflow:hidden}
#mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile.small{padding:0}
#mahjongRoot.mj-root.mj-landscape .mj-river .mj-face{width:100%;height:100%;overflow:hidden}
body.poker-game-active .farm-breadcrumb{display:none}
body.poker-game-active .fn-trail{display:none}
@media(max-width:700px){
 .poker-page .poker-table{height:280px!important;min-height:280px!important}
 .poker-page .poker-page-header{margin-bottom:12px}
 .poker-page .poker-page-header h1{font-size:20px}
 .poker-page .poker-table-tabs{margin-bottom:10px}
 .poker-page .poker-hand-bar{padding:10px 14px;margin:10px 0}
 .poker-page .poker-command{padding:12px!important}
 .poker-page .poker-compact-heading{margin-bottom:8px}
 .poker-page .poker-compact-command .poker-raise{margin-top:10px;padding-top:10px}
 .poker-page .poker-raise-presets button{min-height:32px;padding:5px 4px}
 .poker-page .poker-custom-raise{padding-top:8px}
 .poker-page #pokerRaiseTo{min-height:40px;height:40px;font-size:22px}
 .poker-page .poker-raise-range{height:24px;min-height:24px;padding:0;margin:6px 0}
 .poker-page .poker-compact-command .poker-raise-confirm{min-height:44px;margin-top:6px}
 .poker-page .poker-sheet-secondary{margin-top:6px}
 .poker-page .poker-sheet-secondary button{min-height:24px}
}

/* Phone composition: reserve space for the hand and decisions before the felt. */
@media(max-width:700px){
 body.poker-game-active .main{padding:8px 10px max(12px,env(safe-area-inset-bottom))!important}
 .poker-page{display:grid;grid-template-columns:1fr 1fr;gap:0;max-width:100%}
 .poker-page>*{grid-column:1/-1;min-width:0}
 .poker-page .game-back{grid-column:1;grid-row:1;align-self:center;margin:0;min-height:44px;font-size:12px;text-align:left}
 .poker-page .poker-page-header{grid-column:2;grid-row:1;margin:0!important;justify-content:flex-end;align-self:center}
 .poker-page .poker-page-header .eyebrow{display:none}
 .poker-page .poker-page-header h1{font-size:19px;margin:0}
 .poker-page .poker-table-tabs{margin:2px 0 8px;gap:6px}
 .poker-page .poker-table-tabs button{min-height:44px;padding:5px 8px;text-align:left}
 .poker-page .poker-table-tabs small{font-size:10px;line-height:1.3}
 .poker-page .poker-table{height:clamp(218px,calc(100svh - 400px),300px)!important;min-height:218px!important}
 .poker-page .poker-table:before{inset:24px 18px 20px}
 .poker-page .poker-table:after{inset:35px 28px 30px}
 .poker-page .poker-table .s0{--y:88%}
 .poker-page .poker-table .s1{--x:13%;--y:72%}.poker-page .poker-table .s7{--x:87%;--y:72%}
 .poker-page .poker-table .s4{--y:10%}
 .poker-page .poker-table .poker-seat{min-height:48px!important;padding:3px 2px}
 .poker-page .poker-table .poker-seat.mine .avatar{display:none}
 .poker-page .poker-table .poker-seat.mine{min-height:36px!important}
 .poker-page .poker-seat-name{font-size:11px;line-height:14px}
 .poker-page .poker-board{top:38%!important;width:calc(100% - 116px)!important}
 .poker-page .poker-pot{margin-bottom:6px;font-size:12px}
 .poker-page .poker-community{gap:3px}
 .poker-page .poker-community .playing-card{height:48px!important;min-width:0;flex:1 1 0;padding:3px!important}
 .poker-page .poker-table .poker-danmaku{top:65%!important;left:68px;right:68px}
 .poker-page .poker-hand-bar{padding:7px 10px;margin:12px 0 8px;min-height:78px}
 .poker-page .poker-hand-bar strong{font-size:20px}
 .poker-page .poker-hand-bar .poker-my-hand .playing-card{height:62px!important;width:44px!important;flex-basis:44px!important}
 .poker-page .poker-hand-bar .poker-my-hand .card-corner{position:static!important;line-height:1}
 .poker-page .poker-hand-bar .poker-my-hand .card-suit{position:static!important;display:block!important;text-align:right;line-height:1;font-size:25px}
 .poker-page .poker-command{padding:10px!important;border-radius:14px;position:sticky!important;bottom:env(safe-area-inset-bottom,0px);z-index:12;box-shadow:0 0 0 4px var(--table-bg)}
 .poker-page .poker-compact-heading{margin-bottom:6px;font-size:13px}
 .poker-page .poker-compact-command .poker-action-grid{gap:6px}
 .poker-page .poker-compact-command .poker-action-grid button{min-height:46px;font-size:14px;padding:8px 4px}
 .poker-page .poker-sheet-secondary{margin-top:4px;gap:8px}
 .poker-page .poker-sheet-secondary button{min-height:32px;font-size:10px}
 .poker-page .poker-raise.raise-open{max-height:none;overflow:visible}
 .poker-page .poker-raise-presets button{min-height:44px}
 .poker-page .poker-chat{margin:10px 0!important}
 .poker-page .poker-chat input{font-size:16px;min-height:44px}
 .poker-page .poker-chat button{min-height:44px}
}
/* A short phone stage cannot stack the opposite seat over the round status. */
@media(max-width:950px) and (max-height:600px),(max-width:600px) and (orientation:portrait){
 #mahjongRoot.mj-root.mj-landscape{padding:6px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));gap:6px;--mj-tile-h:clamp(48px,calc(var(--mj-stage-h) * .19),68px)}
 #mahjongRoot.mj-root.mj-landscape .mj-topbar{height:40px;gap:6px}
 #mahjongRoot.mj-root.mj-landscape .mj-heading h2{font-size:14px;letter-spacing:0}
 #mahjongRoot.mj-root.mj-landscape .mj-footer{gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-footer button{min-height:40px;padding:5px 7px;font-size:11px}
 #mahjongRoot.mj-root.mj-landscape .mj-sound summary{font-size:0;min-width:40px;min-height:40px;text-align:center}
 #mahjongRoot.mj-root.mj-landscape .mj-sound summary:before{content:'♪';font-size:20px}
 #mahjongRoot.mj-root.mj-landscape .mj-chat-toggle{min-height:40px}
 #mahjongRoot.mj-root.mj-landscape .mj-table{border-radius:18px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat{width:74px!important;min-height:42px!important;padding:4px 5px;display:flex;flex-direction:row;gap:4px;border-radius:8px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat .mj-avatar{width:18px;height:18px;font-size:15px;flex:none}
 #mahjongRoot.mj-root.mj-landscape .mj-seat b{font-size:11px;max-width:45px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
 #mahjongRoot.mj-root.mj-landscape .mj-seat small{font-size:8px;line-height:1.3;white-space:normal}
 #mahjongRoot.mj-root.mj-landscape .mj-seat.pos-2{top:5px;left:50%;transform:translateX(-50%)}
 #mahjongRoot.mj-root.mj-landscape .mj-seat.pos-1{right:6px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat.pos-3{left:6px}
 #mahjongRoot.mj-root.mj-landscape .mj-center{top:auto;bottom:6px;left:50%;transform:translateX(-50%);width:156px;height:62px;padding:0;grid-template-columns:1fr 38px;column-gap:7px}
 #mahjongRoot.mj-root.mj-landscape .mj-center strong{font-size:12px;letter-spacing:0}
 #mahjongRoot.mj-root.mj-landscape .mj-center small{font-size:9px}
 #mahjongRoot.mj-root.mj-landscape .mj-center .mj-clock{font-size:15px}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard>.mj-tile{width:32px;height:44px;min-height:44px;padding:0}
 #mahjongRoot.mj-root.mj-landscape .mj-public-toggle{top:5px;right:6px;min-height:36px;padding:4px 7px!important;font-size:10px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-river{width:60px!important;max-width:60px;max-height:52px;overflow:hidden}
 #mahjongRoot.mj-root.mj-landscape .mj-river>div{display:flex!important;flex-wrap:nowrap;gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile:not(:nth-last-child(-n+2)){display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile.small{width:25px;height:34px;min-height:34px;flex:none}
 #mahjongRoot.mj-root.mj-landscape .mj-river.pos-0{left:calc(50% - 148px);bottom:6px}
 #mahjongRoot.mj-root.mj-landscape .mj-river.pos-2{left:calc(50% + 88px);top:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-river.pos-1{right:88px;top:50%;transform:translateY(-50%)}
 #mahjongRoot.mj-root.mj-landscape .mj-river.pos-3{left:88px;top:50%;transform:translateY(-50%)}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock{gap:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay{grid-template-columns:100px minmax(0,1fr)}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-confirm-discard{min-width:148px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-zone{padding:0}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{margin-bottom:4px;min-height:12px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand{gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile{border-bottom-width:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile[aria-pressed=true]{transform:translateY(-5px)}
 #mahjongRoot.mj-root.mj-landscape .mj-wait-action{min-height:40px}
 .mj-chat-panel{max-width:calc(var(--mj-stage-w) - 16px)}
 .mj-chat-panel input{font-size:16px}
}
@media(max-width:600px) and (orientation:portrait){
 #mahjongRoot.mj-root.mj-landscape{padding:6px max(8px,env(safe-area-inset-bottom)) 8px max(8px,env(safe-area-inset-top))}
}
@media(max-width:950px) and (max-height:300px),(max-width:300px) and (orientation:portrait){
 #mahjongRoot.mj-root.mj-landscape{--mj-tile-h:48px;gap:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-topbar{height:34px}
 #mahjongRoot.mj-root.mj-landscape .mj-footer button,#mahjongRoot.mj-root.mj-landscape .mj-chat-toggle,#mahjongRoot.mj-root.mj-landscape .mj-sound summary{min-height:34px}
 #mahjongRoot.mj-root.mj-landscape .mj-center{height:44px;bottom:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-center>.mj-clock{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard small{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-seat{height:36px!important;min-height:36px!important;max-height:36px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45px;line-height:11px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat.pos-1,#mahjongRoot.mj-root.mj-landscape .mj-seat.pos-3{top:5px;transform:none}
 #mahjongRoot.mj-root.mj-landscape .mj-public-toggle{top:auto;bottom:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-river{width:30px!important;max-width:30px}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile:not(:last-child){display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-river.pos-1,#mahjongRoot.mj-root.mj-landscape .mj-river.pos-3{top:5px;transform:none}
 #mahjongRoot.mj-root.mj-landscape .mj-river small{font-size:8px}
}

/* Grouping wrappers preserve the desktop table's existing positions. */
.mj-station,.mj-table-hub{display:contents}
.mj-river-empty{font-size:10px;color:#b9cec0}
.poker-showdown-list{display:none}

/* Phone poker: a symmetric ring reserves the middle for public cards. */
@media(max-width:700px){
 .poker-page .poker-table{--poker-seat-w:64px;display:grid;grid-template-areas:none;grid-template-columns:var(--poker-seat-w) minmax(0,1fr) var(--poker-seat-w) minmax(0,1fr) var(--poker-seat-w);grid-template-rows:minmax(92px,auto) minmax(108px,auto) minmax(92px,auto);gap:6px;height:auto!important;min-height:0!important;padding:0;border:0;border-radius:0;background:none;overflow:visible}
 .poker-page .poker-table:before{display:block;content:'';position:absolute;inset:21px 10px 19px;border:4px solid #7c6950;border-radius:50%;background:radial-gradient(ellipse at 50% 35%,#326b50,#20523d 65%,#163e2e);box-shadow:inset 0 0 0 2px #c3b27b40,inset 0 0 28px #0d2c2280,0 7px 16px #0002;z-index:0;pointer-events:none}
 .poker-page .poker-table:after{display:none}
 .poker-page .poker-table .poker-seat{position:relative;inset:auto!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;transform:none!important;grid-area:auto!important;order:0;justify-self:center;align-self:center;width:var(--poker-seat-w)!important;max-width:var(--poker-seat-w)!important;min-width:0;min-height:72px!important;height:auto;margin:0;padding:5px 3px;display:flex;flex-direction:column;align-items:center;gap:2px;border:1px solid #67847288;border-radius:11px;background:#132e29;box-shadow:0 3px 8px #0c211840}
 .poker-page .poker-table .s3{grid-area:1/2!important;align-self:end}.poker-page .poker-table .s4{grid-area:1/3!important;align-self:start}.poker-page .poker-table .s5{grid-area:1/4!important;align-self:end}
 .poker-page .poker-table .s2{grid-area:2/1!important}.poker-page .poker-table .s6{grid-area:2/5!important}
 .poker-page .poker-table .s1{grid-area:3/2!important;align-self:start}.poker-page .poker-table .s0{grid-area:3/3!important;align-self:end}.poker-page .poker-table .s7{grid-area:3/4!important;align-self:start}
 .poker-page .poker-table .poker-seat.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:44px!important;width:var(--poker-seat-w)!important;max-width:var(--poker-seat-w)!important;border:1px dashed #7e9a6d45;background:#163c2e99;opacity:1;color:#a9c0a8;font-size:10px}
 .poker-page .poker-table .poker-seat.empty br{display:none}
 .poker-page .poker-table .poker-seat.empty small{font-size:10px}
 .poker-page .poker-table .poker-seat.mine{min-height:72px!important;border-color:#c9b174;background:#344b32}
 .poker-page .poker-table .poker-seat.turn{border-color:#f0cd80;box-shadow:inset 0 0 0 1px #f0cd80}
 .poker-page .poker-table .poker-seat .avatar,.poker-page .poker-table .poker-seat.mine .avatar{display:block;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;flex:none;margin:0}
 .poker-page .poker-seat-number{position:absolute;left:5px;top:5px;font-size:9px;color:#93ad97}
 .poker-page .poker-seat-name{font-size:11px;line-height:14px;margin:0;width:100%;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .poker-page .poker-seat-balance{font-size:12px;line-height:15px;max-width:100%;overflow-wrap:anywhere}
 .poker-page .poker-seat-markers{position:absolute;top:5px;right:4px;display:flex;flex-direction:column;justify-content:center;gap:2px;max-width:24px;min-height:0;line-height:1}
 .poker-page .poker-seat-markers:empty{display:none}
 .poker-page .poker-seat-markers .badge{display:inline-block;font-size:8px;margin:0;padding:1px 3px}
 .poker-page .poker-table .poker-seat-bet{position:static!important;inset:auto!important;transform:none!important;max-width:100%;width:auto;white-space:nowrap;line-height:14px;font-size:10px;background:none;padding:0;color:#f0d6a0}
 .poker-page .poker-seat-cards{display:flex;position:static;gap:3px;justify-content:center;margin:2px 0 0;width:100%}
 .poker-page .poker-seat .playing-card{display:flex!important;flex-direction:column;justify-content:space-between;width:24px!important;flex:0 0 24px!important;height:34px!important;min-width:0;padding:2px!important;gap:0;border-radius:4px}
 .poker-page .poker-table .poker-win-badge{position:static;transform:none;font-size:9px;padding:2px 5px;max-width:100%;margin:0;grid-row:1}
 .poker-page .poker-seat-ready,.poker-page .poker-seat-timeout{position:static;font-size:9px;padding:0;margin:0}
 .poker-page .poker-seat-timeout{max-width:100%;font-size:8px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .poker-page .poker-lobby-time{display:none}
 .poker-page .poker-table .poker-center{position:static;inset:auto;transform:none;grid-column:2/5!important;grid-row:2!important;align-self:center;order:0;width:100%;min-width:0;max-width:none;padding:3px 2px;z-index:3}
 .poker-page .poker-board{position:static;inset:auto;transform:none;width:100%!important;max-width:none;display:grid;grid-template-columns:minmax(0,1fr);gap:5px;align-items:center}
 .poker-page .poker-pot{grid-column:1;grid-row:1;margin:0;text-align:center;font-size:13px;line-height:20px}
 .poker-page .poker-board-label{position:static;grid-column:1;grid-row:3;font-size:10px;line-height:14px;text-align:center;color:#b1cbb9}
 .poker-page .poker-community{grid-column:1;grid-row:2;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;min-width:0;min-height:0}
 .poker-page .poker-community .playing-card{width:100%!important;max-width:none;height:60px!important;flex:none;padding:4px!important;border-radius:6px;aspect-ratio:auto}
 .poker-page .poker-community .playing-card.slot{background:#ffffff0d;border:1px dashed #92b29955;color:#9fb9a5;font-size:18px;box-shadow:none}
 .poker-page .poker-community .card-corner,.poker-page .poker-seat .card-corner{position:static!important;align-self:flex-start;text-align:left;line-height:1}
 .poker-page .poker-community .card-corner b{font-size:21px;line-height:1}
 .poker-page .poker-community .card-suit,.poker-page .poker-seat .card-suit{position:static!important;display:block!important;align-self:flex-end;text-align:right;line-height:1}
 .poker-page .poker-community .card-suit{font-size:26px}
 .poker-page .poker-seat .card-corner b{font-size:13px;line-height:1}
 .poker-page .poker-seat .card-suit{font-size:16px}
 .poker-page .poker-table .poker-danmaku{position:absolute;inset:auto!important;top:calc(50% + 58px)!important;height:24px!important;left:70px!important;right:70px!important;z-index:6;overflow:hidden}
 .poker-page .poker-table .poker-danmaku:empty{display:none!important}
 .poker-page .poker-table .poker-danmaku .live-table-message{top:0!important}
 .poker-page .poker-hand-bar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;padding:8px 10px;margin:8px 0;min-height:80px;border:1px solid #5b75684d;background:#1b302a;border-radius:12px}
 .poker-page .poker-hand-bar>div:last-child{text-align:right}
 .poker-page .poker-hand-bar .poker-my-hand .playing-card{width:46px!important;flex-basis:46px!important;height:64px!important;padding:5px!important}
 .poker-page .poker-hand-bar .poker-my-hand .card-corner b{font-size:23px;line-height:1}
 .poker-page .poker-hand-bar .poker-my-hand .card-suit{font-size:27px;line-height:1}
 .poker-page .poker-command.my-turn{position:relative!important;max-height:none;overflow:visible;margin:0!important;background:#1b302a;border:1px solid #5b75684d;box-shadow:none}
 .poker-page .poker-compact-heading{display:flex;justify-content:space-between;align-items:center;min-height:28px}
 .poker-page .poker-compact-heading .poker-countdown{width:auto;margin-left:auto}
 .poker-page .poker-sheet-secondary{margin-top:5px}
 .poker-page .poker-sheet-secondary button{min-height:36px;font-size:11px}
 .poker-page .poker-history{margin-top:8px}
 .poker-page .poker-table .poker-ready-command{position:relative;inset:auto!important;transform:none!important;width:100%;max-width:none;min-width:0;display:grid;grid-template-columns:1fr 1fr;gap:6px 8px;padding:10px!important;margin:0;text-align:left;border-radius:10px;background:#193a2f;box-shadow:none}
 .poker-page .poker-ready-command h3{grid-column:1;grid-row:1;font-size:14px;line-height:20px}
 .poker-page .poker-ready-command .poker-ready-progress{grid-column:2;grid-row:1;align-self:center;text-align:right}
 .poker-page .poker-ready-command p{grid-column:1/-1;font-size:11px;line-height:15px}
 .poker-page .poker-ready-command .poker-ready-clock{grid-column:1/-1;text-align:center}
 .poker-page.poker-ready-stage .poker-board,.poker-page.poker-ready-stage .poker-hand-bar{display:none}
 .poker-page.poker-ready-stage .poker-seat-cards{display:none!important}
 .poker-page.poker-result-stage .poker-seat-ready{display:none}
 .poker-page .poker-showdown-list{display:block;margin:8px 0;color:#c2d3c2;border:1px solid #58766466;border-radius:12px;background:#1b302a;padding:0 10px;font-size:12px}
 .poker-page .poker-showdown-list summary{cursor:pointer;min-height:44px;align-content:center}
 .poker-page .poker-showdown-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:0 0 10px}
 .poker-page .poker-showdown-player{display:flex;align-items:center;justify-content:space-between;gap:4px;padding:6px;border-radius:8px;background:#132e29;min-width:0}
 .poker-page .poker-showdown-player>b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .poker-page .poker-showdown-player .poker-hand{margin:0;gap:3px;flex:none}
 .poker-page .poker-showdown-player .playing-card{display:flex!important;flex-direction:column;width:28px;height:44px;padding:3px;flex:none;justify-content:space-between}
 .poker-page .poker-showdown-player .card-corner,.poker-page .poker-showdown-player .card-suit{position:static;line-height:1;align-self:flex-start}
 .poker-page .poker-showdown-player .card-corner b{font-size:16px}
 .poker-page .poker-showdown-player .card-corner i{display:none}
 .poker-page .poker-showdown-player .card-suit{font-size:18px;align-self:flex-end}
 .poker-page .poker-result-preview{grid-column:1/-1;grid-row:1;margin:0}
 .poker-page.poker-result-stage .poker-board .poker-board-label{grid-column:1;grid-row:3}
 .poker-page .poker-lobby-tools{margin:0 0 6px}
}
@media(max-width:350px){
 .poker-page .poker-table{--poker-seat-w:56px;grid-template-rows:minmax(80px,auto) minmax(100px,auto) minmax(80px,auto);gap:5px;padding:0}
 .poker-page .poker-table .poker-seat,.poker-page .poker-table .poker-seat.mine{min-height:68px!important;padding:4px 2px}
 .poker-page .poker-table .poker-seat.empty{min-height:40px!important}
 .poker-page .poker-table .poker-seat .avatar,.poker-page .poker-table .poker-seat.mine .avatar{width:25px;height:25px;min-width:25px;min-height:25px}
 .poker-page .poker-community{gap:3px}
 .poker-page .poker-community .playing-card{height:56px!important;padding:3px!important}
 .poker-page .poker-community .card-corner b{font-size:19px}
 .poker-page .poker-community .card-suit{font-size:24px}
 .poker-page .poker-pot{font-size:12px}.poker-page .poker-board-label{font-size:10px}
 .poker-page .poker-hand-bar{min-height:70px;padding:6px 8px;margin:4px 0}
 .poker-page .poker-hand-bar .poker-my-hand .playing-card{width:40px!important;flex-basis:40px!important;height:56px!important;padding:4px!important}
 .poker-page .poker-hand-bar .poker-my-hand .card-corner b{font-size:21px}
 .poker-page .poker-hand-bar .poker-my-hand .card-suit{font-size:23px}
}

/* Landscape mahjong: each river stays with its player; the middle has one hub. */
@media(max-width:950px) and (max-height:600px),(max-width:600px) and (orientation:portrait){
 #mahjongRoot.mj-root.mj-landscape{grid-template-rows:36px minmax(0,1fr) auto;gap:6px;--mj-tile-h:clamp(48px,calc(var(--mj-stage-h) * .17),68px)}
 #mahjongRoot.mj-root.mj-landscape .mj-topbar{height:36px}
 #mahjongRoot.mj-root.mj-landscape .mj-footer button,#mahjongRoot.mj-root.mj-landscape .mj-chat-toggle,#mahjongRoot.mj-root.mj-landscape .mj-sound summary{min-height:36px}
 #mahjongRoot.mj-root.mj-landscape .mj-table{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,1.05fr) minmax(0,1fr);grid-template-rows:36px minmax(0,1fr);grid-template-areas:'top top top' 'left hub right';gap:4px 10px;padding:7px 10px;border-radius:16px;background:radial-gradient(ellipse at 50% 35%,#32654d,#204b3b);box-shadow:inset 0 0 0 3px #bcad6b16;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-station{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2{grid-area:top;flex-direction:row;justify-content:center;gap:8px;padding:0 85px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-3{grid-area:left}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-1{grid-area:right}
 #mahjongRoot.mj-root.mj-landscape .mj-table-hub{display:flex;grid-area:hub;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{position:relative!important;inset:auto!important;transform:none!important;display:flex;flex-direction:row;align-items:center;width:128px!important;max-width:128px;height:32px!important;min-height:32px!important;max-height:none;padding:4px 8px;gap:6px;border-radius:8px;background:#152f28;border:1px solid #92b08a45;box-shadow:none;flex:none}
 #mahjongRoot.mj-root.mj-landscape .mj-seat.is-turn{border-color:#e6c583;background:#465b35;box-shadow:inset 0 0 0 1px #e6c58380}
 #mahjongRoot.mj-root.mj-landscape .mj-seat .mj-avatar{width:22px;height:22px;font-size:18px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat b{font-size:12px;max-width:84px;line-height:14px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat small{font-size:9px;line-height:11px;max-width:84px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-seat{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-bubble{left:50%!important;right:auto!important;top:0;transform:translate(-50%,-100%);z-index:12;font-size:10px;max-width:145px;padding:4px 8px}
 #mahjongRoot.mj-root.mj-landscape .mj-river{position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:none!important;max-height:none;overflow:visible;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-river>small{font-size:10px;line-height:12px;opacity:1;color:#c0d2ba;text-align:center}
 #mahjongRoot.mj-root.mj-landscape .mj-river>div{display:grid!important;grid-template-columns:repeat(6,24px)!important;gap:3px;flex-wrap:nowrap;min-height:30px}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile{display:flex!important}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile.small{width:24px;height:32px;min-height:32px;padding:0;flex:none;border-radius:3px;border-bottom-width:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-river{flex-direction:row;gap:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-seat{width:116px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-river>small{width:auto;white-space:nowrap;font-size:9px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-3 .mj-river>div,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-1 .mj-river>div{grid-template-columns:repeat(3,24px)!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0{gap:0}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river{flex-direction:row;gap:6px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>small{width:auto;white-space:nowrap;font-size:9px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{grid-template-columns:repeat(6,20px)!important;gap:2px;min-height:27px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-tile.small{width:20px;height:27px;min-height:27px}
 #mahjongRoot.mj-root.mj-landscape .mj-center{position:static!important;inset:auto!important;transform:none!important;display:grid;width:100%;max-width:230px;height:auto!important;min-height:54px;grid-template-columns:minmax(0,1fr) 42px;grid-template-rows:auto auto;align-content:center;column-gap:9px;padding:6px 10px;border:1px solid #bdba7440;border-radius:10px;background:#14372a80}
 #mahjongRoot.mj-root.mj-landscape .mj-center strong{grid-column:1;grid-row:1;font-size:16px;letter-spacing:.06em;color:#f6dda0}
 #mahjongRoot.mj-root.mj-landscape .mj-center>small{grid-column:1;grid-row:2;font-size:10px;white-space:nowrap}
 #mahjongRoot.mj-root.mj-landscape .mj-center>.mj-clock{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard{grid-column:2;grid-row:1/3;gap:2px;min-width:0}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard>.mj-tile,#mahjongRoot.mj-root.mj-landscape .mj-last-empty{width:34px;height:46px;min-height:46px;padding:0}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard small{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-public-toggle{position:absolute;top:7px;right:10px;bottom:auto;min-height:34px;font-size:10px!important;padding:4px 7px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-danmaku{left:20%;right:20%;bottom:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock{gap:5px;border:1px solid #687e5745;border-radius:12px;background:#1a3028;padding:5px 8px 7px}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock>.mj-controls-dock{min-height:44px;padding:0}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay{padding:0;grid-template-columns:145px minmax(0,1fr);gap:4px 8px}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay header h3{font-size:12px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus>.mj-turn-marker{width:30px;height:34px;font-size:21px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{min-height:16px;margin-bottom:7px;gap:8px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>span{color:#a8c0ae}
 #mahjongRoot.mj-root.mj-landscape .mj-hand{gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-wait-action{min-height:44px;padding:0}
}
@media(max-width:950px) and (max-height:320px),(max-width:320px) and (orientation:portrait){
 #mahjongRoot.mj-root.mj-landscape{grid-template-rows:32px minmax(0,1fr) auto;gap:4px;--mj-tile-h:48px}
 #mahjongRoot.mj-root.mj-landscape .mj-topbar{height:32px}
 #mahjongRoot.mj-root.mj-landscape .mj-footer button,#mahjongRoot.mj-root.mj-landscape .mj-chat-toggle,#mahjongRoot.mj-root.mj-landscape .mj-sound summary{min-height:32px}
 #mahjongRoot.mj-root.mj-landscape .mj-table{grid-template-rows:30px minmax(0,1fr);gap:3px 8px;padding:4px 7px;grid-template-columns:minmax(0,1fr) minmax(152px,1.15fr) minmax(0,1fr)}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{height:28px!important;min-height:28px!important;padding:2px 6px}
 #mahjongRoot.mj-root.mj-landscape .mj-station{gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2{padding:0 80px;gap:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-river>div,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-3 .mj-river>div,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-1 .mj-river>div{grid-template-columns:repeat(3,20px)!important;gap:2px;min-height:25px}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile.small{width:20px;height:25px;min-height:25px}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile:not(:nth-last-child(-n+3)){display:none!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{grid-template-columns:repeat(3,18px)!important;min-height:23px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-tile.small{width:18px;height:23px;min-height:23px}
 #mahjongRoot.mj-root.mj-landscape .mj-table-hub{gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-center{min-height:44px;padding:3px 7px;grid-template-columns:minmax(0,1fr) 29px;column-gap:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-center strong{font-size:13px}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard>.mj-tile,#mahjongRoot.mj-root.mj-landscape .mj-last-empty{width:28px;height:38px;min-height:38px}
 #mahjongRoot.mj-root.mj-landscape .mj-public-toggle{top:4px;right:7px;min-height:28px}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock{padding:3px 6px 5px;gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{margin-bottom:5px;min-height:12px;font-size:8px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header strong{font-size:9px}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay{grid-template-columns:120px minmax(0,1fr)}
}
@media(max-width:950px) and (max-height:300px),(max-width:300px) and (orientation:portrait){
 #mahjongRoot.mj-root.mj-landscape{--mj-tile-h:44px}
 #mahjongRoot.mj-root.mj-landscape .mj-table{grid-template-rows:26px minmax(0,1fr);padding:4px 7px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{height:26px!important;min-height:26px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-seat .mj-avatar{width:19px;height:19px;font-size:16px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-1 .mj-river,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-3 .mj-river{flex-direction:row;gap:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-1 .mj-river>small,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-3 .mj-river>small{width:auto;white-space:nowrap;font-size:9px}
 #mahjongRoot.mj-root.mj-landscape .mj-table-hub{gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{display:none!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>small{font-size:9px;line-height:11px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{margin-bottom:4px;min-height:12px}
}

/* Phone mahjong stays upright; complete tiles share one hand row. */
.mj-tools,.mj-toolbar-short{display:none}
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape{--mj-stage-w:100dvw;--mj-stage-h:100dvh;--mj-tile-h:56px;position:fixed;inset:0;left:0;top:0;transform:none;width:100%;height:100vh;height:100dvh;max-width:none;margin:0;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));grid-template-rows:44px minmax(196px,1fr) auto;gap:8px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
 #mahjongRoot.mj-root.mj-landscape .mj-topbar{height:44px;min-height:44px;gap:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-topbar>[data-mj=footer]{flex:none}
 #mahjongRoot.mj-root.mj-landscape .mj-footer{gap:4px;align-items:center;flex-wrap:nowrap}
 #mahjongRoot.mj-root.mj-landscape .mj-footer>button{min-height:44px;padding:5px 9px;font-size:12px}
 #mahjongRoot.mj-root.mj-landscape .mj-footer>.mj-guide-button,#mahjongRoot.mj-root.mj-landscape .mj-footer>.mj-fullscreen-button,.mj-toolbar-label{display:none}
 .mj-toolbar-short{display:inline}
 #mahjongRoot.mj-root.mj-landscape .mj-tools{display:block;position:relative;flex:none;color:#c4d5c3}
 #mahjongRoot.mj-root.mj-landscape .mj-tools>summary{display:grid;place-items:center;list-style:none;min-height:44px;width:40px;border-radius:9px;background:#223940;font-size:12px;cursor:pointer}
 #mahjongRoot.mj-root.mj-landscape .mj-tools>summary::-webkit-details-marker{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-tools>div{position:absolute;z-index:50;top:48px;left:0;display:grid;gap:5px;width:166px;padding:8px;border:1px solid #698170;border-radius:12px;background:#192c33;box-shadow:0 8px 22px #0005}
 #mahjongRoot.mj-root.mj-landscape .mj-tools>div>button{min-height:44px;text-align:left;padding:9px 12px;color:#f5edda;background:#284239;border:0;font-size:13px}
 #mahjongRoot.mj-root.mj-landscape .mj-heading{flex:1;min-width:0;justify-content:center}
 #mahjongRoot.mj-root.mj-landscape .mj-heading h2{font-size:15px;letter-spacing:0;overflow:hidden;text-overflow:ellipsis}
 #mahjongRoot.mj-root.mj-landscape .mj-badge{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-sound{flex:none}
 #mahjongRoot.mj-root.mj-landscape .mj-sound summary{width:36px;min-height:44px;display:grid;place-items:center;font-size:0}
 #mahjongRoot.mj-root.mj-landscape .mj-sound summary:before{content:'♪';font-size:21px}
 #mahjongRoot.mj-root.mj-landscape .mj-sound>div{top:48px;right:-44px;width:min(270px,calc(100vw - 24px))}
 #mahjongRoot.mj-root.mj-landscape .mj-chat-toggle{flex:none;min-height:44px;width:40px;padding:5px;font-size:12px}
 #mahjongRoot.mj-root.mj-landscape .mj-layout{height:100%;min-height:0;grid-template-columns:minmax(0,1fr);gap:8px}
 #mahjongRoot.mj-root.mj-landscape .mj-layout>[data-mj=main]{height:100%;min-height:0;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-table{height:100%;min-height:0;display:grid;grid-template-columns:minmax(72px,1fr) minmax(96px,1.12fr) minmax(72px,1fr);grid-template-rows:52px minmax(92px,1fr) 28px;grid-template-areas:'top top top' 'left hub right' 'own own own';gap:5px 4px;padding:6px;border-radius:18px;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-table:before{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-station{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;gap:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2{grid-area:top;flex-direction:row;justify-content:center;padding:0;gap:7px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-3{grid-area:left}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-1{grid-area:right}
 #mahjongRoot.mj-root.mj-landscape .mj-table-hub{display:contents}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{position:static!important;inset:auto!important;transform:none!important;display:flex;flex-direction:row;gap:4px;width:100%!important;max-width:none;min-width:0;height:44px!important;min-height:44px!important;padding:4px;border-radius:9px;overflow:hidden}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-seat{width:108px!important;flex:none}
 #mahjongRoot.mj-root.mj-landscape .mj-seat>div{min-width:0;flex:1}
 #mahjongRoot.mj-root.mj-landscape .mj-seat b{display:block;max-width:100%;font-size:11px;line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #mahjongRoot.mj-root.mj-landscape .mj-seat small{display:block;max-width:100%;font-size:8px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #mahjongRoot.mj-root.mj-landscape .mj-seat .mj-avatar{flex:none;width:19px;height:19px;font-size:17px}
 #mahjongRoot.mj-root.mj-landscape .mj-bubble{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-river{position:static!important;inset:auto!important;transform:none!important;max-height:none;max-width:none!important;min-width:0;width:auto!important;overflow:visible;display:flex;flex-direction:column;gap:3px;align-items:center;flex-wrap:nowrap}
 #mahjongRoot.mj-root.mj-landscape .mj-river>small{font-size:9px;line-height:12px;white-space:nowrap;width:auto;margin:0}
 #mahjongRoot.mj-root.mj-landscape .mj-river>div,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-1 .mj-river>div,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-3 .mj-river>div{display:grid!important;grid-template-columns:repeat(3,20px)!important;gap:3px;min-height:28px}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile.small{display:flex!important;width:20px;height:28px;min-height:28px;max-height:28px;padding:0;border-radius:3px;border-bottom-width:2px;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-river{flex-direction:column;gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-river>div{grid-template-columns:repeat(6,20px)!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0{grid-area:own;gap:0}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-seat{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river{flex-direction:row;gap:6px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{display:grid!important;grid-template-columns:repeat(6,18px)!important;min-height:25px;gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-tile.small{width:18px;height:25px;min-height:25px;max-height:25px}
 #mahjongRoot.mj-root.mj-landscape .mj-center,#mahjongRoot.mj-root.mj-landscape .mj-waiting{grid-area:hub;position:static!important;inset:auto!important;transform:none!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;height:auto!important;min-height:0;max-width:none;padding:6px 3px;border:0;border-radius:12px;background:#14372a80;text-align:center}
 #mahjongRoot.mj-root.mj-landscape .mj-center strong{font-size:15px;line-height:20px;letter-spacing:.04em}
 #mahjongRoot.mj-root.mj-landscape .mj-center>small{font-size:9px;line-height:12px;white-space:normal}
 #mahjongRoot.mj-root.mj-landscape .mj-center>.mj-clock{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard{display:flex;flex-direction:column;align-items:center;gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-discard>.mj-tile,#mahjongRoot.mj-root.mj-landscape .mj-last-empty{width:32px;height:44px;min-height:44px;padding:0}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard small{display:block;font-size:8px;line-height:10px}
 #mahjongRoot.mj-root.mj-landscape .mj-public-toggle{position:absolute;top:auto;right:8px;bottom:5px;width:60px;max-width:60px;min-height:28px;padding:4px!important;font-size:9px!important;line-height:12px;white-space:normal}
 #mahjongRoot.mj-root.mj-landscape .mj-public-panel{display:block;inset:5px;padding:8px 10px;overflow:auto}
 #mahjongRoot.mj-root.mj-landscape .mj-public-panel>header{top:-8px;padding:4px 0}
 #mahjongRoot.mj-root.mj-landscape .mj-public-panel .mj-all-discards,#mahjongRoot.mj-root.mj-landscape .mj-public-panel .mj-melds{display:flex;flex-wrap:wrap;gap:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock{width:100%;position:static;min-height:0;height:auto;max-height:none;overflow:visible;display:flex;flex-direction:column;gap:6px;margin:0;padding:8px;border-radius:14px}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock>[data-mj=hand]{order:-1}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock>.mj-controls-dock{width:100%;height:auto;min-height:0;padding:0;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding:0;margin:0;position:relative;overflow:visible;max-height:none}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus{min-height:22px;width:100%;gap:0}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus>.mj-tile,#mahjongRoot.mj-root.mj-landscape .mj-action-focus>.mj-turn-marker{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus>div{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus h3{font-size:13px;line-height:20px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus [data-mj-clock]{font-size:14px;line-height:20px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:5px;width:100%}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons>button{min-width:0;min-height:44px;height:auto;padding:7px 10px;font-size:14px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-confirm-discard{flex:1;min-width:0;font-size:15px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-compact-cancel{flex:0 0 52px;min-width:52px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-move{flex:1 1 auto;min-width:44px;padding:5px 7px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-move-chi{min-width:94px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-buttons>.mj-move-pass{min-width:48px}
 #mahjongRoot.mj-root.mj-landscape .mj-move>b{font-size:21px}
 #mahjongRoot.mj-root.mj-landscape .mj-move-tiles .mj-tile.small{width:19px;height:28px;min-height:28px;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay>p{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay>.mj-pass-warning{display:block;margin:0;font-size:10px;text-align:left}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-options{position:fixed;inset:auto max(14px,env(safe-area-inset-right)) auto max(14px,env(safe-area-inset-left));top:max(60px,calc(env(safe-area-inset-top) + 52px));display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:8px;z-index:70;border:1px solid #b29c66;border-radius:12px;box-shadow:0 8px 24px #0007}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-options>button{min-width:0;min-height:44px;padding:5px 2px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-zone{width:100%;max-height:none;padding:0;margin:0;border:0;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;min-height:28px;margin:0 0 6px;line-height:13px;font-size:9px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>strong{font-size:11px;line-height:14px;white-space:normal}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>span{white-space:normal;overflow-wrap:anywhere;font-size:9px;line-height:12px}
 #mahjongRoot.mj-root.mj-landscape .mj-own-exposed{grid-column:1;justify-content:flex-start;width:100%;min-height:0;margin:3px 0}
 #mahjongRoot.mj-root.mj-landscape .mj-own-exposed .mj-melds{flex-wrap:wrap;gap:4px;width:100%}
 #mahjongRoot.mj-root.mj-landscape .mj-own-exposed .mj-melds>span{display:flex;flex:none;gap:2px;padding:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-own-exposed .mj-tile.small{width:18px;height:26px;min-height:26px;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-hand{display:grid;grid-template-columns:repeat(var(--mj-hand-cols,9),minmax(0,1fr));gap:6px 4px;width:100%;max-width:calc(var(--mj-hand-cols,9) * 44px + 32px);min-height:0;padding:0;margin:0 auto;align-items:stretch;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile{display:flex;flex:none;align-items:center;justify-content:center;width:100%;min-width:0;height:var(--mj-tile-h);min-height:var(--mj-tile-h);max-height:var(--mj-tile-h);aspect-ratio:auto;padding:1px 0;border-radius:5px;border-bottom-width:4px;overflow:visible;box-sizing:border-box}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile .mj-face,#mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile .mj-tile-face{display:block;width:100%;max-width:100%;height:100%;max-height:100%;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile.is-drawn{margin:0;width:100%;outline:1px solid #c6a359;outline-offset:0}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile[aria-pressed=true]{transform:none;background:#fff0b9;outline:2px solid #edc889;outline-offset:0;box-shadow:0 0 0 1px #edc889;z-index:2}
 #mahjongRoot.mj-root.mj-landscape .mj-hand .mj-drawn{top:2px;right:1px;font-size:8px;line-height:10px;padding:1px 3px;border-radius:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-wait-action{min-height:44px;padding:0;gap:6px;width:100%}
 #mahjongRoot.mj-root.mj-landscape .mj-wait-action>span:nth-child(2){font-size:12px;white-space:normal}
 #mahjongRoot.mj-root.mj-landscape .mj-wait-clock{font-size:14px}
 #mahjongRoot.mj-root.mj-landscape .mj-wait-action button{min-height:44px;padding:5px 7px;font-size:11px}
 #mahjongRoot.mj-root.mj-landscape:not(.mj-playing) .mj-player-dock{display:none}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-layout>[data-mj=main]{overflow:auto}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-lobby-grid{grid-template-columns:minmax(0,1fr)}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-quick-start{flex-direction:column;align-items:stretch;padding:12px;gap:8px}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-quick-start>button{width:100%}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(196px,1fr) auto;overflow:auto}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-table-sidebar{display:block;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-station.pos-0 .mj-seat{display:flex;width:108px!important;height:28px!important;min-height:28px!important}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-river{display:none}
 #mahjongRoot.mj-root.mj-landscape.mj-watching .mj-layout{grid-template-rows:minmax(196px,1fr)}
 #mahjongRoot.mj-root.mj-landscape.mj-watching .mj-table-sidebar{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-chat-panel{position:absolute;top:58px;left:8px;right:8px;width:auto;max-width:none;z-index:60}
 #mahjongRoot.mj-root.mj-landscape .mj-danmaku{left:8px;right:8px;bottom:38px;height:24px}
 .mj-guide-dialog[open],.mj-settlement[open]{transform:none;width:min(540px,calc(100dvw - 20px));max-height:calc(100dvh - 20px);margin:auto;inset:0;padding:14px}
 .mj-guide-dialog>header,.mj-settlement>footer{flex-wrap:wrap;gap:6px}
 .mj-winning-hand{flex-wrap:wrap;gap:4px;overflow:visible}
}

@media(max-width:700px) and (max-height:560px),(max-width:950px) and (max-height:400px){
 #mahjongRoot.mj-root.mj-landscape{--mj-tile-h:48px;grid-template-rows:40px minmax(166px,1fr) auto;gap:5px;padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
 #mahjongRoot.mj-root.mj-landscape .mj-topbar{height:40px;min-height:40px}
 #mahjongRoot.mj-root.mj-landscape .mj-table{grid-template-rows:44px minmax(78px,1fr) 24px;gap:3px;padding:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{height:36px!important;min-height:36px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-seat{width:100px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-river>div,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-1 .mj-river>div,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-3 .mj-river>div{grid-template-columns:repeat(3,18px)!important;gap:2px;min-height:23px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-river>div{grid-template-columns:repeat(6,18px)!important}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile.small{width:18px;height:23px;min-height:23px;max-height:23px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{grid-template-columns:repeat(6,16px)!important;gap:2px;min-height:22px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-tile.small{width:16px;height:22px;min-height:22px;max-height:22px}
 #mahjongRoot.mj-root.mj-landscape .mj-center{gap:2px;padding:3px 2px}
 #mahjongRoot.mj-root.mj-landscape .mj-center strong{font-size:13px;line-height:17px}
 #mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-discard>.mj-tile,#mahjongRoot.mj-root.mj-landscape .mj-last-empty{width:26px;height:34px;min-height:34px}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard small{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock{padding:6px;gap:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{min-height:26px;margin-bottom:4px;gap:1px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand{gap:5px 3px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus{min-height:20px}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus h3{font-size:12px}
}
@media(max-width:700px) and (max-height:460px){
 #mahjongRoot.mj-root.mj-landscape{--mj-tile-h:44px;grid-template-rows:40px minmax(150px,1fr) auto;gap:4px;padding:4px max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
 #mahjongRoot.mj-root.mj-landscape .mj-table{grid-template-rows:36px minmax(78px,1fr) 22px;gap:2px;padding:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{height:32px!important;min-height:32px!important;padding:2px 4px}
 #mahjongRoot.mj-root.mj-landscape .mj-river .mj-tile:not(:nth-last-child(-n+3)){display:none!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2 .mj-river>div{grid-template-columns:repeat(3,18px)!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{grid-template-columns:repeat(3,16px)!important}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock{padding:4px 6px;gap:4px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{min-height:24px;margin-bottom:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>span{font-size:8px;line-height:10px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand{gap:4px 3px}
}

/* Melds stay visible beside their owner, including the backs of concealed kongs. */
#mahjongRoot.mj-root.mj-landscape .mj-station-melds{position:absolute;z-index:3;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px;width:260px;max-width:260px;padding:5px;border-radius:9px;background:#183c2d80}
#mahjongRoot.mj-root.mj-landscape .mj-station-melds.pos-2{top:105px;left:50%;transform:translateX(-50%);width:70%;max-width:700px}
#mahjongRoot.mj-root.mj-landscape .mj-station-melds.pos-3{left:12px;top:calc(50% + 75px)}
#mahjongRoot.mj-root.mj-landscape .mj-station-melds.pos-1{right:12px;top:calc(50% + 75px)}
#mahjongRoot.mj-root.mj-landscape .mj-station-melds.pos-0{bottom:50px;left:50%;transform:translateX(-50%)}
#mahjongRoot.mj-root.mj-landscape .mj-exposed-group{display:flex;flex:none;align-items:center;gap:2px;padding:3px;border:1px solid #a0a27855;border-radius:5px;background:#345642}
#mahjongRoot.mj-root.mj-landscape .mj-exposed-group>b{font-size:10px;line-height:12px;width:12px;color:#eadcb0;text-align:center;overflow-wrap:anywhere}
#mahjongRoot.mj-root.mj-landscape .mj-station-melds .mj-tile.small{flex:none;display:flex;width:20px;height:28px;min-height:28px;max-height:28px;padding:0;border-radius:3px;border-bottom-width:2px;overflow:visible}
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape .mj-hand{grid-template-columns:repeat(var(--mj-hand-cols),minmax(0,1fr));gap:2px;max-width:calc(var(--mj-hand-cols) * 44px);align-items:start}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile{height:auto;min-height:0;max-height:52px;aspect-ratio:.64;border-bottom-width:3px;border-radius:3px;align-self:start}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'title meta' 'meld meld';min-height:0;padding:0;gap:2px;margin-bottom:4px;align-items:center}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>strong{grid-area:title;font-size:10px;line-height:14px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>span{grid-area:meta;font-size:8px;line-height:11px;text-align:right}
 #mahjongRoot.mj-root.mj-landscape .mj-own-exposed{grid-area:meld;margin:0}
 #mahjongRoot.mj-root.mj-landscape .mj-own-exposed .mj-tile.small{width:16px;height:22px;min-height:22px;max-height:22px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand>.mj-tile[aria-pressed=true]{outline-offset:-1px;box-shadow:inset 0 0 0 1px #edc889}
 #mahjongRoot.mj-root.mj-landscape .mj-hand .mj-drawn{font-size:6px;line-height:7px;top:1px;right:0;padding:0 1px}
}

/* The four seats stay on the four edges, with every exposed group beside its owner. */
#mahjongRoot.mj-root.mj-landscape .mj-square-table{border:7px solid #8b633e;border-radius:12px;box-shadow:inset 0 0 0 2px #c49a64,inset 0 0 28px #082d1c80,0 5px 0 #49331f}
#mahjongRoot.mj-root.mj-landscape .mj-station-flowers{display:flex;flex-wrap:wrap;gap:2px;align-items:center;justify-content:center}
#mahjongRoot.mj-root.mj-landscape .mj-station-flowers>b,#mahjongRoot.mj-root.mj-landscape .mj-own-flowers>b{font-size:9px;color:#f1c982}
#mahjongRoot.mj-root.mj-landscape .mj-station-flowers .mj-tile.small{width:16px;height:23px;min-height:23px}
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape{grid-template-rows:44px minmax(246px,1fr) auto;gap:7px}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table .mj-layout>[data-mj=main]{display:flex;align-items:center;justify-content:center}
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{display:grid;grid-template-columns:64px minmax(80px,1fr) 64px;grid-template-rows:auto minmax(128px,1fr) auto;grid-template-areas:'top top top' 'left hub right' 'own own own';width:100%;max-width:480px;height:auto;min-height:246px;aspect-ratio:1/1;max-height:100%;padding:7px;gap:5px;border-width:6px;border-radius:11px;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table:before{content:'';display:block;position:absolute;inset:28%;border:1px solid #86b78838;border-radius:7px;pointer-events:none;background:none;transform:none;width:auto;height:auto}
 #mahjongRoot.mj-root.mj-landscape .mj-station{gap:4px;justify-content:center;padding:0;background:none;min-height:0}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2{grid-area:top;display:grid;grid-template-columns:64px minmax(0,1fr);gap:3px 5px;align-items:center}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2>.mj-seat{grid-column:1;grid-row:1;width:64px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2>.mj-river{grid-column:1;grid-row:2}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2>.mj-station-melds{grid-column:2;grid-row:1/3}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-2>.mj-station-flowers{grid-column:2;grid-row:3}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-3{grid-area:left;justify-self:start;width:64px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-1{grid-area:right;justify-self:end;width:64px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{width:100%!important;height:31px!important;min-height:31px!important;padding:3px;gap:3px;border-radius:7px;background:#153126d9;border:1px solid #78916160;overflow:hidden}
 #mahjongRoot.mj-root.mj-landscape .mj-seat.is-turn{border-color:#e9c76d;background:#3b5230}
 #mahjongRoot.mj-root.mj-landscape .mj-seat .mj-avatar{width:14px;height:14px;font-size:13px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat b{font-size:10px;line-height:12px}
 #mahjongRoot.mj-root.mj-landscape .mj-seat small{font-size:7px;line-height:10px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds{position:static;inset:auto;transform:none;display:flex;flex-wrap:wrap;width:100%;max-width:none;gap:3px;padding:0;background:none;justify-content:center;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-exposed-group{display:flex;flex:none;gap:1px;padding:2px;border-radius:4px;background:#143628b3;border:1px solid #8bab6340}
 #mahjongRoot.mj-root.mj-landscape .mj-exposed-group>b{font-size:7px;line-height:9px;width:7px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds .mj-tile.small{width:13px;height:20px;min-height:20px;max-height:20px;padding:0;border-bottom-width:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds .mj-exposed-group:has(.mj-tile:nth-of-type(4)) .mj-tile.small{width:11px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-river>small{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-river>div{display:grid!important;grid-template-columns:repeat(3,14px)!important;gap:2px;min-height:18px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-river .mj-tile.small{width:14px;height:18px;min-height:18px;max-height:18px}
 #mahjongRoot.mj-root.mj-landscape .mj-station:not(.pos-0) .mj-river .mj-tile:not(:nth-last-child(-n+3)){display:none!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0{grid-area:own;flex-direction:column;gap:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-seat{display:flex;justify-content:center;width:100px!important;height:24px!important;min-height:24px!important;padding:2px;border-color:#cfaa68}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-seat>div{flex:none}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{grid-template-columns:repeat(6,14px)!important}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river{flex-direction:row}
 #mahjongRoot.mj-root.mj-landscape .mj-center,#mahjongRoot.mj-root.mj-landscape .mj-waiting{grid-area:hub;background:none;gap:4px;padding:4px 1px;flex-direction:column;position:relative!important;z-index:1}
 #mahjongRoot.mj-root.mj-landscape .mj-center strong{font-size:14px;line-height:18px;color:#f0d193;letter-spacing:.08em}
 #mahjongRoot.mj-root.mj-landscape .mj-center>small{font-size:8px;line-height:11px;white-space:normal;color:#d0d6b5}
 #mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-discard>.mj-tile{width:27px;height:37px;min-height:37px;max-height:37px}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard small{display:block;font-size:7px;line-height:10px}
 #mahjongRoot.mj-root.mj-landscape .mj-public-toggle{bottom:7px;right:7px;min-height:28px;width:48px;font-size:9px!important;padding:3px!important;border-radius:6px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-flowers .mj-tile.small{width:11px;height:17px;min-height:17px;max-height:17px}
 #mahjongRoot.mj-root.mj-landscape .mj-own-flowers{align-items:center}
 #mahjongRoot.mj-root.mj-landscape .mj-own-flowers .mj-tile.small{width:12px;height:18px;min-height:18px}
 #mahjongRoot.mj-root.mj-landscape .mj-danmaku{left:24%;right:24%;bottom:28%;height:24px}
}
@media(max-width:700px) and (min-height:700px){
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{grid-template-columns:72px minmax(80px,1fr) 72px;max-width:480px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-1,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-3{width:72px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds .mj-tile.small{width:15px;height:22px;min-height:22px;max-height:22px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds .mj-exposed-group:has(.mj-tile:nth-of-type(4)) .mj-tile.small{width:13px}
}
@media(max-width:700px) and (max-height:560px),(max-width:950px) and (max-height:400px){
 #mahjongRoot.mj-root.mj-landscape{grid-template-rows:40px minmax(228px,1fr) auto;gap:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{aspect-ratio:auto;max-width:440px;height:100%;min-height:228px;grid-template-columns:59px minmax(74px,1fr) 59px;grid-template-rows:auto minmax(112px,1fr) auto;padding:5px;gap:3px;border-width:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-1,#mahjongRoot.mj-root.mj-landscape .mj-station.pos-3{width:59px;gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-seat{height:25px!important;min-height:25px!important;padding:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds{gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds .mj-tile.small{width:12px;height:17px;min-height:17px;max-height:17px}
 #mahjongRoot.mj-root.mj-landscape .mj-station-melds .mj-exposed-group:has(.mj-tile:nth-of-type(4)) .mj-tile.small{width:10px}
 #mahjongRoot.mj-root.mj-landscape .mj-exposed-group{padding:1px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0{flex-direction:row;justify-content:center;gap:5px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-seat{width:85px!important;height:23px!important;min-height:23px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-discard>.mj-tile{width:23px;height:31px;min-height:31px;max-height:31px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-river>div{grid-template-columns:repeat(3,12px)!important;gap:1px;min-height:16px}
 #mahjongRoot.mj-root.mj-landscape .mj-station .mj-river .mj-tile.small{width:12px;height:16px;min-height:16px;max-height:16px}
 #mahjongRoot.mj-root.mj-landscape .mj-station.pos-0 .mj-river>div{grid-template-columns:repeat(6,12px)!important}
 #mahjongRoot.mj-root.mj-landscape .mj-public-toggle{bottom:4px;right:4px;min-height:23px;width:39px;font-size:8px!important}
}
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station>.mj-station-melds{position:static!important;inset:auto!important;transform:none!important;width:100%!important;max-width:100%!important;flex-shrink:0}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station>.mj-river{position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:100%!important;flex-shrink:0;margin:0!important;padding:0!important}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station>.mj-seat,#mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station>.mj-station-flowers{flex-shrink:0}
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{grid-template-rows:auto minmax(min-content,1fr) auto}
}
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape{--mj-river-tile:14px}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station .mj-river>div{grid-template-columns:repeat(3,var(--mj-river-tile))!important;width:auto!important;min-width:0!important;padding:0!important;flex:none!important;justify-content:center;gap:2px!important}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-0 .mj-river>div{grid-template-columns:repeat(6,var(--mj-river-tile))!important}
}
@media(max-width:700px) and (max-height:560px),(max-width:950px) and (max-height:400px){#mahjongRoot.mj-root.mj-landscape{--mj-river-tile:12px}}

/* Public tiles retain their space when the browser leaves a short viewport. */
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2{grid-template-rows:auto auto;min-height:min-content}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2>.mj-seat{grid-row:1/3}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2>.mj-station-melds{grid-row:1}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2>.mj-river{grid-column:2;grid-row:2;justify-self:start}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2>.mj-station-flowers{grid-column:2;grid-row:2;justify-self:end;max-width:55%}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-0{min-height:min-content}
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{grid-template-rows:max-content minmax(min-content,1fr) max-content}
}
@media(max-width:700px) and (max-height:460px){
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{zoom:.82;width:calc(100% / .82);max-width:none;height:auto;max-height:none;min-height:278px}
}

/* Recent discards share a readable central pool; melds remain beside each owner. */
.mj-center-rivers{display:none}
.poker-page .poker-custom-raise .poker-raise-stepper{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.poker-page .poker-custom-raise .poker-raise-stepper button{min-height:44px;padding:7px 3px}
.poker-page .poker-raise-help{display:block;color:#d7e5cf;font-size:11px;line-height:1.5}
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station>.mj-river{display:none!important}
 #mahjongRoot.mj-root.mj-landscape .mj-center{gap:4px;padding:5px 2px;justify-content:center;background:#102f25d9}
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{min-height:max-content;max-height:none}
 #mahjongRoot.mj-root.mj-landscape .mj-center>strong,#mahjongRoot.mj-root.mj-landscape .mj-center>small{margin:0}
 #mahjongRoot.mj-root.mj-landscape .mj-center>.mj-center-rivers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 4px;width:100%;margin-top:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;border-radius:5px;background:#325341;padding:3px 1px}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player>small{font-size:9px;line-height:10px;color:#f3edcf;white-space:nowrap;margin:0!important}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;min-height:24px;max-width:66px;width:100%}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player .mj-tile.small{display:flex!important;width:100%;height:24px;min-height:24px;max-height:24px;aspect-ratio:.69;padding:0;border-bottom-width:2px;border-radius:3px;overflow:visible}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player .mj-river-empty{grid-column:1/-1;font-size:8px;color:#f3edcf;line-height:14px;text-align:center}
 #mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-discard>.mj-tile,#mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-empty{width:44px;height:60px;min-height:60px;max-height:60px}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard small{font-size:10px;line-height:12px;color:#fff4cf;margin:0}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2{grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2>.mj-seat{grid-row:1}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-2>.mj-station-flowers{grid-row:2;max-width:100%;justify-self:center}
 #mahjongRoot.mj-root.mj-landscape .mj-square-table .mj-station.pos-0{min-height:25px}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-player-dock>.mj-controls-dock{order:-2;position:static!important;inset:auto!important}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock{min-height:min-content}
 #mahjongRoot.mj-root.mj-landscape .mj-player-dock>[data-mj=hand],#mahjongRoot.mj-root.mj-landscape .mj-player-dock>.mj-controls-dock{flex:none;min-height:min-content}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-options{position:static!important;inset:auto!important;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;margin:2px 0;padding:5px;box-shadow:none;z-index:auto}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-options[hidden]{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-options>.mj-move{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#3b583b;color:#fff5dc;border-color:#d3c28b;min-height:49px;padding:4px 1px}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-options>.mj-move>b{font-size:14px;line-height:17px}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-options .mj-move-tiles .mj-tile.small{width:18px;height:25px;min-height:25px}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-choosing-chi .mj-action-buttons{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-chi-back{flex:none;min-height:28px;padding:4px 6px;font-size:10px;white-space:normal;margin-left:5px;background:#405c40;color:#fff5dc}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-controls-dock{border:1px solid #e3c985;border-radius:9px;padding:7px!important;background:#263f31}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-action-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-action-buttons>.mj-move{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0!important;min-height:58px;padding:4px 1px!important;gap:2px}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-action-buttons>.mj-move>b{font-size:17px;line-height:20px}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-action-buttons>.mj-move>small{font-size:8px;line-height:10px;text-align:center;white-space:normal}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-move-tiles .mj-tile.small{width:15px;height:22px;min-height:22px}
 #mahjongRoot.mj-root.mj-landscape .mj-overlay>.mj-pass-warning{color:#ffe4a8}
 #mahjongRoot.mj-root.mj-landscape .mj-seat.me{background:#19392c;color:#f2f3e0}
 #mahjongRoot.mj-root.mj-landscape .mj-seat :is(b,small){color:#d5e3d9}
 #mahjongRoot.mj-root.mj-landscape .mj-station-flowers>b{color:#ffe4a8}
 #mahjongRoot.mj-root.mj-landscape .mj-toolbar-short{color:#d5e3d9}
 html[lang=en] #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-action-buttons>.mj-move>b{font-size:13px;line-height:18px}
}
@media(max-width:700px) and (max-height:560px),(max-width:950px) and (max-height:400px){
 #mahjongRoot.mj-root.mj-landscape{grid-template-rows:40px minmax(min-content,1fr) auto}
 #mahjongRoot.mj-root.mj-landscape .mj-layout{min-height:min-content;align-items:start}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);min-height:0;gap:2px;margin-bottom:3px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>strong{font-size:10px;line-height:13px}
 #mahjongRoot.mj-root.mj-landscape .mj-hand-header>span{font-size:8px;line-height:11px;text-align:right}
 #mahjongRoot.mj-root.mj-landscape .mj-own-exposed{grid-column:1/-1;grid-row:2;margin:0}
 #mahjongRoot.mj-root.mj-landscape.mj-claiming .mj-hand-header .mj-turn-label{display:none}
 #mahjongRoot.mj-root.mj-landscape .mj-action-focus{margin-bottom:0}
 #mahjongRoot.mj-root.mj-landscape .mj-table.mj-square-table{zoom:.72;width:calc(100% / .72);max-width:none;min-height:235px;height:auto;max-height:none}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player .mj-tile:not(:nth-last-child(-n+3)){display:none!important}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player .mj-tile.small{max-height:27px}
 #mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-discard>.mj-tile,#mahjongRoot.mj-root.mj-landscape .mj-center .mj-last-empty{width:34px;height:46px;min-height:46px;max-height:46px}
 #mahjongRoot.mj-root.mj-landscape .mj-center{gap:2px}
 #mahjongRoot.mj-root.mj-landscape .mj-last-discard small{font-size:8px;line-height:10px}
 #mahjongRoot.mj-root.mj-landscape .mj-pool-player{gap:1px;padding:2px 1px}
}

/* The lobby scrolls as a list. Table centering belongs only to the board. */
#mahjongRoot.mj-root.mj-landscape.mj-in-lobby{
 grid-template-rows:38px minmax(0,1fr);grid-template-areas:'toolbar' 'table';overflow:hidden;
}
#mahjongRoot.mj-root.mj-landscape.mj-in-lobby>.mj-player-dock{display:none}
#mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-layout{
 height:100%;min-height:0;align-items:stretch;overflow:hidden;
}
#mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-layout>[data-mj=main]{
 display:block;width:100%;height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;
 padding-bottom:4px;overscroll-behavior:contain;scroll-padding-block:12px;
}
#mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-quick-start{min-width:0;margin-top:0}
#mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-quick-start>div{min-width:0}
#mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-daily-task{
 display:grid;gap:4px;padding:10px 12px;font-size:12px;line-height:1.55;
}
@media(max-width:700px),(max-width:950px) and (max-height:600px){
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby,
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing){
  grid-template-rows:44px minmax(0,1fr);grid-template-areas:'toolbar' 'table';overflow:hidden;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-lobby-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-lobby-card{padding:14px;min-width:0}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-lobby-card header small{font-size:12px;line-height:1.5}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-table-facts{font-size:12px;line-height:1.55}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-mini-seats{gap:6px}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-mini-seats button{min-height:48px}
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-mini-seats button:disabled{
  opacity:1;background:#1d3e30;color:#e5ead6;border-color:#759473;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-mini-seats button span{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-quick-start>button,
 #mahjongRoot.mj-root.mj-landscape.mj-in-lobby .mj-visit{min-height:44px;font-size:14px}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing)>.mj-player-dock{display:none}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-layout{
  display:block;height:100%;min-height:0;overflow:auto;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-layout>[data-mj=main]{
  display:block;height:auto;min-height:0;overflow:visible;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-square-table{
  width:100%;height:auto;max-height:none;aspect-ratio:1;margin:0 auto;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-table-sidebar{overflow:visible;margin-top:12px;padding-bottom:8px}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-table-sidebar .mj-overlay{
  display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px;
  background:#183d2e;color:#f5efd6;border:1px solid #839c70;border-radius:12px;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-overlay header{gap:6px;flex-wrap:wrap}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-overlay h3{color:#fff0c7;font-size:15px}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-overlay .mj-ready-count{color:#d0e0d0}
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-overlay>p{
  display:block;margin:0;color:#d0e0d0;font-size:12px;line-height:1.55;
 }
 #mahjongRoot.mj-root.mj-landscape.mj-at-table:not(.mj-playing) .mj-action-buttons>button{min-height:44px;width:100%}
}
