[hidden] { display: none !important; }
.base-shell { width: min(100%, calc(100svh * 1672 / 941)); position: relative; }
.viewport { width: 100%; }
.guide-robot { position: absolute; left: 50%; bottom: 4.8%; width: 16.4%; aspect-ratio: 1;
  transform: translateX(-50%); padding: 0; border: 0; background: transparent;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.guide-robot::before { content: ''; position: absolute; bottom: -1%; left: -18%; width: 111%; height: 13%;
  background: radial-gradient(ellipse, #100c14bb 5%, #1a132180 43%, transparent 70%); transform: rotate(-5deg); }
.guide-robot > span { position: absolute; pointer-events: none; }
.guide-tracks, .guide-head { inset: 0; background: url('/assets/lunar-guide.webp') center / contain no-repeat; }
.guide-tracks { clip-path: inset(32% 0 0 0); }
.guide-head { clip-path: inset(0 0 67.8% 0); transform-origin: 50% 32%;
  transform: perspective(480px) rotateY(var(--head-y,0deg)) rotateZ(var(--head-z,0deg));
  transition: transform .65s ease-in-out; }
.guide-emitter { top: 52.8%; left: 50.1%; width: 5.5%; height: 1%; transform: translate(-50%,-50%);
  border-radius: 50%; background: #ff9b77; opacity: .58; }
.guide-robot:focus-visible { outline: 2px solid #a4e7e5; outline-offset: 5px; border-radius: 35%; }
.scene[data-guide="scanning"] .guide-head { animation: guide-look 1.6s ease-in-out both; }
.scene:is([data-guide="scanning"],[data-guide="tour"]) .guide-emitter {
  opacity: 1; background: #ffd9be; box-shadow: 0 0 5px 2px #ff5d38,0 0 12px 3px #ff43244f;
}
@keyframes guide-look {
  0% { transform: perspective(450px) rotateY(-15deg) rotateZ(-3deg); }
  58% { transform: perspective(450px) rotateY(16deg) rotateZ(2deg); }
  100% { transform: perspective(450px) rotateY(0) rotateZ(0); }
}
.guide-optics { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.guide-console { position: absolute; z-index: 3; left: 2%; bottom: 2.4%; width: min(36%, 31rem);
  padding: clamp(10px,1vw,18px) clamp(14px,1.2vw,21px); color: #f2f3ec;
  border: 1px solid #7fb0b366; border-radius: 10px; background: linear-gradient(135deg,#101b25f5,#101822ee);
  box-shadow: 0 7px 26px #090c1240; font: 500 clamp(14px,1.06vw,17px)/1.35 system-ui,sans-serif; }
.guide-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.guide-call { display: inline-flex; gap: .5em; align-items: center; font: 650 .73em/1.2 ui-monospace,monospace;
  letter-spacing: .11em; text-transform: uppercase; color: #a4dedf; }
.guide-call i { width: .58em; height: .58em; border-radius: 50%; background: #7de3dc; box-shadow: 0 0 7px #73d5ca66; }
.guide-console h2 { font: 620 1.1em/1.18 system-ui,sans-serif; color: #ffe3b6; margin: .35em 0; }
.guide-console p { margin: .3em 0 .6em; }
.guide-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .42em; }
.guide-console button { border: 1px solid #6e899580; border-radius: 6px; background: #1a2a36; color: #eff7f5;
  padding: .49em .68em; font: 600 .88em/1.15 system-ui,sans-serif; min-height: 36px; cursor: pointer; }
.guide-console .guide-primary { background: #a8e1da; color: #132d34; border-color: #bffaf2; }
.guide-console .guide-utility { border: 0; color: #d8e5e5; background: transparent; padding: .25em .2em; min-height: 30px; font-size: .8em; }
.guide-console button:hover { filter: brightness(1.2); }
.guide-console button:focus-visible { outline: 2px solid #b2ffef; outline-offset: 2px; }
.rocket { z-index: 2; }
.base-contact {
  position:absolute;z-index:9;top:max(.5rem,1.4%,env(safe-area-inset-top));left:max(.65rem,1.6%,env(safe-area-inset-left));
}
.viewport:has(.scene[data-burning]) .base-contact {visibility:hidden;}
.scene[data-burning] .guide-optics { opacity: 0; }
@media (max-width: 900px), (max-height: 570px) {
  .base-shell { width: 100%; }
  .guide-console { position: relative; inset: auto; width: min(100% - 1.3rem, 35rem);
    margin: .65rem auto; padding: 12px 15px; font-size: 16px; }
  .guide-console button { min-height: 44px; }
}
@media (max-width:600px) { .guide-robot { width: 20%; bottom: 3.4%; } }
@media (prefers-reduced-motion: reduce) {
  .guide-head, .scene[data-guide="scanning"] .guide-head { animation: none; transition: none; }
}
.guide-belt { inset:0;overflow:hidden; }
.left-belt { clip-path:polygon(10.5% 57.7%,20.7% 57.7%,23% 61.5%,18.6% 96.2%,5.1% 96.2%,2.3% 86%); }
.right-belt { clip-path:polygon(79.3% 57.7%,89.4% 57.7%,97.6% 86%,95.7% 96.2%,81.4% 96.2%,77.8% 62%); }
.guide-belt::after { content:'';position:absolute;inset:0;background:url('/assets/lunar-guide.webp') center/contain no-repeat; }
.guide-projector { left:37.7%;top:60%;width:4%;height:3%;border-radius:50%; }
.scene:has(.holo-screen:not([hidden])) .guide-projector { background:#d6ffff;box-shadow:0 0 5px 2px #73f7ff,0 0 13px 3px #3fffff99; }
.holo-screen { position:absolute;left:7%;bottom:32%;width:33%;min-height:15%;padding:.65em .9em;
  display:grid;align-content:center;gap:.35em;pointer-events:none;
  border:1px solid #91f8fba8;border-left:3px solid #92ffff;
  color:#edffff;text-shadow:0 0 5px #2ca4ac,0 2px 4px #092127;
  background:repeating-linear-gradient(0deg,#71eaf90a 0 1px,transparent 1px 4px),linear-gradient(110deg,#093440e8,#094555ba 65%,#18718294);
  box-shadow:0 0 17px #41efff3a,inset 0 0 15px #6de5fa20;
  font:540 clamp(13px,1.6vw,25px)/1.25 system-ui,sans-serif; }
.holo-screen strong { font:650 .62em/1.1 ui-monospace,monospace;letter-spacing:.14em;color:#99ffff; }
@media(max-width:600px){.holo-screen{left:2%;width:39%;bottom:29%;font-size:clamp(12px,3.2vw,16px);padding:.38em .46em;}}
@media(prefers-reduced-motion:no-preference){
 .scene[data-rolling] .guide-robot { animation:guide-roll 2.55s ease-in-out both;transform-origin:50% 92%; }
 .scene[data-rolling] .guide-belt::after { animation:tread-cycle .16s linear 7,tread-reverse .17s linear 7 1.15s; }
 .scene[data-rolling] .guide-head { animation:camera-align 2.55s ease-in-out both; }
 .holo-screen { animation:project-screen .32s ease-out both; transform-origin:right bottom; }
}
@keyframes guide-roll {0%,100%{transform:translate(-50%,0) scale(1)}40%{transform:translate(-49%,3%) scale(1.06)}80%{transform:translate(-50.7%,-1%) scale(.987)}}
@keyframes tread-cycle {from{transform:translateY(-.8%)}to{transform:translateY(1.4%)}}
@keyframes tread-reverse {from{transform:translateY(1.4%)}to{transform:translateY(-.8%)}}
@keyframes camera-align {0%,100%{transform:perspective(400px) rotateY(0)}36%{transform:perspective(400px) rotateY(-19deg) rotateZ(-3deg)}72%{transform:perspective(400px) rotateY(12deg) rotateZ(2deg)}}
@keyframes project-screen {from{opacity:.15}to{opacity:1}}

.volume-canvas{display:none;position:absolute;left:-16%;bottom:-8%;width:132%;height:150%;pointer-events:none}
.guide-robot[data-volume] .volume-canvas{display:block}
.guide-robot[data-volume]>span{visibility:hidden}
.menu-copy nav>a.model-link{background:transparent;color:#233b45;padding:.65em .1em;margin:0}

/* Centre the camera against a reserved track. Wrapped captions can extend
   below it without repositioning the camera, even during the silent finale. */
html { scrollbar-gutter: stable both-edges; }
.base-shell { --guide-space: 9rem; }
.base-shell:has(#base[data-guide]:not([data-guide="waiting"], [data-guide="idle"], [data-guide="scanning"])) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto var(--guide-space);
  align-items: start;
  width: min(100%, calc(max(12rem, 100svh - var(--guide-space)) * 1672 / 941));
}
.guide-console{position:relative;inset:auto;width:100%;margin:0;padding:.6rem clamp(.8rem,2vw,1.8rem) .75rem;
  display:grid;grid-template-columns:1fr auto;gap:.45rem 1rem;align-items:center;border-radius:0;
  background:#121b20;border:0;border-top:1px solid #385159;color:#e6f5f3;box-shadow:none}
.guide-top{justify-content:flex-start;gap:1.1rem}
.guide-top .guide-call{white-space:nowrap;font-size:.82rem}
.guide-actions{justify-content:flex-end}
.guide-console button{min-height:42px;font-size:.92rem}
#guide-caption{grid-column:1/-1;background:#10171b;border-left:2px solid #79d7d0;padding:.45rem .9rem;
  display:flex;align-items:baseline;gap:.85rem;min-height:3.2rem}
#guide-caption h2{flex:none;font:600 .86rem/1.45 system-ui,sans-serif;color:#bbbdb6;margin:0}
#guide-caption p{color:#a2efe3;font:500 clamp(1rem,1.35vw,1.2rem)/1.48 system-ui,sans-serif;margin:0;overflow-wrap:anywhere}
#station-panel{position:absolute;inset:0;z-index:4;display:grid;place-items:safe center;background:#071317d9;
  overflow:auto;padding:1rem;color:#e9f1ed}
.station-card{width:min(100%,32rem);background:#142226;border:1px solid #536c70;padding:clamp(1rem,3vw,2rem);border-radius:.65rem}
.station-card header{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.station-card h2{margin:0;font:600 1.55rem/1.2 system-ui}.station-card h3{font-size:1rem}
.station-card form,.station-card label{display:grid;gap:.45rem}.station-card form{gap:.9rem;margin-top:1rem}
.station-card input,.station-card textarea,.station-card button{font:inherit;border-radius:.35rem;min-height:42px;padding:.5rem .7rem}
.station-card input,.station-card textarea{width:100%;border:1px solid #5c757a;background:#0a151a;color:#fff}
.station-card button{border:1px solid #79908d;background:#d1e8de;color:#142822;cursor:pointer}
.station-card button:disabled{opacity:.55}
.station-card header button{background:transparent;color:#c7ddd9}
.station-status:empty{display:none}.station-status{color:#ffcfaa}
.station-plan li[aria-current]{font-weight:700;color:#96e7d8}
@media(max-width:760px){
 .base-shell { --guide-space: 14rem; }
 .guide-console{gap:.4rem;grid-template-columns:1fr;padding:.55rem .75rem}
 .guide-actions,.guide-top{justify-content:flex-start}.guide-actions{gap:.4rem}
 #guide-caption{display:block;padding:.45rem .65rem}#guide-caption h2{margin-bottom:.15rem}
 .guide-console button{min-height:44px}
 .viewport:has(#station-panel:not([hidden])){min-height:min(65svh,32rem);background:#0b171b}
}

/* In a short landscape window the rail can use the space beside the narrower
   picture for its text width, while remaining below the picture. */
@media (orientation: landscape) and (max-height: 570px) {
  .base-shell:has(#base[data-guide]:not([data-guide="waiting"], [data-guide="idle"], [data-guide="scanning"])) {
    --guide-space: 8.9rem;
    width: 100%;
  }
  .base-shell:has(#base[data-guide]:not([data-guide="waiting"], [data-guide="idle"], [data-guide="scanning"])) > .viewport {
    width: min(100%, calc(max(7rem, 100svh - var(--guide-space)) * 1672 / 941));
    justify-self: center;
  }
  .guide-console { grid-template-columns: minmax(0, 1fr) auto; }
  .guide-actions { justify-content: flex-end; }
}


/* Optical emitters are attached to the visor so the two rays follow its rotation. */
.guide-head .guide-emitter,.guide-head .guide-projector {position:absolute;top:12.8%;width:2.6%;height:2.6%;border-radius:50%;transform:translate(-50%,-50%)}
.guide-head .guide-emitter {left:77%}
.guide-head .guide-projector {left:23%}
