:root{color-scheme:dark;--bg:#08090a;--ink:#f1f0e9;--muted:#858987;--line:rgba(224,232,227,.16);--accent:#f2f2f2}
*{box-sizing:border-box}html{background:var(--bg);scroll-behavior:auto}body{margin:0;color:var(--ink);font-family:Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased;overflow-x:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:6px}a{color:inherit;text-decoration:none}button{touch-action:manipulation}.skip{position:fixed;top:-100px;left:24px;z-index:60;background:#222;padding:14px}.skip:focus{top:18px}
#experience{height:calc(100svh + 550svh * var(--scroll-end,.78));position:relative}.stage{height:100svh;position:sticky;top:0;overflow:hidden;isolation:isolate}.ambient{position:absolute;inset:0;background:radial-gradient(ellipse at 54% 46%,#1b20201f 0%,#08090a00 60%);pointer-events:none}#viewport{position:absolute;inset:0}#viewport canvas{display:block;width:100%;height:100%}#fallback{position:absolute;left:50%;top:53%;width:min(100vw,850px);height:auto;transform:translate(-50%,-50%);object-fit:contain}.ready #fallback{display:none}.masthead{position:absolute;inset:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;padding:35px 42px;gap:20px;z-index:4}.identity{display:flex;flex-direction:column;gap:12px}.edition{display:flex;align-items:center;gap:9px;color:#a9aeab;font-family:monospace;font-size:9px;letter-spacing:.18em}.edition-dash{display:inline-block;width:17px;height:2px;background:linear-gradient(90deg,#f6df90,#f1b4bd,#b4bde5,#abc9b3);opacity:.8}.info-button{width:24px;height:24px;border:1px solid #454b47;border-radius:50%;font-family:Georgia,serif;font-size:13px;color:#b7bcb7}.info-button:hover{color:white;border-color:#b7bcb7}.edge-mark{position:absolute;top:50%;height:31px;width:5px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.edge-mark-left{left:0;border-right:1px solid var(--line)}.edge-mark-right{right:0;border-left:1px solid var(--line)}
.hud{position:absolute;left:42px;right:42px;bottom:78px;display:flex;justify-content:space-between;align-items:flex-end;z-index:4;pointer-events:none}.explore{display:flex;gap:15px;align-items:center}.explore>div{display:flex;flex-direction:column;gap:8px}.scroll-symbol{font-size:22px;line-height:1;width:28px;height:42px;display:grid;place-items:center;border:1px solid #ffffff22;border-radius:16px}.explore span:not(.scroll-symbol){font-size:11px;font-weight:400;letter-spacing:.02em}.explore small{font:9px monospace;color:#7b847e;letter-spacing:.02em}.legend{display:flex;align-items:flex-end;gap:21px;color:#929b93}.legend-item{display:flex;flex-direction:column;align-items:center;gap:9px}.legend-item>span:last-child{font:7px monospace;letter-spacing:.14em;color:#727a74}kbd{font:9px monospace;display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border:1px solid #343b37;border-radius:4px;color:#b1bab2;background:rgba(8,9,10,.4);box-shadow:0 1px 0 #343b37}.arrows{display:flex;flex-direction:column;align-items:center;gap:3px}.arrows>span{display:flex;gap:3px}.arrows kbd{min-width:19px;height:18px}.button-pair{display:flex;gap:5px}.button-pair kbd{border-radius:50%;width:27px;height:27px}.wide{font-size:7px;min-width:42px;height:20px;border-radius:12px}.view-controls{position:absolute;left:50%;bottom:33px;display:flex;transform:translateX(-50%);gap:2px;z-index:5}.view-controls button{height:22px;width:20px;display:grid;place-items:center;padding:0}.view-controls span{width:3px;height:3px;border-radius:100%;background:#515952;transition:background .15s ease,box-shadow .15s ease}.view-controls button[aria-current=true] span{background:var(--ink);box-shadow:0 0 0 3px #c8d4b51c}.view-controls button:hover span{background:var(--ink)}.bottom-line{position:absolute;bottom:35px;left:42px;right:42px;display:flex;justify-content:flex-end;align-items:center;font:7px monospace;letter-spacing:.14em;color:#687369}.bottom-line .separator{padding:0 9px;color:#3b463e}.bottom-line button{color:#879489;font:9px monospace;letter-spacing:0;min-height:20px}.bottom-line button span{padding-left:8px}.progress{position:absolute;bottom:0;left:0;right:0;height:1px;background:#222823}.progress>div{height:100%;width:100%;transform:scaleX(0);transform-origin:left;background:#b3c39a;will-change:transform}.render-status{position:absolute;left:50%;top:60%;transform:translateX(-50%);text-align:center;font:11px monospace;color:#b0b9ac;max-width:300px}.render-status:empty{display:none}
dialog{width:min(460px,calc(100% - 36px));padding:44px;background:#121613;border:1px solid #354035;border-radius:4px;color:var(--ink);box-shadow:0 40px 100px #0008}dialog::backdrop{background:#0009;backdrop-filter:blur(12px)}.dialog-close{position:absolute;right:13px;top:10px;width:30px;height:30px;color:#98a295;font-size:24px;font-weight:200}.eyebrow{font:9px monospace;color:#a7b69b;letter-spacing:.2em}dialog h1{font-size:34px;line-height:1.1;letter-spacing:-.055em;font-weight:500;margin:24px 0}dialog p{font-size:13px;line-height:1.75;color:#a6afa5}dialog a{display:inline-flex;gap:55px;border-bottom:1px solid #4c5947;padding-bottom:9px;margin-top:15px;font:10px monospace;color:#d8e3cd}.no-script{position:fixed;bottom:20px;left:20px;background:#222;padding:12px;font-size:12px}
@media(min-width:1600px){.masthead{padding:45px 60px}.hud{left:60px;right:60px;bottom:95px}.bottom-line{left:60px;right:60px;bottom:42px}.view-controls{bottom:40px}}
@media(max-width:700px){#experience{height:calc(100svh + 520svh * var(--scroll-end,.78))}.masthead{padding:25px 22px}.edition{font-size:7px;letter-spacing:.14em;gap:7px}.identity{gap:10px}.edition-dash{width:12px}.info-button{width:21px;height:21px;font-size:11px}.hud{left:22px;right:22px;bottom:93px;align-items:flex-end}.explore{gap:9px}.explore>div{gap:5px}.explore span:not(.scroll-symbol){font-size:9px}.explore small{font-size:7px;max-width:115px}.scroll-symbol{font-size:18px;width:23px;height:34px}.legend{gap:9px}.legend-item{gap:7px}.legend-item>span:last-child{font-size:6px;letter-spacing:.03em}kbd{min-width:15px;height:16px;font-size:7px}.arrows{gap:2px}.arrows>span{gap:2px}.arrows kbd{min-width:13px;height:13px;font-size:7px}.button-pair{gap:3px}.button-pair kbd{width:19px;height:19px}.wide{min-width:30px;height:15px;font-size:5px}.bottom-line{bottom:23px;left:22px;right:22px;font-size:5px;letter-spacing:.06em}.bottom-line .separator{padding:0 5px}.bottom-line button{font-size:7px}.view-controls{bottom:52px}.view-controls button{width:24px;height:24px}dialog{padding:34px}.edge-mark{display:none}}
@media(max-width:365px){.masthead{padding:23px 16px}.hud{left:16px;right:16px}.legend{gap:7px}.explore small{max-width:85px}.bottom-line{left:16px;right:16px}}
@media(max-height:550px) and (min-width:701px){.masthead{padding:24px 30px}.hud{bottom:62px;left:30px;right:30px}.bottom-line{bottom:20px;left:30px;right:30px}.view-controls{bottom:18px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.source-links{display:flex;flex-direction:column;align-items:flex-start;gap:13px;margin-top:26px}.source-links a{font-size:11px;line-height:1.5}dialog{max-height:calc(100svh - 48px);overflow:auto}
/* Keep the controls in one stable compositor layer above the redrawn WebGL canvas. */
.interface{position:absolute;inset:0;z-index:4;transform:translateZ(0);pointer-events:none}
.interface button,.interface a{pointer-events:auto}

.view-controls [hidden]{display:none}

/* Edge-to-edge square images; presentation only, original pixels retained. */
.mosaic{position:absolute;inset:0;overflow:hidden;pointer-events:none;background:#181a1c}
.mosaic-grid{display:grid;grid-template-columns:repeat(var(--mosaic-columns),minmax(0,1fr));grid-auto-rows:var(--mosaic-tile);gap:0;filter:grayscale(1) brightness(.48) contrast(.90);opacity:.82}
.mosaic-tile{min-width:0;min-height:0;overflow:hidden}
.mosaic-tile img{display:block;width:100%;height:100%;object-fit:cover}
.mosaic-game img{image-rendering:pixelated}
.ambient{background:radial-gradient(ellipse at 50% 47%,rgba(8,9,10,.70) 0%,rgba(8,9,10,.47) 28%,rgba(8,9,10,.08) 77%),linear-gradient(180deg,rgba(8,9,10,.55) 0%,rgba(8,9,10,.03) 23%,rgba(8,9,10,.03) 75%,rgba(8,9,10,.62) 100%)}
@media(max-width:700px){.ambient{background:radial-gradient(ellipse at 50% 46%,rgba(8,9,10,.66) 0%,rgba(8,9,10,.36) 35%,rgba(8,9,10,.04) 80%),linear-gradient(180deg,rgba(8,9,10,.58) 0%,transparent 24%,transparent 72%,rgba(8,9,10,.65) 100%)}}

/* Brand artwork and the primary display control form one compact left column. */
.brand-controls{display:flex;flex-direction:column;align-items:flex-start;gap:21px}
.brand-logo{display:block;width:168px;height:auto;filter:brightness(0) invert(1)}
.power{display:flex;align-items:center;gap:11px;min-height:44px;min-width:156px;padding:0 14px;border:1px solid #b8b8b873;border-radius:24px;background:rgba(12,12,12,.82);box-shadow:0 4px 18px #0003;backdrop-filter:blur(10px);font:500 13px monospace;letter-spacing:.02em;color:#f2f2f2;transition:border-color .2s ease,background .2s ease}
.power:hover{border-color:#f2f2f2;background:rgba(28,28,28,.94)}
.power-light{display:block;flex:none;width:6px;height:6px;background:#a0a0a0;border-radius:50%}
.power-switch{display:block;flex:none;position:relative;width:34px;height:19px;margin-left:auto;border:1px solid #929292;border-radius:12px;background:#1b1b1b}
.power-switch:after{content:'';position:absolute;left:3px;top:3px;width:11px;height:11px;border-radius:50%;background:#cdcdcd;transition:transform .2s ease,background .2s ease}
.power[aria-pressed=true]{border-color:#bdbdbd;background:rgba(30,30,30,.94)}
.power[aria-pressed=true] .power-switch:after{transform:translateX(15px);background:var(--accent)}
.power[aria-pressed=true] .power-light{background:var(--accent);box-shadow:0 0 8px #f2f2f255}
@media(min-width:1600px){.brand-logo{width:184px}}
@media(max-width:700px){.brand-controls{gap:15px}.brand-logo{width:148px}.power{min-width:148px;padding:0 12px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.power,.power-switch:after{transition:none}}

/* Hit regions follow projected CAD controls, never intercepting the LCD or
   the surrounding area used to scroll. */
.device-controls{position:absolute;inset:0;z-index:3;pointer-events:none}
.device-controls[hidden]{display:none}
.qa-status{position:fixed;bottom:2px;left:3px;z-index:8;pointer-events:none;font:10px monospace;background:#000c;color:#f2f2f2;padding:3px}
.device-key{position:absolute;left:0;top:0;padding:0;border:0;border-radius:50%;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;background:transparent}
.device-key:focus-visible{outline:2px solid #f2f2f2;outline-offset:1px}
.device-key[data-pressed=true]:not(.direction){background:#f2f2f225;box-shadow:inset 0 0 0 1px #f2f2f266}
.direction{border-radius:0}
.direction-up{clip-path:polygon(0 0,100% 0,50% 50%)}
.direction-right{clip-path:polygon(100% 0,100% 100%,50% 50%)}
.direction-down{clip-path:polygon(100% 100%,0 100%,50% 50%)}
.direction-left{clip-path:polygon(0 100%,0 0,50% 50%)}
.direction[data-pressed=true]{background:#f2f2f222}
@media(max-width:700px),(pointer:coarse){
  /* Cover Safari's expanded viewport without resizing the 3D camera every
     time its address bar retracts. The controls keep stable small-vh framing. */
  .mosaic,.ambient{position:fixed;bottom:auto;height:100lvh}
  .masthead{padding-top:max(22px,env(safe-area-inset-top));padding-left:max(22px,env(safe-area-inset-left));padding-right:max(22px,env(safe-area-inset-right))}
  .power{backdrop-filter:none}
  .info-button{width:44px;height:44px;margin-top:-10px;border-color:transparent}
  .hud{bottom:calc(66px + env(safe-area-inset-bottom));left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right))}
  .legend{display:none}
  .view-controls{bottom:calc(12px + env(safe-area-inset-bottom))}
  .view-controls button{width:40px;height:44px}
  .bottom-line{display:none}
  #fallback{top:54%;width:min(80vw,440px);max-height:65svh;object-fit:contain}
}
@media(pointer:coarse) and (orientation:landscape){
  .masthead{padding-top:20px;padding-bottom:0}
  .brand-logo{width:138px}.brand-controls{gap:14px}
  .hud{bottom:calc(20px + env(safe-area-inset-bottom))}
  .explore small{display:none}
}

#stage:focus{outline:none}
