.story-cinema{
 color-scheme:dark;box-sizing:border-box;padding:0;width:min(760px,calc(100vw - 28px));max-width:100%;
 max-height:min(94dvh,780px);overflow-y:auto;overscroll-behavior:contain;border:1px solid #769aa4;
 color:#f5f4e9;background:#102631;border-radius:20px;box-shadow:0 12px 64px #010a16bd;
 font:inherit;
}
.story-cinema::backdrop{background:#031019dc}
.story-shell{position:relative;isolation:isolate;}
.story-frame{position:relative;height:clamp(195px,45dvh,440px);overflow:hidden;background:#0a1a2c url(../assets/sky/nebula.webp) 50% 50%/cover}
.story-heading{position:absolute;z-index:1;inset:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 24px 36px;background:linear-gradient(#041326ee,#0619329c 65%,transparent);pointer-events:none}
.story-heading small,.story-voice strong{font-size:.77rem;line-height:1.4;letter-spacing:.065em;color:#a6e2d9;font-weight:700}
.story-heading h2{color:#fff7e6;font-size:clamp(1.24rem,4vw,2rem);line-height:1.06;margin:5px 0 0;text-wrap:balance;}
.story-cinema button{appearance:none;line-height:1.2;font-family:inherit;font-weight:650;font-size:.95rem;min-height:44px;padding:9px 15px;border-radius:12px;cursor:pointer;background:#1a3744;color:#e3ede8;border:1px solid #51737c;}
.story-cinema button:focus-visible{outline:2px solid #ffdc80;outline-offset:2px;}
.story-heading .story-skip{pointer-events:auto;color:#edf5ee;background:#0b1c2bd9;border-color:#789497;padding:9px 13px;font-size:.84rem;}
.story-shot,.story-land,.story-shot>canvas,.story-poster{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
.story-shot{background:#081528 url(../assets/sky/nebula.webp) center/cover;animation:story-cut .32s ease-out both}
.story-land{object-fit:cover;animation:story-pan 8s ease-out both;object-position:50% 52%}
.story-shot[data-speaker='Бип'] .story-land{object-position:67% 55%}
.story-body{position:absolute;width:74%;height:92%;left:17%;top:9%;animation:story-orbit 8s ease-out both}
.story-poster{object-fit:contain}
.story-shot[data-view="ship"] .story-body{left:52%;top:2%;width:48%;height:76%;}
.story-ship{position:absolute;width:64%;height:75%;left:0;top:21%;object-fit:contain;filter:drop-shadow(0 3px 8px #08142b77);animation:story-fly 7s ease-out both}
.story-console{padding:18px 24px;color:#e8efeb;background:linear-gradient(145deg,#173744,#102630);border-top:1px solid #456a73;}
.story-voice{display:grid;grid-template-columns:clamp(52px,11vw,74px) 1fr;gap:16px;align-items:start;min-height:100px;}
.story-voice img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:14px;background:#1b3d48;border:1px solid #619293}
.story-voice p{font-size:clamp(1rem,2.4vw,1.14rem);line-height:1.38;color:#f5f5e8;margin:4px 0 0}
.story-console footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;}
.story-console .story-next{margin-left:auto;background:#ffca66;color:#291c0e;border-color:#ffe8a6;min-width:106px;}
@keyframes story-cut{from{opacity:.12}to{opacity:1}}
@keyframes story-pan{from{transform:scale(1.10) translateX(-1%)}to{transform:scale(1.02) translateX(.3%)}}
@keyframes story-orbit{from{transform:translate(-3%,2%) scale(.91)}to{transform:translate(1%,0) scale(1.01)}}
@keyframes story-fly{from{transform:translate(-15%,8%) rotate(-7deg) scale(.8)}to{transform:translate(12%,-2%) rotate(2deg) scale(1.06)}}
@media(max-width:480px){.story-heading{padding:14px 14px 30px}.story-console{padding:14px}.story-console footer{gap:6px}.story-console button{padding:8px 10px}.story-voice{gap:12px}.story-frame{height:clamp(188px,41dvh,355px)}}
@media(max-height:460px){.story-frame{height:32dvh;min-height:96px}.story-voice{min-height:0}.story-console{padding:9px 14px}.story-heading{padding:7px 12px 18px}.story-voice img{max-width:45px}.story-shell footer{margin-top:5px}}
@media(prefers-reduced-motion:reduce){.story-shot,.story-body,.story-land,.story-ship{animation:none}}
.story-cinema[data-release-cinema] .story-shot[data-world="0"]{--story-light:#8eeebd3d;--story-key:68% 47%;--story-framing:50% 91%}
.story-cinema[data-release-cinema] .story-shot[data-world="1"]{--story-light:#9ccfff52;--story-key:72% 45%;--story-framing:50% 93%}
.story-cinema[data-release-cinema] .story-shot[data-world="2"]{--story-light:#ffad6e55;--story-key:66% 53%;--story-framing:50% 98%}
.story-cinema[data-release-cinema] .story-shot[data-world="3"]{--story-light:#62ebee42;--story-key:45% 36%;--story-framing:50% 94%}
.story-cinema[data-release-cinema] .story-shot::after{
 content:"";position:absolute;inset:0;pointer-events:none;
 background:linear-gradient(0deg,#020b1973 0%,transparent 26%),
 radial-gradient(ellipse at var(--story-key),var(--story-light),transparent 61%);
}
.story-cinema[data-release-cinema] .story-shot[data-focus="horizon"]{--story-framing:50% 5%}
.story-cinema[data-release-cinema] .story-shot[data-view="surface"] .story-land{object-position:var(--story-framing);}
.story-cinema[data-release-cinema] .story-shot[data-view="planet"] .story-body{left:16%;top:13%;width:68%;height:86%;}
.story-cinema[data-release-cinema] .story-shot[data-view="ship"] .story-body{left:48%;top:10%;width:47%;height:82%;}
.story-cinema[data-release-cinema] .story-shot[data-flight="arrive"] .story-body{left:42%;top:12%;width:55%;height:83%;}
.story-cinema[data-release-cinema] .story-ship{left:-3%;top:28%;width:68%;height:70%;}
@media(prefers-reduced-motion:no-preference){
 .story-cinema[data-release-cinema] .story-shot{animation:story-release-cut .38s ease-out both}
 .story-cinema[data-release-cinema] .story-shot[data-view="surface"] .story-land{animation:story-release-pan 7s ease-out both}
 .story-cinema[data-release-cinema] .story-shot[data-view="surface"][data-speaker="Бип"]{--story-pan-start:2%;--story-pan-end:-1%}
 .story-cinema[data-release-cinema] .story-body{animation:story-release-orbit 8s ease-out both}
 .story-cinema[data-release-cinema] .story-ship{animation:story-release-depart 6s ease-out both}
 .story-cinema[data-release-cinema] .story-shot[data-flight="arrive"] .story-ship{animation-name:story-release-approach}
}
@keyframes story-release-cut{from{opacity:.65}to{opacity:1}}
@keyframes story-release-pan{from{transform:translateX(var(--story-pan-start,-2%)) scale(1.09)}to{transform:translateX(var(--story-pan-end,1%)) scale(1.04)}}
@keyframes story-release-orbit{from{transform:translate(-3%,2%) scale(.91)}to{transform:translate(1%,0) scale(1)}}
@keyframes story-release-depart{from{transform:translate(-10%,6%) rotate(-5deg) scale(.93)}to{transform:translate(12%,-8%) rotate(1deg) scale(.87)}}
@keyframes story-release-approach{from{transform:translate(-13%,8%) rotate(-6deg) scale(.78)}to{transform:translate(4%,0) rotate(-1deg) scale(1)}}
.story-chapter{margin:14px 0;padding:16px;border:1px solid #70999a66;border-radius:12px;background:#112c34;color:#eff4e8}
.story-chapter h2{margin:0 0 6px;font-size:1.18rem;line-height:1.2}
.story-chapter>p,.story-result>p{margin:0 0 10px;line-height:1.45;color:#d4e4df}
.story-chapter .journal-group{margin-top:8px}
.story-chapter .story-quest{border-top:1px solid #51676d;padding:0 8px 0 12px}
.story-chapter .story-quest p{margin:0}
.story-chapter button{margin:4px 8px;max-width:calc(100% - 16px)}
.story-result{margin:10px auto;max-width:34rem;text-align:left}
.story-result .story-link{margin:3px 4px 3px 0}
.story-earned{color:#b6dfbc}
