/* Registered panorama. All three pieces use the centre plate's scale and the
   same vertical centre; the transparent edge overlaps are from the artist. */
#wingCamera,#wingControls,#wingLens,#wingEmblem{position:absolute;inset:0}
#wingLens{z-index:-3;pointer-events:none}
#wingCamera{isolation:isolate;pointer-events:none}
#wingEmblem{pointer-events:none}
#wingControls{pointer-events:none}
#wingControls>.room-actions,#wingControls>.room-utility,#wingControls>.room-privacy{pointer-events:auto}
.room-status{position:relative}
.room-status .signal-value{position:absolute;inset:auto 0 auto auto;top:calc(100% + 3px);white-space:nowrap}
:root{
  /* Both the room and its native top-layer dialogs use this projection. */
  --wing-u:max(calc(100vw / 8192),calc(100dvh / 4768));
  --vertical-pan:1150ms cubic-bezier(.45,.025,.18,1);
}
.room{
  /* A wide localized line can extend a little past the native reveal. Give
     the camera enough road to clear its ink, not the whole empty text box. */
  --w-right:max(min(calc(2339 * var(--wing-u)),38vw),calc(var(--wing-copy-clear,0px) + 50vw - 4096 * var(--wing-u)));
  --w-left:min(calc(2819 * var(--wing-u)),40vw);
  --wing-world:0px;--wing-right:0px;--wing-left:0px;
  --wing-time:1280ms;--wing-ease:cubic-bezier(.44,0,.21,1);
}
.room[data-wing="process"]{--wing-right:var(--w-right);--wing-world:calc(50vw - var(--wing-u) * 4096 - var(--wing-right))}
.room[data-wing="about"]{--wing-left:var(--w-left);--wing-world:calc(var(--wing-u) * 4096 - 50vw + var(--wing-left))}
@media(orientation:portrait){
  .room{--w-right:min(calc(2339 * var(--wing-u)),50vw);--w-left:min(calc(2819 * var(--wing-u)),50vw)}
}
@media(max-width:600px) and (orientation:portrait){
  .room{--w-right:min(calc(2339 * var(--wing-u)),59vw);--w-left:min(calc(2819 * var(--wing-u)),59vw)}
}
/* A physical extension is always behind the opaque centre plate. Its inner
   registration guard is a second view of the same cached image, above the
   centre, which blends in only when travelling towards that wall. The edge
   outside the centre is already solid from the first pixel of every slide. */
.wing-art{display:block;position:absolute;z-index:-4;top:50%;height:calc(var(--wing-u) * 4768);transform:translateY(-50%);max-width:none;pointer-events:none}
.wing-art-about{left:calc(50% - var(--wing-u) * 6915);width:calc(var(--wing-u) * 2902)}
.wing-art-process{left:calc(50% + var(--wing-u) * 3264);width:calc(var(--wing-u) * 3171)}
.wing-art-tail{left:calc(50% + var(--wing-u) * 6435 - .5px);width:calc(var(--wing-u) * 3171);z-index:-5;transform:translateY(-50%) scaleX(-1)}
.wing-art.wing-guard{z-index:-2;opacity:0;transition:opacity var(--wing-time) var(--wing-ease)}
.wing-guard.wing-art-process{clip-path:inset(0 calc(100% * 2339 / 3171 - 1px) 0 0)}
.wing-guard.wing-art-about{clip-path:inset(0 0 0 calc(100% * 2819 / 2902 - 1px))}
.room[data-wing="process"] .wing-guard.wing-art-process,.room[data-wing="about"] .wing-guard.wing-art-about{opacity:1}
body.work-flight-active .wing-art{visibility:hidden}
/* Keep the exact same projection at home, in transit and on either wall.
   Work's separate forward camera still owns its projection while flying. */
body:not(.work-flight-active) #workRoomBase{
  inset:auto;left:calc(50% - var(--wing-u) * 4096);top:calc(50% - var(--wing-u) * 2384);
  width:calc(var(--wing-u) * 8192);height:calc(var(--wing-u) * 4768);
}
.wing-pan #wingCamera,.wing-pan .wing-scene{
  transition:transform var(--wing-time) var(--wing-ease);
}
.wing-pan #wingCamera,.wing-pan .wing-scene{transform:translate3d(var(--wing-world),0,0)}
.wing-pan #wingLens{overflow:clip;transition:filter var(--wing-time) var(--wing-ease)}
.wing-pan:not([data-wing="home"]) #wingLens{filter:blur(4px) brightness(.8)}
.wing-pan #workSceneHud{pointer-events:none}
.wing-pan .room-header,.wing-pan .room-menu-toggle,.wing-pan .room-nav{pointer-events:auto}
.wing-scene{
  position:absolute;top:0;bottom:0;z-index:1;box-sizing:border-box;
  display:flex;align-items:stretch;pointer-events:none;
  --edge-gap:max(1.85vw,env(safe-area-inset-left),env(safe-area-inset-right));
  --paper-width:min(26.5vw,calc(min(var(--w-left),var(--w-right)) - 2 * var(--edge-gap)));
  padding:max(14dvh,calc(var(--header-edge) + 54px),calc(env(safe-area-inset-top) + 64px)) var(--edge-gap) var(--room-footer-edge);
}
.wing-scene[hidden]{display:none}
/* Attach the sheet to the real edge of the central plate, not the window's
   edge: on a phone a large part of that centre is initially outside view. */
#wing-process{left:calc(50% + var(--wing-u) * 4096);width:var(--w-right);justify-content:flex-end}
#wing-about{right:calc(50% + var(--wing-u) * 4096);width:var(--w-left);justify-content:flex-start}
.wing-sheet{
  width:var(--paper-width);max-width:100%;height:100%;max-height:100%;pointer-events:auto;
  border-radius:clamp(12px,1.18vw,25px);overflow:hidden;
  background:linear-gradient(145deg,rgba(255,245,221,.65),rgba(247,229,199,.58));
  border:1px solid rgb(255 241 209 / .38);
  box-shadow:0 4px 14px rgb(36 16 5 / .14),inset 0 1px 1px rgb(255 255 255 / .28);
}
.wing-scene .wing-sheet:focus{outline:none}
.wing-scene[inert] .wing-sheet{pointer-events:none}
@media (max-width:820px), (pointer:coarse), (max-aspect-ratio:6/5){
  .wing-scene{
    --edge-gap:max(clamp(6px,1.25vw,12px),env(safe-area-inset-left),env(safe-area-inset-right));
    --paper-width:calc(min(var(--w-left),var(--w-right)) - 2 * var(--edge-gap));
    padding-top:max(10dvh,calc(env(safe-area-inset-top) + 64px));
  }
  .wing-pan .room-header.is-mobile-menu-open .room-nav{
    border-radius:12px;background:rgb(49 29 18 / .97);box-shadow:0 4px 16px #26170c66;
  }
}
@media (max-height:510px) and (orientation:landscape){.wing-scene{padding-top:max(54px,env(safe-area-inset-top) + 47px)}}
@media (prefers-reduced-motion:reduce){.room{--wing-time:0ms}}
