/* Episode shell shares the production masthead, loader and navigation. */
.episode-three main{padding:16px 0 20px}.stage{position:relative;isolation:isolate;overflow:hidden;width:100%;height:max(240px,calc(100svh - var(--site-header-height) - 278px));background:#aab4ae;border:1px solid var(--site-line);border-radius:8px}.stage canvas{display:block;width:100%;height:100%}.episode-three .episode-title{color:#263b32;text-shadow:0 1px 10px #edf1e4cc;font-size:clamp(12px,1.1vw,17px);top:14px;left:18px}.episode-three .episode-picker nav{text-shadow:none}.scene-actions{position:absolute;z-index:7;top:12px;right:14px;display:flex;gap:6px}.scene-actions button{display:grid;place-items:center;width:40px;height:40px;border:1px solid #e4ebe477;border-radius:10px;background:#f0f4ece6;color:#2f493e;backdrop-filter:blur(10px)}.scene-actions button:hover{background:#fff}.scene-actions button:disabled{opacity:.45;cursor:wait}.scene-actions svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.sound-off{display:none}#sound[aria-pressed=true] .sound-off{display:block}#sound[aria-pressed=true] .sound-waves{display:none}.sound-credit{display:flex;align-items:center;justify-content:flex-end;gap:25px;min-height:216px;padding-top:12px;color:var(--site-muted);font-size:11px;line-height:1.6}.sound-caption{display:block;font-size:9px;letter-spacing:2px;margin-bottom:8px}.sound-credit a:hover{color:var(--site-ink)}#music-status{font-size:11px;max-width:300px;margin:8px 0 0}.music-frame{width:356px;height:200px;flex:none;border-radius:8px;overflow:hidden;background:var(--site-soft)}#music-player,.music-frame iframe{display:block;width:100%;height:200px;border:0}.episode-three .site-credit{height:auto;min-height:24px;margin:0 0 6px}.episode-three #scene-loading{z-index:9}.stage[aria-busy=true] .scene-actions{visibility:hidden}
@media(max-width:680px){.episode-three main{padding-top:12px}.stage{height:auto;aspect-ratio:1.1}.episode-three .episode-title{top:10px;left:12px;font-size:12px}.episode-picker summary{max-width:calc(100vw - 135px)}.scene-actions{top:10px;right:9px;gap:4px}.scene-actions button{width:34px;height:34px;border-radius:8px}.scene-actions svg{width:18px;height:18px}.sound-credit{display:flex;flex-direction:column;gap:12px;align-items:flex-start;min-height:0;padding-top:18px}.sound-credit>div:first-child{width:100%}.music-frame{width:min(100%,356px);align-self:center}.episode-three .site-credit{margin:0;padding-top:0}.episode-three .episode-picker nav{min-width:235px}}
.episode-three .episode-picker summary{padding:7px 10px;border:1px solid #e4ebe477;border-radius:9px;background:#f0f4ece6;backdrop-filter:blur(10px);text-shadow:none;color:#2f493e}.episode-three .episode-picker[open] summary{background:#f8faf5}.episode-three .episode-picker nav{margin-top:5px}

/* Keep the homepage canvas/footer geometry; no visible source-video panel. */
.episode-three main{--scene-vertical-padding:43px;padding:19px 0 24px}.stage{height:max(240px,calc(100svh - var(--site-header-height,92px) - var(--scene-vertical-padding)));border-radius:8px}.episode-three .site-credit{height:24px;margin-top:-24px;margin-bottom:0;padding:0 10px}.music-source{position:fixed;left:-10000px;top:0;width:356px;height:200px;overflow:hidden;pointer-events:none}.music-source iframe{width:356px;height:200px;border:0}.episode-three .scene-actions{top:14px}.episode-three .episode-picker summary{min-height:40px}
@media(max-width:1180px){.episode-three main{--scene-vertical-padding:41px;padding-top:17px}}@media(max-width:680px){.episode-three main{padding:13px 0 20px}.stage{height:auto;aspect-ratio:1/1.04;border-radius:6px}.episode-three .site-credit{height:auto;min-height:60px;margin-top:-20px;padding:10px 16px}.episode-three .scene-actions{top:10px}.episode-three .episode-picker summary{min-height:34px}}

/* Local ending study: a quiet wordmark, one falling dot and a short impact. */
#scene-loading .loader-caption{letter-spacing:1px;font-size:11px}
.ending-card{position:absolute;inset:0;z-index:5;display:grid;place-items:center;overflow:hidden;background:var(--site-bg,#f5f6f8);color:var(--site-ink,#29322f)}
.ending-content{display:flex;flex-direction:column;align-items:center;width:min(740px,calc(100% - 48px));padding:55px 0 30px;gap:14px}
.ending-logo{display:flex;align-items:baseline;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",Arial,sans-serif;font-size:clamp(82px,10vw,128px);font-weight:800;letter-spacing:-.065em;line-height:1;padding-right:.065em}
.ending-links{position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:44px;width:100%}
.stage .ending-models{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;opacity:0;transition:opacity .4s ease}
.ending-links[data-models-ready=true] .ending-models{opacity:1}
.ending-link{position:relative;z-index:1;display:block;min-width:0;color:inherit;text-decoration:none;background:none;border:0}
.ending-object{display:block;width:100%;height:255px}
.ending-label{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;font-size:15px;font-weight:650;letter-spacing:-.04em;white-space:nowrap;transition:color .2s,transform .2s}
.ending-label .ending-arrow{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;opacity:.75;transition:transform .2s}
.ending-gamepad{width:29px;height:23px;flex:none}
.ending-print-mark{font-size:25px;font-weight:400;color:#6e9787;line-height:1;width:27px;text-align:center}
.ending-link:focus-visible{outline:2px solid var(--site-brand,#385adb);outline-offset:6px}
@media(hover:hover){.ending-link:hover .ending-label{color:var(--site-brand,#385adb);transform:translateY(-2px)}.ending-link:hover .ending-arrow{transform:translateX(3px)}}
.ending-word{display:block}.ending-dot{display:block;letter-spacing:-.065em;color:var(--site-brand,#385adb);transform-origin:50% 86%}
.ending-card.is-playing{animation:ending-reveal .75s ease-out both}
.is-playing .ending-word{animation:ending-word .8s cubic-bezier(.2,.8,.2,1) .25s both}
.is-playing .ending-dot{animation:ending-dot 1.05s linear 1.05s both}
.is-playing .ending-links{animation:ending-links .7s cubic-bezier(.2,.8,.2,1) 2.1s both}
@keyframes ending-reveal{from{opacity:0}to{opacity:1}}
@keyframes ending-word{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes ending-links{from{opacity:0;visibility:hidden;transform:translateY(12px)}to{opacity:1;visibility:visible;transform:translateY(0)}}
@keyframes ending-dot{0%{opacity:0;transform:translateY(-230px) scale(1)}6%{opacity:1;transform:translateY(-228px) scale(1)}25%{transform:translateY(-206px) scale(1)}45%{transform:translateY(-145px) scale(.97,1.03)}65%{transform:translateY(-52px) scale(.95,1.05)}74%{transform:translateY(0) scale(1.28,.67)}82%{transform:translateY(-7px) scale(.96,1.04)}90%{transform:translateY(0) scale(1.07,.94)}100%{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:680px){.ending-content{width:calc(100% - 24px);gap:8px;padding:48px 0 14px}.ending-logo{font-size:clamp(62px,18vw,102px)}.ending-links{gap:10px}.ending-object{height:clamp(120px,39vw,225px)}.ending-label{font-size:12px;gap:4px;min-height:38px}.ending-label .ending-arrow{width:12px;height:12px}.ending-gamepad{width:22px;height:19px}.ending-print-mark{font-size:21px;width:21px}}
@media(min-width:681px) and (max-height:650px){.ending-content{width:560px;gap:6px;padding:46px 0 14px}.ending-logo{font-size:70px}.ending-object{height:155px}.ending-label{font-size:13px;min-height:34px}}
@media(prefers-reduced-motion:reduce){.ending-card.is-playing,.is-playing .ending-word,.is-playing .ending-dot,.is-playing .ending-links{animation:none!important;opacity:1;visibility:visible;transform:none}.ending-label,.ending-arrow,.ending-models{transition:none}}


