/* ═══════════════════════════════════════════════════════════════════
   PlateDiary — the landing page (index.html only; the other pages keep
   styles.css). One live phone, drawn to the app's v2 tokens, directed by
   the chapters beside it.

   Colour: every token derives from four room colours — surface, sheet,
   ink, accent — the same four each theme room hand-picks in
   src/design/themes.ts. Trying a Look on sets those four and the whole
   page follows, animated on the app's own spring.
   ═══════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Fredoka';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/fredoka-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Fredoka';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/fredoka-500-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Fredoka';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/fredoka-600-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Handlee';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/handlee-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Sans';
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/instrument-sans-latin.woff2') format('woff2');
}

/* Registered so a room change can transition them. */
@property --surface { syntax: '<color>'; inherits: true; initial-value: #EEF0F7; }
@property --sheet { syntax: '<color>'; inherits: true; initial-value: #FBFCFF; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #131A2E; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #2F4FA0; }

:root {
  /* Cobalt, light — src/design/themes.ts THEME_ROOMS.cobalt.light */
  --surface: #EEF0F7;
  --sheet: #FBFCFF;
  --ink: #131A2E;
  --accent: #2F4FA0;
  --on-accent: #FFFFFF;

  --paper: #FFFDF9;

  --font-display: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --font-hand: 'Handlee', 'Segoe Print', cursive;
  --font-ui: 'Instrument Sans', system-ui, -apple-system, sans-serif;

  /* The app's springs (tokens.ts springs.peel 220/24, snap 300/30,
     soft 120/20), integrated and sampled into linear(). No linear or
     cubic ease anywhere on this page. */
  --peel: linear(0, 0.033, 0.111, 0.216, 0.33, 0.441, 0.548, 0.641, 0.725, 0.795, 0.851, 0.896, 0.932, 0.958, 0.978, 0.992, 1.002, 1.008, 1.011, 1.012, 1.013, 1.012, 1.011, 1.01, 1.008, 1.007, 1.005, 1.004, 1.003, 1.002, 1.002, 1.001, 1);
  --snap: linear(0, 0.03, 0.105, 0.2, 0.304, 0.408, 0.509, 0.598, 0.676, 0.744, 0.802, 0.849, 0.887, 0.917, 0.941, 0.959, 0.973, 0.983, 0.991, 0.996, 1, 1.002, 1.003, 1.004, 1.004, 1.004, 1.004, 1.003, 1.003, 1.002, 1.002, 1.002, 1);
  --soft: linear(0, 0.021, 0.072, 0.141, 0.221, 0.302, 0.384, 0.463, 0.537, 0.604, 0.665, 0.718, 0.765, 0.805, 0.839, 0.869, 0.894, 0.915, 0.932, 0.946, 0.958, 0.967, 0.975, 0.981, 0.986, 0.99, 0.993, 0.995, 0.997, 0.998, 0.999, 1, 1);
  --t-peel: 586ms;
  --t-snap: 484ms;
  --t-soft: 622ms;

  --s: 0.82;
  /* phone scale, set from the viewport by home.js */
  --pad: 24px;
  color-scheme: light;
  transition: --surface var(--t-soft) var(--soft), --sheet var(--t-soft) var(--soft),
    --ink var(--t-soft) var(--soft), --accent var(--t-soft) var(--soft);
}

/* Derived from the four room colours. Declared on .screen as well as :root:
   a custom property that uses var() resolves where it is declared, so the
   phone can wear a room of its own without the page. */
:root,
.screen {
  --sunken: color-mix(in oklab, var(--ink) 6%, var(--surface));
  --raised: var(--sheet);
  --ink-muted: color-mix(in oklab, var(--ink) 70%, var(--surface));
  --ink-faint: color-mix(in oklab, var(--ink) 38%, var(--surface));
  --accent-soft: color-mix(in oklab, var(--accent) 14%, var(--sheet));
  --accent-text: var(--accent);
  --outline: color-mix(in oklab, var(--ink) 11%, transparent);
  --scrim: color-mix(in oklab, var(--ink) 38%, transparent);
  --glow: color-mix(in oklab, var(--accent) 26%, transparent);
  --shadow-float: 0 1px 2px color-mix(in oklab, var(--ink) 7%, transparent),
    0 10px 28px -12px color-mix(in oklab, var(--ink) 22%, transparent);
  --shadow-lift: 0 24px 60px -24px color-mix(in oklab, var(--ink) 40%, transparent);
  --shadow-capture: 0 10px 26px -6px color-mix(in oklab, var(--accent) 55%, transparent);
  /* The logo in the room's colours — src/design/brandMarkColors.ts, same rules. */
  --mark-page: var(--accent-soft);
  --mark-plate: var(--accent);
  --mark-rim: var(--on-accent);
  --mark-coil: var(--ink);
  --mark-hole: var(--surface);
  --mark-ground: var(--sheet);
}

/* ── The logo (inline SVG, drawn in the room's colours) ──
   Shapes: marketing/logo/source/logo-final.js; colours: --mark-* above. The
   binding holes show whatever the mark sits on. No tile behind it: only the
   favicon (js/theme.js) gets a --mark-ground square, since a tab needs one. */
.pd-mark .pg { fill: var(--mark-page); }
.pd-mark .pl { fill: var(--mark-plate); }
.pd-mark .rm { fill: none; stroke: var(--mark-rim); stroke-width: 3.2; }
.pd-mark .cl { fill: var(--mark-coil); }
.pd-mark .hl { fill: var(--mark-hole); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Cobalt, dark */
    --surface: #0D1120;
    --sheet: #161B2E;
    --ink: #E7EBF7;
    --accent: #8EA7EC;
    --on-accent: #131A2E;
    color-scheme: dark;
  }

  :root:not([data-theme="light"]),
  :root:not([data-theme="light"]) .screen {
    --sunken: color-mix(in oklab, var(--ink) 7%, var(--surface));
    --raised: color-mix(in oklab, var(--ink) 4%, var(--sheet));
    --accent-soft: color-mix(in oklab, var(--accent) 20%, var(--sheet));
    --scrim: color-mix(in oklab, #000 55%, transparent);
    --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 30px 70px -24px rgba(0, 0, 0, 0.75);
    --mark-page: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
    --mark-plate: var(--ink);
    --mark-rim: color-mix(in srgb, var(--accent) 50%, var(--surface));
    --mark-coil: var(--accent);
    --mark-hole: var(--surface);
  }
}

:root[data-theme="dark"] {
  --surface: #0D1120;
  --sheet: #161B2E;
  --ink: #E7EBF7;
  --accent: #8EA7EC;
  --on-accent: #131A2E;
  color-scheme: dark;
}

:root[data-theme="dark"],
:root[data-theme="dark"] .screen {
  --sunken: color-mix(in oklab, var(--ink) 7%, var(--surface));
  --raised: color-mix(in oklab, var(--ink) 4%, var(--sheet));
  --accent-soft: color-mix(in oklab, var(--accent) 20%, var(--sheet));
  --scrim: color-mix(in oklab, #000 55%, transparent);
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 30px 70px -24px rgba(0, 0, 0, 0.75);
  --mark-page: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
  --mark-plate: var(--ink);
  --mark-rim: color-mix(in srgb, var(--accent) 50%, var(--surface));
  --mark-coil: var(--accent);
  --mark-hole: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-peel: 1ms;
    --t-snap: 1ms;
    --t-soft: 1ms;
  }
}

/* ── base ─────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent-text);
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 10px;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 400;
}

.caps {
  font: 600 12px/1.3 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}

.i--sm {
  width: 16px;
  height: 16px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
}

.skip:focus {
  top: 12px;
}

/* ── the top bar ──────────────────────────────────────────────────── */

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 64px;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  justify-self: start;
}

.brand__icon {
  flex: none;
  width: 36px;
  height: auto;
}

.brand__word {
  font: 600 22px/1 var(--font-display);
  letter-spacing: -0.01em;
}

.brand__dot,
.bh__dot {
  color: var(--accent);
}

.course {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  align-items: center;
  border-radius: 999px;
  background: var(--sunken);
  overflow: hidden;
}

.course__no {
  font: 600 14px/1 var(--font-display);
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.course__name {
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  display: inline-block;
}

.course__name.is-swap {
  animation: courseIn var(--t-peel) var(--peel);
}

@keyframes courseIn {
  from {
    transform: translateY(70%);
    opacity: 0;
  }
}

.top__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.round {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--sunken);
  color: var(--ink);
  transition: opacity 120ms var(--snap);
}

.round:active {
  opacity: 0.72;
}

.round--raised {
  background: var(--raised);
  box-shadow: var(--shadow-float);
}

/* ── buttons ──────────────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--sheet);
  color: var(--ink);
  font: 500 17px/1 var(--font-display);
  text-decoration: none;
  box-shadow: var(--shadow-float);
  transition: transform var(--t-snap) var(--snap), opacity 120ms var(--snap);
}

.pill:hover {
  transform: translateY(-2px);
}

.pill:active {
  opacity: 0.72;
  transform: translateY(0);
}

.pill--accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-capture);
}

.pill--small {
  height: 40px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--sunken);
  color: var(--ink);
  font: 600 15px/1 var(--font-ui);
  transition: background-color var(--t-snap) var(--snap), color var(--t-snap) var(--snap), opacity 120ms;
}

.chip:hover {
  background: color-mix(in oklab, var(--ink) 10%, var(--surface));
}

.chip:active {
  opacity: 0.72;
}

.chip.is-on {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.chip--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.chip--accent:hover {
  background: var(--accent);
}

.linkish {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ═══ layout: the chapters and the rail ═══════════════════════════════ */

#story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(32px, 6vw, 110px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.rail {
  grid-column: 2;
  grid-row: 1 / span 16;
  position: relative;
  width: calc(414px * var(--s));
}

.device {
  position: sticky;
  top: calc(50vh - 434px * var(--s) + 20px);
  width: 414px;
  height: 868px;
  transform: scale(var(--s));
  transform-origin: 0 0;
  margin-bottom: calc(868px * (var(--s) - 1));
  contain: layout style;
}

.device__note {
  position: sticky;
  top: calc(50vh + 434px * var(--s) + 34px);
  margin-top: 8px;
  text-align: center;
  font-size: 18px;
  color: var(--ink-muted);
  transition: opacity var(--t-soft) var(--soft);
}

.device__note.is-gone {
  opacity: 0;
}

.ch {
  grid-column: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 96px 0;
}

.ch__copy {
  max-width: 540px;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.js .ch:not(.is-active) .ch__copy {
  opacity: 0.28;
  transform: translateY(10px);
}

.ch h2,
.panel h2 {
  font: 500 clamp(34px, 3.8vw, 54px)/1.04 var(--font-display);
  letter-spacing: -0.015em;
  margin: 14px 0 18px;
  text-wrap: balance;
}

.ch p,
.panel p {
  color: var(--ink-muted);
  text-wrap: pretty;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 13px/1 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted) !important;
}

.kicker span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 14px/1 var(--font-display);
  letter-spacing: 0;
}

.tier {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent-text) !important;
}

.tier--quiet {
  display: block;
  font-weight: 400;
  color: var(--ink-muted) !important;
}

/* Explicit rows: on one column the rail overlaps them instead of pushing
   them below it. */
.ch:nth-of-type(1) {
  grid-row: 1;
}

.ch:nth-of-type(2) {
  grid-row: 2;
}

.ch:nth-of-type(3) {
  grid-row: 3;
}

.ch:nth-of-type(4) {
  grid-row: 4;
}

.ch:nth-of-type(5) {
  grid-row: 5;
}

.ch:nth-of-type(6) {
  grid-row: 6;
}

.ch:nth-of-type(7) {
  grid-row: 7;
}

.ch:nth-of-type(8) {
  grid-row: 8;
}

.ch:nth-of-type(9) {
  grid-row: 9;
}

.ch:nth-of-type(10) {
  grid-row: 10;
}

.ch:nth-of-type(11) {
  grid-row: 11;
}

.ch:nth-of-type(12) {
  grid-row: 12;
}

.ch:nth-of-type(13) {
  grid-row: 13;
}

.ch:nth-of-type(14) {
  grid-row: 14;
}

.ch:nth-of-type(15) {
  grid-row: 15;
}

.ch:nth-of-type(16) {
  grid-row: 16;
}

/* ── the hero ── */

.ch--hero {
  padding-top: 120px;
}

.ch--hero .ch__copy {
  max-width: 660px;
}

.release-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px 0 4px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 14px/1 var(--font-ui);
  text-decoration: none;
  transition: transform var(--t-snap) var(--snap);
}

.release-chip b {
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.release-chip:hover {
  transform: translateX(3px);
}

.hero__title {
  margin: 26px 0 22px;
  font: 600 clamp(46px, 5.4vw, 84px)/0.98 var(--font-display);
  letter-spacing: -0.025em;
}

.hero__line {
  display: block;
}

.hero__line.hand {
  margin-top: 0.12em;
  font-size: 0.8em;
  letter-spacing: -0.01em;
  color: var(--accent-text);
}

.js .hero__line {
  opacity: 0;
  transform: translateY(24px);
}

.js .is-ready .hero__line {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.js .is-ready .hero__line + .hero__line {
  transition-delay: 90ms;
}

.lede {
  font-size: 19px;
  max-width: 480px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__free {
  margin-top: 20px;
}

.stopwatch {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 26px;
  font: 600 48px/1 var(--font-display);
  color: var(--ink) !important;
  font-variant-numeric: tabular-nums;
}

.stopwatch .i {
  align-self: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  color: var(--accent-text);
}

.stopwatch .hand {
  margin-left: 10px;
  font-size: 19px;
  color: var(--ink-muted);
}

/* ── the rooms (Look & feel chapter) ── */

.rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.room {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--r-accent) 0 50%, var(--r-surface) 50% 100%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--r-ink) 14%, transparent);
  transition: transform var(--t-snap) var(--snap);
}

.room:hover {
  transform: translateY(-3px);
}

.room[aria-pressed="true"] {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ── privacy ── */

.quiet-facts {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 10px;
}

.quiet-facts li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-muted);
}

.quiet-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%232F4FA0' d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.policy-link {
  font-weight: 600;
}

/* ── premium ── */

.premium-inclusions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.premium-inclusions span {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
  font-size: 15px;
  font-weight: 500;
}

/* ── FAQ & contact ── */

.panel {
  grid-column: 1 / -1;
  padding: 110px 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

.panel__inner {
  max-width: 760px;
  margin: 0 auto;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.faq-item {
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.faq-item__q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  font: 500 19px/1.3 var(--font-display);
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__icon {
  flex: none;
  color: var(--accent-text);
  transition: transform var(--t-snap) var(--snap);
}

.faq-item[open] .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__a {
  padding: 0 22px 22px;
}

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding: 24px;
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.contact-form__field {
  display: grid;
  gap: 8px;
}

.contact-form label {
  font-weight: 600;
  font-size: 15px;
}

.contact-form__optional {
  font-weight: 400;
  color: var(--ink-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--sunken);
  color: var(--ink);
  font: 400 17px/1.4 var(--font-ui);
  padding: 13px 14px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-faint);
}

.contact-form .pill {
  justify-self: start;
  border: 0;
  cursor: pointer;
}

.contact-more {
  margin-top: 18px;
  font-size: 15px;
}

/* ── the dessert: a pile to throw ── */

.playground {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 110px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(120% 70% at 50% 100%, var(--sunken), var(--surface));
  overflow: hidden;
  touch-action: pan-y;
}

.playground__copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.playground__copy a,
.playground__copy button {
  pointer-events: auto;
}

.playground__title {
  margin: 16px 0 16px;
  font: 600 clamp(38px, 5vw, 70px)/1 var(--font-display);
  letter-spacing: -0.02em;
}

.playground__title .hand {
  display: block;
  color: var(--accent-text);
  font-size: 0.82em;
  margin-top: 0.1em;
}

.playground__lede {
  color: var(--ink-muted);
  max-width: 520px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 22px 0 20px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  box-shadow: var(--shadow-lift);
  transition: transform var(--t-snap) var(--snap), opacity 120ms;
}

.store-btn:hover {
  transform: translateY(-3px);
}

.store-btn:active {
  opacity: 0.72;
}

.store-btn__label {
  display: grid;
  gap: 1px;
  text-align: left;
}

.store-btn__kicker {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: 0.75;
  line-height: 1.3;
}

.store-btn__name {
  font: 600 19px/1.15 var(--font-display);
  white-space: nowrap;
}

.avail {
  margin-top: 16px;
}

.pit {
  position: absolute;
  inset: 0 0 64px;
  z-index: 1;
}

.pit__save {
  position: absolute;
  left: 0;
  top: 0;
  width: 128px;
  height: auto;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  opacity: 0;
}

.pit.is-live .pit__save {
  opacity: 1;
}

.pit__save:active {
  cursor: grabbing;
}

.smallprint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 64px;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--outline);
  font-size: 14px;
  color: var(--ink-muted);
}

.smallprint a {
  color: inherit;
}

/* ═══ the phone ═══════════════════════════════════════════════════════
   Everything inside is drawn in px at the real 390×844 pt canvas, then the
   whole device is scaled once. */

.device__frame {
  position: absolute;
  inset: 0;
  border-radius: 64px;
  padding: 12px;
  background: #0A0D17;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--ink) 18%, #0A0D17), var(--shadow-lift),
    0 50px 120px -40px var(--glow);
}

.screen {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 52px;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/1.4 var(--font-ui);
  isolation: isolate;
  user-select: none;
  transition: --surface var(--t-soft) var(--soft), --sheet var(--t-soft) var(--soft),
    --ink var(--t-soft) var(--soft), --accent var(--t-soft) var(--soft);
  -webkit-user-select: none;
}

.status {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  height: 54px;
  padding: 0 30px 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 16px/1 var(--font-ui);
  color: var(--ink);
  pointer-events: none;
  transition: color 200ms var(--soft);
}

.screen[data-dark-status="1"] .status {
  color: #fff;
}

.island {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 122px;
  height: 35px;
  margin-left: -61px;
  border-radius: 20px;
  background: #000;
}

.status__icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status__icons svg {
  fill: currentColor;
}

.status__signal {
  width: 18px;
  height: 12px;
}

.status__wifi {
  width: 16px;
  height: 12px;
}

.status__plane {
  width: 16px;
  height: 16px;
  display: none;
}

.status__battery {
  width: 27px;
  height: 13px;
}

.screen[data-offline="1"] .status__plane {
  display: block;
}

.screen[data-offline="1"] .status__wifi,
.screen[data-offline="1"] .status__signal {
  display: none;
}

.homebar {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 45;
  width: 138px;
  height: 5px;
  margin-left: -69px;
  border-radius: 3px;
  background: var(--ink);
  opacity: 0.8;
  pointer-events: none;
}

.screen[data-dark-status="1"] .homebar {
  background: #fff;
}

/* screens: stacked; only the ones on stage are visible */
.scr {
  position: absolute;
  inset: 0;
  padding-top: 54px;
  background: var(--surface);
  visibility: hidden;
  overflow: hidden;
  contain: strict;
  will-change: auto;
}

.scr.is-on {
  visibility: visible;
}

.scroll {
  height: 100%;
  overflow: hidden;
  padding: 8px var(--pad) 130px;
}

.t-display {
  font: 600 40px/1.05 var(--font-display);
  letter-spacing: -0.01em;
}

.t-title {
  font: 500 26px/1.12 var(--font-display);
  letter-spacing: -0.01em;
}

.t-heading {
  font: 500 17px/1.25 var(--font-display);
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-muted);
}

.meta .i + * {
  margin-right: 6px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/1.2 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.eyebrow--center {
  justify-content: center;
}

.center {
  text-align: center;
}

.card {
  border-radius: 20px;
  background: var(--sheet);
  padding: 16px;
  box-shadow: var(--shadow-float);
}

.btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 15px/1 var(--font-ui);
  background: var(--raised);
}

.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--lg {
  height: 52px;
  width: 100%;
  font-size: 17px;
}

.btn--sm {
  height: 32px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
}

.btn--quiet {
  width: 100%;
  background: var(--sunken);
  margin-top: 12px;
}

.bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 8px;
}

.bar__gap {
  flex: 1;
}

.bar__title {
  flex: 1;
  text-align: center;
  font: 500 17px/1 var(--font-display);
}

.bar--over {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
}

.field {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--sunken);
  color: var(--ink-muted);
  font-size: 15px;
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 17px/1 var(--font-display);
  outline: none;
}

.grabber {
  display: block;
  width: 36px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 3px;
  background: var(--ink-faint);
  opacity: 0.6;
}

.avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 21px/1 var(--font-display);
  box-shadow: 0 0 0 3px var(--sheet);
}

.avatar--b {
  background: color-mix(in oklab, #C9853B 20%, var(--sheet));
  color: color-mix(in oklab, #8A5A12 85%, var(--ink));
}

.avatar--m {
  background: color-mix(in oklab, #B83E6A 16%, var(--sheet));
  color: color-mix(in oklab, #A12E45 85%, var(--ink));
}

.avatar--xs {
  width: 24px;
  height: 24px;
  font-size: 12px;
  box-shadow: 0 0 0 2px var(--surface);
}

.avatar--xs + .avatar--xs {
  margin-left: -10px;
}

.avatar--xl {
  width: 104px;
  height: 104px;
  font-size: 46px;
  box-shadow: 0 0 0 5px var(--sheet), var(--shadow-float);
}

.i--f {
  display: none;
}

/* ── capture ── */

.scr--capture {
  background: #000;
  padding-top: 0;
}

.cam {
  position: absolute;
  inset: 0;
}

.cam__frame {
  position: absolute;
  left: 0;
  right: 0;
  top: 118px;
  height: 520px;
  overflow: hidden;
}

.cam__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cam__photo {
  transition: opacity 360ms var(--soft), filter 360ms var(--soft);
}

.cam.is-cut .cam__photo {
  opacity: 0;
}

.cam__bare {
  transition: filter var(--t-soft) var(--soft);
}

.cam.is-dim .cam__bare {
  filter: brightness(0.42) saturate(0.7);
}

.cam__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 110px;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, #8EA7EC 35%, transparent) 70%, #fff 99%, transparent);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateY(-120px);
  pointer-events: none;
}

.cam__flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.cam__top {
  position: absolute;
  top: 58px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.glass {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.round--sm {
  width: 38px;
  height: 38px;
}

.cam__chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 16px;
  transition: opacity 300ms var(--soft);
}

.cam__bottom {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.cam.is-dim .cam__bottom {
  opacity: 0;
  transform: translateY(30px);
}

.cam__found {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 82px;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #fff;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.cam__found b {
  font: 600 30px/1.1 var(--font-display);
}

.cam__found span {
  font-size: 18px;
  opacity: 0.8;
}

.cam.is-dim .cam__found {
  opacity: 1;
  transform: none;
  transition-delay: 200ms;
}

.cam__thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}

.cam__thumb img {
  width: 34px;
}

.shutter {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px #fff;
  display: grid;
  place-items: center;
}

.shutter__core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms var(--snap);
}

.shutter:active .shutter__core,
.shutter.is-press .shutter__core {
  transform: scale(0.86);
}

.cuts {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 118px;
  height: 520px;
  pointer-events: none;
}

.cut {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  height: auto;
  margin-left: calc(var(--w) * -0.5%);
  translate: 0 -50%;
  opacity: 0;
  will-change: transform, opacity;
}

.keep {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 398px;
  padding: 10px 22px 34px;
  border-radius: 28px 28px 0 0;
  background: var(--sheet);
  color: var(--ink);
  transform: translateY(105%);
  display: flex;
  flex-direction: column;
}

.keep__title {
  font: 500 26px/1.1 var(--font-display);
}

.keep__sub {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 14px;
}

.keep__slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 10px;
  margin: 16px 0 auto;
}

.keep__slot {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.keep__slot i {
  width: 88px;
  height: 78px;
}

.keep__slot span {
  font-size: 14px;
  color: var(--ink-faint);
}

.keep__slot:nth-child(2) span {
  color: var(--ink);
}

.keep__slots .keep__slot:nth-child(4) {
  grid-column: 1 / span 1;
  margin-left: 50%;
}

.keep__slots .keep__slot:nth-child(5) {
  margin-left: 50%;
}

/* ── the board ── */

.bh {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
}

/* The app's board header draws the bare mark in the room's colours
   (BrandMark.tsx); so does this one. */
.bh__icon {
  flex: none;
  width: 52px;
  height: auto;
}

.bh__words {
  flex: 1;
  min-width: 0;
}

.bh__name {
  font: 600 31px/1.05 var(--font-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bh__tag {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-muted);
}

.uswitch {
  position: relative;
  height: 52px;
  margin: 20px 0 16px;
  padding: 4px;
  border-radius: 14px;
  background: var(--sunken);
  display: flex;
  touch-action: pan-y;
}

.uswitch__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 10px;
  border-radius: 11px;
  background: var(--raised);
  box-shadow: var(--shadow-float);
  transform-origin: 0 0;
}

.uslot {
  position: relative;
  z-index: 1;
  height: 44px;
  flex: none;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  color: var(--ink-muted);
  font: 600 16px/1 var(--font-ui);
  white-space: nowrap;
}

.uslot span {
  opacity: 0;
  max-width: 0;
}

.uslot[aria-selected="true"] {
  color: var(--accent-text);
}

.uslot[aria-selected="true"] .i--r {
  display: none;
}

.uslot[aria-selected="true"] .i--f {
  display: block;
}

.panes {
  position: relative;
}

.pane {
  display: none;
}

.pane.is-on {
  display: block;
  animation: paneIn var(--t-peel) var(--peel);
}

@keyframes paneIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.showcase .t-title {
  margin: 8px 0 6px;
}

.well {
  position: relative;
  height: 180px;
  margin-top: 14px;
  border-radius: 14px;
  background: var(--sunken);
}

.w-save {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--w);
  transform: rotate(var(--r));
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.tile__icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
}

.tile__icon .i {
  width: 24px;
  height: 24px;
}

.tile__icon--soft {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.tile p {
  display: grid;
  min-width: 0;
}

.tile b {
  font: 500 16px/1.2 var(--font-display);
  white-space: nowrap;
}

.tile span {
  font-size: 13px;
  color: var(--ink-muted);
}

.day {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.day__date {
  width: 40px;
  display: grid;
  justify-items: center;
}

.day__date b {
  font: 600 26px/1 var(--font-display);
  color: var(--accent-text);
}

.day__date span {
  font: 600 10px/1.4 var(--font-ui);
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.day__row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 10px 0 14px;
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.day__row span {
  flex: 1;
  font: 500 15px/1.2 var(--font-display);
}

.day__row em {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-muted);
}

.day__row img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.month {
  padding: 14px 12px;
}

.month__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px 8px;
}

.month__dow,
.month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.month__dow span {
  font: 600 11px/2 var(--font-ui);
  color: var(--ink-faint);
}

.mday {
  position: relative;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.mday img {
  position: absolute;
  width: 38px;
  height: 38px;
  object-fit: contain;
  left: 50%;
  top: 50%;
  margin: -19px 0 0 -19px;
}

.mday.is-today {
  color: var(--accent-text);
  font-weight: 700;
}

.mday.has-dot::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 1px;
  background: var(--outline);
}

.timeline li {
  margin-bottom: 14px;
}

.timeline__day {
  position: relative;
  font: 600 12px/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 4px 0 8px;
}

.timeline__day::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--surface);
}

.trow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.trow img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.trow p {
  flex: 1;
  display: grid;
}

.trow b {
  font-size: 19px;
  line-height: 1.2;
}

.trow span {
  font-size: 13px;
  color: var(--ink-muted);
}

.stars {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 1px;
}

.mapcard {
  position: relative;
  height: 158px;
  margin: 12px 0;
  padding: 0;
  overflow: hidden;
  background: color-mix(in oklab, var(--accent) 7%, var(--sunken));
}

.mapcard__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.road {
  fill: none;
  stroke: var(--sheet);
  stroke-width: 12;
  stroke-linecap: round;
}

.road--thin {
  stroke-width: 6;
}

.map-water {
  fill: color-mix(in oklab, var(--accent) 22%, var(--sunken));
}

.pin {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: 46px;
  height: 46px;
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  background: var(--paper);
  box-shadow: var(--shadow-float);
  display: grid;
  place-items: center;
}

.pin img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transform: rotate(45deg);
}

.mapcard__more {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--sheet);
  font: 600 13px/1 var(--font-ui);
  color: var(--accent-text);
}

.prow,
.crow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.prow img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.prow p,
.crow p {
  flex: 1;
  display: grid;
}

.prow b,
.crow b {
  font: 500 17px/1.2 var(--font-display);
}

.prow p span,
.crow p span {
  font-size: 13px;
  color: var(--ink-muted);
}

.prow em {
  font-style: normal;
  font: 600 13px/1 var(--font-ui);
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.roundtable {
  position: relative;
  height: 290px;
  margin: 4px 0 8px;
}

.roundtable__top {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 176px;
  height: 128px;
  margin: -64px 0 0 -88px;
  border-radius: 50%;
  background: var(--sunken);
}

.roundtable__top img {
  position: absolute;
  width: 74px;
  height: auto;
}

.roundtable__top img:nth-child(1) {
  left: 24px;
  top: 14px;
  transform: rotate(-12deg);
}

.roundtable__top img:nth-child(2) {
  left: 70px;
  top: 34px;
  transform: rotate(6deg);
}

.roundtable__top img:nth-child(3) {
  left: 52px;
  top: 58px;
  width: 64px;
  transform: rotate(-4deg);
}

.seat {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  margin: -40px 0 0 -38px;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform: rotate(var(--a)) translate(118px, 0) rotate(calc(var(--a) * -1)) translateY(4px);
}

.seat b {
  font: 500 15px/1 var(--font-display);
}

.seat .avatar {
  width: 58px;
  height: 58px;
  font-size: 25px;
  box-shadow: 0 0 0 4px var(--sheet), var(--shadow-float);
}

/* ── the moment ── */

.mhead {
  padding: 4px var(--pad) 0;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.mhead .t-title {
  margin: 6px 0 8px;
}

.mhead .meta {
  gap: 0;
}

.mhead .meta .avatar--xs:last-of-type {
  margin-right: 8px;
}

.tablestage {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 214px;
  height: 400px;
  border-radius: 26px;
  background: radial-gradient(75% 65% at 50% 45%, color-mix(in oklab, var(--accent) 7%, var(--sheet)), var(--sunken));
  overflow: hidden;
  touch-action: none;
  transition: transform var(--t-peel) var(--peel), height var(--t-peel) var(--peel);
}

.cloth,
.pool {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-soft) var(--soft);
  pointer-events: none;
}

.cloth {
  background:
    repeating-linear-gradient(0deg, color-mix(in oklab, var(--accent) 13%, transparent) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--accent) 13%, transparent) 0 22px, transparent 22px 44px),
    var(--sheet);
}

.pool {
  top: 46%;
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 35%, transparent), color-mix(in oklab, var(--accent) 55%, transparent));
  border-radius: 40% 60% 0 0 / 12px 12px 0 0;
}

.scr--moment.is-play .cloth {
  opacity: 1;
}

.scr--moment.is-water .pool {
  opacity: 0.8;
}

.ms {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--w);
  margin: 0;
  transform: rotate(var(--r));
  will-change: transform;
  touch-action: none;
}

.ms img {
  width: 100%;
  height: auto;
  pointer-events: none;
}

.ms figcaption {
  margin-top: -4px;
  text-align: center;
  font-size: 15px;
  line-height: 1.1;
  transition: opacity 200ms var(--soft);
}

.scr--moment.is-play .ms figcaption {
  opacity: 0;
}

.scr--moment.is-play .ms {
  cursor: grab;
}

.mfoot {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 628px;
}

.thread {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.thread .eyebrow {
  width: 100%;
}

.thread__line {
  flex: 1;
  font-size: 15px;
}

.thread img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin: -12px 0 -6px;
}

.playmodes {
  position: absolute;
  inset: 0 0 auto;
  height: 48px;
  padding: 4px;
  display: flex;
  border-radius: 14px;
  background: var(--sunken);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.playmodes button {
  position: relative;
  z-index: 1;
  flex: 1;
  font: 600 15px/1 var(--font-ui);
  color: var(--ink-muted);
  transition: color var(--t-snap) var(--snap);
}

.playmodes button[aria-selected="true"] {
  color: var(--on-accent);
}

.playmodes__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: 11px;
  background: var(--accent);
  transform: translateX(calc(var(--pi, 0) * 100%));
  transition: transform var(--t-snap) var(--snap);
}

.scr--moment.is-play .mhead {
  opacity: 0;
  transform: translateY(-20px);
}

.scr--moment.is-play .tablestage {
  transform: translateY(-108px);
  height: 508px;
}

.scr--moment.is-play .thread {
  opacity: 0;
  transform: translateY(20px);
}

.scr--moment.is-play .playmodes {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#playBtn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* ── sheets ── */

.scr--sheet {
  background: transparent;
  padding-top: 0;
}

.scr--sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: var(--scrim-o, 0);
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  top: 66px;
  bottom: 0;
  padding: 10px var(--pad) 40px;
  border-radius: 28px 28px 0 0;
  background: var(--sheet);
  box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, 0.4);
}

.save-hero {
  height: 214px;
  display: grid;
  place-items: center;
}

.save-hero img {
  max-height: 206px;
  width: auto;
}

.save-name {
  text-align: center;
  font-size: 32px;
  line-height: 1.1;
  margin-top: 4px;
}

.kinds {
  display: flex;
  width: 220px;
  margin: 14px auto 0;
  padding: 3px;
  border-radius: 12px;
  background: var(--sunken);
}

.kind {
  flex: 1;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font: 600 14px/1 var(--font-ui);
  color: var(--ink-muted);
}

.kind.is-on {
  background: var(--raised);
  color: var(--accent-text);
  box-shadow: var(--shadow-float);
}

.rate {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 30px;
  line-height: 1;
  color: var(--sunken);
}

.rate span {
  display: inline-block;
  transition: color 160ms var(--snap);
  -webkit-text-stroke: 0;
}

.rate span.is-on {
  color: var(--accent);
  animation: starPop var(--t-snap) var(--snap);
}

@keyframes starPop {
  40% {
    transform: scale(1.35) rotate(-8deg);
  }
}

.facts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--sunken);
  font: 600 13px/1 var(--font-ui);
}

.fact:first-child {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.thoughts {
  margin: 18px 6px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--sunken);
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink-muted);
}

.tagchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tagchips span {
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 13px/1 var(--font-ui);
}

.tagchips .tagchips__add {
  background: var(--sunken);
  color: var(--ink-muted);
}

/* ── a place ── */

.scr--place {
  padding-top: 0;
}

.placemap {
  position: relative;
  height: 272px;
  background: color-mix(in oklab, var(--accent) 7%, var(--sunken));
  overflow: hidden;
}

.placemap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.savepin {
  position: absolute;
  left: 50%;
  top: 150px;
  width: 78px;
  height: 78px;
  margin: -78px 0 0 -39px;
  border-radius: 50% 50% 50% 8px;
  transform: rotate(-45deg);
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  display: grid;
  place-items: center;
  animation: pinDrop var(--t-peel) var(--peel) both;
}

.savepin img {
  width: 62px;
  transform: rotate(45deg);
}

@keyframes pinDrop {
  from {
    translate: 0 -40px;
    opacity: 0;
  }
}

.place-body {
  position: relative;
  margin-top: -26px;
  padding: 22px var(--pad) 40px;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
}

.place-body > .meta {
  margin: 4px 0 14px;
}

.usual {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.usual img {
  width: 76px;
  height: 66px;
  object-fit: contain;
}

.usual p {
  display: grid;
  gap: 2px;
}

.usual b {
  font-size: 23px;
  line-height: 1.15;
}

.menu .t-heading {
  margin-bottom: 8px;
}

.menu__line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
}

.menu__line span {
  font-size: 19px;
}

.menu__line i {
  flex: 1;
  height: 1px;
  border-bottom: 2px dotted var(--ink-faint);
  transform: translateY(-4px);
}

.menu__line b {
  font: 600 14px/1 var(--font-ui);
  color: var(--accent-text);
}

/* ── a companion ── */

.friend {
  padding: 8px var(--pad) 40px;
  display: grid;
  justify-items: center;
  text-align: center;
}

.friend .t-title {
  margin-top: 16px;
  font-size: 30px;
}

.friend > .meta {
  margin: 4px 0 18px;
}

.friend .card {
  width: 100%;
  text-align: left;
  margin-bottom: 12px;
}

.started__row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.started__row img {
  width: 64px;
  height: 58px;
  object-fit: contain;
}

.started__row p {
  display: grid;
}

.started__row b {
  font-size: 21px;
}

.friend > .caps {
  justify-self: start;
  margin: 6px 0 8px;
}

.spots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-self: start;
}

.spots span {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
  font: 500 14px/1 var(--font-display);
}

/* ── receipt scan ── */

.scr--receipt {
  background: #0C0F18;
}

.rcam {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  padding-top: 92px;
}

.receipt {
  width: 250px;
  padding: 22px 20px 30px;
  background: #FFFEFA;
  color: #1B1B1B;
  font: 400 13px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  transform: rotate(-2deg);
  --zig: 8px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 51% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat;
}

.receipt__head {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.3em;
  font-size: 16px;
}

.receipt__small {
  text-align: center;
  font-size: 11px;
  opacity: 0.6;
  margin: 2px 0 12px;
}

.receipt__small:last-child {
  margin: 14px 0 0;
}

.rl {
  display: flex;
  justify-content: space-between;
  padding: 3px 6px;
  margin: 0 -6px;
  border-radius: 4px;
  transition: background-color 240ms var(--snap);
}

.rl--total {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.35);
  font-weight: 700;
}

.rl.is-read {
  background: rgba(142, 167, 236, 0.4);
}

.rcam__scan {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 90px;
  height: 3px;
  border-radius: 2px;
  background: #8EA7EC;
  box-shadow: 0 0 18px 4px rgba(142, 167, 236, 0.7);
  opacity: 0;
}

.rcam__hint {
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
}

.billsheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 380px;
  padding: 10px var(--pad) 40px;
  border-radius: 28px 28px 0 0;
  background: var(--sheet);
  transform: translateY(105%);
}

.billsheet .t-heading {
  margin-top: 6px;
}

.bill__total {
  font: 600 50px/1.1 var(--font-display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 12px;
}

.bill__lines p {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--outline);
}

.bill__lines img {
  width: 40px;
  height: 36px;
  object-fit: contain;
}

.bill__lines span {
  flex: 1;
  font-size: 19px;
}

.bill__lines b {
  font: 600 15px/1 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

/* ── you ── */

.you__title {
  padding-top: 14px;
}

.pile {
  position: relative;
  display: block;
  width: 100%;
  height: 206px;
  margin-top: 6px;
}

.pile img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: auto;
  margin: -66px 0 0 -66px;
  will-change: transform;
}

.pile__hint {
  text-align: center;
  color: var(--ink-muted);
  font-size: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 12px;
}

.stats p {
  display: grid;
  justify-items: center;
  padding: 12px 0;
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.stats b {
  font: 600 30px/1.1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

.stats span {
  font-size: 13px;
  color: var(--ink-muted);
}

.rhythm__bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  height: 118px;
  margin-top: 10px;
  align-items: end;
}

.rhythm__bars p {
  display: grid;
  justify-items: center;
  gap: 6px;
  height: 100%;
  grid-template-rows: 1fr auto;
}

.rhythm__bars i {
  align-self: end;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--accent-soft);
  transform-origin: 50% 100%;
  transform: scaleY(0.04);
  transition: transform var(--t-peel) var(--peel);
}

.rhythm__bars p:nth-child(3) i {
  background: var(--accent);
}

.rhythm__bars span {
  font-size: 12px;
  color: var(--ink-muted);
}

.scr--you.is-in .rhythm__bars i {
  transform: scaleY(var(--h));
}

.scr--you.is-in .rhythm__bars p:nth-child(2) i {
  transition-delay: 60ms;
}

.scr--you.is-in .rhythm__bars p:nth-child(3) i {
  transition-delay: 120ms;
}

.scr--you.is-in .rhythm__bars p:nth-child(4) i {
  transition-delay: 180ms;
}

.memory {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.memory img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transform: rotate(-6deg);
}

.memory p {
  display: grid;
}

.memory b {
  font-size: 22px;
}

/* ── collections & tags ── */

.shelves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  margin-top: 18px;
}

.shelf {
  display: grid;
  gap: 2px;
}

.shelf__cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  background: var(--accent-soft);
  margin-bottom: 6px;
  overflow: hidden;
}

.shelf__cover--b {
  background: color-mix(in oklab, #5E6B2E 18%, var(--sheet));
}

.shelf__cover--c {
  background: color-mix(in oklab, #C9853B 22%, var(--sheet));
}

.shelf__cover--d {
  background: color-mix(in oklab, #B83E6A 16%, var(--sheet));
}

.shelf__cover img {
  position: absolute;
  width: 62%;
  left: 19%;
  top: 18%;
  transform: rotate(-6deg);
}

.shelf__cover img + img {
  width: 48%;
  left: 44%;
  top: 44%;
  transform: rotate(8deg);
}

.shelf b {
  font: 500 17px/1.2 var(--font-display);
}

.shelf span {
  font-size: 13px;
  color: var(--ink-muted);
}

.tagwall {
  display: flex;
  flex-wrap: wrap;
  gap: 30px 14px;
  padding-top: 40px;
}

.hang {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 12px 26px;
  border-radius: 10px 16px 16px 10px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
  font: 500 18px/1 var(--font-display);
  transform: rotate(var(--r));
  transform-origin: 50% -20px;
}

.hang::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--surface);
}

.hang b {
  font: 600 13px/1 var(--font-ui);
  color: var(--accent-text);
}

/* ── studio ── */

.canvas {
  position: relative;
  width: 342px;
  height: 428px;
  margin: 8px auto 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-float);
  transition: background-color var(--t-soft) var(--soft);
}

/* the app's share backgrounds (exportPalette — frozen, never themed) */
.canvas[data-bg="cream"] {
  background-color: #F6F1E8;
}

.canvas[data-bg="butter"] {
  background-color: #F4E3B0;
}

.canvas[data-bg="wood"] {
  background-color: #9A6B45;
}

.canvas[data-bg="terracotta"] {
  background-color: #C9704F;
}

.canvas[data-bg="sage"] {
  background-color: #B9C6A6;
}

.cv {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

img.cv {
  width: 150px;
  height: auto;
}

.ticket {
  width: 150px;
  padding: 12px 14px;
  background: #FFFDF9;
  color: #2A2118;
  border-radius: 6px;
  -webkit-mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.45);
}

.ticket span {
  display: block;
  font: 600 10px/1.2 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.ticket b {
  font: 600 22px/1.2 var(--font-display);
}

.postmark {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  color: #6E4630;
  background: radial-gradient(circle, transparent 58%, rgba(110, 70, 48, 0.9) 59% 62%, transparent 63%),
    radial-gradient(circle, transparent 66%, rgba(110, 70, 48, 0.55) 67% 69%, transparent 70%);
  font: 600 10px/1.2 var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.postmark b {
  font: 600 18px/1.1 var(--font-display);
  letter-spacing: 0;
}

.rosette {
  width: 78px;
  height: 78px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff;
  background: #2F4FA0;
  clip-path: polygon(50% 0%, 61% 11%, 75% 7%, 80% 21%, 93% 25%, 89% 39%, 100% 50%, 89% 61%, 93% 75%, 80% 79%, 75% 93%, 61% 89%, 50% 100%, 39% 89%, 25% 93%, 20% 79%, 7% 75%, 11% 61%, 0% 50%, 11% 39%, 7% 25%, 20% 21%, 25% 7%, 39% 11%);
}

.rosette b {
  font: 600 24px/1 var(--font-display);
}

.rosette span {
  font: 600 10px/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cv-words {
  font-size: 30px;
  line-height: 1;
  color: #2A2118;
  white-space: nowrap;
}

.canvas[data-bg="wood"] .cv-words,
.canvas[data-bg="terracotta"] .cv-words {
  color: #FFFDF9;
}

.templates {
  display: flex;
  gap: 8px;
  padding: 16px var(--pad) 0;
  overflow: hidden;
}

.templates button {
  flex: none;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  background: var(--sunken);
  font: 600 14px/1 var(--font-ui);
  transition: background-color var(--t-snap) var(--snap), color var(--t-snap) var(--snap);
}

.templates button.is-on {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 18px 0 0;
}

.swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform var(--t-snap) var(--snap);
}

.swatch.is-on {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 0 0 3px var(--surface), 0 0 0 5px var(--ink);
}

.swatch:active {
  transform: scale(0.9);
}

.swatch[data-bg="cream"] {
  background: #F6F1E8;
}

.swatch[data-bg="butter"] {
  background: #F4E3B0;
}

.swatch[data-bg="wood"] {
  background: #9A6B45;
}

.swatch[data-bg="terracotta"] {
  background: #C9704F;
}

.swatch[data-bg="sage"] {
  background: #B9C6A6;
}

/* ── look & feel ── */

.looks {
  display: flex;
  gap: 14px;
  padding: 18px 105px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.looks::-webkit-scrollbar {
  display: none;
}

.lookcard {
  flex: none;
  width: 180px;
  height: 300px;
  scroll-snap-align: center;
  border-radius: 24px;
  padding: 16px 14px;
  background: var(--l-surface);
  color: var(--l-ink);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  transition: transform var(--t-peel) var(--peel), box-shadow var(--t-soft) var(--soft);
}

.lookcard.is-on {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift), 0 0 0 3px var(--l-accent);
}

.lookcard__name {
  font: 600 24px/1 var(--font-display);
}

.lookcard__name i {
  color: var(--l-accent);
  font-style: normal;
}

.lookcard__card {
  flex: 1;
  border-radius: 14px;
  background: var(--l-sheet);
  position: relative;
  overflow: hidden;
}

.lookcard__card img {
  position: absolute;
  width: 58%;
  left: 21%;
  top: 14%;
  transform: rotate(-5deg);
}

.lookcard__card b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font: 400 17px/1 var(--font-hand);
}

.lookcard__row {
  display: flex;
  gap: 6px;
}

.lookcard__row span {
  flex: 1;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--l-ink) 7%, var(--l-surface));
}

.lookcard__row span:first-child {
  background: var(--l-accent);
}

.looks__name {
  text-align: center;
  font-size: 22px;
  margin-top: 2px;
}

.namefield {
  padding: 18px var(--pad) 0;
}

.namefield .caps {
  margin-bottom: 8px;
}

.field--edit {
  height: 52px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
  cursor: text;
}

.trybar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 60px;
  padding: 0 12px 0 18px;
  border-radius: 20px;
  background: var(--raised);
  box-shadow: var(--shadow-lift);
  font-size: 15px;
  color: var(--ink-muted);
}

.trybar b {
  color: var(--ink);
  font-weight: 600;
}

/* ── home & lock screens ── */

.scr--home {
  padding-top: 0;
  background: #1D2340;
}

.wall {
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(60% 45% at 20% 18%, color-mix(in oklab, var(--accent) 80%, #fff 10%), transparent 70%),
    radial-gradient(55% 50% at 85% 60%, color-mix(in oklab, var(--accent) 50%, #F2A07B 40%), transparent 70%),
    radial-gradient(70% 50% at 30% 95%, color-mix(in oklab, var(--accent) 60%, #0D1120), transparent 70%),
    linear-gradient(170deg, color-mix(in oklab, var(--accent) 55%, #0D1120), #0D1120);
}

.homegrid {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 76px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 22px;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.wgt {
  position: relative;
  border-radius: 24px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.wgt--m {
  grid-column: 1 / -1;
  height: 160px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.wgt--s {
  height: 160px;
}

.wgt__eyebrow {
  font: 600 11px/1.2 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.memlane img {
  width: 116px;
  height: 120px;
  object-fit: contain;
  transform: rotate(-6deg);
}

.memlane p {
  display: grid;
  gap: 4px;
}

.memlane b {
  font-size: 26px;
  line-height: 1.05;
}

.memlane p > span:last-child {
  font-size: 13px;
  color: var(--ink-muted);
}

.shuffle {
  display: grid;
  justify-items: center;
  align-content: space-between;
  padding: 12px 10px 12px;
}

.shuffle img {
  height: 80px;
  width: auto;
  will-change: transform;
}

.shuffle b {
  font-size: 16px;
  white-space: nowrap;
}

.savewall {
  background: var(--sunken);
}

.savewall img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  margin: -39px 0 0 -39px;
  transform: translate(var(--x), var(--y)) rotate(var(--r));
}

.apps {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding: 4px 6px 0;
}

.app {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.app img,
.app i {
  width: 62px;
  height: 62px;
  border-radius: 15px;
}

.app i {
  background: rgba(255, 255, 255, 0.22);
}

.app em {
  font-style: normal;
  font-size: 12px;
  color: #fff;
}

.dock {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 22px;
  height: 92px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 14px;
  transition: opacity var(--t-soft) var(--soft);
}

.dock i {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.28);
}

.lock {
  position: absolute;
  inset: 0;
  padding-top: 92px;
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
  pointer-events: none;
}

.lock__date {
  font: 600 19px/1 var(--font-ui);
  opacity: 0.9;
}

.lock__time {
  font: 600 104px/1 var(--font-display);
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.lock__widgets {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 18px;
}

.qs {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.qs .i {
  width: 30px;
  height: 30px;
}

.lock__label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}

.scr--home.is-lock .homegrid {
  opacity: 0;
  transform: translateY(40px);
}

.scr--home.is-lock .dock {
  opacity: 0;
}

.scr--home.is-lock .lock {
  opacity: 1;
  transform: none;
}

/* ── premium ── */

.scr--premium .scroll {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.scr--premium .scroll > *:not(.bar) {
  margin-left: var(--pad);
  margin-right: var(--pad);
}

.chef {
  width: 76px;
  height: 76px;
  margin: 4px auto 14px !important;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.chef .i {
  width: 38px;
  height: 38px;
}

.scr--premium .t-title {
  font-size: 30px;
  margin-top: 6px;
  margin-bottom: 16px;
}

.tasting .menu__line span {
  font: 500 17px/1.2 var(--font-display);
}

.tasting .menu__line b {
  font: 400 16px/1.2 var(--font-hand);
  color: var(--ink-muted);
}

.plans {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.plan {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 58px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--sunken);
}

.plan b {
  font: 500 17px/1 var(--font-display);
}

.plan span {
  font-size: 13px;
  color: var(--ink-muted);
}

.plan.is-on {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.invite {
  margin-top: 12px;
}

.invite .t-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* ── tab bar and toast ── */

.tabbar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  gap: 12px;
  transition: opacity var(--t-soft) var(--soft), transform var(--t-peel) var(--peel);
}

.screen[data-tabs="off"] .tabbar {
  opacity: 0;
  transform: translateY(110px);
  pointer-events: none;
}

.tabpill {
  position: relative;
  flex: 1;
  height: 62px;
  padding: 4px;
  display: flex;
  border-radius: 31px;
  background: var(--raised);
  box-shadow: var(--shadow-float), 0 0 0 1px var(--outline);
}

.tabpill__lens {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: 27px;
  background: var(--accent-soft);
  transform: translateX(calc(var(--ti, 0) * 100%));
  transition: transform var(--t-snap) var(--snap);
}

.tab {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  color: var(--ink-muted);
  font: 500 12px/1.1 var(--font-ui);
}

.tab .i {
  width: 24px;
  height: 24px;
}

.tab.is-on {
  color: var(--accent-text);
}

.tab.is-on .i--r {
  display: none;
}

.tab.is-on .i--f {
  display: block;
}

.camfab {
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-capture);
}

.camfab .i {
  width: 24px;
  height: 24px;
}

.toast {
  position: absolute;
  left: 50%;
  top: 60px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--raised);
  box-shadow: var(--shadow-lift);
  font: 600 14px/1 var(--font-ui);
  white-space: nowrap;
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: transform var(--t-peel) var(--peel), opacity var(--t-soft) var(--soft);
}

.toast .i {
  color: var(--accent-text);
}

.toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ═══ small screens: the phone rides at the top, the chapters pass under ═══ */

@media (max-width: 899px) {
  html {
    scroll-padding-top: 0;
  }

  .top {
    height: 56px;
    grid-template-columns: auto 1fr auto;
  }

  .brand__word {
    display: none;
  }

  .course {
    justify-self: center;
  }

  #story {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px;
  }

  .rail {
    grid-column: 1;
    grid-row: 1 / span 16;
    width: auto;
    z-index: 5;
    pointer-events: none;
  }

  /* a band the chapters slide under, so copy never runs across the phone */
  .rail::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    height: calc(56px + 868px * var(--s) + 22px);
    margin: 0 -16px calc((56px + 868px * var(--s) + 22px) * -1);
    background: linear-gradient(var(--surface) calc(100% - 20px), color-mix(in oklab, var(--surface) 0%, transparent));
  }

  /* sticky ignores left as an offset, so centre with the margin */
  .device {
    top: 60px;
    margin-left: calc(50% - 207px * var(--s));
    pointer-events: auto;
  }

  .device__note {
    display: none;
  }

  .ch {
    min-height: 88svh;
    align-items: flex-start;
    padding: calc(56px + 868px * var(--s) + 40px) 4px 40px;
  }

  .ch--hero {
    min-height: 100svh;
  }

  .ch h2 {
    font-size: 30px;
    margin: 12px 0 12px;
  }

  .ch p {
    font-size: 16px;
  }

  .hero__title {
    margin: 16px 0 14px;
    font-size: clamp(38px, 11vw, 52px);
  }

  .lede {
    font-size: 16px;
  }

  .cta-row {
    margin-top: 20px;
  }

  .js .ch:not(.is-active) .ch__copy {
    opacity: 0.4;
  }

  .stopwatch {
    font-size: 36px;
  }

  .panel {
    padding: 80px 4px;
  }

  .pit {
    bottom: 88px;
  }

  .smallprint {
    height: 88px;
    padding: 0 24px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .course__name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .ch:not(.is-active) .ch__copy {
    transform: none;
  }

  .pane.is-on,
  .savepin,
  .course__name.is-swap,
  .rate span.is-on {
    animation: none;
  }
}
