/* Physical playthings, kept on the illustrated stage. */
.immersive-stage .scene-play-toolbar{position:absolute;left:12%;right:12%;top:77.5%;height:8%;display:flex;align-items:center;justify-content:space-between;gap:6%;z-index:18;pointer-events:none}
.immersive-stage .scene-play-button{pointer-events:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:47%;min-height:48px;max-height:100%;padding:5px 8px;border:2px solid #ba8a52;border-radius:45% 48% 42% 44%;color:#70472b;background:radial-gradient(ellipse at 50% 8%,#fff3d4,#f4d09a);box-shadow:0 4px 0 #a36e3e,0 6px 8px #4f35202b,inset 0 0 0 3px #ffe4b2;font-family:inherit;font-size:clamp(11px,2.8vw,15px);font-weight:650;line-height:1.5;white-space:nowrap;touch-action:manipulation;transition:filter .15s,box-shadow .15s}
.immersive-stage .scene-play-button:hover{filter:brightness(1.06)}
.immersive-stage .scene-play-button[aria-pressed=true]{box-shadow:0 2px 0 #a36e3e,0 0 12px #ffe4a4,inset 0 0 0 3px #ffe7b8;filter:brightness(1.08)}
.scene-play-button:focus-visible,.resident-menu button:focus-visible{outline:3px dashed #fff5cf;outline-offset:4px}
.play-art{display:block;width:29px;height:29px;fill:none;stroke:#79553b;stroke-width:1.15;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
.scene-play-button .play-art{width:24px;height:24px;filter:drop-shadow(0 1px 0 #fff2d4)}
.scene-play-props{position:absolute;inset:0;pointer-events:none;z-index:9;overflow:hidden;border-radius:inherit}
/* The old six voice interactions live in a small external bubble, never nested buttons. */
.immersive-stage .resident-menu{position:absolute;z-index:28;display:flex;gap:4px;padding:6px;border:1.5px solid #b99164;border-radius:15px;background:#fff4db;box-shadow:0 4px 0 #8b60372b,0 5px 12px #543b2d30;color:#78563a;transform:translate(-50%,-100%);width:max-content;max-width:calc(100% - 12px)}
.immersive-stage .resident-menu:after{content:'';position:absolute;left:calc(50% - 5px);bottom:-6px;width:10px;height:10px;transform:rotate(45deg);background:#fff4db;border-right:1.5px solid #b99164;border-bottom:1.5px solid #b99164}
.resident-menu button{display:flex;align-items:center;justify-content:center;gap:4px;min-height:44px;border-radius:10px;padding:5px 9px;font:inherit;font-size:12px;white-space:nowrap;color:inherit;background:#f7e5bf}
.resident-menu button:last-child{background:#f8dcc4}.resident-menu svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.immersive-stage .town-character[data-menu-open=true]{z-index:21}
.immersive-stage .town-character[data-menu-open=true] .resident-name{opacity:1}
.immersive-stage .resident-reaction{color:#79583a;max-width:155px}
html[data-theme=night] .scene-play-button{background:radial-gradient(ellipse at top,#ffe8b9,#e9b977);border-color:#a67a44;box-shadow:0 4px 0 #81532f,0 0 12px #ffd08322,inset 0 0 0 3px #f9d899;color:#674027}
html[data-theme=night] .play-prop{filter:drop-shadow(0 1px 3px #f0bb6233)}
@media(max-height:700px){.immersive-stage .scene-play-toolbar{top:77%;height:9%}.scene-play-button .play-art{width:18px;height:18px}.immersive-stage .scene-play-button{padding:3px 5px;font-size:11px}}
.scene-play-status{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}
.immersive-stage .resident-menu[data-placement=below]:after{top:-6px;bottom:auto;transform:rotate(225deg)}
/* The new performance layer is local to the illustrated room. Existing actor
   buttons stay in the DOM and follow their visible performers as hit targets. */
.town-story-layer{position:absolute;z-index:8;display:block;pointer-events:none;overflow:visible;contain:layout style;isolation:isolate}
.town-story-layer use,.town-story-layer image{pointer-events:none;image-rendering:auto}
.immersive-stage[data-story-active] .town-character[data-story-actor] .resident-motion{visibility:hidden;animation:none!important}
.immersive-stage[data-story-active] .town-character[data-story-actor]{z-index:10;animation:none!important}
/* The original resident buttons are transparent full-cell hit targets while
   moving. Real objects always win in the overlapping transparent margins. */
.immersive-stage[data-story-active]>.building-link,
.immersive-stage[data-story-active]>.scene-identity,
.immersive-stage[data-story-active]>.theme-control,
.immersive-stage[data-story-active]>.wall-frame,
.immersive-stage[data-story-active]>.closed-journal,
.immersive-stage[data-story-active]>.journal-pencil,
.immersive-stage[data-story-active]>.mail-cubby,
.immersive-stage[data-story-active]>.birthday-envelope,
.immersive-stage[data-story-active]>.counter-letter,
.immersive-stage[data-story-active]>.tree-wish-tag,
.immersive-stage[data-story-active]>.wish-book-object,
.immersive-stage[data-story-active]>.wish-basket-object{z-index:12}
/* Night lighting belongs to the scene, not a second tint on the actors. */
html[data-theme=night] .town-story-layer{filter:drop-shadow(0 1px 1px #ffe0aa18)}
@media(prefers-reduced-motion:reduce){.scene-play-button{transition:none!important}}
