/* Replay80: a full-screen handheld, without changing V10 art or rules. */
html,body{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}button,canvas,.center-cross{touch-action:none}a,select{touch-action:manipulation}.language-picker select{min-height:36px;border:1px solid #d5c8a9;border-radius:9px;background:#fffaf0;color:#304339;font:inherit}.brand>span{color:#53792b}.native-cocotte .brand,.native-cocotte #expand,.native-cocotte .language-picker{display:none}
body.handheld .app,body.focus-game .app{width:100%;max-width:none;height:100svh;height:100dvh;display:flex;flex-direction:column;padding:max(3px,env(safe-area-inset-top)) max(3px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(3px,env(safe-area-inset-left))}
body.handheld .headline,body.handheld footer,body.handheld .console-caption{display:none}
body.handheld .topbar,body.focus-game .topbar{position:absolute;inset:max(8px,env(safe-area-inset-top)) max(9px,env(safe-area-inset-right)) auto auto;height:36px;z-index:5;pointer-events:none}body.handheld .topbar .brand{display:none}.tools{pointer-events:auto;align-items:center}
body.handheld .icon-button,body.focus-game .icon-button{width:36px;height:36px;background:#fffaf0}.sound-slash{inset:4px}
body.handheld .machine{width:100%;max-width:none;flex:1;min-height:0;display:flex;flex-direction:column;box-shadow:none;border-radius:14px}
body.handheld .hud,body.focus-game .hud{height:90px;min-height:90px;padding:42px 14px 3px;gap:8px}.native-cocotte.handheld .hud,.native-cocotte.focus-game .hud{height:64px;min-height:64px;padding:23px 92px 2px 58px}
body.handheld .stat{min-width:60px}body.handheld .stat>span{font-size:7px;letter-spacing:.4px}body.handheld .stat strong{font-size:24px}body.handheld .health strong{font-size:20px;letter-spacing:2px}body.handheld .game-mode{font-size:10px;letter-spacing:.5px}body.handheld .level-track{padding:3px 14px 5px;font-size:8px}
body.handheld .console-body{flex:1;min-height:0;grid-template-rows:minmax(0,1fr) 144px;padding:0 3px 5px;gap:8px}body.handheld .console-body .stage{height:100%;min-height:0;aspect-ratio:auto;border-width:3px}
body.handheld .stage:has(.overlay:not(.hidden)){isolation:auto;overflow:visible}body.handheld .stage .overlay{position:fixed;inset:0;z-index:10;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));overflow:auto;background:#34554266}
body.handheld .intro-card{max-height:100%;overflow:auto;transform:none;width:360px;padding:22px}body.handheld .intro-card h2{font-size:29px}.stage-label{max-width:90%;overflow:hidden;text-overflow:ellipsis}
@media(orientation:landscape) and (max-height:600px){body.handheld .machine,body.focus-game .machine{border-radius:0;border:0}body.handheld .hud,body.focus-game .hud{height:40px;min-height:40px;padding:2px 210px 2px 58px}.native-cocotte.handheld .hud,.native-cocotte.focus-game .hud{height:40px;min-height:40px;padding:2px 100px 2px 58px}body.handheld .level-track{padding:0 18px 3px}body.handheld .console-body,body.focus-game .console-body{grid-template-rows:minmax(0,1fr) 128px;gap:2px;padding-bottom:0}body.handheld .stage-label{display:none}body.handheld .intro-card{padding:12px 20px;width:450px}body.handheld .intro-card h2{font-size:24px;margin:5px}body.handheld .intro-card p{margin:4px 0;line-height:1.3}body.handheld .mode-options{margin:7px 0}body.handheld .primary{padding:10px}body.handheld .intro-card .tiny{margin:7px 0 0}.console-body .direction-pad.center-cross{height:128px;grid-template-rows:56px 56px}.console-body .direction-pad.center-cross button{height:56px}.center-cross::before,.center-cross::after{top:50px}.console-body .center-cross .cross-hub{top:52px}}

@media(orientation:landscape) and (max-height:600px){body.handheld .console-body,body.focus-game .console-body{padding-bottom:5px}}

/* Harvest: the four-position cross remains centered, with cargo and delivery on its sides. */
.console-body .control-deck{grid-row:2;grid-column:1;display:grid;grid-template-columns:minmax(44px,1fr) 216px minmax(44px,1fr);gap:4px;align-items:center;min-width:0;height:144px}
.console-body .control-deck .direction-pad.center-cross{grid-row:1;grid-column:2}
#hat-status{grid-column:1;grid-row:1;justify-self:center;text-align:center;max-width:150px;min-width:0;color:#48694b}#hat-status>span{font-size:8px;font-weight:900;letter-spacing:.6px}#hat-load{display:block;font-size:19px;white-space:nowrap}#hat-multiplier{font-size:22px;color:#ad632e}#hat-slots{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;margin:7px auto;width:min(100%,100px)}#hat-slots i{height:7px;border-radius:3px;background:#d9d5bc}#hat-slots i.filled{background:#6c9152}#hat-status.full #hat-load{color:#ba442a}#hat-status.full #hat-slots i.filled{background:#d16a35}
.delivery-button{grid-column:3;grid-row:1;justify-self:center;max-width:145px;width:100%;min-width:44px;min-height:88px;padding:10px 3px;border:2px solid #968163;border-radius:16px;background:#e9ddc1;color:#46633c;box-shadow:0 4px 0 #b3a280;touch-action:manipulation;font:inherit}.delivery-button>span{display:block;font-size:26px}.delivery-button strong{display:block;font-size:13px}.delivery-button small{display:block;font-size:8px;margin-top:5px}.delivery-button.safe{background:#dcebbf;border-color:#688649}.delivery-button:disabled{opacity:.55}.delivery-button:active{transform:translateY(2px);box-shadow:0 2px 0 #b3a280}
@media(max-width:359px){#hat-status>span{font-size:6px}#hat-load{font-size:13px}.delivery-button strong{font-size:10px}.delivery-button small{font-size:7px}}
@media(orientation:landscape) and (max-height:600px){.console-body .control-deck{height:128px}.delivery-button{min-height:85px;max-width:160px}#hat-load{font-size:23px}.delivery-button strong{font-size:16px}.delivery-button small{font-size:10px}}

/* V71: landscape handheld controls flank the scene instead of consuming its height. */
@media (orientation:landscape) and (max-height:600px){
 body.handheld .console-body,body.focus-game .console-body{grid-template-columns:216px minmax(0,1fr) 96px;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:0 5px 5px}
 body.handheld .console-body .stage,body.focus-game .console-body .stage{grid-column:2;grid-row:1 / 3;height:100%;min-height:0;aspect-ratio:auto}
 body.handheld .console-body .control-deck,body.focus-game .console-body .control-deck{display:contents}
 body.handheld .console-body .control-deck .direction-pad.center-cross,body.focus-game .console-body .control-deck .direction-pad.center-cross{grid-column:1;grid-row:1 / 3;height:144px;grid-template-rows:64px 64px;align-self:center}
 body.handheld .console-body .center-cross button,body.focus-game .console-body .center-cross button{height:64px}
 .console-body .center-cross::before,.console-body .center-cross::after{top:58px}
 .console-body .center-cross .cross-hub{top:60px}
 #hat-status{grid-column:3;grid-row:1;align-self:end;padding-bottom:8px}
 .delivery-button{grid-column:3;grid-row:2;align-self:start;min-height:88px}
 body.handheld .callout{font-size:11px;bottom:8px}
}
@media (orientation:landscape) and (max-width:740px) and (max-height:600px){
 body.handheld .console-body,body.focus-game .console-body{grid-template-columns:164px minmax(0,1fr) 80px;gap:4px}
 body.handheld .console-body .control-deck .direction-pad.center-cross,body.focus-game .console-body .control-deck .direction-pad.center-cross{width:160px;grid-template-columns:68px 68px;column-gap:24px}
 body.handheld .console-body .center-cross button,body.focus-game .console-body .center-cross button{width:68px}
 .console-body .center-cross::before,.console-body .center-cross::after{left:13px;width:134px}
 .console-body .center-cross .cross-hub{left:68px}
}
