/* EmmaCraft LiveBuild Shuttle Layer – added 2026-10-24, original galaxy untouched */
#ecLaunchFilm{position:fixed;inset:0;z-index:100;overflow:hidden;background:#03050e;color:white;display:grid;place-items:center}
#ecLaunchFilm[hidden],#ecReplayFilm[hidden],#ecTablet[hidden],#ecDock[hidden]{display:none!important}
#ecLaunchFilm video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#03050e}
#ecLaunchFilm::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#0006,transparent 32%,transparent 75%,#020411a3)}
#ecFilmTop{position:absolute;z-index:2;top:clamp(18px,3vw,35px);left:clamp(16px,3vw,42px);text-shadow:0 2px 14px #000;font:800 clamp(13px,1.7vw,21px)/1.3 system-ui,sans-serif;letter-spacing:.08em}
#ecFilmTop small{display:block;color:#e8cef7;font-size:clamp(10px,1vw,12px);letter-spacing:.12em}
#ecFilmControls{position:absolute;z-index:2;right:clamp(12px,3vw,36px);bottom:clamp(16px,3vw,34px);display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
#ecFilmControls button,#ecReplayFilm,#ecDock{color:#fff;background:#15132ce8;border:1px solid #ff8fd7;border-radius:999px;padding:12px 17px;cursor:pointer;font:800 12px system-ui,sans-serif;box-shadow:0 0 18px #fd5ac635;min-height:44px}
#ecFilmControls button:hover,#ecReplayFilm:hover,#ecDock:hover{background:#702a77}
#ecFilmControls button:focus-visible,#ecReplayFilm:focus-visible,#ecDock:focus-visible,#ecTablet button:focus-visible{outline:3px solid #ffe193;outline-offset:3px}
#ecFlightFrame{position:fixed;inset:0;z-index:4;pointer-events:none;background:url('/v4/EmmaCraft_Shuttle_Cockpit_Overlay.png') center center / 100% 100% no-repeat;opacity:.12;transition:opacity .55s ease;will-change:opacity}
body.ecFlight #ecFlightFrame{opacity:1}
body.ecFlight .topbar{opacity:0;visibility:hidden;pointer-events:none!important}
body.ecFlight .intro{opacity:0!important;pointer-events:none!important}
body.ecFlight .cockpit{display:none}
body.ecFlight .focus{opacity:.7;top:8px;z-index:5;font-size:10px}
body.ecFlight .tour-progress{opacity:0;pointer-events:none}
body.ecFlight #ecReplayFilm{display:none!important}
#ecReplayFilm{position:fixed;right:16px;bottom:18px;z-index:11;opacity:.89}
#ecDock{position:fixed;top:clamp(9px,1.2vw,18px);right:clamp(9px,1.4vw,22px);z-index:16;border-color:#9df9ff;background:#090d1ee8}
#ecTablet{position:fixed;left:41.3%;top:56.5%;width:17.1%;height:14.9%;z-index:15;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-around;gap:3px;padding:5px 5px 8px;color:#aeeeff;background:radial-gradient(ellipse at center,#132e5eef,#02091fe8);border-radius:8px;font:800 clamp(7px,.67vw,11px) system-ui,sans-serif;box-shadow:inset 0 0 14px #39d6ff4d,0 0 10px #228cff44;pointer-events:auto;text-align:center}
#ecTablet .ecTabletTitle{display:flex;gap:5px;justify-content:center;align-items:center;color:#fff;text-shadow:0 0 8px #58d9ff;letter-spacing:.04em}
#ecTablet .ecTabletTitle em{color:#79ffaa;font-style:normal}
#ecTablet .ecTabletActions{display:flex;flex:1;gap:3px;min-height:0;justify-content:center;align-items:stretch}
#ecTablet button{flex:1;min-width:0;max-height:100%;padding:2px 1px;background:#153760;border:1px solid #6fdffc96;border-radius:4px;color:#fff;font:800 clamp(7px,.65vw,11px) system-ui,sans-serif;cursor:pointer}
#ecTablet button:hover{background:#285e90}
body.ecFlight #ecTablet,body.ecFlight #ecDock{display:flex!important}
@media (orientation:portrait){
 #ecFlightFrame{background-size:auto 100%;opacity:.10}
 body.ecFlight #ecFlightFrame{opacity:.96}
 #ecTablet{left:8%;right:8%;width:auto;top:auto;bottom:14px;height:68px;min-height:68px;padding:7px 8px;box-shadow:0 0 18px #4bc7ff88}
 #ecTablet .ecTabletActions{gap:7px}
 #ecTablet button{font-size:11px}
 #ecDock{top:7px;right:7px;padding:8px 10px;font-size:11px}
 #ecReplayFilm{bottom:10px;right:10px}
}
@media(prefers-reduced-motion:reduce){#ecFlightFrame{transition:none}}

/* The existing 2D page controls retract when the pilot enters the cockpit. */
body.ecFlight .bottom-ui,body.ecFlight .world-menu,body.ecFlight #back{display:none!important}

/* FOREMAN 2026-10-25 — The cockpit is always the interface.
   Darker at the 2D homepage, fully visible when Free Flight begins. */
#ecFlightFrame{
  background-color:transparent;
  opacity:.98;
  filter:brightness(.50) saturate(.90);
  transition:filter .4s ease,opacity .4s ease;
}
body.ecFlight #ecFlightFrame{
  opacity:1;filter:none;
}
/* All current page information stays in the windshield, not behind the dashboard. */
body:not(.ecFlight) .intro{
  left:50%;right:auto;top:14%;bottom:auto;
  transform:translateX(-50%);
  width:min(66vw,880px);
  max-height:42%;
  padding:14px 22px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  background:linear-gradient(110deg,#050719bf,#08071c9c);
  border:1px solid #ffc9e044;
  border-radius:15px;
  box-shadow:0 10px 40px #0008;
  text-align:center;
}
body:not(.ecFlight) .intro.out{transform:translate(-50%,25px)}
body:not(.ecFlight) .intro .galaxy-title{font-size:clamp(30px,3.9vw,59px);margin:4px auto 9px}
body:not(.ecFlight) .intro .title-slice{margin:0 auto}
body:not(.ecFlight) .intro>p{font-size:clamp(10px,.85vw,12px);line-height:1.5;max-width:740px;margin:6px auto 10px}
body:not(.ecFlight) .intro .vision-tagline{justify-content:center;margin:3px auto 9px}
body:not(.ecFlight) .intro-actions{justify-content:center;gap:7px}
body:not(.ecFlight) .intro-actions>*{min-height:41px;padding:7px 12px}
body:not(.ecFlight) #issShowcase{margin:10px auto!important;padding:7px 12px!important;font-size:10px}
body:not(.ecFlight) .intro-counter{margin-top:8px;font-size:9px;line-height:1.6}
body:not(.ecFlight) .topbar{background:linear-gradient(#07091bdc,#07091b00)}
body:not(.ecFlight) .focus{top:auto;bottom:21%;background:#101329ee}
body:not(.ecFlight) .bottom-ui{bottom:9px}
body:not(.ecFlight) .cockpit{display:none}
body.ecFlight .intro{opacity:0!important;pointer-events:none!important}
#ecViewToggle{
 position:fixed;top:clamp(6px,1.3vw,18px);left:clamp(8px,2vw,25px);
 z-index:16;border:1px solid #85f0ff;border-radius:12px;
 color:#fff;background:#071527ed;min-height:44px;padding:9px 15px;
 font:800 11px system-ui;letter-spacing:.05em;
}
#ecViewToggle[hidden],#ecChaseShip[hidden],#ecLiftButtons[hidden],#ecFlightHelp[hidden]{display:none!important}
#ecViewToggle:focus-visible,#ecLiftButtons button:focus-visible{outline:3px solid #ffeab2;outline-offset:3px}
body.ecThird #ecFlightFrame{opacity:0;visibility:hidden}
body.ecThird #ecTablet{
 left:auto;right:12px;top:20%;height:124px;width:min(245px,33vw)
}
#ecChaseShip{
 position:fixed;z-index:4;pointer-events:none;
 left:50%;bottom:13%;transform:translateX(-50%);
 width:min(59vw,690px);height:52%;
 object-fit:contain;filter:drop-shadow(0 18px 18px #050517af);
}
#ecLiftButtons{
 position:fixed;z-index:17;right:14px;bottom:90px;
 display:none;gap:7px;flex-direction:column;
}
#ecLiftButtons button{
 min-width:58px;min-height:52px;padding:8px 10px;
 border-radius:11px;border:1px solid #b6eaffbb;
 color:white;background:#111e36e8;font:800 12px system-ui;
 touch-action:none;user-select:none;
}
#ecLiftButtons button:active,.touch button:active{background:#b63a9f!important}
#ecFlightHelp{
 position:fixed;z-index:6;left:50%;transform:translateX(-50%);top:8px;
 color:#d1ecff;font:800 10px system-ui;letter-spacing:.08em;
 text-shadow:0 2px 5px black;pointer-events:none;
}
body.ecFlight .focus{top:60px;bottom:auto;left:50%;z-index:7;background:#080b19bb}
body.ecFlight .world-menu{display:none}
@media(max-width:1050px),(pointer:coarse){
 body:not(.ecFlight) .intro{top:14%;width:min(75vw,760px);max-height:42%;padding:10px 12px}
 body:not(.ecFlight) .intro .galaxy-title{font-size:clamp(23px,4vw,42px)}
 body.ecFlight .touch{
  display:grid!important;left:12px;bottom:14px;
  grid-template-columns:repeat(3,53px);grid-template-rows:repeat(2,53px);gap:6px;
  z-index:17
 }
 body.ecFlight .touch button{min-height:52px;min-width:52px;font-size:18px;border-radius:12px;background:#0e1b38e9}
 body.ecFlight #ecLiftButtons{display:flex;bottom:14px;right:10px}
 body.ecFlight #ecTablet{z-index:15;left:33%;top:auto;bottom:16px;width:34%;height:113px;padding:6px}
 body.ecFlight #ecTablet button{font-size:clamp(10px,1.5vw,14px);min-height:45px}
 body.ecFlight #ecDock{right:9px;top:7px}
 body.ecFlight #ecViewToggle{left:9px;top:7px}
 body.ecFlight #ecFlightHelp{display:none}
}
@media(max-width:650px){
 #ecFlightFrame{background-position:center center;background-size:auto 100%}
 body:not(.ecFlight) .topbar{top:0;height:55px;padding:0 8px}
 body:not(.ecFlight) .topbar .brand b{font-size:15px}
 body:not(.ecFlight) .topbar nav{
  position:fixed;top:55px;left:7px;right:7px;overflow-x:auto;max-width:calc(100% - 14px);
  padding-bottom:3px;justify-content:center;gap:4px
 }
 body:not(.ecFlight) .topbar nav>*{flex:0 0 auto;min-height:36px}
 body:not(.ecFlight) .intro{
  top:101px;left:6px;right:6px;transform:none;
  width:auto;max-height:calc(65% - 112px);padding:8px 10px;
  border-radius:12px
 }
 body:not(.ecFlight) .intro.out{transform:translateY(20px)}
 body:not(.ecFlight) .intro .galaxy-title{font-size:clamp(25px,8vw,41px);margin:4px auto 6px}
 body:not(.ecFlight) .intro .eyebrow{font-size:9px}
 body:not(.ecFlight) .intro .vision-tagline{font-size:8px;line-height:1.4}
 body:not(.ecFlight) .intro>p{font-size:10px;line-height:1.35;margin:6px auto}
 body:not(.ecFlight) .intro-actions>*{min-height:44px;padding:8px 9px;font-size:9px}
 body:not(.ecFlight) #issShowcase{margin:7px auto!important;padding:7px!important}
 body:not(.ecFlight) .intro-counter{font-size:8px}
 body:not(.ecFlight) .focus{bottom:16%;max-width:94%;font-size:9px}
 body:not(.ecFlight) .world-menu{top:auto;bottom:77px;right:8px}
 body.ecFlight #ecTablet{
  left:5%;right:5%;width:90%;height:74px;bottom:141px;top:auto;
  padding:5px 8px;border:1px solid #74dafa
 }
 body.ecFlight #ecTablet .ecTabletActions{gap:7px}
 body.ecFlight #ecTablet button{font-size:11px;min-height:43px}
 body.ecThird #ecTablet{left:5%;right:5%;width:90%;top:auto;height:74px;bottom:141px}
 body.ecFlight .touch{left:5px;bottom:12px;grid-template-columns:repeat(3,49px);grid-template-rows:repeat(2,49px);gap:5px}
 body.ecFlight .touch button{min-width:49px;min-height:49px;font-size:17px}
 body.ecFlight #ecLiftButtons{right:5px;bottom:12px;gap:4px}
 body.ecFlight #ecLiftButtons button{min-width:63px;min-height:48px;font-size:11px;padding:4px}
 #ecChaseShip{width:90vw;height:39%;bottom:26%}
 body.ecFlight .focus{top:64px;left:50%;max-width:92%;z-index:6}
}
@media(max-height:430px) and (orientation:landscape){
 body:not(.ecFlight) .intro{top:11%;max-height:58%}
 body.ecFlight #ecTablet{height:74px;bottom:12px;left:31%;width:38%}
 body.ecFlight #ecTablet button{font-size:10px}
 body.ecThird #ecTablet{top:auto;right:auto;bottom:12px;left:31%;width:38%;height:74px}
 body.ecFlight .touch{grid-template-columns:repeat(3,46px);grid-template-rows:repeat(2,46px)}
 body.ecFlight .touch button{min-height:46px;min-width:46px}
 body.ecFlight #ecLiftButtons button{min-height:44px}
 body.ecFlight .focus{top:56px}
}
@media(prefers-reduced-motion:reduce){#ecFlightFrame{transition:none}}
/* Never show driving pads while the visitor is reading the 2D homepage. */
body:not(.ecFlight) #touchControls,body:not(.ecFlight) #ecLiftButtons{display:none!important}
