/* Mobile-only layout. There are deliberately no unguarded desktop rules. */
@media (max-width:720px), (max-width:1000px) and (max-height:500px) and (orientation:landscape){
  .site-head{padding:calc(.8rem + env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) .8rem max(1rem,env(safe-area-inset-left))}
  .scene .copy-frame{height:100svh;padding:calc(3.5rem + env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));align-items:flex-end;justify-content:center}
  .scene .copy{width:100%;max-width:100%;padding:0;max-height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#aaa #111;touch-action:pan-y;pointer-events:none}
  .scene .copy[data-mobile-active],.opening .dek[data-mobile-active]{pointer-events:auto}
  .scene .copy::before,.scene .copy::after{inset:0;filter:none;pointer-events:none}
  .scene:not(.frontage):not(.journey):not(.understanding) .copy::before{inset:0;filter:none}
  .frontage .copy{width:auto;max-width:100%;overflow:visible}
  .scene .copy h2,.scene:not(.frontage):not(.opening):not(.foundations):not(.closing) .copy h2{font-size:clamp(1.75rem,7.4vw,2.25rem);line-height:1.08;max-width:22ch;letter-spacing:-.03em;text-wrap:balance}
  .scene .dek{font-size:1rem;line-height:1.45;max-width:100%;margin-top:1rem;overflow-wrap:break-word}
  .scene .room-name,.scene .eyebrow{font-size:.6875rem;line-height:1.4;margin-bottom:.75rem}
  .scene .room-name{gap:.65rem}
  .scene .room-name::before{width:2rem;flex-shrink:0}
  .scene[data-label="Bedroom"] .copy-frame{align-items:flex-end;padding-top:calc(3.5rem + env(safe-area-inset-top))}
  .scene[data-label="Hallway"] .copy{width:100%}
  .foundations .copy-frame{padding-bottom:max(1rem,env(safe-area-inset-bottom))}
  .foundations .copy h2{max-width:22ch}
  .opening .copy-frame{align-items:flex-start}
  .opening .copy{position:static;overflow:visible;max-height:none}
  .opening .copy h2{font-size:clamp(1.75rem,8.5vw,2.25rem);max-width:24ch}
  .opening .dek{width:calc(100% - 2rem);max-width:none;margin:0;max-height:max(4.5rem,calc(100svh - var(--opening-paragraph-top,55svh) - max(.5rem,env(safe-area-inset-bottom))));overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;touch-action:pan-y;pointer-events:none}
  body[data-mobile-opening-stack] .opening .copy{position:relative;max-height:100%;overflow-y:auto;background:#000e;padding:.75rem}
  body[data-mobile-opening-stack] .opening .dek{position:static;top:auto!important;bottom:auto!important;left:auto;transform:none;width:100%;max-height:none;overflow:visible;margin-top:1rem}
  #cover-portal{transform:translateY(var(--mobile-book-reading-offset,0px))}
  .copy[data-mobile-reader]:focus-visible,.dek[data-mobile-reader]:focus-visible{outline:2px solid #eee;outline-offset:3px}
  .cinematic-control{min-height:44px;min-width:44px;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));padding:.65rem .85rem}
  html[data-cinematic-beat="roots"] .cinematic-control{top:calc(.6rem + env(safe-area-inset-top));bottom:auto}
  .after-house{padding:52svh max(1rem,env(safe-area-inset-right)) max(2rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));align-items:flex-start;min-height:140svh}
  .after-inner{position:relative;top:auto;max-width:100%;width:100%}
  .after-inner h2{font-size:2rem;line-height:1.08;max-width:18ch;text-wrap:balance}
  .after-inner>p:not(.eyebrow){font-size:1rem;line-height:1.5;margin:1.5rem 0;overflow-wrap:break-word}
  .after-inner .links{margin-top:1.5rem}
  .after-inner .links a{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
@media (max-width:1000px) and (max-height:500px) and (orientation:landscape){
  .scene .copy-frame{padding:calc(3.5rem + env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) calc(50vw + 1rem);align-items:center;text-align:left}
  .scene .copy h2,.scene:not(.frontage):not(.opening):not(.foundations):not(.closing) .copy h2,.opening .copy h2{font-size:clamp(1.5rem,3.2vw,1.875rem);max-width:none;margin-inline:0}
  .scene[data-label="Bedroom"] .copy-frame{align-items:center}
  .scene .copy .dek{font-size:1rem;line-height:1.45}
  .opening .copy{position:relative;max-height:100%;overflow-y:auto}
  .opening .dek{position:static;top:auto!important;bottom:auto!important;left:auto;transform:none;width:100%;max-height:none;overflow:visible;margin-top:1rem}
  .opening .copy-frame{align-items:center}
  .foundations .copy h2{max-width:none}
  body[data-mobile-house="landscape"] #house-canvas{clip-path:inset(0 50% 0 0)}
  .cover-frame{height:76svh;width:57.872svh;max-width:85.285vw;left:calc(50% - var(--editorial-progress,0)*25%);top:50%;transform:translate(-50%,-50%) scale(calc(1 - var(--editorial-progress,0)*.12))}
  .cover-invitation{left:max(1rem,env(safe-area-inset-left));right:auto;bottom:max(1rem,env(safe-area-inset-bottom));width:24vw;max-width:24vw;padding:0}
  .cover-invitation h1{font-size:1rem;max-width:none}
  .cover-invitation p{margin-bottom:.5rem}
  .cover-invitation span{margin-top:.65rem}
  .after-house{padding:calc(3.5rem + env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(1.5rem,env(safe-area-inset-bottom)) calc(50vw + 1rem);min-height:100svh;align-items:center}
  .after-inner h2{font-size:clamp(1.5rem,3.2vw,1.875rem)}
}
@media (prefers-reduced-motion:reduce) and (max-width:720px), (prefers-reduced-motion:reduce) and (max-width:1000px) and (max-height:500px) and (orientation:landscape){
  .scene .copy-frame{height:auto;padding:0;position:relative}
  .scene .copy,.opening .copy{max-height:none;overflow:visible}
  .opening .dek{position:static;top:auto!important;bottom:auto!important;left:auto;transform:none;width:100%;max-height:none;overflow:visible;margin-top:1rem}
  .after-house{padding:3rem max(1rem,env(safe-area-inset-right)) 3rem max(1rem,env(safe-area-inset-left));min-height:100svh}
}
