/* One readable scene: the existing hands retain their shape; only the thread flexes. */
.thread-scene{transform:none!important;aspect-ratio:2172/500;will-change:auto}
.thread-fallback{position:absolute;left:0;top:-22.4%;width:100%;max-width:none;height:auto}
.thread-story-svg,.thread-story-controls{display:none}
.thread-enhanced .thread-fallback{display:none}
.thread-enhanced .thread-story-svg{display:block;position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.thread-enhanced .connection-visual{aspect-ratio:auto;padding-block:0;animation:none;translate:none;scale:1;rotate:0deg}
.thread-enhanced .connection-pin{grid-template-rows:auto auto auto auto;gap:clamp(.75rem,1.8vh,1.25rem)}
.thread-enhanced .thread-story-controls{display:block;width:min(100%,700px);justify-self:center;padding-top:.25rem}
.thread-chapters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid #555;position:relative}
.thread-chapters:after{content:'';position:absolute;left:0;right:0;bottom:-2px;height:3px;background:var(--red);transform:scaleX(var(--thread-progress,0));transform-origin:left;pointer-events:none}
.thread-chapters button{background:transparent;color:var(--paper);border:0;padding:.7rem .5rem;min-height:48px;cursor:pointer;font:1.2rem/1.2 Anton,sans-serif;text-align:left}
.thread-chapters button span{font:600 .7rem/1.2 Inter,sans-serif;color:#aaa;margin-right:.6rem}
.thread-chapters button[aria-pressed=true]{background:var(--red);color:var(--paper)}
.thread-chapters button[aria-pressed=true] span{color:inherit}
.thread-story-bottom{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:1rem;min-height:70px}
.thread-story-caption{font:400 .9rem/1.5 Inter,sans-serif;max-width:42ch;margin:0;min-height:2.7rem}
.thread-replay{flex-shrink:0;background:transparent;border:1px solid #aaa;color:var(--paper);font:600 .8rem/1.4 Inter,sans-serif;padding:.6rem .8rem;min-height:44px;cursor:pointer;border-radius:24px}
.thread-replay:hover{background:var(--paper);color:var(--ink)}
:is(.thread-replay,.thread-chapters button):focus-visible{outline:3px solid var(--paper);outline-offset:3px}
:is(.thread-replay,.thread-chapters button):disabled{cursor:default}
.thread-replay:disabled{opacity:.65}
.thread-sparks{opacity:0}
.thread-enhanced.is-complete .thread-sparks{opacity:1}
.thread-enhanced.is-complete .thread-spark{animation:threadConnection .8s cubic-bezier(.2,.8,.3,1) both}
.thread-enhanced.is-complete .thread-spark-two{animation-delay:.08s}
.thread-enhanced.is-complete .thread-spark-three{animation-delay:.16s}
@keyframes threadConnection{0%{opacity:0;transform:translateY(14px)}45%{opacity:1;transform:translateY(-24px)}72%{transform:translateY(5px)}100%{opacity:1;transform:none}}
@media(min-width:901px) and (min-height:760px) and (max-aspect-ratio:2/1){.connection.thread-enhanced{min-height:190svh}}
@media(max-width:900px){.thread-enhanced .connection-visual{padding-block:1.5rem}.thread-enhanced .connection-pin{gap:1.25rem}.thread-story-caption{font-size:.85rem}.thread-chapters button{font-size:1.05rem}}
@media(max-width:600px){.thread-story-bottom{flex-direction:column;align-items:stretch;gap:.6rem}.thread-story-caption{text-align:center;max-width:none;min-height:2.8rem}.thread-replay{align-self:center}.thread-chapters button{font-size:clamp(.8rem,3.5vw,1.1rem);padding:.75rem .35rem}.thread-chapters button span{display:block;margin:0 0 .3rem}.thread-enhanced .connection-pin{padding-block:2rem}}
.motion-paused .thread-spark{animation:none!important;transform:none!important}
@media(prefers-reduced-motion:reduce){.thread-spark{animation:none!important;transform:none!important}}
