/* ============================================================================
   Present, landing B.
   The app's own look at the size of a window: paper tinted by the hand in use,
   frosted white glass with large radii, the hand's name in big rounded type, and
   ink black for what is pressed. Apple's own fonts on a Mac, no web fonts, so
   nothing moves while the page loads. Only transform, opacity and filter animate.
   ========================================================================= */
:root {
  color-scheme: light;
  --ink: #1d1d21;
  --muted: #55555b;
  --faint: #7c7c85;
  --paper: 244 245 248;
  --shade: 20 31 61;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --spring: cubic-bezier(0.16, 1.02, 0.3, 1);
  --glass: rgba(255, 255, 255, 0.52);
  --edge: inset 0 0 0 1px rgba(255, 255, 255, 0.86);
  --lift: 0 1px 2px rgb(var(--shade) / 0.06), 0 10px 26px -8px rgb(var(--shade) / 0.16);
  --gutter: 28px;
  --page: 1180px;
}

* {
  box-sizing: border-box;
}
html {
  background: rgb(var(--paper));
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  font: 400 17px/1.5 var(--display);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.55);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

/* ---------- the window's ground: paper tinted by the hand (Backdrop in HomeView) ---------- */
.ground {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.ground i {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.22s var(--ease);
  background:
    radial-gradient(circle 62vmax at 22% 8%, rgb(var(--t) / 0.3) 0%, rgb(var(--t) / 0.2) 38%, rgb(var(--t) / 0) 100%),
    rgb(var(--base));
}

/* ---------- top bar ---------- */
.bar {
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 650 17px/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
  border-radius: 10px;
}
.brand img {
  display: block;
  border-radius: 7px;
}
.bar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sound {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--glass);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 0.14s var(--ease);
}
.sound svg {
  grid-area: 1 / 1;
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound .wave {
  fill: none;
}
.sound .off,
.sound[aria-pressed="false"] .on {
  opacity: 0;
}
.sound[aria-pressed="false"] .off {
  opacity: 1;
}
.sound:active {
  transform: scale(0.94);
}

/* ---------- the download button (no build yet: it says so, in place) ---------- */
.get {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 600 14px/1 var(--display);
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 16px -6px rgb(var(--shade) / 0.5);
  transition: transform 0.14s var(--ease);
}
.get.big {
  height: 48px;
  padding: 0 24px 0 20px;
  font-size: 16px;
}
.get:active {
  transform: scale(0.96);
}
.apple {
  width: 15px;
  height: 17px;
  fill: currentColor;
  margin-top: -2px;
}
/* both labels share one cell, so the button keeps one width whichever shows */
.get-face {
  display: grid;
  overflow: hidden;
}
.get-label {
  grid-area: 1 / 1;
  text-align: center;
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.get-label.alt {
  opacity: 0;
  transform: translateY(70%);
}
.get.soon .get-label:not(.alt) {
  opacity: 0;
  transform: translateY(-70%);
}
.get.soon .get-label.alt {
  opacity: 1;
  transform: none;
}

/* ---------- hero ---------- */
main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: 56px;
  min-height: min(760px, calc(100svh - 84px));
  padding: 8px 0 64px;
}
h1 {
  margin: 0 0 22px;
  font: 800 clamp(50px, 6.6vw, 94px)/0.96 var(--display);
  letter-spacing: -0.048em;
  text-wrap: balance;
}
.lede {
  margin: 0 0 30px;
  max-width: 31ch;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
  text-wrap: pretty;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 34px;
}
.needs {
  color: var(--faint);
  font: 500 13.5px/1 var(--display);
}
.try {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font: 500 14px/1 var(--display);
}
.try li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.try .plus {
  margin: 0 -3px;
  color: var(--faint);
}
.try .touch,
html.coarse .try .mouse {
  display: none;
}
html.coarse .try .touch {
  display: inline-flex;
}
kbd {
  display: inline-block;
  min-width: 24px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.14);
  color: var(--ink);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0;
  text-align: center;
}

/* ---------- the board: the app's Pointer board, live ---------- */
.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.board {
  position: relative;
  width: 100%;
  aspect-ratio: 1.05;
  max-height: 560px;
  justify-self: end;
  overflow: hidden;
  border-radius: 38px;
  background: var(--glass);
  box-shadow: var(--edge), 0 2px 4px rgb(var(--shade) / 0.05), 0 34px 70px -26px rgb(var(--shade) / 0.32);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  backdrop-filter: blur(26px) saturate(1.3);
  container-type: inline-size;
  touch-action: manipulation;
}
html.coarse .board {
  /* a finger draws here, so the board does not scroll the page */
  touch-action: none;
}
.board-hand {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}
.board-hand.enter .hc-press {
  animation: land 0.26s var(--spring) both;
}
@keyframes land {
  from {
    transform: translateY(-6px) scale(0.97);
  }
}
.board-name {
  position: absolute;
  z-index: 2;
  left: 34px;
  bottom: 28px;
  margin: 0;
  max-width: calc(100% - 128px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 var(--name-size, min(66px, 11.5cqw))/1.05 var(--rounded);
  letter-spacing: -0.035em;
  pointer-events: none;
}
/* The app's Pointer switch (BoardSwitch in HomeView.swift): green with the knob to the right
   while the hand is the pointer, grey when it is off. A touch screen has no pointer, so no switch. */
.board-switch {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 22px;
  width: 64px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(201 201 207);
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    transform 0.14s var(--ease);
}
.board-switch[aria-checked="true"] {
  background: rgb(48 209 88);
}
.board-switch .knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.22);
  transition: transform 0.28s cubic-bezier(0.34, 1.5, 0.64, 1);
}
.board-switch[aria-checked="true"] .knob {
  transform: translateX(26px);
}
.board-switch:active {
  transform: scale(0.96);
}
html.coarse .board-switch {
  display: none;
}
.quick {
  position: absolute;
  z-index: 3;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qh {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgb(var(--shade) / 0.1), 0 4px 10px -4px rgb(var(--shade) / 0.18);
  cursor: pointer;
  transition: transform 0.16s var(--ease);
}
.qh img {
  display: block;
  width: auto;
  height: 36px;
  pointer-events: none;
}
/* the one in use has a ring round it; the ring moves at once, as the app's does */
.qh[aria-checked="true"],
.tile[aria-checked="true"] {
  box-shadow: 0 0 0 2.5px var(--ink), 0 4px 10px -4px rgb(var(--shade) / 0.18);
}
.all {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgb(var(--shade) / 0.5);
  transition: transform 0.16s var(--ease);
}
.all svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.all:active,
.qh:active {
  transform: scale(0.94);
}
@media (hover: hover) and (pointer: fine) {
  .qh:hover {
    transform: translateY(-2px);
  }
}

/* ---------- every hand ---------- */
.hands,
.video {
  padding: 84px 0 8px;
}
.head h2 {
  margin: 0 0 10px;
  font: 800 clamp(36px, 4.2vw, 54px)/1.02 var(--display);
  letter-spacing: -0.04em;
}
.head p {
  max-width: 44ch;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}
.count {
  font-variant-numeric: tabular-nums;
}
.shelf {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 12px;
}
.tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--glass);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.18s var(--ease);
}
.tile img {
  display: block;
  width: auto;
  height: 64%;
  pointer-events: none;
}
.tile:active {
  transform: scale(0.96);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover {
    transform: translateY(-3px);
  }
}

/* ---------- on videos ---------- */
.film {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--edge), 0 2px 4px rgb(var(--shade) / 0.05), 0 40px 80px -30px rgb(var(--shade) / 0.36);
}
.film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- close + foot ---------- */
.close {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 110px 0 90px;
  text-align: center;
}
.close-icon {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22.5%;
  box-shadow: 0 14px 30px -12px rgb(var(--shade) / 0.4);
}
.close h2 {
  margin: 8px 0 10px;
  font: 800 46px/1 var(--display);
  letter-spacing: -0.045em;
}
.foot {
  max-width: var(--page);
  margin: 0 auto;
  padding: 26px var(--gutter) 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid rgb(var(--shade) / 0.08);
  color: var(--faint);
  font: 500 13.5px/1 var(--display);
}
.foot nav {
  display: flex;
  gap: 22px;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
}
.foot a:hover {
  color: var(--ink);
}

/* ---------- the pointer, as a hand on a stick ---------- */
html.hand-on,
html.hand-on * {
  cursor: none !important;
}
html.drawing,
html.drawing * {
  -webkit-user-select: none !important;
  user-select: none !important;
}
.pointer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
}
.pointer.shown {
  opacity: 1;
}
/* the fingertip is each arm's top-left corner: turning the arm turns the hand about it */
.hc-arm {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
/* a tap pushes the hand in by a sixth, and its shadow comes in under it (HandFilm.pressed) */
.hc-press {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  filter: drop-shadow(calc(5px * var(--sh, 1)) calc(9px * var(--sh, 1)) 7px rgb(var(--shade) / calc(0.26 * var(--sh, 1))));
  transition: transform 85ms var(--ease), filter 85ms var(--ease);
}
.hc-press.down {
  transform: scale(0.83);
  filter: drop-shadow(calc(1px * var(--sh, 1)) calc(2px * var(--sh, 1)) 2px rgb(var(--shade) / calc(0.28 * var(--sh, 1))));
  transition-duration: 90ms;
}
.hc-hand {
  position: absolute;
  display: block;
  max-width: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* a long piece of the real stick, repeated down past the window's edge (tools/make-hands.py),
   so a wooden one keeps its grain */
.hc-rod {
  position: absolute;
  background: top center / 100% auto repeat-y;
}

/* what the hand leaves on the page: ink that fades, and the rings of taps */
.ink {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}
.rings {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}
.ring {
  position: absolute;
  box-sizing: border-box;
  border-style: solid;
  border-radius: 50%;
  transform: scale(0.22);
  box-shadow: 0 0 var(--glow) rgba(255, 255, 255, 0.95), inset 0 0 var(--glow) rgba(255, 255, 255, 0.95);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  z-index: 70;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(29, 29, 33, 0.86);
  color: #fff;
  font: 600 13.5px/1 var(--display);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- entrance: the words, then the board, then its hand lands ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pitch > * {
    animation: rise 0.7s var(--ease) both;
  }
  .pitch > :nth-child(2) { animation-delay: 60ms; }
  .pitch > :nth-child(3) { animation-delay: 120ms; }
  .pitch > :nth-child(4) { animation-delay: 180ms; }
  .board {
    animation: settle 0.8s var(--spring) 0.1s both;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

/* ---------- a narrower window ---------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
    padding-top: 20px;
  }
  .board {
    justify-self: stretch;
    aspect-ratio: 1.15;
    max-height: none;
  }
  .shelf {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  :root {
    --gutter: 18px;
  }
  body {
    font-size: 16px;
  }
  .bar {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .bar .get {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }
  .sound {
    width: 36px;
    height: 36px;
  }
  .lede {
    font-size: 17.5px;
  }
  .board {
    aspect-ratio: 0.9;
    border-radius: 30px;
  }
  /* the quick hands go along the bottom, the name to the top */
  .quick {
    top: auto;
    right: auto;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 7px;
  }
  .qh {
    width: 44px;
    height: 44px;
  }
  .qh img {
    height: 31px;
  }
  .board-name {
    top: 22px;
    bottom: auto;
    left: 24px;
    max-width: calc(100% - 96px);
    font-size: min(44px, 11cqw);
  }
  .all {
    top: 16px;
    bottom: auto;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  /* a narrow window with a mouse: the switch sits beside the round button */
  .board-switch {
    top: 22px;
    right: 70px;
    width: 54px;
    height: 32px;
  }
  .board-switch .knob {
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
  }
  .board-switch[aria-checked="true"] .knob {
    transform: translateX(22px);
  }
  .hands,
  .video {
    padding-top: 64px;
  }
  .head p {
    font-size: 16.5px;
  }
  .shelf {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
  }
  .tile {
    border-radius: 16px;
  }
  .film {
    border-radius: 20px;
  }
  .close {
    padding: 80px 0 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ground i,
  .get-label,
  .hc-press,
  .hc-press.down,
  .qh,
  .tile,
  .toast {
    transition: none;
  }
  .board-hand.enter .hc-press {
    animation: none;
  }
}

/* ---------- the 404 page ---------- */
.ground i.lost {
  opacity: 1;
  --t: 77 191 238;
  --base: 221 238 246;
}
.nowhere {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  gap: 14px;
  text-align: center;
}
.nowhere img {
  width: 70px;
  height: auto;
  transform: rotate(-8deg);
}
.nowhere h1 {
  margin: 10px 0 0;
  font-size: clamp(36px, 6vw, 56px);
}
.nowhere .lede {
  margin: 0 0 10px;
}
.nowhere .get {
  text-decoration: none;
}


/* ---------- the tiles under the board: the app's Size, Shadow and Tap sound ---------- */
.tune {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.setting {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 92px;
  padding: 16px 16px 16px;
  border-radius: 24px;
  background: var(--glass);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.tile-label {
  color: var(--muted);
  font: 600 14px/1 var(--display);
}
/* the app's thick slider: a capsule that fills with ink up to a white knob */
.thick {
  position: relative;
  display: block;
  height: 40px;
}
.thick input {
  --v: 0.5;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 40px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(to right, var(--ink) 0 calc(var(--v) * (100% - 40px) + 40px), rgba(0, 0, 0, 0.08) 0);
  cursor: pointer;
}
.thick input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  border: 4px solid transparent;
  border-radius: 50%;
  background: #fff content-box;
  box-shadow: inset 0 0 0 4px var(--ink), 0 1px 3px rgba(0, 0, 0, 0.25);
}
.thick input::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.thick input:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.55);
  outline-offset: 2px;
}
.thick-ic {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 16px;
  height: 16px;
  fill: #fff;
  pointer-events: none;
  opacity: var(--ic, 0.9);
}
.sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sound-name {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 19px/1 var(--display);
  letter-spacing: -0.02em;
  cursor: pointer;
  border-radius: 10px;
}
.step {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgb(var(--shade) / 0.12);
  cursor: pointer;
  transition: transform 0.14s var(--ease);
}
.step svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step:active,
.sound-name:active {
  transform: scale(0.94);
}

/* ---------- the story: drop a recording, get it back with the hand ---------- */
/* The heading, the window and the steps fit in one screen: the window is as wide as the
   screen's height leaves room for (about 260px go to the heading, the steps and some air),
   and the heading lines up with it. */
.video {
  --film-w: min(100%, max(560px, calc((100svh - 260px) * 1800 / 1205)));
}
.video > .head,
.video > .film,
.video > .steps {
  width: var(--film-w);
  margin-inline: auto;
}
.film.story {
  aspect-ratio: 1800 / 1205;
  background: rgb(232 240 246);
}
.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.story[data-scene="drop"] .scene[data-scene="drop"],
.story[data-scene="export"] .scene[data-scene="export"] {
  opacity: 1;
}
.scene .shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-select: none;
  user-select: none;
}
/* the saved video fills the window, as the video did before the story; it grows out of the
   middle of the drop card, where the file was let go */
.scene[data-scene="export"] {
  overflow: hidden;
  border-radius: inherit;
  background: #8a74c9;
  transform-origin: 30.45% 54.15%;
}
.scene[data-scene="export"] video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* the drop card of the picture lights up while the file is over it (its place in the picture) */
.drop-glow {
  position: absolute;
  left: 11.8%;
  top: 17%;
  width: 37.3%;
  height: 74.3%;
  border-radius: 6.5% / 4.8%;
  background: rgba(10, 132, 255, 0.08);
  box-shadow: inset 0 0 0 3px rgba(10, 132, 255, 0.75);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.story.over .drop-glow {
  opacity: 1;
}
/* the file being dragged in, with the Mac's own arrow on it */
.file {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 15%;
  opacity: 0;
  will-change: transform;
}
.file img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 0 3px #fff, 0 12px 24px -6px rgb(var(--shade) / 0.45);
}
.file b {
  padding: 3px 7px;
  border-radius: 6px;
  background: #0a84ff;
  color: #fff;
  font: 600 clamp(9px, 1.1vw, 12px)/1.2 var(--display);
  white-space: nowrap;
}
.file .arrow {
  position: absolute;
  right: -10%;
  bottom: 18%;
  width: 26%;
  max-width: 26px;
  fill: #000;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
}
.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.steps button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 8px;
  border: 0;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: var(--edge), 0 1px 2px rgb(var(--shade) / 0.08);
  color: var(--muted);
  font: 600 14px/1 var(--display);
  cursor: pointer;
  transition: transform 0.14s var(--ease);
}
.steps .n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.07);
  color: var(--ink);
  font-size: 13px;
}
.steps button[aria-selected="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}
.steps button[aria-selected="true"] .n {
  background: var(--ink);
  color: #fff;
}
.steps button:active {
  transform: scale(0.96);
}

@media (max-width: 980px) {
  .side {
    width: 100%;
  }
}
@media (max-width: 560px) {
  .tune {
    grid-template-columns: 1fr 1fr;
  }
  .sound-tile {
    grid-column: 1 / -1;
  }
  .setting {
    min-height: 84px;
    padding: 14px;
    border-radius: 20px;
  }
  .steps button {
    height: 36px;
    font-size: 13px;
  }
  .film.story {
    border-radius: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene,
  .drop-glow,
  .board-switch,
  .board-switch .knob,
  .step,
  .steps button {
    transition: none;
  }
}
