/* ══════════════════════════════════════════════════════════════════
   PlateDiary front page — tokens first, everything else consumes them.
   Light and dark are both real designs (see brief), switched purely by
   prefers-color-scheme.
   ══════════════════════════════════════════════════════════════════ */

/* ── Fonts (all local; swap + metric fallbacks so text never jumps) ── */
@font-face {
  font-family: 'Fraunces';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/fraunces-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('../assets/fonts/fraunces-400i.woff2') format('woff2');
}

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

@font-face {
  font-family: 'Manrope';
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/manrope-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Manrope';
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/manrope-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Manrope';
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/manrope-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Caveat';
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/caveat-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Caveat';
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/caveat-600.woff2') format('woff2');
}

/* metric-matched stand-ins: no layout shift while the real faces load */
@font-face {
  font-family: 'Fraunces-fb';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 104%;
  ascent-override: 96%;
  descent-override: 24%;
}

@font-face {
  font-family: 'Manrope-fb';
  src: local('Helvetica Neue'), local('Arial');
  size-adjust: 99%;
  ascent-override: 104%;
  descent-override: 29%;
}

:root {
  --surface: #F7F2EA;
  --sheet: #FFFDF9;
  --raised: #FFFDF9;
  --ink: #211D18;
  --ink-muted: rgba(33, 29, 24, 0.55);
  --accent: #C4643B;
  --accent-press: #A9522E;
  --on-accent: #FFFDF9;
  --outline: rgba(33, 29, 24, 0.12);
  --shadow-save: 0 6px 20px rgba(146, 94, 52, 0.18);
  --shadow-lift: 0 14px 34px rgba(146, 94, 52, 0.26);
  --shadow-accent: 0 10px 26px rgba(196, 100, 59, 0.35);
  --contour: rgba(146, 94, 52, 0.45);
  --glow: radial-gradient(ellipse 80% 70% at 50% 58%, rgba(255, 251, 241, 0.85), rgba(255, 244, 224, 0.35) 45%, transparent 75%);
  /* inside-the-photo palette */
  --photo-table: #E7D8BE;
  --photo-light: #F4E9D2;
  --photo-linen: #C7CBAA;
  --photo-glass: #DECFB2;
  --photo-water: #CBDAD2;
  --photo-steel: #B4A488;
  --photo-cut: rgba(33, 29, 24, 0.42);
  /* map palette */
  --map-paper: #F3EBDD;
  --map-street: rgba(33, 29, 24, 0.16);
  --map-river: #D5E0D0;
  --map-block: rgba(33, 29, 24, 0.05);

  --font-display: 'Fraunces', 'Fraunces-fb', Georgia, serif;
  --font-ui: 'Manrope', 'Manrope-fb', 'Helvetica Neue', Arial, sans-serif;
  --font-hand: 'Caveat', 'Bradley Hand', 'Segoe Script', cursive;

  --r-16: 16px;
  --r-18: 18px;
  --r-20: 20px;
  --r-24: 24px;
  --r-pill: 999px;
  --stage-h: 56svh;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #1C1A17;
    --sheet: #26231F;
    --raised: #2C2823;
    --ink: #F1EBE1;
    --ink-muted: rgba(241, 235, 225, 0.55);
    --accent: #D4744A;
    --accent-press: #B85E38;
    --on-accent: #1C1A17;
    --outline: rgba(241, 235, 225, 0.14);
    --shadow-save: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 10px 26px rgba(0, 0, 0, 0.4);
    --contour: rgba(0, 0, 0, 0.55);
    --glow: radial-gradient(ellipse 80% 70% at 50% 58%, rgba(212, 116, 74, 0.14), rgba(212, 116, 74, 0.05) 45%, transparent 75%);
    --photo-table: #2E2820;
    --photo-light: #3A3128;
    --photo-linen: #43443A;
    --photo-glass: #3C352B;
    --photo-water: #37403C;
    --photo-steel: #57503F;
    --photo-cut: rgba(241, 235, 225, 0.4);
    --map-paper: #221F1B;
    --map-street: rgba(241, 235, 225, 0.14);
    --map-river: #2C332E;
    --map-block: rgba(241, 235, 225, 0.05);
  }
}

:root[data-theme="dark"] {
  --surface: #1C1A17;
  --sheet: #26231F;
  --raised: #2C2823;
  --ink: #F1EBE1;
  --ink-muted: rgba(241, 235, 225, 0.55);
  --accent: #D4744A;
  --accent-press: #B85E38;
  --on-accent: #1C1A17;
  --outline: rgba(241, 235, 225, 0.14);
  --shadow-save: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 10px 26px rgba(0, 0, 0, 0.4);
  --contour: rgba(0, 0, 0, 0.55);
  --glow: radial-gradient(ellipse 80% 70% at 50% 58%, rgba(212, 116, 74, 0.14), rgba(212, 116, 74, 0.05) 45%, transparent 75%);
  --photo-table: #2E2820;
  --photo-light: #3A3128;
  --photo-linen: #43443A;
  --photo-glass: #3C352B;
  --photo-water: #37403C;
  --photo-steel: #57503F;
  --photo-cut: rgba(241, 235, 225, 0.4);
  --map-paper: #221F1B;
  --map-street: rgba(241, 235, 225, 0.14);
  --map-river: #2C332E;
  --map-block: rgba(241, 235, 225, 0.05);
}

/* ── Base ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--sheet);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-save);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.25s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.skip:focus-visible {
  top: 12px;
}

/* ── Type roles ── */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 10vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.display em {
  font-style: italic;
  font-weight: 400;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.65rem, 6vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.caps {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink-muted);
}

.hand {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.25;
}

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

/* ── Theme Transitions ── */
body,
.panel__card,
.m-card,
.b-row,
.map-card,
.pill--ghost,
.wordmark-logo {
  transition: background-color 0.45s cubic-bezier(0.34, 1.2, 0.5, 1),
    border-color 0.45s cubic-bezier(0.34, 1.2, 0.5, 1),
    color 0.45s cubic-bezier(0.34, 1.2, 0.5, 1),
    box-shadow 0.45s cubic-bezier(0.34, 1.2, 0.5, 1);
}

/* ── Theme Toggle Button ── */
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--sheet) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: var(--shadow-save);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.5, 1),
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  background: var(--sheet);
}

.theme-toggle:active {
  transform: translateY(1px);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  display: block;
}

.theme-toggle__sun-center,
.theme-toggle__ray,
.theme-toggle__moon {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.5, 1),
    opacity 0.3s ease;
  transform-origin: center;
}

/* Default state: Light mode (sun visible, moon hidden) */
:root:not([data-theme="dark"]) .theme-toggle__moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

:root:not([data-theme="dark"]) .theme-toggle__sun-center {
  opacity: 1;
  transform: scale(1);
}

:root:not([data-theme="dark"]) .theme-toggle__ray {
  opacity: 1;
  transform: scale(1);
}

/* Dark mode (system prefers-color-scheme: dark OR explicit data-theme="dark") */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__moon {
    opacity: 1;
    transform: rotate(0) scale(1);
  }

  :root:not([data-theme="light"]) .theme-toggle__sun-center {
    opacity: 0;
    transform: scale(0.5);
  }

  :root:not([data-theme="light"]) .theme-toggle__ray {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }
}

:root[data-theme="dark"] .theme-toggle__moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

:root[data-theme="dark"] .theme-toggle__sun-center {
  opacity: 0;
  transform: scale(0.5);
}

:root[data-theme="dark"] .theme-toggle__ray {
  opacity: 0;
  transform: rotate(45deg) scale(0.5);
}

/* ── Top bar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  pointer-events: none;
}

.topbar>* {
  pointer-events: auto;
}

.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--surface) 12%, transparent);
  opacity: 0.9;
  border-bottom: 1px solid transparent;
  transition: opacity 0.35s ease, background 0.35s ease,
    -webkit-backdrop-filter 0.35s ease, backdrop-filter 0.35s ease,
    border-color 0.35s ease;
}

/* Once scrolled off the hero, the bar frosts and gains a hairline so the
   cast and copy pass cleanly underneath instead of colliding with the
   wordmark. At rest (hero) it stays the airy fade above. */
.topbar.is-stuck::before {
  background: linear-gradient(180deg, var(--surface),
      color-mix(in srgb, var(--surface) 58%, transparent));
  opacity: 1;
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  border-bottom-color: var(--outline);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.wordmark-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
  box-shadow: 0 1px 3px rgba(60, 40, 24, 0.14);
}

/* ── Pills (interactive = capsule; that grammar is the brand's) ── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.5, 1), background-color 0.18s cubic-bezier(0.34, 1.2, 0.5, 1);
}

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

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

.pill--accent:active {
  background: var(--accent-press);
  transform: translateY(1px);
}

.pill--quiet {
  background: var(--sheet);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-save);
}

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

.pill--ghost {
  height: 40px;
  padding: 0 18px;
  font-size: 0.85rem;
  border: 1px solid var(--outline);
  background: color-mix(in srgb, var(--sheet) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pill--big {
  height: 58px;
  padding: 0 34px;
  font-size: 1.05rem;
}

/* ══ The stage ══ */
.stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--stage-h);
  z-index: 1;
  pointer-events: none;
}

.stage__glow {
  position: absolute;
  inset: -12% -20%;
  background: var(--glow);
}

.formation {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.formation.is-active {
  opacity: 1;
  visibility: visible;
}

/* photo of the table */
.photo {
  position: absolute;
  left: 50%;
  top: 52%;
  height: min(86%, 470px);
  aspect-ratio: 39 / 50;
  translate: -50% -50%;
  rotate: -1.8deg;
  background: var(--sheet);
  padding: 7px;
  border-radius: var(--r-24);
  box-shadow: var(--shadow-save);
}

.photo__source,
.photo__background {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  display: block;
  object-fit: cover;
  border-radius: var(--r-18);
  transition: opacity 0.45s cubic-bezier(0.34, 1.2, 0.5, 1);
}

.photo__source {
  z-index: 1;
}

.photo__background {
  z-index: 2;
  opacity: 0;
}

.photo__layers {
  position: absolute;
  inset: 7px;
  z-index: 3;
  overflow: hidden;
  border-radius: var(--r-18);
}

.photo.is-decomposed .photo__source {
  opacity: 0;
}

.photo.is-decomposed .photo__background {
  opacity: 1;
}

.scanband {
  position: absolute;
  left: 7px;
  right: 7px;
  height: 45%;
  top: -50%;
  border-radius: var(--r-18);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.4) 50%, transparent);
}

.dish {
  position: absolute;
  left: var(--dx);
  top: var(--dy);
  width: 26%;
  aspect-ratio: var(--dar);
  translate: -50% -50%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 5px 9px var(--contour));
  transition: opacity 0.38s cubic-bezier(0.34, 1.1, 0.5, 1),
    filter 0.38s cubic-bezier(0.34, 1.1, 0.5, 1);
}

.dish.is-lit {
  opacity: 1;
  filter: brightness(1.14) drop-shadow(0 0 10px rgba(255, 251, 241, 0.9));
}

.photo.is-decomposed .dish {
  opacity: 1;
}

.dish.is-cut {
  opacity: 0 !important;
}

/* slots: invisible layout targets the cast Flips onto */
.slots {
  position: absolute;
  inset: 0;
}

.slot {
  position: absolute;
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  width: var(--ss, 64px);
  aspect-ratio: 1;
  translate: -50% -50%;
  rotate: var(--sr, 0deg);
}

/* scene 2: the row */
.formation--row {
  display: grid;
  place-content: center;
  gap: 18px;
  justify-items: center;
}

.slots--row {
  position: static;
  display: flex;
  gap: clamp(6px, 2vw, 14px);
}

.slots--row .slot {
  position: static;
  translate: none;
  width: clamp(42px, 11.5vw, 74px);
}

.row-count {
  color: var(--accent);
  rotate: -2deg;
}

.row-beats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.beat-arrow {
  color: var(--accent);
  opacity: 0.85;
}

/* scene 3: the moment card */
.formation--moment {
  display: grid;
  place-items: center;
  padding: max(52px, 9svh) 16px 12px;
}

.m-card {
  width: min(100%, 380px);
  max-height: 100%;
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-24);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-save);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.m-card__head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.dateblock {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 44px;
}

.datenum {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--accent);
}

.m-card__titles {
  border-left: 1px solid var(--outline);
  padding-left: 14px;
  display: grid;
  gap: 5px;
}

.m-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.1;
}

.underline {
  width: 44px;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--accent);
}

.underline--wide {
  width: 84px;
  height: 4px;
  margin: 14px auto 0;
}

.m-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.fact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.fact svg {
  flex: none;
}

.slots--moment {
  position: relative;
  height: clamp(150px, 26svh, 220px);
}

.m-card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatars {
  display: inline-flex;
}

.avatars i {
  font-style: normal;
  font-weight: 600;
  font-size: 0.72rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--raised);
  border: 2px solid var(--sheet);
  box-shadow: var(--shadow-save);
}

.avatars i+i {
  margin-left: -8px;
}

.m-card__foot .quote {
  font-size: 1.02rem;
}

/* scene: remember — the sticker-detail card (name · stars · note) */
.formation--remember {
  display: grid;
  place-items: center;
  padding: max(52px, 9svh) 16px 12px;
}

.r-card {
  width: min(100%, 380px);
  max-height: 100%;
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-24);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-save);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.slots--remember {
  position: relative;
  width: 100%;
  height: clamp(170px, 30svh, 240px);
}

.r-stars {
  display: flex;
  gap: 6px;
}

.r-star {
  width: 22px;
  height: 22px;
  color: var(--accent);
  transform: scale(0);
  opacity: 0;
}

.r-note {
  color: var(--accent);
  rotate: -2deg;
}

.r-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.1;
  text-align: center;
}

.r-card .underline {
  margin-top: 0;
}

@keyframes r-star-pop {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.formation--remember.is-active .r-star {
  animation: r-star-pop 0.5s cubic-bezier(0.34, 1.56, 0.5, 1) forwards;
}

.formation--remember.is-active .r-star:nth-child(1) {
  animation-delay: 0.04s;
}

.formation--remember.is-active .r-star:nth-child(2) {
  animation-delay: 0.10s;
}

.formation--remember.is-active .r-star:nth-child(3) {
  animation-delay: 0.16s;
}

.formation--remember.is-active .r-star:nth-child(4) {
  animation-delay: 0.22s;
}

.formation--remember.is-active .r-star:nth-child(5) {
  animation-delay: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  .r-star {
    transform: none;
    opacity: 1;
  }

  .formation--remember.is-active .r-star {
    animation: none;
  }
}

/* scene 4: the board */
.formation--board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: max(52px, 9svh) 16px 10px;
}

.b-row {
  width: min(100%, 400px);
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-20);
  padding: 10px 14px;
  box-shadow: var(--shadow-save);
}

.b-row .dateblock {
  min-width: 38px;
}

.b-row .datenum {
  font-size: 1.5rem;
}

.b-row__body {
  border-left: 1px solid var(--outline);
  padding-left: 12px;
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.b-row__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tape {
  font-size: 1.05rem;
  color: var(--accent);
  rotate: -2.5deg;
}

.slots--board {
  position: static;
  display: flex;
  gap: 7px;
}

.slots--board .slot {
  position: static;
  translate: none;
  width: clamp(34px, 9vw, 46px);
}

.b-thumbs {
  display: flex;
  gap: 7px;
}

.b-thumbs svg {
  width: clamp(34px, 9vw, 46px);
  height: clamp(34px, 9vw, 46px);
}

.b-row:not(.b-row--live) {
  opacity: 0.6;
  scale: 0.97;
}

/* scene 5: collections — one personalized table assembled from many moments */
.formation--collections {
  display: grid;
  place-items: center;
  padding: max(52px, 9svh) 16px 10px;
}

.collection-card {
  width: min(100%, 390px);
  max-height: 100%;
  padding: 14px;
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-24);
  box-shadow: var(--shadow-lift);
  display: grid;
  gap: 10px;
}

.collection-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.collection-card__eyebrow {
  color: var(--ink-muted);
}

.collection-card__title {
  margin-top: 2px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.1;
}

.collection-card__count {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
}

.collection-table {
  position: relative;
  height: clamp(180px, 30svh, 260px);
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: var(--r-20);
  background-color: var(--raised);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 17px, var(--outline) 17px 18px),
    repeating-linear-gradient(0deg, transparent 0 17px, var(--outline) 17px 18px),
    var(--glow);
}

.slots--collections {
  inset: 0;
}

.collection-card__note {
  justify-self: end;
  color: var(--accent);
  font-size: 1.05rem;
  rotate: -2deg;
}

/* scene 6: the map */
.formation--map {
  display: grid;
  place-items: center;
  padding: max(52px, 9svh) 16px 10px;
}

.map-wrap {
  position: relative;
  width: min(100%, 400px);
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: var(--r-18);
  box-shadow: var(--shadow-save);
  background: var(--map-paper);
}

.map-art {
  display: block;
  width: 100%;
  height: auto;
}

.map-controls {
  position: absolute;
  left: 10px;
  right: 0;
  top: 10px;
  z-index: 2;
  display: flex;
  gap: 7px;
  align-items: center;
}

.map-back {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--sheet);
  box-shadow: var(--shadow-save);
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
}

.map-filters {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow: hidden;
}

.map-filters span {
  flex: none;
  height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--sheet);
  box-shadow: var(--shadow-save);
  color: var(--ink-muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.map-filters .is-active {
  background: var(--accent);
  color: var(--on-accent);
}

.slots--map .slot {
  width: 42px;
}

.map-cluster {
  position: absolute;
  left: 66%;
  top: 27%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid #FFFDF9;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #FFFDF9;
  box-shadow: var(--shadow-accent);
  font-size: 0.78rem;
  font-weight: 600;
}

.map-moment-card {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-16);
  box-shadow: var(--shadow-save);
  display: grid;
  overflow: hidden;
}

.map-place {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px 0;
  color: var(--ink-muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.map-place span:last-child {
  margin-left: auto;
  color: var(--accent);
}

.map-moment-card__row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px 11px;
}

.map-marker__thumb {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: cover;
  border: 4px solid #FFFDF9;
  border-radius: var(--r-pill);
  background: #FFFDF9;
  box-shadow: var(--shadow-save);
}

.map-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

/* scene 8: Share Studio */
.formation--share {
  display: grid;
  place-items: center;
  padding: max(52px, 9svh) 16px 12px;
}

.studio-shell {
  width: min(100%, 390px);
  max-height: 100%;
  padding: 8px;
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-24);
  box-shadow: var(--shadow-lift);
  display: grid;
  gap: 6px;
}

.studio-toolbar {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-toolbar>.caps {
  color: var(--ink-muted);
  padding-left: 4px;
}

.studio-tools {
  display: flex;
  align-items: center;
  gap: 3px;
}

.studio-tool {
  padding: 5px 7px;
  border: 1px solid var(--outline);
  border-radius: var(--r-pill);
  color: var(--ink-muted);
  font-size: 0.56rem;
  font-weight: 600;
  line-height: 1;
}

.studio-tool.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.share-card {
  position: relative;
  height: min(100%, 420px);
  aspect-ratio: 3 / 4;
  border-radius: var(--r-24);
  overflow: hidden;
  background: #FFFDF9;
  box-shadow: var(--shadow-lift);
  transition: background-color 0.45s cubic-bezier(0.34, 1.2, 0.5, 1);
  --share-ink: #211D18;
}

.studio-shell .share-card {
  width: clamp(190px, 58vw, 280px);
  height: auto;
  justify-self: center;
}

.share-card[data-bg="butter"] {
  background: #F3E3B2;
}

.share-card[data-bg="wood"] {
  background: #8A5A33;
  --share-ink: #F7F2EA;
}

.share-card[data-bg="terracotta"] {
  background: #C4643B;
  --share-ink: #FFF4E7;
}

.share-card[data-bg="sage"] {
  background: #A9B594;
  --share-ink: #26261C;
}

.share-card__title {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.15;
  color: var(--share-ink);
}

.share-card__title span {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 3px;
}

.share-card__mark {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--share-ink);
  opacity: 0.55;
}

.share-card__format {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 5px 7px;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  color: var(--share-ink);
  opacity: 0.62;
}

.studio-doodle {
  position: absolute;
  left: 10px;
  top: 53%;
  width: 62px;
  color: var(--accent);
  rotate: -7deg;
  opacity: 0.8;
}

.slots--share {
  position: absolute;
  inset: 0;
}

/* ── lower-story choreography: seat → question → note ── */
.formation--premium,
.formation--faq,
.formation--contact {
  display: grid;
  place-items: center;
  padding: max(52px, 9svh) 16px 12px;
}

.premium-table,
.contact-table {
  position: relative;
  width: min(100%, 390px);
  height: min(38svh, 290px);
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: 48% 48% 44% 44% / 18% 18% 16% 16%;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--sheet) 86%, transparent), transparent 44%),
    repeating-linear-gradient(92deg, rgba(112, 70, 40, 0.06) 0 1px, transparent 1px 22px),
    color-mix(in srgb, var(--accent) 12%, var(--sheet));
  box-shadow: var(--shadow-lift);
}

.premium-seat {
  position: absolute;
  left: 50%;
  top: 56%;
  z-index: 1;
  translate: -50% -50%;
  width: 148px;
  min-height: 118px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  padding: 15px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: var(--sheet);
  box-shadow: var(--shadow-save);
}

.premium-seat::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px dashed color-mix(in srgb, var(--accent) 48%, transparent);
  border-radius: 8px;
  pointer-events: none;
}

.premium-seat strong {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--accent);
}

.premium-seat .hand {
  font-size: 1rem;
  rotate: -2deg;
}

.faq-orbit {
  position: relative;
  width: min(86vw, 330px);
  height: min(42svh, 320px);
}

.faq-mark {
  position: absolute;
  left: 50%;
  top: 46%;
  translate: -50% -50%;
  color: color-mix(in srgb, var(--accent) 26%, transparent);
  font-size: clamp(9rem, 34vw, 13rem);
  line-height: 1;
}

.contact-table {
  border-radius: var(--r-24);
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--sheet) 90%, transparent), transparent 47%),
    repeating-linear-gradient(0deg, transparent 0 23px, var(--outline) 23px 24px),
    color-mix(in srgb, var(--accent) 9%, var(--sheet));
}

.contact-note {
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 1;
  translate: -50% -50%;
  rotate: -2deg;
  width: 176px;
  min-height: 142px;
  display: grid;
  gap: 7px;
  padding: 17px;
  border-radius: 4px;
  background: #FFFDF9;
  color: #211D18;
  box-shadow: var(--shadow-lift);
}

.contact-note strong {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.15;
}

.contact-note i {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(33, 29, 24, 0.14);
}

.contact-note .hand {
  justify-self: end;
  color: #C4643B;
  font-size: 1rem;
}

/* ── the cast ── */
.cast {
  position: absolute;
  inset: 0;
}

/* with JS on, the intro owns the reveal — no stacked-at-origin flash */
html.js .save {
  opacity: 0;
}

.save {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  aspect-ratio: 1;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.save:active {
  cursor: grabbing;
}

.save__art {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 9px var(--contour));
  transition: filter 0.2s cubic-bezier(0.34, 1.3, 0.5, 1), opacity 0.3s cubic-bezier(0.34, 1.2, 0.5, 1);
}

.save__cut {
  fill: #FFFDF9;
}

/* the die-cut paper edge — paper stays paper in both schemes */
.save.is-lifted .save__art {
  filter: drop-shadow(0 16px 22px var(--contour));
}

.save.as-pin .save__art {
  padding: 8%;
  border-radius: 50%;
  background: #FFFDF9;
  filter: drop-shadow(0 5px 8px var(--contour));
}

.save__tag {
  position: absolute;
  left: 50%;
  top: calc(100% - 8%);
  translate: -50%;
  white-space: nowrap;
  font-size: 1.18rem;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.34, 1.2, 0.5, 1);
  text-shadow: 0 1px 0 var(--surface);
}

.save__tag:empty {
  display: none;
}

.cast.show-tags .save__tag {
  opacity: 1;
}

.cast.is-resting .save__art {
  filter: drop-shadow(0 4px 7px var(--contour)) saturate(0.82);
}

/* ══ Story panels ══ */
main {
  position: relative;
  z-index: 2;
}

.panel {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px max(7svh, 44px);
}

.panel__card {
  width: min(560px, 100%);
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-24);
  padding: 22px 22px 26px;
  box-shadow: var(--shadow-save);
  display: grid;
  gap: 12px;
  justify-items: start;
}

.panel__card p {
  color: var(--ink-muted);
  max-width: 44ch;
}

.dateblock--marker {
  justify-items: start;
  margin-bottom: 2px;
}

.dateblock--marker .datenum {
  font-size: 2.1rem;
}

.dateblock--marker .caps {
  letter-spacing: 1.4px;
}

/* Premium is one seat, not a pricing grid. The inclusion chips read like
   keepsakes laid on the same paper card as the rest of the story. */
.premium-kicker {
  color: var(--accent) !important;
  margin-top: 2px;
}

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

.premium-inclusions span {
  padding: 8px 11px;
  border: 1px solid var(--outline);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

/* faq: native disclosure widgets — content is real, expanded or not */
.faq-list {
  list-style: none;
  display: grid;
  gap: 10px;
  width: 100%;
}

.faq-item {
  border: 1px solid var(--outline);
  border-radius: var(--r-16);
  background: var(--sheet);
}

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

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

.faq-item__icon {
  flex: none;
  color: var(--ink-muted);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.5, 1);
}

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

.faq-item__a {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--ink-muted);
  max-width: 44ch;
}

/* contact: real form, Netlify-processed */
.contact-form {
  display: grid;
  gap: 14px;
  width: 100%;
  margin-top: 4px;
}

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

.contact-form__field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

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

.contact-form input,
.contact-form textarea,
.contact-form select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--outline);
  border-radius: var(--r-16);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.18s cubic-bezier(0.34, 1.2, 0.5, 1);
}

/* The native arrow is drawn by the OS in its own colour, which reads as a
   foreign element against this palette — so the control is repainted with a
   chevron of our own. The stroke is a fixed muted brown rather than
   currentColor: a data URI cannot read CSS variables, and this one hue clears
   both the light and the dark surface, so it needs no per-theme override. */
.contact-form select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23847a6b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form button {
  justify-self: start;
}

/* The escape hatch from the landing note to the full form. */
.contact-more {
  margin: 18px 0 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 46ch;
}

/* Two short fields share a line once there is room for both. */
.contact-form__row {
  display: grid;
  gap: 14px;
}

@media (min-width: 620px) {
  .contact-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── the dedicated /contact page ──────────────────────────────────────── */
.contact-page {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  width: min(980px, 100%);
  margin: clamp(48px, 8vw, 88px) auto 0;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-page {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  }
}

.contact-page__card {
  padding: clamp(24px, 4vw, 38px);
  background: color-mix(in srgb, var(--sheet) 72%, transparent);
  border: 1px solid var(--outline);
  border-radius: var(--r-24);
}

.contact-page__card h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.contact-page__intro {
  margin: 12px 0 22px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.contact-page__smallprint {
  margin: 4px 0 0;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 52ch;
}

.contact-page__aside {
  padding: clamp(20px, 3vw, 28px);
  border: 1px dashed var(--outline);
  border-radius: var(--r-20);
}

.contact-page__aside h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.contact-page__aside p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 18px;
}

.contact-page__aside-note {
  margin-top: 18px;
  font-size: 0.88rem;
}

.contact-page__flourish {
  margin: 6px 0 0;
  color: var(--accent);
  font-size: 1.35rem;
}

/* hero panel: no card — the page itself is the table */
.panel--hero {
  padding-top: var(--stage-h);
  align-items: flex-start;
}

.panel__card--hero {
  background: none;
  border: none;
  box-shadow: none;
  justify-items: center;
  text-align: center;
  padding: 3svh 6px 0;
  gap: 0;
}

.lede {
  font-size: 1.06rem;
  max-width: 36ch;
  margin-top: 16px;
}

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

.scroll-note {
  color: var(--ink-muted);
  margin-top: 26px;
  rotate: -2deg;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

/* quiet panel: stillness is the design (copy keeps the low reading zone;
   the cast rests small and calm in the upper stage) */
.panel--quiet {
  align-items: flex-end;
}

.panel__card--quiet {
  background: none;
  border: none;
  box-shadow: none;
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px 8px;
}

.panel__card--quiet .dateblock--marker {
  justify-items: center;
}

.quiet-facts {
  list-style: none;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.quiet-facts li {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiet-facts li::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2.5px solid var(--accent);
  flex: none;
}

.panel__card--quiet .policy-link {
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* swatches */
.swatches {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sw);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-save);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.5, 1);
}

.swatch:hover {
  transform: translateY(-2px) scale(1.06);
}

.swatch.is-on {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.swatch-note {
  color: var(--accent);
  rotate: -2deg;
  margin-top: 2px;
}

.card-note {
  color: var(--accent);
  rotate: -2deg;
  margin-top: 2px;
}

/* ══ Playground footer ══ */
.playground {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.playground__copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  padding: max(11svh, 70px) 20px 0;
  position: relative;
  z-index: 2;
}

.playground__copy .display {
  font-size: clamp(2rem, 8vw, 3.4rem);
}

.playground__lede {
  max-width: 38ch;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.avail {
  letter-spacing: 2px;
}

.tilt-note {
  color: var(--accent);
  font-size: 1.35rem;
  rotate: -3deg;
}

.pit {
  position: relative;
  flex: 1;
  min-height: 44svh;
  margin-top: 4svh;
}

.pit .save {
  cursor: grab;
}

.smallprint {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
}

/* ══ Scrubber ══ */
.scrubber {
  position: fixed;
  right: calc(5px + env(safe-area-inset-right));
  top: 50%;
  translate: 0 -50%;
  height: min(34svh, 300px);
  width: 24px;
  z-index: 40;
  display: none;
}

html.js .scrubber {
  display: block;
}

.scrubber__track {
  position: absolute;
  right: 10px;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: var(--r-pill);
  background: var(--outline);
}

.scrubber__thumb {
  position: absolute;
  right: 5px;
  top: 0;
  width: 13px;
  height: 34px;
  border-radius: 8px;
  background: var(--sheet);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-save);
  cursor: grab;
}

.scrubber__bubble {
  position: absolute;
  right: 28px;
  top: 0;
  background: var(--sheet);
  border: 1px solid var(--outline);
  padding: 1px 13px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-save);
  white-space: nowrap;
  font-size: 1.15rem;
  opacity: 0;
  translate: 6px 0;
  transition: opacity 0.25s cubic-bezier(0.34, 1.3, 0.5, 1), translate 0.25s cubic-bezier(0.34, 1.3, 0.5, 1);
}

.scrubber.is-touched .scrubber__bubble {
  opacity: 1;
  translate: 0 0;
}

/* ══ No-JS: the page still composes — photo + scattered saves, all copy ══ */
html:not(.js) .save {
  translate: -50% -50%;
  rotate: var(--rot, 0deg);
}

html:not(.js) .save[data-save="nachos"] {
  left: 78%;
  top: 30%;
  width: 104px;
}

html:not(.js) .save[data-save="tuna"] {
  left: 12%;
  top: 22%;
  width: 78px;
}

html:not(.js) .save[data-save="salad"] {
  left: 10%;
  top: 58%;
  width: 92px;
}

html:not(.js) .save[data-save="fries"] {
  left: 16%;
  top: 86%;
  width: 88px;
}

html:not(.js) .save[data-save="chicken"] {
  left: 82%;
  top: 90%;
  width: 80px;
}

html:not(.js) .save {
  pointer-events: none;
}

html:not(.js) .tilt-note {
  display: none;
}

/* ══ Desktop: stage becomes the right half; the story reads down the left ══ */
@media (min-width: 960px) {
  :root {
    --stage-h: 100svh;
  }

  .stage {
    left: 50%;
    width: 50vw;
    right: auto;
  }

  main,
  .playground__copy {
    width: 50%;
  }

  .panel {
    justify-content: flex-start;
    padding-left: clamp(32px, 6vw, 96px);
    align-items: center;
  }

  .panel--hero {
    padding-top: 0;
    align-items: center;
  }

  .panel__card--hero {
    justify-items: start;
    text-align: left;
    padding: 0;
  }

  .underline--wide {
    margin: 14px 0 0;
  }

  .cta-row {
    justify-content: flex-start;
  }

  .panel--quiet {
    align-items: center;
  }

  .panel__card--quiet {
    justify-items: start;
    text-align: left;
  }

  .panel__card--quiet .dateblock--marker,
  .quiet-facts {
    justify-items: start;
  }

  .quiet-facts li {
    justify-content: flex-start;
  }

  .photo {
    height: min(78%, 620px);
  }

  .slots--hero .slot {
    width: calc(var(--ss, 64px) * 1.35);
  }

  .slots--quiet .slot {
    width: calc(var(--ss, 64px) * 1.25);
  }

  .playground {
    flex-direction: row;
    align-items: center;
  }

  .playground__copy {
    width: 50%;
    padding: 0 clamp(32px, 6vw, 96px);
    justify-items: start;
    text-align: left;
  }

  .pit {
    width: 50%;
    align-self: stretch;
    min-height: 100svh;
    margin: 0;
  }

  .smallprint {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
  }
}

/* Mobile story cards own the lower half of the viewport. Keep the three
   closing formations above that reading zone so their centers stay visible. */
@media (max-width: 959px) {
  .formation--premium,
  .formation--faq,
  .formation--contact {
    place-items: start center;
    padding-top: 68px;
  }

  .premium-table,
  .contact-table {
    height: min(24svh, 205px);
  }

  .faq-orbit {
    width: min(78vw, 290px);
    height: min(25svh, 215px);
  }

  .slots--premium .slot,
  .slots--faq .slot,
  .slots--contact .slot {
    width: calc(var(--ss, 64px) * 0.74);
  }

  .premium-seat {
    scale: 0.76;
  }

  .faq-mark {
    font-size: 8.5rem;
  }

  .contact-note {
    scale: 0.72;
  }

  /* These cards are taller than the mobile viewport's reading half. Give
     their animated formation one clear beat before the copy arrives. */
  #faq {
    min-height: calc(100svh + 210px);
    padding-top: 210px;
  }

  #contact {
    min-height: calc(100svh + 160px);
    padding-top: 160px;
  }
}

/* very small phones: keep the row scene inside the frame */
@media (max-width: 360px) {
  .slots--row .slot {
    width: 38px;
  }
}

/* ══ Privacy policy: the same table, set for slow reading ══ */
body.policy {
  min-height: 100svh;
  background-color: var(--surface);
  background-image: var(--glow);
  background-attachment: fixed;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 1100px 720px;
}

body.policy .topbar--policy::before {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom-color: var(--outline);
  opacity: 1;
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

body.policy .policy-page {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: calc(112px + env(safe-area-inset-top)) 20px 96px;
}

.policy-hero {
  width: min(780px, 100%);
  margin: 0 auto;
  text-align: center;
  display: grid;
  justify-items: center;
}

.policy-kicker,
.policy-section-label {
  color: var(--accent);
  letter-spacing: 1.8px;
}

.policy-hero h1 {
  max-width: 10ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.underline--policy {
  width: min(260px, 56vw);
  margin-top: 20px;
}

.policy-lede {
  max-width: 58ch;
  margin-top: 28px;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  line-height: 1.65;
  text-wrap: balance;
}

.thanks-cta {
  margin-top: 28px;
}

.policy-effective {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.policy-summary {
  position: relative;
  width: min(900px, 100%);
  margin: clamp(54px, 8vw, 88px) auto 0;
  padding: clamp(24px, 5vw, 42px);
  overflow: hidden;
  background: var(--sheet);
  border: 1px solid var(--outline);
  border-radius: var(--r-24);
  box-shadow: var(--shadow-lift);
}

.policy-summary::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.policy-summary__heading {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.policy-summary__heading .caps {
  color: var(--accent);
}

.policy-summary__heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.policy-promises {
  list-style: none;
  display: grid;
}

.policy-promises li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 14px 0;
  border-top: 1px solid var(--outline);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

.policy-promises__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 46% 54% 43% 57% / 55% 43% 57% 45%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-hand);
  font-size: 1rem;
  line-height: 1;
  rotate: -3deg;
  box-shadow: var(--shadow-accent);
}

.policy-promises li:nth-child(2) .policy-promises__mark {
  rotate: 4deg;
}

.policy-promises li:nth-child(3) .policy-promises__mark {
  rotate: -1deg;
}

.policy-summary__note {
  margin-top: 18px;
  color: var(--accent);
  text-align: right;
  rotate: -2deg;
}

.policy-layout {
  display: grid;
  gap: clamp(48px, 7vw, 84px);
  width: min(980px, 100%);
  margin: clamp(64px, 10vw, 112px) auto 0;
}

.policy-toc {
  padding: 20px;
  background: color-mix(in srgb, var(--sheet) 72%, transparent);
  border: 1px solid var(--outline);
  border-radius: var(--r-20);
}

.policy-toc .caps {
  margin-bottom: 12px;
  color: var(--accent);
}

.policy-toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
}

.policy-toc a {
  display: block;
  padding: 3px 0;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.policy-toc a:hover {
  color: var(--accent);
}

.policy-article {
  min-width: 0;
}

.policy-article section {
  scroll-margin-top: 96px;
  padding: 0 0 clamp(48px, 8vw, 72px);
  margin-bottom: clamp(48px, 8vw, 72px);
  border-bottom: 1px solid var(--outline);
}

.policy-article section:last-child {
  margin-bottom: 0;
}

.policy-article h2 {
  max-width: 18ch;
  margin-top: 8px;
  font-size: clamp(1.85rem, 5vw, 2.55rem);
}

.policy-article h3 {
  margin-top: 34px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
}

.policy-article p,
.policy-article li {
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.policy-article h2 + p,
.policy-article h3 + p,
.policy-article p + p,
.policy-article p + ul,
.policy-article ul + p {
  margin-top: 18px;
}

.policy-article ul {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.policy-article li::marker {
  color: var(--accent);
}

.policy-article strong {
  color: var(--ink);
  font-weight: 600;
}

.policy-article a,
.policy-footer a,
.policy-link,
.contact-more a,
.contact-page__card a,
.contact-page__aside a:not(.pill),
.smallprint__link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 64%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  transition: color 0.18s cubic-bezier(0.34, 1.2, 0.5, 1),
    text-decoration-color 0.18s cubic-bezier(0.34, 1.2, 0.5, 1);
}

.policy-article a:hover,
.policy-footer a:hover,
.policy-link:hover,
.contact-more a:hover,
.contact-page__card a:hover,
.contact-page__aside a:not(.pill):hover,
.smallprint__link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.policy-contact {
  padding: clamp(26px, 5vw, 40px) !important;
  background: var(--sheet);
  border: 1px solid var(--outline) !important;
  border-radius: var(--r-24);
  box-shadow: var(--shadow-save);
}

.policy-footer {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  justify-items: center;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--outline);
  color: var(--ink-muted);
  font-size: 0.78rem;
  text-align: center;
}

.policy-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}

@media (min-width: 900px) {
  .policy-layout {
    grid-template-columns: minmax(180px, 230px) minmax(0, 68ch);
    align-items: start;
  }

  .policy-toc {
    position: sticky;
    top: 96px;
    padding: 2px 0 0;
    background: none;
    border: 0;
    border-radius: 0;
  }

  .policy-toc ol {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .policy-toc a {
    padding: 4px 0;
  }

  .policy-footer {
    grid-template-columns: 1fr auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .policy-footer nav {
    justify-self: end;
  }
}

@media (max-width: 540px) {
  body.policy .policy-page {
    padding-inline: 16px;
  }

  body.policy .policy-back {
    display: none;
  }

  .policy-summary {
    padding: 24px 20px 26px;
  }

  .policy-promises li {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
  }

  .policy-promises__mark {
    width: 42px;
    height: 42px;
    font-size: 0.9rem;
  }

  .policy-toc ol {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.policy *,
  body.policy *::before,
  body.policy *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
