/* ===== Токены дизайн-системы ===== */
:root {
  --cream: #f6f1ea;
  --cream-2: #efe7dc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #fffdfa;
  --lav-100: #efe8fb;
  --lav-200: #ddd0f3;
  --lav-400: #a58ce0;
  --lav-600: #7d6ac9;
  --lav-800: #4f3f8a;
  --mint: #d9f0e5;
  --mint-600: #3f9d78;
  --mint-800: #2c6b53;
  --peach: #f8dcc4;
  --peach-600: #d98451;
  --sky: #dcebf7;
  --graphite: #322e37;
  --graphite-2: #5d5765;
  --muted: #8d8796;
  --line: rgba(80, 65, 100, 0.1);
  --danger: #c8545f;
  --danger-bg: #fdecee;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 44px;

  --shadow-sm: 0 2px 10px rgba(76, 60, 110, 0.07);
  --shadow-md: 0 10px 26px rgba(76, 60, 110, 0.11);
  --shadow-lg: 0 22px 48px rgba(76, 60, 110, 0.16);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--graphite);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 8% 0%, rgba(214, 199, 243, 0.55), transparent 60%),
    radial-gradient(90% 60% at 100% 8%, rgba(246, 220, 196, 0.5), transparent 55%),
    radial-gradient(100% 70% at 50% 110%, rgba(217, 240, 229, 0.5), transparent 60%),
    var(--cream);
  background-attachment: fixed;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lav-600); }

.app-root {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--nav-h) + var(--safe-bottom) + 28px);
  min-height: 100dvh;
}

.app-root.no-nav { padding-bottom: calc(var(--safe-bottom) + 32px); }

.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos { color: var(--mint-800); }
.neg { color: var(--danger); }
.num { font-variant-numeric: tabular-nums; }

.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;
}

@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

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