/*
 * Mobile design tokens — source of truth: docs/mobile-design/01-design-system.md
 * Loaded AFTER app.css. New code uses the semantic tokens (--bg, --ink, --accent …).
 * The legacy --m-* aliases at the bottom are remapped to the new palette so unmigrated
 * screens keep working. NOTE: --m-green* now means "accent (coral)"; migrate screens off --m-*.
 */
:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #efeeea;
  --ink: #161616;
  --ink-2: #5d5d59;
  --ink-3: #8b8b85;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.2);
  --accent: #e04a33;
  --accent-ink: #c63c27;
  --accent-tick: #e04a33;
  --accent-soft: rgba(224, 74, 51, 0.1);
  --on-accent: #ffffff;
  --place: #4f6f8f;
  --danger: #c93a2e;
  --scrim: rgba(0, 0, 0, 0.45);
  --glass: rgba(246, 246, 244, 0.92);
  --shadow-float: 0 10px 28px rgba(0, 0, 0, 0.16);

  --radius-card: 16px;
  --radius-sheet: 20px;
  --radius-input: 12px;
  --radius-photo: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0d;
  --surface: #161618;
  --surface-2: #1f1f22;
  --ink: #f4f4f2;
  --ink-2: #a6a6a2;
  --ink-3: #76766f;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #e8644f;
  --accent-ink: #ff9b87;
  --accent-tick: #ff8a76;
  --accent-soft: rgba(232, 100, 79, 0.16);
  --place: #4f6f8f;
  --danger: #ff6b5f;
  --scrim: rgba(0, 0, 0, 0.55);
  --glass: rgba(12, 12, 13, 0.9);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Legacy --m-* aliases. `:root[data-theme]` matches app.css's dark block specificity; this file loads later, so it wins. */
:root,
:root[data-theme] {
  --m-bg: var(--bg);
  --m-surface: var(--surface);
  --m-surface-soft: var(--surface-2);
  --m-surface-raised: var(--surface);
  --m-ink: var(--ink);
  --m-muted: var(--ink-2);
  --m-faint: var(--ink-3);
  --m-line: var(--line);
  --m-line-strong: var(--line-strong);
  --m-green: var(--accent);
  --m-green-deep: var(--accent-ink);
  --m-green-soft: var(--accent-soft);
  --m-coral: var(--accent);
  --m-coral-soft: var(--accent-soft);
  --m-blue: var(--place);
  --m-header: var(--glass);
  --m-nav: var(--glass);
  --m-map-filter: var(--glass);
  --m-shadow: var(--shadow-float);
  --m-shadow-soft: var(--shadow-float);
  --m-radius: var(--radius-card);
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
}
