:root {
  color-scheme: dark;
  --ios-theme-id: pear_meadow;

  /* === PALETTE — Pear Meadow: vibrant yellow-green on warm near-black === */
  /* Primary: #dced31 (yellow-green) | Secondary: #7d8570 (muted sage) | Background: #1c1b17 */
  --bg:           #1c1b17;
  --bg-raised:    #242320;
  --bg-card:      #2a2925;
  --bg-card-alt:  #32312d;

  --text-primary:   rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted:     rgba(255, 255, 255, 0.5);

  --accent:       #dced31;
  --on-accent:    #1c1b17;
  --accent-hover: #e3f13e;
  --accent-dim:   rgba(220, 237, 49, 0.10);
  --accent-glow:  rgba(220, 237, 49, 0.18);

  --accent-secondary: #7d8570;
  --accent-secondary-dim: rgba(125, 133, 112, 0.10);

  --auth-success-border: rgba(220, 237, 49, 0.35);
  --auth-success-bg: rgba(220, 237, 49, 0.14);

  --border:       rgba(244, 241, 232, 0.07);
  --border-mid:   rgba(244, 241, 232, 0.13);

  --error:        #e07070;
  --success:      #7d8570;

  /* === TYPEFACE — Sora: geometric, clean, with subtle humanist warmth === */
  --font: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  /* === SPACING — 8px base unit, mathematical scale === */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;

  /* === RADII — restrained, geometric === */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;

  /* === MOTION — smooth, liquid, like quality machinery === */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 160ms;
  --t-base: 280ms;
  --t-slow: 420ms;
}

:root[data-ios-theme="atomic_tangerine"] {
  --ios-theme-id: atomic_tangerine;
  --bg: #222325;
  --accent: #ff8d4d;
  --on-accent: #222325;
  --accent-secondary: #69a0ad;
}

:root[data-ios-theme="turquoise_dream"] {
  --ios-theme-id: turquoise_dream;
  --bg: #11213a;
  --accent: #72dbb8;
  --on-accent: #11213a;
  --accent-secondary: #5e6a72;
}

:root[data-ios-theme="celadon_garden"] {
  --ios-theme-id: celadon_garden;
  --bg: #0c1618;
  --accent: #d1ac00;
  --on-accent: #0c1618;
  --accent-secondary: #004643;
}

:root[data-ios-theme="khaki_earth"] {
  --ios-theme-id: khaki_earth;
  --bg: #0a0908;
  --accent: #bfa688;
  --on-accent: #0a0908;
  --accent-secondary: #2c442c;
}

:root[data-ios-theme="golden_hour"] {
  --ios-theme-id: golden_hour;
  --bg: #0c232d;
  --accent: #d9b70d;
  --on-accent: #0c232d;
  --accent-secondary: #2f7a91;
}

:root[data-ios-theme="sunset_vibes"] {
  --ios-theme-id: sunset_vibes;
  --bg: #2b1c14;
  --accent: #f2c879;
  --on-accent: #2b1c14;
  --accent-secondary: #a60530;
}

:root[data-ios-theme="mirabelle_sunrise"] {
  --ios-theme-id: mirabelle_sunrise;
  --bg: #0b1e1a;
  --accent: #f2c063;
  --on-accent: #0b1e1a;
  --accent-secondary: #5a736c;
}

:root[data-ios-theme="robin_egg"] {
  --ios-theme-id: robin_egg;
  --bg: #191f21;
  --accent: #62d7dd;
  --on-accent: #191f21;
  --accent-secondary: #706f6e;
}

:root[data-ios-theme="rosy_pine"] {
  --ios-theme-id: rosy_pine;
  --bg: #031c26;
  --accent: #bf988a;
  --on-accent: #031c26;
  --accent-secondary: #247c6d;
}

:root[data-ios-theme="spring_fresh"] {
  --ios-theme-id: spring_fresh;
  --bg: #050706;
  --accent: #abea94;
  --on-accent: #050706;
  --accent-secondary: #758073;
}

:root[data-ios-theme] {
  --accent-hover: color-mix(in srgb, var(--accent) 88%, white);
  --accent-dim: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 20%, transparent);
  --auth-success-border: color-mix(in srgb, var(--accent) 38%, transparent);
  --auth-success-bg: color-mix(in srgb, var(--accent) 16%, transparent);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
