/* A brief in-game cut-in, framed exactly like the current residence. */
dialog.action-scene[open]{position:fixed!important;inset:auto!important;left:var(--scene-left,0px)!important;top:var(--scene-top,0px)!important;width:var(--scene-width,100vw)!important;height:var(--scene-height,100dvh)!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;transform:none!important;border:3px double #b6a078!important;border-radius:0!important;box-sizing:border-box;overflow:hidden!important;background:#0b1420!important;color:#f8edda!important;box-shadow:0 0 80px #000a;font-family:var(--serif,'Noto Serif KR',serif)}
.action-scene::backdrop{background:#080e17e6}.action-scene-art{position:absolute;inset:0;overflow:hidden}.action-scene-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 42%;filter:none!important;opacity:1!important;transform:scale(1.055)}
.action-scene-shade{position:absolute;inset:0;background:linear-gradient(0deg,#07111bf5 0%,#0a142bab 20%,transparent 65%,#0b15287a 100%)}
.action-scene-top{position:absolute;inset:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:22px 30px;gap:12px;background:linear-gradient(#07111bcf,transparent);color:#f5dfb3}
.action-scene-top>span{display:flex;align-items:center;gap:12px;font-size:20px;font-weight:600}.action-scene-top i{display:grid;place-items:center;box-sizing:border-box;width:46px;height:50px;font-style:normal;font-size:30px;line-height:1;border:3px double #b99d71;background:#10253b}
.action-scene-skip{display:grid;place-items:center;min-height:44px;padding:8px 16px;border:1px solid #b89b70;background:#102033dc;color:#f2e6d1;font:600 14px var(--serif);white-space:nowrap;cursor:pointer}
.action-scene-dialogue{position:absolute;inset:auto 5% 7%;display:grid;grid-template-columns:clamp(130px,17vw,230px) minmax(0,1fr);align-items:center;gap:30px;padding:22px 28px;border:3px double #b79b6c;background:linear-gradient(105deg,#0e2135f5,#102237e8);box-shadow:0 12px 36px #0007;opacity:0;transform:translateY(14px)}
.action-scene-portrait{display:block;box-sizing:border-box;width:100%;height:auto;aspect-ratio:1;object-fit:cover;border:3px double #bfa47a;box-shadow:0 4px 20px #0009;filter:none!important;opacity:1!important}
.action-scene-dialogue>div{min-width:0}.action-scene-dialogue strong{display:block;font-size:clamp(20px,2.5vw,30px);color:#d9c097;line-height:1.4}.action-scene-dialogue p{margin:12px 0;font-size:clamp(20px,2.6vw,34px);line-height:1.6;font-weight:600;color:#fff2dc;word-break:keep-all;overflow-wrap:anywhere}.action-scene-dialogue small{display:block;color:#b6cde0;font:14px/1.6 var(--serif);word-break:keep-all;overflow-wrap:anywhere}
.action-scene-progress{position:absolute;bottom:0;left:0;width:100%;height:3px;background:#354858}.action-scene-progress>span{display:block;width:100%;height:100%;transform:scaleX(0);transform-origin:left;background:#d6b57b}
.action-scene.is-playing .action-scene-art img{animation:action-scene-pan var(--scene-duration,2400ms) ease-out both}.action-scene.is-playing .action-scene-dialogue{animation:action-scene-voice .36s .06s ease-out both}.action-scene.is-playing .action-scene-progress>span{animation:action-scene-time var(--scene-duration,2400ms) linear both}
@keyframes action-scene-pan{from{transform:scale(1.055) translateX(-.7%)}to{transform:scale(1.12) translateX(.7%)}}
@keyframes action-scene-voice{to{opacity:1;transform:translateY(0)}}
@keyframes action-scene-time{to{transform:scaleX(1)}}
.action-scene.is-reduced *{animation:none!important;transform:none!important}.action-scene.is-reduced .action-scene-dialogue{opacity:1}
@media(max-width:700px){
 .action-scene-top{padding:16px 14px}.action-scene-top>span{font-size:15px;gap:9px}.action-scene-top i{width:34px;height:38px;font-size:24px}.action-scene-skip{padding:6px 10px;font-size:12px}
 .action-scene-dialogue{inset:auto 12px 28px;grid-template-columns:76px minmax(0,1fr);padding:14px 12px;gap:12px;align-items:start}.action-scene-dialogue strong{font-size:17px}.action-scene-dialogue p{font-size:19px;line-height:1.55;margin:8px 0 10px}.action-scene-dialogue small{font-size:11px;line-height:1.5}.action-scene-art img{object-position:55% 35%}
}
@media(prefers-reduced-motion:reduce){.action-scene *{animation:none!important;transform:none!important}.action-scene .action-scene-dialogue{opacity:1}}
/* Top-layer dialogs are not inside the scaled desktop body on sideways phones. */
html.landscape-desktop dialog.action-scene[open]{width:1280px!important;height:720px!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%) scale(var(--desktop-scale))!important;transform-origin:center!important}

/* An exchange keeps both speakers visible, with portraits facing the conversation. */
.action-scene-dialogue.has-partner{inset:auto 4% 6%;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch;padding:0;border:0;background:none;box-shadow:none}
.action-scene-speaker{min-width:0;display:grid;grid-template-columns:clamp(100px,10vw,148px) minmax(0,1fr);align-items:center;gap:18px;padding:20px;border:3px double #b79b6c;background:linear-gradient(110deg,#10263bf7,#0d1c2ef0);box-shadow:0 10px 35px #0009}
.action-scene-speaker.is-partner{grid-template-columns:minmax(0,1fr) clamp(100px,10vw,148px);background:linear-gradient(250deg,#2a2838f5,#131e2ff5);border-color:#aba3c4}
.action-scene-speaker.is-partner .action-scene-face{grid-column:2;grid-row:1}
.action-scene-speaker.is-partner .action-scene-speech{grid-column:1;grid-row:1}
.action-scene-face{display:block;min-width:0;width:100%;aspect-ratio:1;overflow:hidden;border:3px double #b7a282;box-sizing:border-box;background:#101d2c}
.action-scene-face>:is(img,.historical-face){display:block!important;box-sizing:border-box;width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;aspect-ratio:1;object-fit:cover;margin:0!important;border:0!important;border-radius:0!important;filter:none!important;opacity:1!important;box-shadow:none!important}
.action-scene-speech{min-width:0}
.action-scene-dialogue.has-partner strong{font-size:clamp(20px,2vw,27px);line-height:1.45;color:#f3dfb9;overflow-wrap:anywhere}
.action-scene-dialogue.has-partner p{margin:12px 0 0;font-size:clamp(20px,1.9vw,26px);line-height:1.55;overflow-wrap:anywhere}
.action-scene-dialogue .action-speaker-role{display:block;margin-bottom:6px;font-size:12px;line-height:1.5;color:#bacee2}
.action-scene-speaker.is-partner .action-speaker-role{color:#d4c5e7}
.action-scene-speaker[data-tone="guarded"]{border-color:#a98988}
.action-scene-speaker[data-tone="guarded"] .action-speaker-role{color:#e8b6a9}
.action-scene.is-playing .action-scene-speaker.is-partner{animation:action-scene-answer .42s .62s ease-out both}
@keyframes action-scene-answer{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){
 .action-scene-dialogue.has-partner{inset:auto 12px 22px;grid-template-columns:minmax(0,1fr);gap:10px}
 .action-scene-speaker{grid-template-columns:68px minmax(0,1fr);gap:12px;padding:12px;align-items:start}
 .action-scene-speaker.is-partner{grid-template-columns:minmax(0,1fr) 68px}
 .action-scene-dialogue.has-partner strong{font-size:19px;line-height:1.45}
 .action-scene-dialogue.has-partner p{font-size:18px;line-height:1.5;margin-top:7px}
 .action-scene-dialogue .action-speaker-role{font-size:11px;line-height:1.4;margin-bottom:4px}
}
@media(max-width:700px) and (max-height:680px){
 .action-scene-dialogue.has-partner{inset:auto 10px 16px;gap:8px}
 .action-scene-speaker{grid-template-columns:58px minmax(0,1fr);gap:10px;padding:10px}
 .action-scene-speaker.is-partner{grid-template-columns:minmax(0,1fr) 58px}
 .action-scene-dialogue.has-partner p{font-size:17px;line-height:1.45;margin-top:6px}
 .action-scene-dialogue.has-partner strong{font-size:18px}
}
