:root {
  --bg: #fdf8f2;
  --bg-alt: #fbf3ea;
  --card: #ffffff;
  --text: #14100c;
  --muted: #7a6f64;
  --accent: #f97b32;
  --accent-dark: #e8620a;
  /* фон кнопок: достаточно тёмный, чтобы белый текст читался (4.5:1) */
  --accent-btn: #c2560a;
  --accent-btn-hover: #a84406;
  --accent-text: #b34d08;
  --accent-soft: #fdece0;
  --line: #ece3d8;
  --radius: 20px;

  /* поверхности и текст */
  --surface: #ffffff;
  --surface-2: #fffaf5;
  --surface-3: #fffdf9;
  --surface-sunken: #faf6f0;
  --hint-bg: #fdf1e6;
  --hint-text: #7d5f40;
  --soft-text: #7a6f64;
  --top-bg: rgba(253, 248, 242, .92);
  --border-soft: #f3ece3;
  --track: #ece3d8;
  --disabled: #d9c8ba;

  /* смысловые цвета */
  --good: #2f6b40;
  --good-bg: #e9f5ec;
  --good-bg-2: #e6f4e9;
  --warn: #9a6212;
  --bad: #a8433a;
  --bad-bg: #fdeceb;
  --bad-solid: #e21a1a;
  --bad-strong: #b23;
  --error: #c0392b;
  --on-accent: #ffffff;

  /* тени */
  --shadow-card: 0 12px 32px rgba(20, 16, 12, .08);
  --shadow-hover: 0 6px 18px rgba(249, 123, 50, .16);
  --overlay: rgba(20, 16, 12, .55);
  --close-bg: rgba(0, 0, 0, .06);
  --close-bg-hover: rgba(0, 0, 0, .12);

  color-scheme: light;
}

/* тёмная тема: включается классом на <html> или системной настройкой */
html[data-theme="dark"] {
  --bg: #14110e;
  --bg-alt: #1a1613;
  --card: #1f1a16;
  --text: #f4ece2;
  --muted: #a89b8c;
  --accent: #ff8a3d;
  --accent-dark: #ffa05c;
  /* на тёмном фоне затемнённая кнопка не нужна: здесь светлый текст на
     насыщенном оранжевом не читается, поэтому текст на кнопке тёмный */
  --accent-btn: #ff8a3d;
  --accent-btn-hover: #ffa05c;
  --accent-text: #ff8a3d;
  --accent-soft: #3a2720;
  --line: #2e2721;

  --surface: #1f1a16;
  --surface-2: #262019;
  --surface-3: #221d18;
  --surface-sunken: #1a1613;
  --hint-bg: #2b2119;
  --hint-text: #d8b28d;
  --soft-text: #8b7f73;
  --top-bg: rgba(20, 17, 14, .9);
  --border-soft: #2a231d;
  --track: #332b24;
  --disabled: #4a3f36;

  --good: #7fd39a;
  --good-bg: #1e2f23;
  --good-bg-2: #1c2c21;
  --warn: #f0b866;
  --bad: #f08d84;
  --bad-bg: #33211f;
  --bad-solid: #d93a3a;
  --bad-strong: #ff8b8b;
  --error: #ff8f80;
  /* на оранжевой кнопке в тёмной теме читается только тёмный текст */
  --on-accent: #1a1209;

  --shadow-card: 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-hover: 0 6px 18px rgba(0, 0, 0, .5);
  --overlay: rgba(0, 0, 0, .72);
  --close-bg: rgba(255, 255, 255, .08);
  --close-bg-hover: rgba(255, 255, 255, .16);

  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* экраны */
.screen { display: none; }
.screen:not([hidden]) { display: block; }
[hidden] { display: none !important; }

/* ================= лендинг ================= */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--top-bg); backdrop-filter: blur(10px);
}
.top-inner {
  max-width: 1180px; margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; gap: 28px;
}
.logo {
  font-weight: 900; font-size: 24px; letter-spacing: -.03em;
  color: var(--text);
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px;
  font-weight: 500; transition: color .15s;
}
.nav a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent-btn); color: var(--on-accent); border: none; cursor: pointer;
  padding: 12px 24px; border-radius: 999px; font-size: 15px;
  font-weight: 700; font-family: inherit;
  box-shadow: 0 6px 18px rgba(249,123,50,.28);
  transition: background .15s, transform .1s;
}
.nav-cta:hover { background: var(--accent-btn-hover); }
.nav-cta:active { transform: scale(.98); }

/* переключатель темы */
.theme-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--line);
}
.theme-switch button {
  width: 30px; height: 30px; border: none; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 14px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s;
}
.theme-switch button:hover { color: var(--text); }
.theme-switch button.on {
  background: var(--accent-btn); color: var(--on-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.theme-mini {
  width: 36px; height: 36px; flex: 0 0 36px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-alt); color: var(--text);
  font-size: 16px; line-height: 1; cursor: pointer;
  transition: border-color .15s, transform .12s;
}
.theme-mini:hover { border-color: var(--accent); transform: scale(1.05); }
.wiz-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 6px;
}
.wiz-top .progress { flex: 1; margin: 0; }
@media (max-width: 820px) {
  .theme-switch { display: none; }   /* на телефоне — кнопки в шаге и кабинете */
}

.hero { padding: 48px 28px 24px; }
.hero-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 56px; align-items: start;
}
.hero-copy { padding-top: 12px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(38px, 4.4vw, 62px);
  line-height: .98; letter-spacing: -.035em;
  margin: 0 0 24px; font-weight: 900;
  max-width: 620px;
}
/* оранжевый текст на светлом фоне не читался (2.5:1) — берём насыщеннее */
.price-accent { color: var(--accent-text); }

/* сумма в заголовке перелистывается: смена с лёгким сдвигом */
.price-flip {
  display: inline-block; min-width: 5.2ch;
  transform-origin: 50% 60%;
  will-change: transform, opacity;
  transition: opacity .2s ease, transform .2s ease;
}
.price-flip.flip-out {
  opacity: 0; transform: translateY(-8px) scale(.96);
}
.price-flip.flip-in {
  animation: priceFlipIn .34s cubic-bezier(.2, .9, .25, 1.2);
}
@keyframes priceFlipIn {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .price-flip { transition: none; }
  .price-flip.flip-in { animation: none; }
}
.lead {
  font-size: 18px; color: var(--muted); line-height: 1.5;
  margin: 0 0 32px; max-width: 520px;
}
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-btn); color: var(--on-accent); border: none; cursor: pointer;
  padding: 16px 30px; border-radius: 999px;
  font-size: 16px; font-weight: 700; font-family: inherit;
  box-shadow: 0 8px 24px rgba(249,123,50,.3);
  transition: background .15s, transform .1s;
}
.cta:hover { background: var(--accent-btn-hover); }
.cta:active { transform: scale(.98); }
.cta:disabled { background: var(--disabled); box-shadow: none; cursor: default; }
.cta-lg { padding: 19px 38px; font-size: 18px; }
.cta-lg .arrow { font-size: 22px; line-height: 1; margin-top: -2px; }
.cta-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

.stats {
  display: flex; gap: 40px; margin-top: 40px;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats b { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.stats span { font-size: 13px; color: var(--muted); }

/* карточка «пример дня» */
.day-card {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}
.day-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.day-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.day-store {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
}
.store-dot {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--bad-solid); color: var(--on-accent); font-style: normal;
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.day-meal {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.day-meal:last-of-type { border-bottom: none; }
.meal-thumb {
  width: 56px; height: 56px; flex: 0 0 56px;
  border-radius: 12px; background: var(--accent-soft);
  object-fit: cover; display: block;
}
.meal-info {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  font-size: 15px; font-weight: 600; line-height: 1.3;
}
.meal-info i {
  font-style: normal; font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.meal-price { font-size: 16px; font-weight: 800; white-space: nowrap; }

.day-total {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--hint-bg); border-radius: 14px;
  padding: 16px 18px; margin-top: 18px;
}
.day-total span {
  display: flex; flex-direction: column;
  font-size: 15px; font-weight: 700;
}
.day-total small {
  font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 1px;
}
.day-total b { font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
.day-note {
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
  margin: 16px 0 0;
}



/* секции */
.section { padding: 64px 28px; }
.section-inner { max-width: 1180px; margin: 0 auto; }
h2 {
  font-size: clamp(26px, 3vw, 38px); font-weight: 900;
  letter-spacing: -.03em; margin: 0 0 12px;
}
.section-sub { color: var(--muted); margin: 0 0 32px; font-size: 16px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 20px; margin-top: 32px; }
.step {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
}
.step b {
  display: inline-flex; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: var(--accent-btn); color: var(--on-accent); border-radius: 50%;
  font-size: 16px; margin-bottom: 12px;
}
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr));
  gap: 16px;
}
.dish {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px;
}
.dish .emoji {
  font-size: 30px; width: 54px; height: 54px;
  background: var(--accent-soft); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
/* иллюстрация блюда в карточке */
.dish-photo {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 12px; display: block; background: var(--accent-soft);
}
/* мини-иллюстрация в строке меню */
.meal-photo {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 10px; object-fit: cover; display: block;
  background: var(--accent-soft);
}
.dish h3 { font-size: 15px; margin: 12px 0 4px; line-height: 1.3; }
.dish .meta { color: var(--muted); font-size: 13px; }
.dish .price { font-weight: 900; color: var(--accent-text); margin-top: 8px; font-size: 17px; }

.inside-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
  gap: 16px; margin-top: 32px;
}
.inside-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
}
.inside-emoji { font-size: 26px; }
.inside-card h3 { font-size: 16px; margin: 12px 0 6px; }
.inside-card p { margin: 0; color: var(--muted); font-size: 14px; }

.qa { max-width: 760px; margin-top: 28px; }
.qa details {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 10px; background: var(--card);
}
.qa summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.qa p { color: var(--muted); margin: 12px 0 0; }

.footer { background: var(--text); color: var(--muted); padding: 44px 28px; }
.footer .logo { color: var(--on-accent); margin-bottom: 12px; }
.footer .logo span { color: var(--accent); }
.footer a { color: var(--accent); }
.footer p { font-size: 14px; margin: 8px 0; }
.muted { color: var(--soft-text); }

/* ---------- wizard ---------- */
.wizard {
  max-width: 560px; margin: 0 auto; padding: 56px 20px;
  display: flex; flex-direction: column; gap: 20px;
}
.wizard h1 { font-size: 28px; margin: 0; text-align: center; line-height: 1.2; letter-spacing: -.02em; }
.wizard .sub { text-align: center; color: var(--muted); margin: -8px 0 0; }

.progress { display: flex; gap: 6px; justify-content: center; }
.progress i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.progress i.on { background: var(--accent); }
.progress i.done { background: var(--track); }
.progress i { width: 22px; height: 6px; border-radius: 999px; }

/* ---------- бюджет: сумма прямо в цифре ---------- */
.budget-hero { text-align: center; }
.budget-amount {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
}
.budget-amount input {
  font-family: inherit; font-size: clamp(38px, 10vw, 56px); font-weight: 900;
  letter-spacing: -.03em; color: var(--accent); text-align: center;
  border: none; background: transparent; outline: none;
  padding: 4px 2px; border-radius: 10px;
  width: 5ch; max-width: 70vw;
  border-bottom: 3px solid rgba(249,123,50,.35);
  transition: border-color .15s, background .15s;
}
.budget-amount input:focus {
  border-bottom-color: var(--accent); background: var(--surface-2);
}
.budget-cur {
  font-size: clamp(24px, 6vw, 32px); font-weight: 900; color: var(--accent);
}
.budget-per {
  margin: 10px 0 0; font-size: 14px; color: var(--muted);
}
.budget-verdict { margin: 20px 0 4px; }
.budget-verdict b { display: block; font-size: 18px; letter-spacing: -.01em; }
.budget-verdict span { font-size: 14px; color: var(--muted); }
.budget-verdict.good b { color: var(--good); }
.budget-verdict.warn b { color: var(--warn); }
.budget-verdict.low b { color: var(--bad); }

.budget-slider { margin-top: 10px; }
.range-limits {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--muted); margin-top: 14px;
}
.range-limits span:first-child { text-align: left; }
.range-limits span:last-child { text-align: right; }

/* ---------- приёмы пищи ---------- */
.meal-scopes { display: flex; flex-direction: column; gap: 10px; }
.meal-scope {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.meal-scope.off { opacity: .55; }
.ms-name { font-weight: 700; font-size: 15px; }
.seg { display: flex; gap: 6px; }
.seg-btn {
  flex: 1; padding: 9px 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-family: inherit; cursor: pointer;
  color: var(--muted); font-weight: 600;
}
.seg-btn.checked {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-text);
}
.hint-box {
  background: var(--hint-bg); border-radius: 14px; padding: 14px 16px;
  font-size: 13px; color: var(--hint-text); line-height: 1.45;
}

/* ---------- карточки выбора ---------- */
.choice-grid { display: grid; gap: 12px; }
.choice-grid.two { grid-template-columns: 1fr 1fr; }
.choice {
  background: var(--card); border: 2px solid var(--line);
  border-radius: 16px; padding: 20px 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: inherit; text-align: center; transition: .15s;
  color: var(--text);
}
.choice:hover { border-color: var(--accent); }
.choice.checked { border-color: var(--accent); background: var(--accent-soft); }
.choice-emoji { font-size: 34px; line-height: 1; }
.choice b { font-size: 15px; }
.choice small { font-size: 12px; color: var(--muted); }

/* ---------- вкусы ---------- */
.taste-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; min-height: 260px;
  display: flex; flex-direction: column;
}
.taste-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
}
.taste-body { padding: 16px; }
.taste-body h3 { font-size: 18px; margin: 0 0 4px; }
.taste-body p { margin: 0; font-size: 13px; color: var(--muted); }
.taste-counter {
  text-align: center; font-size: 13px; color: var(--muted); margin: 0;
}
.taste-actions { display: flex; gap: 22px; justify-content: center; }
.taste-btn {
  width: 62px; height: 62px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface);
  font-size: 24px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: .15s;
  color: var(--text);
}
.taste-btn.dislike { color: var(--bad); }
.taste-btn.dislike:hover { border-color: var(--bad); background: var(--bad-bg); }
.taste-btn.like { color: var(--accent); }
.taste-btn.like:hover { border-color: var(--accent); background: var(--accent-soft); }
.taste-btn:active { transform: scale(.94); }
.taste-empty { padding: 40px 20px; text-align: center; color: var(--muted); }

@media (max-width: 520px) {
  .choice-grid.two { grid-template-columns: 1fr; }
  .seg { flex-direction: column; }
}

.stores-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.store {
  background: var(--card); border: 2px solid var(--line);
  border-radius: 14px; padding: 16px; text-align: center;
  cursor: pointer; font-weight: 600; transition: .15s;
}
.store:hover { border-color: var(--accent); }
.store.checked { border-color: var(--accent); background: var(--accent-soft); }
.store .dot {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft); margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.big-input {
  width: 100%; padding: 18px; font-size: 28px; font-weight: 900;
  text-align: center; border: 2px solid var(--line);
  border-radius: 16px; font-family: inherit; background: var(--card);
}
.big-input:focus { outline: none; border-color: var(--accent); }

/* ---------- бюджет: бегунок + ручной ввод ---------- */
.wiz-step {
  text-align: center; font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.budget-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.budget-value {
  text-align: center; font-size: 42px; font-weight: 900;
  letter-spacing: -.03em; line-height: 1;
}
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--fill, 14%),
    var(--track) var(--fill, 14%),
    var(--track) 100%);
  outline: none; cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
  box-shadow: 0 3px 10px rgba(249,123,50,.45);
  cursor: grab;
}
.range::-webkit-slider-thumb:active { cursor: grabbing; }
.range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
  box-shadow: 0 3px 10px rgba(249,123,50,.45); cursor: grab;
}
.range::-moz-range-track {
  height: 10px; border-radius: 999px; background: var(--track);
}
.budget-manual {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.budget-manual span { font-size: 13px; color: var(--muted); font-weight: 600; }
.budget-manual input {
  padding: 14px 16px; font-size: 20px; font-weight: 800;
  border: 2px solid var(--line); border-radius: 12px;
  font-family: inherit; text-align: center; background: var(--surface);
  -moz-appearance: textfield;
}
.budget-manual input:focus { outline: none; border-color: var(--accent); }
.budget-manual input::-webkit-outer-spin-button,
.budget-manual input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}

.quick-budgets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.quick {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 18px; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
}
.quick:hover { border-color: var(--accent); }

.counter {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px;
}
.counter span { font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 16px; }
.step-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  font-size: 22px; cursor: pointer; font-weight: 700; font-family: inherit;
  color: var(--text);
}
.step-btn:hover { border-color: var(--accent); }
.stepper b { font-size: 22px; min-width: 24px; text-align: center; }

.allergen-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.field-block { display: flex; flex-direction: column; gap: 10px; }
.field-label {
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
}
.chip {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 11px 20px; cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit;
  color: var(--text);
}
.chip.checked { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 14px; font-weight: 600; }
.field input {
  padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; font-family: inherit; background: var(--card);
}
.field input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.wiz-nav { display: flex; justify-content: space-between; margin-top: 8px; gap: 12px; }
.ghost {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); padding: 14px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.ghost:hover { color: var(--text); border-color: var(--accent); }

/* ---------- результат ---------- */
.result { max-width: 760px; margin: 0 auto; padding: 40px 20px; }
.result-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; margin-bottom: 20px;
}
.result-head { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.day { margin-bottom: 22px; }
.day h3 {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px; font-weight: 800;
}
/* карточка блюда: выглядит как кнопка, а не как строка списка */
.meal {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin: 0 0 10px; padding: 10px 14px 10px 10px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); text-align: left; font: inherit;
  color: var(--text);   /* кнопка не наследует цвет — задаём явно */
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, box-shadow .15s, transform .12s,
              background .15s;
}
.meal:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 6px 18px rgba(249, 123, 50, .16);
  transform: translateY(-1px);
}
.meal:active { transform: translateY(0); box-shadow: none; }
.meal:focus-visible {
  outline: 3px solid var(--accent-soft); outline-offset: 2px;
}
.meal-text {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1; min-width: 0;
}
.meal-top {
  display: flex; align-items: center; gap: 8px;
}
.meal .tag {
  color: var(--muted); font-size: 12px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .03em; font-weight: 700;
}
.meal .price {
  margin-left: auto; font-weight: 800; color: var(--accent-text);
  white-space: nowrap; font-size: 15px;
}
.meal b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.meal-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--accent-text);
}
.meal-arrow {
  display: inline-block; transition: transform .15s;
}
.meal:hover .meal-arrow { transform: translateX(3px); }

/* карточка блюда + сердечко «в любимые» */
.meal-row {
  display: flex; align-items: stretch; gap: 8px; margin-bottom: 10px;
}
.meal-row .meal { margin: 0; flex: 1; min-width: 0; }
.fav-btn {
  flex: 0 0 46px; width: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--muted);
  font-size: 19px; line-height: 1; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .12s;
}
.fav-btn:hover {
  border-color: var(--bad); color: var(--bad); transform: scale(1.04);
}
.fav-btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.fav-btn.on {
  border-color: var(--bad); color: var(--bad);
  background: var(--bad-bg);
}
.fav-btn.on:hover { transform: scale(1.04); }

/* вкладки кабинета */
.cab-tabs {
  display: flex; gap: 6px; margin: 18px 0 14px;
  border-bottom: 1px solid var(--line);
}
.cab-tab {
  background: none; border: none; border-bottom: 3px solid transparent;
  margin-bottom: -1px; padding: 10px 14px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--muted);
  transition: color .15s, border-color .15s;
}
.cab-tab:hover { color: var(--text); }
.cab-tab.on { color: var(--accent-text); border-bottom-color: var(--accent); }
.cab-tab-count {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-text); font-size: 12px; font-weight: 800;
}
.cab-tab-count:empty { display: none; }
.cab-fav-hint { font-size: 13px; margin: 0 0 12px; }

/* любимое блюдо в кабинете */
.cab-favs { display: flex; flex-direction: column; gap: 10px; }
.fav-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); padding: 10px 12px;
}
.fav-photo {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 12px;
  object-fit: cover; background: var(--accent-soft);
}
.fav-info { flex: 1; min-width: 0; }
.fav-name {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--text);
  text-align: left;
}
.fav-name:hover { color: var(--accent-text); }
.fav-name:hover .meal-arrow { transform: translateX(3px); }
.fav-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fav-when { font-size: 11px; color: var(--soft-text); margin-top: 2px; }
.scope-tag {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  background: var(--accent-soft); color: var(--accent-text);
  border-radius: 999px; font-size: 11px; font-weight: 700;
  vertical-align: middle;
}
.shop h3 { font-size: 16px; margin: 0 0 12px; }
.shop li { padding: 5px 0; font-size: 14px; color: var(--muted); }
.shop li b { color: var(--text); }

/* список покупок по отделам магазина */
.shop-body { display: flex; flex-direction: column; gap: 14px; }
.shop-sec {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: var(--surface-3);
}
.shop-sec-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800; color: var(--text);
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.shop-sec-icon { font-size: 17px; line-height: 1; }
.shop-sec-count {
  margin-left: auto; padding: 1px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 11px; font-weight: 700;
}
.shop-sec ul { margin: 0; padding: 0; list-style: none; }
.shop-sec li { padding: 4px 0; }
@media (max-width: 560px) {
  .shop-sec { padding: 10px 12px; }
  .shop-sec-head { font-size: 13px; }
}
.shop-link {
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--accent); font-weight: 600;
}
.shop-link:hover { color: var(--accent-text); }
.shop-link::after { content: " ↗"; font-size: 11px; color: var(--accent-text); }
.g-hint { color: var(--soft-text); font-size: 12px; }
.note-line {
  margin: 10px 0 0; font-size: 13px; color: var(--hint-text);
  background: var(--hint-bg); border-radius: 10px; padding: 10px 14px;
}
.note-line.good { color: var(--good); background: var(--good-bg); }
.summary {
  display: flex; flex-wrap: wrap; gap: 16px;
  padding: 20px; background: var(--hint-bg); border-radius: 14px; margin: 20px 0 0;
}
.summary div { font-size: 13px; flex: 1; min-width: 120px; color: var(--muted); }
.summary b { display: block; font-size: 22px; color: var(--text); letter-spacing: -.02em; }
.badge {
  display: inline-block; background: var(--good-bg-2); color: var(--good);
  padding: 4px 12px; border-radius: 999px; font-size: 13px;
  font-weight: 700; margin-left: 10px; vertical-align: middle;
}
.badge.over { background: var(--bad-bg); color: var(--bad-strong); }
.result-top { text-align: center; margin-bottom: 24px; }
.result-top h1 { font-size: 30px; margin: 12px 0 0; letter-spacing: -.02em; }
.result-top .back { margin-bottom: 8px; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .nav { display: none; }
  .hero h1 { font-size: clamp(32px, 8vw, 44px); }
  .stats { gap: 24px; flex-wrap: wrap; }
  .top-inner { padding: 14px 18px; }
  .nav-account { display: none; }
}
@media (max-width: 560px) {
  .section { padding: 44px 18px; }
  .hero { padding: 32px 18px 16px; }
  .stores-grid { grid-template-columns: 1fr 1fr; }
  .day-card { padding: 18px; }
  .meal-thumb { width: 48px; height: 48px; flex-basis: 48px; font-size: 23px; }
}

/* ================= кабинет ================= */
.nav-account {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  padding: 11px 20px; border-radius: 999px; font-size: 15px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.nav-account:hover { border-color: var(--accent); }

.cabinet { max-width: 720px; margin: 0 auto; padding: 40px 20px 60px; }
.cabinet h1 { font-size: 30px; letter-spacing: -.02em; margin: 16px 0 6px; }
.cabinet .sub { color: var(--muted); margin: 0 0 24px; }
.cabinet .back { margin-bottom: 8px; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab {
  flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); font-family: inherit; font-size: 15px;
  font-weight: 600; cursor: pointer; color: var(--muted);
}
.auth-tab.checked { border-color: var(--accent); color: var(--text);
  background: var(--accent-soft); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .cta { width: 100%; justify-content: center; }
.auth-error { color: var(--error); font-size: 14px; margin: 0; min-height: 18px; }
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--muted); line-height: 1.4;
}
.consent input { margin-top: 2px; flex: 0 0 auto; }
.consent a { color: var(--accent-text); }

/* ---------- юридические страницы ---------- */
.legal .section-inner { max-width: 760px; }
.legal h1 { font-size: clamp(26px, 4vw, 34px); margin: 8px 0 6px; }
.legal h2 {
  font-size: 19px; margin: 30px 0 10px; text-align: left;
  letter-spacing: -.01em;
}
.legal p, .legal li { font-size: 15px; line-height: 1.65; color: var(--muted); }
.legal ul { padding-left: 20px; margin: 10px 0; }
.legal li { margin-bottom: 6px; }
.legal-date { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.legal-back { margin-bottom: 6px; }
.legal-back a, .legal a { color: var(--accent-text); }
.legal-req {
  width: 100%; border-collapse: collapse; font-size: 14px;
  background: var(--card); border-radius: 12px; overflow: hidden;
}
.legal-req th {
  text-align: left; padding: 10px 14px; width: 150px;
  background: var(--surface-sunken); font-weight: 700; color: var(--muted);
  font-size: 13px; border-bottom: 1px solid var(--line);
}
.legal-req td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.legal-req tr:last-child th, .legal-req tr:last-child td { border-bottom: none; }
.legal-foot { margin-top: 24px; color: var(--muted); font-size: 14px; }

.cab-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cab-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px; margin: 8px 0 28px;
}
.cab-sub-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cab-sub-row b { font-size: 16px; }
.cab-sub-row .muted { font-size: 14px; margin: 4px 0 0; }
.cab-h2 { font-size: 20px; margin: 0 0 14px; }
.cab-plans { display: flex; flex-direction: column; gap: 10px; }
.cab-plan {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
}
.cab-plan b { font-size: 15px; }
.cab-plan .muted { font-size: 13px; }
.cab-plan-actions { display: flex; gap: 8px; }
.mini-btn {
  background: var(--accent-soft); border: none; color: var(--accent-text);
  padding: 8px 14px; border-radius: 999px; font-size: 13px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.mini-btn.plain { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.cab-empty { color: var(--muted); font-size: 15px; padding: 16px 0; }

/* ================= окно блюда / оплаты ================= */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: var(--overlay);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.modal-box {
  background: var(--bg); border-radius: 20px; max-width: 620px;
  width: 100%; padding: 24px; position: relative;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.modal-narrow { max-width: 440px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--close-bg); font-size: 22px;
  line-height: 1; cursor: pointer; color: var(--text);
}
.modal-close:hover { background: var(--close-bg-hover); }

.dish-hero {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 16px; display: block; background: var(--accent-soft);
}
.dish-title { font-size: 24px; margin: 16px 0 6px; letter-spacing: -.02em; }
.dish-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.dish-meta span {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted);
}
.dish-h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); margin: 20px 0 10px; font-weight: 800;
}
.dish-items { list-style: none; padding: 0; margin: 0; }
.dish-items li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.dish-items li:last-child { border-bottom: none; }
.dish-items .g { color: var(--muted); white-space: nowrap; }
.dish-steps { counter-reset: st; list-style: none; padding: 0; margin: 0; }
.dish-steps li {
  counter-increment: st; position: relative;
  padding: 0 0 16px 42px; font-size: 15px; line-height: 1.5;
}
.dish-steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-btn); color: var(--on-accent); font-size: 14px;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.dish-foot { margin-top: 20px; display: flex; gap: 10px; }
/* рацион уже сохранён: кнопка становится спокойной и неактивной */
.cta.saved,
.cta.saved:disabled {
  background: var(--good-bg);
  color: var(--good);
  box-shadow: none;
  cursor: default;
  border: 1px solid var(--line);
}
.cta.saved::before { content: "✓ "; font-weight: 900; }

.pay-title { font-size: 22px; margin: 4px 0 8px; }
.pay-price { font-size: 40px; font-weight: 900; letter-spacing: -.03em; margin: 8px 0; }
.pay-price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.pay-list { list-style: none; padding: 0; margin: 18px 0; }
.pay-list li { padding: 7px 0 7px 26px; position: relative; font-size: 15px; }
.pay-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800;
}
.pay-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.pay-lead { font-size: 14px; color: var(--muted); margin: 0 0 4px; }

/* ================= холодильник ================= */
.cab-fridge { margin-top: -12px; }
.fridge-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fridge-chip {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font-size: 14px;
  font-family: inherit; cursor: pointer; color: var(--text);
}
.fridge-chip:hover { border-color: var(--accent); }
.fridge-chip.checked {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-text); font-weight: 700;
}
.fridge-selected {
  font-size: 13px; color: var(--muted); margin: 10px 0 0; min-height: 18px;
}
.fridge-result {
  display: flex; gap: 12px; align-items: center;
  width: 100%; text-align: left; font: inherit;
  color: var(--text);   /* кнопка не наследует цвет — задаём явно */
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; margin-top: 10px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.fridge-result:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(249, 123, 50, .16);
  transform: translateY(-1px);
}
.fridge-result:focus-visible {
  outline: 3px solid var(--accent-soft); outline-offset: 2px;
}
.fridge-result img {
  width: 56px; height: 56px; border-radius: 10px;
  object-fit: cover; flex: 0 0 56px; background: var(--accent-soft);
}
.fridge-result .fr-body { flex: 1; min-width: 0; }
.fridge-result b { display: block; font-size: 15px; }
.fridge-result .fr-meta { font-size: 12px; color: var(--muted); }
.fridge-result .fr-missing {
  font-size: 12px; color: var(--warn); margin-top: 2px;
}
.fridge-result .fr-more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
  font-size: 12px; font-weight: 700; color: var(--accent-text);
}
.fridge-result:hover .meal-arrow { transform: translateX(3px); }
.fridge-result .fr-score {
  font-weight: 800; color: var(--good); font-size: 15px; white-space: nowrap;
}
.fridge-empty {
  text-align: center; color: var(--muted); padding: 28px 10px; font-size: 15px;
}
/* карточка блюда открывается поверх холодильника */
.modal#dish-modal { z-index: 120; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--on-accent); padding: 13px 22px;
  border-radius: 999px; font-size: 15px; z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
