/* Material Pass sits inside the original sticky story and content grid. */
@property --load-fill { syntax:'<percentage>'; inherits:true; initial-value:0%; }
#stage { transition:--load-fill .22s ease-out; }
.load-word {
  position:absolute; inset:0; margin:0; display:grid; place-items:center; pointer-events:none;
  font:700 19.1vw/.95 var(--font-display); letter-spacing:-.035em;
  opacity:1; transition:opacity .78s ease-in-out,transform .88s cubic-bezier(.22,.68,.25,1);
}
.load-word span {
  color:transparent; background:linear-gradient(90deg,#d4d6cf var(--load-fill),#353a3c var(--load-fill));
  -webkit-background-clip:text; background-clip:text;
}
body[data-load="ready"] .load-word {opacity:.105;transform:translateY(-31%)}
body[data-step]:not([data-step="0"]) .load-word,body[data-load="failed"] .load-word {opacity:0}
body[data-load="failed"] .load-word {visibility:hidden}
@media(max-width:760px){body[data-load="ready"] .load-word{transform:translateY(-18%)}}
body:not([data-load="failed"]) #home-view .home-poster {visibility:hidden}
body:not([data-load="failed"]) #scene-status {width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#home-view canvas {opacity:0;transition:opacity .78s ease-in-out}
body[data-load="ready"] #home-view canvas {opacity:1}
body.reduced :is(#stage,.load-word,#home-view canvas) {transition:none}
@media(prefers-reduced-motion:reduce) { :is(#stage,.load-word,#home-view canvas) {transition:none} }
.sound-essay {
  padding:clamp(80px,13svh,152px) var(--page-edge); min-height:85svh; box-sizing:border-box;
  display:flex; flex-direction:column; justify-content:center; border-top:1px solid var(--rule,#43494b);
}
.sound-essay h2 {margin:0; font:700 clamp(38px,6.3vw,96px)/1.04 var(--font-display);letter-spacing:-.025em;color:var(--ink)}
.essay-columns {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--group-gap);margin-top:clamp(32px,7vh,80px);border-top:1px solid #424749;padding-top:24px}
.essay-columns p {max-width:49ch;margin:0;color:#c0c5c0;font:400 clamp(14px,1.15vw,17px)/1.72 var(--font-mono)}
@media(max-width:760px){.essay-columns{grid-template-columns:1fr;gap:18px}.sound-essay{min-height:0}}
#model {
  inset:0; width:100%; height:100%; max-width:none; transform:none;
  will-change:auto; transition:none;
}
.view { position:relative; display:grid; place-items:center; }
#home-view { height:100%; width:100%; }
.home-poster {
  position:absolute; width:min(90%,121svh); aspect-ratio:1586 / 992;
  left:50%; top:50%; transform:translate(-50%,-50%);
}
.view img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.view canvas {
  position:absolute; inset:0; display:block; width:100%; height:100%; touch-action:pan-y pinch-zoom;
}
.view[data-live] img, .view[data-live] .lamp { visibility:hidden; }
.view .lamp { opacity:0; }
.view .lamp.on { opacity:1; }
.view:focus-visible { outline-offset:-4px; outline-color:#8b806a; }
#stage .meta { opacity:1; align-items:start; }
#stage .meta>span { padding-top:9px; }
.view-actions {
  display:flex; justify-content:flex-end; align-items:flex-start; gap:6px 14px;
  white-space:nowrap; font:400 11px/1.3 var(--font-mono);
}
#stage .meta .view-actions>label { min-height:32px; color:#858f8c; font-size:10px; }
#stage .meta .view-actions input[type="checkbox"] { width:14px;height:14px; }
.view-actions>button, .view-tools>summary {
  display:inline-flex; align-items:center; justify-content:center; min-height:32px;
  color:#9fa9a6; padding:3px 5px; font:inherit; border:0; border-radius:0;
  background:none; cursor:pointer; list-style:none;
}
.view-tools>summary::-webkit-details-marker {display:none}
.view-actions>button[aria-pressed="true"] { color:#d5a15e; border:0; }
.view-actions>button:hover, .view-tools>summary:hover { color:#e4e5dc; }
.view-tools { position:relative; }
.view-actions>button[hidden], .view-tools[hidden] { display:none; }
.view-tools[open] > summary { color:#e4e5dc; text-decoration:underline; text-underline-offset:4px; }
.tool-panel {
  position:absolute; z-index:10; right:0; top:calc(100% + 5px); width:max-content;
  max-width:calc(100vw - 2 * var(--page-edge)); padding:12px;
  background:#1b1f22; border:1px solid #454d4e;
}
.tool-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.tool-row+.tool-row { margin-top:10px; }
.tool-row label { display:flex; align-items:center; gap:8px; }
.tool-row input[type=range] { min-height:32px; width:83px; }
.tool-row button, .alpha-retry {
  color:#c7cecb; font:400 11px/1.3 var(--font-mono); padding:6px 8px;
  min-height:34px; border:1px solid #535d5e; background:#1b1f22;
}
.tool-row button:disabled { opacity:.5; }
.tool-row button.is-pressed { color:#f1b36b; border-color:#a37846; }
.alpha-signal { width:7px; height:7px; border-radius:50%; background:#584534; }
.alpha-signal.on { background:#ffc570; box-shadow:0 0 9px #e8a34b; }
#scene-status, #retry-home { position:absolute; left:var(--page-edge); z-index:8; }
#scene-status { top:56px; margin:0; font-size:11px; }
#retry-home { top:82px; }
#stage .panel {
  opacity:var(--chapter-opacity,0); visibility:hidden;
  transform:translateY(var(--chapter-offset,0px)); transition:none;
}
#stage .panel[data-visible] { visibility:visible; }
body.reduced #stage .panel { transform:none; }
#explore { margin-top:var(--section-gap); border-top:1px solid #43494b; padding-top:32px; }
.explore-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.explore-head p { color:#98a29f; max-width:52ch; font-size:12px; margin:14px 0 3px; }
#explore-view {
  width:calc(100% + var(--page-edge)*2); margin-inline:calc(-1 * var(--page-edge)); height:clamp(300px,78svh,900px); }
#explore-view[data-live] canvas { cursor:grab; }
#explore-view[data-live] canvas:active { cursor:grabbing; }
#explore-view[data-live] canvas[data-control] { cursor:pointer; }
#explore-view[data-live] canvas[data-control="knob"] { cursor:ns-resize; }
#home-view canvas[data-control] { cursor:pointer; }
#home-view canvas[data-control="knob"] { cursor:ns-resize; }
@media(max-width:760px) {
  .view-actions { gap:3px; font-size:10px; }
  #stage .meta .view-actions>label { font-size:9px; gap:3px; }
  #stage .meta .view-actions>label input { margin-right:5px; }
  #explore-view { height:clamp(300px,62svh,600px); }
  .explore-head { gap:8px; }
  .explore-head p { font-size:11px; }
}
#explore-view {height:clamp(340px,87svh,1040px)}
#explore-view canvas {touch-action:pan-y}
#explore-view[data-zoomed] canvas {touch-action:none}
@media(max-width:760px){#explore-view{height:clamp(340px,70svh,700px)}}
.zoom-tools {display:none;position:absolute;right:var(--page-edge);bottom:14px;z-index:3;gap:6px}
#explore-view[data-live][data-zoomed] .zoom-tools {display:flex}
.zoom-tools button {font:12px var(--font-mono);color:var(--ink);background:#1a1e20ed;border:1px solid #626966;padding:7px 12px;min-height:40px}
.zoom-tools [aria-pressed=true] {color:#e7c496;border-color:#aa8b63}
#explore-view[data-pan] canvas {cursor:move}
#explore:has(#explore-view[data-live]) {display:grid;grid-template-rows:auto minmax(0,1fr);height:100svh;min-height:320px;box-sizing:border-box}
#explore-view[data-live] {height:100%;min-height:0}
