
/* Practical, interruptible guided introduction. During Lilith's speech,
   the REAL game screen remains visible but softly washed out (not blacked out).
   Normal interaction remains completely undimmed. */
#guidedTutorialRoot:empty{display:none}
.guided-v2-curtain{position:fixed;inset:0;z-index:160;background:rgba(188,177,202,.34);display:flex;align-items:flex-end;justify-content:center;padding:20px max(16px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom));overflow:auto;animation:guide-v2-appear .22s ease-out;backdrop-filter:saturate(.55) contrast(.84)}
.guided-v2-dialog{width:min(950px,100%);display:grid;grid-template-columns:minmax(125px,220px) minmax(0,1fr);align-items:end;gap:12px;margin:auto auto 0}
.guided-v2-portrait{display:block;object-fit:contain;object-position:center bottom;max-width:100%;max-height:min(49dvh,460px);align-self:end;filter:drop-shadow(0 6px 11px #000b)}
.guided-v2-speech{min-width:0;background:linear-gradient(145deg,#352440f5,#1c1427f5);border:2px solid #e4bc79;border-radius:14px;box-shadow:0 14px 42px #000b,inset 0 0 0 3px #5d3b56;padding:20px 23px;margin-bottom:12px}
.guided-v2-who{display:block;color:#f4cf91;font-size:17px;margin-bottom:9px}
.guided-v2-line{color:#fff1e6;font-size:clamp(15px,1.65vw,19px);line-height:1.85;min-height:4em;white-space:pre-wrap;margin:0}
.guided-v2-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:19px}
.guided-v2-skip{border:0;background:transparent;color:#cabbc9;font-size:13px;text-decoration:underline;text-underline-offset:4px;min-height:44px;padding:8px 4px}
.guided-v2-skip:hover{color:#fff3db}
.guided-v2-next{min-width:130px}
.guided-v2-target{position:relative!important;isolation:isolate;outline:2px solid #f1c76d!important;outline-offset:2px;box-shadow:0 0 0 4px #e7b96844,0 0 18px #f1c76d70!important;animation:guide-v2-pulse 1.7s ease-in-out infinite}
@keyframes guide-v2-appear{from{opacity:0}to{opacity:1}}
@keyframes guide-v2-pulse{50%{box-shadow:0 0 0 6px #f1c76d66,0 0 25px #f1c76d9c}}
@media(max-width:690px){
 .guided-v2-curtain{padding:12px 10px calc(12px + env(safe-area-inset-bottom))}
 .guided-v2-dialog{grid-template-columns:minmax(85px,30%) minmax(0,1fr);gap:5px}
 .guided-v2-portrait{max-height:42dvh}
 .guided-v2-speech{padding:13px 13px;margin-bottom:4px}
 .guided-v2-line{font-size:14px;line-height:1.65;min-height:4.5em}
 .guided-v2-who{font-size:15px}
 .guided-v2-actions{margin-top:10px;flex-wrap:wrap}
 .guided-v2-skip{font-size:11px}
 .guided-v2-next{min-width:96px;min-height:44px;padding:7px 12px;font-size:13px}
}
@media(max-width:395px){
 .guided-v2-dialog{grid-template-columns:1fr}
 .guided-v2-portrait{max-height:21dvh;max-width:110px;justify-self:start;margin-left:8px}
 .guided-v2-speech{margin-top:-15px;position:relative}
}
@media(prefers-reduced-motion:reduce){.guided-v2-curtain,.guided-v2-target{animation:none}}


/* Directed gameplay is fully illuminated, but only the named actions respond.
   Keep this cosmetic hint separate from the input guard's inert/capture logic. */
body.guided-v2-restricted .guided-v2-blocked{opacity:.48!important;cursor:not-allowed!important;animation:none!important}
/* Freeze the actual page while Lilith is speaking, not just its translucent
   curtain. Preserve the current scroll offset via guided_tutorial_v261.js.
   Normal guided actions remain scrollable when the speech is closed. */
html:has(body.guided-v2-open){overflow:hidden!important}
body.guided-v2-open{
 position:fixed!important;left:0;right:0;width:100%;
 overflow:hidden!important;overscroll-behavior:none;
}
/* Fixed body creates a stacking context that would expose the normally hidden castle layer. */
body.guided-v2-open > .scene-backdrop{display:none!important}
body.guided-v2-open .guided-v2-curtain{
 overscroll-behavior:contain;
}

/* Image-resolution comparison preview; mobile-only raster source swap. */
@media (max-width:700px) {
 .scene-backdrop {background-image:linear-gradient(180deg,#0e0a18bf,#100c1ddd),url('assets/mobile/castle.webp') !important;}
}
