:root{color-scheme:dark;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff;background:#101715;--gold:#eed4a4;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}body{margin:0}button,a,input,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{opacity:.45;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ffe4ad;outline-offset:5px}[hidden]{display:none!important}#experience{position:fixed;inset:0;overflow:hidden;background:#15211e;isolation:isolate}#present-photo,#camera,#portal-renderer{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}#present-photo{filter:brightness(.55);transition:filter .7s}#experience[data-state=preview] #present-photo{filter:none}#portal-renderer{pointer-events:none}#portal-renderer canvas{display:block;width:100%;height:100%}#experience:after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;background:linear-gradient(#0009,transparent 24%,transparent 58%,#000a)}header{position:absolute;z-index:5;top:0;left:0;right:0;padding:calc(18px + var(--safe-top)) 20px 12px;display:flex;gap:12px;align-items:center}.round{width:44px;height:44px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;border:1px solid #ffffff40;background:#15211e55;backdrop-filter:blur(16px);text-decoration:none;color:white;font-size:24px;position:relative}.mute-slash{position:absolute;font-size:28px;top:4px;left:11px}.heading{flex:1;min-width:0}.eyebrow{font-size:10px;letter-spacing:.16em;font-weight:650;color:var(--gold)}#stop{display:block;width:100%;max-width:440px;border:0;background:transparent;color:white;font-family:Georgia,serif;font-size:20px;padding:4px 18px 4px 0;text-overflow:ellipsis}#stop option{background:#15211e;font:16px system-ui}.top-notes{position:absolute;z-index:5;top:calc(87px + var(--safe-top));left:20px;right:20px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px}.interpretation{padding:6px 9px;border:1px solid #f0d9b245;border-radius:6px;background:#10201980;color:#f0dfc2}#mode{font-size:10px;letter-spacing:.08em;background:#102019a8;border-radius:5px;padding:6px 9px}.entry{position:absolute;z-index:6;bottom:calc(65px + var(--safe-bottom));left:24px;right:24px;max-width:440px;text-shadow:0 2px 14px #0005}.entry h1{font-family:Georgia,serif;font-weight:400;font-size:clamp(40px,8vw,65px);line-height:1.04;letter-spacing:-.035em;margin:15px 0}.entry>p{font-size:16px;line-height:1.5;color:#ffffffcf;margin:12px 0 24px}.primary{display:flex;justify-content:space-between;align-items:center;background:#e9d1a4;border:1px solid #fff5;color:#182721;min-height:54px;width:100%;padding:15px 20px;border-radius:12px;font-size:16px;font-weight:650;box-shadow:0 5px 30px #0002}.text-button{display:block;padding:15px 0;min-height:44px;background:transparent;border:0;font-size:14px;text-decoration:underline;text-underline-offset:4px}.entry .fine{font-size:12px;line-height:1.45;max-width:360px;margin:0;color:#fffd}.guidance{position:absolute;z-index:5;bottom:calc(201px + var(--safe-bottom));left:20px;right:20px;text-align:center;pointer-events:none}.status-line{display:inline-flex;align-items:center;gap:9px;max-width:100%;font-size:15px;padding:10px 16px;border-radius:30px;background:#14221ee8;border:1px solid #e9d1a445;backdrop-filter:blur(14px)}#status-dot{width:7px;height:7px;border-radius:50%;background:var(--gold);box-shadow:0 0 12px #e9d1a488}.guidance p{font-size:13px;line-height:1.45;margin:9px auto;color:#fff;text-shadow:0 1px 7px #000;max-width:420px}.actions{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;pointer-events:auto}.pill{border:1px solid #fff4;background:#12221ac9;backdrop-filter:blur(12px);border-radius:24px;padding:9px 13px;min-height:40px;font-size:12px}.pill[aria-pressed=true]{border-color:var(--gold);color:var(--gold)}.time-controls{position:absolute;z-index:5;left:20px;right:20px;bottom:calc(47px + var(--safe-bottom));max-width:500px;margin:auto;padding:16px 18px 10px;border-radius:18px;border:1px solid #eddabb50;background:linear-gradient(130deg,#22322be8,#0e1a17ed);backdrop-filter:blur(20px);box-shadow:inset 0 1px #ffffff15,0 10px 30px #0003}.time-labels{display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:8px}.time-labels b{display:block;font-size:11px;letter-spacing:.12em;font-weight:600;color:var(--gold)}.time-labels small{display:block;font-size:11px;color:#ffffff95;margin-top:4px}.time-labels>span:last-child{text-align:right}.slider-hint{font-size:12px;color:#ffffffba}#time{width:100%;height:32px;accent-color:var(--gold);cursor:ew-resize;margin:9px 0 0}#view-note{font-size:11px;line-height:1.4;color:#ffffffa8;text-align:center;margin:3px 0}#viewfinder{position:absolute;z-index:3;left:12%;right:12%;top:23%;bottom:35%;pointer-events:none;transition:opacity .5s}#viewfinder i{position:absolute;width:24px;height:24px;border:1px solid #ffe6bdab}#viewfinder i:nth-child(1){top:0;left:0;border-right:0;border-bottom:0;border-radius:9px 0 0 0}#viewfinder i:nth-child(2){top:0;right:0;border-left:0;border-bottom:0;border-radius:0 9px 0 0}#viewfinder i:nth-child(3){bottom:0;left:0;border-right:0;border-top:0;border-radius:0 0 0 9px}#viewfinder i:nth-child(4){bottom:0;right:0;border-left:0;border-top:0;border-radius:0 0 9px 0}.scan-line{position:absolute;left:4%;right:4%;height:1px;top:50%;background:linear-gradient(90deg,transparent,#ffe6bd66,transparent);opacity:0}#experience[data-state=searching] .scan-line,#experience[data-state=acquiring] .scan-line{opacity:1;animation:scan 4s ease-in-out infinite}#experience[data-state=locked] #viewfinder,#experience[data-state=preview] #viewfinder{opacity:0}#alignment-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:.35;z-index:3;pointer-events:none;mask-image:radial-gradient(ellipse,#000 40%,transparent 75%)}#lock-ripple{position:absolute;pointer-events:none;z-index:3;inset:20% 12% 32%;border:1px solid #ffe4b3;border-radius:25%;opacity:0}#lock-ripple.flash{animation:lock .8s ease-out}#past-video{position:fixed;width:1px;height:1px;bottom:0;left:0;opacity:0;pointer-events:none}.pause{position:absolute;z-index:7;right:16px;bottom:calc(5px + var(--safe-bottom));min-height:35px;padding:5px 11px;font-size:11px}#test-notes{position:absolute;z-index:8;left:16px;bottom:calc(12px + var(--safe-bottom));max-width:min(410px,calc(100% - 32px));font-size:11px;color:#fffd}#test-notes summary{cursor:pointer;min-height:24px;padding-top:5px}#test-notes[open]{padding:16px;border:1px solid #fff4;background:#14231ff5;border-radius:12px}#test-notes p{font-size:14px;line-height:1.6}#test-notes a{display:block;color:var(--gold);padding:10px 0}#boot-error{position:absolute;z-index:9;top:130px;left:24px;right:24px;color:#fff;background:#512d26}#boot-error:empty{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.demo-nudge{animation:nudge 1.4s ease-in-out 1}@keyframes scan{0%,100%{transform:translateY(-65px)}50%{transform:translateY(65px)}}@keyframes lock{0%{opacity:.85;transform:scale(.85);box-shadow:0 0 20px #ffe4b344}100%{opacity:0;transform:scale(1.25)}}@keyframes nudge{50%{filter:drop-shadow(0 0 8px #e9d1a4)}}@media(min-width:700px){.entry{left:6%;bottom:15%}header{padding-left:30px;padding-right:30px}.top-notes{left:30px;right:30px}.guidance{bottom:210px}}@media(orientation:landscape) and (max-height:550px){header{padding-top:calc(8px + var(--safe-top))}.top-notes{top:62px}.entry{left:5%;bottom:40px;max-width:370px}.entry h1{font-size:34px;margin:7px 0}.entry>p{margin:6px 0 10px}.entry .fine{font-size:11px}.entry .eyebrow{display:none}.entry .text-button{padding:8px 0}.guidance{left:auto;right:20px;width:43%;bottom:170px}.time-controls{left:auto;right:20px;width:43%;bottom:45px;padding:10px 14px}#viewfinder{left:8%;right:54%;top:27%;bottom:22%}.slider-hint{font-size:11px}.time-labels b{font-size:10px}#view-note{font-size:10px}.guidance p{font-size:12px}.pill{min-height:34px;padding:7px 10px}.status-line{font-size:13px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.home-setup{position:absolute;z-index:6;top:calc(130px + var(--safe-top));bottom:calc(55px + var(--safe-bottom));left:24px;right:24px;max-width:440px;overflow:auto;padding:22px;background:#13241fed;border:1px solid #ffffff35;border-radius:20px;backdrop-filter:blur(18px)}.home-setup h1{font:400 34px/1.08 Georgia,serif;margin:12px 0}.home-setup p{font-size:14px;line-height:1.45}.file-label{display:block;font-size:13px;padding:12px 0;border-top:1px solid #fff2}.file-label input{display:block;width:100%;margin-top:8px;font-size:12px}.home-setup .fine{font-size:12px;color:#fffc}.home-setup .actions{justify-content:flex-start}.home-setup progress{width:100%;margin:14px 0 0;accent-color:var(--gold)}#home-status{color:var(--gold)}@media(orientation:landscape) and (max-height:550px){.home-setup{top:95px;left:5%;max-width:90%;bottom:45px}.home-setup h1{font-size:25px}}
/* Match the reference and film framing in camera-free preview; no double-sized house. */
#experience[data-state=preview] #present-photo{left:6%;top:8%;width:88%;height:84%;object-fit:contain;filter:none;mask-image:linear-gradient(transparent,#000 7%,#000 93%,transparent)}
/* Keep acquisition brackets from flashing during a retained lock. */
#experience[data-state=relocalizing] #viewfinder{opacity:0}
/* Full-viewport portal. Camera and film occupy the complete canvas; UI floats above. */
#world-camera{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#experience[data-state=preview] #present-photo{left:0;top:0;width:100%;height:100%;object-fit:cover;mask-image:none;filter:none}
#experience:after{background:linear-gradient(#0007,transparent 20%,transparent 76%,#0007)}
#experience[data-anchored=true] #viewfinder{opacity:0}
#experience[data-anchored=true] .guidance{bottom:calc(167px + var(--safe-bottom))}
#experience[data-anchored=true] .guidance>p{display:none}
#experience[data-anchored=true] .status-line{font-size:13px;padding:6px 12px;background:#14221e88}
#experience[data-anchored=true] .actions{margin-top:6px}
#experience[data-anchored=true] #reference,#experience[data-anchored=true] #fallback{display:none}
.time-controls{padding:11px 16px 7px;background:#12221aaa;border-color:#ffffff30}
#test-notes[open]{max-height:70dvh;overflow:auto}
#test-notes .engine-credit{font-size:11px;line-height:1.4;color:#ffffffa8}
#test-notes .engine-credit a{font-size:11px;padding:5px 0}
.entry{max-height:calc(100dvh - 205px);overflow:auto}
#tour-ready{margin-top:10px}
#point-help{position:absolute;z-index:6;right:20px;top:calc(125px + var(--safe-top));font-size:11px}
#point-guide{position:absolute;z-index:9;inset:calc(125px + var(--safe-top)) 16px calc(50px + var(--safe-bottom));max-width:620px;margin:auto;padding:18px;border:1px solid #ffffff40;border-radius:18px;background:#14231ff7;overflow:auto}
.point-guide-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.point-guide-heading h2{font:400 28px Georgia,serif;margin:0}
#point-guide p{font-size:13px;line-height:1.5}#point-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.point-card{padding:0;overflow:hidden;border:1px solid #fff3;border-radius:10px;background:#23372e;text-align:left}.point-card img{display:block;width:100%;height:145px;object-fit:contain;background:#0d1712}.point-card span{display:block;padding:10px;font-size:12px}
#alignment-caption{position:absolute;z-index:6;top:calc(177px + var(--safe-top));left:20px;right:20px;max-width:460px;margin:auto;padding:10px 12px;border-radius:12px;background:#14231feb;border:1px solid #eed4a470;font-size:12px;line-height:1.4;display:flex;align-items:center;gap:10px}
#alignment-caption span{flex:1}#alignment-caption .pill{flex-shrink:0;padding:7px 10px;font-size:11px}
#zone-status{font-size:12px;text-align:center;color:var(--gold);margin:5px 0}
.haptic-setting{display:flex;align-items:center;gap:9px;padding:14px 0;font-size:13px}.haptic-setting input{accent-color:var(--gold)}
@media(orientation:landscape) and (max-height:550px){#point-help{top:90px}#point-guide{top:85px}#alignment-caption{top:140px;left:20px;right:auto;max-width:43%}.point-card img{height:100px}}
@media(orientation:landscape) and (max-height:550px){#experience[data-anchored=true] .guidance{bottom:145px}}

.guidance,#experience[data-anchored=true] .guidance{bottom:calc(59px + var(--safe-bottom) + var(--time-controls-height,142px))}
@media(orientation:landscape) and (max-height:550px){.guidance,#experience[data-anchored=true] .guidance{bottom:calc(57px + var(--safe-bottom) + var(--time-controls-height,120px))}}

 .story-open{position:absolute;left:20px;right:20px;top:auto;bottom:calc(47px + var(--safe-bottom));width:calc(100% - 40px);max-width:500px;margin:auto;z-index:6;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:66px;padding:12px 18px;border-radius:16px;background:linear-gradient(115deg,#eedbb2,#c9b47f);color:#172d24;border:1px solid #fff8;text-align:left;box-shadow:0 6px 24px #0004}
.story-open small{display:block;font-size:9px;letter-spacing:.14em;font-weight:700;margin-bottom:3px}.story-open strong{display:block;font:22px/1.15 Georgia,serif}.story-open>span:last-child{font-size:25px}
#experience:has(.story-open:not([hidden])) .time-controls{bottom:calc(123px + var(--safe-bottom))}
#experience:has(.story-open:not([hidden])) .guidance{bottom:calc(135px + var(--safe-bottom) + var(--time-controls-height,142px))}
#experience:has(.story-open:not([hidden])) .entry{bottom:calc(130px + var(--safe-bottom))}
@media(orientation:landscape) and (max-height:550px){.story-open{left:20px;right:auto;width:43%;min-height:58px}.story-open strong{font-size:18px}#experience:has(.story-open:not([hidden])) .time-controls{bottom:calc(47px + var(--safe-bottom))}#experience:has(.story-open:not([hidden])) .guidance{bottom:calc(59px + var(--safe-bottom) + var(--time-controls-height,120px))}}

#portal-story{box-sizing:border-box;width:min(100% - 24px,580px);max-height:82dvh;margin:auto auto 12px;padding:24px;border:1px solid #a99c7180;border-radius:26px;background:rgba(19,39,33,.98);color:#f7f2e5;box-shadow:0 20px 90px #0008;overflow:auto;line-height:1.65}
#portal-story::backdrop{background:#06130d80;backdrop-filter:blur(5px)}
#story-close{position:sticky;top:0;display:block;margin-left:auto;background:#233d33}
#portal-story h2{font:normal 32px Georgia,serif;margin:12px 0 0}#portal-story h3{font:normal 23px Georgia,serif}#portal-story .story-era,#portal-story .story-footnote{color:#cabf9e;font-size:13px}#portal-story section{border-top:1px solid #ffffff20;margin-top:24px}
#portal-story .audio-block{border:1px solid #c8b77c70;border-radius:16px;padding:16px;margin:20px 0;background:#ffffff08}#portal-story .audio-row{display:flex;gap:15px;align-items:center}#portal-story .audio-btn{width:48px;height:48px;border-radius:50%;background:#d9c68c;color:#172c24;border:0;flex-shrink:0}#portal-story .audio-btn svg{width:24px;height:24px}#portal-story .audio-meta{flex:1}#portal-story .audio-track{height:10px;background:#ffffff30;border-radius:10px;margin:10px 0;cursor:pointer;overflow:hidden}#portal-story .audio-track i{display:block;height:100%;width:0;background:#dac78f}#portal-story .audio-time,#portal-story .audio-note{font-size:12px}#portal-story .audio-transcript-toggle{padding:10px;background:transparent;color:inherit;border:1px solid #ffffff40;border-radius:10px;margin-top:10px}#portal-story .audio-transcript{font-size:15px}
/* Visitor controls: a small resting state with an explicit return action. */
#test-notes{display:none!important}
#pause{display:none!important}
#experience[data-state=paused] #pause{display:block!important}
.story-open{bottom:calc(14px + var(--safe-bottom));min-height:56px;padding:9px 16px}
.story-open strong{font-size:20px}
#experience:has(.story-open:not([hidden])) .time-controls{bottom:calc(80px + var(--safe-bottom))}
#experience:has(.story-open:not([hidden])) .guidance{bottom:calc(92px + var(--safe-bottom) + var(--time-controls-height,142px))}
#timeline-toggle{display:block;margin:0 auto 6px;min-height:32px;padding:5px 12px;font-size:11px}
#experience.controls-idle .time-controls{padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;pointer-events:none}
#experience.controls-idle #timeline-toggle{pointer-events:auto;margin:0 auto;background:#14221eaa;opacity:.75;min-height:40px}
#experience.controls-idle #timeline-toggle:hover,#experience.controls-idle #timeline-toggle:focus-visible{opacity:1}
#experience.controls-idle[data-state=locked] .status-line{display:none}
#experience.controls-idle .story-open{opacity:.82}
#experience.controls-idle .story-open:hover,#experience.controls-idle .story-open:focus-visible{opacity:1}
