/* «Что приготовить?» — стиль «Свежая кухня».
   Тема: светлая по умолчанию, тёмная — по системе или по выбору (атрибут data-theme на <html>). */

:root {
  color-scheme: light;
  --bg: #F3F5F1;
  --surface: #FFFFFF;
  --surface-2: #EEF1EC;
  --seg: #E6EBE5;
  --seg-on: #FFFFFF;
  --text: #16201A;
  --text-2: #3E4A42;
  --muted: #5B675F;
  --faint: #7A867E;
  --line: #E1E6E0;
  --line-soft: #ECEFEA;
  --border: #DDE3DC;
  --dash: #B9C4BB;
  --accent: #1E6B47;
  --accent-hover: #17573A;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(30, 107, 71, .12);
  --warn: #9A4A06;
  --warn-ring: #C77A2E;
  --warn-soft: #FDF0E1;
  --hot-soft: #FBEFD9;
  --hot-border: #EBC98F;
  --hot-ink: #7A4505;
  --badge: #C2410C;
  --danger: #B3261E;
  --danger-soft: #FCE8E6;
  --danger-ink: #FFFFFF;
  --love-soft: #FBE5E0;
  --love-ink: #8C2F1F;
  --info-soft: #E1ECF5;
  --info-ink: #1D4466;
  --ink-card: #16201A;
  --ink-card-text: #F3F5F1;
  --ink-card-muted: #B9C4BB;
  --tint-basil: #E2EFE7;
  --tint-basil-ink: #1E6B47;
  --tint-saffron: #FBEFD9;
  --tint-saffron-ink: #9A5B07;
  --tint-sky: #E1ECF5;
  --tint-sky-ink: #2B5F8A;
  --tint-tomato: #FBE5E0;
  --tint-tomato-ink: #A83A27;
  --shadow-sm: 0 1px 2px rgba(22, 32, 26, .06);
  --shadow: 0 1px 2px rgba(22, 32, 26, .05), 0 8px 24px rgba(22, 32, 26, .06);
  --shadow-cta: 0 6px 18px rgba(22, 32, 26, .18);
  --shadow-lg: 0 20px 60px rgba(10, 16, 12, .28);
  --scrim: rgba(12, 18, 14, .5);
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --tabbar-h: 0px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1511;
    --surface: #18201B;
    --surface-2: #212B25;
    --seg: #1C2620;
    --seg-on: #2F3C34;
    --text: #EEF2EC;
    --text-2: #C9D2CB;
    --muted: #9EAAA2;
    --faint: #7D8A82;
    --line: #26322A;
    --line-soft: #222C25;
    --border: #2E3A32;
    --dash: #46544A;
    --accent: #6CCB98;
    --accent-hover: #85D7AB;
    --accent-ink: #0F1511;
    --accent-soft: rgba(108, 203, 152, .14);
    --warn: #F0A35E;
    --warn-ring: #D9893E;
    --warn-soft: #2E2214;
    --hot-soft: #33260F;
    --hot-border: #6B4E1F;
    --hot-ink: #F5C27A;
    --badge: #E2622B;
    --danger: #F28B82;
    --danger-soft: #3A1E1C;
  --danger-ink: #1A0C0B;
    --love-soft: #3A1F1A;
    --love-ink: #F4A493;
    --info-soft: #17263A;
    --info-ink: #A9CCEC;
    --ink-card: #22302A;
    --ink-card-text: #EEF2EC;
    --ink-card-muted: #9EAAA2;
    --tint-basil: #1C3326;
    --tint-basil-ink: #7FD3A6;
    --tint-saffron: #3A2C14;
    --tint-saffron-ink: #F2B661;
    --tint-sky: #18293A;
    --tint-sky-ink: #8BBDE8;
    --tint-tomato: #3A1F1A;
    --tint-tomato-ink: #F0937F;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .22);
    --shadow-cta: 0 6px 18px rgba(0, 0, 0, .35);
    --scrim: rgba(0, 0, 0, .6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1511;
  --surface: #18201B;
  --surface-2: #212B25;
  --seg: #1C2620;
  --seg-on: #2F3C34;
  --text: #EEF2EC;
  --text-2: #C9D2CB;
  --muted: #9EAAA2;
  --faint: #7D8A82;
  --line: #26322A;
  --line-soft: #222C25;
  --border: #2E3A32;
  --dash: #46544A;
  --accent: #6CCB98;
  --accent-hover: #85D7AB;
  --accent-ink: #0F1511;
  --accent-soft: rgba(108, 203, 152, .14);
  --warn: #F0A35E;
  --warn-ring: #D9893E;
  --warn-soft: #2E2214;
  --hot-soft: #33260F;
  --hot-border: #6B4E1F;
  --hot-ink: #F5C27A;
  --badge: #E2622B;
  --danger: #F28B82;
  --danger-soft: #3A1E1C;
  --danger-ink: #1A0C0B;
  --love-soft: #3A1F1A;
  --love-ink: #F4A493;
  --info-soft: #17263A;
  --info-ink: #A9CCEC;
  --ink-card: #22302A;
  --ink-card-text: #EEF2EC;
  --ink-card-muted: #9EAAA2;
  --tint-basil: #1C3326;
  --tint-basil-ink: #7FD3A6;
  --tint-saffron: #3A2C14;
  --tint-saffron-ink: #F2B661;
  --tint-sky: #18293A;
  --tint-sky-ink: #8BBDE8;
  --tint-tomato: #3A1F1A;
  --tint-tomato-ink: #F0937F;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-cta: 0 6px 18px rgba(0, 0, 0, .35);
  --scrim: rgba(0, 0, 0, .6);
}

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.22; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.display { font-family: var(--font-display); font-weight: 600; }

/* ---------- шапка и вкладки ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.topbar-inner {
  max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 12px 20px 8px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; flex: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.provider-switch {
  display: flex; background: var(--seg); border-radius: 999px; padding: 3px; gap: 2px;
  min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.provider-switch::-webkit-scrollbar { display: none; }
.provider-switch button {
  border: 0; background: transparent; height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.provider-switch button.on { background: var(--seg-on); color: var(--text); box-shadow: var(--shadow-sm); }
.provider-switch button:disabled { opacity: .45; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; box-shadow: var(--shadow-sm);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.on { color: var(--accent); }
.icon-btn.on svg { fill: currentColor; }
.icon-btn.flat { box-shadow: none; background: transparent; color: var(--muted); }
.icon-btn.flat:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.round { border-radius: 50%; }

.tabs { max-width: 960px; margin: 0 auto; display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1; border: 0; background: none; padding: 8px 6px 10px; display: flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: .92rem; color: var(--muted); border-bottom: 3px solid transparent;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.badge {
  position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--badge); color: #FFFFFF; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}

@media (max-width: 719px) {
  :root { --tabbar-h: calc(70px + env(safe-area-inset-bottom)); }
  .brand-name { display: none; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface);
    border-top: 1px solid var(--line); border-bottom: 0; padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); gap: 0;
  }
  .tabs button { flex-direction: column; gap: 4px; font-size: .7rem; padding: 0; border: 0; color: var(--muted); font-weight: 500; }
  .tabs button.active { color: var(--accent); font-weight: 600; }
  .tab-ico { width: 56px; height: 32px; border-radius: 999px; }
  .tabs button.active .tab-ico { background: var(--accent-soft); }
  .badge { top: -2px; right: 6px; }
  .topbar-inner { padding: 10px 16px 6px; gap: 6px; }
  .container { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .provider-switch button { padding: 0 9px; height: 32px; font-size: .78rem; }
  .topbar .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
}

/* ---------- раскладка ---------- */
.container { max-width: 960px; margin: 0 auto; padding: 8px 20px calc(36px + var(--tabbar-h)); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 12px; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin: 10px 0 18px; }
.page-head > div { flex: 1; min-width: 0; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; line-height: 1.2; }
.page-sub { margin-top: 6px; font-size: .9rem; color: var(--muted); }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 22px 0 12px; }
.banner { background: var(--hot-soft); color: var(--hot-ink); border-radius: 16px; padding: 12px 14px; margin: 8px 0 4px; font-size: .9rem; }
.hint { font-size: .84rem; color: var(--muted); }
.install-banner {
  display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; padding: 12px 8px 12px 14px;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm);
}
.install-text { flex: 1; min-width: 0; }
.install-text b { display: block; font-size: .95rem; }
.install-text small { display: block; font-size: .8rem; color: var(--muted); }
@media (max-width: 380px) { .install-text small { display: none; } }
#moveBanner .install-text small { display: block; }
a.btn { text-decoration: none; }
.install-steps { display: grid; gap: 8px; padding-left: 22px; margin: 0 0 10px; font-size: .95rem; line-height: 1.45; }
.install-steps svg { vertical-align: -3px; }
.install-help { padding-top: 18px; }
.with-icon { display: flex; align-items: center; gap: 6px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.empty {
  text-align: center; color: var(--muted); padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: .95rem; max-width: 420px; margin: 0 auto;
}
.empty-ico {
  width: 64px; height: 64px; border-radius: 20px; background: var(--surface); color: var(--accent);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}

/* ---------- кнопки ---------- */
.btn {
  min-height: 48px; border: 1px solid var(--border); background: var(--surface); border-radius: 14px;
  padding: 0 16px; font-weight: 600; font-size: .95rem; white-space: nowrap; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn.xl { width: 100%; min-height: 58px; border-radius: 18px; font-size: 1.05rem; box-shadow: var(--shadow-cta); }
.btn.small { min-height: 40px; padding: 0 12px; border-radius: 12px; font-size: .88rem; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }

/* ---------- ввод продуктов ---------- */
.hero { padding: 14px 0 0; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.18; letter-spacing: -.01em; }
.hero p { margin-top: 8px; color: var(--muted); font-size: .95rem; max-width: 560px; }

.composer {
  margin-top: 18px; background: var(--surface); border-radius: 22px; padding: 6px; display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow);
}
.composer input { flex: 1; min-width: 0; height: 48px; border: 0; outline: none; background: transparent; padding: 0 12px; font-size: 1rem; }
.composer input::placeholder, .field::placeholder { color: var(--faint); }
.composer-btn {
  width: 48px; height: 48px; border-radius: 16px; border: 0; background: var(--surface-2); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0;
}
.composer-btn:hover { filter: brightness(.97); }
.composer-btn.primary { background: var(--accent); color: var(--accent-ink); }
.composer-btn.listening { background: var(--danger); color: var(--danger-ink); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }

.voice-status {
  margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm);
  font-size: .95rem; display: flex; gap: 10px; align-items: center;
}
.rec-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: rec-blink 1.2s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; height: 38px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); max-width: 100%; font-size: .95rem;
}
.chip-main {
  border: 0; background: none; height: 100%; padding: 0 2px 0 14px; display: inline-flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px 0 0 999px;
}
.chip-x {
  width: 32px; height: 32px; margin-right: 3px; border: 0; background: transparent; border-radius: 50%; color: var(--faint);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.chip-x:hover { color: var(--danger); background: var(--surface-2); }
.chip.hot { background: var(--hot-soft); border-color: var(--hot-border); color: var(--hot-ink); font-weight: 600; }
.chip.hot .chip-x { color: var(--hot-ink); }
.chip.plain .chip-main { padding-right: 14px; }
.chips-meta { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.quick { margin-top: 12px; }
.quick-label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; list-style: none; user-select: none;
  font-size: .88rem; font-weight: 600; color: var(--text-2);
}
.quick-label::-webkit-details-marker { display: none; }
.quick-label:hover { color: var(--accent); }
.quick-chevron { display: inline-flex; transition: transform .2s; }
.quick[open] .quick-chevron { transform: rotate(180deg); }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px; }
.quick-row button {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--dash); background: transparent;
  font-size: .88rem; color: var(--text-2);
}
.quick-row button:hover { border-color: var(--accent); color: var(--accent); }
.pantry-line { margin-top: 14px; font-size: .84rem; color: var(--muted); }

/* ---------- параметры ---------- */
.params { margin-top: 22px; padding: 6px 16px 10px; }
.param-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--line-soft); }
.param-title { display: block; font-size: .92rem; font-weight: 600; }
.param-row .param-title { font-size: 1rem; }
.param-sub { font-size: .82rem; color: var(--muted); }
.param-block { display: block; padding-top: 14px; }
.param-block .param-title { margin-bottom: 8px; }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 3px; flex: none; }
.stepper button {
  width: 40px; height: 40px; border: 0; border-radius: 11px; background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.stepper button:hover { color: var(--accent); }
.stepper output { min-width: 32px; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.stepper.wide output { min-width: 84px; font-family: var(--font); font-size: .9rem; }
.stepper.on-surface { background: var(--surface); }
.stepper.on-surface button { background: var(--surface-2); }

.seg { display: flex; background: var(--seg); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1 1 0; min-width: 0; height: 40px; border: 0; border-radius: 10px; background: transparent; padding: 0 6px;
  font-size: .88rem; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button.on { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(22, 32, 26, .08), 0 2px 8px rgba(22, 32, 26, .06); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button {
  height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: .9rem; color: var(--text-2);
}
.pills button:hover { border-color: var(--accent); }
.pills button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.field {
  width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  padding: 0 14px; font-size: .95rem; outline: none;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.more { margin-top: 14px; border-top: 1px solid var(--line-soft); }
.more summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0;
}
.more summary::-webkit-details-marker { display: none; }
.more-text { flex: 1; min-width: 0; }
.more-title { display: block; font-size: .95rem; font-weight: 600; }
.more-sub { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.more-chev { color: var(--muted); transition: transform .2s; display: inline-flex; }
.more[open] .more-chev { transform: rotate(180deg); }
.more[open] { padding-bottom: 8px; }

.tastes-line { margin: 14px 2px 0; display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--text-2); }
.tastes-line b { color: var(--text); }
.love-ico {
  width: 32px; height: 32px; border-radius: 10px; background: var(--love-soft); color: var(--love-ink);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
#findBtn { margin-top: 20px; }

/* ---------- миниатюры блюд ---------- */
.thumb { border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 60px; height: 60px; }
.thumb.sm { width: 44px; height: 44px; border-radius: 13px; }
.thumb.md { width: 56px; height: 56px; border-radius: 17px; }
.thumb.xl { width: 84px; height: 84px; border-radius: 26px; background: var(--surface) !important; box-shadow: var(--shadow); }
.tint-basil { background: var(--tint-basil); color: var(--tint-basil-ink); }
.tint-saffron { background: var(--tint-saffron); color: var(--tint-saffron-ink); }
.tint-sky { background: var(--tint-sky); color: var(--tint-sky-ink); }
.tint-tomato { background: var(--tint-tomato); color: var(--tint-tomato-ink); }
.tint-neutral { background: var(--surface-2); color: var(--muted); }

/* ---------- результаты ---------- */
.results { margin-top: 30px; scroll-margin-top: 120px; }
.results-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.results-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; line-height: 1.2; flex: 1 1 220px; }
.results-from { margin: 8px 0 18px; font-size: .9rem; color: var(--muted); }
.sort-select {
  height: 44px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: var(--shadow-sm);
  padding: 0 12px; font-size: .88rem; font-weight: 600; color: var(--text); max-width: 100%;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 14px; }

.rcard {
  background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 16px;
  display: flex; flex-direction: column; gap: 14px; cursor: pointer; border: 1px solid transparent;
  transition: border-color .15s; animation: appear .35s ease-out both;
}
.rcard:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rcard-top { display: flex; gap: 14px; align-items: flex-start; }
.rcard-title { flex: 1; min-width: 0; }
.rcard-title h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.25; }
.rcard-title p { margin-top: 4px; font-size: .9rem; color: var(--muted); line-height: 1.4; }
.save-btn { margin: -6px -6px 0 0; }
.save-btn.on { color: var(--accent); }
.save-btn.on svg { fill: currentColor; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; margin-bottom: 6px; white-space: nowrap;
}
.tag.liked { background: var(--accent-soft); color: var(--accent); }
.tag.disliked { background: var(--surface-2); color: var(--muted); }
.tag.leftover { background: var(--surface-2); color: var(--text-2); margin: 0; }
.tag.batch { background: var(--hot-soft); color: var(--hot-ink); margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--text-2); }
.meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.have-row { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--text-2); flex-wrap: wrap; }
.dots { display: flex; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.dot.miss { background: transparent; border: 2px solid var(--warn-ring); }
.bar { width: 80px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.miss-text { color: var(--warn); display: inline-flex; align-items: center; gap: 5px; margin-left: auto; min-width: 0; }
.miss-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.allhave { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.rcard-actions { display: flex; gap: 8px; margin-top: auto; }
.rcard-actions .btn.primary { flex: 1; }

.skeleton { cursor: default; animation: none; gap: 12px; box-shadow: var(--shadow-sm); }
.sk { background: var(--surface-2); border-radius: 8px; }
.writing { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.writing-dots { display: flex; gap: 4px; }
.writing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.writing-dots i:nth-child(2) { animation-delay: .2s; }
.writing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.more-tile {
  min-height: 140px; border-radius: 22px; border: 2px dashed var(--accent); background: transparent; color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center;
}
.more-tile:hover { background: var(--accent-soft); }
.more-plus { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.more-tile b { font-size: 1rem; }
.more-tile small { color: var(--muted); font-size: .82rem; }
.results-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.results-actions .btn { flex: 1; }
.loading-msg { text-align: center; color: var(--muted); margin-top: 14px; font-size: .92rem; }

/* ---------- окно рецепта ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.backdrop { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: relative; background: var(--bg); width: min(720px, 100%); max-height: min(92vh, 100%);
  border-radius: 28px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); animation: rise .25s ease-out;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet.tall { height: min(92vh, 860px); }
@media (max-width: 719px) {
  .modal { align-items: flex-end; }
  .sheet { max-height: 95vh; border-radius: 28px 28px 0 0; }
  .sheet.tall { height: 95vh; }
}
.sheet-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.sheet-pad { padding: 0 20px 20px; }

.rhero { background: var(--tint-basil); padding: 16px 20px 24px; border-radius: 0 0 32px 32px; }
.rhero.tint-saffron { background: var(--tint-saffron); }
.rhero.tint-sky { background: var(--tint-sky); }
.rhero.tint-tomato { background: var(--tint-tomato); }
.rhero-bar { display: flex; align-items: center; gap: 8px; }
.rhero-bar .icon-btn { border-radius: 50%; box-shadow: none; }
.rhero .thumb.xl { margin-top: 16px; }
.rhero h2 { margin-top: 16px; font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; color: var(--text); }
.rhero .lead { margin-top: 8px; font-size: .95rem; color: var(--text-2); line-height: 1.45; }
.rhero .meta { margin-top: 14px; gap: 8px; }
.rhero .meta span { height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface); font-size: .88rem; color: var(--text); }

.sheet-tabs { display: flex; background: var(--seg); border-radius: 16px; padding: 4px; gap: 4px; margin: 18px 20px 0; }
.sheet-tabs button {
  flex: 1; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .95rem; font-weight: 500;
}
.sheet-tabs button.on { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

.chat-head { background: var(--surface); padding: 14px 20px; border-bottom: 1px solid var(--line); }
.chat-head-row { display: flex; align-items: center; gap: 12px; }
.chat-head-row .icon-btn { background: var(--surface-2); box-shadow: none; }
.chat-head .sheet-tabs { margin: 12px 0 0; }
.chat-title { flex: 1; min-width: 0; }
.chat-title b { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title span { font-size: .82rem; color: var(--muted); }

.notice { background: var(--hot-soft); color: var(--hot-ink); border-radius: 16px; padding: 12px 14px; margin: 16px 20px 0; font-size: .9rem; }
.notice .link { color: inherit; }
.nutrition { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.nutrition div { background: var(--surface); border-radius: 16px; padding: 12px 6px; text-align: center; }
.nutrition b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.nutrition span { font-size: .75rem; color: var(--muted); }
.nutrition-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 10px; }
.sec-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }

.ing-list { list-style: none; margin: 0; padding: 4px 16px; background: var(--surface); border-radius: 22px; }
.ing-list li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.ing-list li:last-child { border-bottom: 0; }
.ing-list li.miss { align-items: flex-start; }
.ing-mark { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.have .ing-mark { background: var(--accent); color: var(--accent-ink); }
.miss .ing-mark { border: 2px solid var(--warn-ring); color: var(--warn); margin-top: 2px; }
.opt .ing-mark { background: transparent; border: 2px dashed var(--dash); color: transparent; }
.ing-name { flex: 1; min-width: 0; font-size: 1rem; }
.ing-name em { font-style: normal; font-size: .82rem; color: var(--muted); margin-left: 4px; }
.subst { display: block; font-size: .82rem; color: var(--muted); margin-top: 3px; }
.ing-qty { font-size: .95rem; color: var(--muted); white-space: nowrap; text-align: right; }
.ing-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.to-cart {
  height: 32px; padding: 0 10px; border-radius: 10px; border: 0; background: var(--warn-soft); color: var(--warn);
  font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.to-cart.done { opacity: .55; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 14px; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: .88rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.steps p { margin-top: 4px; font-size: 1rem; line-height: 1.5; }
.timer-btn {
  margin-top: 10px; height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--accent-soft); color: var(--accent);
  font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
}
.timer-btn:hover { background: var(--accent); color: var(--accent-ink); }
.steps + .tip-card { margin-top: 22px; }
.tip-card svg { margin-top: 1px; }
.tip-card { margin-top: 12px; background: var(--info-soft); color: var(--info-ink); border-radius: 20px; padding: 14px 16px; display: flex; gap: 12px; }
.tip-card b { display: block; font-size: .95rem; }
.tip-card p, .tip-card li { margin-top: 4px; font-size: .95rem; line-height: 1.45; }
.tip-card ul { margin: 0; padding-left: 18px; }
.tip-card.plain { background: var(--surface); color: var(--text); }
.loading-box, .error-box { background: var(--surface); border-radius: 18px; padding: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.error-box { color: var(--danger); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.rate-box { margin-top: 16px; background: var(--surface); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rate-box > b { font-size: 1rem; }
.rate-btns { display: flex; gap: 8px; }
.rate-btns .btn { flex: 1; }
.btn.good { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.btn.bad { border: 2px solid var(--warn-ring); background: var(--warn-soft); color: var(--warn); }
.rate-note-label { font-size: .82rem; color: var(--muted); }
.thumb-down svg { transform: rotate(180deg); }

.sheet-actions {
  display: flex; gap: 10px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.sheet-actions .btn { min-height: 54px; border-radius: 16px; }
.sheet-actions .btn.primary { flex: 1; }

/* чат с шефом */
.chat-body { display: flex; flex-direction: column; padding: 18px 20px 8px; background: var(--bg); }
.chat-log { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.msg { max-width: 88%; padding: 12px 14px; font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 20px 20px 6px 20px; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: var(--surface); border-radius: 20px 20px 20px 6px; box-shadow: var(--shadow-sm); max-width: 92%; }
.msg-text { white-space: pre-wrap; }
.msg.error { align-self: center; background: var(--danger-soft); color: var(--danger); border-radius: 14px; font-size: .88rem; }
.msg.typing { display: flex; gap: 5px; padding: 14px 16px; }
.msg.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; }
.msg.typing i:nth-child(3) { animation-delay: .4s; }
.upd-card {
  margin-top: 12px; border-radius: 16px; background: var(--accent-soft); border: 1px dashed var(--accent); padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.upd-card b { display: block; font-size: .95rem; }
.upd-card small { display: block; font-size: .8rem; color: var(--text-2); margin-top: 2px; }
.upd-card .ok { color: var(--accent); font-weight: 600; font-size: .9rem; }
.remember {
  margin-top: 10px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 0; background: var(--love-soft); color: var(--love-ink);
  font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
}
div.remember { background: transparent; padding: 0; min-height: 0; }
.chat-suggest { display: flex; gap: 8px; overflow-x: auto; padding: 6px 20px 12px; scrollbar-width: none; background: var(--bg); }
.chat-suggest::-webkit-scrollbar { display: none; }
.chat-suggest button { flex: none; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .88rem; }
.chat-suggest button:hover { border-color: var(--accent); color: var(--accent); }
.chat-form {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.chat-form input { flex: 1; min-width: 0; height: 48px; border-radius: 24px; border: 0; background: var(--surface-2); padding: 0 18px; font-size: 1rem; outline: none; }
.chat-form input:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.chat-form .composer-btn { border-radius: 50%; }

/* ---------- меню на неделю ---------- */
.menu-form .btn.xl { margin-top: 18px; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.check.inline { padding: 0; font-weight: 600; color: var(--muted); font-size: .88rem; }
.day-strip { display: flex; gap: 6px; margin-bottom: 4px; }
.day-strip button {
  flex: 1 1 0; min-width: 0; height: 64px; border-radius: 16px; border: 0; background: var(--surface); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: var(--shadow-sm);
}
.day-strip small { font-size: .75rem; color: var(--muted); }
.day-strip b { font-size: 1.05rem; font-weight: 600; }
.day-strip button.on { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-cta); }
.day-strip button.on small { color: inherit; opacity: .85; }
.day-strip button.pending { background: var(--surface-2); box-shadow: none; color: var(--faint); }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; }
.day-head h2 { font-size: 1.15rem; font-weight: 600; }
.meals { display: flex; flex-direction: column; gap: 10px; }
.meal-card {
  background: var(--surface); border-radius: 22px; padding: 14px 8px 14px 14px; display: flex; gap: 12px; align-items: center;
  cursor: pointer; box-shadow: var(--shadow-sm); border: 1px solid transparent; animation: appear .3s ease-out both;
}
.meal-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.meal-main { flex: 1; min-width: 0; }
.meal-label-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meal-label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.meal-open {
  display: block; border: 0; background: none; padding: 0; margin-top: 2px; text-align: left; color: inherit;
  font-size: 1rem; font-weight: 600; line-height: 1.3;
}
.rated-mini { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--accent); }
.rated-mini.bad { color: var(--muted); }
.rated-mini.bad svg { transform: rotate(180deg); }
.meal-main small { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.meal-main small.miss { color: var(--warn); }
.meal-card.leftover .thumb { background: var(--surface-2); color: var(--muted); }
.menu-shop {
  margin-top: 20px; background: var(--ink-card); color: var(--ink-card-text); border-radius: 24px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.menu-shop-head { display: flex; align-items: center; gap: 12px; }
.menu-shop-ico { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; flex: none; }
.menu-shop b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.menu-shop small { display: block; font-size: .82rem; color: var(--ink-card-muted); margin-top: 2px; }
.menu-shop .btn { background: #FFFFFF; color: #16201A; border-color: #FFFFFF; }
.allhave-box { margin-top: 20px; background: var(--accent-soft); color: var(--accent); border-radius: 18px; padding: 14px 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; }

/* ---------- покупки ---------- */
.progress-head { display: flex; justify-content: space-between; font-size: .9rem; color: var(--text-2); margin-bottom: 8px; }
.progress-head b { color: var(--text); }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .3s; }
#shopForm { margin-top: 16px; }
.shop-group { margin-top: 20px; }
.group-title { margin: 0 0 8px 4px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.group-card { background: var(--surface); border-radius: 20px; padding: 0 6px 0 14px; box-shadow: var(--shadow-sm); }
.shop-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.shop-item:last-child { border-bottom: 0; }
.shop-item input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.si-main { flex: 1; min-width: 0; }
.si-name { display: block; font-size: 1rem; }
.si-src { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-qty { font-size: .95rem; color: var(--text-2); white-space: nowrap; }
.si-del { width: 36px; height: 36px; border: 0; background: transparent; color: var(--faint); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.si-del:hover { color: var(--danger); background: var(--surface-2); }
.shop-item.checked .si-name { text-decoration: line-through; color: var(--muted); }
.bought-toggle {
  margin-top: 18px; width: 100%; min-height: 52px; border-radius: 16px; border: 0; background: var(--seg); display: flex; align-items: center;
  gap: 10px; padding: 0 16px; font-size: .92rem; color: var(--text-2); text-align: left;
}
.bought-toggle span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bought-toggle .chev { transition: transform .2s; display: inline-flex; }
.bought-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.shop-tools { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.shop-tools-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: .9rem; }
.shop-tools-row .link { font-weight: 500; }
.shop-tools-row .link.danger { color: var(--danger); }

/* ---------- любимое и история ---------- */
.rate-list { margin-top: 16px; }
.rate-list h3 { font-size: .95rem; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.rate-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.rate-item:last-child { border-bottom: 0; }
.ri-main { flex: 1; min-width: 0; }
.ri-main b { display: block; font-weight: 600; font-size: .95rem; }
.ri-main small { display: block; color: var(--muted); font-size: .82rem; }
#tasteForm { display: flex; gap: 8px; margin-top: 12px; }
#tasteForm .field { flex: 1; min-width: 0; }
#tasteNotes { margin-top: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }

.hist { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 12px; }
.hist-head { display: flex; align-items: center; gap: 10px; }
.hist-head b { flex: 1; font-size: 1rem; }
.hist-products { margin-top: 10px; font-size: .92rem; display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); }
.hist-titles { margin-top: 6px; font-size: .88rem; color: var(--muted); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- настройки ---------- */
.settings-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.settings-head h2 { flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.settings-head .icon-btn { background: var(--surface-2); box-shadow: none; }
.settings section { margin-top: 22px; }
.settings .seg button { height: 44px; }
.settings .chips { margin-top: 12px; }
.settings h3 { font-size: 1rem; font-weight: 600; margin-bottom: 10px; }
.prov { background: var(--surface); border-radius: 18px; padding: 14px; margin-bottom: 10px; }
.prov-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.prov-row { display: flex; gap: 8px; }
.prov-row .field { flex: 1; min-width: 0; }
.ok { color: var(--accent); font-weight: 600; font-size: .88rem; }
.bad { color: var(--danger); font-weight: 600; font-size: .88rem; }

/* ---------- режим готовки (всегда тёмный) ---------- */
.cookmode {
  position: fixed; inset: 0; z-index: 60; background: #0F1511; color: #EEF2EC; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); color-scheme: dark;
  --cm-accent: #6CCB98; --cm-card: #1A231D; --cm-btn: #1C2620; --cm-track: #26322A; --cm-muted: #9EAAA2;
}
.cm-inner { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; min-height: 0; }
.cm-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px 0; }
.cm-head .cm-title { flex: 1; min-width: 0; font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-btn { height: 44px; min-width: 44px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--cm-btn); color: #EEF2EC; font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cm-btn.icon { padding: 0; }
.cm-progress { display: flex; gap: 6px; padding: 18px 20px 0; }
.cm-progress i { flex: 1; height: 5px; border-radius: 3px; background: var(--cm-track); }
.cm-progress i.done { background: var(--cm-accent); }
.cm-body { flex: 1; overflow-y: auto; padding: 30px 24px 10px; }
.cm-num { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cm-accent); }
.cm-text { margin-top: 14px; font-size: clamp(1.45rem, 4.6vw, 1.9rem); line-height: 1.38; font-weight: 500; }
.cm-ing { list-style: none; margin: 0 0 24px; padding: 4px 16px; background: var(--cm-card); border-radius: 20px; }
.cm-ing li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cm-track); font-size: .95rem; }
.cm-ing li:last-child { border-bottom: 0; }
.cm-ing span:last-child { color: var(--cm-muted); white-space: nowrap; }
.cm-timer { margin-top: 28px; background: var(--cm-card); border-radius: 26px; padding: 20px; }
.cm-timer-row { display: flex; align-items: center; gap: 14px; }
.cm-digits { flex: 1; }
.cm-digits b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cm-digits small { display: block; font-size: .88rem; color: var(--cm-muted); margin-top: 8px; }
.cm-round { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--cm-track); color: #EEF2EC; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.cm-round.primary { background: var(--cm-accent); color: #0F1511; }
.cm-track { margin-top: 18px; height: 6px; border-radius: 3px; background: var(--cm-track); overflow: hidden; }
.cm-track i { display: block; height: 100%; background: var(--cm-accent); border-radius: 3px; transition: width 1s linear; }
.cm-timer.done { outline: 2px solid var(--cm-accent); }
.cm-start { margin-top: 28px; width: 100%; min-height: 60px; border-radius: 20px; border: 0; background: var(--cm-card); color: var(--cm-accent); font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; }
.cm-next { margin-top: 22px; font-size: .95rem; line-height: 1.5; color: var(--cm-muted); }
.cm-next b { color: #EEF2EC; }
.cm-foot { padding: 10px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.cm-awake { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .82rem; color: var(--cm-muted); }
.cm-nav { display: flex; gap: 10px; }
.cm-nav button { flex: 1; height: 62px; border-radius: 20px; border: 0; background: var(--cm-btn); color: #EEF2EC; font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cm-nav button.go { flex: 1.6; background: var(--cm-accent); color: #0F1511; font-weight: 700; }
.cm-nav button:disabled { opacity: .4; }

/* ---------- таймеры и уведомления ---------- */
.timers {
  position: fixed; right: 16px; bottom: calc(16px + var(--tabbar-h)); z-index: 70;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none;
}
.cooking .timers { bottom: calc(150px + env(safe-area-inset-bottom)); }
.timer {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--ink-card); color: var(--ink-card-text);
  border-radius: 999px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
}
.timer b { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.t-label { font-size: .82rem; opacity: .8; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer button { width: 32px; height: 32px; border: 0; background: rgba(255, 255, 255, .14); color: inherit; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.timer.paused b { opacity: .6; }
.timer.done { background: var(--badge); color: #FFFFFF; animation: pulse 1s infinite; }

.toasts {
  position: fixed; left: 50%; transform: translateX(-50%); top: 120px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none;
}
.toast {
  background: var(--ink-card); color: var(--ink-card-text); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  font-size: .92rem; animation: rise .2s ease-out; transition: opacity .3s, transform .3s;
}
.toast.error { background: var(--danger); color: var(--danger-ink); }
.toast.out { opacity: 0; transform: translateY(-8px); }
@media (max-width: 719px) {
  .toasts { top: calc(70px + env(safe-area-inset-top)); }
}

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