/* The existing interactive actor owns its one world-space body. No duplicate puppets. */
.sanctuary-character-art{display:none}
body [data-sanctuary-world=true]{position:fixed!important;left:var(--world-left)!important;top:var(--world-top)!important;right:auto!important;bottom:auto!important;width:var(--world-width)!important;height:var(--world-height)!important;max-width:none!important;max-height:none!important;transform:none!important;translate:none!important;scale:none!important;z-index:var(--world-depth,70)!important;pointer-events:none;overflow:visible!important}
[data-sanctuary-world=true] :is(.ar-agandar-stage,#ar-azeroth-control,#ar-avdi-companion-pet){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;background:none!important;border:0!important;padding:0!important;margin:0!important;border-radius:12px;overflow:visible!important;transform:none!important;animation:none!important;box-shadow:none!important;pointer-events:auto;touch-action:none;cursor:grab}
[data-sanctuary-world=true] :is(.ar-agandar-pose,.ar-agandar-departure-sparks,.ar-azeroth-art,.ar-avdi-companion-stage){display:none!important}
[data-sanctuary-world=true] .sanctuary-character-art{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;transform:scaleX(var(--world-face,1));transform-origin:50% 96%;filter:drop-shadow(0 2px 1px #160b0936)!important;animation:none!important}
[data-sanctuary-world=true] :is(.ar-agandar-stage,#ar-azeroth-control,#ar-avdi-companion-pet)::before{content:""!important;display:block!important;position:absolute!important;left:38%!important;bottom:2.5%!important;width:24%!important;height:3%!important;border-radius:50%!important;background:radial-gradient(ellipse,#160b0965,transparent 72%)!important;transform:scaleY(.5)!important;pointer-events:none!important}
[data-sanctuary-world=true][data-sanctuary-seated=true] :is(.ar-agandar-stage,#ar-azeroth-control)::before{opacity:.3}
[data-sanctuary-world=true][data-sanctuary-art-failed=true] .sanctuary-character-art{visibility:hidden}
[data-sanctuary-world=true][data-sanctuary-art-failed=true] :is(.ar-agandar-stage,#ar-azeroth-control,#ar-avdi-companion-pet)::after{content:"Artwork unavailable"!important;display:block!important;position:absolute;left:10%;right:10%;bottom:5%;padding:8px;background:#241f22;color:white;font:12px/1.4 system-ui,sans-serif;border-radius:8px}
[data-sanctuary-world=true] :is(.ar-agandar-bubble,.ar-azeroth-bubble){z-index:1200!important;transform:none!important;pointer-events:auto;box-sizing:border-box}
body[data-sanctuary-scene=cyber] [data-sanctuary-world=true] .sanctuary-character-art{filter:brightness(.9) drop-shadow(0 2px 1px #070b2036)!important}
.ar-companion-menu-row[hidden]{display:none!important}
body[data-sanctuary-scene=youth] :is(#ar-agandar-guest,#ar-azeroth-cameo){display:none!important}
.sanctuary-seat-dialog{box-sizing:border-box;width:min(410px,calc(100vw - 30px));max-height:calc(100dvh - 36px);padding:25px;border:1px solid var(--san-line);border-radius:16px;background:var(--san-bg);color:var(--san-ink);overflow:auto;box-shadow:0 16px 60px #0006;font:14px/1.55 system-ui,sans-serif}
.sanctuary-seat-dialog::backdrop{background:#100e1870}.sanctuary-seat-dialog h2{font:400 25px/1.2 var(--san-title);margin:0 0 12px}.sanctuary-seat-dialog p{color:var(--san-muted);margin:0 0 20px}.sanctuary-seat-dialog button{margin:4px;min-height:44px}.sanctuary-seat-dialog button:focus-visible{outline:3px solid var(--san-accent);outline-offset:3px}
@media(forced-colors:active){.sanctuary-seat-dialog{background:Canvas;color:CanvasText;border-color:CanvasText}[data-sanctuary-world=true] .sanctuary-character-art{filter:none!important}}
@media print{[data-sanctuary-world=true],.sanctuary-seat-dialog{display:none!important}}

/* Tight interaction targets leave the room's controls and other characters reachable. */
[data-sanctuary-world=true] :is(.ar-agandar-stage,#ar-azeroth-control,#ar-avdi-companion-pet){inset:auto!important;top:0!important;left:24%!important;width:52%!important;height:100%!important}
[data-sanctuary-world=true] .sanctuary-character-art{left:-46.154%!important;width:192.308%!important}
[data-sanctuary-world=true][data-sanctuary-seated=true] :is(.ar-agandar-stage,#ar-azeroth-control){left:15%!important;width:70%!important}
[data-sanctuary-world=true][data-sanctuary-seated=true] .sanctuary-character-art{left:-21.429%!important;width:142.857%!important}

[data-sanctuary-world=true][data-sanctuary-loading=true] .sanctuary-character-art{visibility:hidden}

/* Exact full-scene furniture pixels occlude only their seated actor, never foreground walkers. */
body [data-sanctuary-world=true] .sanctuary-character-occluder{position:fixed!important;display:block;max-width:none!important;max-height:none!important;object-fit:fill;z-index:2;pointer-events:none!important;user-select:none;transform:none!important;filter:none!important;animation:none!important}
body [data-sanctuary-world=true] .sanctuary-character-occluder[hidden]{display:none!important}
.sanctuary-seat-portal{position:fixed!important;z-index:2147481000!important;pointer-events:auto;transform:translate(-50%,-50%);min-width:44px;min-height:44px}

.sanctuary-hotspot[hidden]{display:none!important}
/* Room residents are authored into the scene. Explorer puppets never float over a Sanctuary. */
body.sanctuary-open :is(#ar-azeroth-cameo,#ar-agandar-guest){display:none!important}
body.sanctuary-open #ar-companion-dock{display:none!important}
.sanctuary-resident-target{position:absolute;z-index:6;min-width:44px;min-height:44px;padding:0;margin:0;border:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer;touch-action:manipulation;border-radius:26%}
.sanctuary-resident-target:focus-visible{outline:2px solid #ffd5f1;outline-offset:4px;background:#f8c4e809!important}
.sanctuary-resident-label{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);padding:7px 11px;border:1px solid #f6d7ee66;border-radius:9px;background:#130f1ceb;color:#fff3fb;font:600 11px/1.4 system-ui,sans-serif;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .2s}
.sanctuary-resident-target:hover .sanctuary-resident-label,.sanctuary-resident-target:focus-visible .sanctuary-resident-label{opacity:1}
.sanctuary-resident-dialog{box-sizing:border-box;width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border:1px solid #aa719b;border-radius:18px;padding:0;background:#18121f;color:#f9eefa;box-shadow:0 18px 80px #000b;overflow:auto;overscroll-behavior:contain;color-scheme:dark;font:14px/1.6 system-ui,sans-serif}
.sanctuary-resident-dialog::backdrop{background:#08060d76}
#sanctuary-resident-dialog :is(.ar-azeroth-bubble,.ar-agandar-bubble){position:static!important;inset:auto!important;display:block!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:22px!important;transform:none!important;opacity:1!important;visibility:visible!important;overflow:visible!important;box-sizing:border-box;border:0!important;border-radius:0;background:transparent!important;color:inherit!important;font:inherit;pointer-events:auto!important}
#sanctuary-resident-dialog :is(.ar-azeroth-bubble,.ar-agandar-bubble)[hidden]{display:none!important}
#sanctuary-resident-dialog :is(h3,strong){color:#ffe2f7}
#sanctuary-resident-dialog h3{font:600 22px/1.3 system-ui,sans-serif;margin:0 0 16px}
#sanctuary-resident-dialog p{line-height:1.7}
#sanctuary-resident-dialog :is(button,input){min-height:44px;border:1px solid #aa719b;border-radius:9px;background:#2e2038;color:#fff1fb;padding:9px 12px;font:600 12px/1.5 system-ui,sans-serif;max-width:100%;box-sizing:border-box}
#sanctuary-resident-dialog input{width:100%;display:block;background:#100d18;font-weight:400}
#sanctuary-resident-dialog :is(button,a,input,summary):focus-visible{outline:3px solid #ffc4e9;outline-offset:3px}
#sanctuary-resident-dialog :is(.ar-azeroth-choices,.ar-agandar-dialogue-actions,.ar-azeroth-bubble-actions){display:flex;flex-wrap:wrap;gap:8px;margin:15px 0}
#sanctuary-resident-dialog .ar-azeroth-choices{flex-direction:column}
#sanctuary-resident-dialog .ar-azeroth-choices button{text-align:left}
#sanctuary-resident-dialog .ar-azeroth-name-form{display:flex;flex-wrap:wrap;gap:8px}
#sanctuary-resident-dialog .ar-azeroth-name-form[hidden]{display:none}
#sanctuary-resident-dialog .ar-azeroth-name-form label,#sanctuary-resident-dialog .ar-azeroth-name-form p{width:100%}
#sanctuary-resident-dialog :is(.ar-azeroth-personal-greeting,.ar-azeroth-response){color:#f7e9f6}
#sanctuary-resident-dialog :is(.ar-azeroth-scene,.ar-azeroth-player-reply,.ar-azeroth-name-settings,.ar-azeroth-boundary){font-size:12px;color:#d5bdce}
#sanctuary-resident-dialog a{color:#f3bddd}
#sanctuary-resident-dialog [hidden]{display:none!important}
#sanctuary-resident-dialog[data-scene=agandar]{border-color:#b67b75;background:#191516;color:#fff0eb}
#sanctuary-resident-dialog[data-scene=agandar] :is(button,input){border-color:#b67b75;background:#342325;color:#fff0eb}
#sanctuary-resident-dialog .ar-agandar-dialogue-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
@media(prefers-reduced-motion:reduce){.sanctuary-resident-label{transition:none}}
@media(forced-colors:active){.sanctuary-resident-dialog,.sanctuary-resident-label{background:Canvas!important;color:CanvasText!important;border-color:CanvasText!important}#sanctuary-resident-dialog :is(button,input){background:ButtonFace!important;color:ButtonText!important;border-color:ButtonText!important}}
/* Aligned authored local scene frames. No image squashing, synthetic face parts, or body bobbing. */
.sanctuary-resident-frame{position:absolute;inset:0;z-index:3;display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;transform:none!important;animation:none!important}
.sanctuary-resident-frame[hidden],.sanctuary-resident-phone-notes[hidden]{display:none!important}
/* Source-relative trail shared by native room/close and the inert Games mirror.
   Its bottom-center is the measured phone top; no viewport-sized offsets. */
.sanctuary-resident-phone-notes{position:absolute;z-index:4;transform:translate(-50%,-100%);pointer-events:none;user-select:none;color:#ffb5eb;filter:drop-shadow(0 0 2px #f052b950)}
.sanctuary-resident-phone-notes>span{position:absolute;left:25%;bottom:0;width:48%;aspect-ratio:1;opacity:0;animation:sanctuary-phone-thought 1.5s ease-out both;pointer-events:none}
.sanctuary-resident-phone-notes>span:nth-child(2){left:66%;bottom:4%;width:32%;animation-delay:.4s}
.sanctuary-resident-phone-notes>span:nth-child(3){left:1%;bottom:0;width:28%;animation-delay:.75s}
.sanctuary-resident-phone-notes svg{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
@keyframes sanctuary-phone-thought{0%{opacity:0;transform:translateY(0) scale(.92)}12%,48%{opacity:.86}100%{opacity:0;transform:translateY(-95%) scale(1)}}
@media(prefers-reduced-motion:reduce){.sanctuary-resident-phone-notes{display:none!important}}
@media(forced-colors:active){.sanctuary-resident-phone-notes{display:none!important}}
