/* 신성율42 V9 · 원본 사용자 사진 기반의 최후변론/재판 장면, 밤의 시네마틱 전환 */
/* 1. The attached photograph is a real in-game scene, not a mock-up. */
.trial-stage{background:#070809;padding:15px clamp(12px,2.5vw,35px) 20px;gap:clamp(6px,1.4vh,14px)}
.trial-stage::before{background:radial-gradient(ellipse at 50% 40%,#38415142,#050708 72%)}
.trial-backdrop{background:repeating-linear-gradient(0deg,transparent 0 7px,#ffffff08 8px 9px);opacity:.42}
.trial-upper{flex:0 0 auto;width:min(100%,1160px);letter-spacing:2px}
.trial-photo-scene{
 position:relative;isolation:isolate;flex:none;overflow:hidden;
 width:min(1140px,100%);height:clamp(220px,48vh,540px);
 border:1px solid #79635c;box-shadow:0 18px 58px #000e,inset 0 0 0 1px #ccb8a72a;
 background:#07090b;
}
.trial-photo{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 53%;filter:saturate(.85) contrast(1.06) brightness(.82);animation:trialPhotoBreath 14s ease-in-out infinite alternate}
.trial-photo-shade{position:absolute;z-index:2;inset:0;pointer-events:none;background:linear-gradient(180deg,#0507097d,transparent 28%,transparent 60%,#050506b8),radial-gradient(ellipse at center,transparent 36%,#0103048e 100%)}
.trial-rain{position:absolute;inset:-50%;z-index:3;pointer-events:none;opacity:.16;background:repeating-linear-gradient(97deg,transparent 0 28px,#edf0ff40 29px 30px,transparent 32px 58px);animation:trialRain 3s linear infinite}
.trial-evidence{position:absolute;z-index:4;top:15px;left:17px;background:#0c0a0dc9;border-left:2px solid #ae6760;padding:8px 12px;font:9px var(--mono);letter-spacing:2px;color:#e7c6b2}
.trial-photo-scene .trial-body-tag{top:auto;bottom:14%;left:50%;z-index:5;width:max-content;max-width:58%;min-width:150px;min-height:42px;display:flex;align-items:center;justify-content:center;font-size:clamp(16px,2vw,24px);background:#1c1114ed;border:1px solid #a88e78;box-shadow:0 9px 34px #000f,0 0 20px #a4534c40;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.trial-scene-mark{position:absolute;right:15px;bottom:12px;z-index:5;font:10px var(--sans);letter-spacing:2px;color:#e2c4af;text-shadow:0 2px 8px #000}
.trial-bottom{width:min(920px,100%);z-index:4;gap:clamp(5px,.9vh,10px);padding:0 0 12px}
.trial-bottom h2{font-size:clamp(28px,4.6vw,54px);line-height:1.15}
.trial-bottom>p{font-size:clamp(12px,1.4vw,15px);line-height:1.35}
.trial-dialogue{width:min(760px,100%);max-height:12vh;background:#0b0e12ef;border-color:#675252}
.trial-choice{width:min(660px,100%);gap:13px;margin:2px auto 0}
.trial-choice button{flex-direction:row;justify-content:center;flex-wrap:wrap;gap:12px;min-height:65px;padding:8px 16px;background:#0e1415ef;border-radius:3px}
.trial-choice button span{font-size:clamp(31px,4.5vw,49px)}
.trial-choice button small{width:100%;letter-spacing:1px;margin-top:-9px}
.trial-argument{width:min(760px,100%);margin:0 auto}
.trial-argument input{min-height:43px}
.trial-progress{height:5px;margin:0}
.trial-stage.trial-enter .trial-photo-scene{animation:photoReveal 1.2s cubic-bezier(.15,.75,.15,1) both}
.trial-stage.trial-enter .trial-body-tag{animation:photoNameReveal .6s 1s both}
.trial-stage.trial-enter .trial-bottom{animation:cinemaTextEnter .65s .5s both}
@keyframes photoReveal{from{opacity:0;filter:brightness(.2);transform:scale(1.055)}to{opacity:1;filter:brightness(1);transform:scale(1)}}
@keyframes photoNameReveal{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
@keyframes trialPhotoBreath{from{transform:scale(1)}to{transform:scale(1.035)}}
@keyframes trialRain{to{transform:translate3d(-46px,145px,0)}}
/* 2. Nightfall: darkness slides inward while the sky and city cool to moonlit blue. */
.transition-overlay.scene-night{background:radial-gradient(ellipse at 50% 29%,#26384c 0%,#070d17 54%,#010306 100%)}
.transition-nightfall{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
.transition-nightfall i{position:absolute;top:-15%;bottom:-15%;width:55%;background:linear-gradient(90deg,#010307 0%,#040911ed 83%,#0b162a44);filter:blur(2px);opacity:0}
.transition-overlay.scene-night .transition-nightfall i:first-child{left:-3%;animation:nightCurtainLeft 4.1s ease-in-out both}
.transition-overlay.scene-night .transition-nightfall i:last-child{right:-3%;transform:scaleX(-1);animation:nightCurtainRight 4.1s ease-in-out both}
.transition-storm{position:absolute;inset:-50%;z-index:4;pointer-events:none;opacity:.06;background:repeating-linear-gradient(101deg,transparent 0 33px,#c9daed 33px 34px,transparent 35px 67px);animation:trialRain 2.2s linear infinite}
.transition-overlay.scene-night .transition-storm{opacity:.17}
.transition-overlay.scene-daybreak .transition-storm,.transition-overlay.scene-save .transition-storm{opacity:.05}
.transition-horizon{position:absolute;inset:auto 0 0;height:45%;z-index:2;pointer-events:none;opacity:.34;background:linear-gradient(180deg,transparent,#010407 80%),repeating-linear-gradient(90deg,#121b23 0 23px,#04070d 24px 41px,#151d24 42px 53px)}
.transition-overlay.scene-night .transition-moon{animation:moonRise 4s ease-out both,moonLight 3s ease-in-out infinite alternate;opacity:.63}
.transition-overlay.scene-night>strong{text-shadow:0 1px 22px #bbd2f360,0 4px 45px #000!important}
.transition-overlay.scene-night .cinematic-progress i{background:linear-gradient(90deg,#2c4457,#bbd0e5)}
@keyframes nightCurtainLeft{0%{opacity:0;transform:translateX(-95%)}35%{opacity:.82;transform:translateX(-10%)}66%{opacity:.68;transform:translateX(-3%)}100%{opacity:.08;transform:translateX(-5%)}}
@keyframes nightCurtainRight{0%{opacity:0;translate:95% 0}35%{opacity:.8;translate:10% 0}65%{opacity:.68;translate:3% 0}100%{opacity:.08;translate:5% 0}}
@keyframes moonLight{from{box-shadow:0 0 50px #7a98bf20}to{box-shadow:0 0 160px #acc2df4e}}
/* 3. Persistent lighting while the actual game phase is night. */
.roundtable-world{transition:filter 1.6s ease, background 1.6s ease}
.roundtable-world.mode-night::before{background:radial-gradient(ellipse at 50% 43%,#02122622 5%,#030610dc 100%),linear-gradient(180deg,#0713268a,#01020554);transition:background 2s}
.roundtable-world.mode-night .table-window{filter:brightness(.84) saturate(.65);transition:filter 1.5s}
.roundtable-world.mode-night .table-wood{filter:brightness(.41) saturate(.66);transition:filter 1.5s}
.roundtable-world.mode-night .table-seat{filter:brightness(.53) saturate(.63);transition:filter 1.5s}
.roundtable-world.mode-night .table-seat.mine{filter:brightness(.72)}
.roundtable-world.mode-night .table-lightcone{opacity:.025!important;transition:opacity 1.5s}
.game-stage.night-v9 .stage-scene-moon{opacity:.85;filter:brightness(1.13) saturate(.7);box-shadow:0 0 80px #87acd04b}
.game-stage.night-v9 .stage-scene{background:radial-gradient(ellipse at 50% 23%,#172a44 0,#060a13 47%,#010307 100%);transition:background 1.7s}
.game-stage.night-v9 .stage-top h3{color:#cad8e9}
/* Mobile keeps the photograph visible and verdict controls usable without overflowing. */
@media(max-width:750px){
 .trial-stage{padding:10px 11px 15px;gap:7px}
 .trial-photo-scene{height:clamp(190px,35vh,390px)}
 .trial-evidence{font-size:8px;letter-spacing:1px;top:10px;left:9px;padding:6px 8px}
 .trial-photo-scene .trial-body-tag{bottom:9%;min-width:100px;max-width:70%;padding:7px 11px;min-height:33px;font-size:clamp(13px,3vw,17px)}
 .trial-scene-mark{font-size:8px;bottom:7px;right:8px;letter-spacing:0}
 .trial-bottom h2{font-size:clamp(26px,6vw,39px)}
 .trial-bottom>p{font-size:12px}
 .trial-choice button{min-height:55px;font-size:clamp(13px,3vw,17px);gap:5px}
 .trial-choice button span{font-size:clamp(26px,5vw,40px)}
 .trial-dialogue{max-height:13vh}
}
@media(max-width:410px){
 .trial-photo-scene{height:clamp(175px,30vh,300px)}
 .trial-choice{gap:7px}
 .trial-choice button{padding:7px 4px}
 .trial-upper{font-size:8px;letter-spacing:.5px}
}
@media(max-height:670px) and (min-width:751px){
 .trial-photo-scene{height:34vh}
 .trial-dialogue{max-height:8vh}
 .trial-bottom h2{font-size:32px}
}
@media(prefers-reduced-motion:reduce){
 .trial-photo,.trial-rain,.transition-storm,.transition-nightfall i,.transition-overlay.scene-night .transition-moon,.trial-stage.trial-enter .trial-photo-scene,.trial-stage.trial-enter .trial-body-tag,.trial-stage.trial-enter .trial-bottom{animation:none!important}
}
body.reduce-motion .trial-photo,body.reduce-motion .trial-rain,body.reduce-motion .transition-storm,body.reduce-motion .transition-nightfall i,body.reduce-motion .trial-stage.trial-enter .trial-photo-scene,body.reduce-motion .trial-stage.trial-enter .trial-body-tag{animation:none!important}

/* 4. The photo and ambient light change subtly when the jury vote opens. */
.trial-stage.verdict-phase .trial-photo-shade{background:linear-gradient(180deg,#08060a8a,transparent 34%,#250b1444 75%,#060409e8),radial-gradient(ellipse at 50% 25%,transparent 20%,#040305a3 100%)}
.trial-stage.verdict-phase .trial-evidence{color:#eaa9aa;border-color:#be5762}
.trial-stage.verdict-phase .trial-body-tag{border-color:#c17779}
.trial-stage.verdict-phase .trial-bottom h2{color:#f4d8d0}
.transition-overlay.scene-daybreak .transition-horizon{filter:sepia(.45) brightness(1.7);opacity:.46}
.transition-overlay.scene-daybreak:before{background:radial-gradient(ellipse at 50% 14%,#f3bd8561,transparent 57%)}
.transition-overlay.scene-daybreak .transition-moon{background:radial-gradient(circle at 50% 30%,#f5d0a4,#a88765);box-shadow:0 0 160px #ffcb8244}
