/* TeeBox story: a close at a bank or an insurer, told in seven steps */
@layer sections {
  .story { position: relative; }
  :root { --sheet: clamp(24px, 3.2vw, 56px); }
  /* one pinned screen: the film is driven by steps, and the page sheet waits just below the fold */
  .story.is-live { height: calc(100svh + var(--sheet)); }
  .story-sticky { position: relative; }
  .story.is-live .story-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #E6F0FF; }
  /* Stage: each layer is a separate element that is only moved, scaled or faded (no repaint during a move) */
  .story-stage { position: absolute; inset: 0; overflow: hidden; contain: strict; transition: opacity .3s ease; }
  .story-stage .sky, .story-stage .night { position: absolute; inset: 0; pointer-events: none; }
  .story-stage .night { background: #0A0C2A; opacity: 0; visibility: hidden; }
  .story-stage .lyr { position: absolute; left: 0; top: 0; overflow: hidden; contain: strict; transform-origin: 0 0; will-change: transform; pointer-events: none; -webkit-user-select: none; user-select: none; }
  .story-stage .lyr > svg, .story-stage .lyr > canvas { display: block; width: 100%; height: 100%; max-width: none; }
  .story-stage .lyr-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
  .story-stage .sun, .story-stage .moon { position: absolute; left: 0; top: 0; border-radius: 50%; visibility: hidden; will-change: transform; pointer-events: none; }
  .story-stage .sun { width: 340px; height: 340px; background: radial-gradient(circle, #FFF4C8 0, #FFC56B 55%, rgba(255,159,90,0) 100%); }
  .story-stage .moon { width: 140px; height: 140px; background: radial-gradient(circle at 34% 41%, #E3DFF5 0 12px, transparent 13px), radial-gradient(circle at 64% 63%, #E3DFF5 0 9px, transparent 10px), #F6F3FF; }
  .story-stage .fgp { position: absolute; left: 0; top: 0; width: 100px; height: 100%; visibility: hidden; pointer-events: none; will-change: transform, opacity;
    background: linear-gradient(90deg, rgba(21,23,44,0), #15172C 30%, #15172C 70%, rgba(21,23,44,0)); }
  .story-stage.is-narrow :is(#b3, #b3i, #b4, #b4i, #b5, #rc0, #rc1, #rc2) { display: none; }
  .story.is-live .story-sticky::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: radial-gradient(ellipse 120% 90% at 55% 50%, transparent 58%, rgba(18,20,39,.28) 100%); }

  /* SVG art */
  .story-stage .ol { stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
  .story-stage text { font-family: var(--body); text-rendering: geometricPrecision; }
  :where(.story-stage text:not([fill])) { fill: var(--ink); }
  .story-stage .st-d { font-family: var(--display); font-weight: 760; letter-spacing: -.02em; }
  .story-stage .st-m { font-family: var(--mono); font-weight: 500; letter-spacing: .06em; }
  .story-stage .st-b { font-weight: 600; }
  .story-stage .st-w { fill: #fff; font-size: 17px; }
  .story-stage .st-xl { font-size: 64px; }
  .story-stage .st-l { font-size: 40px; }
  .story-stage .st-s { font-size: 26px; }
  .story-stage .st-sign { fill: #fff; font-size: 17px; }
  .story-stage .st-tiny { font-size: 14px; }
  .story-stage .st-ind { fill: var(--lime); font-size: 20px; }
  .story-stage .st-bub { font-size: 25px; }
  .story-stage .st-badge { font-size: 18px; }
  .story-stage .st-agent { fill: var(--lime); font-size: 17px; }
  .story-stage .st-gantt { font-size: 18px; fill: var(--ink-2); }
  .story-stage .st-poster { fill: #fff; font-size: 15px; }
  .story-stage .st-bank { font-size: 52px; letter-spacing: .12em; }
  .story-stage .st-bankout { font-size: 32px; letter-spacing: .14em; }
  .story-stage .st-roofsign { font-size: 60px; letter-spacing: .18em; }
  .story-stage .st-signed { font-size: 20px; letter-spacing: .14em; }
  .story-stage .st-doc { font-size: 14px; letter-spacing: .1em; }
  .story-stage .st-stamp { font-size: 24px; letter-spacing: .16em; }
  .story-stage .tk { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .story-stage .ui-tick .tk { stroke-dashoffset: 0; }
  .story-stage .ui-tick { transition: opacity .35s ease; }

  /* idle life */
  .story-stage .eyes { animation: blinkOff 5.2s infinite; }
  .story-stage .lids { visibility: hidden; animation: blinkOn 5.2s infinite; }
  .story-stage .idle { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 4.6s ease-in-out infinite; }
  .story-stage .type-a, .story-stage .type-b { animation: typing .34s ease-in-out infinite alternate; }
  .story-stage .type-b { animation-delay: .17s; }
  .story-stage .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite; }
  .story-stage .steam path { animation: steam 2.6s ease-in-out infinite; }
  .story-stage .steam path + path { animation-delay: 1.1s; }
  .story-stage .led { animation: led 1.4s steps(2) infinite; }
  .story-stage .beacon { animation: led 1.8s steps(2) infinite; }
  .story-stage .pulse { animation: pulseLine 1s ease-in-out infinite; }
  .story-stage .point { transform-box: fill-box; animation: point 3.2s ease-in-out infinite; }
  .story-stage .point-r { transform-origin: 0% 100%; }
  .story-stage .point-l { transform-origin: 100% 100%; }
  .story-stage .doc-bob { animation: docbob 3.4s ease-in-out infinite; }
  .story-stage .sign-hand g:last-child { animation: scribble .5s ease-in-out infinite alternate; }
  .story-stage .bubble { transform-box: fill-box; opacity: 0; transform: scale(.6) translateY(10px); transition: opacity .3s ease, transform .55s var(--spring); }
  .story-stage .bubble-left { transform-origin: 12% 100%; }
  .story-stage .bubble-right { transform-origin: 88% 100%; }
  .story-stage .bubble.on { opacity: 1; transform: none; }
  .story.paused .story-stage * { animation-play-state: paused !important; }

  @keyframes blinkOff { 0%, 93.9% { visibility: visible; } 94%, 96.6% { visibility: hidden; } 96.7%, 100% { visibility: visible; } }
  @keyframes blinkOn { 0%, 93.9% { visibility: hidden; } 94%, 96.6% { visibility: visible; } 96.7%, 100% { visibility: hidden; } }
  @keyframes breathe { 50% { transform: translateY(-3px) rotate(.6deg); } }
  @keyframes typing { to { transform: translateY(-7px); } }
  @keyframes sway { 50% { transform: rotate(2.5deg); } }
  @keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-14px); } }
  @keyframes led { 50% { opacity: .25; } }
  @keyframes pulseLine { 50% { opacity: .35; } }
  @keyframes point { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-6deg); } }
  @keyframes docbob { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
  @keyframes scribble { to { transform: translate(8px, -2px); } }

  /* captions */
  .story-ui { position: relative; z-index: 3; }
  .story.is-live .story-ui { position: absolute; inset: 0; pointer-events: none; }
  .scap { pointer-events: auto; overscroll-behavior: contain; }
  .story:not(.is-live) .story-ui { padding: 110px var(--gutter) 40px; display: grid; gap: 18px; max-width: 900px; }
  .story:not(.is-live) :is(.story-rail, .story-skip, .story-nav, .story-hint, .scap-replay) { display: none; }
  .story.is-live .scap { position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); top: 50%; width: min(460px, 36vw);
    opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 26px)); transition: opacity .5s ease, transform .7s var(--ease-out), visibility 0s linear .7s; }
  .story.is-live .scap.is-on { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity .5s ease .1s, transform .8s var(--ease-out) .1s, visibility 0s; }
  .story.is-booting .scap, .story.is-booting .scap.is-on { transition: none; }
  .scap { padding: 26px 28px 24px; border-radius: 22px; background: color-mix(in oklab, var(--surface) 96%, transparent);
    box-shadow: 0 0 0 1px rgba(29,32,51,.07), 0 30px 70px -30px rgba(29,32,51,.55); }
  .scap-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
  .scap-time { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; background: var(--ink); color: #fff; font: 500 12.5px/1 var(--mono); letter-spacing: .04em; }
  .scap-time::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
  .scap-role { font: 500 12.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
  .scap h3 { font-size: clamp(26px, calc(1vw + 18px), 38px); line-height: 1.06; font-weight: 760; letter-spacing: -.028em; }
  .scap .tb { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
  .scap .tb svg { width: 22px; height: 22px; margin-top: 1px; }
  .scap .tb b { color: var(--ink); font-weight: 600; }
  .scap .btn { margin-top: 18px; }

  .scap-hero { width: min(600px, 44vw) !important; padding: 34px 34px 30px; }
  .scap-hero h1 { font-size: clamp(38px, calc(2vw + 22px), 68px); margin: 16px 0 16px; }
  .scap-hero .lede { font-size: clamp(17px, calc(.3vw + 14px), 20px); margin-bottom: 24px; }
  .scap-hero .cta-row .btn { margin-top: 0; }
  .scroll-cue { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; font: 500 12.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
  .scroll-cue i { position: relative; width: 22px; height: 34px; border: 2px solid var(--ink); border-radius: 12px; }
  .scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: cue 1.6s var(--ease-in-out) infinite; }
  @keyframes cue { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }

  /* close timeline */
  .story-rail { position: absolute; top: 92px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border-radius: 999px; pointer-events: auto;
    background: color-mix(in oklab, var(--surface) 95%, transparent); box-shadow: 0 0 0 1px rgba(29,32,51,.07), 0 16px 34px -18px rgba(29,32,51,.45);
    transition: opacity .5s ease, transform .6s var(--spring); }
  .story.at-start .story-rail { opacity: 0; transform: translate(-50%, -12px); pointer-events: none; visibility: hidden; transition: opacity .5s ease, transform .6s var(--spring), visibility 0s linear .5s; }
  .story-rail li { display: flex; }
  .story-rail button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; font: 500 12.5px/1 var(--mono); color: var(--ink-3); white-space: nowrap;
    -webkit-tap-highlight-color: transparent; transition: background-color .35s ease, color .35s ease; }
  .story-rail button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color .35s ease, border-color .35s ease; }
  .story-rail button.is-done { color: var(--ink-2); }
  .story-rail button.is-done::before { background: var(--lime); border-color: #8FCB00; }
  .story-rail button:hover:not(.is-on) { background: rgba(29,32,51,.07); color: var(--ink); }
  .story-rail button.is-on { background: var(--ink); color: #fff; }
  .story-rail button.is-on::before { background: var(--lime); border-color: var(--lime); }
  .story-rail button:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

  /* step controls: always in the same place, so Next can be pressed without looking for it */
  .story-nav { position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); bottom: 28px; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; pointer-events: auto;
    background: color-mix(in oklab, var(--surface) 96%, transparent); box-shadow: 0 0 0 1px rgba(29,32,51,.07), 0 18px 40px -18px rgba(29,32,51,.5);
    transition: opacity .45s ease .25s, transform .7s var(--spring) .25s, visibility 0s; }
  .story.at-start .story-nav { opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .25s ease, transform .3s ease, visibility 0s linear .3s; }
  .sn-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 48px; border-radius: 999px; font: 600 15.5px/1 var(--body); white-space: nowrap;
    -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; transition: background-color .2s ease, transform .45s var(--spring); }
  .sn-btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
  .sn-btn:active { transform: scale(.96); }
  .sn-prev { width: 48px; color: var(--ink); font-size: 19px; }
  .sn-prev:hover { background: rgba(29,32,51,.08); }
  .sn-count { min-width: 56px; text-align: center; font: 500 12.5px/1 var(--mono); letter-spacing: .06em; color: var(--ink-3); -webkit-user-select: none; user-select: none; }
  .sn-count b { font-weight: 500; color: var(--ink); }
  .sn-next { padding: 0 11px 0 24px; background: var(--ink); color: #fff; }
  .sn-next:hover { background: var(--night); }
  .sn-arrow { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1; }
  .story.is-rest .sn-arrow { animation: nudge 1.9s var(--ease-in-out) infinite; }
  .story.is-rest.is-last .sn-arrow { animation-name: nudgeDown; }
  @keyframes nudge { 0%, 55%, 100% { transform: none; } 28% { transform: translateX(5px); } }
  @keyframes nudgeDown { 0%, 55%, 100% { transform: none; } 28% { transform: translateY(4px); } }

  /* how to move, shown once on the opening screen */
  .story-hint { position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); bottom: 32px; margin: 0; display: inline-flex; align-items: center; gap: 12px; padding: 9px 16px 9px 12px; border-radius: 999px;
    background: color-mix(in oklab, var(--night) 90%, transparent); color: #fff; font: 500 12.5px/1 var(--mono); letter-spacing: .04em; transition: opacity .35s ease, transform .5s var(--spring); }
  .story-hint i { position: relative; width: 16px; height: 25px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 9px; }
  .story-hint i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 5px; margin-left: -1.5px; border-radius: 2px; background: var(--lime); animation: cue 1.6s var(--ease-in-out) infinite; }
  .story-hint kbd { display: inline-block; padding: 3px 6px; border-radius: 5px; border: 1px solid rgba(255,255,255,.45); font: inherit; }
  .story.has-begun .story-hint, .story:not(.at-start) .story-hint { opacity: 0; transform: translateY(10px); }

  /* last step: demo, or watch the other close */
  .scap-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
  .scap .scap-end .btn { margin-top: 0; }
  .scap-replay { all: unset; cursor: pointer; font: 600 15px/1.2 var(--body); color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
  .scap-replay:hover { color: var(--violet-ink); }
  .scap-replay:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

  .story-skip { position: absolute; right: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); bottom: 28px; pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px;
    background: color-mix(in oklab, var(--night) 92%, transparent); color: #fff; font: 500 13px/1 var(--mono); text-decoration: none; transition: background-color .2s ease, transform .5s var(--spring); }
  .story.at-end .story-skip { opacity: 0; pointer-events: none; }
  .story-skip:hover { background: var(--ink); transform: translateY(-2px); }

  @media (max-aspect-ratio: 9/10), (max-width: 960px) and (max-aspect-ratio: 13/10) {
    .story.is-live .scap, .story.is-live .scap-hero { left: 12px; right: 12px; top: auto; bottom: 14px; width: auto !important; transform: translateY(26px); max-height: 48svh; overflow: auto; }
    .story.is-live .scap.is-on { transform: none; }
    .scap { padding: 18px 18px 16px; border-radius: 20px; }
    .scap h3 { font-size: 24px; }
    .scap .tb { font-size: 15px; margin-top: 10px; padding-top: 10px; }
    .scap-hero { padding: 22px 20px 18px; }
    .scap-hero h1 { font-size: 34px; margin: 10px 0; }
    .scap-hero .lede { font-size: 16px; margin-bottom: 16px; }
    .scap-hero .cta-row { gap: 8px; }
    .scap-hero .cta-row .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
    .scroll-cue { display: none; }
    .story-rail { top: 84px; max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
    .story-rail::-webkit-scrollbar { display: none; }
    .story-rail button { padding: 7px 9px; font-size: 11.5px; }
    .story-skip { top: 84px; bottom: auto; right: 12px; padding: 9px 12px; font-size: 12px; }
    .story:not(.at-start) .story-skip { top: 128px; }
    .story:not(.at-start) .story-skip span { display: none; }
    /* captions sit above the step controls */
    .story.is-live .scap:not(.scap-hero) { bottom: 78px; max-height: 44svh; }
    .story-nav { left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin-inline: auto; }
    .sn-next { flex: 1; justify-content: space-between; }
    .story-hint { display: none; }
    .scap-end { margin-top: 12px; gap: 10px 16px; }
    .scap-replay { font-size: 14px; }
    /* the opening card always shows both choices, however short the screen */
    .story.is-live .scap-hero { max-height: calc(100svh - 128px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .story.is-live .scap, .story.is-live .scap.is-on, .story-stage, .story-nav, .story-hint { transition: none; }
    .story.is-rest .sn-arrow, .story-hint i::after { animation: none; }
  }
}
@layer motion {
  .story-stage .drive { animation: drive linear infinite; }
  .story-stage .drive.rev { animation-name: driveRev; }
  @keyframes drive { from { transform: translateX(-3000px); } to { transform: translateX(13000px); } }
  @keyframes driveRev { from { transform: translateX(13000px); } to { transform: translateX(-3000px); } }
}
@layer sections {
  /* audience variants inside the drawing */
  .story-stage.mode-bank .v-ins, .story-stage.mode-ins .v-bank { display: none; }
  .story:not(.is-live) .scap[data-mode="ins"], .story:not(.is-live) .choice, .story:not(.is-live) .story-mode { display: none; }

  /* whose close: choice on the opening card */
  .choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 18px; }
  .choice-btn { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 14px 14px 12px; border-radius: 16px;
    background: var(--surface); border: 1.5px solid var(--rule); box-shadow: var(--shadow-sm); transition: border-color .2s ease, transform .5s var(--spring), box-shadow .3s ease, background-color .2s ease; }
  .choice-btn svg { width: 40px; height: 40px; }
  .choice-btn b { display: block; font: 700 18px/1.15 var(--display); letter-spacing: -.01em; color: var(--ink); }
  .choice-btn small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.3; color: var(--ink-2); }
  .choice-btn i { font-style: normal; font-weight: 700; color: var(--ink-3); transition: transform .45s var(--spring), color .2s ease; }
  .choice-btn:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
  .choice-btn:hover i { transform: translateX(4px); color: var(--ink); }
  .choice-btn[aria-pressed="true"] { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in oklab, var(--violet) 18%, transparent), var(--shadow-sm); }
  .choice-btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
  .hero-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
  .hero-links a { color: var(--ink); font-weight: 600; text-decoration-thickness: 1.5px; }
  .hero-links a:first-child { color: var(--violet-ink); }

  /* switch audience during the story */
  .story-mode { position: absolute; top: 92px; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); display: flex; gap: 2px; padding: 4px; border-radius: 999px; pointer-events: auto;
    background: color-mix(in oklab, var(--surface) 95%, transparent); box-shadow: 0 0 0 1px rgba(29,32,51,.07), 0 16px 34px -18px rgba(29,32,51,.45);
    transition: opacity .5s ease, transform .6s var(--spring); }
  .story.at-start .story-mode { opacity: 0; transform: translateY(-12px); pointer-events: none; visibility: hidden; transition: opacity .5s ease, transform .6s var(--spring), visibility 0s linear .5s; }
  .story-mode button { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 999px; font: 600 13.5px/1 var(--body); color: var(--ink-2); transition: background-color .25s ease, color .25s ease; }
  .story-mode button[aria-pressed="true"] { background: var(--violet); color: #fff; }
  .story-mode button:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
  .story.switching .story-stage { opacity: .1; transition: opacity .2s ease; }
  .story.switching .scap.is-on { opacity: 0 !important; }

  @media (max-aspect-ratio: 9/10), (max-width: 960px) and (max-aspect-ratio: 13/10) {
    .choice { gap: 8px; margin: 2px 0 12px; }
    .choice-btn { grid-template-columns: 30px 1fr; gap: 8px; padding: 10px; border-radius: 14px; }
    .choice-btn svg { width: 30px; height: 30px; }
    .choice-btn b { font-size: 15.5px; }
    .choice-btn small { font-size: 12px; }
    .choice-btn i { display: none; }
    .hero-links { font-size: 14px; }
    .story-mode { top: 128px; left: 12px; }
    .story-mode button { padding: 7px 11px; font-size: 12.5px; }
  }
}
@layer sections {
  .story-stage .st-flag { font-size: 17px; letter-spacing: .08em; }
  .story-stage .st-rec { font-size: 13px; letter-spacing: .02em; fill: #C23B4A; }
}
@layer motion {
  /* Idle life only runs in the room on screen and while the camera is still, so nothing repaints during a move */
  .story-stage :is(.eyes, .lids, .idle, .type-a, .type-b, .sway, .steam path, .led, .beacon, .pulse, .point, .doc-bob, .sign-hand g:last-child, .drive) { animation-play-state: paused; }
  .story-stage :is(.rm.live, .lyr-doc.live, .lyr-facade.live) :is(.eyes, .lids, .idle, .type-a, .type-b, .sway, .steam path, .led, .beacon, .pulse, .point, .doc-bob, .sign-hand g:last-child, .drive),
  .story-stage .lyr-facade.live .drive, .story-stage .lyr-doc.live .doc-bob { animation-play-state: running; }
}
@layer sections {
  @media (min-width: 961px) and (max-width: 1180px) and (min-aspect-ratio: 9/10) {
    .choice { grid-template-columns: minmax(0, 1fr); }
  }
}
@layer sections {
  @media (max-width: 380px), (max-width: 960px) and (max-height: 700px) {
    .scap-hero { padding: 18px 16px 16px; }
    .scap-hero h1 { font-size: 28px; margin: 8px 0; }
    .scap-hero .lede { font-size: 15px; margin-bottom: 12px; }
    .choice-btn small { display: none; }
  }
}
@layer sections {
  /* a phone held sideways: caption beside the drawing, everything a size down */
  @media (max-width: 960px) and (min-aspect-ratio: 1301/1000) {
    .story.is-live .scap { left: 12px; top: 104px; bottom: 62px; width: min(330px, 40vw); height: fit-content; max-height: calc(100svh - 166px); margin-block: auto; overflow: auto; transform: translateY(20px); }
    .story.is-live .scap.is-on { transform: none; }
    .story.is-live .scap-hero { top: 64px; bottom: 10px; width: min(400px, 47vw) !important; max-height: calc(100svh - 74px); }
    .scap { padding: 14px 16px; border-radius: 18px; }
    .scap-top { margin-bottom: 8px; gap: 6px 10px; }
    .scap-time, .scap-role { font-size: 11px; }
    .scap-time { padding: 5px 9px; }
    .scap h3 { font-size: 19px; }
    .scap .tb { margin-top: 8px; padding-top: 8px; font-size: 13.5px; line-height: 1.4; }
    .scap .btn { min-height: 38px; margin-top: 10px; padding: 0 14px; font-size: 14px; }
    .scap-end { margin-top: 10px; gap: 8px 14px; }
    .scap-replay { font-size: 13px; }
    .scap-hero { padding: 16px; }
    .scap-hero h1 { font-size: 23px; margin: 6px 0 8px; }
    .scap-hero .lede { font-size: 13.5px; margin-bottom: 10px; }
    .choice { gap: 8px; margin: 0 0 10px; }
    .choice-btn { grid-template-columns: 26px 1fr; gap: 8px; padding: 8px 10px; border-radius: 12px; }
    .choice-btn svg { width: 26px; height: 26px; }
    .choice-btn b { font-size: 14.5px; }
    .choice-btn small, .choice-btn i { display: none; }
    .hero-links { font-size: 13px; }
    .story-mode { top: 66px; left: 12px; }
    .story-mode button { padding: 6px 10px; font-size: 12px; }
    .story-rail { top: 66px; left: auto; right: 12px; transform: none; max-width: calc(100vw - 176px); overflow-x: auto; scrollbar-width: none; }
    .story-rail::-webkit-scrollbar { display: none; }
    .story.at-start .story-rail { transform: translateY(-12px); }
    .story-rail button { padding: 6px 8px; font-size: 11px; }
    .story-nav { left: 12px; bottom: 10px; padding: 4px; }
    .sn-btn { height: 40px; font-size: 14px; }
    .sn-prev { width: 40px; }
    .sn-next { padding: 0 8px 0 18px; }
    .sn-arrow { width: 24px; height: 24px; }
    .sn-count { min-width: 48px; }
    .story-hint { display: none; }
    .story-skip { right: 12px; bottom: 12px; padding: 9px 12px; font-size: 12px; }
  }
}
