/* The process story. Default is the still version; process.js switches to .story--live when 3D can run. */
.story { position: relative; background: #222222; color: #d9d9d9; --day: 0; }
.story__stage { display: none; }
.story__nav { display: none; }
.beat { display: grid; gap: 0; padding: 0 0 var(--reveal); scroll-margin-top: var(--header); }
.beat__still { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #2b2b2b; }
.beat__card { padding: clamp(22px, 4vw, 44px) var(--gutter) clamp(28px, 5vw, 56px); background: var(--paper); color: var(--text); }
.beat__card h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem); margin-bottom: 14px; }
.beat__card h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); margin-bottom: 10px; }
.beat__card p { margin: 0; max-width: 34em; }
.beat__card .actions { margin-top: 16px; }
.beat__card a:not(.btn) { color: var(--ink); }
.beat__card .textlink { color: var(--ink); text-decoration-color: var(--cobalt); }
.beat__card .textlink:hover { color: var(--cobalt); }
.beat__card .btn--line { border-color: var(--black); color: var(--black); }
.beat__card .btn--line:hover { background: var(--black); color: #fff; }
.beat__now { display: none; }
.beat__small { margin-top: 12px !important; font-size: 0.95rem; }
.beat[id="beat-yours"] .beat__card, .beat[id="beat-room"] .beat__card { padding-bottom: clamp(32px, 6vw, 64px); }
@media (min-width: 900px) {
  .story--static .beat { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; gap: var(--reveal); padding: 0 var(--reveal) var(--reveal); }
  .story--static .beat:first-child { padding-top: var(--reveal); }
  .story--static .beat__still { height: 100%; }
  .story--static .beat__card { display: flex; flex-direction: column; justify-content: center; }
  .story--static .beat:nth-child(even) .beat__still { order: 2; }
}

/* Live: a sticky canvas with the cards scrolling over it */
.story--live .story__stage { display: block; position: sticky; top: var(--header); height: calc(100svh - var(--header)); overflow: hidden; background: #222222; }
.story--live canvas { display: block; width: 100%; height: 100%; }
.story--live .story__beats { position: relative; z-index: 2; margin-top: calc(-1 * (100svh - var(--header))); pointer-events: none; }
.story--live .beat { display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(var(--len, 1) * (100svh - var(--header))); padding: 0 var(--reveal) 0; }
.story--live .beat__still { display: none; }
.story--live .beat__card { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); pointer-events: auto; width: 100%; max-width: 27rem; margin: 0 0 80px; padding: 20px 20px 22px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); }
.story--live .beat__card h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); }
.story--live .beat:first-child .beat__card { max-width: 36rem; }
.motion .story--live .beat__card { opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 0.35s, transform 0.45s var(--ease), visibility 0s 0.35s; }
.motion .story--live .beat.is-on .beat__card { opacity: 1; visibility: visible; transform: none; transition: opacity 0.35s, transform 0.45s var(--ease); }
.story--live .beat__card p { font-size: 1rem; }
.story--live .beat__now { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink); min-height: 2.6em; }
.story--live .beat__now b:empty::after { content: "raw panel"; font-weight: 400; color: var(--quiet); }
.story__dim { position: absolute; left: 0; top: 0; padding: 3px 8px; background: #7ccbd8; color: #000; font: 700 0.8rem/1.2 var(--body); white-space: nowrap; opacity: 0; pointer-events: none; will-change: transform; }
.story__bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, 0.14); }
.story__bar i { display: block; height: 100%; background: #7ccbd8; transform-origin: 0 50%; transform: scaleX(0); }
.story__stage.is-day .story__bar { background: rgba(0, 0, 0, 0.1); }
.story__stage.is-day .story__bar i { background: var(--cobalt); }
@media (min-width: 640px) {
  .story--live .beat { padding: 0 var(--gutter); }
  .story--live .beat__card { bottom: 40px; margin-bottom: 40px; padding: 26px 28px 28px; }
}
@media (min-width: 1100px) {
  .story--live .story__nav { display: flex; flex-direction: column; gap: 2px; position: absolute; top: 28px; right: var(--gutter); counter-reset: beat; }
  .story__nav li { counter-increment: beat; text-align: right; }
  .story__nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 30px; padding: 2px 0; font-size: 0.88rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); text-decoration: none; }
  .story__nav a::after { content: counter(beat); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1.5px solid currentColor; font-size: 0.75rem; }
  .story__nav a[aria-current] { color: #fff; }
  .story__nav a[aria-current]::after { background: #fff; color: #000; border-color: #fff; }
  .story__nav a:hover { color: #fff; }
}
/* Used when a still is being photographed: canvas only */
.capture .top, .capture .thumbbar, .capture .sheet, .capture .foot, .capture .close, .capture .story__beats, .capture .story__nav, .capture .story__bar, .capture main > :not(.story) { display: none !important; }
.capture body { padding: 0; }
.capture .story--live .story__stage { position: fixed; inset: 0; height: 100vh; top: 0; }
.story__stage.is-day .story__nav a { color: rgba(0, 0, 0, 0.5); }
.story__stage.is-day .story__nav a[aria-current], .story__stage.is-day .story__nav a:hover { color: #000; }
.story__stage.is-day .story__nav a[aria-current]::after { background: #000; color: #fff; border-color: #000; }
