
:root{--bg:#120d11;--paper:#f5f1eb;--wine:#8f173e;--muted:#9a9096;--line:#342930;--accent:#dc829c;color-scheme:dark}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--paper);font-family:Inter,Arial,sans-serif}
body{padding:0}
.shell{width:100%;height:100vh;height:100dvh;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
main{height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto auto auto}
.masthead,.below{display:none}
.player-topbar{display:flex;justify-content:flex-end;padding:9px 18px;background:var(--scene-surface,var(--bg));}
.player-topbar nav{display:flex;align-items:center;gap:10px;}
.player-topbar a,.player-topbar .subscribe{display:inline-flex;align-items:center;justify-content:center;gap:16px;min-height:36px;padding:8px 20px;border:1px solid #775364;border-radius:7px;color:var(--paper);font-size:12px;font-weight:500;text-decoration:none;}
.player-topbar a:hover{background:#34212d;border-color:#a5708a;}
.player-topbar .subscribe{background:var(--wine);border-color:#ae3e64;color:#fff8fa;font-weight:600;}
.player-topbar .subscribe:hover{background:#aa2651;border-color:#c36184;}
/* Fit the complete 16:9 frame inside both available dimensions, never crop it. */
.stage{position:relative;width:100%;height:100%;min-width:0;min-height:0;background:var(--bg);overflow:hidden;isolation:isolate}
canvas{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
#portraitFilm{display:none}
.portrait-mode #film,.portrait-mode #surround{display:none}
.portrait-mode #portraitFilm{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
#surround{position:absolute;inset:0;z-index:-1;object-fit:fill}
.presentation .controls,.presentation .chapters{display:none}
.presentation main{grid-template-rows:minmax(0,1fr) auto}
.presentation .stage{touch-action:pan-x pinch-zoom;overscroll-behavior:contain}
.presentation-toggle{display:none;position:absolute;right:18px;bottom:18px;width:36px;height:36px;padding:0;place-content:center;border-radius:50%;background:#fffcf8d9;color:#8f173e;border-color:#cbb5be;opacity:0;transition:opacity .2s}
.presentation .presentation-toggle{display:grid}
.presentation-toggle svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7}
.stage:hover .presentation-toggle,.presentation-toggle:focus-visible,.presentation-toggle.is-paused{opacity:1}
.scene-nav,.scene-hint{display:none}
.presentation .scene-nav{position:absolute;display:flex;right:76px;bottom:18px;width:260px;gap:10px;z-index:2}
.scene-nav button{flex:1;min-width:0;height:36px;padding:0;border:0;border-radius:0;background:none;position:relative}
.scene-nav button:hover{background:none}
.scene-nav button[aria-disabled="true"]{cursor:wait}
.scene-nav button::after{content:'';display:block;height:3px;background:#795364;border-radius:2px;transition:background .2s}
.scene-nav button[aria-current="step"]::after{background:#dc829c}
.scene-nav button:hover::after{background:#efb4c8}
.scene-light .scene-nav button::after{background:#cfbec6}
.scene-light .scene-nav button[aria-current="step"]::after,.scene-light .scene-nav button:hover::after{background:#8f173e}
.presentation .scene-hint{display:block;position:absolute;left:20px;bottom:29px;margin:0;color:#b4a0ab;font-size:10px;letter-spacing:.03em;pointer-events:none}
.scene-light .scene-hint{color:#887982}
.clean .scene-nav,.clean .scene-hint{display:none}
@media(max-width:700px){.presentation .scene-nav{left:18px;right:68px;width:auto;gap:8px}.presentation .scene-hint{bottom:56px;font-size:10px}}
.scene-light .player-topbar a:not(.subscribe){color:#452632;border-color:#c4a7b3}
.scene-light .player-topbar a:not(.subscribe):hover{background:#eadddf}
@media(hover:none){.presentation-toggle{opacity:.7}}
button{font:inherit;cursor:pointer;border:1px solid var(--line);background:#211820;color:var(--paper);border-radius:8px;padding:9px 12px;transition:background .2s,border-color .2s}
button:hover{background:#34212d;border-color:#805167}
button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #db8ba5;outline-offset:3px}
button:disabled{cursor:wait;opacity:.45}
.controls{display:grid;grid-template-columns:40px 40px 86px minmax(60px,1fr) auto 40px auto;align-items:center;gap:10px;padding:9px 18px 7px;border-top:1px solid #ffffff0b}
.control-icon{width:40px;height:36px;display:grid;place-content:center;padding:0}
.control-icon svg{height:17px;width:17px;fill:none;stroke:currentColor;stroke-width:1.7}
.play{background:var(--paper);color:#321323;border-color:var(--paper)}
.play:hover{background:#dfc3ca}
.time{font-variant-numeric:tabular-nums;font-size:11px;color:#b9aeb4;white-space:nowrap;text-align:center}
.seek{width:100%;min-width:0;margin:0;accent-color:#bf5d7f;height:4px;cursor:pointer}
.sound,.export{font-size:11px;white-space:nowrap;min-height:36px}
.chapters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;padding:0 18px 9px}
.chapter{min-width:0;text-align:left;background:none;border-radius:0;border-width:2px 0 0;padding:7px 0 0;line-height:1.4;display:flex;align-items:center;gap:10px}
.chapter span{display:block;font-size:8px;letter-spacing:.6px;color:#8e7e87;white-space:nowrap}
.chapter b{font-size:10px;font-weight:500;color:#b4a5ad}
.chapter.active{border-color:#c37191}
.chapter.active b{color:#faf2f6}
.chapter:hover{background:none;border-color:#9a5171}
.status{font-size:11px;line-height:1.4;color:#db9cb6;margin:0;padding:4px 18px 10px}
.status:empty{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shell:fullscreen{background:var(--bg);width:100vw;height:100vh;height:100dvh}
.clean .controls,.clean .chapters,.clean .status,.clean .player-topbar,.clean .presentation-toggle{display:none}
.clean main{grid-template-rows:minmax(0,1fr)}
.clean .shell{padding:0;grid-template-rows:minmax(0,1fr)}
@media(max-width:700px){
 .player-topbar{padding:7px 12px;}.player-topbar a,.player-topbar .subscribe{min-height:32px;padding:6px 15px;font-size:11px;}
 .controls{grid-template-columns:36px 36px minmax(0,1fr) auto 36px;gap:7px;padding:8px 12px 6px}
 .control-icon{width:36px;height:34px}
 .play{grid-area:1/1}.controls #restart{grid-area:1/2}.time{grid-area:1/3;font-size:10px}
 .sound{grid-area:1/4}.controls #full{grid-area:1/5}
 .seek{grid-area:2/1/3/4}.export{grid-area:2/4/3/6;width:100%}
 .sound,.export{font-size:10px;padding:7px 9px;min-height:32px}
 .chapters{gap:9px;padding:0 12px 8px}
 .chapter{min-height:34px;padding-top:6px;justify-content:center;text-align:center;line-height:1.2}
 .chapter span{display:none}.chapter b{font-size:9px}
}
@media(max-height:500px){
 .chapters{display:none}
 .controls{padding-top:5px;padding-bottom:5px}
}
@media(prefers-reduced-motion:reduce){button,.presentation-toggle,.scene-nav button::after{transition:none}}

/* Static first paint and readable fallback if an image or JavaScript cannot load. */
.motion-fallback{display:none;max-width:760px;margin:auto;padding:clamp(24px,6vw,70px);color:#f5f1eb}
.motion-fallback img{width:64px;height:auto}
.motion-fallback h1{font:clamp(42px,7vw,74px)/1.06 Georgia,serif;font-weight:400;margin:24px 0}
.motion-fallback h1 em{color:#dc829c}
.motion-fallback p{font-size:clamp(16px,2vw,20px);line-height:1.5;color:#cebac5}
.motion-fallback small{display:block;margin-top:24px;line-height:1.5;color:#ad919f}
.motion-pending .stage{overflow:auto;display:grid;align-items:center;background:#140e13}
.motion-pending .motion-fallback{display:block}
.motion-pending .stage canvas,.motion-pending .scene-nav,.motion-pending .scene-hint,.motion-pending .presentation-toggle,.motion-pending .controls,.motion-pending .chapters{display:none}
