/*
 * cornerhq.app: the pinned story. One phone stays beside the words while
 * the chapters scroll past, on wide screens with main.js running (it adds
 * the pin class) and motion allowed. index.html links it for those screens
 * only, so phones never wait for it; styles.css is the finished page
 * without it.
 */

/* The pinned story. Wide screens, main.js running (it adds the pin class),
   motion allowed. One phone stays; the chapters scroll past. */

@media screen and (min-width: 1024px) and (min-height: 620px) and (prefers-reduced-motion: no-preference) {
  .pin {
    --step: 21svh;
    --band-pad: clamp(2.5rem, 7svh, 5rem);
  }

  /* One size for everything on the pinned phone's screens, from its width,
     never below the text floor on a short laptop screen. */
  .pin .story .device__screen,
  .pin .flow,
  .pin .glass {
    --ui: max(11.75px, 4.6cqw);
  }

  .pin .story .device__screen {
    font-size: var(--ui);
  }

  .pin .story {
    position: relative;
    isolation: isolate;
    overflow-x: clip;
    display: grid;
    grid-template-columns: var(--grid-pin);
    grid-template-rows: repeat(5, auto);
    margin-top: calc(-1 * var(--nav-h));
  }

  .pin .chapter {
    display: contents;
  }

  /* Each chapter's words: a band of its own ground, as wide as the page.
     They come in near its top edge, hold still in the middle of the screen
     while its moments play (main.js measures them as --copy-h), then go. */
  .pin .ch {
    grid-column: full-start / full-end;
    align-self: stretch;
    position: relative;
    display: grid;
    grid-template-columns: subgrid;
    padding-block: calc(var(--band-pad) + var(--seam-t, 0px))
      calc(var(--band-pad) + var(--seam-b, 0px));
    min-height: calc(
      var(--copy-h, 60svh) + var(--hold, 0px) + 2 * var(--band-pad) +
        var(--seam-t, 0px) + var(--seam-b, 0px)
    );
    background: var(--band);
    color: var(--band-text);
  }

  .pin .ch--hero > .ch {
    grid-row: 1;
    min-height: 100svh;
    padding-block: var(--nav-h) 0;
    background:
      radial-gradient(
        ellipse 55% 45% at 18% 0%,
        rgb(var(--paper-rgb) / 0.06),
        transparent 70%
      ),
      var(--bg);
  }

  .pin .ch--morning > .ch {
    grid-row: 2;
    --hold: calc(var(--step) * 2);
  }

  .pin .ch--day > .ch {
    grid-row: 3;
    --hold: calc(var(--step) * 5);
  }

  .pin .ch--reply > .ch {
    grid-row: 4;
    --hold: calc(var(--step) * 2.6);
  }

  .pin .ch--fight > .ch {
    position: relative;
    top: auto;
    grid-row: 5;
    --hold: calc(var(--step) * 7);
  }

  /* The seams, as in the stacked page: Thursday and the evening each lie
     over the band before with the C's corner, and fight week runs on under
     the evening's rounded foot. */
  .pin .ch--morning > .ch {
    --seam-b: var(--seam);
  }

  .pin .ch--day > .ch {
    --seam-b: var(--seam);
    margin-top: calc(-1 * var(--seam));
    border-radius: 0 var(--seam) 0 0;
  }

  .pin .ch--reply > .ch {
    z-index: 1;
    margin-top: calc(-1 * var(--seam));
    border-radius: 0 var(--seam) var(--seam) 0;
  }

  .pin .ch--fight > .ch {
    --seam-t: var(--seam);
    margin-top: calc(-1 * var(--seam));
  }

  /* The athletes' Paper lies over the story's foot, so the story ends a
     seam below its last band, in fight week's dark. */
  .pin .story {
    padding-bottom: var(--seam);
    background: var(--night);
  }

  .pin .ch__copy {
    grid-column: copy;
    position: sticky;
    z-index: 1;
    top: calc(
      var(--nav-h) +
        max(1.5rem, (100svh - var(--nav-h) - var(--copy-h, 60svh)) / 2)
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .pin .ch--hero .ch__copy {
    position: relative;
    top: auto;
    min-height: calc(100svh - var(--nav-h));
    justify-content: center;
    padding-block: var(--pin-y) var(--pin-rest);
  }

  /* The phones: every chapter's screen in one place, pinned, the later
     ones on top. Only the hero's phone keeps its titanium; the others are
     screens laid exactly over its glass. */
  .pin .shot,
  .pin .halo,
  .pin .glass {
    grid-column: stage;
    grid-row: 1 / span 5;
    position: sticky;
    top: calc(var(--nav-h) + var(--pin-y));
    align-self: start;
    justify-self: center;
    margin: calc(var(--nav-h) + var(--pin-y)) 0 0;
    width: var(--dw-pin);
    transform-origin: 50% 0;
    translate: var(--stage-x, 0px) var(--stage-y, 0px);
    scale: var(--stage-s, 1);
    transition:
      translate 0.9s var(--ease-io),
      scale 0.9s var(--ease-io);
  }

  /* The phone moves with the story, so no two chapters stand alike. Before
     sunrise it comes closer, cut by the foot of the screen. In the evening
     it crosses to the left of the words (main.js measures how far, as
     --swing) and stays there through fight week. On fight night it steps
     forward, toward the middle (--climax-*, also measured). */
  .pin .story[data-scene="1"] {
    --stage-s: 1.24;
  }

  .pin .story.is-left {
    --stage-x: var(--swing, 0px);
  }

  .pin .story.is-climax {
    --stage-x: var(--climax-x, 0px);
    --stage-y: var(--climax-y, 0px);
    --stage-s: var(--climax-s, 1);
  }

  .pin .story.is-climax .shot,
  .pin .story.is-climax .halo,
  .pin .story.is-climax .glass {
    transition-duration: 0.6s;
    transition-timing-function: var(--ease-out);
  }

  /* The evening's and fight week's words stand where the phone stood, to
     its right. */
  .pin .ch--reply .ch__copy,
  .pin .ch--fight .ch__copy {
    grid-column: copy-start / stage-end;
    margin-left: calc(var(--dw-pin) + 4rem + var(--col-gap));
  }

  /* The phone never crosses words: Thursday's go at once as the evening
     comes in and the phone crosses to the left, and the words to its right
     show only once it has crossed (and the same, the other way, going
     back up). */
  .pin .story .ch__copy {
    transition:
      opacity 0.45s ease,
      transform 0.8s var(--ease-out);
  }

  .pin .story.is-left .ch--reply .ch__copy,
  .pin .story.is-left .ch--fight .ch__copy,
  .pin .story:not(.is-left) .ch--day .ch__copy {
    transition-delay: 0.55s, 0s;
  }

  .pin .story.is-left .ch--day .ch__copy,
  .pin .story:not(.is-left) .ch--reply .ch__copy,
  .pin .story:not(.is-left) .ch--fight .ch__copy {
    opacity: 0;
    transition-duration: 0.18s, 0.8s;
  }

  /* Every screen the same height, so they all stop together at the end. */
  .pin .shot {
    --dw: var(--dw-pin);
    z-index: 2;
    height: var(--ph);
    pointer-events: none;
  }

  .pin .shot__cap {
    position: absolute;
    margin: 0;
  }

  /* A long jump (a link, the Home key) lands without playing everything
     in between. */
  .pin .story.is-jump *,
  .pin .story.is-jump *::before,
  .pin .story.is-jump *::after {
    transition: none !important;
  }

  /* The notifications sit under the time, in the dawn's light. */
  .pin .shot--lock .lock__notes {
    top: 16.4em;
  }

  .pin .shot.is-active,
  .pin .shot--hero {
    pointer-events: auto;
  }

  .pin .shot--hero::before {
    display: none;
  }

  .pin .shot:not(.shot--hero) .device__body,
  .pin .shot:not(.shot--hero) .device__bezel {
    background: none;
    box-shadow: none;
  }

  .pin .shot:not(.shot--hero) .device__key,
  .pin .shot:not(.shot--hero) .device::after,
  .pin .shot:not(.shot--hero) .device__body::before,
  .pin .shot:not(.shot--hero) .device__body::after,
  .pin .shot .device__island,
  .pin .shot .device__home,
  .pin .shot .device__screen::after {
    display: none;
  }

  .pin .shot--lock {
    height: auto;
    overflow: visible;
    padding: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .pin .shot__note {
    display: none;
  }

  .pin .shot--hero .shot__hint {
    transition: opacity 0.4s ease;
  }

  .pin .shot--hero:not(.is-active) .shot__hint {
    opacity: 0;
  }

  /* The phone's frame catches the light of each chapter's ground: red in
     the dark and on Red, a neutral highlight in Thursday's daylight. */
  .pin .story[data-scene="2"] .shot--hero .device__body::before {
    opacity: 0;
  }

  .pin .story[data-scene="2"] .shot--hero .device__body::after {
    opacity: 1;
  }

  /* A screen arrives when its chapter does, each change its own move, and
     the phone is never off: the status bar, Kai's name and the reply box
     are the same on every chat screen, so only the clock and the messages
     change. Nothing fades through grey. */
  .pin .shot:not(.shot--hero) .device__screen,
  .pin .shot--flow .flow__screen {
    opacity: 0;
  }

  .pin .shot.is-shown .device__screen,
  .pin .shot.is-shown .flow__screen {
    opacity: 1;
  }

  /* The lock screen pulls down over the chat, as on an iPhone: its top
     edge comes first, the dawn and the time, sliding a little as it
     comes, with the chat still there below it until it is covered. */
  .pin .shot--lock .device__bezel {
    clip-path: inset(2.4cqw round 12.1cqw);
  }

  .pin .shot.shot--lock:not(.shot--hero) .device__screen {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 12.1cqw);
    transition:
      clip-path 0.5s var(--ease-io),
      transform 0.5s var(--ease-out),
      visibility 0s linear;
  }

  .pin .shot.shot--lock:not(.is-shown) .device__screen {
    clip-path: inset(0 0 100% 0 round 12.1cqw);
    transform: translateY(-6%);
  }

  /* Opening the notification unlocks the phone: the chat grows out of the
     notification over the lock screen, which goes only once the chat
     covers it. Back up, the lock screen is there at once as it shrinks. */
  .pin
    .story:is([data-scene="2"], [data-scene="3"], [data-scene="4"])
    .shot--lock
    .device__screen {
    visibility: hidden;
    transition:
      clip-path 0.5s var(--ease-io),
      transform 0.5s var(--ease-out),
      visibility 0s linear 0.65s;
  }

  .pin
    .story:is([data-scene="2"], [data-scene="3"], [data-scene="4"])
    .shot--hero
    .app {
    visibility: hidden;
  }

  .pin .shot--day .flow__screen {
    clip-path: inset(0 round 12.1cqw);
    transition:
      clip-path 0.6s var(--ease-out),
      opacity 0s linear;
  }

  .pin .shot--day:not(.is-shown) .flow__screen {
    clip-path: inset(56.5% 0.65em 34% 0.65em round 0.25em 1.3em 1.3em 1.3em);
    transition:
      clip-path 0.4s var(--ease-io),
      opacity 0s linear 0.4s;
  }

  /* The evening is the same chat, later: the day's chat scrolls on until
     the car and the voice note stand under the header, the lunchtime poll
     gone up above it, and the evening takes over exactly there; then his
     question comes in below. */
  .pin .shot.shot--reply:not(.shot--hero) .device__screen {
    transition: opacity 0s linear;
  }

  .pin .shot.shot--reply.is-shown:not(.shot--hero) .device__screen {
    transition-delay: 0.6s;
  }

  /* Fight week starts in the dark: the messages dip to black and come back
     on a new week, under the same bar, name and reply box. */
  .pin .shot--fight .flow__screen {
    transition: opacity 0s linear 0.38s;
  }

  .glass__dip {
    position: absolute;
    left: 0;
    right: 0;
    top: 6.95em;
    bottom: 5.42em;
    background: color-mix(in srgb, var(--ink) 55%, black);
    opacity: 0;
  }

  .pin .story.is-dip .glass__dip {
    animation: dip 1s linear both;
  }

  /* The day's and fight week's chats, inside the phone. */
  .pin .flow {
    position: relative;
    width: var(--dw-pin);
    aspect-ratio: 393 / 852;
    container-type: inline-size;
  }

  .pin .flow__frame {
    position: absolute;
    inset: 0;
    padding: 3.55cqw;
  }

  .pin .flow__screen {
    position: relative;
    height: 100%;
    overflow: hidden;
    overflow: clip;
    isolation: isolate;
    border-radius: 12.1cqw;
    background:
      radial-gradient(
        120% 60% at 50% 0%,
        rgb(var(--paper-rgb) / 0.035),
        transparent 70%
      ),
      var(--ink);
    color: var(--paper);
    font-size: var(--ui);
    line-height: 1.3;
    letter-spacing: -0.005em;
    user-select: none;
  }

  /* Fight week's chat: Kai's darkest background, a low red glow. */
  .pin .flow__screen--night {
    background:
      radial-gradient(
        120% 42% at 50% 104%,
        rgb(var(--red-rgb) / 0.3),
        transparent 72%
      ),
      color-mix(in srgb, var(--ink) 55%, black);
  }

  .pin .flow .sb {
    display: grid;
  }

  .pin .flow__head,
  .pin .flow__reply {
    display: flex;
  }

  .pin .flow__body {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 5.45em;
    overflow: hidden;
    overflow: clip;
    scroll-snap-type: none;
    -webkit-mask-image: linear-gradient(
      180deg,
      transparent 6.9em,
      #000 calc(6.9em + 1.6em)
    );
    mask-image: linear-gradient(
      180deg,
      transparent 6.9em,
      #000 calc(6.9em + 1.6em)
    );
  }

  .pin .moments,
  .pin .ch--day .moments,
  .pin .moments--rail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0 0.75em 0.85em;
    transition: transform 0.6s var(--ease-out);
  }

  .pin .moments--rail::before {
    display: none;
  }

  .pin .moments__context,
  .pin .moment,
  .pin .ch--day .moment__chat {
    display: block;
  }

  .pin .moment__before {
    display: none;
  }

  .pin .day--chat {
    display: flex;
  }

  .pin .moment__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .pin .moment__chat,
  .pin .moment--night .moment__chat {
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: inherit;
    color: inherit;
  }

  .pin .moment__chat > .msg.run:first-child,
  .pin .moment__chat > div:first-child > .msg.run:first-child {
    margin-top: 0.75em;
  }

  .pin .moment__chat .bubble {
    max-width: 86%;
  }

  .pin .moment__chat .bubble--wide,
  .pin .moment__chat .bubble--voice {
    max-width: 88%;
  }

  .pin .moment__chat .photo {
    width: 15.5em;
    max-width: 86%;
  }

  .pin .moment__chat .photo--gym {
    width: 12.6em;
  }

  .pin .ch--day .moment__chat .photo--gym img {
    aspect-ratio: 4 / 5;
  }

  .pin .ch--day .moment__chat .bubble__time {
    display: block;
  }

  .pin .moment__later {
    margin-top: 0;
  }

  /* Fight night, inside the phone: its messages stand on a card of their
     own, the last card, edged in red. When his thank-you arrives the card
     lights, the week before it steps back into the dark, and the bubble is
     lifted with one red ring and a soft red glow (still). Then your heart,
     then, a beat later, your answer. */
  .pin .moment--night .moment__chat {
    position: relative;
    isolation: isolate;
    margin: 0.4em -0.15em 0;
    padding: 0.2em 0.55em 0.75em;
    border-radius: 0.25em 1.3em 1.3em 1.3em;
  }

  .pin .moment--night .moment__chat::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
      120% 70% at 50% 100%,
      rgb(var(--red-rgb) / 0.3),
      rgb(var(--red-rgb) / 0.08) 60%,
      transparent
    );
    box-shadow:
      inset 0 0 0 1px rgb(var(--red-rgb) / 0.55),
      0 0 3em -0.6em rgb(var(--red-rgb) / 0.5);
    opacity: 0.5;
    transition: opacity 0.9s ease;
  }

  .pin .story.is-night .moment--night .moment__chat::before {
    opacity: 1;
  }

  .pin .moments--rail > :not(.moment--night) {
    transition: opacity 0.6s ease;
  }

  .pin .story.is-night .moments--rail > :not(.moment--night) {
    opacity: 0.4;
  }

  .pin .moment__later .msg--kai .bubble {
    transition:
      box-shadow 0.6s ease,
      transform 0.6s var(--ease-out);
    transform-origin: 0 100%;
  }

  .pin .story.is-night .moment__later .msg--kai .bubble {
    transform: translateY(-0.15em) scale(1.03);
    box-shadow:
      0 0 0 1px var(--red),
      0 0 2.8em -0.2em rgb(var(--red-rgb) / 0.85);
  }

  .pin [data-heart] {
    transform-origin: 1em 50%;
    transition:
      opacity 0.09s linear,
      transform 0.45s var(--ease-out);
  }

  .pin [data-heart]:not(.is-in) {
    opacity: 0;
    transform: scale(0.4);
  }

  .pin .moment__always .msg--you {
    transform-origin: 100% 100%;
  }

  .pin .flow__screen--night::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
      100% 44% at 50% 92%,
      rgb(var(--red-rgb) / 0.5),
      rgb(var(--red-rgb) / 0.14) 55%,
      transparent 80%
    );
    opacity: 0;
    transform: translateY(12%);
    transition:
      opacity 1.2s ease,
      transform 1.4s var(--ease-out);
  }

  .pin .story.is-late .flow__screen--night::before {
    opacity: 0.45;
    transform: translateY(6%);
  }

  .pin .story.is-night .flow__screen--night::before {
    opacity: 1;
    transform: none;
  }

  /* Messages still to come wait, unseen, below the last one. */
  .pin [data-unit] {
    transition:
      opacity 0.09s linear,
      transform 0.5s var(--ease-out);
  }

  .pin [data-unit]:not(.is-here) {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  /* The words beside the phone. */
  .pin .ch__note {
    display: block;
    margin-top: clamp(1.75rem, 4vh, 2.5rem);
    padding-top: 1.25rem;
    box-shadow: 0 -1px 0 rgb(255 255 255 / 0.35);
    max-width: 30em;
  }

  /* Thursday's clock: the moment's time, a step below the headline, and
     what it was under it, changing with the phone; the five moments along
     a line that fills as the day goes. Each value rolls in its own line:
     the old one goes up and out, then the new one comes up from below,
     never both at once. */
  .pin .clock {
    display: block;
    margin-top: clamp(1.75rem, 6svh, 4rem);
  }

  .clock__faces {
    position: relative;
    display: grid;
    align-items: end;
  }

  .clock__face {
    grid-area: 1 / 1;
    display: grid;
  }

  .clock__big,
  .clock__sub {
    display: grid;
    overflow: clip;
    padding-block: 0.08em 0.18em;
    margin-block: -0.08em -0.18em;
  }

  .clock__big > span,
  .clock__sub > span {
    grid-area: 1 / 1;
    transform: translateY(135%);
    transition: transform 0.16s cubic-bezier(0.5, 0, 0.75, 0);
  }

  .clock__face.is-past > * > span {
    transform: translateY(-135%);
  }

  .clock__face.is-now > * > span {
    transform: none;
    transition: transform 0.24s var(--ease-out) 0.16s;
  }

  .clock__big {
    font-size: var(--f-stop);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
  }

  .clock__sub {
    margin-top: 0.3em;
    font-size: calc(var(--f-stop) * 0.5);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--on-paper-muted);
  }

  .clock__line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: clamp(1.75rem, 5svh, 2.75rem);
    padding-top: 1.5rem;
  }

  .clock__line::before,
  .clock__fill {
    content: "";
    position: absolute;
    top: 0.32rem;
    left: 0;
    width: 80%;
    height: 2px;
    border-radius: 2px;
    background: rgb(var(--ink-rgb) / 0.16);
  }

  .clock__fill {
    display: block;
    background: var(--red);
    transform: scaleX(var(--at, 0));
    transform-origin: 0 50%;
    transition: transform 0.7s var(--ease-out);
  }

  .clock__stop {
    position: relative;
    padding-right: 0.5rem;
    font-size: var(--f-small);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--on-paper-muted);
    transition: color 0.3s ease;
  }

  .clock__stop::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: -1.5rem;
    left: 0;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 1px 4px 4px 4px;
    background: color-mix(in srgb, var(--ink) 24%, var(--paper));
    transition:
      background-color 0.3s ease,
      transform 0.4s var(--ease-out);
  }

  .clock__stop.is-on::before {
    background: var(--red);
  }

  .clock__stop.is-now::before {
    transform: scale(1.35);
  }

  .clock__stop.is-now {
    color: var(--ink);
    font-weight: 600;
  }

  /* Fight week's countdown runs down the page instead: every stop's name
     on a thick red line that burns down from one to the next, the names
     still to come in Paper at 60%, lighting as the line reaches them. Only
     fight night is set as large as the headline, lit from behind when it
     comes. */
  .pin .spine {
    --gap: clamp(0.55rem, 1.6svh, 1.1rem);
    position: relative;
    display: grid;
    justify-items: start;
    gap: var(--gap);
    margin-top: clamp(1.75rem, 5.5svh, 3.5rem);
    padding-left: 2.5rem;
  }

  .spine__stop {
    position: relative;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 0.85rem;
    font-size: var(--f-stop);
    line-height: 1.05;
    color: rgb(var(--paper-rgb) / 0.6);
    transition: color 0.45s ease;
  }

  .spine__name {
    font-weight: 500;
    letter-spacing: -0.035em;
    white-space: nowrap;
  }

  .spine__time {
    display: inline-grid;
    font-size: var(--f-body);
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .spine__time > [data-sub] {
    grid-area: 1 / 1;
    transition: opacity 0.3s ease;
  }

  .spine__time > [data-sub]:not(:first-child),
  .spine__time > [data-sub].is-past {
    opacity: 0;
  }

  .spine__time > [data-sub].is-now {
    opacity: 1;
  }

  .spine__stop.is-on {
    color: rgb(var(--paper-rgb) / 0.84);
  }

  .spine__stop.is-now {
    color: var(--white);
  }

  .spine__stop--night {
    font-size: var(--f-h2);
  }

  .spine__stop--night .spine__name {
    font-weight: 650;
    letter-spacing: -0.045em;
  }

  /* Each stop's mark on the line, cut like the C. */
  .spine__stop::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: -2.5rem;
    top: calc(0.53em - 0.4rem);
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 1px 5px 5px 5px;
    background: color-mix(in srgb, var(--paper) 24%, var(--night));
    transition:
      background-color 0.3s ease,
      transform 0.4s var(--ease-out),
      box-shadow 0.8s ease;
  }

  .spine__stop.is-on::before {
    background: var(--red);
  }

  .spine__stop.is-now::before {
    transform: scale(1.3);
  }

  /* The line from each stop to the next: it burns down once the next stop
     is reached. */
  .spine__stop:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(-2.5rem + 0.4rem - 1.5px);
    top: 0.53em;
    bottom: calc(-1 * (var(--gap) + var(--f-stop) * 0.53));
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(var(--red), var(--red)) top / 100% 0% no-repeat
      rgb(var(--paper-rgb) / 0.14);
    transition:
      background-size 0.6s var(--ease-out),
      box-shadow 0.6s ease;
  }

  .spine__stop:nth-last-child(2)::after {
    bottom: calc(-1 * (var(--gap) + var(--f-h2) * 0.53));
  }

  .spine__stop.is-past::after {
    background-size: 100% 100%;
    box-shadow: 0 0 10px rgb(var(--red-rgb) / 0.45);
  }

  /* Fight night's light: it rises behind the name as the night comes, and
     is full when his thank-you arrives. */
  .spine__stop--night::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: -4rem;
    top: -70%;
    width: min(150%, 34rem);
    height: 240%;
    background: radial-gradient(
      closest-side,
      rgb(var(--red-rgb) / 0.42),
      rgb(var(--red-rgb) / 0.12) 55%,
      transparent
    );
    opacity: 0;
    transform: translateY(14%);
    transition:
      opacity 1s ease,
      transform 1.2s var(--ease-out);
    pointer-events: none;
  }

  .pin .story.is-late .spine__stop--night::after {
    opacity: 0.6;
    transform: translateY(6%);
  }

  .pin .story.is-night .spine__stop--night::after {
    opacity: 1;
    transform: none;
  }

  .spine__stop--night.is-now::before {
    box-shadow: 0 0 16px 3px rgb(var(--red-rgb) / 0.8);
  }

  /* When his thank-you arrives, everything beside the phone steps back but
     fight night (each still readable), and the phone comes forward. */
  .pin .ch--fight .ch__copy > .h2,
  .pin .ch--fight .ch__copy > .body,
  .pin .spine__stop:not(.spine__stop--night) {
    transition:
      opacity 0.6s ease,
      color 0.45s ease;
  }

  .pin .story.is-climax .ch--fight .ch__copy > .h2 {
    opacity: 0.45;
  }

  .pin .story.is-climax .ch--fight .ch__copy > .body {
    opacity: 0.62;
  }

  .pin .story.is-climax .spine__stop:not(.spine__stop--night) {
    opacity: 0.66;
  }

  /* The phone's light: red in the dark, gone on Paper and Red. */
  .pin .halo {
    display: block;
    aspect-ratio: 393 / 852;
    pointer-events: none;
    transition: opacity 0.9s ease;
  }

  .pin .halo::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 46%;
    width: 270%;
    aspect-ratio: 1;
    translate: -50% -50%;
    background: radial-gradient(
      closest-side,
      rgb(var(--red-rgb) / 0.5),
      rgb(var(--red-rgb) / 0.2) 34%,
      rgb(var(--red-rgb) / 0.06) 60%,
      transparent 100%
    );
  }

  .pin .story[data-scene="1"] .halo {
    opacity: 0.45;
  }

  .pin .story[data-scene="2"] .halo,
  .pin .story[data-scene="3"] .halo {
    opacity: 0;
  }

  .pin .story[data-scene="4"] .halo {
    opacity: 0.55;
  }

  .pin .story[data-scene="4"].is-night .halo {
    opacity: 1;
  }

  .pin .halo::before {
    transition: scale 1.4s var(--ease-out);
  }

  .pin .story.is-night .halo::before {
    scale: 1.3;
  }

  /* On fight night the light behind the phone doubles. */
  .pin .halo::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 58%;
    width: 210%;
    aspect-ratio: 1;
    translate: -50% -50%;
    background: radial-gradient(
      closest-side,
      rgb(var(--red-rgb) / 0.55),
      rgb(var(--red-rgb) / 0.18) 40%,
      transparent 100%
    );
    opacity: 0;
    transition: opacity 1s ease;
  }

  .pin .story.is-night .halo::after {
    opacity: 1;
  }

  /* The glass over every screen: the island, the home bar, a reflection. */
  .pin .glass {
    display: block;
    z-index: 3;
    aspect-ratio: 393 / 852;
    container-type: inline-size;
    pointer-events: none;
  }

  .glass__screen {
    position: absolute;
    inset: 3.55cqw;
    overflow: hidden;
    border-radius: 12.1cqw;
    font-size: var(--ui);
  }

  .glass__screen::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
      116deg,
      rgb(255 255 255 / 0.1) 0%,
      rgb(255 255 255 / 0.035) 24%,
      rgb(255 255 255 / 0) 40%
    );
  }
}
