/* ==========================================================================
   Lemonade Theme — theme.css
   An unofficial, fan-made recreation of the lemonade.gg app UI style.
   Drop this file into any page. Set data-theme="dark|light|gray" on <html>,
   or add a <select data-theme-select> with those option values: the page
   follows the selected option through CSS alone, no script needed.
   Font (free lookalike for GT Standard):
     <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
  /* Typography */
  --font-sans: "Inter", "GT Standard M", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Brand (theme-independent) */
  --color-brand-sky: #4cc2ff;
  --brand: #e4f53d;            /* bg-brand — logo lime, "Assign 20 GIFs" */
  --brand-hover: #d2e41f;
  --brand-foreground: #1a1d00;

  /* Radii */
  --radius-control: 0.5rem;    /* rounded-control — buttons, inputs, nav links */
  --radius-surface: 0.75rem;   /* rounded-surface — cards */
  --radius-card: 1.5rem;       /* dialogs (Clerk cardBox) */
  --radius-pill: 999px;

  /* Control sizing */
  --control-sm: 2rem;          /* 32px */
  --control-compact: 2rem;     /* 32px — h-control-compact */
  --control-default: 2.25rem;  /* 36px — h-control-default */
  --control-lg: 2.75rem;       /* 44px */
  --hit-target-coarse: 2.75rem;/* min touch target on coarse pointers */

  /* Motion */
  --motion-duration-control: 150ms;
  --motion-ease-control: cubic-bezier(0.2, 0, 0, 1);
  --motion-duration-overlay: 200ms;

  /* Layout */
  --container-max: 80rem;
  --container-pad: 1rem;
}

/* Dark — the default and what the app forces. Neutral, shadcn-style grays. */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --card-foreground: var(--foreground);
  --popover: #171717;
  --popover-foreground: var(--foreground);
  --muted: #171717;
  --muted-foreground: #a3a3a3;
  --accent: #262626;
  --accent-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #171717;
  --primary-hover: #e5e5e5;
  --secondary: #262626;
  --secondary-foreground: #fafafa;
  --destructive: #dc2626;
  --destructive-foreground: #fafafa;
  --success: #22c55e;
  --border: #262626;
  --input: #262626;
  --input-strong: #525252;     /* border-neutral-600 */
  --ring: #a3a3a3;             /* used at 50% opacity */
  --shadow-control: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-control-hover: 0 2px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-overlay: 0 24px 64px -28px rgb(0 0 0 / 0.72);
  --backdrop: rgb(0 0 0 / 0.78);
  --card: #121212;
  --info: #4cc2ff;
  --shadow-surface: 0 0 0 1px var(--border), 0 1px 2px 0 rgb(0 0 0 / 0.35);
  --destructive-text: #f87171;
  --success-text: #4ade80;
  --input-bg: transparent;
}

/* Gray — maps to dark in the app, with lifted surfaces */
:root[data-theme="gray"] {
  color-scheme: dark;
  --background: #1c1c1f;
  --foreground: #f4f4f5;
  --popover: #232327;
  --muted: #232327;
  --muted-foreground: #a1a1aa;
  --accent: #2e2e33;
  --accent-foreground: #fafafa;
  --secondary: #2e2e33;
  --border: #303036;
  --input: #303036;
  --input-strong: #52525b;
  --shadow-control: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-control-hover: 0 2px 6px -1px rgb(0 0 0 / 0.4);
  --card: #232327;
  --info: #4cc2ff;
  --shadow-surface: 0 0 0 1px var(--border), 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --destructive-text: #f87171;
  --success-text: #4ade80;
  --input-bg: transparent;
}

/* Light */
:root[data-theme="light"] {
  color-scheme: light;
  --background: #f6f6f7;
  --foreground: #0b0b0c;
  --card: #ffffff;
  --card-foreground: var(--foreground);
  --popover: #ffffff;
  --popover-foreground: var(--foreground);
  --muted: #efeff1;
  --muted-foreground: #66666e;
  --accent: #e8e8eb;
  --accent-foreground: #0b0b0c;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --primary-hover: #2e2e33;
  --secondary: #e8e8eb;
  --secondary-foreground: #18181b;
  --destructive: #dc2626;
  --destructive-foreground: #fafafa;
  --destructive-text: #dc2626;
  --success-text: #15803d;
  --info: #0284c7;
  --border: #e2e2e6;
  --input: #d6d6dc;
  --input-strong: #a1a1aa;
  --input-bg: #ffffff;
  --ring: #a1a1aa;
  --shadow-control: 0 1px 2px 0 rgb(16 16 20 / 0.06);
  --shadow-control-hover: 0 2px 6px -1px rgb(16 16 20 / 0.12);
  --shadow-surface: 0 0 0 1px var(--border), 0 1px 3px 0 rgb(16 16 20 / 0.05);
  --shadow-overlay: 0 24px 64px -28px rgb(16 16 20 / 0.28);
  --backdrop: rgb(0 0 0 / 0.4);
}


/* Follow a <select data-theme-select> with CSS alone, for pages where the
   script is blocked. Kept as separate rules: a browser without :has() drops
   only these, not the data-theme rules above.
   Generated by tools/build.py from the blocks above. Don't edit by hand. */
:root:has([data-theme-select] option[value="dark"]:checked) {
  color-scheme: dark;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --card-foreground: var(--foreground);
  --popover: #171717;
  --popover-foreground: var(--foreground);
  --muted: #171717;
  --muted-foreground: #a3a3a3;
  --accent: #262626;
  --accent-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #171717;
  --primary-hover: #e5e5e5;
  --secondary: #262626;
  --secondary-foreground: #fafafa;
  --destructive: #dc2626;
  --destructive-foreground: #fafafa;
  --success: #22c55e;
  --border: #262626;
  --input: #262626;
  --input-strong: #525252;     /* border-neutral-600 */
  --ring: #a3a3a3;             /* used at 50% opacity */
  --shadow-control: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-control-hover: 0 2px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-overlay: 0 24px 64px -28px rgb(0 0 0 / 0.72);
  --backdrop: rgb(0 0 0 / 0.78);
  --card: #121212;
  --info: #4cc2ff;
  --shadow-surface: 0 0 0 1px var(--border), 0 1px 2px 0 rgb(0 0 0 / 0.35);
  --destructive-text: #f87171;
  --success-text: #4ade80;
  --input-bg: transparent;
}
:root:has([data-theme-select] option[value="gray"]:checked) {
  color-scheme: dark;
  --background: #1c1c1f;
  --foreground: #f4f4f5;
  --popover: #232327;
  --muted: #232327;
  --muted-foreground: #a1a1aa;
  --accent: #2e2e33;
  --accent-foreground: #fafafa;
  --secondary: #2e2e33;
  --border: #303036;
  --input: #303036;
  --input-strong: #52525b;
  --shadow-control: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-control-hover: 0 2px 6px -1px rgb(0 0 0 / 0.4);
  --card: #232327;
  --info: #4cc2ff;
  --shadow-surface: 0 0 0 1px var(--border), 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --destructive-text: #f87171;
  --success-text: #4ade80;
  --input-bg: transparent;
}
:root:has([data-theme-select] option[value="light"]:checked) {
  color-scheme: light;
  --background: #f6f6f7;
  --foreground: #0b0b0c;
  --card: #ffffff;
  --card-foreground: var(--foreground);
  --popover: #ffffff;
  --popover-foreground: var(--foreground);
  --muted: #efeff1;
  --muted-foreground: #66666e;
  --accent: #e8e8eb;
  --accent-foreground: #0b0b0c;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --primary-hover: #2e2e33;
  --secondary: #e8e8eb;
  --secondary-foreground: #18181b;
  --destructive: #dc2626;
  --destructive-foreground: #fafafa;
  --destructive-text: #dc2626;
  --success-text: #15803d;
  --info: #0284c7;
  --border: #e2e2e6;
  --input: #d6d6dc;
  --input-strong: #a1a1aa;
  --input-bg: #ffffff;
  --ring: #a1a1aa;
  --shadow-control: 0 1px 2px 0 rgb(16 16 20 / 0.06);
  --shadow-control-hover: 0 2px 6px -1px rgb(16 16 20 / 0.12);
  --shadow-surface: 0 0 0 1px var(--border), 0 1px 3px 0 rgb(16 16 20 / 0.05);
  --shadow-overlay: 0 24px 64px -28px rgb(16 16 20 / 0.28);
  --backdrop: rgb(0 0 0 / 0.4);
}

/* -------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: color-mix(in srgb, var(--color-brand-sky) 35%, transparent); }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
@media (min-width: 768px) { :root { --container-pad: 1.5rem; } }

/* -------------------------------------------------------------------------
   3. Type scale — semantic text styles, not raw sizes
   ------------------------------------------------------------------------- */
.text-title   { font-size: 1.5rem;   line-height: 2rem;    font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.text-heading { font-size: 1.125rem; line-height: 1.625rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.text-body    { font-size: 0.9375rem; line-height: 1.5rem; font-weight: 400; }
.text-compact-body { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.text-form-control { font-size: 1rem; line-height: 1.5rem; font-weight: 400; } /* 16px on mobile stops iOS zoom */
@media (min-width: 768px) { .text-form-control { font-size: 0.875rem; line-height: 1.25rem; } }
.text-label    { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.text-label-lg { font-size: 1rem;     line-height: 1.5rem;  font-weight: 600; letter-spacing: -0.01em; }
.text-button   { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.text-button-compact { font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600; }
.text-caption  { font-size: 0.75rem;  line-height: 1rem;    font-weight: 500; }
.text-muted    { color: var(--muted-foreground); }

/* -------------------------------------------------------------------------
   4. Control primitives — shared by every interactive element
   ------------------------------------------------------------------------- */
.motion-control {
  transition-property: background-color, border-color, color, box-shadow, opacity, transform, translate;
  transition-duration: var(--motion-duration-control);
  transition-timing-function: var(--motion-ease-control);
}
@media (prefers-reduced-motion: reduce) {
  .motion-control { transition: none; }
}

.control-focus { outline: none; }
.control-focus:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
  border-color: var(--ring);
}
.control-invalid[aria-invalid="true"] {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 25%, transparent);
}
.control-disabled:disabled,
.control-disabled[data-disabled] { opacity: 0.5; cursor: not-allowed; }

.control-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (pointer: coarse) {
  .coarse-hit-target { min-height: var(--hit-target-coarse); }
}

/* -------------------------------------------------------------------------
   5. Button
   ------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  max-width: 100%;
  height: var(--control-default);
  padding-inline: 1rem;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  box-shadow: var(--shadow-control);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  transition-property: background-color, border-color, color, box-shadow, opacity, transform, translate;
  transition-duration: var(--motion-duration-control);
  transition-timing-function: var(--motion-ease-control);
}
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; pointer-events: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent); }
.btn:not(:disabled):not([data-disabled]):active { translate: 0 1px; }
.btn:disabled, .btn[data-disabled] { opacity: 0.5; cursor: not-allowed; }
@media (pointer: coarse) { .btn { min-height: var(--hit-target-coarse); } }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:not(:disabled):active { translate: none; }
}

.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:not(:disabled):not([data-disabled]):hover { background: var(--primary-hover); box-shadow: var(--shadow-control-hover); }

.btn-outline { background: var(--input-bg, var(--background)); border-color: var(--input); }
.btn-outline:not(:disabled):not([data-disabled]):hover { background: var(--accent); color: var(--accent-foreground); box-shadow: var(--shadow-control-hover); }

.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:not(:disabled):not([data-disabled]):hover { background: color-mix(in srgb, var(--secondary) 80%, var(--foreground)); }

.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:not(:disabled):not([data-disabled]):hover { background: var(--accent); color: var(--accent-foreground); }

.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn-destructive:not(:disabled):not([data-disabled]):hover { background: color-mix(in srgb, var(--destructive) 88%, #000); box-shadow: var(--shadow-control-hover); }

.btn-sky { background: var(--color-brand-sky); color: #00243a; }
.btn-sky:not(:disabled):not([data-disabled]):hover { background: color-mix(in srgb, var(--color-brand-sky) 85%, #fff); box-shadow: var(--shadow-control-hover); }

.btn-compact { height: var(--control-compact); padding-inline: 0.75rem; font-size: 0.8125rem; }

/* Brand button: the one place the app uses its brand color */
.btn-brand { border-radius: 0.375rem; background: var(--brand); color: var(--brand-foreground); border-color: var(--brand-hover); box-shadow: none; font-weight: 500; }
.btn-brand:not(:disabled):not([data-disabled]):hover { background: var(--brand-hover); }

.btn-sm { height: var(--control-sm); padding-inline: 0.75rem; font-size: 0.8125rem; }
.btn-lg { height: var(--control-lg); padding-inline: 1.25rem; font-size: 0.9375rem; }
.btn-icon { width: var(--control-default); padding: 0; }

/* -------------------------------------------------------------------------
   6. Input, Select, Label
   ------------------------------------------------------------------------- */
.label { display: block; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }

.input, .select {
  display: flex;
  width: 100%;
  height: var(--control-default);
  padding-inline: 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-control);
  background-color: var(--input-bg, transparent);
  box-shadow: var(--shadow-control);
  font-size: 1rem; line-height: 1.5rem;
  outline: none;
  transition-property: background-color, border-color, color, box-shadow, opacity;
  transition-duration: var(--motion-duration-control);
  transition-timing-function: var(--motion-ease-control);
}
@media (min-width: 768px) { .input, .select { font-size: 0.875rem; line-height: 1.25rem; } }
@media (pointer: coarse) { .input, .select { min-height: var(--hit-target-coarse); } }
.input::placeholder { color: var(--muted-foreground); }
.input:hover, .select:hover { border-color: var(--input-strong); }
.input:focus-visible, .select:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}
.input[aria-invalid="true"] {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 25%, transparent);
}
.input:disabled, .select:disabled { opacity: 0.5; cursor: not-allowed; }
.input-strong { border-color: var(--input-strong); }
.input-compact, .select-compact { height: var(--control-compact); font-size: 0.8125rem; line-height: 1.25rem; }
.input-compact { padding-inline: 0.625rem; }
.select-compact { width: auto; padding-left: 0.625rem; padding-right: 2rem; background-position: right 0.625rem center; }

.select {
  appearance: none;
  -webkit-appearance: none;
  align-items: center;
  padding-right: 2.25rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}
.select option { background: var(--popover); color: var(--popover-foreground); }

.field { display: grid; gap: 0.5rem; }
.field-row { display: flex; gap: 0.5rem; }
.field-row .input { max-width: 32rem; }
.field-hint { font-size: 0.8125rem; color: var(--muted-foreground); }
.field-error { font-size: 0.875rem; line-height: 1.25rem; color: var(--destructive-text); }

/* -------------------------------------------------------------------------
   7. Navigation link (pill tab)
   ------------------------------------------------------------------------- */
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding-inline: 0.625rem;
  border-radius: var(--radius-control);
  color: var(--muted-foreground);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  text-decoration: none;
  outline: none;
  transition: background-color var(--motion-duration-control) var(--motion-ease-control),
              color var(--motion-duration-control) var(--motion-ease-control),
              box-shadow var(--motion-duration-control) var(--motion-ease-control);
}
.nav-link:hover { background: var(--accent); color: var(--accent-foreground); }
.nav-link:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent); }
.nav-link[aria-current="page"] { background: var(--accent); color: var(--accent-foreground); }
@media (prefers-reduced-motion: reduce) { .nav-link { transition: none; } }

/* -------------------------------------------------------------------------
   8. App header (portal shell)
   ------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 95%, transparent);
}
@supports (backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px)) {
  .app-header {
    background: color-mix(in srgb, var(--background) 60%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.app-header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-block: 0.75rem;
}
@media (min-width: 768px) {
  .app-header-inner { flex-direction: row; align-items: center; gap: 1.5rem; }
}
.brand {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
  border-radius: var(--radius-control);
  color: inherit; text-decoration: none; outline: none;
}
.brand:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent); }
.brand-name { font-size: 1rem; line-height: 1.5rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.app-nav { display: none; flex: 1; min-width: 0; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.app-nav-mobile { display: block; }
@media (min-width: 768px) {
  .app-nav { display: flex; }
  .app-nav-mobile { display: none; }
}

/* -------------------------------------------------------------------------
   9. Surfaces
   ------------------------------------------------------------------------- */
.card {
  background: var(--card);
  color: var(--card-foreground, var(--foreground));
  border-radius: var(--radius-surface);
  box-shadow: var(--shadow-surface);
  padding: 1rem;
}
.card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.card-header svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.card-title { margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.text-info { color: var(--info); }

.spinner { width: 1rem; height: 1rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.popover {
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-overlay);
}

.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  height: 1.375rem; padding-inline: 0.375rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.75rem; font-weight: 500; line-height: 1;
}
.badge-primary { background: color-mix(in srgb, var(--primary) 16%, transparent); border-color: color-mix(in srgb, var(--primary) 35%, transparent); color: var(--primary); }
.badge-sky { background: color-mix(in srgb, var(--color-brand-sky) 16%, transparent); border-color: color-mix(in srgb, var(--color-brand-sky) 35%, transparent); color: var(--color-brand-sky); }
.badge-destructive { background: color-mix(in srgb, var(--destructive) 16%, transparent); border-color: color-mix(in srgb, var(--destructive) 35%, transparent); color: var(--destructive); }

.kbd {
  display: inline-flex; align-items: center; height: 1.25rem; padding-inline: 0.375rem;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 0.375rem;
  background: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted-foreground);
}

.separator { height: 1px; background: var(--border); border: 0; margin: 0; }

/* -------------------------------------------------------------------------
   10. Feedback
   The result of a form is a one-line message under the form row
   (.form-message). Toasts, bottom right, are only for events the user
   didn't trigger on this page.
   ------------------------------------------------------------------------- */
.form-message { margin: 0; font-size: 0.875rem; line-height: 1.25rem; overflow-wrap: anywhere; }
.form-message[data-type="error"] { color: var(--destructive-text); }
.form-message[data-type="success"] { color: var(--success-text); }

.toaster {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 100;
  display: grid; gap: 0.5rem; width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--popover); color: var(--popover-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-control);
  box-shadow: var(--shadow-overlay);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  pointer-events: auto;
  animation: toast-in var(--motion-duration-overlay) var(--motion-ease-control);
}
.toast[data-type="success"] .toast-icon { color: var(--success); }
.toast[data-type="error"] { border-color: color-mix(in srgb, var(--destructive) 40%, var(--border)); }
.toast[data-type="error"] .toast-icon { color: var(--destructive); }
.toast-icon { width: 1.125rem; height: 1.125rem; flex-shrink: 0; margin-top: 0.0625rem; }
.toast[data-leaving] { opacity: 0; translate: 0 0.5rem; transition: opacity 150ms, translate 150ms; }
@keyframes toast-in { from { opacity: 0; translate: 0 0.5rem; } to { opacity: 1; translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .toast[data-leaving] { transition: none; }
}

/* -------------------------------------------------------------------------
   11. Small helpers
   ------------------------------------------------------------------------- */
.stack-2 > * + * { margin-top: 0.5rem; }
.stack-6 > * + * { margin-top: 1.5rem; }
