/* Actual world MAP behind cinematic dialogue; the older faux scene disappears. */
#stage.qa86-opening-active #hud{opacity:0;pointer-events:none}
#qa51-cutscene.qa86-live{background:transparent}
#qa51-cutscene.qa86-live .qa51-scenery,#qa51-cutscene.qa86-live .qa51-scrim{display:none}
#qa51-cutscene.qa86-live .qa51-top{top:3%;left:3.5%;right:3.5%;font-size:clamp(11px,1.65vw,16px)}
#qa51-cutscene.qa86-live .qa51-part,#qa51-cutscene.qa86-live .qa51-chapter{background:rgba(13,23,28,.74);padding:5px 10px;border-radius:3px;color:#ffe5b3;text-shadow:0 2px 5px #000}
#qa51-cutscene.qa86-live .qa51-part{border-left:3px solid #d6b57c}
#qa51-cutscene.qa86-live .qa51-panel{bottom:2.4%;left:4%;right:4%;min-height:0;max-height:33%;border:1px solid #bb9861;border-radius:8px;padding:9px 15px 9px;background:linear-gradient(110deg,rgba(8,21,31,.96),rgba(20,31,41,.93));box-shadow:0 5px 27px #000b}
#qa51-cutscene.qa86-live .qa51-who{font-size:clamp(12px,1.75vw,16px);min-height:0;line-height:1.35}
#qa51-cutscene.qa86-live .qa51-who:empty{display:none}
#qa51-cutscene.qa86-live .qa51-text{font-size:clamp(14px,2vw,20px);line-height:1.5;margin:3px 30px 0 0;max-height:16vh;overflow:auto;white-space:pre-wrap}
#qa51-cutscene.qa86-live .qa51-foot{margin:0;position:absolute;bottom:5px;right:7px;justify-content:flex-end}
#qa51-cutscene.qa86-live .qa51-next{border:0;background:none;box-shadow:none;color:#ffdf9f;padding:4px 9px;font-size:17px;animation:qa86-next 1.3s ease-in-out infinite alternate}
#qa51-cutscene .qa51-progress{display:none!important}
@keyframes qa86-next{from{opacity:.45;transform:translateY(-2px)}to{opacity:1;transform:translateY(2px)}}
#qa51-cutscene.qa86-live[data-qa86-stage=fire]{background:linear-gradient(90deg,rgba(20,3,5,.28),rgba(105,30,6,.08))}
#qa51-cutscene.qa86-live[data-qa86-stage=night]{background:rgba(3,8,25,.42)}
#qa51-cutscene.qa86-live[data-qa86-stage=dawn]{background:linear-gradient(0deg,rgba(0,0,0,.05),rgba(255,206,140,.1))}
#qa51-cutscene.qa86-live[data-qa86-stage=home]{background:radial-gradient(circle at 65% 35%,rgba(255,190,102,.06),rgba(0,0,0,.1))}
@media(max-width:700px){#qa51-cutscene.qa86-live .qa51-panel{left:2.5%;right:2.5%;max-height:43%;bottom:2%;padding:6px 10px}#qa51-cutscene.qa86-live .qa51-text{font-size:clamp(12px,2.3vw,16px);line-height:1.45;max-height:18vh;margin-right:21px}#qa51-cutscene.qa86-live .qa51-top{top:2%;font-size:10px}#qa51-cutscene.qa86-live .qa51-next{padding:3px 4px;font-size:13px}}

#stage.qa86-opening-active #qa83-place{opacity:0!important;visibility:hidden!important}

#qa51-cutscene.qa86-legacy .qa51-foot{justify-content:flex-end}

/* QA87: place and title belong to the world, not a screen overlay. */
#qa51-cutscene.qa86-live .qa51-top{display:none!important}
#qa51-cutscene.qa86-live .qa51-part,
#qa51-cutscene.qa86-live .qa51-chapter{display:none!important}
#stage.qa86-opening-active #hud,
#stage.qa86-opening-active #qa83-place,
#stage.qa86-opening-active #toast{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
/* brief, unobtrusive crossfade when the location physically changes */
#qa51-cutscene.qa86-live.qa87-shift:before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:#09131b;animation:qa87fade .62s ease-out both}
@keyframes qa87fade{0%{opacity:.92}100%{opacity:0}}
/* Keep the scene unobstructed; dialogue is at the bottom only. */
#qa51-cutscene.qa86-live .qa51-panel{z-index:2}
@media(prefers-reduced-motion:reduce){#qa51-cutscene.qa86-live.qa87-shift:before{animation:none;display:none}}
/* Debug/version/technical copy stays in the README, never in the story-facing title. */
#titleScreen #qa-build-label,#titleScreen .titleui .edition,#titleScreen .titlebuttons p{display:none!important}


/* QA88: opening memory is low-saturation / monochrome at first, then color returns. */
#stage #game{transition:filter .55s ease, opacity .4s ease}
#stage.qa86-opening-active[data-qa86-mood="village"] #game{filter:grayscale(1) sepia(.12) contrast(1.08) brightness(.92)}
#stage.qa86-opening-active[data-qa86-mood="fire"] #game{filter:grayscale(.72) sepia(.16) contrast(1.14) brightness(.9)}
#stage.qa86-opening-active[data-qa86-mood="night"] #game{filter:grayscale(.38) brightness(.8) contrast(1.06)}
#stage.qa86-opening-active[data-qa86-mood="dawn"] #game{filter:grayscale(.12) sepia(.04) brightness(.98)}
#stage.qa86-opening-active[data-qa86-mood="home"] #game{filter:none}
