/* Same physical journal, direct page gestures, and no mobile toolbar. */
#scene, #scene canvas { touch-action:none; }
#journey-hint::after { content:none; }
#mobile-reading { display:none; }
@media (max-width:800px), (pointer:coarse) and (max-height:600px) {
 body #chapter-location, body #page-zoom, body #page-zoom:not([hidden]), body #chapter-read { display:none!important; }
 .is-open :is(#motion-toggle,#intro-replay) { display:none; }
 #journey-hint, .is-open #journey-hint { bottom:24px; max-width:calc(100% - 32px); font-size:13px; }
 .site-header .site-brand img { filter:none; }
 .site-header #site-navigation { overscroll-behavior:contain; touch-action:pan-y; }
 .site-header #site-navigation>#mobile-reading { display:flex; }
 .site-header #site-navigation>#motion-toggle { display:flex; position:static; inset:auto; opacity:1; color:var(--brand-navy); font:400 16px/1.5 Heebo,sans-serif; min-height:48px; padding:10px 16px; }
 .site-header #site-navigation #chapter-location { display:flex!important; position:static; inset:auto; transform:none; margin:0; padding:0; width:100%; background:transparent; }
 .site-header #chapter-location :is(label,.chapter-step) { display:none; }
 .site-header #chapter-select { width:100%; max-width:none; min-height:48px; padding:10px 16px; font:400 16px Heebo; color:var(--brand-navy); background:transparent; border:1px solid #111a3740; border-radius:4px; }
 body .site-header #projects-menu>div { border:0; background:var(--brand-cream); color:var(--brand-navy); }
 #mobile-menu:focus-visible { outline:2px solid var(--brand-peach); outline-offset:3px; }
}
@media (max-width:360px) {
 .site-header { padding-inline:12px!important; gap:8px!important; }
 .site-header .site-brand>span>img { width:132px; }
 .site-header .site-brand>img { width:26px; }
 html[dir=ltr] .site-header .site-brand>span>span { font-size:12px; }
 #mobile-menu { min-width:64px; }
}
@media (max-height:550px) and (max-width:800px), (pointer:coarse) and (max-height:600px) {
 .site-header { height:80px!important; padding-block:6px!important; }
 .site-header .site-brand>span>span { display:block; font-size:14px; line-height:1.2; }
 .site-header #site-navigation { top:80px; max-height:calc(100dvh - 92px); }
}
/* Plain HTML feedback is visible before the module graph or WebGL initializes. */
#scene #loading { top:68%; left:50%; width:max-content; max-width:calc(100% - 40px); padding:12px 18px; margin:0; transform:translate(-50%,-50%); border:0; background:var(--brand-cream,#F7F5EE); color:var(--brand-navy,#111A37); z-index:3; }
#loading-label { display:block; font:500 15px/1.5 Heebo,sans-serif; }

#scene #loading { flex-direction:column; align-items:center; gap:10px; }
#loading span { width:44px; height:2px; animation:loading-breathe 1s ease-in-out infinite alternate; }
@keyframes loading-breathe { to { opacity:.3; transform:scaleX(.55); } }
@media(prefers-reduced-motion:reduce){#loading span{animation:none;}}

#startup-preview { position:fixed; inset:0; display:block; pointer-events:none; z-index:1; }
#startup-preview img { width:100%; height:100%; object-fit:cover; }
#scene #loading { position:fixed; top:auto; bottom:24px; transform:translateX(-50%); }
body:has(#loading) #journey-hint { visibility:hidden; }

body:has(#loading) :is(#intro-replay,#motion-toggle,#chapter-location,#chapter-index){visibility:hidden;}

/* Keep the full identity in every phone viewport, including short browser windows. */
@media(max-width:800px),(pointer:coarse) and (max-height:600px){.site-header .site-brand>span>span{display:block;white-space:nowrap;}}
