.world-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:36px;padding:54px 0 36px}.world-intro h1{font:400 clamp(42px,5vw,62px)/1.07 var(--font-serif);letter-spacing:-2px;margin:0 0 22px}.world-intro h1 em,.world-note h2 em{color:var(--accent);font-weight:400}.world-intro p:last-child{font-size:14px;color:var(--muted);max-width:550px;margin:0;line-height:1.85}.world-intro>.button{margin-bottom:4px;white-space:nowrap}.experience{border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;background:var(--surface)}.world-chrome{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 22px;border-bottom:1px solid var(--line);background:var(--surface)}.world-chrome>span{font-size:10px;letter-spacing:1.4px;font-weight:600}.world-chrome>div{display:flex;align-items:center;gap:20px}#level-progress{font-size:11px;color:var(--muted)}.view-toggle{display:flex;gap:3px;border:1px solid var(--line);padding:3px;border-radius:var(--radius)}.view-toggle button{background:transparent;border:0;border-radius:2px;padding:8px 13px;font-size:11px;min-height:36px;color:var(--muted)}.view-toggle button[aria-pressed=true]{background:var(--green);color:var(--paper)}#viewport{position:relative;height:560px;background:var(--paper);overflow:hidden}#world{display:block;width:100%;height:100%;touch-action:pan-y}#world:focus-visible{outline-offset:-4px}#scene-status{position:absolute;left:22px;bottom:13px;font-size:10px;color:var(--muted);pointer-events:none;max-width:calc(100% - 44px);padding:6px 10px;border-radius:var(--radius);background:var(--surface)}.world-caption{position:absolute;bottom:60px;left:26px;max-width:calc(100% - 180px);padding:16px 20px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);pointer-events:none;user-select:none}.world-caption>span{color:var(--accent);font-size:9px;letter-spacing:1.1px}.world-caption h2{font:400 25px/1.2 var(--font-serif);letter-spacing:-.5px;margin:8px 0}.world-caption p{font-size:11px;color:var(--muted);margin:0}.game-hud{position:absolute;right:20px;top:18px;display:flex;gap:8px}.game-hud .button:not(.dark){background:var(--surface);color:var(--ink)}.game-hud .button{font-size:11px;box-shadow:0 3px 10px #22332f0b}.game-hud .dark:enabled{background:var(--green);color:var(--on-dark)}.movement{position:absolute;right:22px;bottom:58px;display:flex;flex-direction:column;align-items:center;gap:8px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.joystick{width:112px;height:112px;border:1px solid #9da996;border-radius:50%;background:#f5f3edea;position:relative;padding:0;box-shadow:inset 0 0 0 10px #82977c12,0 6px 18px #22332f12;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.joystick-thumb{position:absolute;left:35px;top:35px;width:40px;height:40px;border-radius:50%;background:var(--green);border:1px solid #3e5d4b;box-shadow:0 3px 8px #22332f25;pointer-events:none}.joystick.engaged{border-color:var(--accent);box-shadow:0 0 0 4px #ae4d3212}.joystick-label{font-size:10px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:3px 8px;pointer-events:none}.control-hint{background:var(--surface);border-radius:var(--radius);padding:4px 8px;position:absolute;left:26px;bottom:43px;font-size:9px;color:var(--muted);max-width:calc(100% - 175px)}.skip-label{display:flex;justify-content:space-between;gap:18px;padding:19px 22px 10px;font-size:9px;letter-spacing:1.2px;color:var(--muted);border-top:1px solid var(--line)}.destinations{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;padding:8px 12px 14px}.destinations button{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);text-align:left;padding:15px;min-height:100px}.destinations button:hover,.destinations button[aria-pressed=true]{background:var(--surface-soft);border-color:#9daf95}.destinations span{display:block;font-size:9px;color:var(--accent);letter-spacing:.5px}.destinations strong{display:block;font-size:13px;font-weight:550;margin:6px 0 3px}.destinations small{font-size:10px;color:var(--muted)}.destinations button[data-complete=true] small::after{content:' · Visited';color:var(--green)}#fallback-map[hidden]{display:none}#viewport.map-mode{height:auto;min-height:520px}#viewport.map-mode>#world,#viewport.map-mode>.movement,#viewport.map-mode>.game-hud,#viewport.map-mode>.world-caption,#viewport.map-mode>.control-hint{display:none}#fallback-map{padding:30px 28px 58px;background:var(--paper);min-height:520px}.fallback-heading h2{font:400 30px/1.2 var(--font-serif);letter-spacing:-.8px;margin:0}.fallback-heading .eyebrow{font-size:9px;margin-bottom:10px}.fallback-heading p{font-size:12px;line-height:1.8;margin:10px 0 24px;color:var(--muted)}.fallback-locations{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.fallback-place{display:flex;align-items:center;gap:18px;position:relative;text-align:left;padding:20px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);min-height:130px;transition:background .15s,border-color .15s}.fallback-place:hover,.fallback-place[aria-pressed=true]{border-color:#9daf95;background:var(--surface-soft)}.place-art{position:relative;width:76px;flex-shrink:0}.place-art svg{display:block;width:76px;overflow:visible}.place-art>b{position:absolute;top:-4px;left:0;color:var(--accent);font-size:9px;letter-spacing:.5px;font-weight:500}.place-copy small{display:block;font-size:8px;letter-spacing:.7px;color:var(--accent)}.place-copy strong{display:block;font-size:14px;font-weight:550;line-height:1.4;margin:7px 0 4px}.place-copy>span{font-size:10px;color:var(--muted)}.place-arrow{position:absolute;top:12px;right:12px;font-size:12px;color:var(--muted)}.map-mode~.skip-label,.map-mode~.destinations{display:none}.world-note{padding:70px 0;display:grid;grid-template-columns:1fr 1fr;gap:70px;align-items:end}.world-note h2{font:400 36px/1.15 var(--font-serif);letter-spacing:-1.2px;margin:0}.world-note p:not(.eyebrow){font-size:13px;color:var(--muted);line-height:1.9;max-width:440px}.world-note .text-link{font-size:12px}
dialog{padding:0;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper);color:var(--ink);width:min(820px,calc(100% - 40px));max-height:calc(100dvh - 48px);box-shadow:0 24px 100px #15231c40;overflow:hidden}dialog:not([open]){display:none}dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}dialog::backdrop{background:#19332966;backdrop-filter:blur(4px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 23px;border-bottom:1px solid var(--line);font-size:9px;letter-spacing:1px;color:var(--muted)}#detail{padding:26px 30px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}#detail>.eyebrow{font-size:9px;margin-bottom:14px}#detail h2{font:400 34px/1.15 var(--font-serif);letter-spacing:-1px;margin:0 0 17px}#detail .role{font-size:12px;color:var(--accent);margin:0 0 18px}#detail>p:not(.eyebrow):not(.role){font-size:14px;color:var(--muted);line-height:1.85}#detail ul{padding-left:20px;font-size:13px;line-height:1.9;color:var(--muted);margin:18px 0}.chapter-navigation{display:flex;justify-content:space-between;gap:12px;padding:14px 24px;border-top:1px solid var(--line);background:var(--paper)}.chapter-navigation .button{font-size:11px}.is-lab{width:min(880px,calc(100% - 40px))}.is-lab .chapter-navigation{display:none}.is-lab #detail{padding:22px 26px}.is-lab #detail h2{font-size:30px;margin-bottom:8px}.is-lab #detail>p{font-size:12px!important;margin-bottom:18px}.demo{padding:22px;margin-top:26px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.demo h3{font:400 23px/1.2 var(--font-serif);letter-spacing:-.3px;margin:0 0 10px}.demo p{font-size:12px;line-height:1.8;color:var(--muted)}.demo pre{font:11px/1.9 ui-monospace,Consolas,monospace;padding:16px;background:var(--surface-soft);border-radius:var(--radius);white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink)}.demo .button{font-size:11px;margin-top:8px}.demo .result{color:var(--green);font-size:12px;margin:16px 0 0}.flow{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.flow span{padding:9px 12px;border:1px solid var(--line);background:var(--paper);border-radius:var(--radius);font-size:11px}.flow span.active{background:var(--green);border-color:var(--green);color:var(--paper)}.trace{display:grid;gap:14px;font-size:11px}.trace span{display:block;height:7px;margin-top:8px;background:#b5bdad;border-radius:4px}.trace .after{width:5%;background:var(--accent)}.chapter-patent{border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin-top:23px;background:var(--surface-soft)}.chapter-patent .eyebrow{font-size:9px;margin-bottom:10px}.chapter-patent strong{font-size:13px;font-weight:550}.chapter-patent p{font-size:12px;line-height:1.8;color:var(--muted);margin:8px 0}.chapter-patent small{display:block;font-size:10px;color:var(--muted)}.chapter-patent .text-link{font-size:11px;margin-top:8px}
.physics-stage{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);overflow:hidden}.physics-stage-top{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;font-size:9px;letter-spacing:1.3px;color:var(--muted);border-bottom:1px solid var(--line)}.physics-engine{color:var(--green);letter-spacing:.3px;font-weight:650}.physics-scene{display:block;width:100%;height:clamp(185px,30vh,300px);background:var(--surface);touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;outline-offset:-4px}.physics-scene.dragging{cursor:grabbing}.physics-grid-line{stroke:var(--line);stroke-width:1;opacity:.6}.physics-reference{stroke:var(--sage);stroke-dasharray:5 6;stroke-width:1;opacity:.65}.physics-trail{stroke:var(--sage);stroke-width:1;stroke-dasharray:3 6;opacity:.6}.physics-support{stroke:var(--green);stroke-width:5;stroke-linecap:round}.physics-rod{stroke:var(--green);stroke-width:5;stroke-linecap:round}.physics-pivot{fill:var(--green)}.physics-bob-shadow{fill:#22332f12}.physics-bob{fill:var(--accent);stroke:#8a3926;stroke-width:2}.physics-caption{font:11px var(--font-sans);fill:var(--muted)}.physics-readouts{display:grid;grid-template-columns:repeat(3,1fr);padding:15px 18px;border-top:1px solid var(--line);gap:18px}.physics-readouts>div:not(:first-child){border-left:1px solid var(--line);padding-left:24px}.physics-readouts span{display:block;font-size:8px;letter-spacing:1.3px;color:var(--muted);margin-bottom:4px}.physics-readouts strong{font:400 25px/1.15 var(--font-serif);letter-spacing:-.6px}.physics-readouts small{font:10px var(--font-sans);letter-spacing:0;color:var(--muted)}.physics-controls{display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:10px;margin-top:14px}.physics-controls .button{font-size:11px;padding-inline:12px}.physics-bottom{display:grid;grid-template-columns:1fr 1fr;gap:25px;align-items:center;margin-top:18px}.physics-bottom label{font-size:10px;color:var(--muted);display:block}.physics-bottom output{float:right;color:var(--ink);font-weight:600}.physics-bottom input{display:block;width:100%;min-height:32px;accent-color:var(--green);margin:5px 0 0}.physics-bottom p{font-size:11px;line-height:1.7;color:var(--green);margin:0}.physics-instructions{font-size:10px;color:var(--muted);line-height:1.7;margin:14px 0 0}.physics-error{padding:15px;background:var(--accent-soft);border:1px solid #c69d87;border-radius:var(--radius);margin-top:14px}.physics-error[hidden]{display:none}.physics-error p{font-size:12px;margin:0 0 12px}
@media(max-width:1050px){.world-chrome{gap:16px}.world-chrome>div{gap:12px}.world-chrome>span{font-size:9px}.fallback-place{padding:18px 14px;gap:10px}.place-art,.place-art svg{width:63px}.place-copy strong{font-size:13px}}
@media(max-width:760px){.world-intro{padding:38px 0 28px;gap:24px}.world-intro h1{font-size:45px}.world-intro p:last-child{font-size:12px}.world-intro>.button{font-size:11px;padding:11px 15px}.world-chrome{flex-wrap:wrap;padding:14px 18px}.world-chrome>span{display:none}.world-chrome>div{width:100%;justify-content:space-between;gap:10px}.world-chrome #level-progress{font-size:10px}.view-toggle button{font-size:10px;padding-inline:11px}.world-chrome .button{font-size:10px;padding:9px 10px}#viewport{height:490px}.fallback-locations{grid-template-columns:repeat(2,1fr)}#fallback-map{padding:25px 22px 55px}.fallback-place{min-height:126px}.place-copy strong{font-size:13px}.world-note{padding:50px 0;gap:36px}.world-note h2{font-size:31px}.world-note p:not(.eyebrow){font-size:12px}.world-caption{left:16px;max-width:calc(100% - 155px);padding:13px 15px}.world-caption h2{font-size:21px}.world-caption p{font-size:10px}.movement{right:15px}.joystick{width:108px;height:108px}.joystick-thumb{left:33px;top:33px}.control-hint{left:16px;max-width:calc(100% - 145px);font-size:8px}.destinations{grid-template-columns:repeat(3,1fr)}.game-hud{right:12px;top:12px;gap:6px}.game-hud .button{font-size:10px;padding:9px 12px}.skip-label{font-size:8px}#scene-status{font-size:9px;left:16px}.is-lab #detail{padding:20px}.physics-readouts strong{font-size:24px}.physics-readouts{padding:12px 15px}.physics-readouts>div:not(:first-child){padding-left:18px}}
@media(max-width:520px){.world-intro{display:block;padding-top:32px}.world-intro h1{font-size:44px;margin-bottom:18px}.world-intro>.button{margin-top:24px}.world-intro .eyebrow{font-size:8px}.world-chrome>div{flex-wrap:wrap}.world-chrome #level-progress{width:100%;margin-bottom:3px}.view-toggle{flex:1}.view-toggle button{flex:1}.world-chrome .button{min-height:40px}.fallback-heading h2{font-size:27px}.fallback-heading p{font-size:11px}.fallback-heading .eyebrow{font-size:8px}.fallback-locations{gap:10px}.fallback-place{flex-direction:column;align-items:flex-start;padding:17px;min-height:185px;gap:9px}.place-art,.place-art svg{width:66px}.place-copy small{font-size:8px}.place-copy strong{font-size:13px}.place-copy>span{font-size:9px}#fallback-map{padding:25px 18px 55px}.world-note{grid-template-columns:1fr;gap:22px}.world-note h2{font-size:33px}.world-note .eyebrow{margin-bottom:15px}.world-note p{margin-bottom:12px}.destinations{grid-template-columns:repeat(2,1fr)}dialog,.is-lab{width:calc(100% - 24px);max-height:calc(100dvh - 24px)}.dialog-top{padding:10px 14px;font-size:8px}.dialog-top .icon-button{width:40px;height:40px}#detail{padding:22px 20px}#detail h2{font-size:30px}#detail .role{font-size:11px}#detail>p:not(.eyebrow):not(.role){font-size:12px}#detail ul{font-size:12px}.chapter-navigation{padding:12px 15px;gap:10px}.chapter-navigation .button{font-size:10px;gap:12px;padding-inline:13px}.demo{padding:17px}.demo h3{font-size:22px}.is-lab #detail{padding:18px 16px}.is-lab #detail h2{font-size:27px}.is-lab #detail>p{font-size:11px!important;margin-bottom:14px}.physics-stage-top{padding:10px 12px;font-size:8px}.physics-scene{height:200px}.physics-readouts{padding:12px;gap:10px}.physics-readouts>div:not(:first-child){padding-left:12px}.physics-readouts strong{font-size:23px}.physics-readouts small{font-size:8px}.physics-readouts span{font-size:7px}.physics-controls{gap:7px;margin-top:12px}.physics-controls .button{font-size:10px;padding:10px 7px;gap:5px}.physics-bottom{grid-template-columns:1fr;gap:8px;margin-top:14px}.physics-bottom p{font-size:10px;min-height:17px}.physics-instructions{font-size:9px;margin-top:11px}.physics-bottom label{font-size:10px}.physics-bottom input{margin-top:1px}.physics-caption{font-size:12px}.game-hud{left:12px;right:12px;justify-content:space-between}.game-hud .button{font-size:9px;padding-inline:10px}.world-caption{bottom:70px;max-width:calc(100% - 140px)}.world-caption h2{font-size:18px}.desktop-hint{display:none}}
@media(max-width:360px){#fallback-map{padding-inline:15px}.fallback-place{padding:14px;min-height:185px}.place-copy small{font-size:7px}.physics-controls .button{font-size:9px}.physics-readouts strong{font-size:21px}.view-toggle button{font-size:9px;padding-inline:8px}.world-chrome .button{font-size:9px}.world-chrome{padding-inline:15px}}

.game-hud{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100% - 24px)}

.destinations .chapter-front{display:block;width:100%;height:clamp(65px,8vw,110px);object-fit:cover;object-position:center 55%;margin:0 0 12px;border-radius:4px}

.store-names{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}.store-name{visibility:hidden;position:absolute;white-space:nowrap;pointer-events:auto;font:600 13px/1.15 system-ui,sans-serif;letter-spacing:.01em;color:#fffaf1;background:#20332e;border:1px solid #89968d;border-radius:6px;padding:5px 9px;box-shadow:0 2px 5px #19262033}.store-name:focus-visible{outline:3px solid #f4b862}.map-mode .store-names{display:none}

/* A touch pedal, never a desktop HUD button. Higher specificity than .button. */
#drive-brake{display:none;touch-action:none;user-select:none}
@media (pointer:coarse){#drive-brake:not([hidden]){display:inline-flex}#drive-brake:active{background:var(--ink);color:var(--paper)}}
