/* The entire authored room fits inside the visible viewport, including its controls. */
body.sanctuary-open{overflow:hidden!important}
.sanctuary-view,.sanctuary-view:fullscreen{box-sizing:border-box;position:fixed;inset:0;z-index:200;width:100%;height:100dvh;min-height:0;max-height:100dvh;padding:6px clamp(6px,1vw,16px);display:flex;flex-direction:column;gap:5px;overflow:hidden;background:#15120f}
.sanctuary-view[hidden]{display:none!important}
.sanctuary-view .sanctuary-topline,.sanctuary-view:fullscreen .sanctuary-topline{flex:none;min-height:44px;margin:0;gap:10px}
.sanctuary-view .sanctuary-frame{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;overflow:hidden}
.sanctuary-view .sanctuary-hud{box-sizing:border-box;flex:none;min-height:64px;padding:7px 16px;gap:12px;flex-wrap:nowrap}
.sanctuary-view .sanctuary-heading h1{font-size:25px}
.sanctuary-view .sanctuary-hud-actions{min-width:0;gap:9px}
.sanctuary-view .sanctuary-icon-button{min-width:44px;min-height:44px;padding:10px}
.sanctuary-view .sanctuary-select-label select{min-height:44px}
.sanctuary-room-viewport{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;min-height:0;overflow:hidden;background:radial-gradient(ellipse at center,#211c27,#090b10);position:relative}
.sanctuary-view .sanctuary-scene,.sanctuary-view:fullscreen .sanctuary-scene{flex:none;width:100%;min-height:0;max-width:100%;max-height:100%;aspect-ratio:var(--san-scene-ratio,3/2);margin:0}
.sanctuary-view .sanctuary-scene-image{object-fit:contain}
.sanctuary-view .sanctuary-bottom{box-sizing:border-box;flex:none;min-height:44px;padding:4px 16px;gap:10px;flex-wrap:nowrap}
.sanctuary-view .sanctuary-bottom-copy p{margin-top:1px;font-size:10px}
.sanctuary-view .sanctuary-small-link{min-height:44px;max-width:120px;white-space:normal;text-align:right}
.sanctuary-view .sanctuary-footer{flex:none;display:flex;margin:0 3px;gap:12px;min-height:17px;font-size:9px;line-height:1.5}
.sanctuary-view .sanctuary-footer p:first-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.sanctuary-view .sanctuary-footer p:last-child{white-space:nowrap}
.sanctuary-fullscreen-status:not([hidden]){position:absolute;z-index:30;left:50%;top:8px;transform:translateX(-50%);max-width:calc(100% - 32px);margin:0;box-shadow:0 4px 24px #0006}
/* The PNG is the button's visible shape. The 44px hit area remains invisible. */
.sanctuary-view[data-scene] .sanctuary-backpack-button,.sanctuary-view[data-scene] .sanctuary-backpack-button:hover,.sanctuary-view[data-scene] .sanctuary-backpack-button:active{min-width:44px;min-height:44px;padding:0 2px;border:0!important;background:transparent!important;box-shadow:none!important}
.sanctuary-view[data-scene] .sanctuary-backpack-button img,.sanctuary-dialog[data-scene] .sanctuary-welcome>img{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;object-fit:contain}
.sanctuary-view[data-scene] .sanctuary-backpack-button img{width:48px;height:54px}
/* Two slow decorative layers per bar; no backdrop blur, canvas, or per-particle timers. */
.sanctuary-view{--san-glow:#d3a35b;--san-glow2:#a2bea0;--san-spark:#fff0bd}
.sanctuary-view[data-scene=cyber]{--san-glow:#ec56b3;--san-glow2:#9370e0;--san-spark:#ffc0ec}
.sanctuary-view[data-scene=agandar]{--san-glow:#ba3349;--san-glow2:#71818f;--san-spark:#ffc7ba}
.sanctuary-view[data-scene=auriela]{--san-glow:#d7919d;--san-glow2:#9fb581;--san-spark:#ffe0bc}
.sanctuary-view[data-scene=solomon]{--san-glow:#a97b3f;--san-glow2:#7c9aab;--san-spark:#ffe4a3}
.sanctuary-view[data-scene=youth]{--san-glow:#e7a15f;--san-glow2:#82bdb1;--san-spark:#fff2af}
.sanctuary-view[data-scene] :is(.sanctuary-hud,.sanctuary-bottom){position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(112deg,color-mix(in srgb,var(--san-glow) 13%,transparent),transparent 39%,color-mix(in srgb,var(--san-glow2) 13%,transparent)),var(--san-bg)}
.sanctuary-view[data-scene] :is(.sanctuary-hud,.sanctuary-bottom)>*{position:relative;z-index:1}
.sanctuary-view[data-scene] :is(.sanctuary-hud,.sanctuary-bottom)::before{content:"";position:absolute;inset:-10px -3%;z-index:0;pointer-events:none;opacity:.36;background:radial-gradient(ellipse at 14% 75%,color-mix(in srgb,var(--san-glow) 27%,transparent),transparent 33%),radial-gradient(ellipse at 76% 18%,color-mix(in srgb,var(--san-glow2) 26%,transparent),transparent 28%),radial-gradient(circle at 8% 24%,var(--san-spark) 0 1px,transparent 2px),radial-gradient(circle at 28% 77%,var(--san-spark) 0 .6px,transparent 1.5px),radial-gradient(circle at 47% 22%,var(--san-spark) 0 .8px,transparent 1.8px),radial-gradient(circle at 69% 69%,var(--san-spark) 0 .8px,transparent 1.8px),radial-gradient(circle at 91% 26%,var(--san-spark) 0 .7px,transparent 1.8px);animation:sanctuary-bar-drift 21s ease-in-out infinite alternate}
.sanctuary-view[data-scene] .sanctuary-bottom::before{animation-delay:-8s;opacity:.25}
@keyframes sanctuary-bar-drift{from{transform:translate3d(-1%,3px,0);opacity:.24}to{transform:translate3d(1%,-3px,0);opacity:.42}}
.sanctuary-view[data-effects-paused=true] :is(.sanctuary-hud,.sanctuary-bottom)::before{animation-play-state:paused}
.sanctuary-view .sanctuary-window-view{overflow:hidden;min-height:0}
.sanctuary-view .sanctuary-window-viewport{min-height:0}
.sanctuary-view .sanctuary-window-head{padding:8px 12px;gap:10px}
.sanctuary-view .sanctuary-window-foot{padding:7px 12px}
@media(max-width:620px){.sanctuary-view .sanctuary-heading{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.sanctuary-view .sanctuary-hud{padding:5px 8px;min-height:62px}.sanctuary-view .sanctuary-hud-actions{width:100%;justify-content:space-between;gap:4px;margin:0}.sanctuary-view .sanctuary-select-label{flex:1;min-width:0}.sanctuary-view .sanctuary-select-label select{max-width:100%;width:100%;font-size:10px}.sanctuary-view .sanctuary-backpack-button small{display:none}.sanctuary-view .sanctuary-backpack-button img{width:44px;height:48px}.sanctuary-view .sanctuary-library-label{font-size:8px}.sanctuary-view .sanctuary-bottom{padding:3px 9px}.sanctuary-view .sanctuary-bottom-copy strong{font-size:10px}.sanctuary-view .sanctuary-bottom-copy p{font-size:9px}.sanctuary-view .sanctuary-footer p:last-child{display:none}.sanctuary-view .sanctuary-window-controls{width:auto}.sanctuary-view .sanctuary-window-head h2{font-size:16px}.sanctuary-view .sanctuary-window-head{gap:5px}.sanctuary-view .sanctuary-window-foot #sanctuary-window-help{display:none}}
@media(max-height:520px){.sanctuary-view{gap:2px;padding:2px 6px}.sanctuary-view .sanctuary-topline{min-height:36px}.sanctuary-view .sanctuary-hud{min-height:52px;padding-block:2px}.sanctuary-view .sanctuary-heading h1{font-size:20px}.sanctuary-view .sanctuary-backpack-button img{height:44px}.sanctuary-view .sanctuary-bottom{min-height:44px;padding-block:0}.sanctuary-view .sanctuary-bottom-copy p,.sanctuary-view .sanctuary-footer{display:none}.sanctuary-view .sanctuary-window-head{padding-block:3px}.sanctuary-view .sanctuary-window-foot{padding-block:3px}.sanctuary-view .sanctuary-window-foot #sanctuary-window-help{display:none}}
@media(prefers-reduced-motion:reduce){.sanctuary-view[data-scene] :is(.sanctuary-hud,.sanctuary-bottom)::before{animation:none!important;transform:none!important}}
@media(forced-colors:active){.sanctuary-view[data-scene] :is(.sanctuary-hud,.sanctuary-bottom)::before{display:none}.sanctuary-view[data-scene] :is(.sanctuary-hud,.sanctuary-bottom){background:Canvas}.sanctuary-room-viewport{background:Canvas}}
/* The short welcome note grows with its contents, never with the backpack grid. */
#sanctuary-backpack[data-welcome=true]{box-sizing:border-box;width:min(540px,calc(100vw - 24px));height:auto!important;min-height:0!important;max-height:calc(100dvh - 24px);margin:auto;overflow:auto}
#sanctuary-backpack[data-welcome=true] .sanctuary-dialog-shell{height:auto!important;min-height:0;display:block}
#sanctuary-backpack[data-welcome=true] .sanctuary-backpack-body{height:auto;min-height:0;display:block;overflow:visible}
#sanctuary-backpack[data-welcome=true] .sanctuary-panel{height:auto;min-height:0;overflow:visible;flex:none;padding:0}
#sanctuary-backpack[data-welcome=true] .sanctuary-welcome{box-sizing:border-box;margin:0;width:100%;max-width:none;padding:8px 24px 24px}
#sanctuary-backpack[data-welcome=true] .sanctuary-welcome>img{width:68px;height:75px;margin-bottom:12px}
#sanctuary-backpack[data-welcome=true] .sanctuary-welcome h3{font-size:29px;margin-bottom:12px}
#sanctuary-backpack[data-welcome=true] .sanctuary-welcome p{line-height:1.7}
#sanctuary-backpack[data-welcome=true] .sanctuary-button-row{margin:14px 0}
.sanctuary-welcome-remember{display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;margin:4px 0 12px;color:var(--san-ink);cursor:pointer;font:500 12px/1.5 system-ui,sans-serif}
.sanctuary-welcome-remember input{width:19px;height:19px;margin:0;accent-color:var(--san-accent)}
@media(max-height:520px){#sanctuary-backpack[data-welcome=true] .sanctuary-welcome>img{display:none}#sanctuary-backpack[data-welcome=true] .sanctuary-welcome{padding:4px 20px 18px}#sanctuary-backpack[data-welcome=true] .sanctuary-welcome h3{font-size:24px}}
/* A static fine-grain plate and restrained edge color belong only to the artwork. */
.sanctuary-scene::after,.sanctuary-window-plane::after{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;opacity:.025;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");background-repeat:repeat;mix-blend-mode:soft-light;box-shadow:inset .6px 0 #df5c982e,inset -.6px 0 #638ddd26}
.sanctuary-window-plane::after{z-index:4}
.sanctuary-exterior-layer{box-shadow:inset .5px 0 #df6d9c18,inset -.5px 0 #5f8fcd18}
.sanctuary-scene[data-scene=cyber] .sanctuary-exterior-layer>img{filter:contrast(1.045)}
@media(forced-colors:active){.sanctuary-scene::after,.sanctuary-window-plane::after{display:none}.sanctuary-exterior-layer{box-shadow:none}.sanctuary-scene[data-scene=cyber] .sanctuary-exterior-layer>img{filter:none}}
