/* The four selected characters share one transparent sprite atlas. */
.actor-sprite,.cast-sprite{background-image:url('assets/cast-v4.png');background-size:400% 100%;background-repeat:no-repeat;background-position:0% 0%;clip-path:none}
.cast-sprite[data-cast='vucic']{background-position:0% 0%}
.cast-sprite[data-cast='ana'],.office .door[data-visitor='ana'] .door-face{background-position:33.333333% 0%}
.cast-sprite[data-cast='miroljub'],.office .door[data-visitor='miroljub'] .door-face{background-position:66.666667% 0%}
.cast-sprite[data-cast='jovanka']{background-position:100% 0%}
.office .door-face{background-size:400% 100%}
.camera-actor{background-size:400% 100%}
.camera-actor.ana{background-position:33.333333% 0%;left:var(--actor-x,35%);width:28%;filter:brightness(.72);transform:translateX(-50%) scale(var(--approach,.86));transform-origin:50% 100%;animation:ana-breathe 4s ease-in-out infinite}
.camera-actor.ana:after{display:none}
.miroljub-actor{position:absolute;left:37%;bottom:2%;width:30%;height:90%;background-position:66.666667% 0%;background-size:400% 100%;transform:translateX(-50%) scale(var(--charge-scale,.65));transform-origin:50% 100%;filter:brightness(.65) contrast(1.1);transition:transform 1s;animation:miroljub-lean 5s ease-in-out infinite;z-index:2}
.miroljub-running .miroljub-actor{animation:miroljub-lean .35s linear infinite;filter:brightness(.9)}
.jovanka-feed{position:absolute;left:40%;bottom:-3%;width:32%;height:97%;background-size:400% 100%;background-position:100% 0%;transform:translateX(-50%) scale(calc(.8 + var(--broadcast-strength,0)*.35));transform-origin:50% 30%;opacity:var(--broadcast-strength,.5);filter:brightness(1) contrast(1.3) saturate(.2);z-index:5;pointer-events:none;animation:broadcast-slip 5s steps(1) infinite}
.broadcast-active .camera-room{box-shadow:inset 0 0 100px #79468366}
.broadcast-active .camera-room .signal-noise{opacity:calc(.12 + var(--broadcast-strength,0)*.22)}
.broadcast-active .audio-feed{visibility:hidden}
.broadcast-active .cctv-top{color:#e2cce8}
.broadcast-active #monitor-control{border-color:#b49acb;box-shadow:0 0 20px #9b6fbd26}
.tv-broadcast{position:absolute;left:43.8%;top:54.5%;width:12%;height:16%;background-size:400% auto;background-position:100% 0%;background-color:#291c31;clip-path:polygon(5% 0,96% 2%,100% 92%,0 100%);opacity:.85;filter:grayscale(.7) contrast(1.4) brightness(.85);z-index:3;pointer-events:none;animation:broadcast-slip 5s steps(1) infinite}
.broadcast-active .tv-subtitle{top:68%;color:#ead8e7;font-size:clamp(5px,.55vw,9px);z-index:4}
.broadcast-reset{position:absolute;left:50%;bottom:112px;transform:translateX(-50%);min-width:260px;max-width:75%;padding:11px 15px;background:#100c16de;border:1px solid #b096bd66;color:#dfcce4;text-align:center;font:12px var(--mono);z-index:14;pointer-events:none}
.broadcast-reset>div{height:3px;margin-top:10px;background:#39313f}
.broadcast-reset i{display:block;width:0;height:100%;background:#d3b4e2;box-shadow:0 0 8px #d5b1e066}
.broadcast-active:not(.monitor-raised) .sound-caption{bottom:183px}
.monitor-raised.broadcast-active .sound-caption{bottom:190px}
#announce{white-space:normal;line-height:1.5}
.menu-cast{margin-top:17px;font:9px var(--mono);letter-spacing:.09em;color:#aaa18f}
.cast-intro{display:flex;gap:24px;align-items:center;min-height:160px;margin-bottom:20px;border-bottom:1px solid #aaa28a30;padding-bottom:15px}
.cast-portrait{flex:0 0 90px;height:180px;filter:brightness(.85) saturate(.55);background-size:400% 100%}
.cast-intro .arrival{font:9px var(--mono);letter-spacing:.15em;color:#b6a58a;display:block;margin-bottom:12px}
.cast-intro h2{font-size:30px;margin-bottom:14px}
.cast-intro strong{font:13px/1.6 var(--mono);color:#d8d3c5}
#scare .scare-character{background-image:url('assets/cast-v4.png');background-size:400% 100%;background-position:0% 0%}
#scare[data-enemy='ana'] .scare-character{background-position:33.333333% 0%;animation:ana-attack 1.1s steps(3,end) forwards}
#scare[data-enemy='miroljub'] .scare-character{background-position:66.666667% 0%;animation:miroljub-attack 1.1s cubic-bezier(.1,.8,.2,1) forwards}
#scare[data-enemy='jovanka'] .scare-character{background-position:100% 0%;animation:jovanka-attack 1.1s steps(4,end) forwards;filter:brightness(.9) contrast(1.4) saturate(.3)}
#scare[data-enemy='jovanka'] .scare-room{filter:brightness(.2) blur(6px) hue-rotate(270deg)}
#scare[data-enemy='jovanka']>span{color:#dfc4e6}
@keyframes ana-breathe{0%,100%{translate:0 0;rotate:0deg}50%{translate:0 -3px;rotate:1deg}}
@keyframes miroljub-lean{0%,100%{rotate:-2deg}50%{rotate:1deg}}
@keyframes broadcast-slip{0%,72%,78%,100%{translate:0 0}73%{translate:-4px 0}76%{translate:3px -1px}}
@keyframes ana-attack{0%{transform:translateX(-50%) scale(.65)}25%{transform:translateX(-48%) scale(1.35) rotate(-3deg)}60%{transform:translateX(-52%) scale(2.3) rotate(3deg)}100%{transform:translateX(-50%) scale(3) rotate(-2deg)}}
@keyframes miroljub-attack{0%{transform:translateX(-50%) translateY(20%) scale(.35) rotate(-7deg)}35%{transform:translateX(-50%) scale(1.6) rotate(5deg)}100%{transform:translateX(-48%) scale(3.3) rotate(-5deg)}}
@keyframes jovanka-attack{0%{transform:translateX(-50%) scale(.8);opacity:.5}30%{transform:translateX(-42%) scale(1.4);opacity:1}65%{transform:translateX(-57%) scale(2.3)}100%{transform:translateX(-50%) scale(3)}}
@media(max-width:900px){.cast-intro h2{font-size:27px}}
@media(max-width:600px) and (orientation:portrait){
 .camera-actor.ana{width:60%;left:var(--actor-x,29%)}
 .miroljub-actor{width:65%;left:29%;height:90%}
 .jovanka-feed{width:65%;left:38%;height:98%}
 .tv-broadcast{left:43.8%;top:54.5%;width:12%;height:16%}
 .broadcast-reset{bottom:64px;min-width:220px;font-size:10px;padding:8px 12px}
 .broadcast-active:not(.monitor-raised) .sound-caption{bottom:122px}
 .cast-intro{gap:15px;min-height:130px;margin-bottom:15px;padding-bottom:10px}
 .cast-portrait{flex-basis:65px;height:130px}
 .cast-intro h2{font-size:23px;margin-bottom:10px}
 .cast-intro strong{font-size:11px}
 .cast-intro .arrival{font-size:8px;margin-bottom:8px}
 .menu-cast{font-size:8px;letter-spacing:.02em;line-height:1.7}
}
@media(max-height:550px) and (orientation:landscape){
 .cast-intro{min-height:90px;margin-bottom:12px;padding-bottom:8px;gap:15px}
 .cast-portrait{flex-basis:45px;height:90px}
 .cast-intro h2{font-size:23px;margin-bottom:8px}
 .cast-intro strong{font-size:11px}
 .cast-intro .arrival{margin-bottom:6px;font-size:8px}
 .broadcast-reset{bottom:74px;min-width:230px;font-size:10px;padding:8px 12px}
 .broadcast-active:not(.monitor-raised) .sound-caption{bottom:126px}
 .monitor-raised.broadcast-active .sound-caption{bottom:125px}
}
