/* KSU_YAS Balance — мобільна версія першою, далі планшет і десктоп */
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-cyr.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-lat.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Script"; src: url("/assets/fonts/dancing-lat.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --bg: #f7f6f0;
  --surface: #ffffff;
  --text: #1c2418;
  --muted: #5b6455;
  --faint: #8b9385;
  --green-900: #1f4d12;
  --green-700: #2f6b1a;
  --green: #3f7f22;
  --green-400: #6ea83f;
  --green-100: #e3f0d6;
  --green-50: #f0f7e9;
  --peach-50: #fdf2e5;
  --peach: #e9a35a;
  --pink-50: #fcecec;
  --pink: #d46a6a;
  --blue-50: #e8f1fb;
  --sand: #efeee6;
  --shadow: 0 1px 2px rgba(31, 45, 20, .05), 0 10px 28px -14px rgba(31, 45, 20, .22);
  --shadow-lg: 0 2px 6px rgba(31, 45, 20, .06), 0 22px 48px -20px rgba(31, 45, 20, .32);
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 12px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; padding-bottom: calc(var(--tabbar) + var(--safe-b)); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--green-700); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--green-700); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid rgba(63, 127, 34, .45); outline-offset: 2px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(247, 246, 240, .88); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); min-width: 0; }
.logo-leaf { width: 38px; height: 38px; stroke: none; }
.logo-leaf path[stroke] { stroke: #fff; }
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-name { font-weight: 800; font-size: 19px; letter-spacing: -.02em; line-height: 1.05; display: flex; align-items: center; white-space: nowrap; }
.logo-name em { font-family: "Script", cursive; font-style: normal; font-weight: 600; color: var(--green); font-size: 1.3em; margin-left: 5px; letter-spacing: 0; }
.logo-heart { width: 15px; height: 15px; color: var(--green); margin-left: 2px; }
.logo-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); color: var(--text); position: relative; }
.icon-btn svg { width: 20px; height: 20px; }
.saved-btn { margin-left: auto; }
.saved-btn.has svg { fill: var(--pink); stroke: var(--pink); }
.badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { color: #fff; background: linear-gradient(180deg, #5a9a2f 0%, #2f6b1a 100%); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 22px -10px rgba(47, 107, 26, .7); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 26px -10px rgba(47, 107, 26, .75); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn-soft { background: var(--surface); color: var(--green-900); box-shadow: var(--shadow); }
.btn-ghost { background: var(--sand); color: var(--text); min-height: 46px; padding: 0 16px; font-size: 14.5px; }
.btn-ghost svg { width: 18px; height: 18px; }
.btn-ghost.on { background: var(--pink-50); color: #b43f3f; }
.btn-ghost.on svg { fill: currentColor; }
.btn-wide { width: 100%; }
.link-btn { border: 0; background: none; color: var(--green-700); font-weight: 700; padding: 10px 2px; font-size: 14.5px; }

/* Герой */
.hero { position: relative; display: grid; gap: 18px; padding: 8px 16px 0; }
.hero-img { order: -1; margin: 0 -16px; overflow: hidden; aspect-ratio: 16 / 10; mask-image: linear-gradient(180deg, #000 72%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; transform: scale(1.35); transform-origin: 78% 50%; }
.hero h1 { font-size: clamp(30px, 8.6vw, 54px); margin-top: -36px; position: relative; }
.accent { color: var(--green); }
.lead { margin-top: 12px; font-size: 17px; color: #39422f; max-width: 34em; }
.hero-cta { display: grid; gap: 10px; margin-top: 20px; }
.features { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.features li { display: flex; align-items: center; gap: 12px; }
.features b { display: block; font-size: 15px; }
.features small { display: block; color: var(--muted); font-size: 13px; }
.feat-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); }
.feat-ic svg { width: 22px; height: 22px; }

/* Швидкі картки */
.quick { display: grid; gap: 12px; padding: 26px 16px 8px; }
.quick-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.q-green { background: linear-gradient(135deg, #f3f9ec, #e4f0d7); }
.q-peach { background: linear-gradient(135deg, #fff6ea, #fbe8d2); }
.q-pink { background: linear-gradient(135deg, #fdf0f0, #f9dfdf); }
.q-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.75); color: var(--green-900); flex: none; }
.q-ic svg { width: 26px; height: 26px; }
.q-text { flex: 1; min-width: 0; }
.q-text b { display: block; font-size: 17px; line-height: 1.25; }
.q-text small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-top: 3px; }
.q-arrow { width: 20px; height: 20px; color: var(--green-900); }

/* Картки і секції */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 16px; }
.card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.card-head h2, .card-head h3 { font-size: 22px; }
.card-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.head-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--green-50); color: var(--green-900); display: grid; place-items: center; flex: none; }
.head-ic svg { width: 26px; height: 26px; }
.head-pink { background: var(--pink-50); color: #9c3b3b; }
.section-head { padding: 0 4px 14px; }
.section-head h2 { font-size: 28px; }
.section-head p { color: var(--muted); margin-top: 6px; font-size: 15px; max-width: 46em; }
.builder, .plans, .recipes { padding: 30px 16px 0; }
.builder { display: grid; gap: 16px; }

/* Кроки конструктора */
.step { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; }
.step legend { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; padding: 0; margin-bottom: 10px; }
.num { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13.5px; display: grid; place-items: center; flex: none; }
.hint { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.seg { display: grid; gap: 8px; }
.seg-kcal { grid-template-columns: repeat(3, 1fr); }
.seg-meal { grid-template-columns: repeat(2, 1fr); }
.seg-2 { grid-template-columns: 1fr 1fr; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.opt-btn, .seg label span { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; padding: 8px 6px; border-radius: var(--r); background: var(--surface); box-shadow: 0 0 0 1px #e7e8df inset, 0 1px 2px rgba(31,45,20,.05); border: 0; text-align: center; transition: background .15s, box-shadow .15s; }
.opt-btn b { font-size: 18px; font-weight: 800; line-height: 1.1; }
.opt-btn small { font-size: 12.5px; color: var(--muted); }
.opt-btn .meal-ic { font-size: 22px; line-height: 1; margin-bottom: 3px; }
.opt-btn[aria-checked="true"], .seg input:checked + span { background: var(--green-50); box-shadow: 0 0 0 2px var(--green-400) inset; }
.opt-btn[aria-checked="true"]::after { content: ""; position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; box-shadow: 0 0 0 2px #fff; }
.seg label { display: block; }
.seg label span { height: 100%; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { min-height: 46px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.seg input:focus-visible + span { outline: 3px solid rgba(63,127,34,.45); outline-offset: 2px; }
.day-toggle { margin-top: 8px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); border: 0; background: var(--sand); text-align: left; font-size: 14.5px; color: var(--text); }
.day-toggle svg { width: 22px; height: 22px; color: var(--green-700); }
.day-toggle[aria-pressed="true"] { background: var(--green-50); box-shadow: 0 0 0 2px var(--green-400) inset; }
.meals-off .opt-btn { opacity: .45; }

/* Продукти */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px 0 10px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: 0 0 0 1px #e7e8df inset; font-size: 14.5px; font-weight: 600; transition: background .15s, box-shadow .15s; }
.chip .em { font-size: 19px; line-height: 1; }
.chip[aria-pressed="true"] { background: var(--green-50); box-shadow: 0 0 0 2px var(--green-400) inset; color: var(--green-900); }
.chip[aria-pressed="true"]::before { content: "✓"; font-weight: 800; color: var(--green); margin-right: -2px; }
.chip.unknown { background: var(--peach-50); box-shadow: 0 0 0 1px #f1d9bb inset; }
.add-product { position: relative; margin-top: 4px; }
.add-product input { width: 100%; height: 50px; border-radius: var(--r); border: 0; background: var(--sand); padding: 0 56px 0 16px; font-size: 16px; }
.add-product input:focus { outline: none; box-shadow: 0 0 0 2px var(--green-400) inset; background: #fff; }
.add-product .icon-btn { position: absolute; right: 4px; top: 3px; width: 44px; height: 44px; box-shadow: none; background: transparent; color: var(--green-700); }
#generate { margin-top: 22px; min-height: 56px; font-size: 17px; }
#generate svg { color: #ffe08a; stroke: none; fill: currentColor; width: 22px; height: 22px; }

/* Результат */
.result { scroll-margin-top: 76px; }
.result:focus { outline: none; }
.result-empty { display: grid; place-items: center; text-align: center; gap: 10px; min-height: 240px; color: var(--muted); padding: 10px; }
.result-empty .big { font-size: 46px; }
.result-top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: var(--sand); }
.pill-green { background: var(--green-50); color: var(--green-900); }
.pill-peach { background: var(--peach-50); color: #8a531d; }
.r-title { font-size: 24px; margin-bottom: 14px; }
.r-main { display: grid; gap: 12px; }
.r-photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); }
.r-photo img { width: 100%; height: 100%; object-fit: cover; }
.r-facts { display: grid; gap: 10px; }
.kcal-box { background: var(--green-50); border-radius: var(--r); padding: 14px; }
.kcal-box .k { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.macros { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.macro { padding: 5px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.m-p { background: #dcefd0; color: #2a5c17; }
.m-f { background: #fdeccd; color: #8a5a10; }
.m-c { background: var(--blue-50); color: #2d5a8c; }
.r-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.r-meta span { display: inline-flex; align-items: center; gap: 6px; }
.r-meta b { color: var(--text); }
.r-meta svg { width: 17px; height: 17px; }
.have { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; }
.have .tag { padding: 4px 10px; border-radius: 999px; background: var(--green-50); color: var(--green-900); font-weight: 600; }
.have .tag.buy { background: var(--peach-50); color: #8a531d; }
.r-cols { display: grid; gap: 18px; margin-top: 18px; }
.r-cols h4 { margin: 0 0 8px; font-size: 17px; }
.ing { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 15px; }
.ing li { display: flex; gap: 8px; align-items: baseline; }
.ing li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-400); flex: none; transform: translateY(-2px); }
.ing .g { font-weight: 700; white-space: nowrap; }
.ing .note { color: var(--faint); font-size: 13px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; font-size: 15px; }
.steps li { display: flex; gap: 10px; counter-increment: s; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; flex: none; margin-top: 1px; }
.r-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.r-actions .btn-primary { grid-column: 1 / -1; }
.r-note { margin-top: 12px; padding: 10px 12px; background: var(--peach-50); border-radius: var(--r-sm); font-size: 14px; color: #6d4417; }

/* Цілий день */
.day-list { display: grid; gap: 10px; }
.day-item { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r); background: var(--bg); border: 0; text-align: left; width: 100%; color: var(--text); }
.day-item img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; }
.day-item small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.day-item b { display: block; font-size: 15px; line-height: 1.25; }
.day-item .dk { font-weight: 800; font-size: 15px; white-space: nowrap; padding-right: 6px; }
.day-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding: 14px; border-radius: var(--r); background: var(--green-50); }
.day-total .k { font-size: 22px; font-weight: 800; }

/* Калькулятор */
.calc { margin-bottom: 18px; }
.calc-form { display: grid; gap: 12px; margin-top: 10px; }
.calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.field { display: grid; gap: 5px; position: relative; }
.field > span { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.field input, .field select { width: 100%; height: 50px; border: 0; border-radius: var(--r-sm); background: var(--sand); padding: 0 14px; font-size: 16px; min-width: 0; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6455' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; text-overflow: ellipsis; }
.field input:focus, .field select:focus { outline: none; box-shadow: 0 0 0 2px var(--green-400) inset; background-color: #fff; }
.field i { position: absolute; right: 10px; bottom: 15px; font-style: normal; font-size: 13px; color: var(--faint); pointer-events: none; }
.calc-grid .field input { padding-right: 40px; }
.field .opt { position: static; font-size: 12.5px; }
.field input.bad { box-shadow: 0 0 0 2px var(--pink) inset; }
.calc-result { margin-top: 16px; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, #f3f9ec, #e4f0d7); }
.calc-result .k { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.calc-result p { margin-top: 6px; font-size: 15px; }
.calc-result .btns { display: grid; gap: 8px; margin-top: 14px; }
.calc-result .small { font-size: 13px; color: var(--muted); }

/* Плани */
.plan-grid { display: grid; gap: 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-radius: var(--r-lg); padding: 18px 16px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.plan.reco { box-shadow: 0 0 0 2px var(--green-400), var(--shadow-lg); }
.plan .ribbon { position: absolute; top: 14px; right: 14px; }
.plan-k { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.plan-k small { font-size: 16px; color: var(--muted); font-weight: 700; margin-left: 4px; letter-spacing: 0; }
.plan h3 { font-size: 18px; }
.plan .for { color: var(--muted); font-size: 14.5px; }
.plan details { background: var(--bg); border-radius: var(--r-sm); padding: 0 12px; }
.plan summary { cursor: pointer; padding: 11px 0; font-weight: 700; font-size: 14.5px; color: var(--green-900); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.plan summary::-webkit-details-marker { display: none; }
.plan summary::after { content: "+"; font-size: 20px; font-weight: 600; }
.plan details[open] summary::after { content: "−"; }
.sample { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.sample li { display: flex; justify-content: space-between; gap: 10px; }
.sample li span:first-child small { display: block; color: var(--faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sample li span:last-child { font-weight: 700; white-space: nowrap; }
.plan-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 4px; }
.price { font-size: 22px; font-weight: 800; }
.price small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.plan-buy .btn { min-height: 48px; padding: 0 22px; }

/* Як обрати */
.howto { margin-top: 22px; background: var(--surface); border-radius: var(--r-lg); padding: 18px 16px; box-shadow: var(--shadow); }
.howto h3 { font-size: 20px; margin-bottom: 8px; }
.howto details { border-radius: var(--r-sm); background: var(--bg); margin-top: 8px; padding: 0 14px; }
.howto summary { cursor: pointer; padding: 13px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--green-700); }
.howto details[open] summary::after { content: "−"; }
.howto details p { padding-bottom: 14px; color: #39422f; font-size: 15px; }
.disclaimer { margin-top: 14px; font-size: 13px; color: var(--faint); }

/* Рецепти */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: 0 0 0 1px #e7e8df inset; font-weight: 700; font-size: 14.5px; }
.filters button[aria-selected="true"] { background: var(--green-700); color: #fff; box-shadow: none; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rcard { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); border: 0; padding: 0; text-align: left; color: var(--text); transition: transform .15s, box-shadow .15s; }
.rcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.rcard img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--sand); }
.rcard .rc-body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.rcard small { color: var(--green-700); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.rcard b { font-size: 14.5px; line-height: 1.25; }
.rcard .rc-k { font-size: 13px; color: var(--muted); }
.empty-saved { grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r); }

/* Підвал і таббар */
.foot { padding: 36px 20px 24px; text-align: center; font-size: 14px; display: grid; gap: 6px; }
.foot .muted { font-size: 12.5px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 -8px 24px -16px rgba(31,45,20,.35); }
.tabbar a { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--faint); font-size: 11.5px; font-weight: 700; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--green-700); }

/* Нижні листи (діалоги) */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92dvh; border-radius: 24px 24px 0 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2,.8,.2,1); }
.sheet::backdrop { background: rgba(20, 28, 16, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-body { overflow-y: auto; padding: 22px 18px calc(22px + var(--safe-b)); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; }
.sheet h2 { font-size: 26px; margin: 10px 48px 6px 0; }
.includes { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; }
.includes li { display: flex; gap: 10px; }
.includes li::before { content: "✓"; color: var(--green); font-weight: 800; }
.test-note { padding: 10px 12px; border-radius: var(--r-sm); background: var(--blue-50); color: #2d4f75; font-size: 13.5px; margin-bottom: 12px; }
.order-form { display: grid; gap: 12px; }
.form-error { color: #a23a3a; font-size: 14px; font-weight: 600; }
.pay-note { text-align: center; font-size: 12.5px; color: var(--muted); }
.order-contacts { display: grid; gap: 8px; margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #1f2a19; color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-lg); }

/* Сторінка «Дякуємо» */
.thanks { max-width: 560px; margin: 24px auto; padding: 0 16px; }
.thanks .card { text-align: center; padding: 30px 20px; display: grid; gap: 12px; justify-items: center; }
.thanks .big { font-size: 56px; line-height: 1; }
.thanks h1 { font-size: 28px; }

/* Планшет */
@media (min-width: 600px) {
  .hero-cta { display: flex; flex-wrap: wrap; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .seg-kcal { grid-template-columns: repeat(6, 1fr); }
  .seg-meal { grid-template-columns: repeat(3, 1fr); }
  #saveMeals { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #saveMeals > :last-child:nth-child(odd) { grid-column: auto; }
  .r-main { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .r-actions { grid-template-columns: repeat(3, auto); justify-content: start; }
  .r-actions .btn-primary { grid-column: auto; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .recipe-grid { grid-template-columns: repeat(3, 1fr); }
  .calc-result .btns { display: flex; flex-wrap: wrap; }
  .sheet { margin: auto; border-radius: 24px; max-height: 88dvh; }
}

/* Десктоп */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .top { padding: 14px max(24px, calc((100vw - 1200px) / 2)); }
  .logo-leaf { width: 54px; height: 54px; }
  .logo-name { font-size: 28px; }
  .logo-sub { font-size: 13px; }
  .logo-heart { width: 22px; height: 22px; }
  .nav { display: flex; gap: 4px; margin-left: auto; }
  .nav a { padding: 10px 18px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 15.5px; }
  .nav a:hover { background: var(--sand); }
  .nav a.on { background: var(--green-100); color: var(--green-900); }
  .saved-btn { margin-left: 8px; }
  .hero, .quick, .builder, .plans, .recipes, .foot { max-width: 1200px; margin-left: auto; margin-right: auto; }
  .hero { grid-template-columns: 1fr 1.15fr; align-items: center; padding: 18px 24px 0; gap: 10px; }
  .hero-img { order: 0; margin: 0 -24px 0 -80px; aspect-ratio: 4 / 3; mask-image: linear-gradient(90deg, transparent 0%, #000 22%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%); border-radius: 0 28px 28px 0; }
  .hero-img img { transform: none; object-position: 70% 50%; }
  .hero h1 { margin-top: 0; }
  .quick { grid-template-columns: repeat(3, 1fr); padding: 26px 24px 8px; }
  .builder { grid-template-columns: 1fr 1.08fr; align-items: start; padding: 30px 24px 0; }
  .builder-form { position: sticky; top: 96px; }
  .card { padding: 24px; }
  .r-cols { grid-template-columns: 1fr 1fr; }
  .plans, .recipes { padding: 48px 24px 0; }
  .plans .calc { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .plans .calc .card-head { grid-column: 1 / -1; }
  .plans .calc .calc-form { margin-top: 0; }
  .plans .calc .calc-result { margin-top: 0; }
  .plan-grid { grid-template-columns: repeat(3, 1fr); }
  .recipe-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .filters { margin: 0; padding: 2px 0 14px; }
  html { scroll-padding-top: 100px; }
  .result { scroll-margin-top: 100px; }
}

/* ===== Готові плани (макет 2) ===== */
.seg-kcal { grid-template-columns: repeat(4, 1fr); }
.perks { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px 6px; }
.perks::-webkit-scrollbar { display: none; }
.perks li { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); }
.perks b { display: block; font-size: 14px; line-height: 1.2; }
.perks small { display: block; font-size: 12.5px; color: var(--muted); }
.perks .feat-ic { width: 38px; height: 38px; }
.perks .feat-ic svg { width: 20px; height: 20px; }
.plan-layout { display: grid; gap: 14px; }
.pick-title { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.pick-title svg { width: 26px; height: 26px; color: var(--green-700); }
.days-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 14px 0; border-radius: 999px; background: var(--sand); }
.days-seg button { min-height: 42px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 15px; }
.days-seg button[aria-checked="true"] { color: #fff; background: linear-gradient(180deg, #5a9a2f, #2f6b1a); box-shadow: 0 6px 14px -8px rgba(47,107,26,.8); }
.plan-list { display: grid; gap: 10px; }
.plan-opt { position: relative; display: grid; grid-template-columns: 76px 1fr 24px; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: 0 0 0 1px #e7e8df inset; text-align: left; color: var(--text); }
.plan-opt img { width: 76px; height: 64px; border-radius: 12px; object-fit: cover; }
.plan-opt b { display: block; font-size: 16px; line-height: 1.2; }
.plan-opt small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; margin-top: 2px; }
.plan-opt .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px #c9ccc0 inset; }
.plan-opt[aria-checked="true"] { background: var(--green-50); box-shadow: 0 0 0 2px var(--green-400) inset; }
.plan-opt[aria-checked="true"] .radio { box-shadow: none; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; }
.plan-opt .pop { position: absolute; top: -8px; left: 70px; font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--peach); color: #fff; }
.plan-pick .hint { margin-top: 12px; }
.plan-detail h3 { font-size: 21px; }
.plan-detail h4 { margin: 18px 0 10px; font-size: 16px; }
.plan-detail h4 small { font-weight: 600; color: var(--muted); font-size: 13px; }
.facts-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 13.5px; font-weight: 700; }
.facts-row > span:first-child { padding: 5px 10px; border-radius: 999px; background: var(--peach-50); color: #8a531d; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.meal-card { scroll-snap-align: start; display: grid; gap: 2px; padding: 0 0 8px; border: 0; border-radius: var(--r); background: var(--bg); text-align: center; color: var(--text); overflow: hidden; }
.meal-card img { width: 100%; aspect-ratio: 1.15; object-fit: cover; margin-bottom: 6px; }
.meal-card b { font-size: 14px; }
.meal-card small { font-size: 12px; color: var(--muted); padding: 0 6px; }
.gets { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 12px; padding: 14px; border-radius: var(--r); background: var(--green-50); }
.gets h4 { margin: 0 0 4px; }
.gets .includes { margin: 6px 0 0; font-size: 14px; gap: 6px; }
.pdf { position: relative; width: 74px; }
.pdf-page { width: 70px; height: 92px; border-radius: 8px; background: #fff; box-shadow: var(--shadow-lg); padding: 9px 8px; display: grid; gap: 5px; align-content: start; transform: rotate(4deg); }
.pdf-page span { height: 4px; border-radius: 2px; background: #dfe3d8; }
.pdf-page span:first-child { width: 70%; background: var(--green-400); }
.pdf-page i { height: 22px; border-radius: 6px; background: linear-gradient(135deg, #f1c27d, #6ea83f); }
.pdf em { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-weight: 800; font-size: 11px; color: #fff; background: var(--green-700); padding: 3px 7px; border-radius: 6px; }
.plan-buy-card { display: grid; gap: 10px; align-content: start; }
.plan-buy-card .pill { justify-self: start; }
.plan-buy-card h3 { font-size: 21px; }
.big-price { font-size: 34px; font-weight: 800; color: var(--green-900); letter-spacing: -.02em; line-height: 1.1; }
.plan-buy-card .small, .calc-result .small { font-size: 13px; color: var(--muted); }
.buy-perks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.buy-perks li { display: flex; gap: 10px; align-items: flex-start; }
.buy-perks svg { width: 20px; height: 20px; color: var(--green-700); margin-top: 1px; }
.sample-meal { padding: 18px 0; }
.sample-meal + .sample-meal { box-shadow: 0 -1px 0 #ecebe3; }
.sheet .sample-meal .r-title { font-size: 21px; }

/* ===== Калькулятор (окремий розділ) ===== */
.calc-sec { padding: 30px 16px 0; }
.calc-sec .calc { margin: 0; }
.formula { font-size: 12px; color: var(--faint); text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.calc-result { background: var(--bg); }
.calc-tiles { display: grid; gap: 8px; }
.tile { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); display: grid; }
.tile small { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tile b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tile span { font-size: 12.5px; color: var(--muted); }
.tile-main { background: linear-gradient(135deg, #f3f9ec, #e4f0d7); }
.goal-rows { display: grid; gap: 4px; margin: 14px 0; }
.goal-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 2px; font-size: 14.5px; }
.goal-rows div + div { box-shadow: 0 -1px 0 #e6e5dc; }
.reco-box { margin-top: 14px; padding: 14px; border-radius: var(--r); background: var(--surface); box-shadow: 0 0 0 2px var(--green-400) inset; }
.reco-box .btns { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 600px) {
  .calc-tiles { grid-template-columns: repeat(3, 1fr); }
  .reco-box .btns { display: flex; flex-wrap: wrap; }
  .carousel { margin: 0; padding: 2px 0 8px; grid-auto-columns: 1fr; }
}
@media (min-width: 960px) {
  .perks { margin: 0 0 18px; padding: 2px 0 6px; justify-content: space-between; }
  .plan-layout { grid-template-columns: 1fr 1.35fr .95fr; align-items: start; }
  .plan-buy-card { position: sticky; top: 96px; }
  .calc-sec { max-width: 1200px; margin: 0 auto; padding: 48px 24px 0; }
  .calc-sec .calc { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; }
  .calc-sec .calc-result { margin-top: 0; }
}
@media (max-width: 959px) {
  /* на телефоні: вибір → ціна і кнопка → приклад дня */
  .plan-buy-card { order: 2; }
  .plan-detail { order: 3; }
}

/* сітки на телефоні не розтягуються від каруселі/довгих рядків */
.hero, .quick, .builder, .plan-layout, .r-main, .r-cols, .day-list { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .r-main { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .builder { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
  .plan-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, .95fr); }
  .r-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 359px) {
  .logo-sub { display: none; }
  .tabbar a { font-size: 10.5px; }
  .seg label span { font-size: 13.5px; }
}
.day-item { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; }
.day-item img { width: 64px; height: 64px; }
.day-item b, .plan-opt b, .rcard b, .r-title, .meal-card b { overflow-wrap: anywhere; hyphens: auto; }
.day-item .dk { font-size: 14px; padding-right: 2px; }
@media (min-width: 600px) { .day-item { grid-template-columns: 76px minmax(0, 1fr) auto; } .day-item img { width: 76px; height: 76px; } }

/* ===== Навчись балансувати ===== */
.balance { padding: 18px 16px 0; }
.bal-layout, .bal-bottom { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.bal-bottom { margin-top: 14px; }
.bal-form { display: grid; gap: 10px; margin-top: 12px; }
.bal-input { position: relative; display: flex; align-items: center; height: 54px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 2px var(--green-100) inset; padding: 0 6px 0 16px; gap: 8px; }
.bal-input:focus-within { box-shadow: 0 0 0 2px var(--green-400) inset; }
.bal-input > svg { width: 20px; height: 20px; color: var(--muted); }
.bal-input input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; height: 100%; outline: none; }
.bal-input .clear { width: 40px; height: 40px; box-shadow: none; background: transparent; color: var(--muted); }
.ex { flex: none; border: 0; background: var(--sand); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: var(--green-900); min-height: 38px; }
.bal-chips { margin-top: 12px; }
.bal-chips .chip { min-height: 38px; font-size: 14px; }
.bal-sub { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 20px 0 14px; }
.bal-sub svg { width: 26px; height: 26px; color: var(--green); }
.bal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.bal-photo { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); }
.bal-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.w-badge { position: absolute; right: 12px; bottom: 12px; padding: 8px 14px; border-radius: 999px; background: rgba(240, 247, 233, .95); color: var(--green-900); font-weight: 800; font-size: 20px; box-shadow: var(--shadow); }
.bal-name { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ing-title { margin: 16px 0 8px; font-size: 16px; }
.bal-ing { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bal-ing li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 36px; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg); font-size: 15px; }
.bal-ing .em { font-size: 22px; line-height: 1; text-align: center; }
.bal-ing small { display: block; color: var(--muted); font-size: 12.5px; }
.li-k { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; text-align: right; }
.auto { display: block; font-style: normal; font-size: 11px; color: #8a531d; background: var(--peach-50); border-radius: 999px; padding: 1px 7px; margin-top: 2px; text-align: center; }
.bal-why h3, .bal-tune h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.bal-why h3 svg { width: 24px; height: 24px; color: var(--green-700); }
.why { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; font-size: 15px; }
.why li { display: flex; gap: 10px; }
.why .ck { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green); font-weight: 800; font-size: 13px; margin-top: 1px; }
.why li.miss .ck { background: var(--peach-50); color: #b5651d; }
.plate-viz { display: flex; align-items: center; gap: 16px; margin: 18px 0 4px; }
.plate-viz svg { width: 104px; height: 104px; flex: none; stroke: none; }
.plate-viz ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14px; flex: 1; }
.plate-viz li { display: flex; align-items: center; gap: 8px; }
.plate-viz li i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.plate-viz li b { margin-left: auto; }
.ksu-tip { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(135deg, #f3f9ec, #e4f0d7); display: grid; gap: 6px; font-size: 14.5px; }
.ksu-tip h4 { margin: 0 0 2px; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 6px; }
.preset { border: 0; border-radius: 12px; background: var(--sand); padding: 8px 10px; font-weight: 700; font-size: 14px; text-align: left; min-height: 48px; }
.preset small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }
.preset[aria-pressed="true"] { background: var(--green-50); box-shadow: 0 0 0 2px var(--green-400) inset; }
.range { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px; margin-top: 16px; font-size: 14.5px; }
.range output { font-weight: 800; padding: 6px 12px; border-radius: 10px; background: var(--sand); min-width: 92px; text-align: center; }
.range input { grid-column: 1 / -1; width: 100%; height: 32px; -webkit-appearance: none; appearance: none; background: transparent; --fill: 50%; }
.range input::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--green-700) var(--fill), #e3e5dc var(--fill)); }
.range input::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--green-700) var(--fill), #e3e5dc var(--fill)); }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 1px #d9dccf; margin-top: -9px; }
.range input::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25); }

/* ===== Навчайся з нами / блог ===== */
.learn { padding: 30px 16px 0; }
.learn-box { background: linear-gradient(135deg, #f3f9ec, #e4f0d7); border-radius: var(--r-lg); padding: 18px 16px; }
.learn-box h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.learn-box h2 svg { width: 30px; height: 30px; color: var(--green-700); }
.learn-grid { display: grid; gap: 10px; margin-top: 14px; }
.learn-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 15px; text-align: left; color: var(--text); min-height: 64px; }
.l-ic { width: 42px; height: 42px; border-radius: 50%; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; flex: none; }
.l-ic svg { width: 22px; height: 22px; }
.article { display: grid; gap: 10px; font-size: 15.5px; color: #2c3527; margin-top: 8px; }
.article h3 { font-size: 18px; margin-top: 8px; }
.article ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.combo-list { display: flex; flex-wrap: wrap; gap: 8px; }
.combo-list .ex { font-size: 15px; padding: 10px 16px; }

@media (min-width: 600px) {
  .bal-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; }
  .presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .learn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .balance, .learn { max-width: 1200px; margin: 0 auto; padding: 48px 24px 0; }
  .bal-layout { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); align-items: start; }
  .bal-why { position: sticky; top: 96px; }
  .learn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: stretch; }
  .learn-more { white-space: nowrap; }
  .nav a { padding: 10px 14px; font-size: 15px; }
}
@media (min-width: 960px) and (max-width: 1180px) {
  .nav a { padding: 8px 9px; font-size: 14px; }
  .logo-name { font-size: 24px; }
  .logo-leaf { width: 46px; height: 46px; }
}
@media (min-width: 960px) and (max-width: 1069px) {
  .logo-sub { display: none; }
  .logo-name { font-size: 21px; }
  .logo-leaf { width: 40px; height: 40px; }
  .nav { gap: 0; }
  .nav a { padding: 8px 7px; font-size: 13.5px; }
}
.bal-form { grid-template-columns: minmax(0, 1fr); }
.bal-input input { width: 100%; }
@media (min-width: 960px) { .bal-tune .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Розділи-блоки (2026-11-12): показуємо одну «сторінку», а не довгу стрічку ===== */
main { min-height: calc(100dvh - 220px); }
.quick-title { font-size: 22px; padding: 4px 4px 0; }
.quick-card .q-text b { font-size: 16.5px; }
@media (min-width: 600px) {
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-title, .q-wide { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Інгредієнти: суха / сира вага і готова */
.ing li > span { min-width: 0; }
.ing small, .ing-hint { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.ing-hint { margin: -4px 0 8px; }
.r-meta b { white-space: nowrap; }

.cat-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15.5px; }
.cat-title svg { width: 20px; height: 20px; color: var(--green-700); }
.chosen-title { margin: 16px 0 8px; }
.f-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 800; font-style: normal; vertical-align: 1px; }

/* Калькулятор харчування (правка Ксю 2026-11-15): пошук + 4 кнопки замість папок і замін */
.calc-title { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.bal-input .go { width: 42px; height: 42px; flex: none; background: var(--green); color: #fff; box-shadow: none; }
.bal-input .go:hover { background: var(--green-700); }
.calc-hint { margin: 8px 6px 0; }
.calc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.calc-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 88px; padding: 12px 8px; border: 0; border-radius: var(--r); background: var(--bg); color: var(--text); font: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; transition: background .15s, box-shadow .15s; }
.calc-act svg { width: 28px; height: 28px; color: var(--green-700); }
.calc-act:hover { background: var(--green-50); }
.calc-act-main { background: var(--green-50); box-shadow: 0 0 0 2px var(--green-100) inset; color: var(--green-900); }
.calc-act-main svg { color: var(--green); }
.calc-act[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--green-400) inset; }
.food-mine { margin-top: 16px; }
.food-mine .chips { gap: 6px; }
.label-photo { margin-top: 14px; }
.bc-shot { margin-top: 16px; cursor: pointer; gap: 8px; }
.bc-manual { margin-top: 10px; }
.bc-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--bg); margin: 14px 0 10px; }
.bc-card .em { font-size: 28px; line-height: 1; }
.bc-card b { display: block; font-size: 16px; }
.bc-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
@media (min-width: 600px) { .calc-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.folder-panel { margin-top: 10px; padding: 14px 12px; border-radius: var(--r); background: var(--green-50); }
.fp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 15.5px; }
.fp-head .link-btn { padding: 6px 2px; min-height: 36px; }
.folder-panel .chips { gap: 6px; }
.folder-panel .chip { min-height: 40px; font-size: 14px; }
.folder-panel .chip[aria-pressed="false"] { background: var(--surface); }
.chip-wrap { display: inline-flex; align-items: center; gap: 2px; }
.chip-del { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: #a23a3a; font-weight: 800; }
.chip-add { background: var(--green-50); box-shadow: 0 0 0 1px var(--green-100) inset; color: var(--green-900); }
.link-btn.inline { padding: 0; min-height: 0; font-size: inherit; text-decoration: underline; }
.slot-banner { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; padding: 8px 8px 8px 14px; border-radius: var(--r); background: var(--peach-50); color: #6d4417; font-size: 14.5px; }
.slot-banner > span:nth-child(2) { flex: 1; min-width: 0; }
.slot-banner .icon-btn { width: 36px; height: 36px; box-shadow: none; background: rgba(255,255,255,.7); }
.slot-banner .icon-btn svg { width: 16px; height: 16px; }
.bal-emoji { width: 100%; height: 100%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px 10px; padding: 24px 24px 56px; background: radial-gradient(circle at 50% 46%, #fff 0 38%, #eef5e6 39% 41%, #f3f9ec 42%); font-size: 46px; line-height: 1.1; }
.bal-actions { margin-top: 16px; display: grid; gap: 4px; }
.bal-actions .hint { text-align: center; }

/* Мій план */
.planner { padding: 30px 16px 0; }
.plan-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 16px; }
.plan-top .target { font-weight: 800; font-size: 15.5px; }
#planTarget { height: 46px; border: 0; border-radius: var(--r-sm); background: var(--sand); padding: 0 36px 0 14px; font-weight: 700; font-size: 16px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6455' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.plan-top .link-btn { margin-left: auto; text-decoration: none; }
.day-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 14px 0; }
.day-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 54px; padding: 6px 2px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px #e7e8df inset; color: var(--text); }
.day-tabs b { font-size: 15px; }
.day-tabs small { font-size: 11px; color: var(--muted); font-weight: 600; }
.day-tabs [aria-selected="true"], .day-tabs [aria-checked="true"], .day-tabs [aria-pressed="true"] { background: var(--green-700); box-shadow: none; color: #fff; }
.day-tabs [aria-selected="true"] small, .day-tabs [aria-checked="true"] small, .day-tabs [aria-pressed="true"] small { color: #e3f0d6; }
.plan-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pd-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pd-head h3 { font-size: 22px; }
.pd-actions { display: flex; gap: 6px; }
.pd-actions .btn { min-height: 40px; padding: 0 12px; font-size: 13.5px; white-space: nowrap; gap: 6px; }
.pd-actions .btn svg { width: 16px; height: 16px; }
@media (max-width: 420px) { .pd-head h3 { width: 100%; } }
.slot { padding: 12px 0; display: grid; gap: 8px; }
.slot + .slot { box-shadow: 0 -1px 0 #efeee6; }
.slot-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slot-name { font-weight: 800; font-size: 16px; }
.slot-k { font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.entry { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: var(--green-50); color: var(--text); text-align: left; }
.entry .e-name { font-weight: 700; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.entry .e-meta { font-size: 12.5px; color: var(--muted); }
.slot-add { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: var(--bg); color: var(--green-900); font-weight: 700; font-size: 14.5px; box-shadow: 0 0 0 1.5px var(--green-100) inset; }
.slot-add svg { width: 18px; height: 18px; }
.slot-add.more { min-height: 38px; justify-self: start; background: transparent; box-shadow: none; padding: 0 4px; font-size: 13.5px; }
.plan-sum h3, .plan-week h3 { font-size: 20px; }
.prog { height: 12px; border-radius: 6px; background: #e8e9e0; overflow: hidden; margin-top: 14px; }
.prog i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6ea83f, #2f6b1a); }
.prog.over i { background: linear-gradient(90deg, #e9a35a, #c46a2a); }
.prog-text { margin-top: 6px; font-size: 15px; color: var(--muted); }
.prog-text b { font-size: 24px; color: var(--text); letter-spacing: -.02em; }
.m-rows { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.m-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg); font-size: 14.5px; }
.m-rows .m-norm { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.m-rows .m-name { font-weight: 700; }
.m-rows li.ok { background: var(--green-50); }
.m-rows li.low, .m-rows li.high { background: var(--peach-50); }
.m-rows li.ok .m-norm { color: var(--green-700); }
.m-rows li.low .m-norm, .m-rows li.high .m-norm { color: #8a531d; }
.plan-sum .ksu-tip { margin-top: 14px; }
.plan-week { margin-top: 14px; }
.pw-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.pw-head span { font-size: 13.5px; color: var(--muted); }
.week-rows { display: grid; gap: 4px; margin-top: 12px; }
.wrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 58px; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; }
.wrow.on { background: var(--green-50); }
.w-d { font-weight: 800; font-size: 14px; }
.w-bar { height: 10px; border-radius: 5px; background: #e8e9e0; overflow: hidden; }
.w-bar i { display: block; height: 100%; background: var(--green-400); border-radius: 5px; }
.w-bar i.over { background: var(--peach); }
.w-k { font-size: 13.5px; font-weight: 700; text-align: right; color: var(--muted); }
.pw-actions { display: grid; gap: 8px; margin-top: 14px; }
.pw-actions .link-btn { justify-self: center; color: var(--muted); }
.plan-note { text-align: center; margin: 14px 8px 0; }
.sheet-h { margin: 16px 0 8px; font-size: 15.5px; }
#saveSheet .day-tabs { margin: 0; }
#saveConfirm { margin-top: 16px; }
.copy-days { margin: 16px 0; }
.pe-w { margin: 8px 0 0; font-size: 14px; }
.shop { display: grid; gap: 14px; margin-top: 12px; }
.shop h4 { margin: 0 0 6px; font-size: 16px; }
.shop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.shop li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--bg); font-size: 14.5px; }
.shop li > span { min-width: 0; }
.shop li b { white-space: nowrap; text-align: right; }
.shop small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.shop li.pantry { opacity: .8; }
.custom-form { display: grid; gap: 12px; margin-top: 14px; }
.custom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.custom-grid .field input { padding-right: 52px; }
@media (min-width: 600px) {
  .pw-actions { display: flex; flex-wrap: wrap; align-items: center; }
  .pw-actions .link-btn { margin-left: auto; }
  .custom-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .planner { max-width: 1200px; margin: 0 auto; padding: 48px 24px 0; }
  .plan-cols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .plan-sum { position: sticky; top: 96px; }
  .day-tabs button { min-height: 60px; }
}
@media (max-width: 359px) {
  .day-tabs { gap: 3px; }
  .day-tabs b { font-size: 13.5px; }
  .day-tabs small { font-size: 10px; }
}

/* Два перекуси і розподіл калорій (правки Ксю 2026-11-13) */
.seg-meal > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.split-btn { background: var(--sand); box-shadow: none; }
.split-btn small { color: var(--green-900); font-weight: 600; }
.split-open { min-height: 40px; padding: 0 14px; font-size: 14px; gap: 6px; }
.split-rows { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 6px; }
.split-rows li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--r); background: var(--sand); }
.sp-name { font-weight: 700; font-size: 15px; min-width: 0; white-space: nowrap; }
.sp-ctl { display: flex; align-items: center; gap: 6px; }
.sp-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(31,45,20,.08); font-size: 22px; font-weight: 700; line-height: 1; color: var(--green-900); }
.sp-btn:disabled { opacity: .35; }
.sp-val { display: flex; flex-direction: column; align-items: center; min-width: 72px; line-height: 1.15; }
.sp-val b { font-size: 15.5px; }
.sp-val small { font-size: 12px; color: var(--muted); }
.split-sum { margin: 4px 0 12px; padding: 10px 14px; border-radius: var(--r); font-weight: 600; font-size: 14.5px; }
.split-sum.ok { background: var(--green-50); color: var(--green-900); }
.split-sum.bad { background: var(--peach-50); color: #6d4417; }
#splitSave:disabled { opacity: .5; }
.taste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.taste-title { margin: 14px 0 0; font-weight: 800; font-size: 15px; }

/* ===================== Кабінет, готові меню по розділах, фото тарілки, адмінка (2026-11-13) ===================== */
.tabbar a { position: relative; }
.tabbar .dot, .me-btn .dot { position: absolute; top: 8px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px #fff; }
.me-btn { position: relative; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; max-width: 150px; }
.me-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.me-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-btn.in { background: var(--green-50); color: var(--green-900); }
.me-btn .dot { top: 4px; right: 4px; }
.me-btn + .saved-btn { margin-left: 8px; }
@media (max-width: 380px) { .me-btn span { display: none; } .me-btn { padding: 0 12px; } }
@media (min-width: 960px) { .me-btn { margin-left: 8px; } .me-btn.on { background: var(--green-100); } }

/* плитка «Фото тарілки» — кнопка, а не посилання */
button.quick-card { border: 0; font: inherit; text-align: left; width: 100%; }
.photo-cta { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 12px 14px; border: 0; border-radius: var(--r); background: var(--peach-50); color: var(--text); text-align: left; font: inherit; }
.photo-cta svg { width: 30px; height: 30px; flex: none; color: #b06a24; fill: none; stroke: currentColor; stroke-width: 1.8; }
.photo-cta b { display: block; font-size: 15.5px; }
.photo-cta small { display: block; color: var(--muted); font-size: 13px; }

/* готові меню: 1 — калорійність, 2 — розділ і картки меню */
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-700); color: #fff; font-size: 15px; flex: none; }
.plan-pick .plan-list { margin-top: 14px; }
.menu-side { min-width: 0; }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: 0 0 0 1px #e7e8df inset; font-weight: 700; font-size: 14.5px; color: var(--text); }
.cat-tabs button[aria-selected="true"] { background: var(--green-700); color: #fff; box-shadow: none; }
.cat-hint { color: var(--muted); font-size: 14px; margin: 6px 2px 12px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.menu-grid > p { grid-column: 1 / -1; }
.menu-card { display: flex; flex-direction: column; gap: 3px; padding: 0 0 12px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); text-align: left; color: var(--text); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.mc-img { display: block; aspect-ratio: 1.25; overflow: hidden; background: var(--sand); margin-bottom: 6px; }
.mc-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-card b { padding: 0 12px; font-size: 15.5px; line-height: 1.25; overflow-wrap: anywhere; }
.menu-card small { padding: 0 12px; font-size: 12.5px; color: var(--muted); }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 12px 0; margin-top: auto; flex-wrap: wrap; }
.mc-price { font-weight: 800; color: var(--green-900); font-size: 14.5px; margin-left: auto; }
.tag { display: inline-block; font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--sand); color: var(--muted); }
.tag-new { background: var(--peach-50); color: #8a531d; }
.tag-own { background: var(--green-100); color: var(--green-900); }
.menu-hero { margin: -22px -18px 12px; aspect-ratio: 2; overflow: hidden; background: var(--sand); }
.menu-hero img { width: 100%; height: 100%; object-fit: cover; }
.lead-s { font-size: 16px; color: #39422f; margin: 4px 0 6px; }
.kcal-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.kcal-pick button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--sand); font-weight: 700; font-size: 14px; color: var(--text); }
.kcal-pick button[aria-checked="true"] { background: var(--green-700); color: #fff; }
.menu-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 14px; border-radius: var(--r); background: var(--green-50); }
.menu-buy .small { font-size: 12.5px; color: var(--muted); }
@media (min-width: 600px) { .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .plan-layout { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
  .cat-tabs { margin: 14px 0 0; padding: 2px 0 6px; flex-wrap: wrap; }
  .menu-hero { margin: -22px -18px 14px; }
}

/* кабінет */
.me, .admin { padding: 30px 16px 0; }
.me-wrap, .admin-wrap { max-width: 1200px; margin: 0 auto; }
.me-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.me-head h2 { font-size: 26px; }
.me-head-btns { display: flex; gap: 8px; margin-left: auto; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.me-ava { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green-100); color: var(--green-900); flex: none; }
.me-ava svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }
.me-guest { max-width: 520px; margin: 0 auto; text-align: left; }
.me-guest h2 { font-size: 26px; margin: 12px 0 4px; }
.me-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.me-card h3 { font-size: 19px; margin-bottom: 8px; }
.me-card > .btn { margin-top: 10px; }
.me-card .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.me-card .small, .me-foot { font-size: 13px; color: var(--muted); margin-top: 8px; }
.goal-now { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-now > div { flex: 1 1 90px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); }
.goal-now small { display: block; font-size: 12.5px; color: var(--muted); }
.goal-now b { font-size: 19px; }
.goal-bar { height: 10px; border-radius: 999px; background: var(--sand); margin-top: 14px; overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6ea83f, #2f6b1a); }
.w-chart { display: block; width: 100%; height: 80px; margin-top: 10px; color: var(--green); }
.w-chart circle { fill: var(--green-700); }
.w-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 12px; }
.w-form .field input { padding-right: 40px; }
.w-form .btn { min-height: 50px; }
.buy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); }
.buy-row b { display: block; }
.buy-row small { color: var(--muted); font-size: 12.5px; }
.buy-row .small { max-width: 130px; text-align: right; margin: 0; }
.reco { margin-top: 16px; }
.reco h4 { font-size: 15.5px; margin-bottom: 8px; }
.reco-list { display: grid; gap: 8px; }
.reco-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border: 0; border-radius: var(--r-sm); background: var(--peach-50); text-align: left; color: var(--text); }
.reco-card .mc-img { aspect-ratio: 1; margin: 0; border-radius: 10px; }
.reco-card b { display: block; font-size: 14.5px; }
.reco-card small { display: block; font-size: 12.5px; color: var(--muted); }
.msgs { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; margin: 10px 0; padding: 2px; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; background: var(--bg); }
.msg small { display: block; font-size: 11.5px; color: var(--faint); margin-bottom: 3px; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.msg img { display: block; width: 100%; max-width: 240px; border-radius: 12px; margin: 4px 0; }
.msg-out { justify-self: end; background: var(--green-50); }
.msg-in { justify-self: start; background: var(--peach-50); }
.msg-meta { display: block; font-size: 12.5px; font-weight: 700; color: var(--green-900); margin: 2px 0; }
.ask-form textarea, .adm-form textarea { width: 100%; border: 0; border-radius: var(--r-sm); background: var(--sand); padding: 12px 14px; font: inherit; font-size: 16px; resize: vertical; min-width: 0; }
.ask-form textarea:focus, .adm-form textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--green-400) inset; background: #fff; }
.ask-form .btns { display: flex; gap: 8px; margin-top: 10px; }
.ask-form .btns .btn-primary { flex: 1; }
.ask-attach { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 6px; border-radius: var(--r-sm); background: var(--bg); font-size: 13.5px; }
.ask-attach img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.ask-attach .icon-btn { margin-left: auto; width: 36px; height: 36px; font-size: 20px; }
.link-btn.danger { color: #a23a3a; font-weight: 600; }
.me-foot { text-align: center; margin: 18px 0 8px; }
@media (min-width: 760px) {
  .me-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (min-width: 960px) { .me, .admin { padding: 48px 24px 0; } }

/* вхід */
.auth-step { display: grid; gap: 12px; }
.auth-step h2 { margin-bottom: 0; }
.code-field input { font-size: 30px; letter-spacing: 12px; text-align: center; font-weight: 800; height: 62px; }
.auth-step .seg label span { min-height: 44px; }

/* фото тарілки */
.photo-btns { display: grid; gap: 10px; margin-top: 14px; }
.photo-btns .btn { cursor: pointer; }
.photo-preview { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r); margin: 6px 0 12px; background: var(--sand); }
.photo-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--green-100); border-top-color: var(--green-700); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.photo-dish { font-size: 20px; margin-bottom: 6px; }
.photo-sum { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.photo-sum > b { font-size: 24px; color: var(--green-900); }
.photo-sum small { color: var(--muted); font-weight: 700; }
.photo-items { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.photo-items li { display: grid; grid-template-columns: minmax(0, 1fr) 84px 72px 34px; gap: 6px; align-items: center; padding: 6px 6px 6px 10px; border-radius: var(--r-sm); background: var(--bg); font-size: 14.5px; }
.pi-name { overflow-wrap: anywhere; }
.pi-g { position: relative; }
.pi-g input { width: 100%; height: 40px; border: 0; border-radius: 10px; background: #fff; padding: 0 22px 0 8px; font-size: 16px; text-align: right; }
.pi-g i { position: absolute; right: 8px; top: 11px; font-style: normal; font-size: 12.5px; color: var(--faint); }
.pi-k { text-align: right; font-size: 13px; color: var(--muted); font-weight: 700; }
.photo-items .icon-btn { width: 34px; height: 34px; box-shadow: none; background: transparent; font-size: 20px; color: var(--faint); }
.photo-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.photo-add input { height: 42px; border: 0; border-radius: 10px; background: var(--sand); padding: 0 12px; font-size: 16px; min-width: 0; }
.slot-pick button { min-height: 36px; padding: 0 11px; font-size: 13.5px; }
.verdict { font-weight: 700; padding: 10px 12px; border-radius: var(--r-sm); margin-top: 10px; }
.verdict.ok { background: var(--green-50); color: var(--green-900); }
.verdict.warn { background: var(--peach-50); color: #7a4613; }
.verdict.low { background: var(--blue-50); color: #23476e; }
.tips { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; }
@media (max-width: 359px) { .photo-items li { grid-template-columns: minmax(0, 1fr) 76px 34px; } .pi-k { display: none; } }

/* адмінка */
.admin-tabs { margin: 0 0 14px; padding: 2px 0 12px; }
.admin-tabs .count { font-style: normal; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--pink); color: #fff; font-size: 12px; margin-left: 4px; }
.admin-body > .btn { margin: 4px 0 14px; }
.adm-cat { margin-bottom: 12px; }
.adm-cat-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 10px; }
.adm-cat-head h3 { font-size: 18px; }
.adm-cat-head small { color: var(--muted); font-size: 13px; }
.adm-menus { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.adm-menu, .adm-thread { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: var(--r-sm); background: var(--bg); text-align: left; color: var(--text); }
.adm-menu img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.adm-menu b, .adm-thread b { display: block; font-size: 15px; }
.adm-menu small, .adm-thread small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.adm-inbox, .adm-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adm-thread { justify-content: space-between; padding: 12px; }
.adm-thread.waiting { background: var(--peach-50); }
.adm-thread > span:first-child { min-width: 0; }
.adm-thread small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-when { text-align: right; flex: none; }
.adm-orders li { padding: 12px 14px; font-size: 14.5px; }
.adm-orders small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.adm-form { display: grid; gap: 12px; }
.adm-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-covers { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-covers button, .adm-upload { width: 64px; height: 64px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--sand); }
.adm-covers img { width: 100%; height: 100%; object-fit: cover; }
.adm-covers button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--green-700); }
.adm-upload { display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--green-900); cursor: pointer; }
.adm-pdfs { margin-top: 18px; display: grid; gap: 8px; }
.adm-pdf { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg); font-size: 14px; }
.adm-pdf a { color: var(--green-700); font-weight: 700; overflow-wrap: anywhere; }
.adm-pdf label { cursor: pointer; }
.sheet-body h4 { margin: 18px 0 10px; font-size: 16px; }
.sheet-body h4 small { font-weight: 600; color: var(--muted); font-size: 13px; }
/* телефон: калорійність — компактна сітка 2×2, щоб розділи меню були ближче */
@media (max-width: 599px) {
  .plan-pick .plan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .plan-pick .plan-opt { grid-template-columns: minmax(0, 1fr) 22px; padding: 12px 10px 12px 12px; }
  .plan-pick .plan-opt img { display: none; }
  .plan-pick .plan-opt b { font-size: 15px; }
  .plan-pick .plan-opt small { font-size: 12px; }
  .plan-pick .plan-opt .pop { left: 10px; }
}
/* шапка з кнопкою кабінету: меню в один рядок */
@media (min-width: 960px) { .nav a { white-space: nowrap; } }
@media (min-width: 960px) and (max-width: 1279px) {
  .nav { gap: 0; }
  .nav a { padding: 10px 11px; font-size: 15px; }
  .me-btn span { display: none; }
  .me-btn { padding: 0 12px; }
}

/* ---------- Своя страва і пошук продуктів (правки Ксю 2026-11-14) ---------- */
.dish-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.dish-mode { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 112px; padding: 12px 8px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-align: center; font: inherit; cursor: pointer; transition: background .15s, transform .15s; }
.dish-mode:hover { background: var(--green-50); }
.dish-mode:active { transform: scale(.98); }
.dish-mode b { font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.dish-mode small { font-size: 12px; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.dm-em { font-size: 26px; line-height: 1; }
.dish-modes-sm .dish-mode { min-height: 92px; }
.dish-modes-sm .dm-em { font-size: 22px; }
.fp-sub { margin: 14px 0 8px; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.fp-sub small { font-weight: 600; color: var(--faint); }
.chip-k { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.chip-edit { color: var(--green-700); }
.dish-shot img { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--r); margin: 4px 0 10px; background: var(--sand); }
.dish-form { display: grid; gap: 10px; margin-top: 6px; }
.dish-h { margin: 6px 0 0; font-size: 16px; }
.dish-form .hint { margin-top: -4px; }
.dish-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dish-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 92px auto; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: var(--r-sm); background: var(--bg); }
.dish-row .em { font-size: 20px; }
.dr-name { min-width: 0; }
.dr-name b { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.dr-name small { font-size: 12px; color: var(--muted); }
.dr-g { position: relative; }
.dr-g input { width: 100%; height: 42px; border: 0; border-radius: 10px; background: var(--surface); padding: 0 24px 0 10px; font: inherit; font-size: 16px; font-weight: 700; text-align: right; }
.dr-g input:focus { outline: none; box-shadow: 0 0 0 2px var(--green-400) inset; }
.dr-g i { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--faint); pointer-events: none; }
.dish-sum:empty { display: none; }
.dish-sum { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--green-50); }
.ds-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; font-size: 14px; color: var(--muted); }
.ds-row b { color: var(--text); }
.ds-main b { font-size: 17px; color: var(--green-900); }
.ds-main .macros { width: 100%; }
.food-pick { display: grid; gap: 4px; }
.fp-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.fp-form input { width: 100%; min-width: 0; height: 46px; border: 0; border-radius: var(--r-sm); background: var(--sand); padding: 0 14px; font: inherit; font-size: 16px; }
.fp-form input:focus { outline: none; box-shadow: 0 0 0 2px var(--green-400) inset; background: #fff; }
.fp-form .btn { min-height: 46px; }
.fp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fp-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 0 0 1px #e7e8df inset; color: var(--text); text-align: left; font: inherit; }
.fp-item:hover { background: var(--green-50); }
.fp-item .em { font-size: 20px; flex: none; }
.fp-item b { font-size: 14.5px; overflow-wrap: anywhere; }
.fp-item small { display: block; font-size: 12.5px; color: var(--muted); }
.fp-brand { margin-left: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--green-700); }
.cat-sub { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.cat-sub button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--green-50); color: var(--green-900); font-weight: 700; font-size: 13.5px; }
.cat-sub button[aria-pressed="true"] { background: var(--green-100); box-shadow: 0 0 0 2px var(--green-400) inset; }
/* на телефоні три способи — списком: іконка зліва, назва і підказка праворуч (слова не ламаються) */
@media (max-width: 599px) {
  .dish-modes { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dish-mode, .dish-modes-sm .dish-mode { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-height: 0; padding: 10px 12px; text-align: left; }
  .dish-mode .dm-em { grid-row: 1 / 3; font-size: 24px; text-align: center; }
  .dish-mode b, .dish-mode small { overflow-wrap: normal; }
}
@media (max-width: 380px) {
  .dish-row { grid-template-columns: auto minmax(0, 1fr) 80px auto; }
}
.adm-sub { margin-left: 18px; }
.adm-parent { display: block; color: var(--faint); font-size: 12px; font-weight: 700; }

/* Правка Ксю 2026-11-15: на телефоні кнопку «Увійти» у шапці прибрали — вона дублює «Кабінет» у нижньому меню.
   На комп'ютері нижнього меню немає, тому там кнопка лишається. */
@media (max-width: 959.98px) {
  .me-btn { display: none; }
  .me-btn + .saved-btn { margin-left: auto; }
}

/* Порожній старт калькулятора (Ксю 2026-11-15): поки страви немає, картки «Чому це збалансовано?» не показуємо */
.bal-why:empty { display: none; }
/* пусте поле — без хрестика, щоб підказка «Знайти продукт або страву…» влазила на телефоні */
.bal-input input:placeholder-shown ~ .clear { display: none; }
/* на комп'ютері без «Чому це збалансовано?» калькулятор — на всю ширину */
@media (min-width: 960px) { .bal-layout:has(.bal-why:empty) { grid-template-columns: minmax(0, 1fr); } }

/* Баланс БЖВ і заміна продукту (Ксю 2026-11-15) */
.macro-tune { margin-top: 16px; }
.mt-title { margin: 0 0 8px; font-weight: 700; font-size: 15.5px; }
.mt-title small { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.mt-presets { margin: 0 0 4px; }
.mt-rows { margin: 8px 0 6px; }
.mt-name { font-weight: 700; font-size: 15px; }
.macro-goal { margin: 8px 0 0; padding: 7px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.macro-goal.ok { background: var(--green-50); color: var(--green-900); }
.macro-goal.warn { background: var(--peach-50); color: #7a4613; }
.li-swap { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--green-700); font-size: 17px; font-weight: 700; box-shadow: 0 1px 2px rgba(31,45,20,.08); }
.li-swap:hover { background: var(--green-50); }
.li-swap { display: inline-grid; place-items: center; }
.li-swap svg { width: 18px; height: 18px; stroke-width: 2.2; }
.swap-alts { margin: 12px 0 4px; gap: 6px; }
.swap-actions { display: grid; gap: 8px; margin-top: 16px; }

/* Безкоштовний ліміт і PLUS (Ксю 2026-11-15) */
.free-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 2px 0; padding: 8px 12px; border-radius: 12px; background: var(--green-50); color: var(--green-900); font-size: 13.5px; }
.free-line .link-btn { padding: 0; min-height: 0; font-size: 13.5px; font-weight: 700; margin-left: auto; }
.limit-card { text-align: center; padding: 24px 12px 8px; display: grid; gap: 8px; justify-items: center; }
.limit-card .big { font-size: 44px; line-height: 1; }
.limit-card h3 { margin: 4px 0 0; font-size: 19px; }
.limit-card p { margin: 0; color: var(--muted); max-width: 30em; }
.limit-card .btn { margin-top: 8px; }
.tiers { display: grid; gap: 12px; margin-top: 14px; }
.tier { padding: 16px; border-radius: var(--r); background: var(--bg); }
.tier h3 { margin: 0 0 8px; font-size: 17px; }
.tier-plus { background: var(--green-50); box-shadow: 0 0 0 2px var(--green-100) inset; }
.tier-price { margin: 0 0 8px; font-size: 15px; }
.tier-price b { font-size: 24px; }
.tier-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--peach-50); color: #8a531d; font-size: 12px; font-weight: 700; vertical-align: 3px; }
.tier .btn { margin-top: 12px; }
@media (min-width: 720px) { .tiers { grid-template-columns: 1fr 1fr; } }

/* КБЖВ кожного продукту (Ксю 2026-11-15) */
.nut { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--green-700); font-variant-numeric: tabular-nums; }
.pi-name .nut { font-size: 12px; }

.bal-ing li b { white-space: nowrap; }

/* Оплата Stripe, PLUS і юридичні сторінки (2026-11-15) */
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 13.5px; line-height: 1.4; cursor: pointer; }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--green); }
.consent a { color: var(--green-700); }
.me-plus { background: var(--green-50); }
.me-plus .btn { margin-top: 8px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; }
.foot-legal a { color: var(--muted); }
.legal { max-width: 780px; margin: 0 auto; padding: 18px 16px 40px; }
.legal-back { margin: 0 0 12px; }
.legal-card h1 { font-size: 26px; margin: 0 0 4px; }
.legal-card h2 { font-size: 18px; margin: 22px 0 6px; }
.legal-card p { line-height: 1.55; }
.legal-form { padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 18px; font-size: 14px; }

.adm-sub { margin: 18px 0 8px; font-size: 17px; }
