/* Game-only sizing: keep browser zoom available, prevent landscape text inflation. */
.h-space{-webkit-text-size-adjust:100%;text-size-adjust:100%;font-family:Arial,system-ui,sans-serif}
@media(max-width:700px){
 .h-space{grid-template-columns:50px minmax(0,1fr);padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 .h-rail{position:sticky;top:0;align-self:start;min-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:100%;padding:14px 5px;gap:24px}
 .h-rail-mark,.h-rail-links button{width:38px;height:40px;border-radius:10px;font-size:25px}.h-rail-links{gap:12px}
 .h-content{padding:16px 12px;min-width:0}.h-topbar{padding-bottom:14px;gap:6px}.h-site-name{font-size:18px}.h-mode-label{font-size:9px;letter-spacing:.08em}
 .h-game-hub{padding:18px 0;min-height:0;background:none}.h-library-heading{display:block;margin-bottom:20px;padding-bottom:18px}.h-library-heading .eyebrow{font-size:9px;letter-spacing:.09em}.h-library-heading h2{font-size:25px;line-height:1.2;margin:12px 0}.h-library-heading p{font-size:12px;line-height:1.6}.h-library-count{display:inline-block;font-size:10px;padding:5px 10px;margin-top:12px}
 .h-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:none}.h-library-card{min-width:0;max-width:none;width:100%;border-radius:10px}.h-cover-art{container-type:inline-size}.h-cover-brand{font-size:6cqw;letter-spacing:.18em;margin-top:12cqw}.h-cover-title{font-size:32cqw;line-height:.95;margin-top:10cqw}.h-cover-title>span{font-size:11cqw;line-height:1.6;letter-spacing:.15em;padding-left:.15em}.h-cover-tiles{bottom:19%;gap:2cqw}.h-cover-tiles i{width:18cqw;height:25cqw;font-size:13cqw;border-right-width:2px;border-bottom-width:3px}.h-cover-tiles small{font-size:5cqw;margin-top:3cqw}.h-cover-bottom{bottom:8%;font-size:4cqw;letter-spacing:.12em}
 .h-uno-cover .h-cover-title{font-size:31cqw;margin-top:15cqw;letter-spacing:-1cqw}.h-uno-cover-cards{bottom:18%}.h-uno-cover-cards img{width:22cqw;height:33cqw}.h-uno-cover .h-cover-bottom{font-size:4cqw;letter-spacing:.08em}
 .h-card-details{gap:6px;padding:12px 10px}.h-card-category{font-size:8px;letter-spacing:.04em}.h-card-details strong{font-size:18px}.h-card-description{font-size:11px;line-height:1.5}.h-card-action{font-size:11px;padding-top:8px;min-height:32px;align-items:center}.h-library-footnote{margin-top:20px;font-size:11px!important}.h-return-note{font-size:12px;margin-top:12px;line-height:1.6}
 .h-room-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:18px}.h-room-dialog input{font-size:16px}.h-room-choices button{min-height:90px}.h-room-code-row button{min-height:44px}
}
/* Reserve a toolbar row before placing names and tiles; no letterboxed 16:9 box. */
@media(orientation:landscape) and (max-height:600px), (pointer:coarse) and (orientation:landscape){
 body.h-game-mode #h-game-stage{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));bottom:max(8px,env(safe-area-inset-bottom));width:auto;height:auto;transform:none;animation:none;font-family:Arial,system-ui,sans-serif;touch-action:none}
 body.h-game-mode .h-game-toolbar{top:4px;left:6px;right:6px;height:34px;display:grid;grid-template-columns:minmax(70px,1fr) auto auto auto;gap:6px;align-items:center;text-shadow:none}
 body.h-game-mode .h-game-toolbar>strong{grid-column:1;grid-row:1;justify-self:start;font-size:11px;padding:6px 8px;white-space:nowrap}
 body.h-game-mode #h-room-chip{grid-column:2;grid-row:1;max-width:170px;overflow:hidden;text-overflow:ellipsis;font-size:10px;padding:7px 8px;white-space:nowrap}
 body.h-game-mode #h-game-shrink{grid-column:3;grid-row:1;font-size:11px;min-height:32px;height:32px;padding:5px 9px;white-space:nowrap}
 body.h-game-mode #h-game-sound{grid-column:4;grid-row:1;font-size:10px;height:32px;padding:5px 8px}
 #h-game-screen-status{position:absolute;top:36px;left:6px;max-width:30%;font-size:9px;background:#101c2bc9}#h-game-screen-status:empty{display:none}
 body.h-game-mode .okey-opponent-top .opponent-badge{top:13%;left:39%;width:22%;height:8%;padding:2px 6px;gap:5px}
 body.h-game-mode .opponent-avatar{width:20px;height:20px;font-size:13px;border-radius:4px}.opponent-name{min-width:0}
 body.h-game-mode .opponent-name{font:600 11px/1.2 Arial,system-ui,sans-serif}
 body.h-game-mode .okey-opponent-top .opponent-rack-line{top:23%;height:1%;left:31%;width:38%}
 body.h-game-mode .okey-opponent-left .opponent-badge,body.h-game-mode .okey-opponent-right .opponent-badge{top:32%;height:25%;width:5%;padding:3px 2px;gap:5px}
 body.h-game-mode .okey-opponent-left .opponent-name,body.h-game-mode .okey-opponent-right .opponent-name{max-height:calc(25cqh - 32px);font-size:10px}
 body.h-game-mode .okey-opponent-left .opponent-rack-line,body.h-game-mode .okey-opponent-right .opponent-rack-line{top:27%;height:37%;width:.8%}
 body.h-game-mode .okey-table-grid{top:44%;height:38%;width:74%}
 body.h-game-mode .okey-zone-label{top:26%;font-size:9px;padding:2px 4px}
 body.h-game-mode .table-token-upper-left,body.h-game-mode .table-token-upper-right{top:13%;gap:2px}
 body.h-game-mode .table-token-slot small,body.h-game-mode .rack-discard-slot>small{font:9px/1.2 Arial;max-width:82px;overflow:hidden;text-overflow:ellipsis;padding:2px 3px;white-space:nowrap}
 body.h-game-mode .discard-outline{width:4.5cqw;height:9cqh;border-width:1px}
 body.h-game-mode .table-token-indicator{bottom:38%;left:69.06%}
 body.h-game-mode .okey-stock-pile{bottom:51%;width:4.5cqw;gap:2px}.stock-remaining,.stock-action{font:9px/1.1 Arial}
 body.h-game-mode .stock-tile-back{width:4.5cqw;height:9cqh}.stock-tile-back b{font-size:16px}
 body.h-game-mode .okey-live-turnbar{top:64%;left:15%;right:15%;gap:3px;font-size:10px;flex-wrap:nowrap}
 body.h-game-mode .okey-live-turn-text{font-size:10px;max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 6px}
 body.h-game-mode .okey-live-feedback{font-size:9px;max-width:50%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 4px}
 body.h-game-mode .okey-live-turnbar button{font-size:10px;padding:4px 6px}
 body.h-game-mode #h-game-stage>.okey-rack-player-line{bottom:27.5%;height:8%;left:7%;right:7%;align-items:center;grid-template-columns:5.3cqw minmax(0,1fr) 5.3cqw}
 body.h-game-mode .rack-player-meta{height:100%;padding:2px 5px;gap:4px}.rack-opening-actions{min-width:0}
 body.h-game-mode .rack-opening-actions{gap:10px;flex:1}.rack-player-badge{min-width:0}
 body.h-game-mode .rack-player-badge{padding:2px 5px;max-width:18cqw;gap:4px}.rack-player-badge strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.h-game-mode .rack-player-name{font-size:11px;min-width:0}.rack-player-avatar{flex:none}
 body.h-game-mode .rack-player-avatar{width:19px;height:19px;font-size:13px}
 body.h-game-mode .rack-open-button{min-height:27px;font-size:10px;line-height:1;padding:5px 8px;border-radius:5px}
 body.h-game-mode .rack-hand-count{padding:3px 5px;flex:none}.rack-hand-count strong{line-height:1}
 body.h-game-mode .rack-hand-count strong{font-size:15px}.rack-opening-hint{white-space:nowrap}
 body.h-game-mode .rack-opening-hint{font-size:8px}.rack-opening-hint strong{font-size:inherit}
 body.h-game-mode #h-game-stage>.okey-rack-controls{bottom:2.5%;height:24%;left:7%;right:7%}
 body.h-game-mode .okey-wood-rack{margin:0;padding:4px 10px 5px;border-top-width:3px;gap:2px}
 body.h-game-mode .rack-level{padding-bottom:2px;border-bottom-width:2px;gap:.3cqw}
 body.h-game-mode .rack-tile{font-size:clamp(16px,5.4cqh,28px);max-height:9.4cqh;height:calc(100% - 2px);border-right-width:2px;border-bottom-width:3px;box-shadow:inset 1px 1px 2px #fff,1px 3px 2px #28160dbb}
 body.h-game-mode .rack-tile small{font:6px/1 Arial;margin-top:2px}.rack-tile::after{pointer-events:none}
 body.h-game-mode .rack-end{top:7px;bottom:8px;width:7px;font-size:5px;letter-spacing:1px}.rack-end-left{left:2px}.rack-end-right{right:2px}
 body.h-game-mode .rack-arrange-button{padding:2px;gap:5px;border-width:1px}.rack-arrange-button .rack-button-fan{transform:scale(.65);height:14px}
 body.h-game-mode .rack-button-label{font-size:11px;line-height:1.2}
 body.h-game-mode .okey-series-melds,body.h-game-mode .okey-pair-melds{top:30%;height:29%}
 body.h-game-mode .okey-visible-meld>small{font-size:8px}
}
@media(orientation:landscape) and (max-height:360px){body.h-game-mode .rack-opening-hint{display:none}body.h-game-mode .okey-live-feedback:empty{display:none}body.h-game-mode .h-game-toolbar{height:28px}body.h-game-mode #h-game-shrink,body.h-game-mode #h-game-sound{height:28px;min-height:28px}body.h-game-mode .okey-opponent-top .opponent-badge{top:14%;height:9%}body.h-game-mode .rack-open-button{min-height:23px}}
@media(orientation:landscape) and (max-height:600px), (pointer:coarse) and (orientation:landscape){body.h-game-mode .okey-table-grid{top:42%;height:34%}body.h-game-mode .okey-live-turnbar{top:60%}body.h-game-mode #h-game-stage>.okey-rack-player-line{height:7%;grid-template-rows:minmax(0,1fr)}body.h-game-mode .rack-player-meta{min-height:0;padding:0 4px;overflow:hidden}body.h-game-mode .rack-open-button{min-height:23px;padding:4px 8px}body.h-game-mode .okey-series-melds,body.h-game-mode .okey-pair-melds{height:26%}}
