@font-face{font-family:DM;src:url('assets/dm-sans-713ca32c3c8b.woff2') format('woff2');font-display:swap}
:root{color-scheme:dark;--ivory:#f6f4ee;--pale:#b9d9e1;--ink:#10171b;--space:clamp(1.25rem,3.8vw,4.5rem);font-family:DM,Arial,sans-serif;color:var(--ivory);background:#090e14}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#090e14}button,textarea{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible,textarea:focus-visible{outline:2px solid #acf0ff;outline-offset:4px}button:disabled{cursor:wait;opacity:.65}[hidden]{display:none!important}
#room{position:relative;isolation:isolate;height:100svh;min-height:440px;overflow:hidden;background:#080d13}
#world,#gallery,#flat,#flat video,#flat img,.shade{position:absolute;inset:0;width:100%;height:100%}
#world{z-index:-1;overflow:hidden}#flat{background:#08121c}#flat video,#flat img{object-fit:cover}#flat img{z-index:1}#flat.showVideo img{visibility:hidden}#gallery{display:block;pointer-events:none}.has3d #flat{visibility:hidden}
.shade{background:linear-gradient(180deg,rgba(3,8,13,.65),transparent 18%,transparent 68%,rgba(3,8,13,.75)),linear-gradient(72deg,rgba(2,7,12,.83) 0%,rgba(4,10,14,.42) 26%,transparent 58%);pointer-events:none}
header,footer{position:absolute;left:var(--space);right:var(--space);display:flex;align-items:center;justify-content:space-between;z-index:3}
header{top:max(1.25rem,env(safe-area-inset-top));gap:.75rem}.brand{display:flex;align-items:center;gap:.72rem;text-transform:uppercase;font-size:.86rem;font-weight:700;letter-spacing:.13em;text-shadow:0 2px 8px #000}.brand img{width:33px}.tools,.actions,.choices{display:flex;align-items:center;gap:.6rem}.tool,.secondary,.choices button{border:1px solid #cddfe642;background:#111b20d6;border-radius:30px;color:#eff5f7;display:inline-flex;justify-content:center;align-items:center;gap:.46rem;min-height:40px;padding:.55rem .95rem;font-size:.89rem}.tool:hover,.secondary:hover,.choices button:hover{background:#33424ae8;border-color:#b6d8e0aa}.iconOnly{padding:.54rem;width:41px}.tool svg,.primary svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}.tool[aria-pressed=true]{border-color:#8ad7d7}.defs{position:absolute;width:0;height:0;overflow:hidden}
.overlay{position:absolute;bottom:clamp(5.6rem,12vh,8.4rem);left:var(--space);max-width:min(495px,55vw);z-index:2}.marker{display:flex;align-items:center;gap:.59rem;text-transform:uppercase;letter-spacing:.14em;font:500 .75rem/1.5 'Consolas',monospace;color:#c6e0e6}.marker i{display:block;width:1.4rem;height:2px;background:#b5e0df}.marker span,footer b{color:#9daeb7}.opener h1,.overlay h2,.message h2,dialog h2{font-family:Georgia,'Times New Roman',serif;font-weight:400;letter-spacing:-.065em;margin:.34em 0 .15em;line-height:1.02}.opener h1{font-size:clamp(4.7rem,8.3vw,8.6rem);margin:.13em 0 .12em}.overlay h2{font-size:clamp(2.55rem,4.8vw,5.1rem)}.overlay p,.message p,dialog p{font-size:clamp(1rem,1.25vw,1.15rem);line-height:1.55;color:#e1e6e7;margin:0 0 1.15rem;max-width:37ch}.opener p{max-width:35ch}.primary{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;border:1px solid #fff3;background:var(--ivory);color:var(--ink);border-radius:30px;min-height:45px;padding:.62rem 1.18rem;font-weight:650;font-size:.98rem}.primary:hover{background:#ccebf0}.actions{flex-wrap:wrap}
footer{bottom:max(1.15rem,env(safe-area-inset-bottom));padding-top:.83rem;border-top:1px solid #cfe3eb40;font-family:Consolas,monospace;font-size:.72rem;letter-spacing:.09em;text-transform:uppercase;color:#d3dce0;gap:.75rem}footer b{font-weight:400;margin:0 .35rem}.progress{display:flex;gap:5px}.progress i{width:clamp(12px,2.1vw,27px);height:2px;background:#9cb5c24f}.progress .done{background:#bdd5d8}.progress .active{background:#fff;height:3px}
.message,dialog{border:1px solid #bad3e050;background:linear-gradient(125deg,#1d303cee,#0c171fee);border-radius:17px;box-shadow:0 24px 100px #0007;backdrop-filter:blur(18px);padding:clamp(1.4rem,3vw,2.6rem);width:min(510px,85vw);color:var(--ivory)}.message{position:absolute;top:50%;left:54%;transform:translate(-50%,-47%)}.message h2,dialog h2{font-size:clamp(2rem,3.5vw,3.1rem);margin:.35em 0 .5em}.choices{align-items:stretch;flex-direction:column}.choices button{border-radius:7px;justify-content:flex-start;padding:.66rem .9rem}.replyField,textarea{background:#081119a8;border:1px solid #859da050;border-radius:7px;color:#dce7ed}.replyField{padding:.8rem;display:flex;gap:.55rem;align-items:center;margin:.9rem 0;color:#a5b8bf;font-size:.91rem}.replyField i{width:1px;height:15px;background:#daeff1;animation:blink 1.5s steps(2,end) infinite}textarea{padding:.8em;width:100%;height:80px;display:block;margin:.4rem 0 1rem;font-size:1rem;resize:vertical}#draftBox{font-size:.9rem}#finishText{white-space:pre-line}
#statusArea{position:absolute;top:4.5rem;right:var(--space);max-width:min(350px,90vw);z-index:5;display:grid;justify-items:end;gap:.35rem;pointer-events:none}#statusArea a{pointer-events:auto}#toast:not(:empty){border-radius:8px;background:#111d25ef;box-shadow:0 4px 18px #0008;padding:.7rem .9rem;z-index:5;font-size:.9rem;line-height:1.4}dialog::backdrop{background:#000a}dialog p{max-width:100%}@keyframes blink{50%{opacity:.25}}
@media(max-width:650px){.tool span,#footEnd{display:none}.tool{padding:.48rem;width:38px;min-height:38px}.tools{gap:.32rem}.overlay{max-width:85vw;bottom:5.15rem}.opener h1{font-size:clamp(4rem,16vw,6rem)}.opener p{max-width:28ch}.overlay h2{font-size:2.6rem}.overlay p{max-width:28ch;font-size:1rem}.message{left:50%;width:calc(100% - 2.2rem)}.shade{background:linear-gradient(0deg,#03090ff5 0%,#040a10bd 24%,transparent 57%,transparent 82%,#02080ca8)}}
@media(max-height:560px) and (min-width:651px){#room{min-height:350px}.overlay{bottom:3.5rem}.opener h1{font-size:3.8rem}.overlay h2{font-size:2.4rem}.message{padding:1rem 1.5rem}.choices{gap:.25rem}.choices button{min-height:32px}.replyField{margin:.4rem 0;padding:.4rem}.message h2{font-size:1.8rem}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
footer #lobbyExit{pointer-events:auto;font:inherit;font-size:.82rem;color:#e0eaf5;background:#101820;border:1px solid #526370;padding:.45rem .7rem;border-radius:.4rem;cursor:pointer}.marker #arrival{color:inherit}
@media(max-width:650px){footer:has(#lobbyExit:not([hidden])) .progress{display:none}}
#openDoor{position:absolute;left:46%;top:19%;width:36%;height:54%;z-index:1;cursor:pointer;background:transparent;border:0;border-radius:2px}
#openDoor:focus-visible{outline:2px solid #bce4f4;outline-offset:3px}
.srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.exploreHUD{position:absolute;inset:0;z-index:2;pointer-events:none;outline:0}
.roamHelp{position:absolute;left:var(--space);bottom:max(1.6rem,env(safe-area-inset-bottom));color:#d9dde2;font-size:.84rem;text-shadow:0 1px 6px black}
.walkHint{display:flex;align-items:center;gap:.55rem}.walkHint i{height:.8em;border-left:1px solid #adb7c370}
.exploreHUD kbd{font:500 .73rem/1.3 Consolas,monospace;color:#f0f2f6;padding:.24rem .38rem;border:1px solid #b3bdc467;border-radius:.3rem;background:#0a1016a6}
.touchHint,#movePad{display:none}
body:not(.has3d) .roamHelp,body.inspecting .roamHelp{display:none}
.hallControl{position:absolute;bottom:max(1.15rem,env(safe-area-inset-bottom));min-height:42px;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;gap:.6rem;color:#e7e9ec;background:#0d131bc7;border:1px solid #adb6c357;border-radius:30px;padding:.55rem .95rem;font-size:.91rem}
.hallControl:hover{background:#1a2534;border-color:#ccd4df9c}
.hallControl svg{width:.9rem;height:.9rem;fill:currentColor}
#watchFilm{right:var(--space)}#nearby,#leaveFigure{left:50%;transform:translateX(-50%)}
#cameraTab{font-size:.86rem}
body:is([data-stage=welcome],[data-stage=threshold]) :is(header,footer,.shade){display:none}
body[data-stage=explore] header{justify-content:flex-end;pointer-events:none}body[data-stage=explore] header .tools{pointer-events:auto}
body[data-stage=explore] :is(.brand,#footLabel,#footEnd,footer .progress){display:none}
body[data-stage=explore] footer{border:0;pointer-events:none;left:var(--space);right:auto;top:max(1.25rem,env(safe-area-inset-top));bottom:auto;padding:0}
body[data-stage=explore] .tool{min-height:37px;width:37px;padding:.48rem;background:#0d131ba6}body[data-stage=explore] .tool span{display:none}
body[data-stage=explore] .shade{background:linear-gradient(0deg,#020509aa 0%,transparent 27%,transparent 85%,#03060c44)}
body[data-stage=explore] .progress{visibility:hidden}
body[data-stage=explore] #gallery{pointer-events:auto;touch-action:none;cursor:grab}
body[data-stage=explore] #gallery:active{cursor:grabbing}
body[data-stage=explore]:not(.has3d) #flat{background:#070c15 url('assets/rotunda-arrival.jpg') center/cover no-repeat}
body[data-stage=explore]:not(.has3d) #flat>*{visibility:hidden}
@media(orientation:portrait){body[data-stage=explore]:not(.has3d) #flat{background-image:url('assets/rotunda-portrait.jpg')}}
body.inspecting[data-stage=explore]:not(.has3d) #flat{background-image:url('assets/figure-study.jpg')}
#selfView{position:absolute;z-index:3;top:4.8rem;right:var(--space);width:clamp(170px,18vw,265px);background:#101922;border:1px solid #8fabb05c;border-radius:10px;overflow:hidden;box-shadow:0 6px 32px #0008}
#selfViewport{width:100%;position:relative;aspect-ratio:4/3;background:#071018;transform:scaleX(-1);overflow:hidden}
#selfViewport video,#poseLines{position:absolute;width:100%;height:100%;inset:0;display:block;object-fit:contain}
.cameraCaption{padding:.4rem .62rem;display:flex;align-items:center;justify-content:space-between;gap:.3rem;font-size:.75rem}
#trackingHint{color:#acdcdb;font-size:.7rem}
body:has(#selfView:not([hidden])) #toast:not(:empty){top:auto;bottom:4.5rem}
#movePad{position:absolute;z-index:3;right:var(--space);bottom:4.7rem;width:80px;height:80px;touch-action:none;border-radius:50%;background:radial-gradient(#6c9dab35,transparent),#0b121c9c;border:1px solid #d0e5eb80;box-shadow:0 0 0 5px #18253255}
#movePad span{position:absolute;top:50%;left:50%;width:34%;height:34%;transform:translate(-50%,-50%);background:#d9e8e9ab;border:1px solid #d6eef2db;border-radius:50%;pointer-events:none}
@media(pointer:coarse),(max-width:700px){
  body.has3d .desktopHint{display:none}body.has3d .touchHint,body.has3d #movePad:not([hidden]){display:block}
  .roamHelp{bottom:max(1.22rem,env(safe-area-inset-bottom));font-size:.79rem}
  #watchFilm{left:var(--space);right:auto;bottom:4rem}#nearby,#leaveFigure{bottom:8rem}#nearby kbd{display:none}
  #selfView{width:clamp(126px,30vw,190px);top:4.3rem}
  .cameraCaption{flex-wrap:wrap;padding:.3rem .45rem;gap:.15rem;line-height:1.2}
}
@media(max-height:500px){#selfView{width:125px;top:3.8rem}.exploreHUD{bottom:3.6rem}#movePad{bottom:3.5rem;width:64px;height:64px}}
#crossing{position:absolute;right:var(--space);bottom:5rem;z-index:3}
#skipArrival{background:#08121ac4;text-shadow:0 1px 4px #000}

body:is([data-stage=welcome],[data-stage=threshold]) #flat{visibility:hidden}
body[data-stage=threshold] #skipArrival{opacity:0;transition:opacity .18s}
body[data-stage=threshold] #skipArrival:is(:hover,:focus-visible){opacity:1}
#cameraDock, #cinemaRail { display: contents; }
#cameraPlaceholder, #cameraDockControls, .cinemaConsentLine { display: none; }

/* Both renderers frame the hanging screen inside this measured clear space.
   The room continues behind the camera preview and the bottom cue. */
#screenArea, #flatTheatre { display:none; }
.visitSummary { margin-top: 1rem; width: 100%; }
.message { max-height: 90dvh; overflow: auto; }
body[data-cinema="true"] #room {
  --dock-width: clamp(184px,18vw,252px);
  --dock-margin: clamp(12px,1.6vw,25px);
  --hit: 40px;
  height: 100dvh;
  min-height: 0;
}
body[data-cinema="true"] #screenArea {
  position:absolute; display:block; pointer-events:none;
  inset:9% calc(var(--dock-width) + var(--dock-margin)*2 + 1vw) 15% 4.5%;
}
body[data-cinema="true"] #flat { visibility:hidden; }
body:is([data-cinema="true"],[data-stage="reply"],[data-stage="end"]):not(.has3d) #flatTheatre {
  position:absolute; inset:0; width:100%; height:100%; display:block;
}
body[data-cinema="true"] :is(#flatThreshold,.shade,footer,.brand,#full,#camera,#toast) { display: none; }

body[data-cinema="true"] #cameraDock {
  position:absolute; right:max(var(--dock-margin),env(safe-area-inset-right));
  top:46%; transform:translateY(-50%); z-index:2;
  display: block;
  width: var(--dock-width);
  max-height: 78%;
  overflow-y: auto;
  border: 1px solid #354247;
  border-radius: 9px;
  background: #0e1519e6;
  color: #e2e8e8;
  scrollbar-width: thin;
}
body[data-cinema="true"] #cameraPlaceholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  color: #8eacaf;
  background: radial-gradient(ellipse at 51% 59%,#1b2c32 0%,#121e24 52%,#0c151a 100%);
}
.framingMark { width: 46%; max-height: 75%; }
body[data-cinema="true"] #cameraDock:has(#selfView:not([hidden])) #cameraPlaceholder { display: none; }
body[data-cinema="true"] #cameraDock:is([data-state="error"],:has(#cameraTab:not([hidden]))) #cameraPlaceholder {
  height: clamp(24px,7dvh,54px);
  aspect-ratio: auto;
}
body[data-cinema="true"] #selfView {
  position: static;
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
body[data-cinema="true"] #selfViewport {
  /* Both layers letterbox the same capture, including a portrait webcam. */
  aspect-ratio: 4 / 3 !important;
  height: auto;
  background: #071015;
}
body[data-cinema="true"] .cameraCaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 6px;
  padding: .49rem .62rem .23rem;
  color: #d8dfe2;
  font-size: .75rem;
}
body[data-cinema="true"] #trackingHint { color: #a4dbd3; font-size: .73rem; }
body[data-cinema="true"] #cameraDockControls { display: grid; gap: .44rem; padding: .53rem .62rem .58rem; }
body[data-cinema="true"] #cameraDock:has(#selfView:not([hidden])) #cameraDockControls { padding-top: .22rem; }
body[data-cinema="true"] #cameraDockStatus {
  margin: 0;
  color: #b2c2c5;
  font-size: .77rem;
  line-height: 1.33;
  overflow-wrap: anywhere;
}
body[data-cinema="true"] #cameraDockStatus:empty { display: none; }
body[data-cinema="true"] #cameraDockActions { display: grid; gap: .15rem; }
body[data-cinema="true"] #cameraDockToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--hit);
  padding: .32rem .48rem;
  border: 1px solid #84999b;
  border-radius: 5px;
  color: #e7f0ef;
  background: #27393e;
  font-size: .87rem;
  font-weight: 600;
  line-height: 1.15;
}
body[data-cinema="true"] #cameraDock:has(#selfView:not([hidden])) #cameraDockToggle {
  background: #182227; border-color: #57676a; color: #d5e1e1;
}
body[data-cinema="true"] #cameraDockToggle:hover { background: #3b5053; }
body[data-cinema="true"] #cameraDockActions #cameraTab {
  color: #b4e5e5; background: transparent; border: 0; border-radius: 4px;
  justify-content: center; padding: .28rem .16rem; min-height: var(--hit);
  font-size: .78rem; text-decoration: underline; text-underline-offset: 3px;
}
body[data-cinema="true"] #cinemaRail {
  position:absolute; z-index:2; bottom:0; width:100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  min-height: calc(var(--hit) + env(safe-area-inset-bottom) + 4px);
  align-items: center;
  padding: 2px max(8px,env(safe-area-inset-right)) max(2px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  color: #d6d6d6;
  text-shadow: 0 1px 5px #000;
  background: linear-gradient(0deg,#060910eb,transparent);
}
body[data-cinema="true"] #guide {
  grid-column: 2; grid-row: 1;
  display: flex; flex-wrap: nowrap;
  justify-content: center; align-items: center;
  gap: .25rem; min-width: 0; outline: none;
}
body[data-cinema="true"] #detail {
  margin: 0; font-size: clamp(.85rem,1.4vw,1rem);
  font-weight: 450; line-height: 1.35; white-space: nowrap;
}
body[data-cinema="true"] #stepActions { flex-wrap: nowrap; gap: 0; }
body[data-cinema="true"] header {
  grid-column: 3; grid-row: 1; justify-self: end;
  position: static; inset: auto; gap: 0;
}
body[data-cinema="true"] .tools { gap: 0; }
body[data-cinema="true"] :is(#sound,.tool span) { display: none; }
body[data-cinema="true"]:is([data-stage="turn"],[data-stage="cue"]) #sound { display: inline-flex; }
body[data-cinema="true"] :is(#sound,#next) {
  align-items: center; justify-content: center; flex: none;
  width: var(--hit); height: var(--hit); min-height: 0;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: #aaaeb1;
}
body[data-cinema="true"] #next { position: relative; font-size: 0; }
body[data-cinema="true"] #next::before {
  content: ""; position: absolute; width: 10px; height: 11px; transform: translateX(1px);
  clip-path: polygon(0 0,100% 50%,0 100%); background: #eff0f1;
}
body[data-cinema="true"] #next::after {
  content: ""; width: 27px; height: 27px; border-radius: 50%; border: 1px solid #797b7d;
}
body[data-cinema="true"] :is(#sound,#next):hover { color: white; background-color: #252628; }
body[data-cinema="true"] :is(#sound,#next,#cameraDockToggle,#cameraTab):focus-visible { outline-offset: -2px; }
body[data-cinema="true"] #statusArea { display: contents; }

@media (min-aspect-ratio: 1 / 1) and (max-width: 780px), (max-height: 440px) {
  body[data-cinema="true"] #room { --dock-width: clamp(140px,23vw,180px); --dock-margin: 8px; }
  body[data-cinema="true"] #cameraDockControls { padding: .4rem; }
  body[data-cinema="true"] #cameraDockStatus { font-size: .74rem; }
}
@media (max-aspect-ratio: 1 / 1) {
  body[data-cinema="true"] #room {
    --dock-width: clamp(152px,43vw,212px);
    --near-gap: clamp(10px,2vh,24px);
  }
  body[data-cinema="true"] #screenArea { inset:7% 4% 45% 4%; }
  body[data-cinema="true"] #cameraDock {
    width: var(--dock-width); max-height: calc(45dvh - var(--hit) - var(--near-gap));
    top: calc(55% + var(--near-gap)); transform:none;
    right:max(12px,env(safe-area-inset-right));
  }
}
@media (max-width: 540px) {
  body[data-cinema="true"]:is([data-stage="turn"],[data-stage="cue"]) #sound { display: none; }
}
@media (pointer: coarse) { body[data-cinema="true"] #room { --hit: 44px; } }
