*{box-sizing:border-box}body{margin:0;background:#071e24;color:#eff5ec;font:16px system-ui,'Microsoft YaHei',sans-serif}button,input,select{font:inherit}button{border:0;border-radius:12px;padding:13px 22px;background:#e7bc6b;color:#172c29;font-weight:700;cursor:pointer}button.secondary{background:#ffffff12;color:#e8eee5;border:1px solid #ffffff25}button:disabled{opacity:.4;cursor:default}input,select{width:100%;border:1px solid #ffffff24;border-radius:10px;background:#0b2a30;color:white;padding:13px;margin:7px 0 15px}h1{font-size:46px;letter-spacing:4px;margin:10px 0}h2{margin:8px 0 20px}p{color:#adc2bf;line-height:1.7}.shell{max-width:960px;margin:auto;padding:28px}.brand{font-size:13px;letter-spacing:4px;color:#dfbd7a}.hero{padding:45px 0 25px}.row{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.panel{background:linear-gradient(135deg,#163c40,#0d2b32);border:1px solid #ffffff15;border-radius:22px;padding:24px;margin:14px 0}.mode{min-height:180px;cursor:pointer;text-align:left;color:#eff5ec;width:100%;font-weight:400}.mode strong{display:block;font-size:25px;margin:18px 0 8px}.icon{font-size:30px}.tag{border:1px solid #b5c8bc30;border-radius:100px;padding:7px 12px;font-size:13px;color:#d7c8a3}.muted{color:#9fb9b6;font-size:13px}.table{background:radial-gradient(ellipse at center,#226556,#103d3d 65%,#0a2931);border:1px solid #729b7833;border-radius:26px;padding:20px;min-height:410px}.players{display:flex;justify-content:space-between;gap:14px}.player{background:#071e2480;border-radius:14px;padding:13px;min-width:135px}.active{outline:2px solid #e7bc6b}.score{color:#f2cf8c;font-weight:700}.center{text-align:center;padding:22px 8px;min-height:140px}.hand{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:15px 0}.card{width:49px;height:72px;border-radius:7px;background:#faf7e9;color:#182c32;padding:5px 3px;font-size:21px;border:2px solid transparent;box-shadow:0 4px 8px #0003;cursor:pointer}.card:disabled{opacity:1}.card.red{color:#b44237}.card.joker{font-size:13px!important;white-space:nowrap}.card.selected{transform:translateY(-12px);border:2px solid #e5b24f;background:#ffe9ab}.card small{display:block;font-size:15px}.mini .card{width:38px;height:55px;font-size:17px;display:inline-block;margin:2px}.actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.round{color:#dfc58d;font-size:20px}.log{font-size:13px;color:#b0c6c0;max-height:110px;overflow:auto;margin-top:18px;line-height:1.8}.error{color:#ffb9a6}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:13px 23px;background:#f2d6a3;color:#142f32;border-radius:12px;display:none;z-index:5;max-width:90%}a{color:#edce8e}label{font-size:14px;color:#b7ceca}.rules{line-height:1.9;color:#c5d5cf}table{width:100%;border-collapse:collapse}td,th{padding:12px;border-bottom:1px solid #ffffff15;text-align:left}@media(max-width:600px){.shell{padding:16px}.hero{padding-top:25px}h1{font-size:36px}.grid{grid-template-columns:1fr}.mode{min-height:130px}.panel{padding:18px}.player{min-width:0;flex:1;font-size:13px;padding:10px}.table{padding:12px}.card{width:40px;height:62px;font-size:18px}.players{gap:8px}button{padding:12px 16px}}
/* Table and bottom hand layout */
.game-shell{--dock-height:250px}
.live-game{height:100dvh;height:100vh;overflow:hidden;display:flex;flex-direction:column;gap:12px}
@supports(height:100dvh){.live-game{height:100dvh}}
.game-bar{margin:0;flex-shrink:0;gap:6px}
.game-bar .round{font-size:18px}.game-bar .tag{font-size:12px}
.game-shell>.table{position:relative;display:flex;flex-direction:column;min-height:300px}
.live-game>.table{flex:1;min-height:0;margin-bottom:var(--dock-height)}
.game-shell .players{flex-shrink:0}.game-shell .player p{margin:9px 0}
.game-shell .center{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0;padding:16px 0 78px}
.played-cards{min-height:60px;margin:12px 0;display:flex;justify-content:center;flex-wrap:wrap}
.bottom-cards{position:absolute;right:14px;bottom:10px;text-align:right}
.bottom-cards>.muted{font-size:11px;letter-spacing:2px}
.bottom-cards .mini .card{width:29px;height:42px;padding:3px 2px;font-size:14px;margin:4px 1px 0;border-radius:4px}
.bottom-cards .card small{font-size:11px}.bottom-hidden{display:block;margin-top:8px;color:#d1bb87}
.hand-dock{position:relative;height:var(--dock-height);overflow:hidden;background:linear-gradient(180deg,transparent,#071e24 38%);flex-shrink:0}
.live-game .hand-dock{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,960px);z-index:10}
.self-player{position:absolute;top:8px;left:18px;right:18px;font-size:14px}
.hand-dock .actions{position:absolute;top:47px;left:8px;right:8px;min-height:44px;align-items:center}
.hand-dock .actions button{min-width:88px;padding:12px 16px}
.hand{position:absolute;top:116px;left:12px;right:12px;height:190px;padding:0;display:block;isolation:isolate;touch-action:manipulation}
.hand .card{position:absolute;top:0;left:calc((100% - var(--spread-width))/2 + var(--i)*var(--step));width:var(--card-width);height:184px;border:1px solid #cdc8b7;border-radius:10px;background:linear-gradient(135deg,#fffdf5,#eee9d9);padding:0;text-align:left;box-shadow:-3px 2px 6px #0005;transition:transform .16s ease,background .16s ease;transform:translateY(0);-webkit-tap-highlight-color:transparent;overflow:hidden}
.hand .card-corner{position:absolute;top:9px;left:3px;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:var(--rank-size);line-height:1.15;font-weight:750}
.hand .card small{font-size:16px}.hand .card.joker .card-rank{writing-mode:vertical-rl;font-size:12px;letter-spacing:1px}
.hand .card-watermark{position:absolute;top:64px;right:9px;font-size:54px;opacity:.12;pointer-events:none}
.hand .card.selected{transform:translateY(-24px);background:linear-gradient(135deg,#fff1bd,#f4d683);border-color:#e7bc6b;box-shadow:-3px 2px 6px #0005,inset 0 0 0 1px #c9953b}
.live-game>.log{display:none}
.finished-game .hand-dock{margin-top:16px}
@media(max-height:700px){.game-shell{--dock-height:224px}.hand{top:102px}.hand-dock .actions{top:39px}.self-player{top:3px}.live-game{gap:8px;padding-top:10px;padding-bottom:8px}.game-shell .player{padding:8px}.game-shell .player p{margin:5px 0}.game-shell .center{padding:6px 0 60px}.played-cards{min-height:45px;margin:5px 0}.played-cards .card{width:30px;height:43px;font-size:14px}.played-cards .card small{font-size:11px}.bottom-cards .mini .card{height:32px;width:24px;font-size:12px}.bottom-cards .card small{font-size:9px}.bottom-cards{bottom:5px}}
@media(prefers-reduced-motion:reduce){.hand .card{transition:none}}
/* Compact landscape table */
@media(orientation:landscape) and (max-height:500px){
.game-shell{--dock-height:170px}.live-game{padding:8px 16px;gap:6px}.live-game>.row:first-child{display:none}
.game-shell .table{padding:8px}.game-shell .players{position:absolute;top:8px;left:8px;right:8px}.game-shell .player{flex:0 1 170px;font-size:11px;padding:6px}.game-shell .player p{margin:2px 0}.game-shell .center{padding:54px 130px 6px}.game-shell .center>.muted{font-size:11px}.played-cards{min-height:40px;margin:2px 0}
.hand-dock .self-player{top:14px;right:auto;max-width:240px;font-size:12px}.hand-dock .actions{top:6px;left:270px;right:14px}.hand{top:72px}.hand-dock .actions button{padding:10px 16px}
}
#toast{z-index:100;max-width:calc(100vw - 32px);width:max-content;text-align:center;line-height:1.5;box-shadow:0 6px 24px #0005;pointer-events:none}
.has-result{overflow:hidden}
.result-overlay{position:fixed;inset:0;z-index:80;background:#020e16bd;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:16px}
.result-dialog{width:min(620px,100%);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);display:flex;flex-direction:column;gap:18px;overflow:auto;padding:26px;border:1px solid #d6b77b66;border-radius:24px;background:radial-gradient(ellipse at top,#245148,#102e35 75%);box-shadow:0 24px 80px #0009}
.result-header{display:flex;align-items:center;gap:18px}.result-header>div{min-width:0}.result-emblem{display:grid;place-items:center;flex-shrink:0;width:66px;height:66px;font-size:36px;border-radius:50%;background:#e7bc6b15;color:#e7bc6b;border:1px solid #e7bc6b55}
.result-header h2{font-size:30px;margin:6px 0}.result-header p{margin:0;color:#e4c98e;font-size:15px;overflow-wrap:anywhere;line-height:1.5}.result-header .brand{letter-spacing:2px;font-size:11px}
.result-scores{background:#061d2455;border:1px solid #ffffff12;border-radius:14px;overflow:hidden;flex-shrink:0}.result-scores table{table-layout:fixed;font-size:16px}.result-scores th{font-weight:400;color:#a4bcb6;font-size:12px}.result-scores td,.result-scores th{padding:13px 14px}.result-scores td:not(:first-child),.result-scores th:not(:first-child){text-align:right}.result-scores th:first-child{width:44%}.result-scores tbody tr:last-child td{border-bottom:0}.result-scores .result-name{display:block;overflow-wrap:anywhere;font-weight:650}.result-scores small{display:block;color:#99b2ab;font-size:11px;margin-top:3px}.result-scores .is-me{background:#ffffff06}.positive{color:#eac67e}.negative{color:#e99b91}
.final-result .result-scores th:first-child{width:13%}.final-result .result-scores th:nth-child(2){width:39%}.final-result .result-scores td:nth-child(2),.final-result .result-scores th:nth-child(2){text-align:left}.is-winner{background:#e7bc6b10}.rank-badge{color:#dfc58d;font-size:20px;font-weight:750}
.result-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.result-footer .muted{font-size:12px}.result-buttons{display:flex;gap:10px;margin-left:auto}.result-buttons button{min-width:112px}.result-buttons button:focus-visible{outline:2px solid #fff4d5;outline-offset:3px}
@media(max-height:500px){.result-overlay{padding:10px}.result-dialog{width:min(620px,100%);max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);padding:16px 20px;gap:10px;border-radius:18px}.result-emblem{width:48px;height:48px;font-size:27px}.result-header{gap:12px}.result-header h2{font-size:24px;margin:2px 0}.result-header p{font-size:13px}.result-scores th,.result-scores td{padding:7px 12px}.result-scores table{font-size:14px}.result-scores small{margin-top:1px;font-size:10px}.result-footer button{padding:10px 16px}.result-footer .muted{font-size:11px}}
@media(max-width:450px){.result-dialog{padding:18px;gap:16px}.result-header{gap:12px}.result-emblem{width:48px;height:48px;font-size:28px}.result-header h2{font-size:26px}.result-header .brand{letter-spacing:1px}.result-scores td,.result-scores th{padding:12px 8px}.result-scores table{font-size:14px}.result-scores th{font-size:11px}.result-footer{justify-content:center}.result-buttons{margin:0;justify-content:center;width:100%}.final-result .result-scores th:nth-child(2){width:35%}}
@media(max-height:360px){.result-dialog{padding:10px 16px;gap:7px}.result-emblem{width:40px;height:40px}.result-header h2{font-size:20px;line-height:1.15;margin:1px 0}.result-header .brand{font-size:10px}.result-header p{font-size:12px;line-height:1.25}.result-scores th,.result-scores td{padding:3px 10px}.result-footer button{padding:8px 14px}}
.sound-button{padding:7px 12px!important;min-width:36px;font-size:18px}
.game-bar .sound-button{margin-left:auto}.game-shell>.row .sound-button{display:none}
.sound-overlay{z-index:90}.sound-dialog{width:min(460px,100%);gap:12px}.sound-dialog h2{margin:0;font-size:24px}.sound-dialog input[type=range]{margin:8px 0 0;padding:0;accent-color:#e7bc6b;cursor:pointer}.sound-switch{display:flex;align-items:center;justify-content:space-between;color:#eff5ec;font-size:16px}.sound-switch input{width:22px;height:22px;margin:0;accent-color:#e7bc6b}.sound-dialog p{margin:0}.sound-dialog .result-buttons{width:100%;justify-content:flex-end}
@media(max-height:400px){.sound-dialog{gap:7px}.sound-dialog h2{font-size:21px}.sound-dialog .sound-switch{font-size:14px}.sound-dialog input[type=range]{height:16px;margin:4px 0}.sound-dialog .result-buttons button{padding:8px 14px}}
/* All menus share a bounded viewport; content reflows before any fallback fit. */
html,body,#app{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
.screen-page{height:var(--app-height,100dvh);max-width:1040px;padding:16px 22px;display:flex;flex-direction:column;gap:12px;overflow:hidden}
.screen-page .topbar{flex-shrink:0;min-height:40px;flex-wrap:nowrap}.screen-page .topbar>.row{gap:8px;flex-wrap:nowrap}.screen-page .topbar button{padding:9px 16px;min-height:36px}.screen-page .topbar .brand{white-space:nowrap}
.screen-content{flex:1;min-height:0;min-width:0;overflow:hidden}.screen-canvas{width:100%;min-height:100%;display:flex;flex-direction:column;gap:12px;transform-origin:top left}
.view-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.view-heading h2{margin:0;font-size:25px}.view-heading p{margin:0;font-size:14px}.view-heading .tag{font-size:11px;padding:5px 10px}
.screen-page h3{font-size:19px;margin:0 0 12px}.screen-page p{line-height:1.6}.screen-page .panel{margin:0;padding:18px;border-radius:18px;min-width:0}.screen-page button{min-height:38px;padding:10px 18px}
.screen-page input,.screen-page select{margin:0;padding:9px 12px;min-height:38px;border-radius:9px;font-size:15px;min-width:0}.screen-page label.field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:13px}
.home-heading h1{font-size:36px;margin:8px 0 0;letter-spacing:2px}.home-heading>p{max-width:190px;text-align:right;color:#9fb9b6}
.home-modes{grid-template-columns:1fr 1fr;gap:14px;flex:1;min-height:125px}.screen-page .mode{min-height:125px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:20px 24px}.screen-page .mode strong{font-size:27px;margin:8px 0}.screen-page .mode .icon{font-size:28px;line-height:1}.screen-page .mode .muted{font-size:13px}
.account-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0}.account-strip>div{display:flex;align-items:center;gap:16px;min-width:0}.account-strip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-strip button{flex-shrink:0}.view-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0}.view-footer .muted{font-size:12px}.view-footer button{min-height:34px;padding:7px 14px}
.setup-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:14px;flex:1;min-height:0}.setup-main{display:flex;flex-direction:column;justify-content:center;gap:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.setting-summary{display:flex;justify-content:space-between;gap:10px;color:#aec3bb;font-size:12px;flex-wrap:wrap}.setting-summary b{color:#e7bc6b;margin-left:4px}.primary-action{align-self:stretch}.setup-side{display:flex;flex-direction:column;justify-content:center;gap:10px}.setup-side h3{margin:0}.setup-side p{font-size:14px;margin:0}.setup-side .field{gap:5px}.setup-side .icon{color:#e7bc6b}
.view-tabs{display:flex;gap:8px;flex-shrink:0}.view-tabs button{flex:1;min-width:0;min-height:36px;padding:8px 12px;font-size:14px}.view-tabs .tab-active{background:#e7bc6b;color:#172c29}
.auth-card,.connection-card,.profile-card{flex:1;display:flex;flex-direction:column;justify-content:center;gap:16px}.auth-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px}.auth-actions{display:flex;gap:12px}.auth-actions button{flex:1}.compact-note{font-size:12px;color:#9fb9b6;margin:0;line-height:1.5!important}.connection-status{display:flex;align-items:center;gap:10px;justify-content:space-between;border-top:1px solid #ffffff16;padding-top:10px}.connection-status>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.screen-page .text-button{background:transparent;color:#e7bc6b;font-size:12px;white-space:nowrap;padding:4px 0;min-height:28px}.connection-card{max-width:760px;width:100%;align-self:center}.connection-card h3{margin:0}.profile-card{align-items:center;text-align:center}.profile-card h3{margin:0}.profile-card p{margin:0}.profile-symbol{font-size:42px;color:#e7bc6b}
.rules-card{flex:1;display:flex;flex-direction:column;justify-content:center}.rules-card h3{color:#e7bc6b}.rules-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.rules-columns p{font-size:15px;margin:0;line-height:1.8}.rules-tabs button{font-size:13px}
.waiting-card{flex:1;display:flex;flex-direction:column;justify-content:center;gap:22px}.room-invite{display:flex;justify-content:center;align-items:center;gap:18px}.room-code{font-size:44px;letter-spacing:6px;color:#e7bc6b}.waiting-seats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.waiting-seat{display:flex;flex-direction:column;gap:8px;align-items:center;padding:14px 8px;border-radius:12px;background:#061d2455;min-width:0}.waiting-seat strong{max-width:100%;font-size:14px;overflow-wrap:anywhere}.seat-icon{font-size:28px;color:#e7bc6b}
@media(orientation:portrait){.screen-page{padding:14px 16px;gap:12px}.home-heading{align-items:flex-start}.home-heading h1{font-size:29px}.home-heading>p{display:none}.screen-page .mode{padding:18px 14px}.screen-page .mode strong{font-size:22px}.screen-page .mode .muted{font-size:11px}.account-strip>div{flex-direction:column;align-items:flex-start;gap:4px}.account-strip{padding:14px!important}.setup-grid{grid-template-columns:1fr;grid-template-rows:1fr auto;gap:12px}.setup-main{gap:16px}.setup-side{gap:8px}.setup-side>.icon{display:none}.setup-side h3{font-size:17px}.setup-side p{font-size:13px}.auth-fields{grid-template-columns:1fr}.auth-actions{flex-direction:column;gap:8px}.rules-columns{grid-template-columns:1fr;gap:16px}.rules-tabs{gap:5px}.rules-tabs button{padding:8px 5px;font-size:11px}.room-invite{flex-direction:column;gap:8px}.room-code{font-size:37px}.waiting-card{gap:20px}.waiting-seats{gap:6px}.waiting-seat{padding:12px 4px}.waiting-seat strong{font-size:12px}.waiting-seat .muted{font-size:11px}}
@media(orientation:landscape) and (max-height:500px){.screen-page{padding:10px 18px;gap:8px}.screen-page .topbar{min-height:34px}.screen-page .topbar button{min-height:32px;padding:6px 13px}.screen-canvas{gap:9px}.view-heading h2{font-size:21px}.view-heading .muted{font-size:12px}.home-heading h1{font-size:28px;margin:4px 0 0}.home-heading .tag{display:none}.screen-page .panel{padding:14px 18px;border-radius:14px}.home-modes{min-height:105px;gap:12px}.screen-page .mode{min-height:105px;padding:14px 20px}.screen-page .mode .icon{font-size:23px}.screen-page .mode strong{font-size:24px;margin:5px 0}.screen-page .account-strip{padding:10px 16px}.screen-page .account-strip button{min-height:34px;padding:7px 14px}.setup-grid{gap:12px}.setup-main{gap:13px}.setup-side h3{font-size:17px}.setup-side p{font-size:13px}.auth-card,.connection-card,.profile-card{gap:12px}.auth-fields{gap:12px}.view-tabs button{min-height:32px;padding:6px 12px}.screen-page label.field{gap:4px;font-size:12px}.screen-page input,.screen-page select{min-height:36px;padding:7px 10px}.connection-status{padding-top:7px}.rules-columns{gap:22px}.rules-columns p{font-size:14px;line-height:1.65}.rules-card h3{font-size:18px;margin-bottom:10px}.waiting-card{gap:12px}.room-code{font-size:34px}.waiting-seat{gap:5px;padding:10px 8px}.seat-icon{font-size:24px}}
@media(max-height:360px){.screen-page{padding:7px 14px;gap:6px}.screen-canvas{gap:7px}.screen-page .topbar{min-height:30px}.screen-page .panel{padding:11px 14px}.home-heading h1{font-size:25px}.screen-page .mode{min-height:86px;padding:10px 16px}.home-modes{min-height:86px}.screen-page .mode strong{font-size:22px}.screen-page .mode .icon{font-size:20px}.screen-page .mode .muted{font-size:11px}.view-heading h2{font-size:20px}.screen-page h3{font-size:16px}.setup-main,.auth-card,.connection-card{gap:10px}.screen-page button{min-height:34px;padding:7px 14px}.screen-page input,.screen-page select{min-height:34px}.compact-note{font-size:11px}.setting-summary{font-size:11px}.view-tabs button{min-height:30px;padding:5px 10px;font-size:12px}.rules-columns p{font-size:13px;line-height:1.6}.view-footer button{min-height:30px;padding:5px 12px}.waiting-card{gap:8px}.room-code{font-size:29px}.waiting-seat{padding:7px 6px}}
.keyboard-open .screen-page .view-heading,.keyboard-open .screen-page .compact-note,.keyboard-open .screen-page .connection-status{display:none}
/* Compact 24-hour results browser and full-hand replay. */
.history-layout{display:grid;grid-template-columns:220px 1fr;gap:14px;flex:1;min-height:0}.history-list{overflow-y:auto;display:flex;flex-direction:column;gap:8px}.history-list button{text-align:left;display:flex;flex-direction:column;gap:5px;flex-shrink:0}.history-list small,.history-list span{font-size:11px;font-weight:400}.history-detail{display:flex;flex-direction:column;gap:12px;min-height:0}.history-detail h3{margin:0}.history-totals{display:flex;justify-content:space-between;gap:12px}.history-totals>span{font-size:13px}.history-totals small{display:block;color:#adc2bf;font-size:11px}.history-rounds{overflow:auto;min-height:0;flex:1}.history-rounds table{font-size:13px}.history-rounds th,.history-rounds td{padding:7px}.history-rounds button{padding:5px 10px;min-height:28px;font-size:12px}.page-history .screen-canvas,.page-replay .screen-canvas{height:100%;min-height:0}.replay-summary{display:flex;justify-content:space-between;font-size:13px;gap:10px}.replay-hands{display:grid;grid-template-rows:repeat(3,1fr);gap:8px;flex:1;min-height:0}.replay-seat{padding:6px 10px;border-radius:10px;background:#153d3e;min-height:0;overflow:hidden}.replay-seat header{display:flex;justify-content:space-between;font-size:12px;margin-bottom:5px}.replay-hand{display:flex;align-items:flex-start;height:calc(100% - 24px);padding-right:30px}.replay-hand .card{width:45px;height:62px;flex:1 1 0;max-width:45px;min-width:0;border-radius:4px;padding:3px 0 0 2px;text-align:left;font-size:15px;overflow:visible;box-shadow:-2px 0 3px #0005}.replay-hand .card:last-child{min-width:40px}.replay-hand .card small{font-size:12px}.replay-controls{display:flex;align-items:center;gap:8px;flex-shrink:0}.replay-controls input{margin:0;padding:0;flex:1;min-width:30px}.replay-controls select{width:70px;margin:0}.replay-controls button{white-space:nowrap;padding:7px 12px;font-size:12px}.card.joker .card-rank{writing-mode:vertical-rl;text-orientation:upright;font-size:9px;line-height:1;letter-spacing:0}.hand .card.joker .card-rank{font-size:11px;letter-spacing:1px}.replay-hand .card.joker .card-rank{font-size:7px}.card.joker .card-corner{display:inline-flex;align-items:center;gap:2px}.hand .card.joker .card-corner{display:flex;flex-direction:column}
@media(max-height:430px){.history-layout{grid-template-columns:190px 1fr;gap:10px}.history-detail{gap:7px}.history-rounds th,.history-rounds td{padding:4px}.replay-seat header{font-size:10px;margin-bottom:3px}.replay-seat{padding:4px 8px}.replay-hand .card{height:45px;font-size:12px}.replay-hand .card small{font-size:9px}.replay-controls button{min-height:30px!important}.replay-summary{font-size:11px}.page-replay .screen-page{gap:6px}.replay-hands{gap:5px}.replay-hand .card.joker .card-rank{font-size:6px}}
@media(orientation:portrait){.history-layout{grid-template-columns:115px 1fr;gap:8px}.history-list button{padding:10px!important;font-size:12px}.history-totals{flex-direction:column;gap:4px}.history-rounds table{font-size:11px}.history-rounds th,.history-rounds td{padding:4px}.history-rounds button{padding:4px!important;font-size:10px}.replay-controls{flex-wrap:wrap}.replay-controls input{order:2;flex-basis:100%}}
.table-hud{position:absolute;top:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;background:#061e23c9;border:1px solid #d6b77b33;border-radius:12px;padding:5px 10px;z-index:2;white-space:nowrap;font-size:11px;color:#bbcbc0}.table-hud>span{display:flex;flex-direction:column;gap:2px;text-align:center}.table-hud b{color:#f1ca78;font-size:17px}.table-hud .mini{display:flex}.table-hud .mini .card{margin:1px;width:25px;height:36px;font-size:12px;padding:2px}.table-hud .card small{font-size:9px}.table-hud .bottom-hidden{font-size:15px;margin:0}.bottom-cards{display:none}.wild-indicator{display:flex;flex-direction:column;align-items:center;background:#e7bc6b22;padding:2px 7px;border-radius:5px}.wild-indicator small{font-size:9px}.combo-name{font-size:22px;color:#f5d587;font-weight:750;min-height:25px;text-shadow:0 3px 8px #0008}.game-shell .center{padding-top:65px;padding-bottom:4px}.landlord-notice{position:fixed;left:50%;top:40%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:8px;padding:22px 48px;border:1px solid #e7bc6b;border-radius:20px;background:#16382bef;color:#f8d68c;box-shadow:0 0 50px #f6c84b50;z-index:45;pointer-events:none;animation:landlord-reveal 2.4s both}.landlord-notice strong{font-size:30px}@keyframes landlord-reveal{0%{opacity:0;scale:.85}15%,80%{opacity:1;scale:1}100%{opacity:0;scale:1.04}}
@media(max-height:500px){.table-hud{top:5px;gap:5px;padding:3px 7px}.table-hud .mini .card{width:23px;height:32px;font-size:11px}.table-hud b{font-size:15px}.game-shell .center{padding:54px 120px 0}.combo-name{font-size:17px;min-height:18px}.landlord-notice{padding:16px 36px}.landlord-notice strong{font-size:25px}}
@media(prefers-reduced-motion:reduce){.landlord-notice{animation:none}}
.turn-clock{display:inline-grid;place-items:center;min-width:30px;height:30px;border-radius:50%;background:#d6aa50;color:#122c2d;font-weight:800;border:2px solid #f8dfaa;margin-left:5px;font-size:16px}.turn-clock.urgent{background:#e9a080;border-color:#ffe1c9}.wild-card{color:#bb8427!important;border-color:#e5bb65!important}.hand .wild-card{background:linear-gradient(135deg,#fff8d9,#eee0ac)}.wild-card small{color:#bd8436}.replacement .card-rank{writing-mode:vertical-rl;font-size:13px!important;letter-spacing:1px}.table-hud .replacement .card-rank{font-size:8px!important}.hand .replacement .card-rank{font-size:14px!important}.settlement-multiplier{margin-left:auto;font-weight:800;font-size:30px;color:#f2cf8c;white-space:nowrap;text-align:center}.settlement-multiplier small{font-weight:400;display:block;font-size:10px;color:#adc2bf}.multiplier-breakdown{display:flex;flex-wrap:wrap;gap:6px 14px;color:#d8c89d;font-size:11px}.result-scores th:first-child{width:35%}.final-result .result-scores th:first-child{width:10%}.final-result .result-scores th:nth-child(2){width:32%}.result-scores th,.result-scores td{padding:10px}.result-header .brand{letter-spacing:1px}.result-buttons button:disabled{opacity:.75}
@media(max-height:500px){.result-dialog{gap:8px;padding:12px 18px}.multiplier-breakdown{font-size:10px;gap:5px 10px}.result-scores th,.result-scores td{padding:6px 9px}.result-scores table{font-size:13px}.result-footer .result-buttons button{padding:8px 12px;min-width:100px;font-size:12px}.result-header h2{font-size:22px}.result-header p{font-size:12px}.settlement-multiplier{font-size:25px}.turn-clock{height:25px;min-width:25px;font-size:14px}.combo-name{margin-top:1px}.game-shell .table .players{top:8px}.table-hud .card.joker .card-rank{font-size:5px}.table-hud .card.joker small{display:none}}
@media(max-height:360px){.result-dialog{gap:6px;padding:9px 14px}.result-scores th,.result-scores td{padding:4px 8px}.result-header h2{font-size:20px}.result-footer{gap:6px}.result-header .brand{font-size:9px}}
/* Match the apparent size of the wild star to the suit marks in each card context. */
.wild-card small{display:block;transform:scale(1.25);transform-origin:center;line-height:1}.hand .wild-card small{font-size:16px;line-height:16px}.replay-hand .wild-card small{font-size:12px}.table-hud .wild-card small{font-size:9px}
.avatar{width:42px;height:42px;object-fit:cover;border-radius:50%;border:1px solid #e0c58b70}.profile-entry{display:flex;align-items:center;gap:7px;max-width:165px}.profile-entry .avatar{width:27px;height:27px}.profile-entry span{max-width:95px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.join-primary{flex:2;display:flex;align-items:center;justify-content:space-between;gap:24px}.join-primary h3{font-size:26px!important;margin:14px 0 7px}.join-controls{display:flex;align-items:flex-end;gap:12px;min-width:45%}.join-controls .field{flex:1}.join-controls input{font-size:23px;letter-spacing:5px}.join-controls button{white-space:nowrap;min-height:47px}.create-secondary{display:flex;align-items:center;justify-content:space-between;gap:18px;flex:0 0 auto}.create-secondary h3{margin:0 0 5px}.create-secondary select{width:110px}.solo-profile{display:flex;align-items:center;gap:12px}.remember-login{display:flex;align-items:center;gap:8px;font-size:13px}.remember-login input{width:17px!important;height:17px!important;min-height:0!important;margin:0!important;accent-color:#e7bc6b}.registration-avatar{display:flex;align-items:center;gap:10px}.registration-avatar .avatar{width:40px;height:40px}.user-profile{flex:1;display:grid;grid-template-columns:1fr 1.3fr;align-items:center;gap:28px}.profile-art{text-align:center}.avatar-options{display:flex;justify-content:center;gap:12px;margin-bottom:12px}.screen-page .avatar-choice{padding:4px;min-height:0;border:2px solid transparent;background:transparent;border-radius:50%}.avatar-choice .avatar{width:68px;height:68px;border:0;display:block}.avatar-choice.chosen{border-color:#ebc777;background:#e7bc6b20}.profile-fields{display:flex;flex-direction:column;gap:14px}.profile-fields .row{flex-wrap:nowrap}.player .avatar{width:28px;height:28px;vertical-align:middle;margin-right:6px}.self-player .avatar{width:24px;height:24px;vertical-align:middle;margin-right:6px}.game-bar .sound-button{display:inline-flex!important}@media(max-height:500px){.join-primary h3{font-size:22px!important;margin:10px 0 5px}.join-primary p{margin:0}.join-controls input{font-size:20px}.join-controls button{min-height:42px}.create-secondary{padding:10px 16px!important}.create-secondary h3{font-size:16px!important}.create-secondary select{min-height:32px}.user-profile{gap:18px}.avatar-choice .avatar{width:60px;height:60px}.profile-fields{gap:10px}.screen-page .topbar .profile-entry{padding:4px 9px}.registration-avatar .avatar{width:32px;height:32px}.auth-card{gap:10px}}@media(max-height:360px){.join-primary h3{font-size:20px!important}.join-primary .tag{display:none}.create-secondary .muted{font-size:10px}.avatar-choice .avatar{width:46px;height:46px}.profile-fields{gap:8px}.registration-avatar .avatar{width:28px;height:28px}.registration-avatar .muted{font-size:10px}.user-profile .profile-fields .field{gap:3px}}@media(orientation:portrait){.join-primary{flex-direction:column;justify-content:center;gap:20px;align-items:stretch}.join-controls{min-width:0}.create-secondary{flex-wrap:wrap}.create-secondary>div{width:100%}.user-profile{grid-template-columns:1fr;gap:18px}.profile-entry span{display:none}.profile-entry{max-width:45px}}
/* Keep identical icon boxes; compensate gently for the star glyph rather than enlarging its row. */
.hand .card small{width:18px;height:18px;line-height:18px;text-align:center}.hand .wild-card small{font-size:16px;line-height:18px;transform:scale(1.05)}.mini .wild-card small{transform:scale(1.1)}.replay-hand .wild-card small{transform:scale(1.05)}
@media(max-height:430px){.replay-hand .wild-card small{font-size:9px}}
/* Portrait header: all controls use one height; the avatar is centered without text padding. */
@media(orientation:portrait){
 .screen-page .topbar{min-height:40px;align-items:center}
 .screen-page .topbar>.row{align-items:center}
 .screen-page .topbar button{height:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center}
 .screen-page .topbar .profile-entry{flex:0 0 40px;width:40px;min-width:40px;max-width:40px;height:40px;min-height:40px;padding:5px;gap:0;border-radius:12px}
 .screen-page .topbar .profile-entry .avatar{display:block;flex:0 0 28px;width:28px;height:28px;margin:0}
 .screen-page .topbar .profile-entry span{display:none}
}

/* Animate the actual hand cards, then retain those same nodes for normal play. */
.live-game .hand-dock.hand-entering{overflow:visible}
.hand-entering .hand .card{opacity:0;transition:none;will-change:transform,opacity;pointer-events:none}
.hand-entering .hand{overflow:visible}

.hand-entering .hand .card.deal-stable{opacity:1}

.diamond-entry{white-space:nowrap;min-height:40px;padding:8px 12px!important;letter-spacing:0}.brand-wallet{gap:12px}.diamond-total{font-size:28px;color:#f2cf8c;margin:8px 0}.info-dialog{width:min(520px,calc(100vw - 24px));max-height:calc(var(--app-height,100dvh) - 24px);overflow:auto;padding:22px}.info-dialog h2{margin:0;font-size:22px}.info-dialog p{font-size:14px;margin:10px 0}.info-dialog input{margin:4px 0 10px;padding:9px}.info-dialog .field{display:block;font-size:13px}.info-dialog button{padding:9px 16px}.help-button{border-radius:50%;width:32px;height:32px;min-height:32px;padding:0!important}.wild-indicator.mini{flex-direction:row;gap:3px;padding:0 3px}.table-hud .wild-indicator .card{opacity:1}.wallet-message{color:#f2cf8c!important;min-height:20px}.info-overlay{z-index:100}
@media(max-width:480px){.brand-wallet{gap:6px}.brand-wallet .brand{font-size:10px;letter-spacing:1px}.diamond-entry{padding:6px 8px!important;font-size:13px}}
.info-dialog #diamond-transfer-form{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}.info-dialog #diamond-transfer-form button,.info-dialog #diamond-transfer-form .wallet-message{grid-column:1/-1}.info-dialog .wallet-message:empty{display:none}@media(max-height:500px){.info-dialog{padding:14px 18px}.info-dialog h2{font-size:20px}.info-dialog .diamond-total{font-size:24px;margin:2px 0}.info-dialog p{margin:6px 0;font-size:12px;line-height:1.55}.info-dialog #diamond-transfer-form{gap:3px 12px}.info-dialog input{padding:7px;margin:3px 0 4px}.info-dialog .field{font-size:12px}}
/* Readable round feedback and visible turn ownership. */
.result-dialog .multiplier-breakdown{font-size:16px;line-height:1.45;gap:6px 16px;color:#f3dfb5;font-weight:600}.result-dialog .settlement-multiplier small{font-size:14px}.result-dialog .result-scores small{font-size:12px}.result-dialog .next-countdown{white-space:nowrap;font-variant-numeric:tabular-nums}
.live-game .player.active,.live-game .self-player.active{outline:4px solid #ffcf68;outline-offset:2px;box-shadow:0 0 0 7px #e7bc6b22,0 0 18px #efbc5560}.live-game .self-player.active{border-radius:8px;outline-offset:5px;background:#d4ad4920}
.game-shell .combo-name{font-size:34px;line-height:1.12;min-height:38px;font-weight:850;letter-spacing:2px;color:#ffe0a0;text-shadow:0 2px 3px #061915,0 0 14px #efb84555}.game-shell .combo-name:empty{min-height:0}
.hand-dock .action-clock{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:42px;min-width:70px;border-radius:12px;margin:0;padding:4px 7px;font-size:20px;flex:0 0 auto}.action-clock .alarm-icon{display:inline-block;font-size:25px;transform-origin:50% 75%}.action-clock .clock-value{min-width:24px;text-align:center;font-variant-numeric:tabular-nums}.action-clock.urgent{background:#f3a57c;color:#542015;box-shadow:0 0 12px #ff805250}.action-clock.urgent .alarm-icon{animation:alarm-ring .38s ease-in-out infinite}
@keyframes alarm-ring{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-16deg)}40%,80%{transform:rotate(16deg)}}
@media(orientation:landscape) and (max-height:500px){.result-dialog .multiplier-breakdown{font-size:15px;gap:4px 14px}.result-dialog .settlement-multiplier small{font-size:13px}.game-shell .combo-name{font-size:28px;min-height:31px;letter-spacing:1px}.game-shell .combo-name:empty{min-height:0}.hand-dock .actions{gap:8px}.hand-dock .actions button{min-width:72px;padding:10px 12px}.hand-dock .action-clock{height:38px;min-width:62px;font-size:18px}.action-clock .alarm-icon{font-size:23px}.result-footer .next-round{min-width:150px!important}}
@media(max-height:360px){.result-dialog .multiplier-breakdown{font-size:14px}.result-dialog .result-scores small{font-size:11px}.game-shell .combo-name{font-size:25px;min-height:28px}}
@media(prefers-reduced-motion:reduce){.action-clock.urgent .alarm-icon{animation:none}}
/* Countdown is a non-interactive indicator, visually separate from buttons. */
.hand-dock .turn-clock.action-clock{border:0;background:transparent;box-shadow:none;border-radius:0;color:#f7d595;cursor:default;pointer-events:none}.hand-dock .turn-clock.action-clock.urgent{border:0;background:transparent;box-shadow:none;color:#ffaf84}
/* Stable WebView viewport and a bounded, seat-oriented game board. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.game-shell.live-game{height:var(--app-height,100dvh);max-width:none;width:100%;padding:6px 12px;gap:5px;--dock-height:clamp(145px,41vh,210px);font-size:14px}
.game-shell.live-game>.topbar{display:none!important}
.game-shell.live-game>.compact-game-bar{display:flex!important;align-items:center;flex-wrap:nowrap;height:26px;min-height:26px;max-height:26px;gap:12px;margin:0;overflow:hidden}
.compact-game-bar .round{font-size:13px;line-height:1.15;white-space:nowrap}.compact-game-bar .table-label{font-size:11px;color:#b9c8c1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-shell .compact-game-bar button{margin-left:auto;min-width:26px;height:25px;min-height:25px;padding:2px 8px!important;font-size:12px;line-height:1}.game-shell .compact-game-bar .sound-button{font-size:16px}
.game-shell .seat-table{position:relative;display:block;min-height:0;padding:0;overflow:hidden;border-radius:20px}.live-game>.seat-table{margin-bottom:var(--dock-height)}
.seat-table .table-hud{top:3px;padding:2px 7px;gap:5px;border-radius:9px;font-size:10px;max-height:40px;z-index:3}.seat-table .table-hud b{font-size:14px;line-height:1.1}.seat-table .table-hud .mini .card{width:21px;height:29px;min-width:21px;font-size:11px;padding:1px;margin:0 1px;border-radius:3px;line-height:1.05;flex-shrink:0}.seat-table .table-hud .card small{font-size:10px;line-height:1}.seat-table .wild-indicator{gap:2px;padding:0 2px}.seat-table .wild-indicator>small{font-size:9px}.seat-table .bottom-hidden{font-size:12px;padding:3px 0}
.seat-table .table-player{position:absolute;top:8px;width:clamp(115px,18vw,172px);min-width:0;padding:6px 8px!important;font-size:11px;z-index:2;line-height:1.2}.seat-table .player-left{left:8px}.seat-table .player-right{right:8px}.seat-table .player strong{display:flex;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;gap:4px}.seat-table .player .avatar{width:23px;height:23px;margin:0;flex-shrink:0}.seat-table .player p{font-size:11px;margin:3px 0!important;line-height:1.2}.seat-table .player .score{font-size:11px}.seat-table .table-status{position:absolute;top:43px;left:25%;right:25%;text-align:center;font-size:11px;line-height:1.2;color:#b9cec6;z-index:2;max-height:28px;overflow:hidden}.seat-table .table-status .turn-clock{height:21px;min-width:21px;font-size:12px;border-width:1px;vertical-align:middle}
.seat-table .played-seat{position:absolute;width:30%;max-width:310px;z-index:1;text-align:center;display:flex;align-items:center;flex-direction:column;gap:3px}.seat-table .seat-left{left:17%;top:70px}.seat-table .seat-right{right:17%;top:70px}.seat-table .seat-self{left:50%;bottom:5px;transform:translateX(-50%)}
.seat-table .combo-name{font-size:25px;line-height:1.05;min-height:0;letter-spacing:1px;margin:0}.seat-table .combo-name:empty{display:none}.seat-table .play-owner{font-size:10px;color:#afc7bd;line-height:1.1;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.seat-table .stacked-cards{display:flex;flex-wrap:nowrap;justify-content:center;align-items:flex-start;min-height:0;margin:0;padding:0;max-width:100%;height:49px}.seat-table .stacked-cards .card{position:relative;display:block;width:36px;min-width:36px;height:49px;flex:0 0 36px;margin:0 0 0 calc(var(--play-step,16px) - 36px);padding:0;border-radius:5px;font-size:17px;box-shadow:-2px 2px 3px #0004;overflow:hidden;text-align:left}.seat-table .stacked-cards .card:first-child{margin-left:0}.stacked-cards .card-corner{position:absolute;left:2px;top:2px;display:flex;align-items:center;flex-direction:column;line-height:1.05;font-weight:750}.seat-table .stacked-cards .card small{font-size:13px}.seat-table .stacked-cards .card-watermark{display:none}.seat-table .stacked-cards .card.joker .card-rank{writing-mode:vertical-rl;font-size:6px;letter-spacing:0}.seat-table .stacked-cards .replacement .card-rank{font-size:9px!important}
.live-game .hand-dock{width:100%;max-width:none}.game-shell .hand-dock .self-player{top:10px;left:18px;right:auto;max-width:29%;font-size:12px;line-height:1.2;gap:3px 8px;flex-wrap:wrap}.game-shell .hand-dock .self-player strong{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.game-shell .hand-dock .self-player .avatar{width:22px;height:22px}.game-shell .hand-dock .actions{top:3px;left:32%;right:12px;gap:8px;min-height:40px;flex-wrap:nowrap}.game-shell .hand-dock .actions button{min-width:64px;padding:9px 12px;font-size:14px}.game-shell .hand{top:65px}.game-shell .hand-dock .actions>.muted{font-size:12px}.game-shell .hand-dock .action-clock{min-width:58px;height:38px;font-size:18px}
/* Replay keeps the game table and reveals both side hands. */
.game-shell.replay-game{--dock-height:120px}.replay-game .replay-self-dock .hand{top:32px}.replay-game .replay-self-dock .self-player{top:3px;max-width:70%;left:18px}.replay-side-hand{position:absolute;top:83px;bottom:7px;width:74px;z-index:2;--side-step:14px}.replay-side-hand.side-left{left:10px}.replay-side-hand.side-right{right:10px}.side-hand-card{position:absolute;left:calc(var(--col)*33px);top:calc(var(--row)*var(--side-step));width:38px;height:50px}.replay-side-hand .card{position:relative;width:38px;height:50px;min-width:38px;border-radius:4px;padding:2px 1px;font-size:15px;margin:0;line-height:1}.replay-side-hand .card-corner{display:flex;flex-direction:column;align-items:center;position:absolute;top:2px;left:2px;font-weight:700}.replay-side-hand .card small{font-size:11px}.replay-side-hand .card.joker .card-rank{writing-mode:vertical-rl;font-size:6px;letter-spacing:0}.replay-side-hand .replacement .card-rank{font-size:9px!important}.replay-table .seat-left{left:19%}.replay-table .seat-right{right:19%}
.replay-game .replay-overlay-controls{position:fixed;left:50%;bottom:5px;transform:translateX(-50%);width:min(96%,900px);z-index:30;display:flex;flex-wrap:nowrap;align-items:center;gap:7px;padding:7px 10px;background:#06212ab8;backdrop-filter:blur(6px);border:1px solid #c4d7cb33;border-radius:12px}.replay-overlay-controls button{font-size:12px;min-width:36px;padding:7px 9px;white-space:nowrap}.replay-overlay-controls input{flex:1;width:40px;min-width:40px;margin:0;padding:0;height:24px;accent-color:#e7bc6b}.replay-overlay-controls select{width:65px;min-width:65px;padding:5px;margin:0;font-size:12px}.replay-progress-label{font-size:11px;color:#b9c7be;white-space:nowrap}
@media(max-height:360px){.game-shell.live-game{padding:4px 8px;gap:3px;--dock-height:135px}.game-shell.replay-game{--dock-height:100px}.game-shell .hand{top:58px}.game-shell .seat-table .played-seat{top:66px;gap:2px}.game-shell .seat-table .seat-self{top:auto;bottom:3px}.seat-table .combo-name{font-size:21px}.seat-table .stacked-cards{height:43px}.seat-table .stacked-cards .card{height:43px}.seat-table .play-owner{font-size:9px}.replay-side-hand{top:78px}.game-shell .compact-game-bar{height:23px!important;min-height:23px!important;max-height:23px!important}.replay-game .replay-self-dock .hand{top:28px}}
@media(orientation:portrait){.game-shell .hand-dock .self-player{max-width:80%;top:4px}.game-shell .hand-dock .actions{left:5px;top:38px;right:5px}.game-shell .hand{top:100px}.seat-table .table-player{width:110px}.seat-table .table-hud{top:80px}.seat-table .table-status{top:120px;left:8%;right:8%}.seat-table .seat-left,.seat-table .seat-right{top:155px}.seat-table .seat-left{left:4%}.seat-table .seat-right{right:4%}.replay-game .replay-side-hand{top:150px}.replay-game .replay-self-dock .hand{top:32px}}
.seat-table .stacked-cards .card-corner{font-size:var(--play-rank-size,17px)}
.game-shell.replay-game{--dock-height:140px}.replay-game .replay-side-hand{width:98px}.replay-game .side-hand-card{left:calc(var(--col)*31px);width:34px;height:34px}.replay-game .replay-side-hand .card{width:34px;min-width:34px;height:34px;font-size:12px}.replay-game .replay-side-hand .card-corner{flex-direction:row;gap:2px;align-items:center;top:1px;left:2px;font-size:12px}.replay-game .replay-side-hand .card small{font-size:10px}.replay-game .replay-side-hand .card.joker .card-corner{align-items:flex-start}.replay-game .replay-side-hand .card.joker .card-rank{font-size:5px}.replay-game .replay-side-hand .replacement .card-rank{font-size:7px!important}
.replay-game .replay-overlay-controls{height:38px;padding:4px 8px;gap:6px}.replay-overlay-controls button{height:28px;min-height:28px;padding:4px 8px;font-size:12px}.replay-overlay-controls select{height:28px;padding:3px;font-size:12px}
@media(max-height:340px){.game-shell.replay-game{--dock-height:120px}.replay-game .replay-side-hand .card-corner{font-size:10px}.replay-game .replay-side-hand .card small{font-size:9px}}
/* Opponent replay hands fan horizontally, using at most two rows. */
.replay-game .replay-side-hand{width:25%;max-width:260px;top:82px;bottom:6px;display:flex;flex-direction:column;align-items:flex-start;gap:4px}.replay-game .replay-side-hand.side-left{left:9px}.replay-game .replay-side-hand.side-right{right:9px}.seat-table .replay-hand-row.stacked-cards{height:44px;width:100%;flex:0 0 44px;justify-content:center}.seat-table .replay-hand-row.stacked-cards .card{height:44px;width:36px;min-width:36px;font-size:14px}.replay-game .replay-hand-row .card-corner{flex-direction:column;top:2px;left:2px;font-size:min(14px,var(--play-rank-size,14px));gap:0;align-items:center;line-height:1.05}.replay-game .replay-hand-row .card small{font-size:12px}.replay-game .replay-hand-row .card.joker .card-rank{writing-mode:vertical-rl;font-size:6px}.replay-game .replay-hand-row .replacement .card-rank{font-size:9px!important}.replay-table .seat-left{left:28%;width:25%}.replay-table .seat-right{right:28%;width:25%}
@media(max-height:340px){.replay-game .replay-side-hand{top:76px;gap:3px}.seat-table .replay-hand-row.stacked-cards{height:39px;flex-basis:39px}.seat-table .replay-hand-row.stacked-cards .card{height:39px}.replay-game .replay-hand-row .card-corner{font-size:min(13px,var(--play-rank-size,13px))}.replay-game .replay-hand-row .card small{font-size:11px}}
/* Keep the top of every hand comfortably above the Android bottom edge. */
.game-shell.live-game{--dock-height:clamp(160px,45vh,225px)}.game-shell .hand{top:58px}.game-shell .hand .card.joker .card-rank{font-size:10px!important;letter-spacing:0;line-height:1.02}.game-shell .hand .card.joker .card-corner{top:6px;gap:1px}.game-shell .hand .card.joker small{font-size:12px}.hand .card{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.hand{touch-action:none}
@media(max-height:360px){.game-shell.live-game{--dock-height:155px}.game-shell .hand{top:51px}}
.game-shell.replay-game{--dock-height:140px}.game-shell.replay-game .hand{top:32px}@media(max-height:340px){.game-shell.replay-game{--dock-height:120px}.game-shell.replay-game .hand{top:28px}}
/* Settlement remains centered while revealing all three final hands. */
.settlement-overlay{background:#03191fe8;backdrop-filter:none;padding:8px;align-items:center}.settlement-overlay .result-dialog{width:56vw;max-width:650px;max-height:calc(var(--app-height,100dvh) - 84px);margin-bottom:64px;padding:12px 14px;gap:8px}.settlement-overlay.self-empty .result-dialog{max-height:calc(var(--app-height,100dvh) - 40px);margin-bottom:24px}.settlement-overlay .settlement-opponent{position:absolute;top:50%;transform:translateY(-50%);width:20%;max-width:270px;overflow:visible;border:0;border-radius:0;background:transparent}.settlement-opponent.settlement-left{left:8px}.settlement-opponent.settlement-right{right:8px}.settlement-opponent header{text-align:center;color:#ecd09a;margin-bottom:10px;overflow-wrap:anywhere}.settlement-opponent header strong{font-size:13px}.settlement-opponent header small{display:block;font-size:11px;color:#afc7be;margin-top:4px}.settlement-overlay .replay-side-hand{position:static;display:flex;flex-direction:column;width:100%;gap:5px;max-width:none}.settlement-overlay .replay-hand-row{width:100%;flex:0 0 44px;height:44px}.settlement-overlay .stacked-cards .card{height:44px}.settlement-overlay .stacked-cards .card-corner{font-size:min(14px,var(--play-rank-size,14px))}.settlement-overlay .stacked-cards .card.joker .card-rank{font-size:6px!important;line-height:1.05;letter-spacing:0}.settlement-overlay .stacked-cards .card small{font-size:12px}
.settlement-overlay .settlement-self{position:absolute;left:22%;right:22%;bottom:7px;overflow:visible;display:flex;flex-direction:column;align-items:center;gap:3px}.settlement-self>small{font-size:11px;color:#bcd0c6}.settlement-self .stacked-cards{width:100%;height:44px}.settlement-overlay.self-empty .settlement-self .stacked-cards{display:none}
@media(orientation:landscape) and (max-height:500px){.settlement-overlay .result-dialog{padding:8px 10px;gap:5px;border-radius:14px}.settlement-overlay .result-header{gap:8px}.settlement-overlay .result-emblem{width:34px;height:34px;font-size:23px}.settlement-overlay .result-header h2{font-size:21px;margin:1px 0}.settlement-overlay .result-header p{font-size:11px}.settlement-overlay .result-header .brand{font-size:10px}.settlement-overlay .settlement-multiplier{font-size:24px}.settlement-overlay .settlement-multiplier small{font-size:12px}.settlement-overlay .multiplier-breakdown{font-size:14px;line-height:1.2;gap:3px 10px}.settlement-overlay .result-scores th,.settlement-overlay .result-scores td{padding:4px 6px;font-size:12px}.settlement-overlay .result-scores small{font-size:10px}.settlement-overlay .result-footer{gap:4px}.settlement-overlay .result-footer .muted{font-size:10px}.settlement-overlay .result-buttons{gap:6px}.settlement-overlay .result-footer button{font-size:11px;padding:6px 8px;min-width:78px}.settlement-overlay .result-footer .next-round{min-width:125px!important}}
@media(orientation:portrait){.settlement-overlay .result-dialog{width:96%;margin-bottom:190px;max-height:calc(100dvh - 240px)}.settlement-overlay .settlement-opponent{top:auto;bottom:75px;transform:none;width:46%}.settlement-overlay .settlement-self{left:4%;right:4%}.settlement-overlay.self-empty .result-dialog{margin-bottom:155px;max-height:calc(100dvh - 195px)}}
/* Cropped card bottoms must never scroll the fixed hand dock when focused. */
@supports(overflow:clip){.live-game .hand-dock{overflow:clip}.live-game .hand-dock.hand-entering{overflow:visible}}
@media(orientation:landscape) and (max-height:500px){.settlement-overlay .result-dialog{gap:4px}.settlement-overlay .result-scores th,.settlement-overlay .result-scores td{padding:3px 6px}}
@media(orientation:landscape) and (max-height:340px){.settlement-overlay .result-header .brand{font-size:9px}.settlement-overlay .result-header h2{font-size:18px}.settlement-overlay .result-header p{font-size:10px}.settlement-overlay .result-emblem{width:28px;height:28px;font-size:19px}.settlement-overlay .result-scores .result-name{display:inline-block;max-width:65%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.settlement-overlay .result-scores small{display:inline;margin:0 0 0 3px;font-size:9px}.settlement-overlay .result-scores td{white-space:nowrap;overflow:hidden}.settlement-overlay .multiplier-breakdown{font-size:13px}.settlement-overlay .result-footer button{padding:5px 7px}.settlement-overlay .result-dialog{gap:4px}}
/* Larger faces centered in the visible strip, matching the reference's card proportions. */
.game-shell.live-game{--dock-height:clamp(126px,35vh,178px)}.game-shell .hand{top:50px}.game-shell .hand .card-corner{left:0;top:5px;width:var(--exposed-width,var(--step));gap:1px;line-height:1;font-weight:850;align-items:center;text-align:center}.game-shell .hand .card small{font-size:calc(var(--rank-size)*.82);line-height:1;font-weight:800}.hand .rank-ten{font-size:1em;display:inline-block;transform:scaleX(.72);transform-origin:center}.game-shell .hand .card.joker .card-corner{left:0;top:4px;width:var(--exposed-width,var(--step));gap:0}.game-shell .hand .card.joker .card-rank{font-size:9px!important;line-height:1;letter-spacing:0}.game-shell .hand .card.joker small{font-size:11px}.hand .card.red{color:#b42e28}.hand .wild-card{color:#9b6810!important}
.game-shell .seat-table .stacked-cards .card-corner{left:0;top:2px;width:min(36px,var(--play-exposed-width,var(--play-step,25px)));font-size:var(--play-rank-size,20px);line-height:1;font-weight:850;text-align:center;align-items:center;gap:1px}.game-shell .seat-table .stacked-cards .card small{font-size:.82em;line-height:1;font-weight:800}.stacked-cards .rank-ten{font-size:1em;display:inline-block;transform:scaleX(.72);transform-origin:center}.stacked-cards .card.red{color:#b42e28}
.seat-table .played-seat{width:30%;max-width:none;gap:3px}.seat-table .seat-left{left:1.5%;top:72px}.seat-table .seat-right{right:1.5%;top:72px}.seat-table .seat-self{width:32%;bottom:4px}.seat-table .combo-name{font-size:23px;line-height:1.05;letter-spacing:0}.play-stack-group{display:flex;flex-direction:column;align-items:center;width:100%;gap:3px}.play-stack-group .stacked-cards{width:100%;height:43px}.seat-table .play-stack-group .card{height:43px}.game-shell .seat-table .played-seat .card-corner{font-size:min(20px,var(--play-rank-size,20px))}.seat-table .play-stack-group.two-rows{gap:2px}.seat-table .play-stack-group.two-rows .stacked-cards,.seat-table .play-stack-group.two-rows .card{height:34px}.game-shell .seat-table .play-stack-group.two-rows .card-corner{font-size:min(16px,var(--play-rank-size,16px));top:1px}.pass-seat .pass-label{font-size:24px;color:#f2da9d;text-shadow:0 2px 4px #0008;letter-spacing:2px}.seat-table .play-owner{font-size:10px}
.game-shell.replay-game{--dock-height:126px}.replay-game .replay-self-dock .hand{top:22px}.replay-table .seat-left{left:27%;top:73px;width:22%}.replay-table .seat-right{right:27%;top:73px;width:22%}.replay-table .seat-self{width:28%;bottom:3px}.replay-table .combo-name{font-size:20px}.replay-table .replay-side-hand{top:82px}.replay-game .replay-hand-row.stacked-cards,.replay-game .replay-hand-row.stacked-cards .card{height:46px;flex-basis:46px}.game-shell .replay-game .replay-hand-row .card small{font-size:.82em}
@media(max-height:340px){.game-shell.live-game{--dock-height:110px}.game-shell .hand{top:45px}.game-shell .hand .card-corner{font-size:min(30px,var(--rank-size));top:5px}.game-shell .hand .card small{font-size:min(24px,calc(var(--rank-size)*.82))}.game-shell .hand .card.joker .card-corner{top:4px}.seat-table .seat-left,.seat-table .seat-right{top:64px}.seat-table .combo-name{font-size:20px}.seat-table .played-seat{gap:2px}.seat-table .play-owner{font-size:9px}.game-shell.replay-game{--dock-height:110px}.replay-game .replay-self-dock .hand{top:22px}.replay-table .seat-left,.replay-table .seat-right{top:64px}.replay-table .replay-side-hand{top:78px}}
/* Settlement also centers ranks/suits inside the overlap's exposed strip. */
.settlement-overlay .stacked-cards .card-corner{width:min(36px,var(--play-exposed-width,var(--play-step,22px)));left:0;align-items:center;text-align:center;line-height:1;font-size:var(--play-rank-size,18px);gap:1px}.settlement-overlay .stacked-cards .card small{font-size:.82em}.settlement-overlay .stacked-cards .card.joker .card-rank{font-size:6px!important}
.game-shell.replay-game{--dock-height:146px}.replay-game .replay-self-dock .hand{top:22px}.replay-table .seat-left{left:25%;width:16%;top:73px}.replay-table .seat-right{right:25%;width:16%;top:73px}.replay-table .seat-self{width:16%;bottom:3px}.replay-table .combo-name{font-size:18px}.replay-table .pass-label{font-size:20px;letter-spacing:1px}
@media(max-height:340px){.game-shell.replay-game{--dock-height:126px}.game-shell.replay-game .hand .card-corner{font-size:min(26px,var(--rank-size))}.game-shell.replay-game .hand .card small{font-size:min(21px,calc(var(--rank-size)*.82))}.replay-table .seat-left,.replay-table .seat-right{top:64px}.replay-table .replay-side-hand{top:69px}.replay-game .replay-hand-row.stacked-cards,.replay-game .replay-hand-row.stacked-cards .card{height:38px;flex-basis:38px}.replay-table .play-stack-group.two-rows .stacked-cards,.replay-table .play-stack-group.two-rows .card{height:29px}.game-shell .replay-table .play-stack-group.two-rows .card-corner{font-size:min(14px,var(--play-rank-size,14px))}.replay-table .combo-name{font-size:17px}}
.game-shell .hand .card.joker .card-rank{font-size:12px!important;height:48px;flex:0 0 auto;transform:scale(.75);transform-origin:center top}.game-shell .hand .card.joker small{font-size:11px;line-height:12px;height:12px;display:block}.seat-table .seat-left.plain-play,.seat-table .seat-right.plain-play{top:80px}.seat-table .seat-left.pass-seat,.seat-table .seat-right.pass-seat{top:88px}.replay-table .seat-left.plain-play,.replay-table .seat-right.plain-play{top:80px}.replay-table .seat-left.pass-seat,.replay-table .seat-right.pass-seat{top:88px}
@media(max-height:340px){.game-shell.live-game{--dock-height:118px}.game-shell.replay-game{--dock-height:126px}.seat-table .seat-left.plain-play,.seat-table .seat-right.plain-play{top:77px}.seat-table .seat-left.pass-seat,.seat-table .seat-right.pass-seat{top:84px}}
/* Keep vertical JOKER complete even when WebView enforces a minimum font size. */
.game-shell .seat-table .stacked-cards .card.joker .card-rank{font-size:12px!important;height:60px;transform:scale(.5);transform-origin:center top;margin-bottom:-30px;line-height:1;letter-spacing:0;flex:0 0 auto}.game-shell .seat-table .stacked-cards .card.joker .card-corner{gap:0}.game-shell .seat-table .stacked-cards .card.joker small{font-size:8px!important;line-height:8px;height:8px}.game-shell .seat-table .two-rows .card.joker .card-rank{transform:scale(.4);margin-bottom:-36px}
/* Card width must agree with the overlap calculation, including replay rows. */
.game-shell .seat-table .stacked-cards .card{flex:0 0 36px;width:36px;min-width:36px;max-width:36px}
.settlement-overlay .result-scores .has-round-bonus small{color:#f0d49b}
@media(orientation:landscape) and (max-height:340px){.settlement-overlay .result-scores .has-round-bonus .result-name{display:block;max-width:100%;white-space:nowrap}.settlement-overlay .result-scores .has-round-bonus small{display:block;margin:0;font-size:9px;white-space:normal;line-height:1.1}}
/* Reserve the selected-card rise below the action row; card faces stay at their current height. */
@media(orientation:landscape){.game-shell.live-game:not(.replay-game){--action-lift:28px;--dock-height:calc(clamp(126px,35vh,178px) + var(--action-lift))}.game-shell.live-game:not(.replay-game) .hand{top:calc(50px + var(--action-lift))}.game-shell.live-game:not(.replay-game) .hand-dock .actions{z-index:20}.game-shell.live-game:not(.replay-game) .hand-dock .actions button{white-space:nowrap}}
@media(orientation:landscape) and (max-height:340px){.game-shell.live-game:not(.replay-game){--dock-height:calc(118px + var(--action-lift))}.game-shell.live-game:not(.replay-game) .hand{top:calc(45px + var(--action-lift))}}

.official-download{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 12px;border:1px solid #e5bd7355;border-radius:10px;white-space:nowrap;text-decoration:none;font-size:13px;color:#e9cd94;background:#183a3a}.official-download:hover{border-color:#e5bd73}@media(max-width:600px){.page-home .topbar{flex-wrap:wrap;row-gap:8px}.page-home .brand-wallet{flex-wrap:wrap}.official-download{font-size:12px;padding:6px 9px;min-height:32px}}
