[data-shell="afterhours"] { --shell: #37334F; --shell-light: #4E4970; --shell-ink: #F5F4F8; --deep: #1E1B33; }
[data-shell="daydream"] { --shell: #6EC6EA; --shell-light: #9ADAF4; --shell-ink: #0A3247; --deep: #0A3247; }
[data-shell="sunburn"] { --shell: #FF7A2E; --shell-light: #FF9A5A; --shell-ink: #3B1300; --deep: #3B1300; }
[data-shell="evergreen"] { --shell: #79CF62; --shell-light: #9CDF89; --shell-ink: #0E3A12; --deep: #0E3A12; }
[data-shell="cherry"] { --shell: #D8283F; --shell-light: #EC4C60; --shell-ink: #FFF5F6; --deep: #4A0A14; }
[data-shell="bubblegum"] { --shell: #F58DB8; --shell-light: #F9AFCE; --shell-ink: #4A0F2A; --deep: #4A0F2A; }
[data-shell="sunflower"] { --shell: #F5C531; --shell-light: #F9D866; --shell-ink: #3A2A00; --deep: #3A2A00; }
[data-shell="lilac"] { --shell: #A58BE0; --shell-light: #C0ACEC; --shell-ink: #24104D; --deep: #24104D; }
[data-shell="mint"] { --shell: #5ED3B0; --shell-light: #8AE2C7; --shell-ink: #063B2C; --deep: #063B2C; }
[data-shell="bone"] { --shell: #E6DFD2; --shell-light: #F4F0E8; --shell-ink: #2E2A24; --deep: #2E2A24; }

/* handspun.app. One stylesheet for every page; `node build.mjs` puts the shell colours in front
   of it (one rule per shell, from the table in client/cassette.js).

   The page takes its colours from a tape's shell, the way the app's open case does: anything
   with a data-shell gets that shell's plastic (--shell, --shell-light), what's printed on it
   (--shell-ink) and a dark ink for words on its wash (--deep). Scenes carry their own. */

@font-face {
  font-family: "Mynerve";
  src: url("/fonts/Mynerve-Regular.ttf") format("truetype");
  font-display: swap;
}

/* Registered as colours so the whole page can fade from one shell to the next. */
@property --shell { syntax: "<color>"; inherits: true; initial-value: #ff7a2e; }
@property --shell-light { syntax: "<color>"; inherits: true; initial-value: #ff9a5a; }
@property --deep { syntax: "<color>"; inherits: true; initial-value: #3b1300; }

[data-shell] {
  --wash-top: color-mix(in srgb, var(--shell-light) 52%, white);
  --wash-bottom: color-mix(in srgb, var(--shell) 16%, white);
  --text: var(--deep);
  --text-2: color-mix(in srgb, var(--deep) 68%, transparent);
  --hairline: color-mix(in srgb, var(--deep) 16%, transparent);
  --paper: rgb(255 255 255 / 0.72);
  --well: color-mix(in srgb, var(--deep) 9%, transparent);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  [data-shell] {
    --wash-top: color-mix(in srgb, var(--shell) 40%, #0d0c12);
    --wash-bottom: color-mix(in srgb, var(--shell) 10%, #0d0c12);
    --text: #f6f3ee;
    --text-2: rgb(246 243 238 / 0.7);
    --hairline: rgb(255 255 255 / 0.16);
    --paper: rgb(255 255 255 / 0.1);
    --well: rgb(255 255 255 / 0.1);
  }
}

:root {
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --plain: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  color-scheme: light dark;
  transition: --shell 0.5s ease, --shell-light 0.5s ease, --deep 0.5s ease;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(var(--wash-top), var(--wash-bottom) 60rem) var(--wash-bottom);
  font: 1.0625rem/1.5 var(--plain);
  overflow-x: clip;
}

main { flex: 1; }
h1, h2, h3, p, ol, ul, figure, blockquote, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--round); font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7.4vw, 5.6rem); line-height: 0.94; letter-spacing: -0.04em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h3 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }
.lede { font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.4; color: var(--text-2); max-width: 34ch; }
.fine { font-size: 0.875rem; color: var(--text-2); }
.hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 0.75rem; left: 0.75rem; z-index: 10; padding: 0.6rem 1rem; border-radius: 999px; background: var(--deep); color: #fff; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 0.4rem; }

.paper { background: var(--paper); border-radius: 1.25rem; }

/* Buttons are printed in the page's ink: no gradient, no glow. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--wash-top);
  font: 700 1.0625rem var(--round);
  text-decoration: none;
  cursor: pointer;
  transition: translate 0.2s var(--spring);
}
.button:hover { translate: 0 -2px; }
.button:active { translate: 0 1px; }
.button.small { min-height: 2.75rem; padding: 0 1.15rem; font-size: 0.95rem; }
.button.quiet { background: var(--well); color: var(--text); }
.cta { display: grid; justify-items: start; gap: 0.75rem; }

/* ---------------------------------------------------------------- The top bar and the footer */

.top { display: flex; align-items: center; gap: 1.5rem; padding-block: 1.1rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; margin-right: auto; font: 800 1.3rem var(--round); letter-spacing: -0.02em; text-decoration: none; }
.brand-mark { width: 2.9rem; transform: rotate(-6deg); filter: drop-shadow(0 0.15rem 0.2rem rgb(0 0 0 / 0.2)); }
.top-links { display: flex; gap: 1.5rem; font: 600 0.95rem var(--round); }
.top-links a { text-decoration: none; color: var(--text-2); }
.top-links a:hover { color: var(--text); }

.foot { display: grid; gap: 1rem; padding-block: 2.5rem; margin-top: 4rem; border-top: 1px solid var(--hairline); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-weight: 600; }
.foot .fine { max-width: 60ch; }

/* ---------------------------------------------------------------------------------- The tape */

:where(.tape) { width: 100%; }
.tape { height: auto; overflow: visible; filter: drop-shadow(0 0.7rem 0.9rem rgb(0 0 0 / 0.24)); -webkit-user-select: none; user-select: none; }
.tape.is-pettable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tape-defs { position: absolute; }
.tape-written { font-family: "Mynerve", "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; stroke-linejoin: round; }
.tape-embossed { font-family: "SF Compact Display", "Arial Narrow", "Roboto Condensed", var(--plain); font-weight: 700; font-stretch: condensed; }
.tape-side { font-family: var(--round); font-weight: 800; }
.tape-cheeks { transition: opacity 0.3s; }

/* The eyes. --lx and --ly are where they're looking, -1 to 1 each way. */
.eye-pupil { transform: translate(calc(var(--lx) * 27.2px), calc(var(--ly) * 27.2px)); transition: transform 0.4s var(--spring); }
.is-following .eye-pupil { transition: transform 0.14s ease-out; }
.eye-lid { transition: transform 0.12s ease-out, opacity 0.12s; }
.is-blinking .eye-lid, .is-winking [data-eye="r"] .eye-lid { transform: scaleY(0.06); transition: transform 0.07s ease-in; }
.eye-shut, .eye-happy, .eye-asleep, .eye-dizzy { opacity: 0; transition: opacity 0.12s; }
[data-mood="happy"] .eye-lid, [data-mood="asleep"] .eye-lid, [data-mood="dizzy"] .eye-lid { opacity: 0; }
[data-mood="happy"] :is(.eye-shut, .eye-happy),
[data-mood="asleep"] :is(.eye-shut, .eye-asleep),
[data-mood="dizzy"] :is(.eye-shut, .eye-dizzy) { opacity: 1; }
[data-mood="dizzy"] .eye-dizzy { animation: turn 0.7s linear infinite; }

/* Working, the eyes shut back into plain hubs and the reels turn. */
.tape-eye { transition: transform 0.5s var(--spring), opacity 0.25s; }
[data-wide] .tape-eye { transform: scale(1.1); }
[data-spinning] .tape-eye { transform: scale(0.54); opacity: 0; }
[data-spinning] .tape-cheeks { opacity: 0; }
[data-spinning] .tape-spokes { animation: turn 2.618s linear infinite; }
[data-listening] { animation: bob 0.96s var(--spring) infinite; }

/* The wrap goes on with a fade, and comes off bigger, like cellophane pulled away. */
.tape-wrap { opacity: 0; transform: scale(1.25); transform-origin: 500px 312.5px; transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; }
[data-wrapped="true"] .tape-wrap { opacity: 1; transform: none; transition: opacity 0.3s ease; }
.tape-bow, .tape-ribbon { filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.25)); }

@keyframes turn { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 49% { rotate: -2deg; } 50%, 100% { rotate: 2deg; } }

/* A note in the hand the tapes are labelled in, with an arrow to what it's about. */
.scribble { position: absolute; z-index: 1; font: 1.55rem/1 "Mynerve", "Bradley Hand", "Segoe Print", cursive; -webkit-text-stroke: 0.025em currentColor; white-space: nowrap; pointer-events: none; }
.scribble svg { position: absolute; width: 2.9rem; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* A little Duo, and the lines it comes with. */
.duo-glyph { flex: none; width: 1.35em; fill: none; stroke: currentColor; stroke-width: 2; }
.made-for { display: inline-flex; align-items: center; gap: 0.55rem; justify-self: start; font: 700 0.95rem var(--round); color: var(--text-2); text-decoration: none; }
.made-for:hover { color: var(--text); }
.fold-hint { display: flex; align-items: center; gap: 0.55rem; font: 600 0.95rem var(--round); }
.track-words .fold-hint { font-size: 0.95rem; color: var(--text); }

/* A gift tag, tied on once a tape's sealed. */
.tag { display: grid; gap: 0.1rem; padding: 0.7rem 1rem 0.7rem 1.2rem; background: #fff; color: #1c1b22; border-radius: 0.2rem; clip-path: polygon(14% 0, 100% 0, 100% 100%, 14% 100%, 0 50%); padding-left: 1.9rem; box-shadow: 0 0.3rem 0.8rem rgb(0 0 0 / 0.2); font-size: 0.8rem; line-height: 1.2; rotate: 5deg; }
.tag strong { font: 700 0.95rem var(--round); }
.tag span { color: #6e6b76; }

/* ---------------------------------------------------------------------------------- The hero */

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-block: clamp(2rem, 6vw, 5rem) clamp(4rem, 9vw, 8rem); }
.hero-words { display: grid; gap: 1.75rem; padding-top: clamp(0rem, 4vw, 3.5rem); }
.studio { display: grid; gap: 1.75rem; }
.studio-stage { position: relative; margin-top: 2.25rem; padding: 0 4% 0; }
.studio-stage .scribble { top: -2.4rem; left: 1rem; rotate: -5deg; }
.studio-stage .scribble svg { left: calc(100% + 0.3rem); top: 0.2rem; }
.studio-tape { transform: rotate(-4deg); filter: drop-shadow(0 1.4rem 1.6rem rgb(0 0 0 / 0.26)); }
.studio-stage .tag { position: absolute; right: 0; bottom: -1.4rem; animation: drop-in 0.5s var(--spring) both; }
.studio-desk { display: grid; gap: 1rem; }
.studio-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; }
.studio-more, .studio-sealed { display: grid; gap: 0.9rem; padding: 1.25rem; }
.studio-sealed { justify-items: start; padding: 1.5rem; }
.studio-sealed h2 { font-size: 2rem; }
.studio-sealed p { color: var(--text-2); max-width: 40ch; }
.studio-sealed .cta { margin-top: 0.25rem; }
html:not(.js) .studio-desk { display: none; }

.field { display: grid; grid-template-columns: 4.5rem 1fr; align-items: center; }
.field span, .row legend { font: 600 0.9rem var(--round); color: var(--text-2); }
.field input { min-height: 2.75rem; padding: 0 0.9rem; border: 0; border-radius: 0.8rem; background: var(--well); font-weight: 600; min-width: 0; }
.field input:focus-visible { outline-offset: 0; border-radius: 0.8rem; }
.row { display: grid; grid-template-columns: 4.5rem 1fr; align-items: center; }
.row legend { float: left; width: 4.5rem; padding: 0; }
.row > div { grid-column: 2; min-width: 0; justify-self: start; }
.studio-more .button { margin-top: 0.35rem; }

.swatches { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.swatch { position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch > span:not(.hidden) { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12); transition: scale 0.2s var(--spring); }
.swatch input:checked + span { outline: 2.5px solid var(--text); outline-offset: 2px; }
.swatch input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 4px; }
.swatch:hover > span:not(.hidden) { scale: 1.12; }
.swatch svg { width: 62%; }
.swatch .none { background: linear-gradient(to top right, transparent 46%, var(--text-2) 46% 54%, transparent 54%); }

.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0.2rem; border-radius: 999px; background: var(--well); font: 600 0.85rem var(--round); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 0.45rem 0.8rem; border-radius: 999px; text-align: center; white-space: nowrap; }
.segmented input:checked + span { background: #fff; color: #1c1b22; box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); }
.segmented input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 2px; }

.strays .stray { position: absolute; width: 9rem; z-index: -1; }
.stray-1 { left: -4.5rem; bottom: 5rem; transform: rotate(16deg); }
.stray-2 { right: -3.5rem; top: 1rem; transform: rotate(-13deg); }

@keyframes drop-in { from { opacity: 0; translate: 0 -0.8rem; rotate: -8deg; } }

/* ------------------------------------------------------------------- Side A and Side B */

.side { padding-block: clamp(2rem, 5vw, 4rem); }
.side-head { display: flex; align-items: baseline; gap: 1.25rem; padding-bottom: 0.9rem; border-bottom: 2px solid var(--text); }
.side-head h2 { font-size: clamp(2.8rem, 8vw, 5.5rem); letter-spacing: -0.045em; }
.side-head p { font: 600 1.05rem var(--round); color: var(--text-2); }
.side-head .side-time { margin-left: auto; font-weight: 500; }

.track { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; padding-block: clamp(2rem, 5vw, 4rem); }
.track + .track { border-top: 1px solid var(--hairline); }
.track:nth-of-type(even) .track-words { order: 2; }
.track-words { display: grid; gap: 0.9rem; }
.track-words p { color: var(--text-2); font-size: 1.125rem; max-width: 40ch; }
.track-no { font: 700 1rem var(--round); font-variant-numeric: tabular-nums; color: var(--text-2); }

/* Between the sides. */
.turn-over { display: grid; justify-items: center; gap: 1rem; padding-block: clamp(1rem, 3vw, 2.5rem) clamp(2.5rem, 6vw, 5rem); text-align: center; }
.turn-over-tape { width: 9.5rem; perspective: 40rem; }
.turn-tape { filter: drop-shadow(0 0.4rem 0.5rem rgb(0 0 0 / 0.22)); }
.turn-over p { font: 700 1.25rem var(--round); }
.turn-over .button { min-height: 2.75rem; padding-inline: 1.25rem; font-size: 0.95rem; }

/* A scene is a little open case in its own tape's colour. */
.scene { position: relative; display: grid; justify-items: center; align-content: center; gap: 1.25rem; min-height: 26rem; padding: clamp(1.5rem, 4vw, 3rem); border-radius: 2rem; background: linear-gradient(var(--wash-top), var(--wash-bottom)); overflow: hidden; }
.scene-tape { width: min(100%, 21rem); }

.songs { width: min(100%, 24rem); padding: 0.2rem 1rem; }
.song { display: grid; grid-template-columns: 1.6rem 2.5rem 1fr; align-items: center; gap: 0.7rem; transition: opacity 0.35s, translate 0.45s var(--spring); }
.song-no { font: 600 0.8rem var(--round); font-variant-numeric: tabular-nums; color: var(--text-2); }
.song-words { display: grid; padding-block: 0.6rem; line-height: 1.25; min-width: 0; }
.song + .song .song-words { border-top: 1px solid var(--hairline); }
.song-words b { font-weight: 600; }
.song-words span { font-size: 0.875rem; color: var(--text-2); }
.song-words > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-running .song:not(.is-on) { opacity: 0; translate: 0 0.8rem; }

/* Made-up covers for made-up songs, like the app's fixtures. */
.art { width: 2.5rem; aspect-ratio: 1; border-radius: 0.4rem; background: var(--well); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.art-sun { background: radial-gradient(circle at 50% 52%, #ffe3bd 0 30%, transparent 31%), linear-gradient(#ff8a3d 0 76%, #7a2e00 76%); }
.art-gold { background: radial-gradient(circle at 50% 52%, #fff3c4 0 30%, transparent 31%), linear-gradient(#f5c531 0 76%, #7a5a00 76%); }
.art-waves { background: repeating-linear-gradient(#2c8fd6 0 14%, #9ad8f6 14% 22%); }
.art-stripes { background: repeating-linear-gradient(55deg, #0e8a6a 0 14%, #86e2c5 14% 24%); }
.art-rings { background: repeating-radial-gradient(circle, #6b4fd3 0 12%, #c0acec 12% 22%); }
.art-dots { background: radial-gradient(circle, #4a0f2a 26%, transparent 28%) 0 0 / 34% 34%, #f9afce; }
.art-voice { background: var(--shell); mask: radial-gradient(circle, #000 28%, transparent 30%) center / 100% 100%; -webkit-mask: radial-gradient(circle, #000 28%, transparent 30%) center / 100% 100%; box-shadow: none; }

.is-redacted .song-words b, .is-redacted .song-words span { display: block; height: 0.7rem; border-radius: 0.35rem; background: var(--text); opacity: 0.22; }
.is-redacted .song-words span { height: 0.55rem; margin-top: 0.4rem; opacity: 0.12; }

/* A2: the voice note. */
.voice { display: flex; align-items: center; gap: 0.8rem; width: min(100%, 24rem); padding: 0.7rem 1rem; border-radius: 999px; }
.voice-dot { flex: none; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: #e8394d; animation: pulse 1.2s ease-in-out infinite; }
.voice-wave { flex: 1; display: flex; align-items: center; justify-content: space-between; height: 2rem; }
.voice-wave i { width: 3px; height: calc(18% + 82% * abs(sin(var(--bar) * 1.9))); border-radius: 2px; background: var(--text); opacity: 0.7; animation: wave 0.9s ease-in-out calc(var(--bar) * -0.13s) infinite alternate; }
.voice-time { font: 600 0.85rem var(--round); font-variant-numeric: tabular-nums; color: var(--text-2); }
.scene:not(.is-playing) :is(.voice-dot, .voice-wave i) { animation-play-state: paused; }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes wave { to { scale: 1 0.35; } }

/* A3: sealed, with its tag. */
.seal-gift { position: relative; width: min(100%, 21rem); }
.seal-gift .tape { transform: rotate(-3deg); }
.seal-gift .tag { position: absolute; right: -1.2rem; bottom: -1.6rem; }
.scene-seal .songs { margin-top: 1.5rem; }

/* B1: from one pocket to the other. */
.scene.scene-handover { display: block; aspect-ratio: 16 / 11; min-height: 0; padding: 0; }
.pocket { position: absolute; top: 9%; width: 30%; aspect-ratio: 9 / 15; border: 0.3rem solid var(--text); border-radius: 1.7rem; background: var(--paper); }
.pocket-from { left: 11%; }
.pocket-to { right: 11%; }
.pocket-name { position: absolute; top: calc(100% + 0.9rem); left: 0; right: 0; text-align: center; font: 700 1rem var(--round); }
.pocket-news { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; font: 700 0.9rem var(--round); opacity: 0; }
.handover-tape { position: absolute; top: 31%; left: 13.5%; width: 25%; }
.handover-tape .tape { filter: drop-shadow(0 0.4rem 0.5rem rgb(0 0 0 / 0.25)); }
.is-playing .handover-tape { animation: hand-over 5.2s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.is-playing .pocket-news { animation: news 5.2s ease infinite; }
@keyframes hand-over {
  0%, 16% { translate: 0 0; rotate: 0deg; opacity: 1; }
  8% { translate: 0 -8%; }
  30% { translate: 96% -34%; rotate: 8deg; }
  44%, 86% { translate: 192% 0; rotate: 0deg; opacity: 1; }
  50% { translate: 192% -7%; }
  56% { translate: 192% 0; }
  94% { translate: 192% 0; opacity: 0; }
  95% { translate: 0 0; opacity: 0; }
  100% { translate: 0 0; opacity: 1; }
}
@keyframes news { 0%, 46% { opacity: 0; translate: 0 0.4rem; } 54%, 86% { opacity: 1; translate: 0 0; } 94%, 100% { opacity: 0; } }

/* B2: tap to unwrap. */
.unwrap { display: grid; justify-items: center; gap: 1.1rem; width: min(100%, 21rem); padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.unwrap-label { padding: 0.45rem 1rem; border-radius: 999px; background: var(--paper); font: 700 0.9rem var(--round); }
.note { width: min(100%, 24rem); padding: 1.1rem 1.25rem; font-size: 1.05rem; line-height: 1.45; transition: opacity 0.5s 0.15s, filter 0.5s 0.15s; }
.note footer { margin-top: 0.5rem; font: 700 1rem var(--round); color: color-mix(in srgb, var(--shell) 60%, var(--text)); }
.note footer::before { content: "– "; }
/* Until it's unwrapped, the note's there but nobody can read it. */
.js .scene-unwrap:not(.is-open) .note { filter: blur(0.45rem); opacity: 0.55; -webkit-user-select: none; user-select: none; }

/* B3: the deck. */
.scene-deck { gap: 1rem; }
.deck-flip { width: min(100%, 21rem); perspective: 60rem; }
.deck-now { display: grid; grid-template-columns: 2.75rem 1fr auto; align-items: center; gap: 0.8rem; width: min(100%, 22rem); margin-top: 0.4rem; }
.deck-now .art { width: 2.75rem; }
.deck-now .song-words { padding: 0; }
.deck-play { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border: 0; border-radius: 50%; background: var(--text); cursor: pointer; transition: scale 0.2s var(--spring); }
.deck-play:hover { scale: 1.06; }
.deck-play svg { width: 1.5rem; fill: var(--wash-top); }
.deck-play[aria-pressed="false"] .icon-pause, .deck-play[aria-pressed="true"] .icon-play { display: none; }
.deck-bar { width: min(100%, 22rem); height: 0.35rem; border-radius: 1rem; background: var(--well); overflow: hidden; }
.deck-bar i { display: block; width: 100%; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(var(--played, 0)); }
.deck-times { display: flex; justify-content: space-between; width: min(100%, 22rem); font: 600 0.75rem var(--round); font-variant-numeric: tabular-nums; color: var(--text-2); }
.deck-note { text-align: center; }

/* -------------------------------------------------------------------------------- iPhone Duo */

/* The Duo's section is the one dark thing on the page: the Midnight the app's icon sits on,
   whatever shell the page is wearing, with the Duo lit in the middle of it. */
.duo-band {
  --text: #f4f2fa;
  --text-2: rgb(244 242 250 / 0.72);
  --hairline: rgb(255 255 255 / 0.18);
  margin: clamp(2rem, 6vw, 5rem) clamp(0.5rem, 1.5vw, 1.25rem);
  border-radius: clamp(1.5rem, 4vw, 3rem);
  background: radial-gradient(120% 80% at 50% 45%, #4a3550 0%, transparent 60%), linear-gradient(#2e2a4f, #1a1730);
  color: var(--text);
  overflow: clip;
}
.duo-section { display: grid; justify-items: center; gap: clamp(1rem, 3vw, 2rem); padding-block: clamp(3rem, 8vw, 6.5rem); }
.duo-words { display: grid; justify-items: center; gap: 1.25rem; text-align: center; }
.duo-words h2 { font-size: clamp(2.4rem, 6.4vw, 4.8rem); letter-spacing: -0.04em; }
.duo-words .lede { max-width: 40ch; }
.duo-stage { display: grid; justify-items: center; gap: 0; width: min(100%, 60rem); }
.duo-toggle { display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.duo-stage .fine { margin-top: -1.5rem; }

.folds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 1.5rem; width: 100%; margin-top: 1.5rem; }
.folds button { display: grid; align-content: start; gap: 0.35rem; padding: 1rem 0 0; border: 0; border-top: 2px solid var(--hairline); background: none; text-align: left; cursor: pointer; color: var(--text-2); transition: color 0.2s, border-color 0.2s; }
.folds button b { font: 800 1.2rem var(--round); letter-spacing: -0.02em; }
.folds button span { font-size: 0.95rem; line-height: 1.35; }
.folds button:hover { color: var(--text); }
.folds button[aria-pressed="true"] { color: var(--text); border-color: #ff9a5a; }

/* The Duo is a film of a real one folding, drawn on a canvas over its first picture. */
.duo-poster, .duo-film { grid-area: 1 / 1; width: 100%; height: auto; }

/* --------------------------------------------------------------- Details, and the last word */

.details { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; padding-block: clamp(3rem, 7vw, 6rem); }
.details dl { margin: 0; }
.detail { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.15rem 0; border-top: 1px solid var(--hairline); }
.detail:last-child { border-bottom: 1px solid var(--hairline); }
.detail dt { font: 700 1.05rem var(--round); }
.detail dd { margin: 0; color: var(--text-2); max-width: 54ch; }
.detail a { font-weight: 600; color: var(--text); white-space: nowrap; }

.last { display: grid; justify-items: center; gap: 2rem; padding-block: clamp(4rem, 9vw, 7rem) 2rem; text-align: center; }
.last-stage { position: relative; width: min(78%, 24rem); }
.last-tape { transform: rotate(-6deg); }
.last-stage .scribble { top: -2.6rem; right: -1.5rem; rotate: 4deg; }
.last-stage .scribble svg { right: calc(100% + 0.3rem); top: 0.5rem; }
.last h2 { font-size: clamp(2.9rem, 9vw, 6.5rem); letter-spacing: -0.045em; }
.last .cta { justify-items: center; }

/* ----------------------------------------------------- Pages of words, and the small pages */

.article main { width: 100%; max-width: 44rem; margin-inline: auto; padding: clamp(2rem, 6vw, 4rem) var(--gutter) 2rem; }
.article h1 { font-size: clamp(2.8rem, 8vw, 4.5rem); margin-bottom: 1.25rem; }
.article h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 2.5rem 0 0.5rem; }
.article .lede { max-width: none; color: var(--text); }
.article p + p, .article ul + p { margin-top: 0.75rem; }
.article main > p:not(.lede), .article li { color: color-mix(in srgb, var(--text) 82%, transparent); }
.article ul { list-style: disc; margin-top: 0.5rem; padding-left: 1.4rem; }
.article li + li { margin-top: 0.3rem; }
.article .small { margin-top: 1rem; font-size: 0.9rem; color: var(--text-2); }
.article .see-also { display: flex; gap: 1.5rem; margin-top: 3rem; font-weight: 600; }

/* -------------------------------------------------------------------------- The press kit */

/* Built from the home page's parts: a tape beside the headline, then "Good to know" rows (a
   heading on the left, what it's about on the right), and the screenshots across the width. */
.press-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(2rem, 6vw, 5rem) 0; }
.press-words { display: grid; gap: 1.25rem; }
.press-tape { width: min(100%, 22rem); justify-self: center; rotate: 7deg; }

.about { display: grid; gap: 0.9rem; max-width: 54ch; color: var(--text-2); }
.about-short { font: 800 clamp(1.35rem, 2.4vw, 1.7rem)/1.2 var(--round); letter-spacing: -0.02em; color: var(--text); margin-bottom: 0.4rem; }

.press-film { align-items: center; }
.film-words { display: grid; gap: 1rem; justify-items: start; }
.film-words h2 { margin-bottom: 0.25rem; }
.film-words p:not(.fine) { color: var(--text-2); max-width: 40ch; }
.press-film video { display: block; width: min(100%, 21rem); height: auto; border-radius: 1.5rem; background: #231d33; }

.press-shots { display: grid; padding-block: clamp(1rem, 3vw, 2rem) clamp(3rem, 7vw, 6rem); }
.press-note { color: var(--text-2); margin-top: 1rem; max-width: 54ch; }
.set-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin: 3rem 0 1.25rem; padding-top: 1rem; border-top: 1px solid var(--hairline); }
.set-head h3 { font-size: 1.35rem; letter-spacing: -0.02em; }
.set-head .button { margin-left: auto; }
.shots { display: grid; gap: 1rem; }
.shots a { display: block; border-radius: 0.9rem; }
.shots img { width: 100%; height: auto; border-radius: 0.9rem; }
/* Phones sit in one row, as on the store, and scroll sideways where they don't fit. */
.shots-phone { grid-auto-flow: column; grid-auto-columns: minmax(7rem, 1fr); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 0.75rem; }
.shots-phone li { scroll-snap-align: start; }
.shots-cover { grid-auto-columns: 9.5rem; }
.shots-open { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots-label { margin: 1.75rem 0 0.75rem; }

.press-art { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.press-art li { display: grid; gap: 0.6rem; }
.press-art img { width: 100%; height: auto; border-radius: 0.9rem; }
.press-art .art-icon { border-radius: 22.5%; }

@media (max-width: 56rem) {
  .press-hero { grid-template-columns: minmax(0, 1fr); }
  .press-tape { order: -1; width: min(70%, 15rem); justify-self: start; rotate: -5deg; }
  .shots-open { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36rem) {
  .press-art { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .set-head .button { margin-left: 0; }
}

.narrow main { display: grid; align-content: center; justify-items: center; gap: 1.25rem; width: 100%; max-width: 30rem; margin-inline: auto; padding: 2rem var(--gutter) 3rem; text-align: center; }
.narrow h1 { font-size: clamp(2.5rem, 9vw, 3.6rem); }
.narrow .lede { max-width: 30ch; }
.narrow .small-tape { width: min(88%, 21rem); margin-bottom: 1rem; transform: rotate(-5deg); }
.narrow .actions { display: grid; gap: 0.75rem; width: min(100%, 20rem); margin-top: 0.5rem; }
.narrow .top-links, .article .top-links { display: none; }
.narrow .foot { margin-top: 0; }

/* --------------------------------------------------------------------------- Smaller screens */

@media (max-width: 56rem) {
  .top-links { display: none; }
  .hero, .track, .details { grid-template-columns: minmax(0, 1fr); }
  .folds { grid-template-columns: minmax(0, 1fr); }
  /* The film has clear room round the Duo, so on a narrow screen it's let out past the band. */
  .duo-toggle { width: 130%; margin-inline: -15%; }
  .folds button { grid-template-columns: 8.5rem minmax(0, 1fr); align-items: baseline; gap: 1rem; padding: 0.9rem 0; border-top-width: 1px; }
  .folds button[aria-pressed="true"] b { color: #ff9a5a; }
  .hero-words { padding-top: 0; }
  .track:nth-of-type(even) .track-words { order: 0; }
  .scene { min-height: 22rem; }
  .strays { display: none; }
  .lede { max-width: 38ch; }
}

@media (max-width: 36rem) {
  .detail { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  /* On a narrow screen the side's name has a line to itself, with what it is and how long it
     runs side by side under it. */
  .side-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.35rem 1rem; }
  .side-head h2 { grid-column: 1 / -1; }
  .last-stage .scribble { right: -0.5rem; font-size: 1.3rem; }
  .field, .row { grid-template-columns: 3.75rem 1fr; }
  .row legend { width: 3.75rem; }
  .swatch { width: 2rem; height: 2rem; }
  .studio-bar .swatches { gap: 0.15rem; }
  .studio-bar .swatch { width: 1.8rem; }
  .swatch > span:not(.hidden) { width: 1.45rem; height: 1.45rem; }
  .studio-desk .segmented { grid-auto-columns: auto; font-size: 0.78rem; }
  .studio-desk .segmented span { padding-inline: 0.5rem; }
  .studio-more { padding: 1rem; }
  .folds button { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .duo-stage .fine { margin-top: -0.5rem; }
  .pocket { border-width: 0.22rem; border-radius: 1.2rem; }
}

/* Reduce Motion keeps the faces but drops the hops, bobs, wobbles and glances. */
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01s !important; }
}
