/* Scene framing and controls belong to the game; the Dorm keeps its separate layout. */
@layer ar-visual153{
 #sanctuary-view[data-cottage-activity144=true]{--cottage-bar-height153:72px;--world-width153:min(100vw,calc((100dvh - var(--cottage-bar-height153))*1.777777778));--world-height153:calc(var(--world-width153)*.5625)}
 #sanctuary-view#sanctuary-view #cottage-game-chrome144{height:auto!important;min-height:64px!important;padding:10px 76px!important;gap:12px!important;align-items:center!important}
 #sanctuary-view#sanctuary-view #cottage-game-chrome144 .cottage-game-heading144{display:flex!important;flex-direction:column!important;flex:1!important;gap:4px!important;min-width:0!important;padding:0 12px 0 0!important;align-self:center!important}
 #sanctuary-view#sanctuary-view #cottage-game-chrome144 .cottage-game-heading144 strong{font-family:var(--hub-heading,Georgia,'Times New Roman',serif)!important;font-size:18px!important;font-weight:500!important;line-height:1.2!important;letter-spacing:.025em!important;white-space:normal!important;text-shadow:0 1px 2px #130b07!important;margin:0!important}
 #sanctuary-view#sanctuary-view #cottage-game-chrome144 .cottage-game-heading144 span{display:block!important;font-family:var(--hub-body,Georgia,serif)!important;font-size:12px!important;font-weight:400!important;line-height:1.25!important;letter-spacing:.06em!important;text-transform:capitalize!important;white-space:normal!important;margin:0!important}
 #sanctuary-view#sanctuary-view #cottage-game-chrome144>button{min-width:44px!important;min-height:44px!important;font-size:15px!important;line-height:1.2!important;padding:8px 12px!important;margin:0!important;flex-shrink:0!important}
 #sanctuary-view#sanctuary-view[data-cottage-activity144=true] .sanctuary-frame{inset:var(--cottage-bar-height153) 0 0!important;width:100vw!important;height:calc(100dvh - var(--cottage-bar-height153))!important;display:grid!important;place-items:center!important;overflow:hidden!important;touch-action:auto!important}
 #sanctuary-view#sanctuary-view[data-cottage-activity144=true] .sanctuary-room-viewport{position:relative!important;inset:auto!important;left:auto!important;top:auto!important;display:block!important;width:var(--world-width153)!important;height:var(--world-height153)!important;max-width:none!important;max-height:none!important;min-height:0!important;margin:0!important;transform:none!important}
 #sanctuary-view[data-cottage-activity144=true] :is(#auriela-hallway78,.house-visit112)[open]{display:flex!important;align-items:center!important;justify-content:center!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;padding:var(--cottage-bar-height153) 0 0!important;overflow:hidden!important;touch-action:auto!important}
 #sanctuary-view[data-cottage-activity144=true] :is(.hallway-camera78,.visit-camera112){position:relative!important;inset:auto!important;left:auto!important;top:auto!important;flex:none!important;width:var(--world-width153)!important;height:var(--world-height153)!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;overflow:hidden!important;aspect-ratio:16/9!important}
 #sanctuary-view[data-cottage-activity144=true] :is(.house-nav87,.cottage-visit-nav144,.study-nav138){top:calc(var(--cottage-bar-height153) + 10px)!important}
 #auriela-hallway78[data-house-ready153=false] .hallway-camera78{visibility:hidden!important}
 #auriela-hallway78:not([data-house-scene=hallway]) :is(.hallway-girl78,.hallway-cat78,.hallway-exit-r150){visibility:hidden!important;pointer-events:none!important}
 #sanctuary-view #cottage-game-menu144{top:calc(var(--cottage-bar-height153) + 8px)!important;max-height:calc(100dvh - var(--cottage-bar-height153) - 20px)!important}
 @media(max-width:700px){
  #sanctuary-view#sanctuary-view #cottage-game-chrome144{padding:8px 28px!important;gap:6px!important}
  #sanctuary-view#sanctuary-view #cottage-game-chrome144 .cottage-game-heading144 strong{font-size:14px!important;letter-spacing:0!important}
  #sanctuary-view#sanctuary-view #cottage-game-chrome144 .cottage-game-heading144 span{font-size:11px!important;letter-spacing:0!important}
  #sanctuary-view#sanctuary-view #cottage-game-chrome144>button{font-size:13px!important;padding:7px!important}
 }
 @media(max-width:440px){#sanctuary-view#sanctuary-view #cottage-game-chrome144{padding:8px 16px!important}#sanctuary-view#sanctuary-view #cottage-game-chrome144 .cottage-game-heading144{padding-right:0!important}#sanctuary-view#sanctuary-view #cottage-game-chrome144 .living-lamps147{min-width:64px!important;font-size:12px!important}}
}
@layer ar-visual153{
 .greenhouse-night147 .lamp-moth147{width:1.15%!important;min-width:10px!important;max-width:22px!important;height:auto!important;aspect-ratio:1.5!important;background:none!important;box-shadow:none!important;border:0!important;border-radius:0!important;opacity:.95!important;animation-name:greenhouse-flight153!important;animation-duration:calc(8.2s + var(--i)*1.9s)!important;animation-timing-function:linear!important;filter:drop-shadow(0 1px 1px #20190c45)!important}
 .lamp-moth147 span,.lamp-moth147 img{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none}
 .lamp-moth147 .moth-body153{clip-path:polygon(15% 0,85% 0,58% 32%,56% 100%,44% 100%,42% 32%)}
 .lamp-moth147 .moth-left153{clip-path:inset(22% 53% 0 0);transform-origin:50% 50%;animation:moth-fold153 .14s ease-in-out infinite alternate;animation-delay:calc(var(--i)*-.037s)}
 .lamp-moth147 .moth-right153{clip-path:inset(22% 0 0 53%);transform-origin:50% 50%;animation:moth-fold153 .115s ease-in-out infinite alternate}
 .greenhouse-night147[data-paused=true] .lamp-moth147 span{animation-play-state:paused!important}
 @media(prefers-reduced-motion:reduce){.greenhouse-night147 .lamp-moth147{display:none!important}}
}
@keyframes greenhouse-flight153{0%,100%{transform:translate(calc(-24px * var(--flight-dir153)),22px) rotate(-12deg)}14%{transform:translate(calc(7px * var(--flight-dir153)),12px) rotate(15deg)}31%{transform:translate(calc(35px * var(--flight-dir153)),35px) rotate(28deg)}48%{transform:translate(calc(12px * var(--flight-dir153)),60px) rotate(-25deg)}66%{transform:translate(calc(-32px * var(--flight-dir153)),50px) rotate(-39deg)}83%{transform:translate(calc(-39px * var(--flight-dir153)),28px) rotate(6deg)}}
@keyframes moth-fold153{from{transform:scaleX(.4)}to{transform:scaleX(1)}}
@layer ar-visual153{
 #sanctuary-view[data-cottage-activity144=true] :is(.house-nav87,.cottage-visit-nav144,.study-nav138){right:calc((100vw - var(--world-width153))/2 + 12px)!important;top:calc(var(--cottage-bar-height153) + (100dvh - var(--cottage-bar-height153) - var(--world-height153))/2 + 10px)!important}
 .cottage-phone153{display:none}
 #sanctuary-view[data-cottage-activity144=true] .house-turn87{position:fixed!important;right:calc((100vw - var(--world-width153))/2 + 12px)!important;top:calc(var(--cottage-bar-height153) + (100dvh - var(--cottage-bar-height153))/2 - 28px)!important}
 @media(max-width:600px) and (orientation:portrait){
  #sanctuary-view[data-cottage-activity144=true] :is(#auriela-hallway78,.house-visit112)[open]{align-items:flex-start!important;padding-top:calc(var(--cottage-bar-height153) + 54px)!important}
  #sanctuary-view#sanctuary-view[data-cottage-activity144=true] .sanctuary-frame{top:calc(var(--cottage-bar-height153) + 54px)!important;height:var(--world-height153)!important;align-items:start!important}
  #sanctuary-view[data-cottage-activity144=true] :is(.house-nav87,.cottage-visit-nav144,.study-nav138){position:fixed!important;top:calc(var(--cottage-bar-height153) + 4px)!important;right:12px!important;left:12px!important;justify-content:center!important;gap:20px!important;height:46px!important;margin:0!important}
  #sanctuary-view[data-cottage-activity144=true] .house-turn87{right:12px!important;top:calc(var(--cottage-bar-height153) + 54px + var(--world-height153)/2 - 28px)!important}
  #sanctuary-view[data-cottage-activity144=true] .cottage-phone153{position:fixed;inset:calc(var(--cottage-bar-height153) + 54px + var(--world-height153)) 0 0;display:flex;flex-direction:column;box-sizing:border-box;padding:14px 14px max(14px,env(safe-area-inset-bottom));border-top:1px solid #99794b;background:linear-gradient(160deg,#302218,#1c1510);color:#f4e6cd;overflow:auto;overscroll-behavior:contain;z-index:20}
  .cottage-phone153 h2{flex:none;margin:0 0 12px;font:500 20px/1.2 var(--hub-heading,Georgia,serif);letter-spacing:.025em;color:#f0d4a1}
  .cottage-phone-actions153{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:128px;gap:10px;flex:none;align-content:start;min-height:min-content}
  #sanctuary-view .cottage-phone-actions153>button{display:flex;flex-direction:column;min-width:0;min-height:98px;box-sizing:border-box;overflow:hidden;padding:0;border:1px solid #9e7a47;border-radius:6px;background:#281c14;color:#f4e5c8;box-shadow:inset 0 1px #d7b67e35;cursor:pointer}
  .cottage-phone-actions153 .action-image153{display:block;flex:1;min-height:48px;width:100%;background-repeat:no-repeat;background-size:auto 300%}
  .cottage-phone-actions153 .action-label153{display:block;flex:none;box-sizing:border-box;width:100%;min-height:42px;padding:8px 10px;border-top:1px solid #8d6b3d88;font:400 14px/1.35 var(--hub-body,Georgia,serif);text-align:left}
  .cottage-phone-actions153>button:focus-visible{outline:3px solid #f7dfa7;outline-offset:2px}
  .cottage-phone-actions153>button:disabled{opacity:.45}
 }
}

@layer ar-visual153 {
 /* The lamp polygon remains clickable; its native button owns keyboard focus. */
 #sanctuary-view[data-scene=cyber] .sanctuary-lamp-target,
 #sanctuary-view[data-scene=cyber] .sanctuary-lamp-target:is(:hover,:active){background:transparent!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important}
 /* Source artwork carries the room's lighting. Avoid stacking old dim/desaturate
    and cinematic filters differently from room to room. */
 #sanctuary-view[data-scene=auriela] :is(#sanctuary-scene-bounds,#sanctuary-window-plane,.hallway-camera78,.hallway-art78,.visit-camera112,.visit-art112){filter:none!important}
 #sanctuary-view[data-scene=auriela] :is(.auriela-optics-grain118,.dorm-grain93,.outdoor-grain114){display:none!important}
 #sanctuary-view[data-scene=auriela] :is(.hallway-girl78,.hallway-cat78,.hallway-exit-r150>div){filter:none!important}
 /* Local lamps-off artwork retains fire and candle spill; no gray curtain. */
 #sanctuary-view[data-scene=auriela] .living-shade147{display:none!important}
 #sanctuary-view[data-scene=auriela] .living-lamp-art147{mask-image:none!important}
 .auriela-entry118[data-cottage-activity144=true]{gap:12px;background:#211810;color:#f3dfb8}
 .auriela-entry118[data-cottage-activity144=true]::before{background:linear-gradient(90deg,#1c140bd9,#1c140b80,#1c140bd9),url('/assets/update-r151/downstairs.webp?v=ffaa7b156f62244f') center/cover}
 .auriela-entry118[data-cottage-activity144=true] h2{font:400 clamp(28px,4vw,44px)/1.2 var(--hub-heading,Georgia,serif);text-shadow:0 2px 8px #0008;letter-spacing:.01em}
 .auriela-entry118[data-cottage-activity144=true] p{font:400 17px/1.5 var(--hub-body,Georgia,serif);color:#ebd8b6;text-shadow:0 1px 5px #000}
 .auriela-entry118[data-cottage-activity144=true] button{font:400 16px/1.3 var(--hub-body,Georgia,serif);margin-top:16px}
 .auriela-entry118[data-cottage-activity144=true]::after{content:'';width:120px;height:2px;border-radius:2px;background:linear-gradient(90deg,transparent,#e1b875,transparent);grid-row:3;animation:cottage-welcome153 1.5s ease-in-out infinite alternate;transform-origin:center}
 @media(prefers-reduced-motion:reduce){.auriela-entry118[data-cottage-activity144=true]::after{animation:none}}
}
@keyframes cottage-welcome153{from{opacity:.35;transform:scaleX(.55)}to{opacity:1;transform:scaleX(1)}}

@layer ar-visual153 {
 @media(max-width:600px) and (orientation:portrait){
  #sanctuary-view[data-cottage-activity144=true] :is(.house-nav87,.cottage-visit-nav144,.study-nav138){left:0!important;right:0!important;top:var(--cottage-bar-height153)!important;height:54px!important;background:linear-gradient(180deg,#372318,#21150f);border-top:1px solid #7f5d34;border-bottom:2px solid #98713d;box-shadow:inset 0 2px 0 #b18a4730,inset 0 -3px 6px #120b08;box-sizing:border-box}
 }
 @media(max-width:600px) and (orientation:portrait) and (max-height:700px){
  #sanctuary-view[data-cottage-activity144=true] .cottage-phone153{padding:8px;gap:0}
  .cottage-phone153 h2{display:none}
  .cottage-phone-actions153{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:80px;gap:6px}
  #sanctuary-view .cottage-phone-actions153>button{min-height:80px;border-radius:4px}
  .cottage-phone-actions153 .action-image153{flex:none;height:28px;min-height:28px}
  .cottage-phone-actions153 .action-label153{padding:3px 4px;min-height:48px;font-size:12px;line-height:1.15;overflow-wrap:anywhere}
 }
}
@layer ar-visual153 {
 .cottage-phone153[hidden]{display:none!important}
 #sanctuary-view[data-cottage-activity144=true] #house-visit112:has(.garden-panel114) .cottage-phone153{display:none!important}
 #sanctuary-view[data-cottage-activity144=true] #house-visit112:has(.garden-panel114) .cottage-visit-nav144{visibility:hidden!important}
 #sanctuary-view[data-cottage-activity144=true] #house-visit112 .garden-panel114{z-index:60!important}
}
@layer ar-visual153 {
 /* Activity scenes use one full-width stage, not the Dorm's three-column HUD. */
 #sanctuary-view#sanctuary-view[data-cottage-activity144=true] .sanctuary-frame{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
 #sanctuary-view#sanctuary-view[data-cottage-activity144=true] .sanctuary-room-viewport{grid-area:1/1!important}
}

@layer ar-visual153 {
 /* Window art shares the game stage; native Dorm window sizing is unchanged. */
 #sanctuary-view#sanctuary-view[data-cottage-activity144=true] #sanctuary-window-view{grid-area:1/1!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important}
 #sanctuary-view#sanctuary-view[data-cottage-activity144=true] #sanctuary-window-viewport{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important}
 @media(max-width:600px) and (orientation:portrait){
  .cottage-phone153[data-window153=true] .cottage-phone-actions153{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:120px}
  .cottage-phone153[data-window153=true] .action-label153{font-size:12px;padding:5px;min-height:58px}
 }
 @media(max-width:600px) and (orientation:portrait) and (max-height:700px){.cottage-phone153[data-window153=true] .cottage-phone-actions153{grid-auto-rows:80px}.cottage-phone153[data-window153=true] .action-label153{min-height:48px;font-size:11px;padding:3px}}
}

