/* 结局使用预制像素素材；没有每帧图像处理。 */
.ending-screen{position:fixed;inset:0;z-index:85;background:#070c10;color:#e8dfcb;display:flex;align-items:center;isolation:isolate;}
.ending-screen>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;z-index:-2;}
.ending-screen::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(5,9,13,.97),rgba(5,9,13,.85) 25%,rgba(5,9,13,.1) 70%);z-index:-1;}
.ending-copy{width:min(480px,43vw);margin-left:7vw;text-align:left;}
.ending-copy h1{font-size:clamp(35px,5vw,70px);font-weight:normal;letter-spacing:.14em;color:#e3cca0;margin:20px 0 28px;}
#ending-number{font-size:14px;letter-spacing:.25em;color:#b4a88f;}
#ending-caption{font-size:18px;line-height:2;max-width:360px;}
#ending-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:32px;}
#ending-actions button{background:#141c21e8;font:15px "Ark Pixel",sans-serif;}
.ending-gallery-card img{width:100%;aspect-ratio:16/9;object-fit:cover;image-rendering:pixelated;margin-bottom:12px;}
.ending-gallery-card .journal-action{margin-top:14px;}
@media(max-width:700px){.ending-copy{width:80vw;margin:8vw;}.ending-copy h1{font-size:38px;}#ending-caption{font-size:15px;}.ending-screen::before{background:#05090dbd;}#ending-actions{margin-top:16px;}}

/* 字幕等待不阻断空格；画面不缩放，保持清楚的像素边缘。 */
.galgame.is-cinematic .galgame-dialogue{transition:opacity .35s ease;background:linear-gradient(180deg,#080c10dd,#080c10f5);}
.galgame.is-arriving .galgame-dialogue{opacity:0;pointer-events:none;}
.galgame.is-cinematic .galgame-vhs{opacity:.14;}
.galgame.is-cinematic[data-sound="air"] .galgame-vhs,.galgame.is-cinematic[data-sound="paper"] .galgame-vhs{opacity:.03;}
#cinematic-sound{display:none;position:absolute;top:22px;right:24px;z-index:20;padding:8px 12px;background:#0a1116b8;border:1px solid #665e4d;color:#bdb8a9;font:13px "Ark Pixel",sans-serif;cursor:pointer;}
.galgame.is-cinematic #cinematic-sound{display:block;}
@media(prefers-reduced-motion:reduce){.galgame.is-cinematic .galgame-dialogue{transition:none;}}
#opening-subtitle{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:8px 5%;background:#080808;color:#d4d0c6;text-align:center;font:clamp(13px,1.5vw,20px)/1.7 "Ark Pixel",sans-serif;pointer-events:none;}

/* 最后一幅画面缓慢显现；名单单页停留，不滚动。 */
#ending-veil{position:fixed;inset:0;z-index:120;background:#05070a;opacity:0;transition:opacity 1.8s ease;pointer-events:auto;}
#ending-veil.is-dark{opacity:1;}
.ending-screen.ending-reveal>img{opacity:0;transition:opacity 2.8s ease;}
.ending-screen.ending-reveal.ending-ready>img{opacity:1;}
.ending-reveal .ending-copy{opacity:0;transition:opacity 1.2s ease;}
.ending-reveal.ending-text-ready .ending-copy{opacity:1;}
.ending-reveal #ending-actions{visibility:hidden;pointer-events:none;}
#ending-caption{min-height:8em;max-width:440px;white-space:pre-line;}
#ending-credits{position:fixed;inset:0;z-index:110;display:grid;place-items:center;background:#030405;color:#ddd3bd;opacity:0;transition:opacity 1.8s ease;}
#ending-credits.is-visible{opacity:1;}
.credits-sheet{width:min(660px,86vw);text-align:center;padding:24px;}
.credit-frame{opacity:0;transition:opacity 1.15s ease;}.credit-frame.is-visible{opacity:1;}
.credit-frame h2{font-size:clamp(32px,4vw,58px);margin:24px 0;}
.credit-detail{font-size:16px;color:#959c9e;line-height:1.8;min-height:2em;}
.credits-kicker{color:#a89c86;font-size:16px;letter-spacing:.2em;margin:0 0 18px;}
.credits-sheet h2{font-size:clamp(24px,3vw,36px);font-weight:normal;color:#e2c89b;letter-spacing:.15em;margin:0 0 28px;}
.credits-sheet dl{margin:0 auto 26px;width:min(460px,100%);font-size:18px;line-height:1.8;}
.credits-sheet dl>div{display:grid;grid-template-columns:110px 1fr;gap:25px;padding:4px 0;}
.credits-sheet dt{text-align:left;}.credits-sheet dd{margin:0;text-align:right;color:#b5b2a7;}
.credits-original{font-size:16px;line-height:1.8;margin:20px 0 14px;}.credits-original span{color:#999e9f;font-size:14px;}
.credits-music{color:#969b9b;font-size:13px;margin:0;}.credits-thanks{font-size:27px;color:#e2c89b;letter-spacing:.2em;margin:28px 0 0;}
#ending-fracture{position:fixed;inset:0;z-index:105;overflow:hidden;background:#040709;color:#c5d4cd;}
#ending-fracture img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;opacity:.58;transform:translateX(-7px);}
#ending-fracture[data-slice="1"] img{transform:translateX(10px) skewX(-1deg);}
#ending-fracture::after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 5px,#0005 5px 7px),linear-gradient(transparent 28%,#657a8033 28% 30%,transparent 30% 66%,#020509dd 66% 68%,transparent 68%);}
.fracture-time{position:absolute;right:7%;top:8%;z-index:1;font:24px monospace;letter-spacing:.12em;}
.fracture-voice{position:absolute;bottom:12%;left:9%;right:9%;z-index:1;font-size:23px;text-align:center;}
@media(max-height:650px){.credits-sheet{padding:14px;}.credits-sheet h2{margin-bottom:12px;}.credits-sheet dl{font-size:16px;line-height:1.4;margin-bottom:12px;}.credits-thanks{margin-top:15px;font-size:23px;}.credits-original{margin:12px 0;}}
@media(prefers-reduced-motion:reduce){#ending-fracture img,#ending-fracture[data-slice="1"] img{transform:none;}}
