/* Dedicated headroom keeps every speech bubble inside the character row. */
.hut-stage{--hut-width:min(90px,24cqw);--hut-height:calc(var(--hut-width) * 145 / 90);--hut-headroom:80px;position:relative;z-index:1;margin:12px 0 calc(-14px - var(--hut-width) * 9 / 90);height:calc(var(--hut-height) + var(--hut-headroom) + 14px);flex:none;min-width:0;isolation:isolate;overflow:clip}
.hut-track{position:absolute;inset:0;overflow:hidden;overflow:clip;pointer-events:none}
.hut-actor{position:absolute;left:0;bottom:0;width:var(--hut-width);height:calc(var(--hut-height) + 14px);border:0;background:none;padding:0;will-change:transform;pointer-events:none}
.hut-actor{pointer-events:auto;touch-action:manipulation;cursor:pointer}
.hut-actor:hover{background:none}
.hut-actor:focus-visible{outline:2px solid var(--green);outline-offset:-2px;border-radius:8px}
.hut-facing,.hut-pose,.hut-actor .hero-character{display:block;width:100%;height:var(--hut-height)}
.hut-facing{transform:scaleX(var(--hut-facing,1))}
.hut-actor .hero-character{background-size:calc(var(--hut-width) * 9.41) calc(var(--hut-width) * 16.72);background-position:calc(var(--hut-width) * -.2) calc(var(--hut-width) * -8.9)}
.hut-actor .hero-character.lady{background-position:calc(var(--hut-width) * -1.76) calc(var(--hut-width) * -8.9)}
.hut-name{display:block;visibility:hidden;height:14px;line-height:14px;font-size:10px;white-space:nowrap;text-align:center;color:#687168}
.hut-stage[data-tapped-name="lord"] [data-hut-actor="lord"] .hut-name,.hut-stage[data-tapped-name="lady"] [data-hut-actor="lady"] .hut-name{visibility:visible}
.hut-stage[data-phase="talk"] .hut-name{visibility:hidden}
.hut-actor.is-speaking .hut-name{color:var(--ink);font-weight:600}
.hut-actor.is-walking .hut-pose{animation:hut-step .46s ease-in-out infinite}
.hut-speech{position:absolute;z-index:1;width:max-content;max-width:min(15em,calc(100% - 16px));margin:0;padding:10px 14px;border:1px solid #c8cfc6;border-radius:14px;background:#fffefa;color:var(--ink);font-size:14px;line-height:1.65;line-break:strict;text-wrap:balance;overflow-wrap:anywhere;box-shadow:0 3px 10px #26332c09;pointer-events:none}
.hut-speech::after{content:"";position:absolute;left:var(--tail-x,50%);bottom:-6px;width:10px;height:10px;background:#fffefa;border:solid #c8cfc6;border-width:0 1px 1px 0;transform:translateX(-50%) rotate(45deg)}
@keyframes hut-step{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@media(max-width:900px){.hut-stage{--hut-width:min(75px,24cqw)}}
@media(max-width:700px){.hut-stage{--hut-width:min(52px,24cqw)}.hut-speech{font-size:12px;line-height:1.55;padding:8px;border-radius:12px}.hut-name{font-size:9px}}
@media(prefers-reduced-motion:reduce){.hut-actor *{animation:none!important}}

@media(min-width:450px) and (max-width:700px){.hut-stage{--hut-headroom:68px}}
@media(max-width:449px){.hut-stage{--hut-headroom:92px}}
/* Keep speech clear of the copy after its 40px downward move. */
.hut-speech{max-width:calc(100% - 16px);padding:5px 9px;line-height:1.4}
@media(max-width:700px){.hut-speech{padding:5px;line-height:1.4}}
@media(min-width:450px) and (max-width:700px){.hut-speech{font-size:11px}}
.hut-speech{border-radius:9px}
