#scene-history{max-height:14rem;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.walker{position:absolute;pointer-events:auto;transform:translate(-50%,-100%);width:clamp(28px,5.4cqw,53px);aspect-ratio:1;border:0;background:transparent;padding:0;cursor:pointer;isolation:isolate;transition:left 90ms linear,top 90ms linear;overflow:visible}
.walker:before{content:"";position:absolute;bottom:-2%;left:22%;width:56%;height:14%;border-radius:50%;background:#34482b55;z-index:-1}
.walker.sns-phone:after,.facility-actor.sns-phone:after{content:"";position:absolute;z-index:1;left:60%;top:50%;width:clamp(5px,18%,16px);height:clamp(8px,27%,23px);border:1px solid #262238;border-radius:2px;background:#a3d5e9;box-shadow:inset 0 -2px #37304a,0 0 3px #fff9;transform:rotate(-13deg);pointer-events:none}
.walker.facing-left.sns-phone:after{left:24%;transform:rotate(13deg)}
.walker-art{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;transform-origin:center bottom;filter:drop-shadow(0 1px 0 #58482c55)}
.campus-walk-art{background-size:300% 400%;background-repeat:no-repeat;background-position:0 0}
.walker.facing-left .walker-art:not(.campus-walk-art){scale:-1 1}.walker.walking .walker-art:not(.campus-walk-art){animation:town-stride .48s ease-in-out infinite alternate}.walker:nth-child(2n) .walker-art{animation-delay:-.24s}
@keyframes town-stride{from{transform:translateY(0) rotate(-2deg)}to{transform:translateY(-1.7px) rotate(2deg)}}
.walker-name{position:absolute;top:98%;left:50%;transform:translateX(-50%);background:#fffae9ef;color:#3e3930;border:1px solid #776e4d88;border-radius:8px;font-weight:700;font-size:clamp(9px,1.2cqw,12px);padding:0 4px;line-height:1.23;white-space:nowrap}
.town-robot-portrait{width:94px;height:94px;flex:none;background-image:url(/assets/town-robot-stride.webp)}
.town-robot .walker-name{background:#fff1bc;color:#503610;border-color:#ab813c}
.walker.speaking .walker-name,.walker:hover .walker-name,.walker:focus-visible .walker-name{background:#fff0af;border-color:#a87933}
/* A broom swings with the resident’s leading hand once they reach the assigned spot. */
.cleanup-broom{display:none;position:absolute;z-index:2;left:67%;top:48%;height:42%;width:14%;transform-origin:35% 12%;pointer-events:none}
.sweeping .cleanup-broom{display:block;animation:cleanup-sweep .9s ease-in-out infinite alternate}
.cleanup-broom::before{content:'';position:absolute;inset:0 40% 14%;border-radius:2px;background:#9b673e}
.cleanup-broom::after{content:'';position:absolute;left:-35%;right:-35%;bottom:0;height:30%;border-radius:3px 3px 1px 1px;background:repeating-linear-gradient(90deg,#cf9f51 0 2px,#e8bb68 2px 4px);border-top:2px solid #875c40}
.walker.sweeping .walker-art{animation:cleanup-lean .9s ease-in-out infinite alternate}
@keyframes cleanup-sweep{from{transform:rotate(-35deg)}to{transform:translateX(16%) rotate(33deg)}}
@keyframes cleanup-lean{from{transform:rotate(2deg)}to{transform:rotate(-4deg)}}
@media(prefers-reduced-motion:reduce){.sweeping .cleanup-broom,.walker.sweeping .walker-art{animation:none}.sweeping .cleanup-broom{transform:rotate(-24deg)}}
.scene-bubble{position:absolute;z-index:4;pointer-events:none;background:#fffdf0;color:#332f31;border:1.5px solid #62534e;border-radius:12px;padding:6px 11px;box-shadow:0 3px 0 #4e473a3d;width:max-content;max-width:min(245px,62%);line-height:1.42;font-size:clamp(11px,1.7cqw,14px)}
.scene-bubble:after{content:'';position:absolute;bottom:-5px;left:calc(var(--tip) - 4px);background:#fffdf0;border-right:1.5px solid #62534e;border-bottom:1.5px solid #62534e;width:7px;height:7px;transform:rotate(45deg)}
.scene-bubble strong{display:block;font-size:.82em;color:#755133}
.scene-bubble.disagreement,.scene-bubble.disagreement:after,.facility-bubble.disagreement{background:#fff0db;border-color:#a3614b}
.scene-bubble .bubble-typewriter,.facility-bubble .bubble-typewriter{--bubble-lines:3}
.critique-artwork{width:min(100%,10rem);max-height:min(23vh,8rem);object-fit:contain;object-position:left center;vertical-align:top;border-radius:.4rem;margin-top:.35rem}
.bubble-typewriter{display:grid}
.bubble-typewriter-text{grid-area:1/1;min-width:0;overflow-wrap:anywhere}
.bubble-typewriter-source{opacity:0;max-height:0;overflow:hidden}
.bubble-typewriter-visual{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;pointer-events:auto;max-height:calc(var(--bubble-lines,5) * 1.45em);max-height:calc(var(--bubble-lines,5) * 1lh)}
.scene-history{border-top:1px solid var(--line);padding:9px 15px 11px;color:var(--ink);background:var(--panel)}
.scene-history summary{cursor:pointer;font-size:.86rem;font-weight:700}.scene-history summary svg{width:15px;height:15px;vertical-align:middle;margin-right:5px;color:#716080}
.scene-line{display:grid;grid-template-columns:1fr auto;gap:2px 8px;width:100%;text-align:left;padding:8px 0;color:inherit;border:0;border-bottom:1px solid var(--line);background:transparent}.scene-line:last-child{border-bottom:0}.scene-line:hover .scene-words{text-decoration:underline}
.scene-who{font-size:.8rem;color:#69547a}.scene-time{font-size:.72rem;color:var(--muted)}.scene-words,.scene-empty{font-size:.83rem}.scene-words{grid-column:1/-1;line-height:1.45}.scene-empty{margin:7px 0}
@media(prefers-reduced-motion:reduce){.walker{transition:none}.walker.walking .walker-art:not(.campus-walk-art){animation:none}}

