/* Worldbound Tools — stage v3 (isolated preview, 4328)
   Structure of every .scene-art (back to front):
   .scene-art   — always full-viewport. Outgoing scene only: JS adds a slight scale/roll about the vanishing
                  point and a very wide feathered radial mask (the dissolve it is passed through). It is never
                  shrunk, rounded or bordered, so no scene can appear as a bounded card.
    └ .ambient  — slow CSS-only life at rest (drift, bank, sway); JS never writes it
       ├ .lens  — holds the depth planes (JS no longer scales it)
       │   poster (blurred inline floor) → far (5vw/5vh bleed) → shell (outgoing only: peripheral copy of far)
       │   → space (haze) → atmosphere (vignette) → mid (cut-out) → rush (rail verge loop, CSS) → near (occluder)
       └ light  — scene light/air, CSS-animated
    └ reading-shade (protects copy)
   During travel the scene being passed through (.is-outer) is on top with a transparent background; the scene
   the camera travels into (.is-inner) lies full-bleed beneath it. Inline transforms/masks are cleared on arrival.
   v3 revision: the floating rounded portal, its lit rim and the conic streak overlay were removed.
   The v2 traveller cutout is no longer used: a still rear-view cutout cannot walk convincingly. */
:root{font-family:"Helvetica Neue",Helvetica,Arial,system-ui,sans-serif;font-synthesis:none;color:#f4f8fc;background:#07131f;color-scheme:dark;--edge:clamp(20px,4vw,70px);--copy-bottom:clamp(150px,25vh,250px)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button,select{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #a4e9ff;outline-offset:4px}a{color:inherit}h1,h2,h3,p{margin:0}
.skip-link{position:fixed;z-index:70;top:9px;left:var(--edge);padding:12px 20px;border:0;border-radius:99px;color:#07131f;background:#fff;transform:translateY(-180%)}.skip-link:focus{transform:none}

/* ---------- stage + scenes ---------- */
.stage{position:relative;width:100vw;height:100vh;height:100dvh;min-height:360px;overflow:hidden;isolation:isolate;background:#0c1d2c}
.scene-stack,.scene{position:absolute;inset:0;width:100%;height:100%}
.scene{overflow:hidden;background:#0b1b2b}
.scene[hidden]{display:none!important}
/* origin 0 0: the controller's about() expresses every scale/roll about the vanishing point explicitly */
.scene-art{position:absolute;inset:0;overflow:hidden;pointer-events:none;contain:strict;transform-origin:0 0}
.scene-art>*,.ambient>*,.lens>*{position:absolute;pointer-events:none;backface-visibility:hidden;max-width:none}
.ambient,.lens{inset:0;transform-origin:0 0}
.lens>.far-plane,.lens>.mid-plane,.lens>.near-plane,.lens>.shell-plane{transform-origin:0 0}
/* during travel: the outgoing scene is see-through wherever its mask opens; the incoming scene stays full-bleed */
.scene.is-outer{background:transparent}
.scene.is-outer .scene-art{will-change:transform,opacity;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}
.scene.is-outer .lens>img,.scene.is-inner .lens>img{will-change:transform,opacity}
/* peripheral depth shell: same picture and geometry as the far plane; visible only while being passed through */
.shell-plane{top:-5vh;left:-5vw;width:calc(100% + 10vw);height:calc(100% + 10vh);object-fit:cover;object-position:var(--art-position);visibility:hidden;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}
.scene.is-outer .shell-plane[data-media="ready"][data-armed]{visibility:visible} /* armed = measured + masked by begin() */

/* poster: 48×27 inline image, blurred, always present underneath so a scene is never blank */
.poster-plane{inset:-6%;width:112%;height:112%;object-fit:cover;object-position:var(--art-position);filter:blur(20px) saturate(1.08)}
/* far: recognisable background with bleed; fades in only after load+decode */
.far-plane{top:-5vh;left:-5vw;width:calc(100% + 10vw);height:calc(100% + 10vh);object-fit:cover;object-position:var(--art-position);opacity:0;transition:opacity .3s ease}
.far-plane[data-media="ready"]{opacity:1}
/* cut-out layers stay invisible until decoded; failed layers simply never appear */
.mid-plane,.near-plane,.rail-rush img{visibility:hidden}
.mid-plane[data-media="ready"],.near-plane[data-media="ready"],.rail-rush img[data-media="ready"],.rail-rush{visibility:visible}
.mid-plane,.near-plane{inset:0;width:100%;height:100%;object-fit:cover}
.space-plane{inset:-8%;opacity:.2;background:var(--haze,linear-gradient(0deg,#0c22335c,transparent 60%))}
.atmosphere-plane{inset:0;background:linear-gradient(180deg,#040e18a8 0%,#040e1800 22%),radial-gradient(ellipse 120% 90% at 60% 45%,transparent 55%,#030b14a0 100%)}
.light-plane{inset:-12%;opacity:.3;background:var(--glow,radial-gradient(circle at 60% 40%,#fff1d050,transparent 40%))}
.reading-shade{inset:0;background:linear-gradient(0deg,#050f1ae6 0%,#06111c94 24%,#06121d10 52%,transparent 70%),linear-gradient(90deg,var(--shade-left,#04101aa0) 0%,#04101a40 34%,transparent 58%)}
.scene[data-media-state="failed"] .far-plane{display:none}
.scene[data-media-state="failed"] .image-fallback{display:block}


/* 01 LAX — light from the west windows; the camera leaves through the sunlit glazing */
.scene-home{--focus:72% 46%;--haze:linear-gradient(0deg,#2a17085a,transparent 55%),linear-gradient(90deg,transparent 40%,#ffb35a26 75%,transparent);--glow:radial-gradient(circle at 72% 44%,#ffd28a8c 0,#ffb4602e 14%,transparent 34%),linear-gradient(105deg,transparent 46%,#ffd9a018 56%,transparent 66%)}
/* 02 Flight — a darkened cabin window frame in front of the ocean */
.scene-flight{--focus:62% 55%;--haze:linear-gradient(180deg,#e6f4ff40,transparent 45%);--glow:linear-gradient(100deg,transparent 30%,#fff6dc2e 44%,transparent 58%);--shade-left:#030a12b8}
.scene-flight .near-plane{object-fit:fill;width:max(210vh,118vw);height:auto;aspect-ratio:3/2;left:min(0px,calc(56vw - max(105vh,59vw)));top:calc(50vh - max(70vh,39.34vw));inset-inline-end:auto;bottom:auto;filter:brightness(.5) saturate(.75)}
/* 03 Haneda — arrivals-lobby dolly down the hall axis */
.scene-airport{--focus:52% 47%;--haze:linear-gradient(0deg,#1d140a50,transparent 50%);--glow:radial-gradient(ellipse 40% 60% at 82% 38%,#ffe7b84a,transparent 70%),linear-gradient(80deg,transparent 52%,#fff0cc1c 62%,transparent 72%)}
/* 04 Tokyo — v4.2: one real, credited photograph (Minato skyline from Shibuya Stream, Tokyo Tower ≈67 % across).
   The generated street, its maple/lantern cut-out and the unfinished noren/lamp/bike placeholders are gone.
   No added light sources: haze/glow are kept nearly neutral so the photograph's own lights carry the frame. */
.scene-tokyo{--focus:67% 55%;--haze:linear-gradient(0deg,#0a142048,transparent 38%);--glow:radial-gradient(ellipse 50% 34% at 67% 72%,#ff9a5014,transparent 70%);--shade-left:#030b14b8}
.scene-tokyo .light-plane{opacity:.2}
.tky-poster{background:radial-gradient(ellipse 10% 26% at 67% 60%,#b4542e70,transparent 72%),radial-gradient(ellipse 70% 30% at 50% 78%,#2a2a3290,transparent 75%),linear-gradient(180deg,#050d17 0%,#09172a 42%,#162131 68%,#0d131c 100%)}
/* the action into the existing comparison: the only commercial path from this frame */
.tky-act-wrap{pointer-events:auto;margin-top:22px;max-width:52ch;text-shadow:none}
.tky-act{display:inline-flex;align-items:center;gap:14px;min-height:54px;padding:8px 20px 8px 15px;border:1px solid #ecd09a96;border-radius:28px;background:#081624b3;color:#fff;text-decoration:none;backdrop-filter:blur(8px);transition:background-color .15s,border-color .15s}
.tky-act:hover{background:#142a3ed9;border-color:#f2d79a}
.tky-seam{flex:none;width:40px;height:17px;fill:none;stroke:#e6c06a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:0}
.tky-act-text{display:grid;gap:3px;text-align:left}
.tky-act-text b{font-size:14px;font-weight:700;letter-spacing:-.01em}
.tky-act-meta{font-size:11px;line-height:1.35;color:#d6e2ea}
.tky-act-arrow{font-size:16px;margin-left:2px}
.tky-disclose{margin-top:9px;font-size:10.5px;line-height:1.45;color:#c6d4dd;text-shadow:0 1px 6px #02101cd0}
.tky-short{display:none}
.art-label a{color:inherit;pointer-events:auto;text-decoration:underline;text-underline-offset:2px}
.art-label a:hover{color:#fff}
/* 05 Food — restrained: the counter edge drops as the camera rises, steam glow */
.scene-food{--focus:67% 52%;--haze:linear-gradient(0deg,#120a0560,transparent 45%);--glow:radial-gradient(ellipse 12% 22% at 70% 30%,#fff3e040,transparent 70%),radial-gradient(circle at 57% 6%,#ffbf7030,transparent 18%)}
.scene-food .near-plane{object-position:50% 100%}
/* 06 Rail — window frame sways, distant hills pan slowly, verge grass rushes */
.scene-rail{--focus:50% 50%;--haze:linear-gradient(180deg,#d8eeff2a,transparent 40%);--glow:linear-gradient(100deg,transparent 40%,#fff8e030 48%,transparent 56%)}
.scene-rail .near-plane{object-fit:fill;inset:-1.5vh -1vw;width:calc(100% + 2vw);height:calc(100% + 3vh)}
/* verge grass: six tiles (A, mirrored A, …) loop every two tiles, so it always covers screens up to ~3.8:1 */
.rail-rush{--rush-h:54vh;left:0;bottom:-3vh;height:var(--rush-h);display:flex;width:max-content;filter:blur(1.6px) brightness(.8);transform-origin:0 100%;animation:rail-rush 1.5s linear infinite;will-change:transform}
.rail-rush img{position:static;height:100%;width:auto;flex:none}
.rail-rush img:nth-child(even){transform:scaleX(-1)}
@keyframes rail-rush{from{transform:translate3d(0,0,0)}to{transform:translate3d(calc(var(--rush-h) * -3.5537),0,0)}}
/* 07 Kyoto — pass through the noren gateway into a craft room */
.scene-kyoto{--focus:46% 50%;--haze:linear-gradient(0deg,#1a0f0650,transparent 50%);--glow:radial-gradient(ellipse 35% 50% at 30% 30%,#fff2c43a,transparent 70%)}
.scene-kyoto .near-plane{object-position:50% 38%;opacity:0} /* the noren gateway is passed through on arrival, then stays behind */
/* 08 Night — slow river pan, lantern breath, mist over the water */
.scene-night{--focus:66% 40%;--haze:linear-gradient(180deg,transparent 46%,#9ab8ff1c 58%,#c9d6ff14 66%,transparent 78%);--glow:radial-gradient(circle at 96% 72%,#ffb85a70,transparent 14%),radial-gradient(ellipse 50% 14% at 55% 60%,#ff9a6014,transparent 70%)}

/* ---------- copy ---------- */
/* copy never sits lower than the measured bottom bar (src/layout-guard.js writes --chrome-bottom); on large screens --copy-bottom wins, so desktop composition is unchanged */
.scene-copy{position:absolute;z-index:3;left:var(--edge);right:var(--edge);bottom:max(var(--copy-bottom),calc(var(--chrome-bottom,0px) + var(--copy-gap,14px)));max-width:min(900px,64vw);pointer-events:none;text-shadow:0 2px 18px #02101c99,0 1px 3px #02101c80}
.scene-place{position:absolute;bottom:calc(100% + 20px);left:0;right:0;display:flex;flex-wrap:wrap;align-items:baseline;column-gap:20px;row-gap:6px;color:var(--tone);font-size:10px;line-height:1.4;letter-spacing:.14em;font-weight:700}
.art-label{color:#d8e4ec;font-size:9px;letter-spacing:.03em;font-weight:500}
.eyebrow{font-size:10px;letter-spacing:.14em;color:var(--tone);text-transform:uppercase;font-weight:700;margin-bottom:16px}
.scene-copy h1,.scene-copy h2{font-size:clamp(46px,6.2vw,92px);font-weight:500;letter-spacing:-.05em;line-height:1;margin-bottom:18px}
.title-line{display:block;overflow:hidden;padding:.04em .06em .12em 0;margin-bottom:-.1em}
.title-line>span{display:block;transform-origin:0 100%}
.scene-summary{font-size:16px;line-height:1.5;max-width:40ch;color:#e8eff3}
.scene-place,.eyebrow,.scene-summary,.title-line>span{will-change:transform,opacity}
.scene-index{display:none}
.image-fallback{display:none;position:absolute;z-index:4;top:40%;left:var(--edge);right:var(--edge);font-size:12px;line-height:1.5;color:#cfe4ef;max-width:42ch}

.scene-rail .rail-rush{top:auto;right:auto}

/* ---------- chrome (carried from v1, unchanged behaviour) ---------- */
.stage-header{position:absolute;z-index:20;top:0;left:0;right:0;display:flex;align-items:center;gap:20px;padding:23px var(--edge);background:linear-gradient(#05101bbc,transparent);font-size:12px}.brand{font-weight:650;letter-spacing:-.03em;white-space:nowrap;text-shadow:0 1px 6px #000}.brand span{font-size:20px;margin-left:11px}.header-caption{margin-left:auto;color:#d5e6ee;white-space:nowrap;font-size:11px;letter-spacing:.04em}.header-find{display:inline-flex;align-items:center;justify-content:center;gap:18px;min-height:44px;margin-left:18px;padding:0 18px;background:#0b1c2ebd;border:1px solid #ffffff61;border-radius:99px;font-size:11px;backdrop-filter:blur(10px)}.header-find:hover{background:#1a3950}
.chapter-nav{position:absolute;z-index:21;left:var(--edge);right:var(--edge);top:91px;display:flex;gap:5px;align-items:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-inline:contain;white-space:nowrap}.chapter-nav::-webkit-scrollbar{display:none}.chapter-nav button{min-width:85px;min-height:48px;border:0;border-top:1px solid #ffffff45;background:#08213345;text-align:left;padding:7px 10px 6px 0;color:#c8d6e0;font-size:9px;letter-spacing:.025em;transition:color .15s,border-color .15s,background-color .15s}.chapter-nav button b{font-weight:500;display:block;margin-top:3px;font-size:11px}.chapter-nav button span{font-size:8px;color:#bccbd5}.chapter-nav button[aria-selected="true"]{color:#fff;border-color:#b6eeff;background:#18354d76}.chapter-nav button:hover{color:#fff;border-color:#d7faff}
.stage-bottom{position:absolute;z-index:22;bottom:0;left:0;right:0;padding:0 var(--edge) 29px;display:flex;flex-direction:column;align-items:stretch;gap:15px}.stage-story{display:flex;align-items:end;justify-content:space-between;gap:30px}.story-status{font-size:11px;line-height:1.5;color:#e2edf4;max-width:46ch;text-shadow:0 1px 7px #000}.controls{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}.controls button{min-height:45px;display:inline-flex;align-items:center;justify-content:center;gap:23px;padding:0 17px;font-size:11px;line-height:1.3;border:1px solid #ffffff53;border-radius:99px;background:#10273bb8;backdrop-filter:blur(11px)}.controls button:hover{background:#23435a}.controls button:disabled{opacity:.45;cursor:default}.controls .primary-control,.controls .end-finder{background:#f4faff;color:#081b2a;border:1px solid #f4faff;font-weight:700;padding:0 22px}.controls .primary-control:hover,.controls .end-finder:hover{background:#d6f3ff}.controls .quiet-control{border-color:transparent;background:transparent;color:#dce9f1}.controls #prev-chapter,.controls #next-chapter{min-width:45px;padding:0;font-size:18px}.controls button[hidden],.header-find[hidden]{display:none!important}
.progress-wrap{display:flex;align-items:center;gap:17px;min-height:18px;font-size:9px;color:#c2d3de;letter-spacing:.03em}.progress-wrap #progress-label{white-space:nowrap;min-width:115px}.story-progress{position:relative;flex:1;height:1px;background:#ffffff52}.story-progress i{position:absolute;inset:0 auto 0 0;width:0;background:#adf0ff;display:block}.generated-note{white-space:nowrap}
.noscript-guide{display:none;position:fixed;z-index:50;left:var(--edge);right:var(--edge);bottom:12%;padding:25px;background:#0a1d2de9;border:1px solid #fff5}.noscript-guide h1{font-size:34px;line-height:1}.noscript-guide p{margin:15px 0}.noscript-guide a{display:block;padding:10px 0;color:#b5edff}

/* ---------- finder (unchanged from v1) ---------- */
.finder{position:fixed;inset:0 0 0 auto;z-index:60;margin:0;max-width:none;max-height:none;width:min(690px,54vw);height:100vh;height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding:0;border:0;border-left:1px solid #b6dce53d;background:#0b1c2af8;color:#eef7fb;box-shadow:-30px 0 100px #020b13ad;scrollbar-color:#55788c transparent}.finder::backdrop{background:#03111cca;backdrop-filter:blur(4px)}.finder-inner{padding:0 clamp(25px,4vw,58px) 70px}.finder-header{position:sticky;z-index:5;top:0;display:flex;justify-content:space-between;align-items:start;gap:20px;padding:37px 0 24px;background:#0b1c2af8;border-bottom:1px solid #ffffff25}.panel-kicker{color:#a9d9ef;font-size:9px;letter-spacing:.17em;font-weight:700}.finder-header h2{font-size:clamp(38px,3.4vw,57px);font-weight:500;line-height:1.03;letter-spacing:-.055em;margin-top:13px}.finder-header button{flex:none;width:44px;height:44px;border:1px solid #ffffff48;border-radius:50%;background:#183344;color:#f3f8fd;font-size:17px}.finder-header button:hover{background:#28536b}.finder-intro{font-size:14px;line-height:1.65;color:#b4cbd8;max-width:56ch;margin:25px 0 29px}#finder-form{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:29px}#finder-form label{font-size:11px;line-height:1.5;color:#b7cbd8;display:grid;gap:8px}#finder-form label:last-child{grid-column:1/-1}#finder-form select{width:100%;min-width:0;min-height:48px;border-radius:9px;border:1px solid #5a798e;background:#102f41;color:#f3f8fa;padding:10px 14px;font-size:13px}.result-heading{display:flex;align-items:baseline;justify-content:space-between;gap:15px;border-top:1px solid #ffffff31;padding:24px 0 17px}.result-heading h3{font-size:22px;letter-spacing:-.035em;font-weight:500}.result-heading span{font-size:11px;color:#9ec9dd}.finder-results{display:grid;gap:12px}.result-card{padding:22px;border:1px solid #ffffff25;border-radius:11px;background:#112b3be8}.result-card .kind{display:block;color:#a6d9ea;font-size:9px;letter-spacing:.14em;margin-bottom:12px;font-weight:650;text-transform:uppercase}.result-card h4{margin:0 0 9px;font-size:20px;font-weight:500;letter-spacing:-.03em}.result-card p{color:#bfd0d9;font-size:12px;line-height:1.65;margin:0}.result-card .meta{margin-top:12px;color:#d8e7ed}.result-card a{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;padding-top:15px;margin-top:16px;border-top:1px solid #8cbfd34a;color:#afecff;text-decoration:none;font-size:12px;font-weight:650}.result-card a:hover{color:#fff}.empty-results{border:1px solid #9dcddd5e;border-radius:11px;padding:27px;background:#112c3c}.empty-results[hidden]{display:none}.empty-results h3{font-size:22px;font-weight:500;margin-bottom:13px}.empty-results p,.finder-footnote{font-size:11px;line-height:1.7;color:#adc3d0}.empty-results button{margin-top:17px;min-height:44px;border:1px solid #d3eef8;background:#e9f7fd;color:#0a1c29;border-radius:99px;padding:0 20px;font-size:11px;font-weight:700}.finder-footnote{margin-top:25px;max-width:57ch}

/* ---------- breakpoints ---------- */
@media(max-width:850px){.header-caption{display:none}.stage-header .brand{margin-right:auto}.chapter-nav{gap:6px}.chapter-nav button{min-width:75px}.scene-copy{max-width:min(650px,80vw)}.finder{width:min(640px,83vw)}}
/* portrait / tall screens: keep the subject of each picture visible and the copy above the controls */
@media(max-aspect-ratio:4/5){
 :root{--copy-bottom:clamp(170px,27vh,250px)}
 .scene-home{--art-position:70% 50%!important}
 .scene-airport{--art-position:52% 50%!important}
 .scene-flight{--art-position:66% 50%!important}
 .scene-flight .near-plane{width:auto;height:108vh;left:calc(50vw - 81vh);top:-4vh}
 .scene-tokyo{--art-position:68% 50%!important} /* portrait tablets; portrait phones: see v4.3 below */
 .scene-kyoto .mid-plane{object-position:96% 50%}
 .scene-food{--art-position:70% 50%!important}
 .rail-rush{--rush-h:38vh}
 .reading-shade{background:linear-gradient(0deg,#050f1af0 0%,#06111ca8 30%,#06121d30 56%,transparent 72%)}
}
@media(max-width:650px){:root{--edge:24px}.stage-header{padding-top:17px}.stage-header .brand{font-size:12px}.brand span{font-size:17px}.header-find{font-size:10px;margin-left:0;padding:0 13px;gap:9px}.chapter-nav{top:86px;right:0;padding-right:var(--edge)}.chapter-nav button{min-width:68px;min-height:46px}.chapter-nav button b{font-size:10px}.scene-copy{max-width:none}.scene-copy h1,.scene-copy h2{font-size:clamp(40px,11vw,60px);max-width:12ch;margin-bottom:14px}.scene-place{bottom:calc(100% + 16px);font-size:9px;column-gap:12px}.art-label{font-size:9px}.eyebrow{font-size:9px;margin-bottom:12px}.scene-summary{font-size:14px;max-width:31ch}.stage-bottom{padding-bottom:17px;gap:11px}.stage-story{display:block}.story-status{font-size:11px;max-width:39ch;line-height:1.45;margin-bottom:10px}.controls{justify-content:flex-start;gap:6px}.controls button{min-height:44px;padding:0 12px;font-size:11px;gap:10px}.controls .primary-control,.controls .end-finder{padding:0 16px}.controls #prev-chapter,.controls #next-chapter{min-width:44px}.controls .quiet-control{padding:0 8px}.progress-wrap{gap:11px}.progress-wrap #progress-label{min-width:100px}.generated-note{display:none}.finder{width:100vw;border-left:0}.finder-inner{padding:0 24px 52px}.finder-header{padding:22px 0 20px}.finder-header h2{font-size:44px}.finder-intro{font-size:13px;margin:20px 0}.result-card{padding:20px}.result-card h4{font-size:19px}}
@media(max-width:390px){:root{--edge:20px}.controls button{padding:0 10px}.scene-copy h1,.scene-copy h2{font-size:40px}.finder-inner{padding-left:20px;padding-right:20px}}
@media(max-height:700px){:root{--copy-bottom:clamp(120px,24vh,190px)}.chapter-nav{top:75px}.scene-copy h1,.scene-copy h2{font-size:clamp(34px,5vw,62px);margin-bottom:12px}.eyebrow{margin-bottom:10px}.scene-summary{font-size:13px}.stage-bottom{padding-bottom:12px;gap:7px}.controls button{min-height:44px}.finder-header{padding-top:18px}}
@media(max-height:480px) and (orientation:landscape){.chapter-nav{display:none}.scene-summary{font-size:12px;line-height:1.35;max-width:62ch}:root{--copy-bottom:110px}.scene-copy h1,.scene-copy h2{font-size:34px}}

/* ---------- short / small phones (e.g. 320×568, 360×640, 375×667, 414×736) ----------
   One full viewport: header row → chapter tabs → copy → status + controls, with no overlap.
   Copy is anchored above the real bottom bar (--chrome-bottom from layout-guard.js, fallback estimate here),
   titles are sized to keep two lines, and the reading shade is taller and stronger so copy never rests on a
   bright window. Summary, status line and every control stay visible. */
@media(max-width:650px) and (max-height:760px){
 :root{--edge:20px;--copy-bottom:clamp(124px,21vh,150px);--copy-gap:16px}
 .scene-copy{bottom:max(var(--copy-bottom),calc(var(--chrome-bottom,164px) + var(--copy-gap)));max-width:none;text-shadow:0 1px 2px #02101cd9,0 2px 16px #02101cb8}
 .scene-copy::before{content:"";position:absolute;z-index:-1;left:calc(-1 * var(--edge));right:calc(-1 * var(--edge));top:-66px;bottom:-18px;pointer-events:none;background:radial-gradient(ellipse 92% 72% at 34% 58%,#03101bbd 0%,#03101b85 46%,#03101b00 82%)}
 .stage-header{padding-top:14px;padding-bottom:16px}
 .chapter-nav{top:64px}
 .chapter-nav button{min-width:64px;min-height:42px;padding-top:6px}
 .scene-place{bottom:calc(100% + 12px);font-size:9px;line-height:1.35;letter-spacing:.12em;column-gap:10px;row-gap:3px}
 .eyebrow{font-size:9px;margin-bottom:8px}
 .scene-copy h1,.scene-copy h2{font-size:clamp(28px,9.4vw,36px);line-height:1.02;letter-spacing:-.045em;max-width:none;margin-bottom:10px}
 .scene-summary{font-size:13px;line-height:1.42;max-width:38ch}
 .stage-bottom{padding-bottom:10px;gap:6px;background:linear-gradient(0deg,#040d16d9 0%,#040d16a3 58%,#040d1600 100%)}
 .story-status{font-size:10.5px;line-height:1.36;max-width:none;min-height:2.72em;margin-bottom:7px}
 .controls{gap:6px}
 .controls button{min-height:44px;padding:0 12px;gap:8px;font-size:11px}
 .controls .primary-control,.controls .end-finder{padding:0 14px}
 .controls .quiet-control{padding:0 6px;font-size:10.5px}
 .controls #prev-chapter,.controls #next-chapter{min-width:44px}
 .progress-wrap{min-height:16px;gap:10px}
 .progress-wrap #progress-label{min-width:92px}
 .reading-shade{background:linear-gradient(0deg,#050f1af5 0%,#06111ce8 24%,#06121dc4 42%,#06121d8c 58%,#06121d47 72%,#06121d14 84%,transparent 94%)}
 .image-fallback{top:calc(var(--chrome-top,108px) + 6px);font-size:11px}
}
/* Tokyo on phones: subject (tower) stays upper right; title, one-line reason, action and short disclosure stay */
@media(max-width:650px){
 .scene-tokyo .scene-copy h2{font-size:clamp(30px,9vw,46px);max-width:none}
 .tky-act-wrap{margin-top:14px}
 .tky-act{gap:10px;min-height:50px;padding:6px 14px 6px 11px;border-radius:24px;backdrop-filter:none;background:#081624e0}
 .tky-seam{width:30px;height:13px}
 .tky-act-text b{font-size:13px}
 .tky-long{display:none}.tky-short{display:inline}
 .tky-disclose{margin-top:7px;font-size:10px}
}
@media(max-width:650px) and (max-height:760px){
 .scene-tokyo .eyebrow{display:none}
 .scene-tokyo .scene-copy h2{font-size:clamp(26px,8.6vw,34px)}
 .scene-tokyo .scene-summary{font-size:12.5px;line-height:1.38}
 .tky-act-wrap{margin-top:10px}
 .tky-act{min-height:46px;padding:5px 12px 5px 10px}
 .tky-act-text{gap:1px}.tky-act-text b{font-size:12.5px}.tky-act-meta{font-size:10px}
 .tky-disclose{margin-top:5px;font-size:9.5px;line-height:1.35}
}
.stage[data-fit="1"] .tky-act-wrap{margin-top:8px}
.stage[data-fit="2"] .tky-act-wrap{margin-top:6px}
.stage[data-fit="2"] .scene-tokyo .scene-copy h2{font-size:clamp(22px,min(7vw,6.4vh),30px)}
.stage[data-fit="2"] .tky-act{min-height:44px}
/* v4.3 Tokyo on portrait phones (headless captures showed the copy laid across the tower's whole height).
   The photo still covers (no letterbox; .life stays registered); only object-position x moves the tower to the
   right edge, and the copy keeps to a column left of it. Far plane = 110vw × 110vh at -5vw/-5vh, cover width
   195.56vh, so at object-position p the tower's legs (image x 64.5–69 %) start at (110p−5)vw + (126.09−195.56p)vh.
   p=.595 → 60.45vw+9.74vh (320×568: legs ≈249–299px); p=.615 (≤1:2) → 62.65vw+5.82vh (390×844: ≈293–368px).
   The column ends 14px before that line; the shade protects the column and the bar, not the tower. */
@media(max-width:650px) and (max-aspect-ratio:4/5){
 .scene-tokyo{--art-position:59.5% 50%!important}
 .scene-tokyo .scene-copy{max-width:calc(60.45vw + 9.74vh - 14px - var(--edge))}
 .scene-tokyo .scene-copy h2{font-size:clamp(26px,8.2vw,36px)}
 .scene-tokyo .scene-place{right:auto;width:calc(100vw - 2 * var(--edge))} /* sits beside the thin spire only */
 .tky-act-meta{font-size:10px}
 .scene-tokyo .reading-shade{background:linear-gradient(0deg,#050f1af0 0%,#06111cb8 15%,#06121d00 34%),linear-gradient(90deg,#04101ad6 0%,#04101aa6 42%,#04101a00 74%)}
 .tky-poster{background:radial-gradient(ellipse 12% 22% at 83% 52%,#b4542e70,transparent 72%),linear-gradient(180deg,#050d17 0%,#09172a 42%,#162131 68%,#0d131c 100%)}
}
@media(max-width:650px) and (max-aspect-ratio:1/2){
 .scene-tokyo{--art-position:61.5% 50%!important}
 .scene-tokyo .scene-copy{max-width:calc(62.65vw + 5.82vh - 14px - var(--edge))}
}
/* ≤600px-tall portrait phones (320×568): the narrow column cannot also hold the reason line without pushing
   the shared fit level (and so every chapter's type) down; title, action and disclosure carry the frame there */
@media(max-width:650px) and (max-height:600px) and (max-aspect-ratio:4/5){.scene-tokyo .scene-summary{display:none}}
@media(max-width:360px) and (max-height:760px){.scene-place{letter-spacing:.1em}.controls button{padding:0 10px}.controls .primary-control,.controls .end-finder{padding:0 13px}}

/* ---------- fit levels (set by layout-guard.js only when copy would reach the header/tabs) ----------
   Type steps down; nothing is hidden. Sizes use min(vw,vh) so landscape phones shrink too. */
.stage[data-fit="1"] .scene-copy h1,.stage[data-fit="1"] .scene-copy h2{font-size:clamp(24px,min(7.6vw,8.5vh),44px);margin-bottom:8px}
.stage[data-fit="1"] .eyebrow{margin-bottom:6px}
.stage[data-fit="1"] .scene-summary{font-size:12px;line-height:1.38}
.stage[data-fit="1"] .scene-place{bottom:calc(100% + 8px)}
.stage[data-fit="2"] .scene-copy h1,.stage[data-fit="2"] .scene-copy h2{font-size:clamp(20px,min(6.4vw,7vh),34px);line-height:1;margin-bottom:6px}
.stage[data-fit="2"] .eyebrow{margin-bottom:4px}
.stage[data-fit="2"] .scene-summary{font-size:11.5px;line-height:1.34}
.stage[data-fit="2"] .scene-place{bottom:calc(100% + 6px);row-gap:2px}
.stage[data-fit="2"] .scene-copy::before{top:-52px}
.stage[data-fit="2"] .story-status{font-size:10px;min-height:0;margin-bottom:5px}
.stage[data-fit="2"] .stage-bottom{gap:4px;padding-bottom:6px}

/* ---------- v3: travel layers ----------
   Removed in the visual-review revision: the conic light-streak overlay (.warp) and the lit portal edge
   (.portal-rim). Depth now comes only from the scenes' own planes moving at different rates. */

/* ---------- v3: ambient life at rest (CSS only; small, slow, bounded) ---------- */
.ambient{transform-origin:50% 50%;animation:var(--amb,amb-drift) var(--amb-t,18s) ease-in-out infinite alternate}
.light-plane{animation:var(--glow-anim,glow-breathe) var(--glow-t,7s) ease-in-out infinite alternate}
@keyframes amb-drift{from{transform:scale(1.02) translate3d(.3vw,0,0)}to{transform:scale(1.045) translate3d(-.5vw,-.2vh,0)}}
@keyframes amb-bank{from{transform:scale(1.045) rotate(-.45deg) translate3d(.3vw,.3vh,0)}to{transform:scale(1.045) rotate(.55deg) translate3d(-.4vw,-.4vh,0)}}
@keyframes amb-dolly{from{transform:scale(1.02)}to{transform:scale(1.06) translate3d(0,-.3vh,0)}}
@keyframes amb-rise{from{transform:scale(1.025) translate3d(0,.4vh,0)}to{transform:scale(1.04) translate3d(0,-.6vh,0)}}
@keyframes amb-sway{0%,100%{transform:scale(1.025) translate3d(0,0,0)}30%{transform:scale(1.025) translate3d(.06vw,.22vh,0)}62%{transform:scale(1.025) translate3d(-.05vw,-.12vh,0)}}
@keyframes amb-pan{from{transform:scale(1.03) translate3d(.6vw,0,0)}to{transform:scale(1.03) translate3d(-.6vw,-.15vh,0)}}
@keyframes glow-breathe{from{opacity:.28;transform:translate3d(-1.5vw,0,0) scale(1)}to{opacity:.6;transform:translate3d(1.5vw,-.6vh,0) scale(1.06)}}
@keyframes glow-sweep{from{opacity:.16;transform:translate3d(-9vw,0,0)}to{opacity:.46;transform:translate3d(9vw,0,0)}}
@keyframes glow-flicker{0%{opacity:.36}18%{opacity:.52}31%{opacity:.44}47%{opacity:.6}63%{opacity:.4}80%{opacity:.55}100%{opacity:.46}}
@keyframes glow-steam{from{opacity:.16;transform:translate3d(0,3vh,0)}to{opacity:.5;transform:translate3d(.5vw,-5vh,0)}}
@keyframes mist-slide{from{transform:translate3d(-5vw,0,0);opacity:.12}to{transform:translate3d(5vw,0,0);opacity:.32}}
.scene-home{--amb:amb-drift;--amb-t:18s;--glow-anim:glow-breathe;--glow-t:7s}
.scene-flight{--amb:amb-bank;--amb-t:9s;--glow-anim:glow-sweep;--glow-t:6s}
.scene-airport{--amb:amb-dolly;--amb-t:20s;--glow-anim:glow-sweep;--glow-t:9s}
.scene-tokyo{--amb:amb-pan;--amb-t:28s;--glow-anim:glow-breathe;--glow-t:12s} /* a slow lateral drift, no flicker on a photograph */
.scene-food{--amb:amb-rise;--amb-t:12s;--glow-anim:glow-steam;--glow-t:5s}
.scene-rail{--amb:amb-sway;--amb-t:1.15s;--glow-anim:glow-sweep;--glow-t:3.6s}
.scene-rail .ambient{animation-direction:normal;animation-timing-function:ease-in-out}
.scene-kyoto{--amb:amb-drift;--amb-t:18s;--glow-anim:glow-breathe;--glow-t:8s}
.scene-night{--amb:amb-pan;--amb-t:22s;--glow-anim:glow-flicker;--glow-t:3.8s}
.scene-night .space-plane{animation:mist-slide 14s ease-in-out infinite alternate}

/* ---------- v3: final chapter — closing line and one central trip-discovery CTA ---------- */
.scene-copy.finale{top:calc(var(--chrome-top,120px) + 8px);bottom:calc(var(--chrome-bottom,150px) + 8px);left:var(--edge);right:var(--edge);max-width:none;margin:0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.finale .scene-place{position:static;justify-content:center;margin-bottom:clamp(10px,2vh,20px)}
.finale .eyebrow{margin-bottom:clamp(8px,1.6vh,16px)}
.finale h2{font-size:clamp(34px,min(7vw,9vh),104px)!important;margin-bottom:clamp(10px,2vh,20px)}
.finale .title-line{padding-right:0}
.finale .scene-summary{max-width:none;font-size:clamp(14px,2vh,18px)}
.finale-cta{pointer-events:auto;margin-top:clamp(16px,3.4vh,34px);min-height:56px;display:inline-flex;align-items:center;gap:16px;padding:0 34px;border:1px solid #f6fbff;border-radius:99px;background:#f6fbff;color:#081b2a;font-size:15px;font-weight:700;letter-spacing:-.01em;text-shadow:none;box-shadow:0 0 0 0 #e5b7f200,0 10px 40px #e5b7f259;transition:background-color .15s,box-shadow .2s}
.finale-cta:hover{background:#e6f6ff;box-shadow:0 0 0 6px #e5b7f22e,0 10px 46px #e5b7f280}
.finale-note{margin-top:12px;font-size:10px;letter-spacing:.04em;color:#cbd8e2}
.scene-night .reading-shade{background:radial-gradient(ellipse 62% 54% at 50% 50%,#050c1ab8 0%,#050c1a6e 55%,#050c1a00 88%),linear-gradient(0deg,#050f1ad9 0%,#050f1a00 32%),linear-gradient(180deg,#050f1a99 0%,#050f1a00 24%)}
@media(max-width:650px) and (max-height:760px){
 .scene-copy.finale::before{top:-12px;bottom:-12px;background:radial-gradient(ellipse 80% 60% at 50% 50%,#03101bc4 0%,#03101b70 55%,#03101b00 90%)}
 .finale h2{font-size:clamp(28px,min(9.4vw,6.6vh),40px)!important}
 .finale-cta{min-height:50px;padding:0 24px;font-size:14px;margin-top:14px}
 .finale-note{margin-top:8px}
}
@media(max-height:480px) and (orientation:landscape){.finale .scene-summary{display:none}.finale-cta{margin-top:10px;min-height:46px}}

/* ---------- reduced motion: still compositions, no transforms, no passage occluder ---------- */
@media(prefers-reduced-motion:reduce){
 .scene-art>*,.rail-rush,.title-line>span{transform:none!important}
 .ambient,.lens,.lens>*,.light-plane,.rail-rush,.scene-night .space-plane{animation:none!important;transform:none!important}
 .shell-plane{display:none!important}
 .scene-art{-webkit-mask-image:none!important;mask-image:none!important;opacity:1!important}
 .finale-cta,.tky-act{transition:none}
 .tky-seam path{animation:none!important;stroke-dashoffset:0!important}
 .far-plane{transition:none}
 .scene-kyoto .near-plane{display:none!important}
 .chapter-nav button{transition:none!important}
}
