/* Shared only by the Games hub, Little Reef Cafe and Reef Routes. */
.site-shell-more aside{max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);overflow-y:auto;overscroll-behavior:contain}
.cooking-page dialog{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
.cooking-page .cook-main,.reef-routes-page .reef-main{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
.reef-main .chapter-nav button{min-width:44px;min-height:44px}
.reef-main .levels{grid-template-columns:repeat(auto-fit,minmax(44px,1fr))}
.cooking-page input,.cooking-page textarea,.reef-routes-page input,.reef-routes-page textarea,.reef-routes-page select{font-size:16px}
/* A short screen needs room for a complete touch trail, not fixed overlays. */
@media(max-height:500px){
 html body header.site-shell{position:relative!important;top:auto!important}
 .cooking-page .shift-bar{position:static;top:auto}
 .site-mobile-dock{position:relative;inset:auto;margin:16px 10px max(10px,env(safe-area-inset-bottom));width:calc(100% - 20px)}
 body.has-site-mobile-dock{padding-bottom:0}
 .reef-main .board{width:min(100%,calc(100svh - 24px));margin-inline:auto;scroll-margin-block:12px}
 .cooking-page .work-surface #workArt{height:clamp(170px,58svh,250px)}
 .site-shell-more aside{padding:14px}
 .site-shell-more nav{margin-top:10px;gap:6px}
 .site-shell-more nav a{min-height:62px;padding:10px}
}
@media(max-width:350px){.reef-main .journey-card{padding:14px}.reef-main .levels{gap:6px}.reef-main .game{padding:6px}.reef-main .board{border-width:3px}.reef-main .stats{gap:12px}}
/* Solid dual-screen hinges: use one unobstructed pane. Ordinary folding
   displays keep the full responsive layout, including when APIs are absent. */
html[data-game-pane] body{width:var(--game-pane-width);margin-left:var(--game-pane-left);margin-right:0}
html[data-game-pane] .site-shell-more{width:var(--game-pane-width);left:var(--game-pane-left);right:auto}
html[data-game-pane] .site-shell-more aside{width:calc(100% - 20px);max-width:520px}
html[data-game-pane] .site-mobile-dock{left:calc(var(--game-pane-left) + 10px);right:auto;width:calc(var(--game-pane-width) - 20px)}
html[data-game-pane] header.site-shell{grid-template-columns:auto 1fr!important;padding-inline:16px!important}
html[data-game-pane] header.site-shell .site-shell-primary,html[data-game-pane] header.site-shell .site-shell-tools{display:none!important}
html[data-game-pane] .site-mobile-dock{display:grid}
html[data-game-pane] body{padding-bottom:80px}
html[data-game-pane] .play-layout,html[data-game-pane] .kitchen{display:block}
html[data-game-pane] .hub-five,html[data-game-pane] .collection-grid{grid-template-columns:1fr}
html[data-game-pane] .hub-five>.hub-destination{grid-column:auto}
html[data-game-pane] .recipe-menu{display:flex;overflow-x:auto;scroll-snap-type:x proximity}
html[data-game-pane] .recipe-menu button{flex:0 0 112px}
html[data-game-pane] .cook-title{flex-wrap:wrap;padding:16px 8px;gap:8px}
html[data-game-pane] .cook-title h1{font-size:28px}
html[data-game-pane] .cook-title .save-badge{position:static;margin:0}
html[data-game-pane] .cafe-sign-shell{display:none}
html[data-game-pane] .chef-tools{margin-top:18px}
html[data-game-pane] .game-top{flex-wrap:wrap}
html[data-game-pane] body .game-site-header.site-game-context.site-game-subbar{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;gap:6px!important}
html[data-game-pane] body .site-game-subbar>.site-game-title{grid-column:1/-1!important;grid-row:1!important;max-width:none!important;font-size:14px!important;white-space:normal}
html[data-game-pane] body .site-game-subbar>.game-site-back{grid-column:1!important;grid-row:2!important}
html[data-game-pane] body .site-game-subbar>.game-help-button,html[data-game-pane] .cafe-context-actions{grid-column:2!important;grid-row:2!important;justify-self:end;gap:4px}
html[data-game-pane] body .site-game-subbar .game-help-button,html[data-game-pane] .cafe-context-actions #sound{font-size:11px!important;padding:8px!important;min-height:44px}
html[data-game-pane] .shift-bar{flex-wrap:wrap}.cooking-page .shift-mode-buttons{flex-wrap:wrap}
html[data-game-pane] dialog{width:calc(var(--game-pane-width) - 32px);max-width:470px;margin-left:calc(var(--game-pane-left) + (var(--game-pane-width) - min(470px,var(--game-pane-width) - 32px))/2);margin-right:0}
html[data-game-horizontal-hinge] .reef-main .board{width:min(100%,calc(var(--game-pane-height) - 24px));margin-inline:auto;scroll-margin-block:12px}
html[data-game-horizontal-hinge] .site-shell-more{height:var(--game-pane-height);bottom:auto}
html[data-game-horizontal-hinge] .site-shell-more aside,html[data-game-horizontal-hinge] dialog{max-height:calc(var(--game-pane-height) - 24px)}
html[data-game-horizontal-hinge] dialog{margin-top:12px;margin-bottom:0}
html[data-game-horizontal-hinge] header.site-shell,html[data-game-horizontal-hinge] .cooking-page .shift-bar{position:relative!important;top:auto!important}
html[data-game-horizontal-hinge] .site-mobile-dock{position:relative;inset:auto;width:calc(100% - 20px);margin:16px 10px}
