/* Restore the original centred 16:9 stage. Orientation changes presentation only. */
#app{--nna-viewport-height:100vh;--nna-stage-space-width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));--nna-stage-space-height:calc(var(--nna-viewport-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));display:block;width:100%;height:var(--nna-viewport-height);padding:0;background:radial-gradient(ellipse at center,#17143a,#030713 78%)}
@supports(height:100dvh){#app{--nna-viewport-height:100dvh}}
#app #stage,#app #stage.menuViewportMode{position:absolute;left:calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right))/2);top:calc(50% + (env(safe-area-inset-top) - env(safe-area-inset-bottom))/2);width:min(var(--nna-stage-space-width),calc(var(--nna-stage-space-height)*16/9));height:min(var(--nna-stage-space-height),calc(var(--nna-stage-space-width)*9/16));aspect-ratio:16/9;transform:translate(-50%,-50%);transform-origin:center center;container-type:inline-size;isolation:isolate}
@media(orientation:portrait){
  #app #stage,#app #stage.menuViewportMode{width:min(var(--nna-stage-space-height),calc(var(--nna-stage-space-width)*16/9));height:min(var(--nna-stage-space-width),calc(var(--nna-stage-space-height)*9/16));transform:translate(-50%,-50%) rotate(90deg)}
}
#stage .screen{transition:none}
#stage .finalOrionVideo,#stage .finalOrionImage{transition:none;object-fit:contain}
#stage .endingCrew.firstCut.active{transition:none}
#stage .endingOrion{display:none}
.cinematicRetry{position:absolute;z-index:150;bottom:7%;left:50%;transform:translateX(-50%);padding:14px 20px;border-radius:999px;border:1px solid #b3eee7;background:#173e55;color:#f3fff8;font-size:clamp(12px,1.4cqw,22px)}
#stage button:focus-visible{outline:3px solid #b3f6ef!important;outline-offset:4px}
#stage .hidden{display:none!important}

/* The supplied illustration already contains the title and studio mark. */
#stage .coverGalaxy{object-fit:cover;filter:brightness(.46) saturate(.7)}
#stage .coverArtwork{object-fit:contain!important}
#stage .menuStartButton{position:absolute!important;left:auto!important;right:8%!important;top:auto!important;bottom:8%!important;width:31%!important;height:11%!important;min-height:36px!important;margin:0!important;padding:0 1.6cqw!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:1cqw!important;border:1px solid #a5f4ea!important;border-radius:999px!important;background:linear-gradient(180deg,#296b83,#16405d)!important;color:#f0fff9!important;box-shadow:0 7px 30px #0008,inset 0 1px 0 #d2fff966!important;font:800 clamp(13px,1.65cqw,26px)/1.1 system-ui,sans-serif!important;letter-spacing:.09em!important;transform:none!important;animation:none!important;clip-path:none!important}
#stage .menuStartButton:hover{filter:brightness(1.17)}
#stage .menuStartButton:active{scale:.98}
#stage .menuStartButton:before,#stage .menuStartButton:after{display:none!important}
#stage .menuGrownUpsButton{position:absolute!important;left:2%!important;right:auto!important;bottom:2.5%!important;top:auto!important;width:auto!important;height:auto!important;min-height:32px!important;padding:9px 13px!important;display:flex!important;align-items:center!important;gap:7px!important;border:1px solid #bdd7fa55!important;background:#071128c9!important;color:#d3e0ef!important;border-radius:10px!important;box-shadow:none!important;clip-path:none!important;font:650 clamp(9px,1cqw,15px)/1 system-ui!important;letter-spacing:.04em!important;transform:none!important}

/* Three bedtime choices. Numbers stay secondary to the friendly names. */
#stage .quickPlanOverlay{z-index:110;position:absolute;inset:0;padding:0;display:block;background:#080d20}
.missionSky{position:absolute;inset:0;background:linear-gradient(180deg,#071229b3,#070c1dee 55%),url('assets/images/nighty-night-aliens-menu-hero.avif') center/cover}
#stage .quickPlanCard{position:absolute;inset:0;width:100%;height:100%;max-height:none;overflow:auto;padding:3.1cqw 5cqw 1.6cqw;border:0;border-radius:0;background:transparent;box-shadow:none;color:#f5f4ee}
.missionHeading{text-align:center;margin-bottom:2.3cqw}
#stage .nightPlanKicker{color:#8bd8d7;font:700 clamp(8px,.86cqw,14px)/1.3 system-ui;letter-spacing:.19em}
#stage .missionHeading .nightPlanKicker{display:block;border:0;background:none;padding:0;margin:0}
.missionHeading h1{font:500 clamp(23px,3.6cqw,57px)/1.12 Georgia,serif;margin:.65cqw 0 .55cqw;letter-spacing:-.025em;color:#fff4dc}
.missionHeading p{margin:0;font:400 clamp(11px,1.15cqw,18px)/1.4 system-ui;color:#bcc8df}
.missionCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.7cqw}
.missionCard{position:relative;display:flex;flex-direction:column;text-align:left;overflow:hidden;padding:0;border:1px solid #778ec052;border-radius:1.6cqw;background:linear-gradient(155deg,#203458,#111c37);color:#f5f4ef;box-shadow:0 10px 30px #0004;cursor:pointer;transition:transform .2s,border-color .2s}
.missionCard:hover{transform:translateY(-3px);border-color:#a3e3e1}
.missionCard img{width:100%;height:14cqw;object-fit:cover;display:block;pointer-events:none}
.missionCard:first-child img{object-position:35% center}
.missionCopy{display:flex;flex-direction:column;padding:1.4cqw 1.6cqw 1cqw;gap:.6cqw}
.missionEyebrow{color:#9cdad8;font:700 clamp(7px,.76cqw,12px)/1.2 system-ui;letter-spacing:.1em}
.missionCopy strong{font:500 clamp(15px,2cqw,32px)/1.15 Georgia,serif;color:#fff5df;white-space:nowrap}
.missionCount{color:#bbc9df;font:400 clamp(10px,1.05cqw,17px)/1.2 system-ui}
.missionAction{display:flex;justify-content:space-between;align-items:center;margin:0 1.6cqw;padding:1.1cqw 0 1.3cqw;border-top:1px solid #bccff121;color:#c0f1e7;font:650 clamp(10px,1.1cqw,18px)/1 system-ui}
.missionCard.locked .missionAction{color:#b9c7df}
.missionCard.locked .missionAction>span:last-child{font-size:0;width:12px;height:10px;border:1.5px solid currentColor;border-radius:2px;position:relative;margin-top:4px}
.missionCard.locked .missionAction>span:last-child:before{content:"";position:absolute;width:6px;height:6px;left:1.5px;top:-7px;border:1.5px solid currentColor;border-bottom:0;border-radius:5px 5px 0 0}
.missionFooter{display:flex;align-items:center;justify-content:space-between;margin-top:1.8cqw;gap:12px}
.missionFooter p{font-size:clamp(9px,.96cqw,15px);color:#aab9ce;margin:0}
#stage .quietButton{border:1px solid #a9c7ee3d;border-radius:9px;padding:10px 14px;background:#0c1930;color:#cadbee;font:600 clamp(10px,1.05cqw,16px)/1.2 system-ui;cursor:pointer}
.missionLockNotice{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:12%;background:#091327f5;text-align:center;font:500 clamp(20px,3cqw,46px)/1.35 Georgia,serif;z-index:10}
#stage .parentCloseButton{top:1.3cqw;right:1.5cqw;min-width:32px;min-height:32px;width:3cqw;height:3cqw;border:1px solid #a9c7ee55;background:#0c1930;color:#e9f3ff;border-radius:50%;font:400 clamp(20px,2cqw,30px)/1 system-ui;box-shadow:none}

/* Parent pages share a single calm panel; account fields only appear on Restore. */
#stage .parentGateOverlay,#stage .grownUpsOverlay{background:#050b1ccf;backdrop-filter:blur(9px);z-index:120;padding:2cqw}
#stage .parentGateCard,#stage .grownUpsCard{color:#e8edf4;background:linear-gradient(145deg,#182b47,#0c162d);border:1px solid #8aa7d05c;box-shadow:0 20px 80px #0006;border-radius:22px}
#stage .grownUpsCard{width:80%;max-width:1050px;max-height:100%;padding:2.6cqw;overflow:auto}
#stage .grownUpsHeader{margin-bottom:1.5cqw;padding-right:3cqw;align-items:center}
#stage .grownUpsHeader h2{color:#fff0d7;font:500 clamp(24px,3cqw,43px)/1.2 Georgia,serif;margin:.4cqw 0}
#stage .parentGateKicker{color:#9edbd5;font:700 clamp(8px,.85cqw,13px)/1.3 system-ui;letter-spacing:.12em}
#stage .accessBadge{font:650 clamp(9px,.86cqw,14px)/1 system-ui;color:#c2e7e4;background:#103641;border:1px solid #75c5c14d;box-shadow:none;padding:9px 12px}
.parentHome{display:grid;grid-template-columns:1fr 1fr;gap:1cqw}
.parentHome>button{display:flex;align-items:center;gap:1.3cqw;text-align:left;padding:1.7cqw;border:1px solid #8aa7d03d;border-radius:14px;background:#1e3453a3;color:#e9f2fb;cursor:pointer;min-height:75px}
.parentHome>button>span{font-size:clamp(22px,2.8cqw,40px);color:#9de1d8}
.parentHome>button div{flex:1}
.parentHome strong{display:block;font-size:clamp(13px,1.5cqw,23px);font-weight:600}
.parentHome small{display:block;margin-top:.5cqw;color:#aebed4;font-size:clamp(10px,1cqw,16px);line-height:1.45}
.parentHome b{font-size:24px;font-weight:400;color:#a6bfd8}
.parentHome>button:hover{background:#294563}
.parentPage h3{font-family:Georgia,serif;font-weight:400;font-size:clamp(20px,2.1cqw,30px);color:#fff0d7;margin:1.2cqw 0}
.parentPage p{line-height:1.55;color:#becbdf}
#stage .parentBack{margin-bottom:1cqw}
#stage .accessTierGrid{grid-template-columns:repeat(3,1fr);gap:1cqw}
#stage .accessTierCard{padding:0 0 1.2cqw;overflow:hidden;display:flex;flex-direction:column;gap:8px;border:1px solid #809cc94d;border-radius:12px;background:#142842;box-shadow:none;color:#dfebfb}
.accessTierCard img{width:100%;height:10cqw;object-fit:cover}
#stage .accessTierCard strong,#stage .accessTierCard span,#stage .accessTierCard small{padding:0 1cqw}
#stage .accessTierCard strong{color:#fff0d7;font-size:clamp(14px,1.6cqw,23px)}
#stage .accessTierCard span{font-size:clamp(10px,.98cqw,15px);color:#b9c9df}
.accessTierCard small{color:#9edbd5;font-size:clamp(10px,1cqw,16px)}
#stage .accessTierCard.current:after{display:none}
#stage .accessTierCard.current{border-color:#8be0d3}
#stage .accessFoundationNote{font-size:clamp(11px,1cqw,16px);color:#b9c9df;line-height:1.6}
#stage .saveGrownUpsButton,#stage .parentHoldButton{background:linear-gradient(180deg,#2a6e80,#184555)!important;color:#effff9!important;border:1px solid #9bdddb8c!important;box-shadow:none!important;min-height:40px}
#stage .parentHoldProgress{background:#a0f1df33}
#stage .nightModeCard.selected,#stage .alienCountButton.selected{background:#244f61;border-color:#9bdddb;color:#edfff9;box-shadow:none}
#stage .nightPlanPanel,#stage .accessSection,#stage .supabaseAccessPanel{background:transparent;border:0;box-shadow:none;padding:0}
#stage .nightModeCard,#stage .alienCountButton{color:#d3dfed;background:#12253e;border-color:#7189a74d}
#stage .supabaseEmailInput,#stage .supabaseOtpInput{min-height:44px;font-size:16px;background:#09152c;color:#e7f2ff;border:1px solid #819cb659}
#stage .grownUpsPlan .nightPlanFieldset{margin-top:1cqw}
#stage .grownUpsPlan .nightModeCard{min-height:55px}
#stage .grownUpsPlan .alienCountButton{width:auto;min-width:40px;height:40px}
#stage .grownUpsPlan .nightEstimate{margin-top:1cqw}
#stage .grownUpsPlan .rememberChoiceRow{margin:1cqw 0}
#stage .grownUpsPlan .nightPlanFieldset legend{font:650 clamp(12px,1.2cqw,18px)/1.4 system-ui}
#stage .grownUpsPlan .nightModeTitle{font:650 clamp(12px,1.35cqw,21px)/1.4 system-ui}
#stage .grownUpsPlan .nightModeSub{font:400 clamp(10px,.95cqw,15px)/1.4 system-ui}
#stage .grownUpsPlan .nightEstimate,#stage .grownUpsPlan .rememberChoiceRow{font-size:clamp(11px,1.05cqw,17px);line-height:1.5}
#stage .grownUpsPlan .nightPlanKicker{background:none;border:0;padding:0}
#stage .supabaseCodeRow{display:flex;gap:10px;margin:12px 0}
#stage .supabaseOtpInput{width:100%;min-width:0;flex:1;border-radius:10px;padding:10px 14px}
#stage .supabaseVerifyCodeButton{min-width:145px;font-size:clamp(12px,1.2cqw,19px);padding:10px 16px;border-radius:10px}
#stage .supabaseSendLinkButton{font-size:clamp(12px,1.2cqw,19px)}
#stage .supabaseStatus,#stage .supabaseHelp{font-size:clamp(12px,1.2cqw,18px)}

.orientationPrompt{display:flex;position:absolute;inset:0;z-index:300;overflow:auto;flex-direction:column;align-items:center;justify-content:center;padding:10%;text-align:center;color:#edf4ff;background:radial-gradient(ellipse at 50% 30%,#273762,#0a1227 65%)}
.orientationPrompt[hidden]{display:none}
.orientationPrompt img{width:120%;max-width:620px;border-radius:20px;box-shadow:0 12px 45px #0004;margin-bottom:8vw}
.rotateDevice{font:300 60px/1 system-ui;color:#a2e3dc}
.orientationPrompt h1{font:400 clamp(30px,8vw,56px)/1.14 Georgia,serif;color:#fff0d7;margin:20px 0}
.orientationPrompt p{font:400 clamp(13px,3.8vw,19px)/1.7 system-ui;color:#c1cde1}
.orientationPromptDismiss{flex-shrink:0;margin-top:16px;padding:13px 24px;border:1px solid #a5f4ea;border-radius:999px;background:linear-gradient(180deg,#296b83,#16405d);color:#f0fff9;font:800 13px/1.2 system-ui,sans-serif;letter-spacing:.06em;cursor:pointer}
.orientationPromptDismiss:focus-visible{outline:3px solid #b3f6ef;outline-offset:4px}
@media(orientation:landscape){.orientationPrompt{display:none}}
@media(max-height:460px) and (orientation:landscape){
  #stage .quickPlanCard{padding-top:2cqw}
  .missionHeading{margin-bottom:1.5cqw}
  .missionCard img{height:13cqw}
  #stage .grownUpsCard{width:92%;padding:2cqw 3cqw}
  .parentHome>button{min-height:65px;padding:1.4cqw}
  #stage .parentGateCard{max-height:100%;overflow:auto;padding:18px 30px}
  #stage .parentGateCard h2{font-size:24px}
  #stage .parentGateCard p{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.missionCard{transition:none}.missionCard:hover{transform:none}}

/* Explicit optional playback mode; existing stage and controls are unchanged. */
#stage .menuAutoplayButton{left:auto!important;right:42%!important;bottom:8%!important;min-height:24px!important;padding:6px 13px!important}
