/* r39 phone-only presentation. Every existing-DOM override requires the
   JS capability gate. Wide/fine-pointer desktops retain their original CSS. */
.sanctuary-mobile-header39,.sanctuary-mobile-actions39,.sanctuary-mobile-expand39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39{display:none}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true]{
 --mobile39-gap:12px;--hub-bar:0px;box-sizing:border-box;display:flex;flex-direction:column;gap:0;height:100vh;height:100dvh;min-height:0;padding:0 0 env(safe-area-inset-bottom);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;background:var(--hud38-base);color:var(--hud38-ink);font:16px/1.5 var(--hub-body,system-ui),-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
#sanctuary-view[data-mobile-r39=true] [hidden]{display:none!important}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true]>.room-hub-toolbar{display:none!important}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-header39{
 box-sizing:border-box;position:relative;display:flex;flex:none;align-items:center;gap:10px;min-height:80px;padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));border-bottom:1px solid var(--hud38-line);background:var(--hud38-base);z-index:1;
}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-heading39{min-width:0;flex:1;text-align:center}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-heading39 p{margin:0 0 4px;color:var(--hud38-muted);font:600 10px/1.2 var(--hub-body,system-ui),sans-serif;letter-spacing:.18em}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-heading39 h2{margin:0;color:var(--hud38-ink);font:600 17px/1.25 var(--hub-heading,var(--hub-body,system-ui)),sans-serif;overflow-wrap:anywhere}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-expand39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39){
 box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;min-width:48px;min-height:52px;margin:0;padding:12px;border:1px solid var(--hud38-line);border-radius:12px;background:var(--hud38-well);color:var(--hud38-ink);box-shadow:none;font:600 16px/1.3 var(--hub-body,system-ui),sans-serif;letter-spacing:0;text-align:center;text-decoration:none;touch-action:manipulation;cursor:pointer;
}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-expand39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39)>svg:not(.sanctuary-mobile-material39){display:block;flex:none;width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-header39>.sanctuary-mobile-action39{flex-direction:column;gap:4px;min-width:58px;min-height:56px;padding:7px 8px;font-size:11px}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-expand39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39):focus-visible{outline:3px solid var(--hud38-line);outline-offset:3px}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-expand39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39):active{background:var(--hud38-face)}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-action39[aria-expanded=true]{border-color:var(--hud38-accent);background:var(--hud38-face)}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-expand39):disabled{opacity:.55;cursor:wait}
/* The native scene fitter still calculates every source-art coordinate. Only
   its viewport changes; no object-fit crop or replacement painting is added. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-frame{
 position:relative!important;inset:auto!important;display:block!important;flex:none;width:100%;height:auto!important;min-height:0!important;aspect-ratio:var(--san-scene-aspect,1.7777778);margin:0!important;padding:0!important;border:0;border-radius:0;background:#08090b;overflow:hidden;
}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-room-viewport{position:absolute!important;inset:0!important;display:flex!important;align-items:center;justify-content:center;width:100%!important;height:100%!important;min-height:0!important;margin:0;padding:0;overflow:hidden}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-expand39{position:absolute;z-index:40;inset:0;width:100%;height:100%;align-items:flex-end;padding:0 8px 10px;border:0;border-radius:0;background:transparent;color:#fff;font-size:13px;text-shadow:0 1px 3px #000}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-expand39 span{padding:7px 12px;border:1px solid #e9d9bb80;border-radius:20px;background:#161314e8;line-height:1.4}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-expand39 svg{display:none}
#sanctuary-view[data-mobile-r39=true][data-mobile-expanded-r39=false] #sanctuary-scene-bounds button{pointer-events:none}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-actions39{box-sizing:border-box;display:block;flex:1 0 auto;padding:18px max(16px,env(safe-area-inset-right)) 20px max(16px,env(safe-area-inset-left));background:var(--hud38-base)}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-caption39{margin:0 0 16px;color:var(--hud38-muted);font:400 15px/1.5 var(--hub-body,system-ui),sans-serif;text-align:center}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-primary39{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-secondary39{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:18px;padding-top:18px;border-top:1px solid var(--hud38-line)}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-secondary39 .sanctuary-mobile-action39{flex-direction:column;gap:7px;padding:10px 5px;font-size:12px;min-height:70px}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-note39{margin:15px 0 0;color:var(--hud38-muted);font:400 12px/1.5 var(--hub-body,system-ui),sans-serif;text-align:center}
/* Native fullscreen enhances this same view when permitted; the in-page
   expanded view remains usable in portrait or when either API is unavailable. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true][data-mobile-expanded-r39=true] .sanctuary-frame{position:fixed!important;z-index:51;inset:0!important;width:100%;height:100vh!important;height:100dvh!important;aspect-ratio:auto}
#sanctuary-view[data-mobile-r39=true][data-mobile-expanded-r39=true] :is(.sanctuary-mobile-expand39,.sanctuary-mobile-actions39,.sanctuary-mobile-header39){visibility:hidden;pointer-events:none}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-collapse39{position:fixed;z-index:52;top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));min-height:48px;padding:10px 14px;background:var(--hud38-base)}
/* Existing conversation, collection and welcome nodes become readable sheets,
   keeping original controls, import/export, tabs and close behavior intact. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(#sanctuary-backpack-dock,#sanctuary-side-companion-r27).room-hub-workspace{
 position:fixed!important;inset:auto 8px max(8px,env(safe-area-inset-bottom))!important;z-index:120;width:calc(100% - 16px)!important;min-width:0;max-width:640px;height:auto;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;margin:0 auto;padding:0;border:1px solid var(--hud38-line);border-radius:18px;background:var(--hud38-base)!important;color:var(--hud38-ink);box-shadow:0 0 0 100vmax #0008;overflow:hidden;font:16px/1.5 var(--hub-body,system-ui),sans-serif;transform:none!important;
}
#sanctuary-view[data-mobile-r39=true] :is(.room-hub-workspace,.room-hub-options,.sanctuary-home-menu,.hud38-window-options)>:is(.room-hub-material-art,.hud39-material-art){display:none!important}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-dialog-head,.room-hub-conversation-head){min-height:64px;padding:10px 14px;border-bottom:1px solid var(--hud38-line);background:var(--hud38-base);color:var(--hud38-ink);cursor:default;touch-action:pan-y;user-select:auto}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-dialog-head,.room-hub-conversation-head) :is(.room-hub-position,.room-hub-move,.room-hub-center){display:none!important}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-dialog-head h2,.room-hub-conversation-head h2){font:600 20px/1.3 var(--hub-body,system-ui),sans-serif;color:var(--hud38-ink)}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-dialog-close,.room-hub-close){min-width:48px;width:48px;min-height:48px;height:48px;border:1px solid var(--hud38-line);border-radius:10px;background:var(--hud38-well);color:var(--hud38-ink)}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-panel{max-height:calc(100dvh - 180px);padding:18px 16px 24px;font:16px/1.6 var(--hub-body,system-ui),sans-serif;scroll-padding:16px;scrollbar-gutter:auto}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-panel :is(p,li,label,small,button,a,input,select,textarea){font-size:16px;line-height:1.5}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-tabs{margin:0 12px;gap:6px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-tab{flex:1 0 86px;min-height:52px;font:600 15px/1.3 var(--hub-body,system-ui),sans-serif}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .room-hub-conversation>[data-sanctuary-docked]>:not(.room-hub-conversation-head){max-height:calc(100dvh - 106px);padding:16px;font-size:16px;line-height:1.55;overflow:auto}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .room-hub-conversation :is(button,a,input,select,textarea){min-height:48px;font-size:16px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] dialog.room-hub-welcome{box-sizing:border-box;inset:12px 8px;width:calc(100% - 16px);max-width:640px;max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid var(--hud38-line);border-radius:18px;background:var(--hud38-base);color:var(--hud38-ink)}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] dialog[data-welcome=true] .sanctuary-panel{max-height:calc(100dvh - 112px)}
/* Native popups retain their availability/selection, but not desktop offsets. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.room-hub-options,.sanctuary-home-menu,.hud38-window-options){
 position:fixed!important;inset:auto 8px max(8px,env(safe-area-inset-bottom))!important;z-index:130;width:calc(100% - 16px)!important;max-width:640px;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;margin:0 auto;padding:14px;border:1px solid var(--hud38-line);border-radius:18px;background:var(--hud38-base)!important;background-image:none!important;box-shadow:0 0 0 100vmax #0008;color:var(--hud38-ink);overflow:auto;
}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-sheet-close39{display:flex;width:100%;min-height:48px;margin:0 0 14px;padding:10px;font-size:15px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.room-hub-options,.sanctuary-home-menu,.hud38-window-options) :is(button,a,select){min-height:48px;font-size:16px;line-height:1.4}
#sanctuary-view[data-mobile-r39=true] .room-hub-options .room-hub-utility:has(.room-hub-icon){min-height:48px}
#sanctuary-view[data-mobile-r39=true] .hud38-volume input{min-height:44px}
#sanctuary-view[data-mobile-r39=true] .hud38-volume small,#sanctuary-view[data-mobile-r39=true] .hud38-lights-copy small{font-size:13px;line-height:1.5}
#sanctuary-view[data-mobile-r39=true][data-window-open=true] :is(.sanctuary-mobile-header39,.sanctuary-mobile-actions39,.sanctuary-mobile-collapse39){visibility:hidden!important;pointer-events:none!important}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] #sanctuary-window-view .sanctuary-window-head{padding:8px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left));gap:8px;min-height:64px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] #sanctuary-window-view .sanctuary-window-head button{min-height:48px;min-width:48px;font-size:14px}
/* Retain authored light/color, remove full-plane film filters and ornamental
   motion. Native pause controls stop active animation work and remain resumable. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-scene-image,.sanctuary-room-foreground,.sanctuary-authored-room-layers,.sanctuary-exterior-layer,.expanded31b-art img,#sanctuary-window-image,#sanctuary-window-exterior-image,.sanctuary-close-periphery37){filter:none!important}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-scene,.sanctuary-window-plane)::after{display:none!important}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-hud-finish,.sanctuary-lamp-glow,.sanctuary-azeroth-neon-spill,[data-room-layer]){animation:none!important}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-scene-image,.sanctuary-window-plane){animation:none!important}
@media(max-height:480px) and (orientation:landscape){
 #sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true]:not([data-mobile-expanded-r39=true]){display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:auto 1fr;align-items:start}
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-header39{grid-column:1/-1}
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-actions39{padding:12px}
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-caption39{margin-bottom:10px;font-size:13px}
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-primary39{gap:8px}
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-secondary39{margin-top:12px;padding-top:12px}
}
@media(forced-colors:active){
 #sanctuary-view[data-mobile-r39=true]{--hud38-base:Canvas;--hud38-face:Canvas;--hud38-well:ButtonFace;--hud38-ink:CanvasText;--hud38-muted:CanvasText;--hud38-line:ButtonText;--hud38-accent:Highlight}
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-expand39 span{background:Canvas;color:CanvasText;border-color:ButtonText;text-shadow:none}
}
/* Collapsed scenes are visual doorways, not a second row of tiny controls. */
#sanctuary-view[data-mobile-r39=true]:not([data-mobile-expanded-r39=true]) .room-hub-floor-bag{display:none!important}
/* Honor the native Hide controls action and its existing Show controls escape. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true][data-hud-hidden=true] .sanctuary-frame{position:fixed!important;inset:0!important;height:100vh!important;height:100dvh!important;aspect-ratio:auto}
#sanctuary-view[data-mobile-r39=true][data-hud-hidden=true] :is(.sanctuary-mobile-header39,.sanctuary-mobile-actions39,.sanctuary-mobile-expand39){visibility:hidden!important;pointer-events:none!important}
#sanctuary-view[data-mobile-r39=true] .room-hub-conversation :is(p,small,label,.ar-azeroth-scene,.ar-azeroth-player-reply,.ar-azeroth-name-settings,.ar-azeroth-boundary){font-size:16px;line-height:1.55}
/* The touch action grid already exposes these; settings keeps only utilities. */
#sanctuary-view[data-mobile-r39=true] .room-hub-options :is([data-hub-action],#sanctuary-return){display:none!important}
/* Phone-only cinematic backdrop. This isolated layer is behind the controls
   and the untouched native scene; no dim overlay ever covers the room art. */
.sanctuary-mobile-backdrop39,.sanctuary-mobile-atmosphere39,.sanctuary-mobile-toy-shelf39{display:none}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true]{isolation:isolate;background:#090b0e}
#sanctuary-view[data-mobile-r39=true]{--mobile39-corner:10px;--mobile39-particle:#e9cd93;--mobile39-particle-w:2px;--mobile39-particle-h:2px;--mobile39-particle-opacity:.17;--mobile39-glow:#e9cd9310}
#sanctuary-view[data-mobile-r39=true][data-scene=cyber]{--mobile39-corner:10px;--mobile39-particle:#e8b7d8;--mobile39-glow:#d1a4cb12}
#sanctuary-view[data-mobile-r39=true][data-scene=youth]{--mobile39-corner:14px;--mobile39-particle:#fff0ae;--mobile39-particle-w:3px;--mobile39-particle-h:3px;--mobile39-glow:#d2e9a012}
#sanctuary-view[data-mobile-r39=true][data-scene=auriela]{--mobile39-corner:12px;--mobile39-particle:#edc5d2;--mobile39-glow:#e6c1ce12}
#sanctuary-view[data-mobile-r39=true][data-scene=agandar]{--mobile39-corner:5px;--mobile39-particle:#dba69e;--mobile39-glow:#d88b820b}
#sanctuary-view[data-mobile-r39=true][data-scene=solomon]{--mobile39-corner:8px;--mobile39-particle:#e5edff;--mobile39-particle-w:3px;--mobile39-particle-h:3px;--mobile39-glow:#d3dff40e}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-backdrop39{position:fixed;inset:0;z-index:0;display:block;overflow:hidden;contain:strict;pointer-events:none;user-select:none;background-color:#090b0e;background-image:radial-gradient(ellipse at 50% 38%,#05070a00 12%,#05070aa8 100%),linear-gradient(#05070a61,#05070a99),var(--mobile39-exterior,none);background-size:100% 100%,100% 100%,cover;background-position:center;background-repeat:no-repeat}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-header39{background:linear-gradient(#080b10c4,#080b1066);border-bottom-color:#ffffff20;box-shadow:none}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-heading39 p{color:var(--hud38-accent);letter-spacing:.2em;text-shadow:0 1px 3px #0006}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-heading39 h2{text-shadow:0 1px 3px #0008}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-frame{z-index:1}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-actions39{position:relative;isolation:isolate;z-index:1;background:linear-gradient(var(--mobile39-glow),transparent 50%);box-shadow:inset 0 1px 0 #ffffff26}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-sheet-close39,.sanctuary-mobile-collapse39){border-radius:var(--mobile39-corner);background:linear-gradient(#ffffff08,#0000000b),color-mix(in srgb,var(--hud38-well) 90%,transparent);box-shadow:inset 0 1px 0 #ffffff0c,0 2px 5px #0003;text-shadow:0 1px 2px #0008}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-primary39{grid-template-columns:repeat(var(--mobile39-room-actions,1),minmax(0,1fr));gap:10px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-primary39 .sanctuary-mobile-action39{flex-direction:column;gap:6px;min-height:66px;padding:9px 5px;font-size:15px;border-color:var(--hud38-accent)}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-travel39{display:grid;grid-template-columns:1fr;margin-top:12px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-travel39 .sanctuary-mobile-action39{min-height:48px;padding:9px 12px;font-size:14px;background:#080b105c;box-shadow:none}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-secondary39{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:18px;padding-top:16px;border-top:1px solid #ffffff26}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-secondary39 .sanctuary-mobile-action39{flex-direction:row;gap:8px;min-height:52px;padding:10px 5px;font-size:13px}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-note39{color:var(--hud38-ink);opacity:.72}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-atmosphere39{position:absolute;inset:0;display:block;overflow:hidden;contain:strict;pointer-events:none;user-select:none}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-particle39{position:absolute;display:block;left:var(--mobile-px);top:var(--mobile-py);width:var(--mobile39-particle-w);height:var(--mobile39-particle-h);border-radius:50%;background:var(--mobile39-particle);box-shadow:0 0 5px var(--mobile39-particle);opacity:0;pointer-events:none;animation:none}
#sanctuary-view[data-mobile-r39=true][data-mobile-accents-motion=true] .sanctuary-mobile-particle39{animation:mobile39-drift var(--mobile-pduration) ease-in-out var(--mobile-pdelay) infinite}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-motion39{display:inline-flex;align-items:center;gap:8px;min-height:48px}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-motion39>svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6}
/* Shared geometry and weight with native HUD gears; only currentColor is themed. */
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-motion39)>svg[data-mobile-gear=true]{fill:none;stroke:currentColor;stroke-width:1.75}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-toy-shelf39{display:block;margin:20px 0 0}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-toys39{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-toy39{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;min-width:48px;min-height:76px;padding:4px 3px;border:0;border-radius:12px;background:transparent;color:var(--hud38-ink);font:500 11px/1.3 var(--hub-body,system-ui),sans-serif;touch-action:manipulation;cursor:pointer}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-toy39 img{display:block;width:62px;height:54px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 4px #0009)}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-toy39:active{background:#ffffff0d}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-toy39:focus-visible{outline:3px solid var(--hud38-line);outline-offset:2px}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-toy-status39{margin:9px 0 0;text-align:center;color:var(--hud38-muted);font:400 11px/1.4 var(--hub-body,system-ui),sans-serif;min-height:16px}
@keyframes mobile39-drift{0%{transform:translate3d(0,8px,0);opacity:0}25%{opacity:var(--mobile39-particle-opacity)}70%{opacity:var(--mobile39-particle-opacity)}100%{transform:translate3d(7px,-28px,0);opacity:0}}
/* Accessibility guards precede JS and preserve readable native labels. */
@media(prefers-reduced-motion:reduce),(forced-colors:active),(prefers-contrast:more){
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-atmosphere39{display:none!important}
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-particle39{animation:none!important}
}
@media(forced-colors:active),(prefers-contrast:more){
 #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-backdrop39{display:none!important}
 #sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-header39,.sanctuary-mobile-actions39){background:var(--hud38-base)!important;box-shadow:none!important}
}
:is(html,body)[data-reading-sprites=off] #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-atmosphere39,:is(html,body)[data-reading-contrast=high] #sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-backdrop39{display:none!important}
:is(html,body)[data-reading-contrast=high] #sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-header39,.sanctuary-mobile-actions39){background:var(--hud38-base)!important;box-shadow:none!important}

/* Shared HUD palette owns active/focus feedback as the new artwork evolves. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-action39:is(:active,[aria-expanded=true]){background:var(--hud38-face);border-color:var(--hud38-accent);color:var(--hud38-accent)}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-toy39:focus-visible{color:var(--hud38-accent)}
/* All four photo edges become alpha, not a dark film. The frame geometry and
   native dialogue remain unmasked; expanded/mobile window/desktop stay native. */
.sanctuary-mobile-feature39{display:none}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true]:not([data-mobile-expanded-r39=true]):not([data-hud-hidden=true]) .sanctuary-frame{background:transparent}
#sanctuary-view[data-mobile-r39=true]:not([data-mobile-expanded-r39=true]):not([data-hud-hidden=true]) .sanctuary-room-viewport{-webkit-mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 12px),transparent),linear-gradient(180deg,transparent,#000 12px,#000 calc(100% - 12px),transparent);mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 12px),transparent),linear-gradient(180deg,transparent,#000 12px,#000 calc(100% - 12px),transparent);-webkit-mask-composite:source-in;mask-composite:intersect}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-feature39{position:absolute;inset:0;z-index:35;display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;object-fit:cover;object-position:center;opacity:0;pointer-events:none;user-select:none;transition:opacity 360ms ease;filter:none}
#sanctuary-view[data-mobile-r39=true][data-mobile-feature=true] .sanctuary-mobile-feature39{opacity:1}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-primary39[hidden]+.sanctuary-mobile-travel39{margin-top:0}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-expand39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39,.sanctuary-mobile-toy39){transition:transform 100ms ease,background-color 100ms ease,box-shadow 100ms ease;-webkit-tap-highlight-color:transparent}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-mobile-action39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39,.sanctuary-mobile-toy39)[data-mobile-pressed=true]{transform:scale(.985);box-shadow:inset 0 0 0 2px var(--hud38-line);color:var(--hud38-ink);background:var(--hud38-face)}
/* The same photo stays in place above Azeroth's readable conversation. Only
   its opacity changes; no room-size, scroll or navigation state is changed. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene=cyber][data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27.room-hub-workspace{inset:clamp(88px,var(--mobile39-scene-bottom,43dvh),55dvh) 8px max(8px,env(safe-area-inset-bottom))!important;height:auto;max-height:none!important;box-shadow:0 -5px 20px #0004}
#sanctuary-view[data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27>[data-sanctuary-docked]{max-height:100%;overflow:auto;overscroll-behavior:contain;scroll-padding:12px}
#sanctuary-view[data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27 .room-hub-conversation-head{position:sticky;top:0;z-index:2}
@media(max-height:480px) and (orientation:landscape){
 #sanctuary-view[data-room-hub][data-hud-r38][data-scene=cyber][data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27.room-hub-workspace{inset:88px 8px 8px auto!important;width:calc(46.5% - 16px)!important;max-width:none}
}
@media(prefers-reduced-motion:reduce){
 #sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-feature39,.sanctuary-mobile-action39,.sanctuary-mobile-expand39,.sanctuary-mobile-collapse39,.sanctuary-mobile-sheet-close39,.sanctuary-mobile-toy39){transition:none!important}
 #sanctuary-view[data-mobile-r39=true] [data-mobile-pressed=true]{transform:none!important}
}
@media(forced-colors:active),(prefers-contrast:more){
 #sanctuary-view[data-mobile-r39=true] .sanctuary-room-viewport{-webkit-mask-image:none!important;mask-image:none!important}
}
#sanctuary-view[data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27{display:flex;flex-direction:column}
#sanctuary-view[data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27>.room-hub-conversation-head{flex:none}
#sanctuary-view[data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27>[data-sanctuary-docked]{flex:1 1 auto;min-height:0;max-height:none}
/* The new handwritten/serif HUD fonts need phone-sized optical compensation,
   not miniature desktop labels. Rows and tap-target geometry remain unchanged. */
#sanctuary-view[data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-heading39 h2{font-size:22px}
#sanctuary-view[data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-heading39 p{font-size:12px;color:var(--hud38-ink)}
#sanctuary-view[data-room-hub][data-hud-r38][data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-header39>.sanctuary-mobile-action39{font-size:15px}
#sanctuary-view[data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-caption39{font-size:18px}
#sanctuary-view[data-room-hub][data-hud-r38][data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-travel39 .sanctuary-mobile-action39{font-size:18px}
#sanctuary-view[data-room-hub][data-hud-r38][data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-secondary39 .sanctuary-mobile-action39{font-size:17px}
#sanctuary-view[data-room-hub][data-hud-r38][data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-expand39{font-size:16px}
#sanctuary-view[data-mobile-r39=true]:is([data-scene=youth],[data-scene=auriela]) .sanctuary-mobile-note39{font-size:15px}
#sanctuary-view[data-mobile-r39=true][data-scene=youth] :is(.sanctuary-mobile-toy39,.sanctuary-mobile-toy-status39){font-size:14px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-action39[aria-expanded=true]{color:var(--hud38-ink);border-color:var(--hud38-line)}
:is(html,body)[data-reading-contrast=high] #sanctuary-view[data-mobile-r39=true] .sanctuary-room-viewport{-webkit-mask-image:none!important;mask-image:none!important}

.sanctuary-mobile-view-status39{display:none}
#sanctuary-view[data-mobile-r39=true][data-mobile-expanded-r39=true] .sanctuary-mobile-view-status39{position:fixed;z-index:52;display:block;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100% - 24px);margin:0;padding:8px 12px;border-radius:10px;background:var(--hud38-base);color:var(--hud38-ink);font:14px/1.4 var(--hub-body,system-ui),sans-serif;pointer-events:none}

/* r42b: the same discoverable action sequence as desktop, deliberately bounded
   to two icon rows below the fixed-shape photo. The named room picker is separate.
   No overflow strip, new scene sizing, or fine-pointer/desktop override. */
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-header39{gap:8px}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-heading39{text-align:left}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-header39>.sanctuary-mobile-action39{flex:0 0 48px;width:48px;min-width:48px;max-width:48px;height:48px;min-height:48px;padding:10px;gap:0}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-header39,.sanctuary-mobile-secondary39,.sanctuary-mobile-primary39)>.sanctuary-mobile-action39{position:relative}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-header39,.sanctuary-mobile-secondary39,.sanctuary-mobile-primary39)>.sanctuary-mobile-action39>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-secondary39{grid-template-columns:repeat(4,minmax(48px,1fr));gap:8px;margin:0;padding:0;border:0}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-primary39{grid-template-columns:repeat(var(--mobile39-room-actions,1),minmax(48px,1fr));gap:8px;margin-top:8px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] :is(.sanctuary-mobile-secondary39,.sanctuary-mobile-primary39)>.sanctuary-mobile-action39{flex-direction:row;min-width:48px;min-height:48px;height:48px;padding:10px;gap:0;border-color:var(--hud38-line)}
#sanctuary-view[data-mobile-r39=true] :is(.sanctuary-mobile-secondary39,.sanctuary-mobile-primary39)>.sanctuary-mobile-action39>svg{width:24px;height:24px}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-travel39{margin-top:12px;padding-top:12px;border-top:1px solid #ffffff26}
#sanctuary-view[data-mobile-r39=true] .sanctuary-mobile-primary39[hidden]+.sanctuary-mobile-travel39{margin-top:12px}
#sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true] .sanctuary-mobile-action39[aria-pressed=true]{background:var(--hud38-face);border-color:var(--hud38-accent);box-shadow:inset 0 0 0 1px var(--hud38-accent)}
#sanctuary-view[data-mobile-r39=true] .room-hub-options :is([data-time-control],.hud38-room-lights,#hud42b-room-lights){display:none!important}
/* Very short/narrow landscape windows need the same stacked photo layout,
   not a sub-216px action column that would clip a 48px target. */
@media(max-width:559px) and (max-height:480px) and (orientation:landscape){
 #sanctuary-view[data-room-hub][data-hud-r38][data-scene][data-mobile-r39=true]:not([data-mobile-expanded-r39=true]){display:flex;flex-direction:column}
 #sanctuary-view[data-room-hub][data-hud-r38][data-scene=cyber][data-mobile-r39=true][data-mobile-talking=true] #sanctuary-side-companion-r27.room-hub-workspace{inset:clamp(88px,var(--mobile39-scene-bottom,43dvh),55dvh) 8px max(8px,env(safe-area-inset-bottom))!important;width:calc(100% - 16px)!important}
}
