/* Hallmark · control layout follows the existing palette; runtime visual QA pending. */
:root {
 --trip-night:#142b25;--trip-deep:#0d211c;--trip-surface:#20392f;--trip-ink:#f4f1df;--trip-muted:#bdd0bd;--trip-line:#46604e;
 --trip-mint:#c8dfb4;--trip-amber:#f3bf85;--trip-dark-ink:#22362c;--trip-shadow:#04110c77;--trip-glass:#193328f0;--trip-clear:#0000;
 --trip-page:#f7f5ef;--trip-page-ink:#26352b;--trip-label-font:var(--font-body);
}
*{box-sizing:border-box}html,body{margin:0;overflow-x:clip;min-width:320px}body{font-family:var(--font-body);background:var(--trip-night);color:var(--trip-ink)}
button,select{font:inherit}button,a,select{-webkit-tap-highlight-color:var(--trip-clear)}button,a{touch-action:manipulation}a{color:inherit;text-decoration:none}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}[hidden]{display:none!important}
button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid var(--trip-amber);outline-offset:4px}
.demo-note{min-height:35px;padding:8px 28px;background:var(--trip-deep);display:flex;justify-content:space-between;gap:10px;font-size:10px;letter-spacing:.8px;color:var(--trip-muted)}.demo-note b{font-weight:400;letter-spacing:0;margin-left:14px}.demo-note a{white-space:nowrap}
.demo-header{display:flex;align-items:center;gap:28px;padding:18px 28px;border-bottom:1px solid var(--trip-line);position:relative;z-index:4}.demo-brand{font:800 23px var(--font-display);letter-spacing:-.8px;margin-right:auto}.demo-brand span{display:block;font:400 9px var(--font-body);letter-spacing:1px;margin-top:4px;color:var(--trip-muted)}
.demo-nav{display:flex;gap:6px}.demo-nav a{font-size:12px;white-space:nowrap;padding:10px 12px;border-radius:5px}.demo-nav a[aria-current=page]{background:var(--trip-surface);color:var(--trip-mint)}
.demo-header button,.page-address button{border:1px solid var(--trip-line);background:var(--trip-surface);color:var(--trip-ink);border-radius:6px;padding:11px 14px;font-size:12px;white-space:nowrap}.demo-header button:hover{background:var(--trip-line)}
.world-stage{position:relative;isolation:isolate;height:calc(100svh - 264px);min-height:510px;max-height:1000px;perspective:1600px;overflow:clip;background:radial-gradient(ellipse at 50% 20%,var(--trip-surface),var(--trip-night) 80%)}
.world-canvas{position:absolute;inset:0;z-index:0}.world-canvas canvas{display:block;width:100%;height:100%}.world-wash{position:absolute;inset:0;z-index:1;background:var(--trip-shadow);pointer-events:none;opacity:1;transition:opacity 500ms ease}
.world-stage:not([data-phase=reading]) .world-wash{opacity:0}.world-stage[data-phase=reading] .world-canvas{filter:blur(2px)}
.world-labels{position:absolute;inset:0;z-index:2;opacity:0;pointer-events:none;transition:opacity 300ms}.world-stage[data-phase=exploring] .world-labels,.world-stage[data-phase=driving] .world-labels{opacity:1}
.building-label{position:absolute;left:50%;top:50%;transform:translate(-50%,-100%);border:1px solid var(--trip-line);color:var(--trip-ink);background:var(--trip-glass);border-radius:7px;padding:8px 11px;font:500 11px var(--trip-label-font);white-space:nowrap;box-shadow:0 6px 18px var(--trip-shadow);pointer-events:auto;min-height:36px;max-width:180px}
.building-label[aria-current=true]{background:var(--trip-mint);color:var(--trip-dark-ink);border-color:var(--trip-mint)}.building-label:hover{background:var(--trip-surface);color:var(--trip-ink)}.world-stage[data-phase=driving] .building-label{pointer-events:none;opacity:.75}
.map-caption{position:absolute;left:26px;top:21px;z-index:2;pointer-events:none;max-width:340px}.map-caption>span{font-size:9px;letter-spacing:1.6px;color:var(--trip-mint)}.map-caption h1{font:500 clamp(22px,2.4vw,33px)/1.15 var(--font-display);letter-spacing:-.7px;margin:7px 0}.map-caption p{font-size:11px;line-height:1.7;color:var(--trip-muted);max-width:290px;margin:8px 0}
.page-card{position:absolute;inset:23px clamp(16px,7vw,130px);z-index:3;background:var(--trip-page);border-radius:10px;box-shadow:0 24px 70px var(--trip-shadow);transform-origin:center;overflow:clip;will-change:transform,opacity;display:flex;flex-direction:column;backface-visibility:hidden}
.page-address{min-height:35px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 15px;color:var(--trip-page-ink);background:var(--trip-mint);font-size:10px;flex-shrink:0}.page-address>span{display:flex;align-items:center;gap:7px}.page-address i{width:5px;height:5px;background:var(--trip-page-ink);border-radius:50%}.page-address button{padding:5px 0;background:none;border:none;color:var(--trip-page-ink);font-size:10px}
#website-page{width:100%;border:0;display:block;flex:1;min-height:0;background:var(--trip-page)}
.page-loading,.page-error{position:absolute;inset:35px 0 0;background:var(--trip-page);color:var(--trip-page-ink);z-index:2;display:flex;align-items:center;justify-content:center;font-size:14px}.page-error{flex-direction:column;gap:16px}.page-error button{padding:10px 15px;background:var(--trip-mint);color:var(--trip-page-ink);border:1px solid var(--trip-line);border-radius:6px}.page-error a{font-size:12px;text-decoration:underline}
.journey-message{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:22px;min-width:280px;max-width:calc(100% - 32px);justify-content:space-between;background:var(--trip-glass);border:1px solid var(--trip-line);box-shadow:0 8px 22px var(--trip-shadow);border-radius:9px;padding:13px 17px;font-size:12px}.journey-message>span{line-height:1.5}.journey-message button{border:0;padding:8px;background:none;color:var(--trip-amber);font:500 11px var(--font-body);white-space:nowrap}
.world-error{position:absolute;bottom:15px;left:20px;right:20px;z-index:4;background:var(--trip-surface);color:var(--trip-muted);padding:14px;font-size:12px;border-radius:6px}
.demo-controls{display:flex;align-items:center;justify-content:center;gap:24px;padding:15px 28px;border-top:1px solid var(--trip-line);flex-wrap:wrap}.location-readout{margin-right:auto;display:grid;gap:3px}.eyebrow{font-size:9px;letter-spacing:1.4px;color:var(--trip-muted)}.location-readout strong{font-size:12px;font-weight:500}
.demo-controls label{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--trip-muted)}.demo-controls select{color:var(--trip-ink);background:var(--trip-surface);border:1px solid var(--trip-line);padding:9px 26px 9px 10px;border-radius:5px;max-width:185px;font-size:11px}.demo-controls>button{border:0;background:none;color:var(--trip-mint);font-size:11px;padding:10px 0;white-space:nowrap}
.journey-steps{display:flex;gap:28px;justify-content:center;padding:8px 20px 3px;flex-wrap:wrap}.journey-steps span{font-size:10px;color:var(--trip-muted)}.journey-steps span[aria-current=step]{color:var(--trip-amber);font-weight:700}.demo-status{text-align:center;font-size:11px;line-height:1.7;color:var(--trip-mint);padding:0 20px;margin:6px 0 4px;min-height:20px}.prototype-disclosure{font-size:10px;color:var(--trip-muted);text-align:center;line-height:1.7;margin:0;padding:0 20px 12px}
@media(max-width:850px){.demo-header{gap:14px;padding:15px 20px}.demo-nav{gap:0}.demo-nav a{padding:10px 8px}.demo-controls{gap:13px;padding:14px 20px}.demo-controls>button{margin-left:auto}.map-caption{max-width:240px}.map-caption p{display:none}.world-stage{height:calc(100svh - 310px);min-height:500px}.page-card{inset:20px 22px}.world-stage[data-phase=exploring] .map-caption h1{font-size:25px}}
@media(max-width:600px){.demo-note{padding:8px 16px;font-size:9px;letter-spacing:.5px}.demo-note b{display:none}.demo-header{flex-wrap:wrap;padding:14px 16px;gap:12px}.demo-brand{font-size:22px}.demo-nav{width:100%;order:3;justify-content:space-between}.demo-nav a{padding:10px 9px;font-size:11px}.demo-header button{min-height:42px}.world-stage{height:570px;min-height:570px}.page-card{inset:14px 9px;border-radius:7px}.page-address{padding:5px 10px;min-height:38px}.page-address button{min-height:32px;font-size:9px}.page-loading,.page-error{top:38px}.map-caption{left:18px;top:18px;max-width:260px}.map-caption h1{font-size:25px;max-width:210px}.building-label{font-size:10px;min-height:44px;padding:8px 9px;max-width:145px}.demo-controls{align-items:stretch;gap:14px;padding:16px}.location-readout{width:100%;display:flex;align-items:center;gap:10px}.demo-controls label{width:calc(50% - 7px);display:grid;align-content:start;gap:7px;font-size:10px}.demo-controls select{font-size:16px;max-width:none;width:100%;min-height:43px;padding-right:18px}.demo-controls>button{margin:0;min-height:40px;width:100%;text-align:left}.journey-steps{gap:8px 15px;justify-content:flex-start;padding:0 16px}.journey-steps span{font-size:9px}.demo-status,.prototype-disclosure{text-align:left;padding-left:16px;padding-right:16px}.journey-message{bottom:14px;min-width:260px;gap:12px;padding:10px 12px;font-size:11px}.journey-message button{min-height:42px}.world-stage[data-phase=reading] .world-error{z-index:2}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.world-labels,.world-wash{transition:none}}

.label-number{display:none}
.page-address-actions{display:flex;align-items:center;gap:16px;flex-shrink:0}
.page-address>span{min-width:0}#page-location{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#transition-motion{color:var(--trip-dark-ink);border-bottom:1px solid currentColor}#transition-motion[aria-pressed=false]{opacity:.75}
/* The public website uses one content header. Demo controls stay on the explicit prototype URL. */
body.world-site{overflow:hidden}
.world-site .demo-note,.world-site .demo-header,.world-site .demo-controls,.world-site .journey-steps,.world-site .demo-status,.world-site .prototype-disclosure{display:none}
.world-site .world-stage{height:100dvh;min-height:0;max-height:none}
.world-site .page-card{inset:0;border-radius:0;box-shadow:none}
.world-site .page-address{min-height:44px;padding:4px 20px}
.world-site .page-address button{min-height:36px}
@media(max-width:600px){.page-address-actions{gap:12px}.world-site .page-address{padding:0 12px}.world-site .page-address button{min-height:44px}.world-site #page-location{max-width:29vw}}
@media(max-width:600px){.building-label{width:44px;height:44px;max-width:44px;padding:0;border-radius:50%}.building-label .label-name{display:none}.building-label .label-number{display:inline}}

/* Exploration HUD: actions left, steering right, a quiet camera switch between. */
body.exploration-open{overflow:hidden}
.world-stage[data-expanded=true]{position:fixed;inset:0;z-index:20;height:100dvh;min-height:0;max-height:none}
.world-stage[data-expanded=true] .world-canvas{touch-action:none}
.world-stage[data-expanded=true] .map-caption{top:88px;left:32px;max-width:320px}
.world-stage[data-camera=pov] .map-caption{display:none}
.exploration-hud{position:absolute;inset:0;z-index:6;pointer-events:none;color:var(--trip-ink);background:linear-gradient(0deg,var(--trip-shadow),var(--trip-clear) 28%,var(--trip-clear) 82%,var(--trip-shadow));--hud-bottom:max(24px,env(safe-area-inset-bottom));--hud-side:max(32px,env(safe-area-inset-left))}
.exploration-hud button,.drive-joystick{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}
.explore-topbar{position:absolute;top:max(24px,env(safe-area-inset-top));left:var(--hud-side);right:max(32px,env(safe-area-inset-right));display:flex;justify-content:space-between;gap:12px;align-items:center}
.explore-badge{display:flex;gap:10px;align-items:center;padding:10px 14px;background:var(--trip-glass);border:1px solid var(--trip-line);border-radius:7px;font-size:11px}
.explore-badge i{width:6px;height:6px;border-radius:50%;background:var(--trip-mint)}#vehicle-speed{color:var(--trip-amber);min-width:46px;font-variant-numeric:tabular-nums;border-left:1px solid var(--trip-line);padding-left:10px}
#exit-explore{min-height:44px;padding:10px 14px;border:1px solid var(--trip-line);border-radius:7px;background:var(--trip-glass);color:var(--trip-ink);font-size:12px}#exit-explore span{margin-left:12px;color:var(--trip-mint)}
.drive-help{position:absolute;top:22px;left:50%;transform:translateX(-50%);font-size:10px;color:var(--trip-muted);white-space:nowrap}
.drive-actions{position:absolute;left:var(--hud-side);bottom:var(--hud-bottom);display:flex;gap:12px}
.drive-button{width:78px;min-height:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid var(--trip-line);border-radius:12px;background:var(--trip-glass);color:var(--trip-ink);box-shadow:0 4px 0 var(--trip-deep);font-size:12px}
.drive-button svg{width:25px;height:25px;fill:none;stroke:var(--trip-mint);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.drive-button small{font-size:8px;letter-spacing:1px;color:var(--trip-muted)}
.drive-button.is-held,.drive-dpad button.is-held{background:var(--trip-mint);color:var(--trip-dark-ink);box-shadow:none}.drive-button.is-held svg{stroke:var(--trip-dark-ink)}.drive-button.is-held small{color:var(--trip-dark-ink)}
.explore-center{position:absolute;left:50%;bottom:var(--hud-bottom);transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:10px;max-width:calc(100% - 400px)}
#pov-toggle{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px 18px;background:var(--trip-mint);color:var(--trip-dark-ink);border:1px solid var(--trip-mint);border-radius:24px;white-space:nowrap;box-shadow:0 4px 16px var(--trip-shadow)}
#pov-toggle svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.4}#pov-toggle span{font:700 15px var(--font-display)}#pov-toggle small{font-size:11px;border-left:1px solid currentColor;padding-left:10px}#pov-toggle[aria-pressed=true]{background:var(--trip-amber);border-color:var(--trip-amber)}
.enter-building{border:1px solid var(--trip-mint);border-radius:7px;padding:11px 16px;min-height:44px;color:var(--trip-ink);background:var(--trip-glass);font-size:12px;white-space:nowrap}.enter-building>span:first-child{color:var(--trip-mint)}
.drive-state{font-size:10px;line-height:1.4;text-align:center;color:var(--trip-muted);max-width:240px;min-height:14px;white-space:nowrap}
.drive-steering{position:absolute;right:max(32px,env(safe-area-inset-right));bottom:var(--hud-bottom);display:flex;align-items:center;flex-direction:column;gap:10px}.steering-caption{font-size:8px;letter-spacing:1.2px;color:var(--trip-muted)}
.drive-dpad{display:grid;grid-template:repeat(3,46px)/repeat(3,46px);gap:4px}.drive-dpad button{border:1px solid var(--trip-line);border-radius:9px;background:var(--trip-glass);color:var(--trip-ink);font-size:24px;line-height:1}.drive-dpad [data-drive=up]{grid-area:1/2}.drive-dpad [data-drive=left]{grid-area:2/1}.drive-dpad [data-drive=right]{grid-area:2/3}.drive-dpad [data-drive=down]{grid-area:3/2}.drive-dpad>span{grid-area:2/2;display:grid;place-items:center;color:var(--trip-mint);font-size:16px}
.drive-joystick{display:none;position:relative;width:126px;height:126px;border:1px solid var(--trip-line);border-radius:50%;background:var(--trip-glass);box-shadow:inset 0 0 0 12px var(--trip-shadow)}.joystick-axis{position:absolute;left:50%;top:50%;background:var(--trip-line)}.axis-x{width:90px;height:1px;transform:translate(-50%,-50%)}.axis-y{width:1px;height:90px;transform:translate(-50%,-50%)}.joystick-thumb{position:absolute;left:calc(50% - 24px);top:calc(50% - 24px);width:48px;height:48px;border-radius:50%;background:var(--trip-mint);border:4px solid var(--trip-surface);box-shadow:0 4px 10px var(--trip-shadow);pointer-events:none}.drive-joystick.is-held{border-color:var(--trip-mint)}
@media(max-width:1100px){.drive-help{display:none}}
@media(pointer:coarse),(max-width:700px){.drive-dpad{display:none}.drive-joystick{display:block}.drive-help{display:none}.exploration-hud{--hud-side:max(16px,env(safe-area-inset-left));--hud-bottom:max(20px,env(safe-area-inset-bottom))}.explore-topbar{right:max(16px,env(safe-area-inset-right))}.drive-steering{right:max(16px,env(safe-area-inset-right))}.world-stage[data-expanded=true] .map-caption{left:20px;top:85px}.world-stage[data-expanded=true] .map-caption h1{font-size:24px;max-width:250px}.drive-actions{flex-direction:column;gap:10px}.drive-button{width:60px;min-height:60px;border-radius:50%;gap:2px;font-size:10px}.drive-button svg{width:20px;height:20px}.drive-button small{display:none}.explore-center{max-width:calc(100% - 170px);bottom:calc(var(--hud-bottom) + 155px)}.drive-state{font-size:9px;max-width:180px;white-space:normal}.enter-building{max-width:230px;white-space:normal;text-align:center;font-size:11px}#pov-toggle{padding:9px 14px;gap:8px;min-height:44px}#pov-toggle small{font-size:10px}.explore-badge{gap:7px;font-size:10px;padding:9px 10px}#exit-explore{font-size:10px;padding:9px 10px}#exit-explore span{margin-left:5px}}
@media(max-height:500px) and (min-width:601px){.world-stage[data-expanded=true] .map-caption{display:none}.explore-topbar{top:12px}.explore-center{bottom:var(--hud-bottom);max-width:calc(100% - 400px)}.drive-actions{flex-direction:row}.drive-steering{transform:scale(.86);transform-origin:right bottom}.drive-button{width:62px;min-height:62px}.drive-state{display:none}.drive-help{display:none}}
@media(prefers-reduced-motion:reduce){.exploration-hud *{transition:none}}
/* Keep direction buttons available to keyboard and assistive navigation on touch layouts. */
@media(pointer:coarse),(max-width:700px){.drive-dpad{display:grid;position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%)}.drive-dpad:focus-within{width:146px;height:146px;margin:0;right:0;bottom:24px;clip-path:none;overflow:visible;background:var(--trip-night);border-radius:12px;z-index:2}}
