:root {
  /*
   * Tells the browser to theme what WE do not draw: form-control internals,
   * the caret, text selection, scrollbars, and the canvas behind the page
   * before any CSS applies. Without it a dark page keeps light scrollbars and
   * a light-rendered input, which is the giveaway that dark mode was painted
   * on rather than designed — and E9 found it missing entirely.
   *
   * "light dark" here means "follow the system", which is what :root does.
   * The explicit overrides below narrow it to one.
   */
  color-scheme: light dark;

  /*
   * The system stack, as a token.
   *
   * It was written inline in one component's font-family rule and nowhere
   * else, so a theme pack could not fall back to it — a pack that names
   * "Quicksand" has to name what comes after, and every pack has to name the
   * same thing or the product's typography drifts per theme. It is also the
   * fallback that matters most: Quicksand and Archivo have no CJK, so a
   * Japanese or Chinese reader gets this stack whatever pack is chosen.
   */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Inter, system-ui, sans-serif;
  /*
   * THE EVERYDAY TYPE (0.57): Figtree to read, Bricolage Grotesque for the few
   * names a screen is about. Both are served from this origin (public/fonts,
   * SIL Open Font Licence) because the page's font-src is 'self' and a
   * local-first product does not fetch its letters from somebody else. Until
   * they arrive, and offline before first use, the system face stands in.
   */
  --font-body: "Figtree", var(--font-system);
  --font-display: "Bricolage Grotesque", var(--font-body);
  --pack-radius-scale: 1;
  --pack-font: var(--font-body);
  --pack-font-display: var(--font-display);
  --pack-stroke: 1.6;
  --pack-surface-shadow: var(--elevation-bubble);
  --pack-surface-border: 0;
  --pack-display-case: none;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-0-5: 0.125rem;
  --text-display-size: 2.125rem;
  --text-display-line: 2.5rem;
  --text-display-weight: 700;
  --text-display-tracking: -0.022em;
  --text-title-1-size: 1.75rem;
  --text-title-1-line: 2.125rem;
  --text-title-1-weight: 700;
  --text-title-1-tracking: -0.02em;
  --text-title-2-size: 1.375rem;
  --text-title-2-line: 1.75rem;
  --text-title-2-weight: 600;
  --text-title-2-tracking: -0.014em;
  --text-title-3-size: 1.25rem;
  --text-title-3-line: 1.625rem;
  --text-title-3-weight: 600;
  --text-title-3-tracking: -0.01em;
  --text-headline-size: 1.0625rem;
  --text-headline-line: 1.375rem;
  --text-headline-weight: 600;
  --text-headline-tracking: -0.006em;
  --text-body-size: 1.0625rem;
  --text-body-line: 1.375rem;
  --text-body-weight: 400;
  --text-body-tracking: 0em;
  --text-callout-size: 1rem;
  --text-callout-line: 1.3125rem;
  --text-callout-weight: 400;
  --text-callout-tracking: 0em;
  --text-subhead-size: 0.9375rem;
  --text-subhead-line: 1.25rem;
  --text-subhead-weight: 400;
  --text-subhead-tracking: 0em;
  --text-footnote-size: 0.8125rem;
  --text-footnote-line: 1.125rem;
  --text-footnote-weight: 400;
  --text-footnote-tracking: 0em;
  --text-caption-size: 0.75rem;
  --text-caption-line: 1rem;
  --text-caption-weight: 400;
  --text-caption-tracking: 0.005em;
  --text-micro-size: 0.6875rem;
  --text-micro-line: 0.875rem;
  --text-micro-weight: 500;
  --text-micro-tracking: 0.05em;
  --motion-micro: 120ms;
  --motion-standard: 200ms;
  --motion-large: 300ms;
  --motion-deliberate: 400ms;
  --loop-ambient: 2000ms;
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius-sm: calc(0.375rem * var(--pack-radius-scale));
  --radius-md: calc(0.625rem * var(--pack-radius-scale));
  --radius-lg: calc(1rem * var(--pack-radius-scale));
  --radius-xl: calc(1.375rem * var(--pack-radius-scale));
  --radius-full: 9999px;
  --touch-target: 44px;
  --rail-width: 12rem;
  --everyday-bar-height: 4.5rem;
  --border-hairline: 1px;
  --focus-ring: 2px;
  --content-max-width: 42.5rem;
  --app-canvas-max-width: 67.5rem;
  --color-surface: #f6f6f4;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ebebe8;
  --color-content-primary: #17181a;
  --color-content-secondary: #55585e;
  --color-content-tertiary: #63666c;
  --color-separator: #e2e2df;
  --color-border-control: #7c7f85;
  --color-accent: #17181a;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e6e6e3;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
  --tint-reminder: #fff1d6;
  --tint-reminder-ink: #8a4b00;
  --tint-money: #e3efe8;
  --tint-money-ink: #2f6b4f;
  --tint-link: #fde8e6;
  --tint-link-ink: #9e2a20;
  --tint-note: #edeae4;
  --tint-note-ink: #3d4752;
  --tint-voice: #e8eef6;
  --tint-voice-ink: #1d4e89;
  --tint-wave: #9db3cf;
  --tint-photo: #d9cfc0;
  --tint-alert: #c2362b;
  --tint-alert-ink: #ffffff;
  --color-participant-0: #a92d0b;
  --color-participant-1: #0057b8;
  --color-participant-2: #007355;
  --color-participant-3: #8a5600;
  --color-participant-4: #a21caf;
  --color-participant-5: #a61b42;
  --color-shelf-0: #b3300a;
  --color-shelf-1: #a8410f;
  --color-shelf-2: #8a5600;
  --color-shelf-3: #5c6a00;
  --color-shelf-4: #0a6b34;
  --color-shelf-5: #00695f;
  --color-shelf-6: #0057b8;
  --color-shelf-7: #4b3fd0;
  --color-shelf-8: #8f2bb5;
  --color-shelf-9: #a61b42;
  --elevation-bubble: 0 0.25rem 0 rgb(23 24 26 / 0.08);
  --elevation-sm: 0 0.125rem 0 rgb(23 24 26 / 0.1);
  --elevation-md: 0 0.375rem 0 rgb(23 24 26 / 0.11);
  --elevation-lg: 0 0.5rem 0 rgb(23 24 26 / 0.12);
  --elevation-xl: 0 0.75rem 0 rgb(23 24 26 / 0.14);
  --bubble-slot-1: #028cd9;
  --bubble-slot-2: #af7d06;
  --bubble-slot-3: #d0293a;
  --bubble-slot-4: #e14da1;
  --bubble-slot-5: #0f8983;
  --palette-shimmer-1: #028cd9;
  --palette-shimmer-2: #af7d06;
  --palette-shimmer-3: #d0293a;
  --palette-shimmer-4: #e14da1;
  --palette-shimmer-5: #0f8983;
  --palette-confetti-1: #0b8dd3;
  --palette-confetti-2: #af7d06;
  --palette-confetti-3: #d02940;
  --palette-confetti-4: #dd4faa;
  --palette-confetti-5: #626e7b;
  --palette-firecracker-1: #b15aff;
  --palette-firecracker-2: #ee047e;
  --palette-firecracker-3: #b84c03;
  --palette-firecracker-4: #0970bf;
  --palette-firecracker-5: #077d51;
  --palette-sunday-1: #ae5230;
  --palette-sunday-2: #1a9966;
  --palette-sunday-3: #228ecb;
  --palette-sunday-4: #a2508a;
  --palette-sunday-5: #7060b6;
  --palette-signal-1: #016ec6;
  --palette-signal-2: #fe3055;
  --palette-signal-3: #089b47;
  --palette-signal-4: #9e5e05;
  --palette-signal-5: #bb55f9;
  --palette-riso-1: #f123c3;
  --palette-riso-2: #07978b;
  --palette-riso-3: #3782fd;
  --palette-riso-4: #f94102;
  --palette-riso-5: #478b00;
  --palette-beacon-1: #f83f43;
  --palette-beacon-2: #0194a1;
  --palette-beacon-3: #0970bf;
  --palette-beacon-4: #a563fc;
  --palette-beacon-5: #2b8d05;
  --palette-garden-1: #835bad;
  --palette-garden-2: #bf5b6e;
  --palette-garden-3: #0c9596;
  --palette-garden-4: #72912e;
  --palette-garden-5: #338cce;
  --palette-soft-sky-1: #0192b8;
  --palette-soft-sky-2: #a25282;
  --palette-soft-sky-3: #7062b0;
  --palette-soft-sky-4: #1d9870;
  --palette-soft-sky-5: #c27242;
  --palette-clear-1: #0d89e8;
  --palette-clear-2: #c73839;
  --palette-clear-3: #077d51;
  --palette-clear-4: #ab42a5;
  --palette-clear-5: #af7d06;
  --palette-strong-1: #3e72fe;
  --palette-strong-2: #eb2e59;
  --palette-strong-3: #098a63;
  --palette-strong-4: #b049d8;
  --palette-strong-5: #9d6a0b;
  --palette-gentle-1: #3e8fb3;
  --palette-gentle-2: #876921;
  --palette-gentle-3: #6b9155;
  --palette-gentle-4: #ab6681;
  --palette-gentle-5: #6966a4;
}

/* A person's palette colours their things; the chrome above stays neutral. */
:root[data-palette="confetti"] {
  --bubble-slot-1: #0b8dd3;
  --bubble-slot-2: #af7d06;
  --bubble-slot-3: #d02940;
  --bubble-slot-4: #dd4faa;
  --bubble-slot-5: #626e7b;
}
:root[data-palette="firecracker"] {
  --bubble-slot-1: #b15aff;
  --bubble-slot-2: #ee047e;
  --bubble-slot-3: #b84c03;
  --bubble-slot-4: #0970bf;
  --bubble-slot-5: #077d51;
}
:root[data-palette="sunday"] {
  --bubble-slot-1: #ae5230;
  --bubble-slot-2: #1a9966;
  --bubble-slot-3: #228ecb;
  --bubble-slot-4: #a2508a;
  --bubble-slot-5: #7060b6;
}
:root[data-palette="signal"] {
  --bubble-slot-1: #016ec6;
  --bubble-slot-2: #fe3055;
  --bubble-slot-3: #089b47;
  --bubble-slot-4: #9e5e05;
  --bubble-slot-5: #bb55f9;
}
:root[data-palette="riso"] {
  --bubble-slot-1: #f123c3;
  --bubble-slot-2: #07978b;
  --bubble-slot-3: #3782fd;
  --bubble-slot-4: #f94102;
  --bubble-slot-5: #478b00;
}
:root[data-palette="beacon"] {
  --bubble-slot-1: #f83f43;
  --bubble-slot-2: #0194a1;
  --bubble-slot-3: #0970bf;
  --bubble-slot-4: #a563fc;
  --bubble-slot-5: #2b8d05;
}
:root[data-palette="garden"] {
  --bubble-slot-1: #835bad;
  --bubble-slot-2: #bf5b6e;
  --bubble-slot-3: #0c9596;
  --bubble-slot-4: #72912e;
  --bubble-slot-5: #338cce;
}
:root[data-palette="soft-sky"] {
  --bubble-slot-1: #0192b8;
  --bubble-slot-2: #a25282;
  --bubble-slot-3: #7062b0;
  --bubble-slot-4: #1d9870;
  --bubble-slot-5: #c27242;
}
:root[data-palette="clear"] {
  --bubble-slot-1: #0d89e8;
  --bubble-slot-2: #c73839;
  --bubble-slot-3: #077d51;
  --bubble-slot-4: #ab42a5;
  --bubble-slot-5: #af7d06;
}
:root[data-palette="strong"] {
  --bubble-slot-1: #3e72fe;
  --bubble-slot-2: #eb2e59;
  --bubble-slot-3: #098a63;
  --bubble-slot-4: #b049d8;
  --bubble-slot-5: #9d6a0b;
}
:root[data-palette="gentle"] {
  --bubble-slot-1: #3e8fb3;
  --bubble-slot-2: #876921;
  --bubble-slot-3: #6b9155;
  --bubble-slot-4: #ab6681;
  --bubble-slot-5: #6966a4;
}

/*
 * THE WORKSPACE LOOKS ARE NOT A COLOUR SCHEME, and must not be gated by one.
 *
 * These two blocks sat inside a prefers-color-scheme: light media query with
 * no dark counterpart, so on a device set to dark EVERY workspace token was
 * undefined: ink, card, line, accent and all six kind colours. A var() with
 * nothing behind it is not a fallback, it is an invalid declaration - the card
 * lost its background, the tile lost its colour, and the workspace rendered as
 * unstyled text on a bare ground. The whole design system was missing for half
 * the world and every test still passed, because they check what the tokens
 * ARE and never checked that they are emitted for both schemes.
 *
 * dawn, vhs, disco, minimal and deco are named looks selected by an attribute,
 * each already carrying its own values. They belong at the top level.
 */
[data-workspace-theme] {
  --kind-note: #64748b;
  --kind-link: #2672df;
  --kind-media: #ce4d85;
  --kind-audio: #b34bd6;
  --kind-place: #0e8f7b;
  --kind-task: #d1781e;
  --kind-reminder: #e04949;
  --tile-ink: #ffffff;
  --art-shade: #0a0a0b;
}
[data-workspace-theme="bubbles"] {
  --ink: var(--color-content-primary);
  --muted: var(--color-content-secondary);
  --line: var(--color-separator);
  --controlLine: var(--color-border-control);
  --soft: var(--color-surface);
  --card: var(--color-surface-raised);
  --accent: var(--color-accent);
  --accentInk: var(--color-accent-content);
  --focus: var(--color-accent);
  --ambient: none;
}
[data-workspace-theme="riso"] {
  --ink: #1d1726;
  --muted: #645a70;
  --line: #e9e0d4;
  --controlLine: #998b78;
  --soft: #faf5ee;
  --card: #ffffff;
  --accent: #7038ff;
  --accentInk: #ffffff;
  --focus: #1d5bd6;
  --ambient: none;
}
[data-workspace-theme="dawn"] {
  --ink: #182033;
  --muted: #657087;
  --line: #dce2ed;
  --controlLine: #848ea2;
  --soft: #f5f7fb;
  --card: #ffffff;
  --accent: #7257e8;
  --accentInk: #ffffff;
  --focus: #2d75ff;
  --ambient: none;
}
[data-workspace-theme="vhs"] {
  --ink: #281640;
  --muted: #70527c;
  --line: #d8c3e6;
  --controlLine: #9886a4;
  --soft: #fff1fa;
  --card: #fffaff;
  --accent: #762bff;
  --accentInk: #ffffff;
  --focus: #2d75ff;
  --ambient: linear-gradient(145deg, #ffe1f3, #eadbff 50%, #ffe8c8);
}
[data-workspace-theme="disco"] {
  --ink: #30141a;
  --muted: #7b4654;
  --line: #f2c5bf;
  --controlLine: #a38985;
  --soft: #fff8eb;
  --card: #fffdf9;
  --accent: #e21e72;
  --accentInk: #ffffff;
  --focus: #2d75ff;
  --ambient: linear-gradient(135deg, #ffd8a6, #ffcae6 45%, #d4c3ff);
}
[data-workspace-theme="minimal"] {
  --ink: #171717;
  --muted: #626262;
  --line: #d8d8d8;
  --controlLine: #8e8e8e;
  --soft: #f7f7f5;
  --card: #ffffff;
  --accent: #141414;
  --accentInk: #ffffff;
  --focus: #2d75ff;
  --ambient: none;
}
[data-workspace-theme="deco"] {
  --ink: #16312f;
  --muted: #4e6865;
  --line: #b6d0ca;
  --controlLine: #72948c;
  --soft: #edf8f2;
  --card: #fcfffa;
  --accent: #11736d;
  --accentInk: #ffffff;
  --focus: #2d75ff;
  --ambient: linear-gradient(135deg, #f3e4b4, #eaf7ef 50%, #b6dfd5);
}


@media (prefers-color-scheme: dark) {
  :root {
  --color-surface: #16171a;
  --color-surface-raised: #202226;
  --color-surface-sunken: #0f1012;
  --color-content-primary: #f2f2f0;
  --color-content-secondary: #b4b6ba;
  --color-content-tertiary: #9a9ca1;
  --color-separator: #303238;
  --color-border-control: #7d8087;
  --color-accent: #f2f2f0;
  --color-accent-content: #16171a;
  --color-accent-subtle: #2e3036;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
  --tint-reminder: #3b2c12;
  --tint-reminder-ink: #ffd28a;
  --tint-money: #1d3a2c;
  --tint-money-ink: #a6e0c2;
  --tint-link: #3e2321;
  --tint-link-ink: #ffb8b0;
  --tint-note: #2a3038;
  --tint-note-ink: #d5dbe1;
  --tint-voice: #1f3550;
  --tint-voice-ink: #bcd5f6;
  --tint-wave: #5f7ea6;
  --tint-photo: #3a342c;
  --tint-alert: #ff8a80;
  --tint-alert-ink: #2b0d0a;
  --color-participant-0: #ff9a73;
  --color-participant-1: #6db6ff;
  --color-participant-2: #54d6a5;
  --color-participant-3: #ffd166;
  --color-participant-4: #f3a6ff;
  --color-participant-5: #ff8fb3;
  --color-shelf-0: #ff8a5c;
  --color-shelf-1: #ffa05a;
  --color-shelf-2: #e8b33c;
  --color-shelf-3: #b8cc3a;
  --color-shelf-4: #4fd489;
  --color-shelf-5: #3fd0c2;
  --color-shelf-6: #6aaeff;
  --color-shelf-7: #a99bff;
  --color-shelf-8: #e07ff0;
  --color-shelf-9: #ff7d9e;
  --elevation-bubble: 0 0.25rem 0 rgb(0 0 0 / 0.42);
  --elevation-sm: 0 0.125rem 0 rgb(0 0 0 / 0.46);
  --elevation-md: 0 0.375rem 0 rgb(0 0 0 / 0.5);
  --elevation-lg: 0 0.5rem 0 rgb(0 0 0 / 0.54);
  --elevation-xl: 0 0.75rem 0 rgb(0 0 0 / 0.58);
  }
}

/* An explicit choice outranks the system's. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-surface: #16171a;
  --color-surface-raised: #202226;
  --color-surface-sunken: #0f1012;
  --color-content-primary: #f2f2f0;
  --color-content-secondary: #b4b6ba;
  --color-content-tertiary: #9a9ca1;
  --color-separator: #303238;
  --color-border-control: #7d8087;
  --color-accent: #f2f2f0;
  --color-accent-content: #16171a;
  --color-accent-subtle: #2e3036;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
  --tint-reminder: #3b2c12;
  --tint-reminder-ink: #ffd28a;
  --tint-money: #1d3a2c;
  --tint-money-ink: #a6e0c2;
  --tint-link: #3e2321;
  --tint-link-ink: #ffb8b0;
  --tint-note: #2a3038;
  --tint-note-ink: #d5dbe1;
  --tint-voice: #1f3550;
  --tint-voice-ink: #bcd5f6;
  --tint-wave: #5f7ea6;
  --tint-photo: #3a342c;
  --tint-alert: #ff8a80;
  --tint-alert-ink: #2b0d0a;
  --color-participant-0: #ff9a73;
  --color-participant-1: #6db6ff;
  --color-participant-2: #54d6a5;
  --color-participant-3: #ffd166;
  --color-participant-4: #f3a6ff;
  --color-participant-5: #ff8fb3;
  --color-shelf-0: #ff8a5c;
  --color-shelf-1: #ffa05a;
  --color-shelf-2: #e8b33c;
  --color-shelf-3: #b8cc3a;
  --color-shelf-4: #4fd489;
  --color-shelf-5: #3fd0c2;
  --color-shelf-6: #6aaeff;
  --color-shelf-7: #a99bff;
  --color-shelf-8: #e07ff0;
  --color-shelf-9: #ff7d9e;
  --elevation-bubble: 0 0.25rem 0 rgb(0 0 0 / 0.42);
  --elevation-sm: 0 0.125rem 0 rgb(0 0 0 / 0.46);
  --elevation-md: 0 0.375rem 0 rgb(0 0 0 / 0.5);
  --elevation-lg: 0 0.5rem 0 rgb(0 0 0 / 0.54);
  --elevation-xl: 0 0.75rem 0 rgb(0 0 0 / 0.58);
}
:root[data-theme="light"] {
  color-scheme: light;
  --color-surface: #f6f6f4;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ebebe8;
  --color-content-primary: #17181a;
  --color-content-secondary: #55585e;
  --color-content-tertiary: #63666c;
  --color-separator: #e2e2df;
  --color-border-control: #7c7f85;
  --color-accent: #17181a;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e6e6e3;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
  --tint-reminder: #fff1d6;
  --tint-reminder-ink: #8a4b00;
  --tint-money: #e3efe8;
  --tint-money-ink: #2f6b4f;
  --tint-link: #fde8e6;
  --tint-link-ink: #9e2a20;
  --tint-note: #edeae4;
  --tint-note-ink: #3d4752;
  --tint-voice: #e8eef6;
  --tint-voice-ink: #1d4e89;
  --tint-wave: #9db3cf;
  --tint-photo: #d9cfc0;
  --tint-alert: #c2362b;
  --tint-alert-ink: #ffffff;
  --color-participant-0: #a92d0b;
  --color-participant-1: #0057b8;
  --color-participant-2: #007355;
  --color-participant-3: #8a5600;
  --color-participant-4: #a21caf;
  --color-participant-5: #a61b42;
  --color-shelf-0: #b3300a;
  --color-shelf-1: #a8410f;
  --color-shelf-2: #8a5600;
  --color-shelf-3: #5c6a00;
  --color-shelf-4: #0a6b34;
  --color-shelf-5: #00695f;
  --color-shelf-6: #0057b8;
  --color-shelf-7: #4b3fd0;
  --color-shelf-8: #8f2bb5;
  --color-shelf-9: #a61b42;
  --elevation-bubble: 0 0.25rem 0 rgb(23 24 26 / 0.08);
  --elevation-sm: 0 0.125rem 0 rgb(23 24 26 / 0.1);
  --elevation-md: 0 0.375rem 0 rgb(23 24 26 / 0.11);
  --elevation-lg: 0 0.5rem 0 rgb(23 24 26 / 0.12);
  --elevation-xl: 0 0.75rem 0 rgb(23 24 26 / 0.14);
}

/* Whole-app look; explicit light/dark continues to outrank the system. */
:root[data-look="sunny"] {
  --color-surface: #f7f4ee;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #edeae4;
  --color-content-primary: #14212e;
  --color-content-secondary: #5b6672;
  --color-content-tertiary: #5b6672;
  --color-separator: #e6e1d8;
  --color-border-control: #7d8792;
  --color-accent: #1d4e89;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e8eef6;
  --color-surface-inverse: #14212e;
  --color-content-inverse: #f7f4ee;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #2f6b4f;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a4b00;
  --color-critical: #c2362b;
  --color-info: #005fcc;
}
@media (prefers-color-scheme: dark) { :root[data-look="sunny"]:not([data-theme="light"]) {
  --color-surface: #121a22;
  --color-surface-raised: #1b2630;
  --color-surface-sunken: #0c1218;
  --color-content-primary: #f3efe8;
  --color-content-secondary: #b3bcc6;
  --color-content-tertiary: #a3adb8;
  --color-separator: #2c3844;
  --color-border-control: #8c9aa8;
  --color-accent: #9cc3f5;
  --color-accent-content: #0f2238;
  --color-accent-subtle: #24384f;
  --color-surface-inverse: #f3efe8;
  --color-content-inverse: #121a22;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
} }
:root[data-look="sunny"][data-theme="dark"] {
  --color-surface: #121a22;
  --color-surface-raised: #1b2630;
  --color-surface-sunken: #0c1218;
  --color-content-primary: #f3efe8;
  --color-content-secondary: #b3bcc6;
  --color-content-tertiary: #a3adb8;
  --color-separator: #2c3844;
  --color-border-control: #8c9aa8;
  --color-accent: #9cc3f5;
  --color-accent-content: #0f2238;
  --color-accent-subtle: #24384f;
  --color-surface-inverse: #f3efe8;
  --color-content-inverse: #121a22;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
}
:root[data-look="sunny"][data-theme="light"] {
  --color-surface: #f7f4ee;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #edeae4;
  --color-content-primary: #14212e;
  --color-content-secondary: #5b6672;
  --color-content-tertiary: #5b6672;
  --color-separator: #e6e1d8;
  --color-border-control: #7d8792;
  --color-accent: #1d4e89;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e8eef6;
  --color-surface-inverse: #14212e;
  --color-content-inverse: #f7f4ee;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #2f6b4f;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a4b00;
  --color-critical: #c2362b;
  --color-info: #005fcc;
}
:root[data-look="rose"] {
  --color-surface: #fff4f7;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ffe9f0;
  --color-content-primary: #3d2233;
  --color-content-secondary: #6b4159;
  --color-content-tertiary: #7a4d66;
  --color-separator: #ffe2ec;
  --color-border-control: #8a5a72;
  --color-accent: #cc3a74;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #ffe0ec;
  --color-surface-inverse: #3d2233;
  --color-content-inverse: #fff4f7;
  --color-scrim: rgb(61 34 51 / 0.42);
  --color-positive: #0f7150;
  --color-positive-inverse: #5ad3a4;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
@media (prefers-color-scheme: dark) { :root[data-look="rose"]:not([data-theme="light"]) {
  --color-surface: #1a1016;
  --color-surface-raised: #271821;
  --color-surface-sunken: #120a0f;
  --color-content-primary: #ffeaf2;
  --color-content-secondary: #dcb0c6;
  --color-content-tertiary: #cb9db4;
  --color-separator: #3a2430;
  --color-border-control: #a97d92;
  --color-accent: #ff8fbb;
  --color-accent-content: #2a1421;
  --color-accent-subtle: #3d2331;
  --color-surface-inverse: #ffeaf2;
  --color-content-inverse: #1a1016;
  --color-scrim: rgb(10 5 8 / 0.55);
  --color-positive: #5ad3a4;
  --color-positive-inverse: #0f7150;
  --color-caution: #f0b357;
  --color-critical: #ff8a80;
  --color-info: #8ab8ff;
} }
:root[data-look="rose"][data-theme="dark"] {
  --color-surface: #1a1016;
  --color-surface-raised: #271821;
  --color-surface-sunken: #120a0f;
  --color-content-primary: #ffeaf2;
  --color-content-secondary: #dcb0c6;
  --color-content-tertiary: #cb9db4;
  --color-separator: #3a2430;
  --color-border-control: #a97d92;
  --color-accent: #ff8fbb;
  --color-accent-content: #2a1421;
  --color-accent-subtle: #3d2331;
  --color-surface-inverse: #ffeaf2;
  --color-content-inverse: #1a1016;
  --color-scrim: rgb(10 5 8 / 0.55);
  --color-positive: #5ad3a4;
  --color-positive-inverse: #0f7150;
  --color-caution: #f0b357;
  --color-critical: #ff8a80;
  --color-info: #8ab8ff;
}
:root[data-look="rose"][data-theme="light"] {
  --color-surface: #fff4f7;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ffe9f0;
  --color-content-primary: #3d2233;
  --color-content-secondary: #6b4159;
  --color-content-tertiary: #7a4d66;
  --color-separator: #ffe2ec;
  --color-border-control: #8a5a72;
  --color-accent: #cc3a74;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #ffe0ec;
  --color-surface-inverse: #3d2233;
  --color-content-inverse: #fff4f7;
  --color-scrim: rgb(61 34 51 / 0.42);
  --color-positive: #0f7150;
  --color-positive-inverse: #5ad3a4;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
:root[data-look="picnic"] {
  --color-surface: #fff4f4;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ffe1e9;
  --color-content-primary: #422236;
  --color-content-secondary: #684255;
  --color-content-tertiary: #725565;
  --color-separator: #e2e2df;
  --color-border-control: #976579;
  --color-accent: #b52755;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #ffe1e9;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
@media (prefers-color-scheme: dark) { :root[data-look="picnic"]:not([data-theme="light"]) {
  --color-surface: #311f36;
  --color-surface-raised: #492c48;
  --color-surface-sunken: #231526;
  --color-content-primary: #fff1f6;
  --color-content-secondary: #edc7db;
  --color-content-tertiary: #dfb7cc;
  --color-separator: #303238;
  --color-border-control: #cda7bd;
  --color-accent: #ffb6cb;
  --color-accent-content: #422236;
  --color-accent-subtle: #59364e;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
} }
:root[data-look="picnic"][data-theme="dark"] {
  --color-surface: #311f36;
  --color-surface-raised: #492c48;
  --color-surface-sunken: #231526;
  --color-content-primary: #fff1f6;
  --color-content-secondary: #edc7db;
  --color-content-tertiary: #dfb7cc;
  --color-separator: #303238;
  --color-border-control: #cda7bd;
  --color-accent: #ffb6cb;
  --color-accent-content: #422236;
  --color-accent-subtle: #59364e;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
}
:root[data-look="picnic"][data-theme="light"] {
  --color-surface: #fff4f4;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ffe1e9;
  --color-content-primary: #422236;
  --color-content-secondary: #684255;
  --color-content-tertiary: #725565;
  --color-separator: #e2e2df;
  --color-border-control: #976579;
  --color-accent: #b52755;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #ffe1e9;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
:root[data-look="garden"] {
  --color-surface: #f0fbf3;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #d9f2df;
  --color-content-primary: #15362b;
  --color-content-secondary: #3e6253;
  --color-content-tertiary: #506859;
  --color-separator: #e2e2df;
  --color-border-control: #658574;
  --color-accent: #12674b;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #d9f2df;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
@media (prefers-color-scheme: dark) { :root[data-look="garden"]:not([data-theme="light"]) {
  --color-surface: #142f2b;
  --color-surface-raised: #21433b;
  --color-surface-sunken: #0d211d;
  --color-content-primary: #edfff3;
  --color-content-secondary: #bddbca;
  --color-content-tertiary: #abcbb9;
  --color-separator: #303238;
  --color-border-control: #99bfac;
  --color-accent: #88ebc2;
  --color-accent-content: #15362b;
  --color-accent-subtle: #294f40;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
} }
:root[data-look="garden"][data-theme="dark"] {
  --color-surface: #142f2b;
  --color-surface-raised: #21433b;
  --color-surface-sunken: #0d211d;
  --color-content-primary: #edfff3;
  --color-content-secondary: #bddbca;
  --color-content-tertiary: #abcbb9;
  --color-separator: #303238;
  --color-border-control: #99bfac;
  --color-accent: #88ebc2;
  --color-accent-content: #15362b;
  --color-accent-subtle: #294f40;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
}
:root[data-look="garden"][data-theme="light"] {
  --color-surface: #f0fbf3;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #d9f2df;
  --color-content-primary: #15362b;
  --color-content-secondary: #3e6253;
  --color-content-tertiary: #506859;
  --color-separator: #e2e2df;
  --color-border-control: #658574;
  --color-accent: #12674b;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #d9f2df;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
:root[data-look="golden"] {
  --color-surface: #fff8e8;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ffebc5;
  --color-content-primary: #382416;
  --color-content-secondary: #68513d;
  --color-content-tertiary: #755b44;
  --color-separator: #e2e2df;
  --color-border-control: #947a53;
  --color-accent: #8b4b00;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #ffebc5;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
@media (prefers-color-scheme: dark) { :root[data-look="golden"]:not([data-theme="light"]) {
  --color-surface: #34251c;
  --color-surface-raised: #49342a;
  --color-surface-sunken: #251911;
  --color-content-primary: #fff6e2;
  --color-content-secondary: #e5cfb3;
  --color-content-tertiary: #d5bea3;
  --color-separator: #303238;
  --color-border-control: #c6ad8c;
  --color-accent: #ffd276;
  --color-accent-content: #382416;
  --color-accent-subtle: #584125;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
} }
:root[data-look="golden"][data-theme="dark"] {
  --color-surface: #34251c;
  --color-surface-raised: #49342a;
  --color-surface-sunken: #251911;
  --color-content-primary: #fff6e2;
  --color-content-secondary: #e5cfb3;
  --color-content-tertiary: #d5bea3;
  --color-separator: #303238;
  --color-border-control: #c6ad8c;
  --color-accent: #ffd276;
  --color-accent-content: #382416;
  --color-accent-subtle: #584125;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
}
:root[data-look="golden"][data-theme="light"] {
  --color-surface: #fff8e8;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ffebc5;
  --color-content-primary: #382416;
  --color-content-secondary: #68513d;
  --color-content-tertiary: #755b44;
  --color-separator: #e2e2df;
  --color-border-control: #947a53;
  --color-accent: #8b4b00;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #ffebc5;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
:root[data-look="quiet"] {
  --color-surface: #f6f6f4;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ebebe8;
  --color-content-primary: #17181a;
  --color-content-secondary: #55585e;
  --color-content-tertiary: #63666c;
  --color-separator: #e2e2df;
  --color-border-control: #7c7f85;
  --color-accent: #17181a;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e6e6e3;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
@media (prefers-color-scheme: dark) { :root[data-look="quiet"]:not([data-theme="light"]) {
  --color-surface: #16171a;
  --color-surface-raised: #202226;
  --color-surface-sunken: #0f1012;
  --color-content-primary: #f2f2f0;
  --color-content-secondary: #b4b6ba;
  --color-content-tertiary: #9a9ca1;
  --color-separator: #303238;
  --color-border-control: #7d8087;
  --color-accent: #f2f2f0;
  --color-accent-content: #16171a;
  --color-accent-subtle: #2e3036;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
} }
:root[data-look="quiet"][data-theme="dark"] {
  --color-surface: #16171a;
  --color-surface-raised: #202226;
  --color-surface-sunken: #0f1012;
  --color-content-primary: #f2f2f0;
  --color-content-secondary: #b4b6ba;
  --color-content-tertiary: #9a9ca1;
  --color-separator: #303238;
  --color-border-control: #7d8087;
  --color-accent: #f2f2f0;
  --color-accent-content: #16171a;
  --color-accent-subtle: #2e3036;
  --color-surface-inverse: #f2f2f0;
  --color-content-inverse: #17181a;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #087a55;
  --color-caution: #ffd166;
  --color-critical: #ff7a70;
  --color-info: #68b7ff;
}
:root[data-look="quiet"][data-theme="light"] {
  --color-surface: #f6f6f4;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #ebebe8;
  --color-content-primary: #17181a;
  --color-content-secondary: #55585e;
  --color-content-tertiary: #63666c;
  --color-separator: #e2e2df;
  --color-border-control: #7c7f85;
  --color-accent: #17181a;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e6e6e3;
  --color-surface-inverse: #17181a;
  --color-content-inverse: #f6f6f4;
  --color-scrim: rgb(23 24 26 / 0.42);
  --color-positive: #087a55;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #8a5600;
  --color-critical: #b42318;
  --color-info: #005fcc;
}
:root[data-look="ink"] {
  --color-surface: #f4f3ee;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #e8e6df;
  --color-content-primary: #000000;
  --color-content-secondary: #1f1f1f;
  --color-content-tertiary: #3d3d3d;
  --color-separator: #000000;
  --color-border-control: #000000;
  --color-accent: #1a1a1a;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e0ded6;
  --color-surface-inverse: #000000;
  --color-content-inverse: #ffffff;
  --color-scrim: rgb(0 0 0 / 0.5);
  --color-positive: #0a6b45;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #7a4a00;
  --color-critical: #a81c10;
  --color-info: #0047a8;
}
@media (prefers-color-scheme: dark) { :root[data-look="ink"]:not([data-theme="light"]) {
  --color-surface: #0a0a0a;
  --color-surface-raised: #000000;
  --color-surface-sunken: #141414;
  --color-content-primary: #ffffff;
  --color-content-secondary: #e0e0e0;
  --color-content-tertiary: #bdbdbd;
  --color-separator: #ffffff;
  --color-border-control: #ffffff;
  --color-accent: #ffffff;
  --color-accent-content: #000000;
  --color-accent-subtle: #1f1f1f;
  --color-surface-inverse: #ffffff;
  --color-content-inverse: #000000;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #0a6b45;
  --color-caution: #f0b357;
  --color-critical: #ff8a80;
  --color-info: #8ab8ff;
} }
:root[data-look="ink"][data-theme="dark"] {
  --color-surface: #0a0a0a;
  --color-surface-raised: #000000;
  --color-surface-sunken: #141414;
  --color-content-primary: #ffffff;
  --color-content-secondary: #e0e0e0;
  --color-content-tertiary: #bdbdbd;
  --color-separator: #ffffff;
  --color-border-control: #ffffff;
  --color-accent: #ffffff;
  --color-accent-content: #000000;
  --color-accent-subtle: #1f1f1f;
  --color-surface-inverse: #ffffff;
  --color-content-inverse: #000000;
  --color-scrim: rgb(0 0 0 / 0.6);
  --color-positive: #4ed6a0;
  --color-positive-inverse: #0a6b45;
  --color-caution: #f0b357;
  --color-critical: #ff8a80;
  --color-info: #8ab8ff;
}
:root[data-look="ink"][data-theme="light"] {
  --color-surface: #f4f3ee;
  --color-surface-raised: #ffffff;
  --color-surface-sunken: #e8e6df;
  --color-content-primary: #000000;
  --color-content-secondary: #1f1f1f;
  --color-content-tertiary: #3d3d3d;
  --color-separator: #000000;
  --color-border-control: #000000;
  --color-accent: #1a1a1a;
  --color-accent-content: #ffffff;
  --color-accent-subtle: #e0ded6;
  --color-surface-inverse: #000000;
  --color-content-inverse: #ffffff;
  --color-scrim: rgb(0 0 0 / 0.5);
  --color-positive: #0a6b45;
  --color-positive-inverse: #4ed6a0;
  --color-caution: #7a4a00;
  --color-critical: #a81c10;
  --color-info: #0047a8;
}


/*
 * Theme packs. Everything about a look that is not its colour: radius, face,
 * icon weight, and whether a raised surface uses a shadow or an outline.
 */
:root[data-pack="default"] {
  --pack-radius-scale: 1;
  --pack-font: var(--font-system);
  --pack-font-display: var(--font-system);
  --pack-stroke: 1.6;
  --pack-surface-shadow: var(--elevation-bubble);
  --pack-surface-border: 0;
  --pack-display-case: none;
}
:root[data-pack="kawaii"] {
  --pack-radius-scale: 1.45;
  --pack-font: "Quicksand", var(--font-system);
  --pack-font-display: "Quicksand", var(--font-system);
  --pack-stroke: 2.2;
  --pack-surface-shadow: var(--elevation-md);
  --pack-surface-border: 0;
  --pack-display-case: none;
}
:root[data-pack="brutalist"] {
  --pack-radius-scale: 0;
  --pack-font: "Archivo", var(--font-system);
  --pack-font-display: "Archivo", var(--font-system);
  --pack-stroke: 2.4;
  --pack-surface-shadow: var(--elevation-lg);
  --pack-surface-border: var(--border-hairline) solid var(--color-content-primary);
  --pack-display-case: uppercase;
}

/*
 * "Increase contrast", asked for explicitly.
 *
 * Not the same request as forced colours: the palette is still ours, and the
 * person is saying our margins are too fine for them. So the two tokens that
 * sit closest to their floors move up — the decorative hairline stops being
 * decorative, and secondary text goes to primary rather than staying a shade
 * that merely passes.
 */
@media (prefers-contrast: more) {
  :root {
    --color-separator: var(--color-border-control);
    --color-content-tertiary: var(--color-content-secondary);
  }
}

/* §5: a fade, never a faster version of the same movement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 100ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 100ms !important;
    transition-property: opacity !important;
    scroll-behavior: auto !important;
  }
}
/* bubblewith.com. The token block above this line is generated from
   @bubble/ui/tokens at build time; everything here refers to it by name. */

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --gutter: 1rem;
  --width: 70rem;
  --radius: 1.5rem;
  --frame: 3s;
  --accent: var(--bubble-slot-1);
  /*
   * Words on a bubble colour. The bubble colours stay put at night, so this
   * stays light: whichever of these two tokens is the light one.
   */
  --on-bubble: var(--color-surface-raised);
}
@media (prefers-color-scheme: dark) {
  :root {
    --on-bubble: var(--color-content-primary);
  }
}

/* A bubble colour from the design system, picked per card. */
.accent-1 { --accent: var(--bubble-slot-1); }
.accent-2 { --accent: var(--bubble-slot-2); }
.accent-3 { --accent: var(--bubble-slot-3); }
.accent-4 { --accent: var(--bubble-slot-4); }
.accent-5 { --accent: var(--bubble-slot-5); }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--color-content-primary);
  font: 400 1.0625rem/1.55 var(--font-body);
  background-color: var(--color-surface);
  /* A few soft bubbles drifting behind everything. */
  background-image:
    radial-gradient(circle at 92% 6rem, color-mix(in srgb, var(--bubble-slot-4) 18%, transparent) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at -4% 30rem, color-mix(in srgb, var(--bubble-slot-1) 14%, transparent) 0 12rem, transparent 12.1rem),
    radial-gradient(circle at 70% 26rem, color-mix(in srgb, var(--bubble-slot-2) 12%, transparent) 0 3rem, transparent 3.1rem);
  background-repeat: no-repeat;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
h1 {
  font-size: clamp(2.4rem, 9vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.75rem, 5.5vw, 2.6rem);
  font-weight: 800;
}
h3 {
  font-size: 1.3rem;
}
p {
  margin: 0 0 1rem;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 3px solid var(--color-info);
  outline-offset: 3px;
  border-radius: 0.375rem;
}
[hidden] {
  display: none !important;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.lead {
  display: block;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem;
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--color-surface-raised));
}

.skip {
  position: absolute;
  left: -100vw;
  top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface-raised);
  z-index: 10;
}
.skip:focus {
  left: 0.5rem;
}

/* --- Header and footer ---------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: max(0.5rem, env(safe-area-inset-top)) var(--gutter) 0.5rem;
  background: color-mix(in srgb, var(--color-surface) 85%, transparent);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch-target);
  padding-right: 0.5rem;
  font: 800 1.3rem/1 var(--font-display);
  text-decoration: none;
}
/* On a phone the bar holds the mark, the pages and two icons; the name waits for room. */
@media (max-width: 29.99rem) {
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-width: 22rem) {
  .top {
    gap: 0;
    padding-inline: 0.5rem;
  }
  .nav a {
    padding: 0 0.25rem;
    font-size: 0.875rem;
  }
}
.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.3rem;
  border-radius: 50%;
  background: var(--bubble-slot-1);
  fill: none;
  stroke: var(--on-bubble);
  stroke-width: 1.75;
  stroke-linecap: round;
}
.nav {
  display: flex;
  margin-left: auto;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0 0.5rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--color-content-secondary);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.nav a:first-child {
  display: none;
}
.nav a[aria-current="page"] {
  color: var(--color-content-primary);
  background: var(--color-accent-subtle);
}
.top-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: var(--radius-full);
  border: 0;
  cursor: pointer;
}
.open-icon {
  background: var(--color-accent);
  color: var(--color-accent-content);
}
.share-icon {
  background: var(--color-accent-subtle);
  color: var(--color-content-primary);
}
.share-icon[hidden] {
  display: none;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 6;
  margin: 0;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  background: var(--color-content-primary);
  color: var(--color-surface);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.foot {
  max-width: var(--width);
  margin: 4rem auto 0;
  padding: 2rem var(--gutter) max(2rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-separator);
  color: var(--color-content-secondary);
  font-size: 0.95rem;
}
.foot .notice {
  color: var(--color-content-primary);
}
.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
}
.legal a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  font-weight: 700;
  color: var(--color-content-primary);
}
.quiet {
  color: var(--color-content-secondary);
  font-size: 0.95rem;
}

/* --- Layout ---------------------------------------------------------------- */

main {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.band,
.page-head {
  padding: 3.5rem 0 0.5rem;
}
.page-head {
  padding-top: 2rem;
}
.lede {
  font-size: 1.25rem;
  color: var(--color-content-secondary);
  max-width: 38rem;
}
.kicker {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bubble-slot-1);
  color: var(--on-bubble);
  font: 800 0.95rem/1.2 var(--font-display);
  transform: rotate(-2deg);
}
.squiggle {
  text-decoration: underline wavy var(--bubble-slot-4);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: none;
}

/* --- Actions --------------------------------------------------------------- */

.primary,
.start,
.more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--touch-target);
  text-decoration: none;
  font-weight: 800;
}
.primary {
  padding: 0.9rem 1.6rem 0.9rem 1.2rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-accent-content);
  font-size: 1.15rem;
  box-shadow: 0 0.3rem 0 var(--bubble-slot-1);
  transition: transform var(--motion-standard), box-shadow var(--motion-standard);
}
.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.45rem 0 var(--bubble-slot-1);
}
.primary:active {
  transform: translateY(2px);
  box-shadow: 0 0.1rem 0 var(--bubble-slot-1);
}
.start,
.more {
  color: var(--color-content-primary);
}
.start b,
.more span {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.25em;
}
.start .icon,
.more .icon {
  color: var(--accent);
}

/* --- Hero ------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem 0 1rem;
  align-items: center;
}
.hero-stage {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 1.5rem 0;
}
.hero-stage .player {
  width: min(13.5rem, 58vw);
}
/* The five friends from the app's introduction, bobbing round the phone. */
.floaters .face {
  position: absolute;
  z-index: 1;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--color-surface-raised);
  box-shadow: 0 0.4rem 1.2rem -0.4rem var(--color-scrim);
  animation: bob 5s ease-in-out infinite;
}
.face svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* Kept to the margins beside the phone, so nobody sits on the screen. */
.floaters .face:nth-child(1) { left: 0; top: 14%; }
.floaters .face:nth-child(2) { right: 0; top: 4%; animation-delay: -1s; }
.floaters .face:nth-child(3) { left: 0; top: 58%; animation-delay: -2s; }
.floaters .face:nth-child(4) { right: 0; top: 44%; animation-delay: -3s; }
.floaters .face:nth-child(5) { right: 0; bottom: 4%; animation-delay: -4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-0.6rem) rotate(3deg); }
}

/* --- Three moves -------------------------------------------------------------- */

.moves,
.tiles,
.chips,
.track,
.scenes,
.friends,
.groups,
.points,
.stages,
.jump {
  list-style: none;
  margin: 0;
  padding: 0;
}
.moves,
.tiles {
  display: grid;
  gap: 1rem;
}
.moves li,
.tiles li {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, var(--color-surface-raised));
}
.moves li:nth-child(odd) {
  transform: rotate(-0.8deg);
}
.moves li:nth-child(even) {
  transform: rotate(0.8deg);
}
.moves p,
.tiles p {
  margin: 0;
  color: var(--color-content-secondary);
}

/* --- How people use it: one plan at a time ------------------------------------ */

.cases-head p {
  color: var(--color-content-secondary);
  font-size: 1.1rem;
}
.chips {
  display: flex;
  gap: 0.5rem;
  margin: 0 calc(var(--gutter) * -1) 1rem;
  padding: 0.25rem var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch-target);
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  color: var(--color-content-primary);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.chip .icon {
  color: var(--accent);
}
.chip[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-bubble);
}
.chip[aria-current="true"] .icon {
  color: inherit;
}

.track-wrap {
  position: relative;
}
.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: calc(var(--radius) + 0.25rem);
}
.track::-webkit-scrollbar {
  display: none;
}
.case {
  scroll-snap-align: start;
  display: grid;
  align-content: start;
  gap: 1.25rem;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--color-surface-raised));
}
.case h3 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.cast {
  display: flex;
  margin-bottom: 0.75rem;
}
.cast svg {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--color-surface-raised);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--accent) 12%, var(--color-surface-raised));
}
.cast svg + svg {
  margin-left: -0.9rem;
}
.case-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  font-weight: 800;
  color: var(--color-content-secondary);
}
.case-tag .icon {
  color: var(--accent);
}
.story {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-content-secondary);
}
.scenes {
  display: grid;
  gap: 1rem;
  counter-reset: scene;
}
/* Every step's words start at the top, so the numbers line up. */
.scene {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  align-items: start;
}
.scene p {
  margin: 0;
}
.num {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-bubble);
  font: 800 0.95rem/1 var(--font-display);
  vertical-align: 0.1em;
}
.case-go {
  margin: 0;
}

/* A still phone screen: the step, as it looks. */
.mini {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 11rem;
  padding: 0.75rem 0.5rem;
  border: 0.375rem solid var(--color-surface-inverse);
  border-radius: 1.4rem;
  background: var(--color-surface);
  font-size: 0.75rem;
  line-height: 1.25;
  box-shadow: 0 0.75rem 1.5rem -1rem var(--color-scrim);
}
.mini .bar {
  font-size: 0.8125rem;
  padding-bottom: 0.35rem;
}
.mini .field,
.mini .item {
  padding: 0.4rem 0.45rem;
  gap: 0.35rem;
}
.mini .item .icon {
  width: 1rem;
  height: 1rem;
}
.mini .btn {
  padding: 0.35rem 0.65rem;
}
.mini .menu li {
  padding: 0.35rem 0.4rem;
}
.mini .tap {
  padding-right: 1.9rem;
}
.mini .tap::after {
  right: 0.35rem;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: -0.55rem;
}

.arrows {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.arrow {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-content);
  cursor: pointer;
}
.arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.count {
  min-width: 4.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--color-content-secondary);
}

/* --- Every group chat has one of each ----------------------------------------- */

.friends {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 13.5rem;
  gap: 1rem;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0.5rem var(--gutter) 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.friend {
  scroll-snap-align: start;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.friend:nth-child(odd) {
  transform: rotate(-1deg);
}
.friend:nth-child(even) {
  transform: rotate(1deg);
}
.friend svg {
  width: 8.25rem;
  height: auto;
  color: var(--color-content-primary);
}
.friend h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.4rem;
}
.friend h3 span {
  display: block;
  font-size: 1.5rem;
}
.friend p {
  margin: 0;
  color: var(--color-content-secondary);
  font-size: 0.95rem;
}

/* --- About ------------------------------------------------------------------ */

.maker-card {
  max-width: 44rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--color-surface-raised));
  transform: rotate(-0.6deg);
}
.maker-card p {
  font-size: 1.15rem;
}
.maker-card p:last-child {
  margin: 0;
}

/* --- Faces in a pile, or a crowd ---------------------------------------------- */

.pile {
  display: flex;
  margin-bottom: 1rem;
}
.pile .face,
.crowd .face {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--color-surface-raised);
  box-shadow: 0 0 0 0.2rem var(--color-surface);
}
.pile .face + .face {
  margin-left: -0.75rem;
}
.crowd {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 26rem;
  margin-bottom: 1.5rem;
}
.crowd .face {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  animation: bob 6s ease-in-out infinite;
}
.crowd .face:nth-child(3n + 2) { animation-delay: -2s; }
.crowd .face:nth-child(3n) { animation-delay: -4s; }

.beta-teaser {
  display: grid;
  gap: 0.5rem;
}
.beta-teaser > div {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bubble-slot-4) 12%, var(--color-surface-raised));
}

.host {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--color-content-secondary);
}
.host svg {
  border-radius: 50%;
  background: var(--color-surface-raised);
}

.lost {
  display: grid;
  justify-items: center;
  text-align: center;
}
.lost > svg {
  animation: bob 5s ease-in-out infinite;
  color: var(--color-content-primary);
}

/* --- Guides ------------------------------------------------------------------ */

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.jump a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  padding: 0 1rem;
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
  text-decoration: none;
  font-weight: 700;
}
.install {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.installs {
  display: grid;
  gap: 1rem;
}
.steps {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}
.steps li {
  margin-bottom: 0.4rem;
  padding-left: 0.2rem;
}
.steps li::marker {
  color: var(--bubble-slot-1);
  font-weight: 800;
}

.groups {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}
.group {
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.group summary {
  display: grid;
  gap: 0.15rem;
  min-height: var(--touch-target);
  padding: 0.85rem 1.25rem;
  cursor: pointer;
}
.group small,
.point small {
  color: var(--color-content-secondary);
  font-size: 0.95rem;
}
.points {
  display: grid;
  gap: 0.25rem;
  padding: 0 0.75rem 0.75rem;
}
.point {
  display: grid;
  gap: 0.1rem;
  min-height: var(--touch-target);
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  text-decoration: none;
}
.point:hover {
  background: var(--color-accent-subtle);
}
.soon {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--color-caution);
}

/* --- Beta -------------------------------------------------------------------- */

.notice-band {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  border: 2px solid var(--color-caution);
}
.stages {
  display: grid;
  gap: 1rem;
}
.stage {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.stage .icon.lead {
  margin: 0;
}
.stage p {
  margin: 0;
  color: var(--color-content-secondary);
}
.stage.now {
  border: 2px solid var(--bubble-slot-1);
}

/* --- The animated phone ------------------------------------------------------ */

.player {
  position: relative;
  justify-self: center;
  width: min(15rem, 66vw);
}
.phone {
  aspect-ratio: 9 / 17;
  padding: 0.6rem;
  border-radius: 2.4rem;
  /*
   * A phone is a dark object in either scheme, so the bezel takes whichever
   * inverse token is the dark one; a hairline keeps it off a dark page.
   */
  background: var(--color-surface-inverse);
  border: 1px solid var(--color-separator);
  box-shadow: 0 1.5rem 3rem -1.5rem var(--color-scrim);
}
@media (prefers-color-scheme: dark) {
  .phone,
  .mini {
    border-color: var(--color-content-inverse);
  }
  .phone {
    background: var(--color-content-inverse);
  }
}
.screen {
  display: grid;
  height: 100%;
  overflow: hidden;
  border-radius: 1.9rem;
  background: var(--color-surface);
}
.frame {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.3;
  opacity: 0;
  animation: show3 calc(var(--frame) * 3) infinite;
}
.n2 .frame {
  animation-name: show2;
  animation-duration: calc(var(--frame) * 2);
}
.n4 .frame {
  animation-name: show4;
  animation-duration: calc(var(--frame) * 4);
}
/* Each screen starts part-way through the loop, so exactly one shows at a time. */
.n2 .f1,
.n3 .f2,
.n4 .f3 {
  animation-delay: calc(var(--frame) * -1);
}
.n3 .f1,
.n4 .f2 {
  animation-delay: calc(var(--frame) * -2);
}
.n4 .f1 {
  animation-delay: calc(var(--frame) * -3);
}
@keyframes show2 {
  0%, 46% { opacity: 1; transform: none; }
  50%, 96% { opacity: 0; transform: translateX(-0.75rem); }
  100% { opacity: 0; transform: translateX(0.75rem); }
}
@keyframes show3 {
  0%, 30% { opacity: 1; transform: none; }
  33.3%, 97% { opacity: 0; transform: translateX(-0.75rem); }
  100% { opacity: 0; transform: translateX(0.75rem); }
}
@keyframes show4 {
  0%, 22% { opacity: 1; transform: none; }
  25%, 97% { opacity: 0; transform: translateX(-0.75rem); }
  100% { opacity: 0; transform: translateX(0.75rem); }
}

.bar {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-separator);
  font: 800 1.05rem/1.2 var(--font-display);
}
.row {
  position: relative;
  border-radius: 0.75rem;
}
.field {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border-control);
  background: var(--color-surface-raised);
}
.item {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.item .icon {
  color: var(--accent);
}
.item b,
.item small {
  display: block;
}
.item small {
  color: var(--color-content-secondary);
}
.btn {
  align-self: flex-start;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-accent-content);
  font-weight: 700;
}
.menu {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.menu li {
  position: relative;
  padding: 0.55rem 0.6rem;
  border-radius: 0.5rem;
}
.menu li + li {
  border-top: 1px solid var(--color-separator);
}

/* The finger: a ring that lands on what gets pressed. */
.tap {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  /* Room for the finger, so it never sits on the words. */
  padding-right: 2.6rem;
}
.tap::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  top: 50%;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: -0.8rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  border: 2px solid var(--accent);
  animation: press 1.5s ease-out infinite;
}
@keyframes press {
  0% { transform: scale(1.6); opacity: 0; }
  35% { transform: scale(1); opacity: 1; }
  60% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Tapping the phone pauses it; a paused phone rests back a little. */
.player[role="button"] {
  cursor: pointer;
  border-radius: 2.4rem;
}
.paused .phone {
  opacity: 0.8;
}
.paused .frame,
.paused .tap::after {
  animation-play-state: paused;
}

/* Reduced motion: everything holds still, and the words say the rest. */
@media (prefers-reduced-motion: reduce) {
  .frame,
  .tap::after,
  .face,
  .lost > svg {
    animation: none;
  }
  .f0 {
    opacity: 1;
  }
  .tap::after {
    opacity: 1;
  }
  .primary {
    transition: none;
  }
}

/* --- Wider screens ----------------------------------------------------------- */

@media (min-width: 40rem) {
  :root {
    --gutter: 1.5rem;
  }
  .nav a:first-child {
    display: inline-flex;
  }
  .nav a {
    padding: 0 0.7rem;
  }
  .moves,
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .installs {
    grid-template-columns: repeat(2, 1fr);
  }
  .case {
    padding: 2rem;
  }
  .beta-teaser {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.5rem;
  }
}

@media (min-width: 56rem) {
  :root {
    --gutter: 2rem;
  }
  .hero {
    grid-template-columns: 1.25fr 1fr;
    padding-top: 3rem;
  }
  .floaters .face {
    width: 5.5rem;
    height: 5.5rem;
  }
  .chips {
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
    padding: 0;
    overflow: visible;
  }
  .case {
    grid-template-columns: 1fr;
    padding: 2.25rem;
  }
  .scenes {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
  }
  /* The four screens share one row height, so 1, 2, 3 and 4 sit on one line. */
  .scene {
    grid-row: span 2;
    grid-template-columns: 1fr;
    grid-template-rows: subgrid;
    gap: 1rem;
  }
  .scene .mini {
    height: 100%;
  }
  .friends {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    margin: 0;
    padding: 0.5rem 0 0;
    overflow: visible;
  }
  .groups {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
  }
}

/* === Features: a phone that plays, steps that light up, a toy that acts it out === */

.feature {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  border-radius: calc(var(--radius) + 0.5rem);
  background: color-mix(in srgb, var(--accent) 9%, var(--color-surface-raised));
  scroll-margin-top: 5rem;
}
.feature-head h2 {
  margin-bottom: 0.5rem;
}
.feature .host span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.feature .host .icon {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--accent);
}
.blurb {
  margin: 0;
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--color-content-secondary);
}
.wizard {
  display: grid;
  gap: 1.25rem;
  justify-items: center;
}
.wizard .steps {
  width: 100%;
}

.chips.wrap {
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0;
  overflow: visible;
}

/* Steps that light up with the screen they describe. The delays are the
   phone's own (".n3 .f2" and friends above), so the two never drift. */
.steps.sync {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps.sync li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.6rem;
  align-items: start;
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  background: var(--color-surface-raised);
  animation: lit3 calc(var(--frame) * 3) infinite;
}
.steps.sync li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-bubble);
  font: 800 1rem/1 var(--font-display);
}
.steps.sync.n2 li {
  animation-name: lit2;
  animation-duration: calc(var(--frame) * 2);
}
.steps.sync.n4 li {
  animation-name: lit4;
  animation-duration: calc(var(--frame) * 4);
}
@keyframes lit2 {
  0%, 48% { opacity: 1; transform: translateX(0.35rem); box-shadow: 0 0 0 2px var(--accent); }
  50%, 100% { opacity: 0.5; transform: none; box-shadow: none; }
}
@keyframes lit3 {
  0%, 32% { opacity: 1; transform: translateX(0.35rem); box-shadow: 0 0 0 2px var(--accent); }
  33.3%, 100% { opacity: 0.5; transform: none; box-shadow: none; }
}
@keyframes lit4 {
  0%, 24% { opacity: 1; transform: translateX(0.35rem); box-shadow: 0 0 0 2px var(--accent); }
  25%, 100% { opacity: 0.5; transform: none; box-shadow: none; }
}

/* The little progress dots under each phone. */
.dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
}
.dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent) 30%, var(--color-surface-sunken));
  animation: dot3 calc(var(--frame) * 3) infinite;
}
.dots.n2 i {
  animation-name: dot2;
  animation-duration: calc(var(--frame) * 2);
}
.dots.n4 i {
  animation-name: dot4;
  animation-duration: calc(var(--frame) * 4);
}
@keyframes dot2 {
  0%, 48% { width: 1.4rem; background: var(--accent); }
  50%, 100% { width: 0.5rem; }
}
@keyframes dot3 {
  0%, 32% { width: 1.4rem; background: var(--accent); }
  33.3%, 100% { width: 0.5rem; }
}
@keyframes dot4 {
  0%, 24% { width: 1.4rem; background: var(--accent); }
  25%, 100% { width: 0.5rem; }
}
.paused .steps.sync li,
.paused .dots i {
  animation-play-state: paused;
}

/* --- More things a screen can show ------------------------------------------ */

.say {
  color: var(--color-content-secondary);
  font: 700 1.05rem/1.25 var(--font-display);
}
.read {
  display: grid;
  gap: 0.3rem;
  justify-items: start;
  padding: 0.65rem 0.75rem;
  background: color-mix(in srgb, var(--accent) 12%, var(--color-surface-raised));
  border: 2px solid var(--accent);
}
.read .what {
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-bubble);
  font-weight: 800;
  font-size: 0.8em;
}
.read small {
  color: var(--color-content-secondary);
}
.read .btn {
  position: relative;
  margin-top: 0.2rem;
}
.ticks {
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.ticks li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.5rem;
}
.ticks i {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.3rem;
  border: 2px solid var(--accent);
}
.ticks .done {
  color: var(--color-content-secondary);
  text-decoration: line-through;
}
.ticks.pick .done {
  color: inherit;
  text-decoration: none;
}
.ticks .done i {
  background: var(--accent);
  box-shadow: inset 0 0 0 2px var(--color-surface-raised);
}
.wave {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 1rem 0.5rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.wave .bars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 2.6rem;
}
.wave .bars i {
  width: 0.3rem;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent);
  transform-origin: center;
  animation: talk 0.9s ease-in-out infinite alternate;
}
.wave .bars i:nth-child(3n) { animation-delay: -0.3s; }
.wave .bars i:nth-child(3n + 1) { animation-delay: -0.6s; }
.wave .bars i:nth-child(4n) { animation-duration: 0.7s; }
.wave.still .bars i {
  animation: none;
  transform: scaleY(0.55);
}
.wave.still .bars i:nth-child(odd) {
  transform: scaleY(0.9);
}
.wave small {
  color: var(--color-content-secondary);
}
@keyframes talk {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}
.place {
  display: grid;
  gap: 0.15rem;
  padding: 0.4rem 0.4rem 0.6rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.place b,
.place small {
  padding: 0 0.35rem;
}
.place small {
  color: var(--color-content-secondary);
}
.streets {
  position: relative;
  display: block;
  height: 5.5rem;
  margin-bottom: 0.35rem;
  border-radius: 0.6rem;
  background:
    linear-gradient(90deg, transparent 30%, var(--color-surface-raised) 30% 36%, transparent 36%),
    linear-gradient(0deg, transparent 55%, var(--color-surface-raised) 55% 63%, transparent 63%),
    radial-gradient(ellipse at 78% 22%, color-mix(in srgb, var(--bubble-slot-5) 35%, transparent) 0 28%, transparent 29%),
    color-mix(in srgb, var(--bubble-slot-1) 10%, var(--color-surface-sunken));
}
.streets .drop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.3rem;
  height: 1.3rem;
  margin: -1.3rem 0 0 -0.65rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--bubble-slot-3);
  box-shadow: inset 0 0 0 0.35rem var(--bubble-slot-3), inset 0 0 0 0.65rem var(--on-bubble);
}
.snap {
  display: grid;
  gap: 0.4rem;
  padding: 0.4rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-separator);
}
.snap small {
  padding: 0 0.3rem 0.2rem;
  font-weight: 700;
}
.pic {
  position: relative;
  display: block;
  height: 7rem;
  overflow: hidden;
  border-radius: 0.6rem;
  background: linear-gradient(color-mix(in srgb, var(--bubble-slot-2) 30%, var(--color-surface-raised)), color-mix(in srgb, var(--bubble-slot-2) 55%, var(--color-surface-raised)));
}
/* A striped awning and a round pastry: a corner café, drawn. */
.pic i {
  position: absolute;
  inset: 0 0 62% 0;
  background: repeating-linear-gradient(90deg, var(--bubble-slot-3) 0 1.1rem, var(--color-surface-raised) 1.1rem 2.2rem);
  border-radius: 0 0 40% 40% / 0 0 30% 30%;
}
.pic b {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  width: 2.6rem;
  height: 2.6rem;
  margin-left: -1.3rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--bubble-slot-2) 80%, var(--color-content-primary)) 0 30%, color-mix(in srgb, var(--bubble-slot-2) 60%, var(--color-surface-raised)) 32%);
}
.chipline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.chipline span {
  position: relative;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  font-weight: 700;
}
.chipline .tap {
  padding-right: 2.2rem;
}

/* === Toys ===================================================================== */

.toy {
  --loop: 7s;
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 14%, var(--color-surface-raised));
  font-size: 0.95rem;
}
.toy svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes appear {
  0%, 4% { opacity: 0; transform: translateY(0.75rem) scale(0.9); }
  10%, 86% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}

/* Words in, a checklist out. */
.toy-read .typed {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 10%;
  padding: 0.7rem 0.9rem;
  border-radius: 1rem;
  background: var(--color-surface-raised);
  box-shadow: 0 0.4rem 1rem -0.6rem var(--color-scrim);
  white-space: nowrap;
  overflow: hidden;
  font-weight: 600;
}
.toy-read .typed span {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  border-right: 2px solid var(--accent);
  animation: typing var(--loop) steps(36) infinite;
}
@keyframes typing {
  0% { max-width: 0; }
  30%, 100% { max-width: 100%; }
}
.toy-read .spark {
  position: absolute;
  top: 36%;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  animation: spark var(--loop) infinite both;
}
.toy-read .s1 { left: 30%; }
.toy-read .s2 { left: 48%; width: 1rem; height: 1rem; animation-delay: 0.1s; }
.toy-read .s3 { left: 66%; animation-delay: 0.2s; }
@keyframes spark {
  0%, 30% { opacity: 0; transform: scale(0); }
  34% { opacity: 1; transform: scale(1.4); }
  40%, 100% { opacity: 0; transform: scale(0.4) translateY(1rem); }
}
.toy-read .became {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 8%;
  padding: 0.75rem 0.9rem 0.4rem;
  border-radius: 1rem;
  background: var(--color-surface-raised);
  border: 2px solid var(--accent);
}
.toy-read .became b {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.05rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-bubble);
  font-size: 0.8rem;
}
.toy-read .became p {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.3rem;
  animation: pop-in var(--loop) infinite both;
}
.toy-read .t1 { animation-delay: 2.4s; }
.toy-read .t2 { animation-delay: 2.7s; }
.toy-read .t3 { animation-delay: 3s; }
.toy-read .became i {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 0.25rem;
  border: 2px solid var(--accent);
}
.toy-read .t1 i {
  background: var(--accent);
}
@keyframes pop-in {
  0% { opacity: 0; transform: translateX(-0.75rem); }
  6%, 80% { opacity: 1; transform: none; }
  88%, 100% { opacity: 0; transform: none; }
}

/* A voice, bouncing. */
.toy-voice {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.9rem;
}
.toy-voice .mic {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-bubble);
}
.toy-voice .mic svg {
  width: 2.2rem;
  height: 2.2rem;
}
.toy-voice .mic::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--accent);
  animation: ring 1.8s ease-out infinite;
}
@keyframes ring {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(1.8); opacity: 0; }
}
.toy-voice .bars {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  height: 3.5rem;
}
.toy-voice .bars span {
  width: 0.45rem;
  height: 100%;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent) 70%, var(--color-content-primary));
  animation: talk 0.8s ease-in-out infinite alternate;
}
.toy-voice .b1 { animation-delay: -0.2s; }
.toy-voice .b2 { animation-delay: -0.5s; animation-duration: 0.6s; }
.toy-voice .b3 { animation-delay: -0.1s; animation-duration: 1s; }
.toy-voice .b4 { animation-delay: -0.7s; }
.toy-voice .b5 { animation-delay: -0.35s; animation-duration: 0.7s; }
.toy-voice .b6 { animation-delay: -0.6s; animation-duration: 0.9s; }
.toy-voice .clock {
  font: 800 1.1rem/1 var(--font-display);
}
.toy-voice .note {
  position: absolute;
  width: 1.8rem;
  height: 1.8rem;
  color: var(--accent);
  animation: float-up 4s ease-in infinite;
}
.toy-voice .n1 { left: 16%; bottom: 20%; }
.toy-voice .n2 { right: 16%; bottom: 30%; animation-delay: -2s; }
@keyframes float-up {
  0% { opacity: 0; transform: translateY(1rem) rotate(-10deg); }
  20%, 70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4rem) rotate(12deg); }
}

/* A little town where the pins land. */
.toy-map {
  aspect-ratio: 320 / 220;
}
.toy-map .town {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.toy-map .land {
  fill: color-mix(in srgb, var(--bubble-slot-1) 8%, var(--color-surface-sunken));
  stroke: none;
}
.toy-map .river {
  stroke: color-mix(in srgb, var(--bubble-slot-1) 40%, var(--color-surface-raised));
  stroke-width: 18;
}
.toy-map .park {
  fill: color-mix(in srgb, var(--bubble-slot-5) 35%, var(--color-surface-raised));
  stroke: none;
}
.toy-map .street {
  stroke: var(--color-surface-raised);
  stroke-width: 9;
}
.toy-map .route {
  stroke: var(--bubble-slot-3);
  stroke-width: 4;
  stroke-dasharray: 300;
  animation: route var(--loop) ease-in-out infinite;
}
@keyframes route {
  0%, 8% { stroke-dashoffset: 300; }
  45%, 90% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.toy-map .here {
  fill: var(--bubble-slot-1);
  stroke: var(--color-surface-raised);
  stroke-width: 3;
}
.toy-map .here-ring {
  stroke: var(--bubble-slot-1);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: ring 1.8s ease-out infinite;
}
.toy-map .pin {
  position: absolute;
  width: 1.7rem;
  height: 1.7rem;
  margin: -1.9rem 0 0 -0.85rem;
  animation: drop var(--loop) cubic-bezier(0.3, 1.6, 0.6, 1) infinite both;
}
.toy-map .pin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin);
  box-shadow: 0 0.2rem 0.4rem -0.1rem var(--color-scrim);
}
.toy-map .pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  margin: -0.3rem 0 0 -0.3rem;
  border-radius: 50%;
  background: var(--on-bubble);
}
.toy-map .p1 { --pin: var(--bubble-slot-4); left: 50%; top: 27%; animation-delay: 1.4s; }
.toy-map .p2 { --pin: var(--bubble-slot-3); left: 72.5%; top: 27%; animation-delay: 2.6s; }
.toy-map .p3 { --pin: var(--bubble-slot-2); left: 22%; top: 54%; animation-delay: 0.6s; }
@keyframes drop {
  0% { opacity: 0; transform: translateY(-3rem); }
  6%, 84% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: none; }
}
.toy-map .tag {
  position: absolute;
  right: 4%;
  bottom: 5%;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  box-shadow: 0 0.3rem 0.8rem -0.4rem var(--color-scrim);
  font-weight: 700;
  font-size: 0.85rem;
  animation: appear var(--loop) infinite both;
  animation-delay: 2.9s;
}

/* Snapshots fanning out. */
.toy-photo .flash {
  position: absolute;
  inset: 0;
  background: var(--color-surface-raised);
  opacity: 0;
  animation: flash var(--loop) infinite;
}
@keyframes flash {
  0%, 2% { opacity: 0; }
  4% { opacity: 0.9; }
  12%, 100% { opacity: 0; }
}
.toy-photo .polaroid {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 33%;
  margin: -21% 0 0 -16.5%;
  padding: 0.4rem 0.4rem 0.3rem;
  border-radius: 0.4rem;
  background: var(--color-surface-raised);
  box-shadow: 0 0.6rem 1.2rem -0.6rem var(--color-scrim);
  text-align: center;
  font: 700 0.85rem/1.4 var(--font-display);
  transform: var(--to);
  animation: fan var(--loop) cubic-bezier(0.3, 1.4, 0.6, 1) infinite both;
}
.toy-photo .q1 { --to: translate(-88%, 6%) rotate(-12deg); animation-delay: 0.2s; }
.toy-photo .q2 { --to: translate(0, -4%) rotate(3deg); animation-delay: 0.6s; }
.toy-photo .q3 { --to: translate(88%, 8%) rotate(11deg); animation-delay: 1s; }
@keyframes fan {
  0% { opacity: 0; transform: scale(0.4); }
  8%, 86% { opacity: 1; transform: var(--to); }
  94%, 100% { opacity: 0; transform: var(--to); }
}
.toy-photo .pic {
  height: auto;
  aspect-ratio: 1;
}
.toy-photo .pic1 {
  background: repeating-linear-gradient(0deg, var(--color-surface-raised) 0 0.5rem, color-mix(in srgb, var(--bubble-slot-2) 40%, var(--color-surface-raised)) 0.5rem 0.62rem);
}
.toy-photo .pic1 i,
.toy-photo .pic1 b,
.toy-photo .pic2 i {
  display: none;
}
.toy-photo .pic2 {
  background: linear-gradient(color-mix(in srgb, var(--bubble-slot-4) 35%, var(--color-surface-raised)) 0 55%, color-mix(in srgb, var(--bubble-slot-1) 55%, var(--color-surface-raised)) 55%);
}
.toy-photo .pic2 b {
  bottom: 40%;
  width: 1.8rem;
  height: 1.8rem;
  margin-left: -0.9rem;
  background: var(--bubble-slot-2);
}

/* A bell on the day. */
.toy-bell .ringer {
  position: absolute;
  left: 12%;
  top: 14%;
  width: 4.5rem;
  height: 4.5rem;
  color: var(--accent);
  stroke-width: 2;
  transform-origin: 50% 10%;
  animation: wiggle var(--loop) ease-in-out infinite;
}
@keyframes wiggle {
  0%, 40%, 60%, 100% { transform: none; }
  44% { transform: rotate(16deg); }
  48% { transform: rotate(-14deg); }
  52% { transform: rotate(10deg); }
  56% { transform: rotate(-6deg); }
}
.toy-bell .clockface {
  position: absolute;
  right: 12%;
  top: 12%;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--color-surface-raised);
  border: 3px solid var(--color-content-primary);
}
.toy-bell .hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 3px;
  margin-left: -1.5px;
  border-radius: var(--radius-full);
  background: var(--color-content-primary);
  transform-origin: bottom center;
}
.toy-bell .h {
  height: 28%;
  animation: spin calc(var(--loop) * 3) linear infinite;
}
.toy-bell .m {
  height: 40%;
  background: var(--accent);
  animation: spin var(--loop) linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.toy-bell .arrive {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 10%;
  display: grid;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: var(--color-surface-raised);
  border-left: 0.4rem solid var(--accent);
  box-shadow: 0 0.6rem 1.2rem -0.7rem var(--color-scrim);
  animation: slide-in var(--loop) cubic-bezier(0.3, 1.3, 0.6, 1) infinite both;
  animation-delay: 3s;
}
.toy-bell .arrive small {
  color: var(--color-content-secondary);
}
@keyframes slide-in {
  0% { opacity: 0; transform: translateX(110%); }
  8%, 84% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: none; }
}

/* Things flying into a saved list. */
.toy-collection .kept {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  box-shadow: 0 0.3rem 0.8rem -0.4rem var(--color-scrim);
  font-weight: 700;
  animation: gather var(--loop) ease-in-out infinite both;
}
.toy-collection .kept i {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
}
.toy-collection .k1 { left: 6%; top: 8%; --to: translate(5rem, 6.5rem); animation-delay: 0.3s; }
.toy-collection .k2 { right: 6%; top: 6%; --to: translate(-5rem, 6.8rem); animation-delay: 0.9s; }
.toy-collection .k3 { left: 12%; top: 30%; --to: translate(4rem, 3.8rem); animation-delay: 1.5s; }
.toy-collection .k4 { right: 10%; top: 30%; --to: translate(-4rem, 3.8rem); animation-delay: 2.1s; }
.toy-collection .dot-pin { background: var(--bubble-slot-3); }
.toy-collection .dot-wave { background: var(--bubble-slot-4); }
.toy-collection .dot-pic { background: var(--bubble-slot-2); }
.toy-collection .dot-link { background: var(--bubble-slot-1); }
@keyframes gather {
  0% { opacity: 0; transform: scale(0.6); }
  6%, 22% { opacity: 1; transform: none; }
  36%, 100% { opacity: 0; transform: var(--to) scale(0.5); }
}
.toy-collection .box {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 8%;
  display: grid;
  justify-items: center;
  padding: 0.8rem;
  border-radius: 1rem;
  background: var(--color-surface-raised);
  border: 2px solid var(--accent);
  text-align: center;
}
.toy-collection .box small {
  color: var(--color-content-secondary);
  font-size: 0.8rem;
}
.toy-collection .stack {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.toy-collection .stack i {
  width: 1.4rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: var(--accent);
  animation: appear var(--loop) infinite both;
}
.toy-collection .stack i:nth-child(1) { animation-delay: 1.2s; }
.toy-collection .stack i:nth-child(2) { animation-delay: 1.8s; }
.toy-collection .stack i:nth-child(3) { animation-delay: 2.4s; }
.toy-collection .stack i:nth-child(4) { animation-delay: 3s; }

/* A search that lights up what matches. */
.toy-search {
  aspect-ratio: auto;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  padding: 1rem;
}
.toy-search .bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  border: 2px solid var(--accent);
  font-weight: 700;
}
.toy-search .bar svg {
  width: 1.2rem;
  height: 1.2rem;
}
.toy-search .bar span {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  animation: typing var(--loop) steps(6) infinite;
}
.toy-search .hit {
  padding: 0.45rem 0.8rem;
  border-radius: 0.75rem;
  background: var(--color-surface-raised);
  font-weight: 600;
  animation: dim var(--loop) infinite;
}
.toy-search .match {
  animation-name: glow;
}
@keyframes dim {
  0%, 30% { opacity: 1; }
  36%, 90% { opacity: 0.35; }
  100% { opacity: 1; }
}
@keyframes glow {
  0%, 30% { box-shadow: none; }
  36%, 90% { box-shadow: 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--color-surface-raised)); }
  100% { box-shadow: none; }
}
.toy-search .chipset {
  display: flex;
  gap: 0.35rem;
}
.toy-search .chipset span {
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-bubble);
  font-weight: 700;
  font-size: 0.85rem;
  animation: appear var(--loop) infinite both;
}
.toy-search .chipset span:nth-child(1) { animation-delay: 2.6s; }
.toy-search .chipset span:nth-child(2) { animation-delay: 2.8s; }
.toy-search .chipset span:nth-child(3) { animation-delay: 3s; }

/* Something private floating up into a Bubble. */
.toy-share .bubble-big {
  position: absolute;
  left: 50%;
  top: 6%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.4rem;
  width: 62%;
  aspect-ratio: 1;
  margin-left: -31%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--color-surface-raised));
  border: 3px solid var(--accent);
  animation: breathe 3s ease-in-out infinite;
}
@keyframes breathe {
  50% { transform: scale(1.04); }
}
.toy-share .mates {
  display: flex;
}
.toy-share .mate svg {
  display: block;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--color-surface-raised);
}
.toy-share .mate + .mate {
  margin-left: -0.6rem;
}
.toy-share .floater-card {
  position: absolute;
  left: 50%;
  bottom: 6%;
  padding: 0.45rem 0.9rem;
  border-radius: 0.8rem;
  background: var(--color-surface-raised);
  box-shadow: 0 0.4rem 1rem -0.5rem var(--color-scrim);
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: rise var(--loop) ease-in-out infinite;
}
@keyframes rise {
  0%, 15% { opacity: 1; transform: translateX(-50%); }
  55% { opacity: 1; transform: translate(-50%, -6.5rem) scale(0.7); }
  65%, 100% { opacity: 0; transform: translate(-50%, -7rem) scale(0.4); }
}

/* Coins into fair piles. */
.toy-coins .receipt {
  position: absolute;
  left: 50%;
  top: 8%;
  display: flex;
  gap: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.8rem;
  background: var(--color-surface-raised);
  transform: translateX(-50%);
  font-weight: 800;
}
.toy-coins .coin {
  position: absolute;
  top: 66%;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--bubble-slot-2);
  box-shadow: inset 0 0 0 0.25rem color-mix(in srgb, var(--bubble-slot-2) 60%, var(--color-surface-raised));
  animation: fall var(--loop) cubic-bezier(0.5, 0, 0.7, 1.4) infinite both;
}
.toy-coins .c1, .toy-coins .c2 { left: 13%; }
.toy-coins .c3, .toy-coins .c4 { left: 34%; }
.toy-coins .c5, .toy-coins .c6 { left: 56%; }
.toy-coins .c7, .toy-coins .c8 { left: 77%; }
.toy-coins .c2, .toy-coins .c4, .toy-coins .c6, .toy-coins .c8 { top: 58%; }
.toy-coins .c1 { animation-delay: 0.2s; }
.toy-coins .c3 { animation-delay: 0.4s; }
.toy-coins .c5 { animation-delay: 0.6s; }
.toy-coins .c7 { animation-delay: 0.8s; }
.toy-coins .c2 { animation-delay: 1.2s; }
.toy-coins .c4 { animation-delay: 1.4s; }
.toy-coins .c6 { animation-delay: 1.6s; }
.toy-coins .c8 { animation-delay: 1.8s; }
@keyframes fall {
  0% { opacity: 0; transform: translateY(-6rem); }
  8%, 86% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}
.toy-coins .piles {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 6%;
  display: flex;
  justify-content: space-around;
  font-weight: 800;
}

/* --- The journal teaser on the home page --------------------------------------- */

.journal-teaser {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1.75rem 1.25rem;
  border-radius: calc(var(--radius) + 0.5rem);
  background: color-mix(in srgb, var(--accent) 10%, var(--color-surface-raised));
}
.journal-teaser > div p:not(.kicker) {
  font-size: 1.15rem;
  color: var(--color-content-secondary);
}

/* Reduced motion: every toy shows the end of its story, and the steps all read at once. */
@media (prefers-reduced-motion: reduce) {
  .toy *,
  .toy *::before,
  .toy *::after,
  .steps.sync li,
  .dots i,
  .wave .bars i {
    animation: none !important;
  }
  .toy-share .floater-card,
  .toy-collection .kept {
    display: none;
  }
}

@media (min-width: 40rem) {
  .feature {
    padding: 2rem;
  }
  .journal-teaser {
    grid-template-columns: 1.2fr 1fr;
    padding: 2.25rem;
  }
}

@media (min-width: 56rem) {
  .feature {
    grid-template-columns: 1.35fr 1fr;
    grid-template-areas: "head head" "wizard toy";
    align-items: center;
    column-gap: 2.5rem;
    padding: 2.5rem;
  }
  .feature-head {
    grid-area: head;
  }
  .feature > .wizard {
    grid-area: wizard;
  }
  .feature > .toy {
    grid-area: toy;
  }
  .wizard {
    grid-template-columns: 14rem 1fr;
    align-items: center;
    gap: 1.75rem;
  }
  .wizard .player {
    width: 14rem;
  }
  /* Every other one swaps sides, so the page zig-zags. */
  .feature:nth-of-type(even) {
    grid-template-columns: 1fr 1.35fr;
    grid-template-areas: "head head" "toy wizard";
  }
}

/* --- Help ---------------------------------------------------------------------- */

.help-topic {
  max-width: 44rem;
  margin: 2.5rem auto 0;
  padding: 1.5rem var(--gutter);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, var(--color-surface-raised));
  scroll-margin-top: 5rem;
}
.help-topic h2 {
  margin-top: 0.5rem;
}
.help-topic .steps li::marker {
  color: var(--accent);
}
.not-yet {
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--color-surface);
  color: var(--color-content-secondary);
}
.not-yet strong {
  color: var(--color-content-primary);
}
@media (min-width: 48rem) {
  .help-topic {
    padding: 2rem 2.5rem;
  }
}
