/* CostOfDist — дизайн-система.
   Язык интерфейса — iOS: группированные списки, сегменты, шторки, крупные заголовки.
   Собственный характер даёт «одометр»: жёлтый цвет дорожной разметки на асфальте
   и моноширинные цифры, как в приборной панели. */

:root {
  /* фирменные цвета */
  --road: #ffb100;           /* дорожная разметка — акцент */
  --road-ink: #1a1400;       /* текст на жёлтом */
  --own: #24b39b;            /* своя машина */
  --share: #7a6bff;          /* каршеринг */
  --danger: #ff3b30;
  --warn: #ff9f0a;

  /* светлая тема */
  --bg: #f2f2f7;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --card-2: #f7f7fa;
  --ink: #0b0b0f;
  --ink-2: #55555f;
  --ink-3: #8e8e97;
  --hair: rgba(60, 60, 67, 0.14);
  --fill: rgba(118, 118, 128, 0.12);
  --blur-bg: rgba(242, 242, 247, 0.78);
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.06), 0 8px 24px rgba(16, 16, 24, 0.06);
  --panel: #16171b;          /* окошко одометра — всегда тёмное */
  --panel-ink: #ffc53d;

  /* геометрия */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --gap: 16px;
  --tabbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  /* движение */
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --fast: 160ms;
  --mid: 280ms;
  --slow: 460ms;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          "Helvetica Neue", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --bg: #0c0d0f;
  --bg-elev: #17181c;
  --card: #17181c;
  --card-2: #1f2026;
  --ink: #f5f5f7;
  --ink-2: #a3a3ad;
  --ink-3: #6f6f7a;
  --hair: rgba(255, 255, 255, 0.12);
  --fill: rgba(120, 120, 128, 0.24);
  --blur-bg: rgba(12, 13, 15, 0.76);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
  --panel: #101115;
  --own: #2fd0b4;
  --share: #9b8dff;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #0c0d0f;
    --bg-elev: #17181c;
    --card: #17181c;
    --card-2: #1f2026;
    --ink: #f5f5f7;
    --ink-2: #a3a3ad;
    --ink-3: #6f6f7a;
    --hair: rgba(255, 255, 255, 0.12);
    --fill: rgba(120, 120, 128, 0.24);
    --blur-bg: rgba(12, 13, 15, 0.76);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
    --panel: #101115;
    --own: #2fd0b4;
    --share: #9b8dff;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  transition: background var(--mid) var(--ease), color var(--mid) var(--ease);
}

body { padding-bottom: env(safe-area-inset-bottom); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
input, select, textarea { -webkit-appearance: none; appearance: none; }
[hidden] { display: none !important; }

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

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--fill); border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
