/* Local foreground: above the room furniture, leader lines and calendar.
   The stage owns its own stack; HUD, dock and dialogs remain separate. */
.koichi-home .koichi-stage>.home-rest-animation{box-sizing:border-box;position:absolute;z-index:3;top:clamp(5px,2vw,12px);left:50%;transform:translateX(-50%);width:min(66%,248px);padding:6px;border:1px solid #d2a172;border-radius:13px;background:#3c2a22;color:#fff3dc;box-shadow:0 5px 18px #1e130abb;pointer-events:none}
.koichi-home .koichi-stage>:is(.koichi-pin,.koichi-calendar){z-index:1}
.home-rest-anim-head{display:flex;align-items:center;justify-content:space-between;gap:2px;padding-left:4px}
.home-rest-anim-head h3{margin:0;color:#fff3dc;font-size:clamp(12px,3.5vw,16px);line-height:1.25;font-weight:800}
.home-rest-animation .home-rest-dismiss{display:inline-grid;place-items:center;flex:none;min-width:44px;min-height:44px;margin:0;padding:0;border:1px solid transparent;background:transparent;color:#fff3dc;box-shadow:none;border-radius:9px;font-size:21px;line-height:1;pointer-events:auto}
.home-rest-animation .home-rest-dismiss:hover{border-color:#d2a172;background:#593b2a}
.home-rest-animation .home-rest-dismiss:focus-visible{outline:2px solid #ffe3a1;outline-offset:-3px}
.home-rest-anim-art{position:relative;isolation:isolate;overflow:hidden;aspect-ratio:1;border:1px solid #d2a172;border-radius:9px;background:#634535}
.home-rest-anim-art img{display:block;width:100%;height:100%;object-fit:contain}
.home-rest-gain{position:absolute;bottom:11%;left:50%;transform:translateX(-50%);width:max-content;max-width:96%;padding:4px 13px;border:1px solid #f5d597;border-radius:10px;background:#3a261beF;color:#ffdd96;font-size:clamp(15px,5vw,22px);line-height:1.35;text-shadow:0 2px #261911}
.home-rest-gain::before,.home-rest-gain::after{content:'✦';position:absolute;top:1px;color:#ffe4a8;font-size:.55em}
.home-rest-gain::before{left:3px}.home-rest-gain::after{right:3px;top:auto;bottom:1px}
.home-rest-before{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px 6px;margin-top:5px;padding:4px 5px;border:1px solid #846248;border-radius:6px;background:#55392c;color:#fff4df;font-size:11px;font-variant-numeric:tabular-nums;line-height:1.35}
.home-rest-before b{color:#ffe6bf}
.home-rest-motion{position:absolute;left:58%;top:38%;width:16%;height:20%;overflow:visible;color:#fff5dc;pointer-events:none}
.home-rest-steam{left:54%;top:26%;width:14%;height:23%;fill:none;stroke:#fff3d8;stroke-width:1;stroke-linecap:round}
.home-rest-motion i{position:absolute;left:3%;top:33%;font:700 clamp(13px,4vw,20px)/1 serif;text-shadow:0 1px 3px #4c3324}
.home-rest-motion i:nth-child(2){left:36%;top:22%;font-size:clamp(11px,3.5vw,17px)}
.home-rest-motion i:nth-child(3){left:68%;top:4%;font-size:clamp(9px,3.1vw,15px)}
.home-rest-animation[data-variant=music] .home-rest-motion{left:68%;top:43%}
@keyframes home-rest-art-breath{0%,100%{transform:scale(1)}50%{transform:scale(1.025)}}
@keyframes home-rest-drift{0%{opacity:.25;transform:translate(0,3px)}42%{opacity:.94}100%{opacity:0;transform:translate(5px,-14px)}}
@keyframes home-rest-card-in{from{opacity:.34;transform:translate(-50%,5px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes home-rest-gain-in{from{opacity:.2;transform:translate(-50%,5px)}to{opacity:1;transform:translate(-50%,0)}}
@media(prefers-reduced-motion:no-preference){
 .home-rest-animation:not([data-reduced]){animation:home-rest-card-in .19s ease-out both}
 .home-rest-animation:not([data-reduced]) .home-rest-anim-art img{animation:home-rest-art-breath 1.65s ease-in-out both}
 .home-rest-animation:not([data-reduced]) .home-rest-gain{animation:home-rest-gain-in .21s ease-out both}
 .home-rest-animation:not([data-reduced]) .home-rest-motion :is(i,path){animation:home-rest-drift 1.25s ease-out both}
 .home-rest-animation:not([data-reduced]) .home-rest-motion :is(i,path):nth-child(2){animation-delay:.17s}
 .home-rest-animation:not([data-reduced]) .home-rest-motion :is(i,path):nth-child(3){animation-delay:.31s}
}
