/* Motion shares the original illustration canvas; no new frame or card. */
.motion-player{position:relative;min-width:0}
.hero-visual.motion-player{overflow:visible;border-radius:0}
.motion-stage{position:relative;isolation:isolate;aspect-ratio:16/9;background:var(--bg)}
.scenario-visual.motion-player .scenario-scenes{aspect-ratio:16/9}
.home-hero .motion-stage>img{display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
.motion-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;opacity:0;z-index:1;transition:opacity 320ms ease;mix-blend-mode:multiply}
.motion-video[data-motion-active="true"].is-ready{opacity:1}
.motion-stage:has(.motion-video[data-motion-active="true"].is-ready)>img,
.scenario-scenes:has(.motion-video[data-motion-active="true"].is-ready)>.scenario-frame{opacity:0}
.motion-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 12px;background:transparent;border:1px solid transparent;border-radius:999px;color:var(--muted);font:inherit;font-size:12px;font-weight:600;line-height:1.4;white-space:nowrap;cursor:pointer;transition:background-color 180ms ease,color 180ms ease}
.motion-toggle[hidden]{display:none}
.motion-toggle:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.motion-toggle:active{transform:scale(.98)}
.motion-mark{position:relative;display:block;width:14px;height:14px;flex:0 0 14px}
.motion-mark::before{content:"";position:absolute;left:4px;top:2px;width:0;height:0;border-left:8px solid currentColor;border-top:5px solid transparent;border-bottom:5px solid transparent}
.motion-toggle[data-state="playing"] .motion-mark::before,.motion-toggle[data-state="playing"] .motion-mark::after{content:"";position:absolute;top:2px;width:2px;height:10px;border:0;border-radius:1px;background:currentColor}
.motion-toggle[data-state="playing"] .motion-mark::before{left:3px}
.motion-toggle[data-state="playing"] .motion-mark::after{right:3px}
.motion-toggle[data-state="replay"] .motion-mark::before{left:1px;top:1px;width:11px;height:11px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;transform:rotate(-35deg)}
.motion-toggle[data-state="replay"] .motion-mark::after{content:"";position:absolute;right:0;top:1px;width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(10deg)}
.hero-visual>.motion-toggle{position:absolute;right:0;bottom:0;z-index:2}
.scenario-visual.motion-player .scene-caption{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.scenario-visual.motion-player #scene-caption{flex:1 1 120px;min-width:0}
.scenario-visual.motion-player .scene-caption>.motion-toggle{margin-left:auto;flex:0 0 auto}
[data-theme="dark"] .motion-video{mix-blend-mode:normal}
@media(hover:hover) and (pointer:fine){.motion-toggle:hover{color:var(--accent-ink);background:var(--brand-soft)}}
@media(max-width:640px){.hero-visual>.motion-toggle{bottom:-8px}.scenario-visual.motion-player .scene-caption{gap:4px 8px}.motion-toggle{padding-inline:8px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.motion-video,.motion-toggle{transition:none}.motion-toggle:active{transform:none}}
@media print{.motion-video,.motion-toggle{display:none!important}.motion-stage>img,.scenario-scenes>.scenario-frame.is-active{opacity:1!important}}

/* Feather only the outer canvas edge, keeping the illustrated objects intact. */
.motion-stage>img,.motion-video,.scenario-visual.motion-player .scenario-frame{mask-image:linear-gradient(to right,transparent,#000 3%,#000 97%,transparent),linear-gradient(to bottom,transparent,#000 3%,#000 97%,transparent);mask-composite:intersect}
.motion-stage>img,.motion-stage>.motion-video{mix-blend-mode:darken}
