/* Touch targets, legible native selectors and safe-area aware lesson overlays. */
@media(max-width:1300px){
 header #language,#guide select,#guide .howto-options select{font-size:16px!important}
 header .tools{min-width:0}
 #guide .howto-panel.howto-expanded{height:100dvh!important;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;overscroll-behavior:contain}
 header #section-navigation.menu-open{max-height:calc(100dvh - var(--site-header-height));padding-bottom:max(12px,env(safe-area-inset-bottom))!important;overflow-y:auto}
 #guide .howto-scene iframe{max-width:100%}
}
@media(max-width:360px){header .wordmark-main{font-size:22px!important}header .wordmark-sub{font-size:11px!important}#guide .howto-actions button{font-size:12px}}
/* Short landscape phones need the scene beside the explanation, not below it. */
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){
 #guide .howto-panel{display:grid!important;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:0 16px;padding:12px!important;align-items:start;--stage-height342:calc(100svh - var(--site-header-height) - 32px)}
 #guide .lesson-copy342{display:block;grid-column:2;grid-row:1/span 2;min-width:0}
 #guide .howto-scene{grid-column:1;grid-row:1;align-self:start}
 #guide .howto-progress{grid-column:1;grid-row:2}
 #guide .lesson-action341{margin:8px 0;font-size:14px;padding:8px 10px}
 #guide .howto-actions{margin:8px 0}
 #guide .howto-control-grid{grid-template-columns:1fr;gap:10px;margin-top:12px;padding-top:12px}
 #guide .howto-control-grid p{font-size:14px;line-height:1.5}
 #guide .howto-panel.howto-expanded{--stage-height342:calc(100svh - 40px)}
}

/* Both native HQ and battle frames must fill their reserved scene. */
#guide .howto-scene #howto-shop{display:block;width:100%;height:100%;border:0;min-height:0;aspect-ratio:auto}

#section-menu-fallback345{display:none}#section-menu-fallback345[hidden]{display:none!important}
@media(max-width:1300px){header #section-menu-fallback345{display:block;grid-column:3;grid-row:1;justify-self:end;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;border:1px solid #63745d;border-radius:9px;background:#1b281e;color:#edf4e1;font-size:0}header #section-menu-fallback345:after{content:'☰';font:24px/1 system-ui}header #section-menu-fallback345[aria-expanded=true]:after{content:'×'}header #section-menu-fallback345:focus-visible{outline:3px solid #d9f78c;outline-offset:3px}}
