/* 新結末でだけ現れる機密記録表示。ゲーム本編の既存HUDは変更しない。 */
.end-scene{pointer-events:none;position:absolute;z-index:12;inset:0 0 182px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 12px 16px;background:linear-gradient(180deg,#071521f0 0%,#172737e7 73%,#14212ad9)}
.end-scene-title{flex:none;border-bottom:2px solid #c6af88;text-align:center;font-family:var(--serif);font-weight:900;color:#e8d5b6;font-size:clamp(12px,3.7vw,20px);padding:8px 6px;margin-bottom:14px;width:100%;letter-spacing:.04em}
.end-scene-content{width:100%;max-width:490px;min-height:0;max-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;color:#f0e5d0;text-align:center}
.stage-dossiers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%}
.stage-person{background:#e4d5ba;color:#182630;border:2px solid #7e8581;min-width:0;padding:2px 2px 6px;position:relative;display:flex;flex-direction:column;gap:4px;align-items:center;overflow:hidden}
.stage-person canvas{width:100%;height:auto;max-height:clamp(70px,20vh,125px);object-fit:contain;image-rendering:pixelated}
.stage-person b{font-size:clamp(9px,2.35vw,14px);white-space:nowrap;line-height:1.1}
.stage-stamp{position:absolute;left:1px;right:1px;top:40%;transform:rotate(-18deg) scale(1.1);background:#9f1722eb;border:2px solid #ff8183;color:white;font-family:var(--serif);font-weight:900;font-size:clamp(9px,2.9vw,17px);padding:4px 0;opacity:0;transition:opacity .13s,transform .13s}
.stage-stamp.visible{opacity:1;transform:rotate(-18deg) scale(1)}
.stage-status{font-size:clamp(15px,4.3vw,25px);font-weight:900;letter-spacing:.03em;color:#f4bbbc}
.stage-reward{font-size:clamp(13px,3.8vw,21px);font-weight:900;color:#e6cf97;opacity:0;transition:opacity .2s}
.stage-reward.visible{opacity:1}
.stage-escape{display:flex;flex-direction:column;align-items:center;gap:12px;color:#f3d7b7;font-size:clamp(14px,4vw,20px);font-weight:900}
.stage-escape canvas{max-width:45vw;width:160px;height:auto;image-rendering:pixelated;animation:walkaway 1.9s ease-in forwards}
@keyframes walkaway{to{transform:translateX(60px) scale(.54);opacity:.18}}
.stage-alert-sign{width:95px;height:95px;border:5px solid #e85c5b;display:flex;align-items:center;justify-content:center;color:#f56665;font-size:70px;transform:rotate(45deg);border-radius:10px}
.stage-alert-text{font-size:clamp(23px,7vw,36px);font-weight:900;color:#ff7272}
.end-scene-content p{font-size:clamp(15px,4vw,21px);font-weight:900;line-height:1.5;margin:0}
.stage-wanted{display:flex;align-items:center;flex-direction:column;gap:17px;width:100%;padding:12px 16px 20px;background:#ebdfc7;color:#172e40;border:5px solid #4c829a;box-shadow:0 8px 30px #0009}
.stage-wanted strong{color:#a92d39;font-family:var(--sans);font-size:clamp(35px,10vw,58px);white-space:nowrap}
.stage-you{width:80%;background:#fcf4e4;border:4px solid #374b56;min-height:clamp(110px,24vh,175px);display:flex;align-items:center;justify-content:center;font-size:clamp(57px,16vw,90px);font-weight:900}
.stage-wanted p{font-size:clamp(14px,4vw,21px)}
.stage-broadcast{display:flex;flex-direction:column;gap:18px;align-items:center;padding:35px 15px;border:4px solid #9d9382;background:#283949;color:#f5e9d9;font-size:clamp(18px,5vw,27px);font-weight:900;width:100%}
.stage-broadcast small{font-size:clamp(12px,3vw,16px);color:#c6ced1}
.stage-silhouettes{font-size:54px;color:#b0b5ab}
.stage-accuse{font-size:clamp(23px,6vw,37px);color:#edcdcb;font-weight:900;line-height:1.5}
.stage-accuse span{display:block;font-size:clamp(14px,4vw,20px);margin-top:15px;color:#d8cbbc}
.stage-pointing{font-size:clamp(50px,14vw,94px);color:#e16d67}
.stage-arrest{max-height:98%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px}
.stage-arrest img{width:auto;height:auto;max-width:100%;max-height:min(48vh,470px);object-fit:contain;border:3px solid #c0ac79}
.stage-arrest span{font-size:clamp(13px,3.5vw,18px);font-weight:900;color:#f1db9e}
@media(max-height:570px){.end-scene{inset:0 0 154px;padding:7px}.end-scene-title{margin-bottom:7px;padding:5px}.stage-status{font-size:14px}.stage-reward{font-size:13px}.end-scene-content{gap:8px}.stage-person canvas{max-height:62px}.stage-person{padding-bottom:3px}.stage-wanted{gap:8px}.stage-you{min-height:66px;font-size:45px}}
@media(prefers-reduced-motion:reduce){.stage-escape canvas{animation:none}.stage-stamp,.stage-reward{transition:none}}

/* END cinematic additions: only the paper masks are scratchable. The paper itself stays fixed. */
.redaction-overlay{z-index:17}
.redaction-card{max-width:510px;min-height:0;max-height:100%;gap:9px}
.redaction-instruction{font-size:clamp(13px,3.5vw,16px)!important;line-height:1.4!important;color:#e1c992;text-align:center}
.redaction-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border:1px solid #8b897c;background:#dcd6c8;padding:6px}
.reveal-paper{background:#ede8dd;color:#25272c;font-family:var(--serif);font-size:clamp(13px,3.5vw,17px);font-weight:700;line-height:1.42;max-width:100%;min-height:100%;padding:clamp(13px,3.4vw,22px) clamp(12px,4vw,22px);box-shadow:0 1px 6px #3f403c66;user-select:none;-webkit-user-select:none}
.reveal-paper-heading{text-align:left;color:#863a3a;font-size:clamp(11px,3vw,14px);border-bottom:2px solid #a9a093;padding-bottom:8px;letter-spacing:.09em}
.reveal-paper h3{font-size:clamp(19px,5vw,28px);margin:17px 0 6px;text-align:center;color:#181d22}
.reveal-file-id{color:#626369;text-align:center;font:700 10px/1.55 var(--sans);margin-bottom:15px}
.reveal-paper-row{padding:8px 0 10px;border-top:1px solid #b7ae9f}
.reveal-paper-label{font:800 clamp(10px,2.8vw,12px)/1.5 var(--sans);color:#54575c;margin-bottom:5px}
.reveal-paper-value{overflow-wrap:anywhere}
.reveal-secret{position:relative;min-height:44px;padding:8px 5px;border:1px solid #aaa69a;background:#e8e3d9;display:flex;align-items:center;overflow:hidden}
.reveal-secret-value{display:block;font-size:clamp(13px,3.7vw,17px);line-height:1.35;overflow-wrap:anywhere;color:#26313b}
.reveal-black{position:absolute;inset:0;width:100%;height:100%;touch-action:manipulation;cursor:pointer;transition:opacity .24s ease}
.reveal-paper-footer{border-top:2px solid #9b8e86;color:#8b3a3f;font-size:clamp(11px,3vw,13px);padding-top:10px;margin-top:12px;text-align:right}
.dialog-card.cinema-shock{animation:cinemaPunch .27s ease-out both}
@keyframes cinemaPunch{0%{transform:translateX(0);filter:brightness(1)}20%{transform:translateX(-2px);filter:brightness(1.5)}42%{transform:translateX(2px);filter:brightness(1.1)}65%{transform:translateX(-1px)}100%{transform:translateX(0);filter:brightness(1)}}
@media(max-height:600px){.redaction-card{padding:8px;gap:5px}.redaction-scroll{padding:3px}.reveal-paper{padding:10px}.reveal-paper-row{padding:5px 0}.reveal-secret{min-height:40px}.reveal-paper h3{margin:8px 0 3px}}
@media(prefers-reduced-motion:reduce){.dialog-card.cinema-shock{animation:none}.reveal-black{transition:none}}

/* WANTED 06 uses the supplied blank-faced portrait, without changing the dossier text. */
.stage-you-photo-frame{flex-direction:column;gap:3px;padding:4px;min-height:0;max-height:min(35dvh,290px)}
.stage-you-photo-frame img{max-width:100%;height:auto;max-height:min(27dvh,223px);object-fit:contain;image-rendering:auto}
.stage-you-photo-frame span{font-size:clamp(18px,4.5vw,25px);line-height:1.2}
.stage-arrest img{image-rendering:auto}
@media(max-height:570px){.stage-you-photo-frame{max-height:160px}.stage-you-photo-frame img{max-height:110px}}

/* END scene polish; all images are the creator's existing game assets. */
.stage-person img{width:100%;height:clamp(66px,18vh,119px);object-fit:contain;image-rendering:auto;display:block}
.stage-person .stage-stamp.visible{animation:stageSealArrive .35s cubic-bezier(.12,.8,.3,1) both}
@keyframes stageSealArrive{0%{opacity:0;transform:rotate(-20deg) scale(1.6)}100%{opacity:1;transform:rotate(-18deg) scale(1)}}
.stage-wanted{position:relative;overflow:hidden}
.stage-wanted:after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(180deg,transparent 0 10px,#25556b10 10px 12px);mix-blend-mode:multiply}
.stage-police-row{display:flex;justify-content:center;gap:20px;max-height:65px;align-items:end}
.stage-arrest .stage-police-row img{max-width:70px;max-height:65px;width:auto;height:auto;object-fit:contain;border:0;image-rendering:pixelated}
.ending-card.end-cinematic .end-image-btn img{animation:endStillReveal 1.2s ease-out both,endStillDrift 25s 1.2s ease-out forwards}
@keyframes endStillReveal{from{opacity:.1;filter:brightness(.55)}to{opacity:1;filter:brightness(1)}}
@keyframes endStillDrift{from{transform:scale(1)}to{transform:scale(1.018)}}
@media(max-height:570px){.stage-person img{height:62px}.stage-police-row{max-height:43px}.stage-arrest .stage-police-row img{max-height:42px}}
@media(prefers-reduced-motion:reduce){.stage-person .stage-stamp.visible,.ending-card.end-cinematic .end-image-btn img{animation:none!important}}

.ending-card.end-cinematic .end-image-btn{padding:2px}

/* One actual record per page is readable at phone sizes; no image crop. */
.stage-featured-record{display:flex;flex-direction:column;align-items:center;gap:6px;max-width:100%;min-height:0}
.stage-featured-record>img{display:block;width:auto;max-width:80%;height:auto;max-height:min(33dvh,310px);object-fit:contain;box-shadow:0 4px 17px #0008;border:2px solid #b4a78b}
.stage-featured-record>span{font:800 clamp(12px,3.1vw,15px)/1.2 var(--serif);color:#e1cb9f}
@media(max-height:570px){.stage-featured-record>img{max-height:26dvh}.stage-featured-record{gap:3px}}

/* 35: use the official end stills during the ending sequence itself. */
.stage-ending-still{position:relative;width:100%;max-width:520px;min-height:0;display:flex;align-items:stretch;justify-content:center;overflow:hidden;border:3px solid #c3ad86;box-shadow:0 10px 35px #000b;background:#0d141b}
.stage-ending-still>img{display:block;width:100%;height:auto;max-height:min(56dvh,560px);object-fit:contain;background:#0c1219}
.stage-ending-still:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(255,255,255,.03) 0%,rgba(0,0,0,.14) 36%,rgba(5,9,12,.88) 100%)}
.stage-still-caption{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:14px 14px 16px;display:flex;flex-direction:column;gap:6px;text-align:left;background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(4,7,10,.72) 24%,rgba(4,7,10,.96) 100%)}
.stage-still-caption strong{font:900 clamp(19px,5.6vw,32px)/1.15 var(--serif);color:#fff6ea;text-shadow:0 2px 12px #000}
.stage-still-caption span{font:800 clamp(12px,3.6vw,18px)/1.36 var(--serif);color:#eedccc;text-shadow:0 1px 8px #000}
.stage-ending-still-end1 .stage-still-caption strong{color:#ffd9d9}
.stage-ending-still-end2 .stage-still-caption strong{color:#ffe29c}
.stage-police-row-large{position:absolute;left:0;right:0;bottom:88px;z-index:2;display:flex;justify-content:center;gap:10px;align-items:flex-end;pointer-events:none}
.stage-ending-still .stage-police-row-large img{max-width:84px;max-height:84px;width:auto;height:auto;border:0;image-rendering:pixelated;filter:drop-shadow(0 2px 4px rgba(0,0,0,.6))}
@media(max-height:620px){.stage-ending-still>img{max-height:min(50dvh,420px)}.stage-police-row-large{bottom:74px}.stage-ending-still .stage-police-row-large img{max-width:60px;max-height:60px}.stage-still-caption{padding:10px 10px 12px}}
@media(prefers-reduced-motion:no-preference){.stage-ending-still>img{animation:endStillIn .55s ease-out both}.stage-police-row-large img:nth-child(2),.stage-police-row-large img:nth-child(3){animation:policePulse .8s steps(2,end) infinite}}
@keyframes endStillIn{from{transform:scale(1.035);filter:brightness(.62)}to{transform:scale(1);filter:brightness(1)}}
@keyframes policePulse{50%{transform:translateY(-1px);filter:drop-shadow(0 0 10px rgba(255,220,120,.36))}}


/* Two-ending still-first cinema: dedicated portrait and landscape art fills the stage
   without re-cropping the supplied image. The one-tap dialog remains usable. */
.end-scene.is-ending-still{inset:0!important;padding:0!important;background:#05090f!important;overflow:hidden}
.end-scene.is-ending-still .end-scene-title{display:none}
.end-scene.is-ending-still .end-scene-content{height:100%;max-height:100%;max-width:none;width:100%;gap:0}
.end-scene.is-ending-still .stage-ending-still{width:100%;height:100%;max-width:none;max-height:none;min-height:0;display:block;border:0;box-shadow:none;background:#05090f;overflow:hidden}
.end-scene.is-ending-still .stage-ending-still>img{width:100%;height:100%;max-height:none;max-width:none;object-fit:contain;object-position:50% 50%;border:none;image-rendering:auto}
.end-scene.is-ending-still .stage-ending-still:after{content:none}
.dialog-overlay.is-end-still{background:linear-gradient(0deg,#02071144 0%,transparent 55%);}
.dialog-overlay.is-end-still .dialog-card{background:linear-gradient(140deg,#06283fe8,#071a2cf2);box-shadow:0 0 20px #000b,inset 0 0 0 3px #14374d}
.end-scene.is-ending-death{background:#040207!important}
.end-scene.is-ending-death .end-scene-title{display:none}
.end-scene.is-ending-death .end-scene-content{max-width:100%}
.end-death-notice{display:flex;min-height:45dvh;justify-content:center;align-items:center;flex-direction:column;gap:20px;color:#ff515c;text-shadow:0 0 13px #b00030}
.end-death-notice span{font:900 clamp(20px,5vw,31px)/1.3 var(--serif)}
.end-death-notice strong{font:900 clamp(26px,7vw,54px)/1.2 var(--serif)}
.end-wanted-photo{display:flex;flex-direction:column;align-items:center;gap:7px;width:100%;height:100%;max-height:100%;padding:0 6px;color:#fff5df}
.end-wanted-photo strong{font:900 clamp(24px,7vw,50px)/1.2 var(--sans);color:#ff7a88;text-shadow:0 0 16px #e35b70a0}
.end-wanted-photo img{width:100%;max-width:390px;height:auto;max-height:min(53dvh,490px);min-height:0;object-fit:contain;border:3px solid #9eacb0;box-shadow:0 3px 27px #0009}
.end-wanted-photo span{font:900 clamp(15px,4vw,20px)/1.3 var(--serif)}
.end-report-alarm,.end-police-alert{min-height:45dvh;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;width:100%;color:#f8d0da}
.end-report-alarm b,.end-police-alert strong{color:#ff7787;font:900 clamp(24px,7.5vw,45px)/1.2 var(--serif);text-shadow:0 0 12px #ad1e47}
.end-report-alarm strong{font:900 clamp(22px,6vw,35px)/1.2 var(--serif)}
.end-report-alarm span,.end-police-alert span{font:800 clamp(14px,3.7vw,19px)/1.3 var(--serif)}
.end-police-line{width:100%;display:flex;align-items:end;justify-content:space-evenly;gap:2px}
.end-police-line img{height:clamp(90px,24dvh,210px);width:auto;max-width:19%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 4px #0009)}
@media(min-width:768px) and (orientation:landscape){.end-wanted-photo{gap:5px}.end-wanted-photo img{max-height:min(48dvh,390px);max-width:500px}.end-police-line img{height:clamp(110px,31dvh,220px)}}
@media(max-height:610px){.end-wanted-photo img{max-height:34dvh}.end-police-line img{height:clamp(75px,21dvh,160px)}.end-death-notice{min-height:28dvh}}
@media(prefers-reduced-motion:no-preference){
 .end-death-notice strong{animation:deathPulse .65s steps(2,end) 2}
 .end-wanted-photo strong{animation:wantedAlarm .7s steps(2,end) 3}
 .end-scene.is-ending-still .stage-ending-still>img{animation:stillLightOn .6s ease-out both}
 .end-scene.is-ending-still[data-end="2"] .stage-ending-still>img{animation:stillWhiteFlash .65s ease-out both}
}
@keyframes deathPulse{40%{opacity:.1}70%{opacity:1}}
@keyframes wantedAlarm{50%{opacity:.25}}
@keyframes stillLightOn{from{filter:brightness(.10);opacity:.2}to{filter:brightness(1);opacity:1}}
@keyframes stillWhiteFlash{from{filter:brightness(3);opacity:.65}to{filter:brightness(1);opacity:1}}
/* Landscape artwork must occupy the actual PC viewport, not the narrow 530px game column. */
.end-scene.is-ending-still{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important}

/* ================================================================
   Cinematic polish: 21–30 – original sprites and END stills only
   ================================================================ */
/* 21: two uneasy bystanders hesitate before the street-wide escalation.
   Drawn on the existing street canvas by the current riot renderer. */
/* 22: staged police line: each guard reaches its place before the radio cue.
   Position and final size stay unchanged. */
/* 23: one brief quiet beat before the existing gunshot; screen flash is
   rendered on the street canvas, and the reduced-motion option suppresses
   the visual component below. */
/* 24: five files, SIX victims; emphasize this single numerical contradiction. */
.stage-status.six-subjects{color:#ff9da2;border-top:1px solid #ff80887a;padding-top:7px;
 text-shadow:0 0 10px #b61b4159}
@media(prefers-reduced-motion:no-preference){.stage-status.six-subjects{animation:sixCaseImpact .30s ease-out both}}
@keyframes sixCaseImpact{0%{opacity:.2;transform:scale(1.07)}100%{opacity:1;transform:scale(1)}}
/* 25: one fluorescent-light click/reveal, then hold the existing still
   steady so the belongings remain legible. */
@media(prefers-reduced-motion:no-preference){
 .end-scene.is-ending-still[data-end="1"] .stage-ending-still>img{
  animation:singleFluorescentReveal 1.05s steps(1,end) both!important}
}
@keyframes singleFluorescentReveal{
  0%{filter:brightness(.08)}22%{filter:brightness(.48)}31%{filter:brightness(.12)}38%{filter:brightness(.82)}46%,100%{filter:brightness(1)}
}
/* 26: even during the muted silence, the LIVE lamp remains present. */
.playfield .live-dot{opacity:1}
/* 27: WANTED 06 is disclosed in three consecutive steps, without an extra
   tap or a new screen. The ordinary source photo stays unchanged. */
.end-wanted-photo[data-reveal-step="0"]>img,
.end-wanted-photo[data-reveal-step="0"]>span{opacity:0}
.end-wanted-photo[data-reveal-step="1"]>span{opacity:0}
.end-wanted-photo[data-reveal-step="1"]>img{opacity:1}
.end-wanted-photo[data-reveal-step="2"]>img,
.end-wanted-photo[data-reveal-step="2"]>span,
.end-wanted-photo[data-reveal-step="3"]>img,
.end-wanted-photo[data-reveal-step="3"]>span{opacity:1}
@media(prefers-reduced-motion:no-preference){
 .end-wanted-photo>img,.end-wanted-photo>span{transition:opacity .23s ease}
}
/* 28: cascading reports are purely visual, do not change scoring. */
.report-cascade{display:flex;justify-content:space-around;gap:6px;width:min(100%,320px);margin-top:12px;pointer-events:none}
.report-cascade i{display:grid;place-items:center;width:31px;height:31px;border:2px solid #eb9ca8;
 color:#ffe9ee;background:#9c1c38a8;border-radius:50%;font:900 21px/1 var(--sans);font-style:normal}
@media(prefers-reduced-motion:no-preference){
 .report-cascade i{animation:reportChain .26s ease-out both}
 .report-cascade i:nth-child(2){animation-delay:.10s}
 .report-cascade i:nth-child(3){animation-delay:.20s}
 .report-cascade i:nth-child(4){animation-delay:.30s}
 .report-cascade i:nth-child(5){animation-delay:.40s}
}
@keyframes reportChain{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:translateY(0)}}
/* 29: existing police sprites visibly close in from both sides. */
@media(prefers-reduced-motion:no-preference){
 .end-police-line img{animation:policeSurround .48s ease-out both}
 .end-police-line img:nth-child(1){--start-x:-65px;animation-delay:.02s}
 .end-police-line img:nth-child(2){--start-x:-32px;animation-delay:.10s}
 .end-police-line img:nth-child(3){--start-x:0px;animation-delay:.17s}
 .end-police-line img:nth-child(4){--start-x:32px;animation-delay:.24s}
 .end-police-line img:nth-child(5){--start-x:65px;animation-delay:.30s}
}
@keyframes policeSurround{from{opacity:.35;transform:translateX(var(--start-x,0px))}to{opacity:1;transform:translateX(0)}}
/* 30: the actual color photo enters through the last simulated camera
   shutter. Leave the original phone/PC art unchanged afterward. */
@media(prefers-reduced-motion:no-preference){
 .end-scene.is-ending-still[data-end="2"] .stage-ending-still>img{
  animation:cinematicCameraReveal .55s steps(1,end) both!important}
}
@keyframes cinematicCameraReveal{0%{filter:brightness(3)}12%{filter:brightness(.1)}27%{filter:brightness(1.65)}40%,100%{filter:brightness(1)}}
@media(max-height:540px){.report-cascade{margin-top:3px}.report-cascade i{width:23px;height:23px;font-size:14px}}
@media(prefers-reduced-motion:reduce){.report-cascade i,.end-police-line img,.stage-status.six-subjects{animation:none!important}}
