/* Mobile edition only. Desktop inherits the approved v1.2.7 rules unchanged. */
@media(max-width:760px){
 :root{--mobile-edge:clamp(16px,6vw,32px);--mobile-header:calc(88px + env(safe-area-inset-top,0px));--mobile-art:clamp(150px,36svh,330px);--mobile-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 .site-header,.site-header:has(.living-menu.is-ready){padding:calc(8px + env(safe-area-inset-top,0px)) var(--mobile-edge) 14px;flex-wrap:nowrap;gap:12px;align-items:center;background:linear-gradient(180deg,#08090cf5 5%,#08090cb0 62%,transparent)}
 .site-header .wordmark{font-size:25px;white-space:nowrap}
 .site-header .living-menu.is-ready{width:60px;height:60px;flex-basis:60px}
 .site-header .living-menu.is-ready nav{top:58px;right:0;width:min(230px,calc(100vw - 2 * var(--mobile-edge)));max-width:none;min-height:0;padding:8px 12px 12px;gap:5px;overflow:visible;flex-direction:column;align-items:stretch}
 .site-header .living-menu.is-open nav{background:radial-gradient(ellipse at center,#16101ee8,#08090cb8 72%,transparent);border-radius:24px}
 .site-header .living-menu.is-ready nav a{min-height:48px;font-size:16px;padding:10px 14px;justify-content:center}
 .site-header .living-menu.is-ready nav .nav-long{display:none}.site-header .living-menu.is-ready nav .nav-short{display:inline}
 .enhanced .track,.cosmic-pages .chapter-multi .chapter-track{display:none}
 .enhanced .viewport,.cosmic-pages .chapter-multi .chapter-stage{position:relative;inset:auto;height:auto;overflow:visible;pointer-events:none}
 .enhanced .scene,.enhanced .s0,.enhanced .s1,.enhanced .s2,.enhanced .s3,.cosmic-pages .chapter-multi .chapter{
  position:relative;inset:auto;display:flex;flex-direction:column;align-items:center;justify-content:flex-start!important;
  min-height:100svh;height:auto;padding:calc(var(--mobile-header) + var(--mobile-art) + 12px) var(--mobile-edge) var(--mobile-bottom);
  overflow:visible;visibility:visible;pointer-events:none
 }
 .enhanced .scene .copy,.cosmic-pages .chapter-multi .chapter .copy,.chapter-page .chapter .copy{
  position:relative;width:100%;max-width:540px;min-width:0;max-height:none;padding:12px 0 0;
  background:linear-gradient(180deg,#08090c00,#08090cdd 22px,#08090cef 74%,#08090c00);
 }
 .enhanced .scene.interactive .copy,.cosmic-pages .chapter-multi .chapter.interactive .copy{pointer-events:auto}
 .enhanced .scene h1,.enhanced .scene h2,.chapter-page .chapter h1,.chapter-page .chapter h2{
  font-size:clamp(36px,9.5vw,62px);letter-spacing:-.06em;line-height:1.02;overflow-wrap:break-word;margin:0 0 15px
 }
 .enhanced .scene .copy p,.chapter-page .chapter .copy p{font-size:clamp(15px,4vw,18px);line-height:1.55;margin-bottom:14px;max-width:100%;color:#c0c3cd}
 .chapter .eyebrow{font-size:10px;letter-spacing:.10em;line-height:1.4;margin-bottom:10px}
 .scene .action,.chapter .action{min-height:44px;font-size:14px;gap:12px;padding:10px 0;max-width:100%;white-space:normal}
 .scene .secondary,.scene .credits{min-height:36px;display:flex;align-items:center;margin-top:4px;line-height:1.4}
 .scene .credits{font-size:11px}
 .chapter-page .chapter-form{min-height:100svh;padding:calc(var(--mobile-header) + var(--mobile-art) + 12px) var(--mobile-edge) var(--mobile-bottom)!important;align-items:center;justify-content:flex-start!important}
 .chapter-page .chapter-form .copy{max-width:540px}
 .contact-form,.contact-form .form-grid{grid-template-columns:minmax(0,1fr);gap:13px;width:100%;min-width:0}
 .contact-form label{min-width:0;line-height:1.5}
 .contact-form input:not([type=checkbox]),.contact-form select,.contact-form textarea{font-size:16px;min-height:46px;padding:12px 10px;border:1px solid #40576a;border-radius:6px;background:#101822e8;color:#fff;min-width:0}
 .contact-form textarea{min-height:100px}
 .contact-form .privacy-check input,.newsletter-consent input{width:20px;height:20px;flex:none}
 .contact-form button{min-height:48px;padding:12px 14px;max-width:100%;border:1px solid #2abede;border-radius:6px;font-size:12px;text-align:left;background:#143344}
 .contact-form :is(input,select,textarea,button),.newsletter-form :is(input,button){scroll-margin-top:var(--mobile-header);scroll-margin-bottom:24px}
 .cosmic-footer .footer-shell{padding:calc(var(--mobile-header) + 18px) var(--mobile-edge) var(--mobile-bottom);gap:30px;min-height:100svh}
 .cosmic-footer .footer-intro{grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}
 .cosmic-footer .footer-intro h2{font-size:clamp(38px,10vw,62px);line-height:1.01}
 .cosmic-footer .footer-brand{justify-self:start;flex-direction:row;gap:12px}
 .cosmic-footer .footer-logo{width:94px;height:94px;flex:none}
 .cosmic-footer .footer-wordmark{font-size:25px}
 .cosmic-footer .footer-main{grid-template-columns:minmax(0,1fr);gap:28px}
 .cosmic-footer .footer-directory{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .cosmic-footer .footer-links{gap:4px;font-size:12px}
 .cosmic-footer .footer-links a{min-height:40px;display:flex;align-items:center}
 .cosmic-footer .newsletter-input{min-height:48px}
 .cosmic-footer .newsletter-input button{font-size:13px;padding-inline:12px}
 .cosmic-footer .newsletter-consent{font-size:13px;line-height:1.5}
 .cosmic-footer .footer-bottom{gap:6px 14px;padding-top:12px}
 .cosmic-footer .footer-bottom a{min-height:36px;display:flex;align-items:center}
 .skip-intro{bottom:var(--mobile-bottom);min-height:44px}
 html:not(.site-live) .scene,html:not(.site-live) .chapter:not(.chapter-form){min-height:auto;padding:calc(var(--mobile-header) + 12px) var(--mobile-edge) 48px}
 html:not(.site-live) .chapter-form{padding:calc(var(--mobile-header) + 12px) var(--mobile-edge) 48px!important}
}
@media(max-width:760px) and (max-height:520px){
 :root{--mobile-art:clamp(112px,31svh,165px)}
 .site-header .living-menu.is-ready nav{max-height:calc(100svh - 85px);overflow-y:auto;overscroll-behavior:contain}
 .enhanced .scene h1,.enhanced .scene h2,.chapter-page .chapter h1,.chapter-page .chapter h2{font-size:clamp(32px,8vw,45px)}
}
@media(max-width:360px){.cosmic-footer .footer-directory{grid-template-columns:1fr}.cosmic-footer .footer-brand{gap:8px}.cosmic-footer .footer-wordmark{font-size:22px}.cosmic-footer .newsletter-input button{padding-inline:8px}}

/* v1.2.9: horizontal living menu, including narrow 320px phone screens. */
@media(max-width:760px){
 :root{--mobile-art:clamp(140px,32svh,300px);--mobile-header:calc(76px + env(safe-area-inset-top,0px))}
 html{overflow-x:clip}
 .site-header,.site-header:has(.living-menu.is-ready){padding:calc(8px + env(safe-area-inset-top,0px)) var(--mobile-edge) 12px}
 .site-header .wordmark{transition:opacity .26s ease,transform .32s cubic-bezier(.22,.76,.25,1),visibility 0s;transform:translateX(0)}
 .site-header:has(.living-menu.is-open) .wordmark,.site-header:has(.living-menu.fallback-open) .wordmark{opacity:0;transform:translateX(-10px);pointer-events:none;visibility:hidden;transition:opacity .22s ease,transform .28s ease,visibility 0s .28s}
 .site-header .living-menu.is-ready{width:54px;height:54px;flex-basis:54px}
 .site-header .living-menu.is-open .living-core{width:42px;margin-left:auto}
 .site-header .living-menu.is-ready nav{
  top:0;right:44px;min-height:54px;height:54px;
  width:calc(100vw - 2 * var(--mobile-edge) - 44px);max-width:none;max-height:none;
  padding:4px 2px;gap:1px;display:grid;grid-template-columns:.85fr .95fr 1.3fr 1fr 1.1fr;
  align-items:center;overflow:visible;transform:none;
 }
 .site-header .living-menu.is-open nav{background:radial-gradient(ellipse at 50% 50%,#100b16c9 35%,#08090c80 72%,transparent);border-radius:999px}
 .site-header .living-menu.is-ready nav a{
  width:100%;min-width:0;min-height:46px;padding:4px 1px;gap:2px;justify-content:center;text-align:center;
  font-size:clamp(11px,3.2vw,15px);letter-spacing:-.035em;white-space:nowrap;-webkit-text-stroke:0;
 }
 .site-header .living-menu.is-ready nav .nav-cta{border:0;color:#fff}
 .site-header .living-menu.is-ready nav .nav-cta span{color:inherit}
 .site-header .living-menu.is-ready nav .nav-cta span:last-child{font-size:.78em}
 .site-header .living-menu.is-ready nav .living-selection{border-color:#f2bbd899}
 .site-header .living-menu.is-ready .living-orb{pointer-events:none}
 html.byte-menu-fallback .site-header .living-menu:not(.is-ready).fallback-open nav{
  top:0;right:50px;min-height:48px;width:calc(100vw - 2 * var(--mobile-edge) - 50px);
  max-width:none;flex-direction:row;align-items:center;justify-content:space-evenly;gap:2px;padding:2px 4px;border-radius:999px
 }
 html.byte-menu-fallback .site-header .living-menu:not(.is-ready).fallback-open nav a{padding:4px 1px;display:flex;align-items:center;min-height:44px;font-size:11px;white-space:nowrap}
 html.byte-menu-fallback .site-header .living-menu:not(.is-ready).fallback-open .nav-long{display:none}
 html.byte-menu-fallback .site-header .living-menu:not(.is-ready).fallback-open .nav-short{display:inline}
 /* Native scroll with proximity snapping: never intercept touch or lock the page. */
 html.site-live:not(.intro):not(.route-moving):has(.viewport,.chapter-stage){scroll-snap-type:y proximity}
 .enhanced .scene,.cosmic-pages .chapter-multi .chapter{
  min-height:92svh;scroll-snap-align:start;scroll-snap-stop:normal;
  padding:calc(var(--mobile-header) + var(--mobile-art) + 8px) var(--mobile-edge) var(--mobile-bottom);
 }
 .site-live:has(.viewport,.chapter-stage) .cosmic-footer{scroll-snap-align:start}
 .enhanced .scene .copy,.cosmic-pages .chapter-multi .chapter .copy{
  padding:10px 0 0;background:linear-gradient(180deg,transparent,#08090cd9 18px,#08090ce8 76%,transparent);
 }
 .enhanced .scene h1,.enhanced .scene h2,.chapter-page .chapter h1,.chapter-page .chapter h2{
  font-size:clamp(35px,9.7vw,62px);margin-bottom:12px;text-shadow:0 2px 18px #08090ca0;
 }
 .enhanced .scene .copy p,.chapter-page .chapter .copy p{margin-bottom:10px;line-height:1.48}
 .scene .action,.chapter .action{padding-block:9px}
 .chapter-page .chapter-form{padding-top:calc(var(--mobile-header) + var(--mobile-art) + 8px)!important}
 .cosmic-footer .footer-shell{padding-top:calc(var(--mobile-header) + 24px)}
}
@media(max-width:760px) and (max-height:520px){
 :root{--mobile-art:clamp(100px,28svh,150px)}
 html.site-live:not(.intro):not(.route-moving):has(.viewport,.chapter-stage){scroll-snap-type:none}
 .enhanced .scene,.cosmic-pages .chapter-multi .chapter{min-height:100svh}
}
@media(max-width:350px){.site-header .living-menu.is-ready nav a{font-size:10px;letter-spacing:-.04em}.site-header .living-menu.is-ready nav{gap:0}}
@media(max-width:760px) and (prefers-reduced-motion:reduce){
 html.site-live:not(.intro):not(.route-moving):has(.viewport,.chapter-stage){scroll-snap-type:none}
 .site-header .wordmark,.site-header:has(.living-menu.is-open) .wordmark{transition:none}
}

/* Larger art, lower copy, reduced dead space; desktop stylesheet untouched. */
@media(max-width:760px){
 :root{--mobile-art:clamp(190px,47svh,420px)}
 .enhanced .scene,.cosmic-pages .chapter-multi .chapter{min-height:94svh;padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
 .enhanced .scene .copy,.cosmic-pages .chapter-multi .chapter .copy{padding-top:6px}
 .chapter-page .chapter-form{--mobile-art:clamp(150px,34svh,290px)}
 .mobile-motion-permission{position:fixed;z-index:6;right:var(--mobile-edge);bottom:calc(12px + env(safe-area-inset-bottom,0px));padding:8px 12px;min-height:44px;border:1px solid #4a6879;border-radius:999px;color:#d0e5ef;background:#08090ce8;font:11px Arial,sans-serif;cursor:pointer}
 .mobile-motion-permission[hidden],html.intro .mobile-motion-permission,html.byte-art-pending .mobile-motion-permission,html:not(.site-live) .mobile-motion-permission,html:has(.living-menu.is-open) .mobile-motion-permission{display:none}
}
@media(max-width:760px) and (max-height:600px){
 :root{--mobile-art:clamp(125px,39svh,230px)}
 .chapter-page .chapter-form{--mobile-art:clamp(105px,28svh,170px)}
}
@media(max-width:760px) and (max-height:420px){
 :root{--mobile-art:clamp(100px,31svh,145px)}
}
@media(min-width:761px){.mobile-motion-permission{display:none!important}}

/* Final scene: preserve a complete viewport before the footer.
   Proximity snapping remains native and all earlier snap points are unchanged. */
@media(max-width:760px) and (min-height:521px) and (prefers-reduced-motion:no-preference){
 html.site-live.enhanced:not(.intro):not(.route-moving) .scene:last-of-type,
 html.site-live.cosmic-pages:not(.route-moving) .chapter-multi .chapter:last-of-type{
  min-height:100svh;scroll-snap-align:end;scroll-snap-stop:normal;
 }
}

/* Only the final approach uses the short gesture brake. Avoid fighting it
   with the browser's proximity snapping, including the footer snap point. */
@media(max-width:760px){
 html.site-live.footer-free-scroll:not(.intro):not(.route-moving):has(.viewport,.chapter-stage){scroll-snap-type:none}
}
