/* Экраны: главная, витрина клуба */
.hero { display: flex; flex-direction: column; gap: 6px; }
.join-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.join-cover { border-radius: var(--r-lg); background: var(--surface); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Каталог тренировок */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass);
  box-shadow: inset 0 1px 0 var(--glass-edge); color: var(--fg); font: 600 .92rem var(--body); white-space: nowrap; cursor: pointer; }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-color: transparent; box-shadow: none; }
/* Дорожка — выбор одного из нескольких (founder 29.10, вариант Б; как переключатель «Монтажа»): углубление, выбранное
   «выступает» лаковой капсулой. Не помещается — листается, край с продолжением растворяется (.fade-l / .fade-r). */
.track { position: relative; display: flex; padding: 4px; border-radius: 999px; background: var(--track); border: 1px solid var(--track-edge);
  box-shadow: var(--track-inset); overflow-x: auto; scrollbar-width: none; scroll-padding: 0 28px; }
.track::-webkit-scrollbar { display: none; }
.track .chip { flex: 1 0 auto; min-height: 38px; padding: 0 14px; border: 1px solid transparent; background: none; box-shadow: none;
  color: var(--muted); font-weight: 500; white-space: nowrap; }
.track .chip:is([aria-pressed="true"], :has(> input:checked)) { background: var(--lac); color: var(--fg); font-weight: 600; box-shadow: var(--lac-shadow); }
.track label.chip { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.track label.chip > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.track label.chip:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.track .chip:disabled { opacity: .4; }
.track.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.track.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.track.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28px calc(100% - 28px), transparent); }
.tile { display: flex; flex-direction: column; gap: 10px; color: var(--fg); text-decoration: none; }
.tile .cover { aspect-ratio: 16 / 10; }
.tile-body { display: flex; flex-direction: column; gap: 2px; }
.cover { width: 100%; border-radius: var(--r-lg); object-fit: cover; background: var(--surface); }
.ex-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: var(--r-lg); }
.theme-cover { aspect-ratio: 16 / 9; margin-bottom: 12px; }
.cover-empty { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--surface), var(--line)); }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.days, .items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.day { border-bottom: 1px solid var(--line); }
.day > a, .day.locked { min-height: 64px; display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; padding: 8px 0; }
.day .grow { display: flex; flex-direction: column; }
.day.locked { color: var(--muted); }
.day-n { width: 36px; height: 36px; border-radius: 50%; background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow); display: grid; place-items: center;
  font-weight: 600; flex: none; }
.item { min-height: 72px; color: var(--fg); text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--line); }
/* строка-кнопка (выдача поиска, выбор списка) — без рамки и фона браузера */
button.item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; }
.item .cover { width: 64px; height: 64px; aspect-ratio: 1; border-radius: var(--r); flex: none; }
.item .grow { display: flex; flex-direction: column; }
.video { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); aspect-ratio: 16 / 9; }
.video:empty { display: none; }
.prose ul { margin: 0; padding-left: 1.2em; }
.prose p + p, .prose p + ul { margin-top: 8px; }

/* Главная */
a.card { color: var(--fg); text-decoration: none; }
.today h2 { font-size: 1.6rem; }
.today .btn { margin-top: 8px; }
.banner { border-left: 3px solid var(--danger); }
.btn-small { min-height: 36px; padding: 0 14px; }
.ring { --p: 0; width: 48px; height: 48px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0);
  -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }

/* Оплата, профиль */
.price { font-size: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field textarea, .field select { width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: var(--r);
  border: 1px solid var(--glass-line); background: var(--glass-flat); box-shadow: inset 0 1px 2px rgb(46 35 28 / .06);
  color: var(--fg); font: 1rem/1.4 var(--body); }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: var(--tap); padding: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.reasons { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.form-err { color: var(--danger); font-size: .92rem; }
/* Единица внутри поля («ккал»): подпись поля без повтора единицы */
.with-unit { position: relative; display: block; }
.with-unit input { padding-right: 56px; }
.with-unit .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* Режим тренировки */
.sets-head, .set-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 72px 60px 44px; gap: 8px; align-items: center; }
.sets-head { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.sets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.set-row { min-height: 52px; }
.set-n { width: 36px; height: 44px; border-radius: var(--r); border: 0; background: var(--glass); box-shadow: inset 0 1px 0 var(--glass-edge);
  color: var(--fg); font: 700 .95rem var(--body); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.set-row[data-kind="warmup"] .set-n { color: var(--muted); }
.set-row[data-kind="failure"] .set-n, .set-row[data-kind="drop"] .set-n { color: var(--danger); }
.set-prev { min-height: 44px; border: 0; background: none; color: var(--muted); font: 500 .92rem var(--body); text-align: left;
  padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-in { min-height: 44px; width: 100%; text-align: center; border-radius: var(--r); border: 1px solid var(--glass-line);
  background: var(--glass-flat); box-shadow: inset 0 1px 2px rgb(46 35 28 / .06); color: var(--fg); font: 600 1rem var(--body);
  font-variant-numeric: tabular-nums; }
.set-ok { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass);
  box-shadow: inset 0 1px 0 var(--glass-edge); color: var(--muted); font: 700 1.1rem var(--body); }
.set-row[data-done="true"] .set-ok { background: var(--gloss); color: var(--on-accent); border-color: transparent; box-shadow: var(--gloss-shadow); }
.set-row[data-done="true"] .set-in { color: var(--muted); }
.kind-menu { gap: 0; padding: 6px; }
.kind-menu button { min-height: 44px; border: 0; background: none; text-align: left; padding: 0 12px; border-radius: var(--r);
  color: var(--fg); font: 600 1rem var(--body); }
.kind-menu button[aria-checked="true"] { background: var(--glass-flat); color: var(--accent); }
.kind-menu button.danger { color: var(--danger); border-top: 1px solid var(--glass-line); border-radius: 0 0 var(--r) var(--r); }
.rest { position: sticky; bottom: calc(140px + var(--safe-b)); z-index: 5; flex-direction: row; flex-wrap: wrap;
  align-items: baseline; gap: 4px 12px; }
.rest [role="timer"] { font: 700 1.6rem var(--body); font-variant-numeric: tabular-nums; }
.rest-btns { display: flex; gap: 8px; width: 100%; }
.rest-btns .btn { flex: 1; }
.btn-chip { min-height: 44px; padding: 0 10px; font-size: .9rem; }
.btn-add { align-self: flex-start; min-height: 44px; border-style: dashed; }
.banner-run { border-left: 3px solid var(--accent); color: var(--fg); text-decoration: none; }

/* История и рост */
.chart { width: 100%; height: auto; display: block; margin-top: 8px; overflow: visible; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-pt { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.chart-tick { fill: var(--muted); font: 500 11px var(--body); }
.chart-last { fill: var(--fg); font: 700 12px var(--body); }
.records .row { min-height: 32px; }
.log-session { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* Питание: счётчик, поиск, граммы */
.big { font: 600 1.6rem var(--display); }
.center { text-align: center; }
.date-nav .btn { min-width: 44px; justify-content: center; }
.macro { display: flex; flex-direction: column; gap: 4px; }
.day-rings { gap: 18px; align-items: center; }
.meal.meal-empty { flex-direction: row; text-align: left; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--glass-flat); }
.meal.meal-empty h2, .meal.card h2 { font-size: 1rem; margin: 0; text-align: left; }
.meal.card { text-align: left; }
.meal.card .entry-row { background: color-mix(in srgb, #fff 72%, var(--bg)); }
.meal.card .entry:last-child { border-bottom: 0; }
.meal-icon { flex: none; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.meal-icon .ico { width: 18px; height: 18px; }
.meal-total { font-weight: 700; white-space: nowrap; }
.meal-fold { transition: transform .2s ease; }
.meal-fold[aria-expanded="false"] { transform: rotate(-90deg); }
.meal-macros { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 6px; margin: 8px 0; text-align: center; }
.meal-macros > div { display: flex; flex-direction: column; padding: 6px 4px; border-radius: var(--r); background: var(--glass-flat); }
.meal-macros .meta { font-size: .72rem; }
.macro-line { display: flex; gap: 8px; font-size: .75rem; }
.meal-actions { gap: 8px; margin-top: 8px; }
.kcal-ring { position: relative; flex: none; display: grid; place-items: center; }
.kcal-left { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.kcal-left b { font-family: var(--display); font-size: 1.9rem; }
.kcal-left span { color: var(--muted); font-size: .8rem; }
.kring .track { stroke: var(--line); }
.kring circle + circle { stroke: var(--accent); transition: stroke-dashoffset .4s ease; }
.kring.protein circle + circle { stroke: #c9825a; }
.kring.fat circle + circle { stroke: #c9a24a; }
.kring.carbs circle + circle { stroke: #6f9e8a; }
.macro-ring { display: flex; align-items: center; gap: 10px; }
.macro-ring > span { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.macro-ring .sub { width: 100%; font-size: .78rem; }
.macro-ring .label { white-space: nowrap; }
@media (max-width: 359px) {  /* 320 px: число и подпись кольца — одной строкой */
  .day-rings { gap: 12px; }
  .kcal-ring svg { width: 96px; height: 96px; }
  .kcal-left b { font-size: 1.6rem; }
  .macro-ring { gap: 8px; }
  .macro-ring svg { flex: none; }
  .macro-ring > span { column-gap: 4px; }
  .macro-ring .label { font-size: .68rem; letter-spacing: .04em; }
}
.extra-toggle { width: 100%; min-height: var(--tap); padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.extra-toggle .meta { display: block; }
.extra-toggle[aria-expanded="true"] > span:last-child { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .kring circle + circle { transition: none; } }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.meal { display: flex; flex-direction: column; gap: 4px; }
.meal h2 { font-size: 1.15rem; }
.btn-plus { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.3rem; justify-content: center; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, transparent); color: var(--accent); border-color: transparent; box-shadow: none; }
.entry { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.entry-row { position: relative; z-index: 1; background: var(--bg); min-height: 56px; padding: 8px 0; transition: transform .2s ease; touch-action: pan-y; cursor: pointer; }
.entry-row.dragging { transition: none; }
.entry-del { position: absolute; inset: 0 0 0 auto; width: 72px; display: grid; place-items: center; border: 0; background: var(--danger); color: #fff; font: 600 .9rem var(--body); }
.brand { color: var(--muted); font-weight: 400; }
.search { min-height: 48px; border-radius: var(--r); border: 1px solid var(--glass-line); background: var(--glass-flat); padding: 0 14px; font: 1rem var(--body); color: var(--fg); width: 100%; }
/* идёт поиск (М-У3): бегущая полоска по нижнему краю поля, как у Telegram и Yazio */
.search[aria-busy="true"] { background-image: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 2px; background-repeat: no-repeat; background-position: -40% calc(100% - 1px); animation: search-busy 1s linear infinite; }
@keyframes search-busy { to { background-position: 140% calc(100% - 1px); } }
@media (prefers-reduced-motion: reduce) { .search[aria-busy="true"] { animation: none; background-size: 100% 2px; background-position: 0 calc(100% - 1px); opacity: .85; } }
.grams { font: 600 2rem var(--display); text-align: center; min-height: 56px; }
.kcal-card > a { color: var(--fg); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .entry-row { transition: none; } }
a.chip { display: inline-flex; align-items: center; text-decoration: none; min-height: 44px; }

/* Комната эфира: видео сверху, чат снизу; горизонталь — «кинотеатр» (видео на весь экран, чат скрыт) */
.live { display: flex; flex-direction: column; gap: 12px; }
.live [hidden] { display: none !important; }
.live-stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  display: grid; place-items: center; }
.live-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.live-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-stage[data-state="paused"] iframe { filter: grayscale(.6) brightness(.7); }
.live-countdown { position: relative; font: 600 1.1rem var(--display); text-align: center; padding: 0 16px; }
.live-sound { position: absolute; left: 12px; bottom: 12px; }
.live-pin p { margin: 4px 0 0; }
.live-reactions .chip { min-height: 44px; }
.live-chat { display: flex; flex-direction: column; gap: 10px; max-height: 45vh; overflow-y: auto; overscroll-behavior: contain; }
.msg { display: flex; gap: 10px; align-items: flex-start; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.msg p { margin: 2px 0 0; user-select: text; overflow-wrap: anywhere; }
.msg .avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--glass); object-fit: cover; }
.badge { font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.msg-actions { margin-top: 6px; gap: 8px; }
.row.wrap { flex-wrap: wrap; gap: 8px; }
/* Поле ввода с круглой кнопкой внутри (founder 29.10, как Telegram / iMessage): капсула, стрелка справа; пустое поле —
   кнопка тихая, есть текст — акцентная */
.composer { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 4px 4px 4px 16px; border-radius: 999px;
  border: 1px solid var(--glass-line); background: var(--glass-flat); box-shadow: inset 0 1px 2px rgb(46 35 28 / .06); }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.composer input { flex: 1 1 auto; min-width: 0; min-height: 38px; border: 0; background: none; padding: 0; outline: none;
  font: 1rem var(--body); color: var(--fg); }
.round-send { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  position: relative; background: var(--gloss); color: var(--on-accent); box-shadow: var(--gloss-shadow); transition: opacity .15s, transform .12s; }
.round-send::after { content: ""; position: absolute; inset: -3px; }
.round-send .ico { width: 18px; height: 18px; }
.round-send:active { transform: scale(.94); }
.composer:has(input:placeholder-shown) .round-send[type="submit"] { background: var(--track); color: var(--muted); box-shadow: none; }
.round-send[type="button"] { background: none; color: var(--muted); box-shadow: none; }
.live-ctl { align-items: center; }
/* «Чат» — переключатель справа в ряду пульта, без рамки (как в настройках iOS) */
.live-ctl .live-chat-sw { margin-left: auto; min-height: 36px; padding: 0; border: 0; background: none; font-weight: 500; }
.live-reactions .chip { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
/* число в строке (день участницы): как поля форм, узко и по центру */
.num-inline { width: 5.5rem; min-height: 40px; padding: 0 10px; text-align: center; border-radius: var(--r); border: 1px solid var(--glass-line);
  background: var(--glass-flat); box-shadow: inset 0 1px 2px rgb(46 35 28 / .06); color: var(--fg); font: 1rem var(--body); }
@media (orientation: landscape) and (max-height: 500px) {
  .live-stage { position: fixed; inset: 0; z-index: 50; border-radius: 0; aspect-ratio: auto; }
  .live > :not(.live-stage) { display: none; }
}

/* Документы: длинный текст с таблицей и пометкой «черновик» */
.doc blockquote { margin: 0; padding: 12px 14px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--glass-line); }
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.doc table { border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
/* «Кухня»: сетка рецептов, шторка фильтров, категории */
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip-own { border-style: dashed; }
/* «Сбросить ✕»: тише выбранных фильтров — текстом с крестиком, без заливки */
.chip-reset { flex: none; background: none; border-color: transparent; box-shadow: none; color: var(--muted); font-weight: 500; padding: 0 10px; }
.chip-reset span { margin-left: 2px; }
.chip .x { margin-left: 6px; font-size: .8em; opacity: .7; }
.recipe-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recipe-card { display: flex; flex-direction: column; gap: 4px; color: var(--fg); text-decoration: none; }
.source-text { white-space: pre-line; color: var(--muted); font-size: .92rem; }
.embed { width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; border: 0; border-radius: var(--r); background: var(--surface); }
.scan-video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); background: #000; }
.recipe-card .cover { aspect-ratio: 4 / 3; }
.recipe-title { font-weight: 600; line-height: 1.25; }
.recipe-grid .empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-tile { min-height: 72px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 12px;
  border-radius: var(--r); border: 1px solid var(--glass-line); background: var(--glass); color: var(--fg); font: inherit; text-align: left; }
dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 88vh; border: 0; padding: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--bg); color: var(--fg); box-shadow: var(--glass-shadow); }
dialog.sheet::backdrop { background: rgb(0 0 0 / .35); }
#menu > form { padding: 16px 16px calc(16px + var(--safe-b)); }
.sheet-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px calc(16px + var(--safe-b)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; }
.sheet-group h3 { margin: 0 0 8px; font-size: .95rem; }
.sheet-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding-top: 8px; background: var(--bg); }
.capsules { display: flex; flex-wrap: wrap; gap: 6px; }
.capsule { padding: 4px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-size: .9rem; }
.own-version { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.actions { gap: 8px; }
html.cooking { --bg: #141110; --fg: #f3ebe2; --muted: #bfb0a3; background: #141110; }
html.cooking body { background: #141110; color: #f3ebe2; }
html.cooking .tabs { display: none; }
.cook { min-height: calc(100dvh - 48px - var(--safe-b)); display: flex; flex-direction: column; gap: 20px; }
.cook-top { display: flex; align-items: center; justify-content: space-between; }
.cook-top .round-btn { background: rgb(255 255 255 / .08); color: inherit; border-color: transparent; }
.cook-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.cook-text { font: 600 1.7rem/1.3 var(--display); text-wrap: pretty; }
.cook-timer .btn { gap: 8px; background: rgb(255 255 255 / .08); color: inherit; border-color: transparent; }
.cook-nav { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.cook-nav .btn-primary { min-height: 56px; font-size: 1.05rem; }
.cook-nav .link-btn { align-self: center; min-height: 44px; }
.cook-timer { display: flex; align-items: center; gap: 14px; }
.cook-timer b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }

/* «Кухня» → планы (К§4) */
.plan-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.plan-grid .cover { aspect-ratio: 16 / 9; }
.week-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.btn-link { background: none; border: 0; padding: 0; min-height: 44px; text-align: left; color: var(--fg); font: inherit; cursor: pointer; }
.day-strip { display: flex; gap: 6px; margin: 0 -16px; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-chip { flex: 0 0 52px; scroll-snap-align: start; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 14px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--fg); font: inherit; font-size: 12px; cursor: pointer; }
.day-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-color: transparent; box-shadow: none; }
.day-chip .badge { min-width: 18px; border-radius: 9px; font-size: 11px; line-height: 18px; opacity: .8; }

/* «Кухня» → покупки (К§5.1) */
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.shop-row .row { align-items: center; gap: 8px; }
.shop-row .check { width: 24px; height: 24px; margin: 10px; accent-color: var(--accent, currentColor); flex: none; }
.shop-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.shop-name .src { font-size: 12px; }
.shop-row.done .shop-name b { text-decoration: line-through; opacity: .55; }
.shop-edit { padding: 8px 0 12px 44px; gap: 10px; }
.shop-edit .qty-row { gap: 10px; }
.shop-edit .chip { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
.shop-edit .qty-val { min-width: 72px; text-align: center; }
.shop-head { gap: 8px; align-items: center; margin-top: 4px; }
.list-pick { flex: 1; display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 6px; min-width: 0; padding: 8px 0; border: 0; background: none;
  color: var(--fg); font: 700 1.1rem var(--body); text-align: left; cursor: pointer; }
.list-pick b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-pick .ico { color: var(--muted); }
.list-row { justify-content: flex-start; gap: 8px; text-align: left; }
.list-row[aria-current="true"] { border-color: var(--accent, currentColor); }
.search-row { gap: 8px; align-items: center; }
.sale-row { flex: 1; display: flex; flex-direction: row; align-items: center; gap: 8px; text-align: left; }
.cover-letter { aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: var(--radius, 16px); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-size: 2.5rem; font-weight: 700; }
.recipe-card .badges { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.badge-soft { background: var(--glass); color: var(--fg); border: 1px solid var(--glass-line); }
.recipe-card .src { font-size: .75rem; color: var(--muted, inherit); }

/* Раздел «Питание» (В-1): вкладки текстом, выбранная — тонкой линией акцента снизу (founder 29.10, вариант A) */
.food-head { gap: 12px; }
.food-head h1 { margin: 0; }
.food-tabs, .tabs-line { gap: 20px; border-bottom: 1px solid var(--line); }
.tabs-line { display: flex; overflow-x: auto; scrollbar-width: none; }
:is(.food-tabs, .tabs-line) .chip { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 2px; min-height: 40px;
  color: var(--muted); font-weight: 500; position: relative; flex: none; }
:is(.food-tabs, .tabs-line) .chip:is([aria-current="page"], [aria-pressed="true"]) { background: none; color: var(--fg); font-weight: 650; }
:is(.food-tabs, .tabs-line) .chip:is([aria-current="page"], [aria-pressed="true"])::after { content: ''; position: absolute; left: 0; right: 0;
  bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
label.chip:has(> input:checked) { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-color: transparent; box-shadow: none; }

/* «Рецепты» (опись §1): круглая воронка со счётчиком, разделитель ряда, карточка-фото с текстом на затемнении */
.chip-round { position: relative; width: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chip-round .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font: 700 .7rem/18px var(--body); }
.chip-sep { flex: none; width: 1px; align-self: stretch; margin: 8px 2px; background: var(--line); }
.section-title { margin: 4px 0 0; font-size: 1.15rem; }
.recipe-photo { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; gap: 0; container-type: inline-size; }
.recipe-photo .cover { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; }
/* затемнение — у самого блока текста, а не в процентах карточки (founder 29.10, 20 блюд с фото): растёт вместе
   с текстом на любой ширине; белый текст читается и на белом фото — контраст ≥ 4,5 (kitchen_library.test.mjs) */
.recipe-photo .photo-text { position: relative; z-index: 1; margin-top: auto; padding: 36px 12px 12px; display: flex;
  flex-direction: column; gap: 6px; color: #fff;
  background: linear-gradient(rgb(30 18 10 / 0), rgb(30 18 10 / .72) 32px, rgb(30 18 10 / .86)); }
.recipe-photo .recipe-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recipe-photo .kcal { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; }
.recipe-photo .kcal .ico { width: 14px; height: 14px; }
.recipe-photo .macros { display: flex; flex-wrap: nowrap; gap: 4px; }
.recipe-photo .macros span { padding: 2px 6px; border-radius: 6px; background: rgb(255 255 255 / .22); font-size: .72rem; font-weight: 700;
  white-space: nowrap; }
/* узкая карточка (две в ряд на 320–360): Б·Ж·У одной строкой и при трёхзначных граммах */
@container (max-width: 160px) {
  .recipe-photo .photo-text { padding: 32px 10px 10px; gap: 4px; }
  .recipe-photo .recipe-title { font-size: .9rem; line-height: 1.25; }
  .recipe-photo .macros { gap: 3px; }
  .recipe-photo .macros span { padding: 2px 4px; font-size: .66rem; }
}
/* Шторка фильтров (опись §1.1): ручка сверху, второй уровень — стрелка назад, норма — строка-переключатель */
.sheet-handle { width: 40px; height: 5px; margin: 8px auto 0; border-radius: 999px; background: var(--line); }
.sheet-head { gap: 10px; }
.switch-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--glass-line); background: var(--glass); color: var(--fg); font: 600 .95rem var(--body); text-align: left; cursor: pointer; }
.switch-row::after { content: ""; margin-left: auto; flex: none; width: 44px; height: 26px; border-radius: 999px;
  /* ползунок — белый кружок (founder 29.10: без него включённый переключатель похож на пятно), как в iOS */
  background: radial-gradient(circle at 13px 50%, #fff 0 10px, transparent 10.5px), var(--line);
  box-shadow: inset 0 1px 2px rgb(46 35 28 / .12); transition: background .2s; }
.switch-row[aria-checked="true"]::after { background: radial-gradient(circle at calc(100% - 13px) 50%, #fff 0 10px, transparent 10.5px), var(--gloss); }
/* «Категории» (опись §1.2): ← слева и заголовок по центру, плитки типов со значком */
.cat-head { flex-direction: row; align-items: center; position: relative; min-height: 44px; }
.cat-head h1 { position: absolute; left: 56px; right: 56px; margin: 0; text-align: center; font-size: 1.35rem; }
.cat-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--accent); }
.cat-ico svg { width: 24px; height: 24px; }
.cat-grid .cat-tile { min-height: 132px; justify-content: flex-start; gap: 8px; }
/* Карточка рецепта (опись §1.3): кнопки на обложке, капсулы со значком, ряд действий значками, КБЖУ сеткой */
.recipe-hero { position: relative; margin: 0 -16px; }
.recipe-hero .cover { border-radius: 0 0 var(--r-lg) var(--r-lg); aspect-ratio: 4 / 3; }
.cover-bar { position: absolute; inset: 12px 16px auto; display: flex; gap: 8px; }
.round-btn { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-line); background: var(--glass); color: var(--fg); box-shadow: inset 0 1px 0 var(--glass-edge); backdrop-filter: blur(12px); }
.round-btn.small { width: 36px; height: 36px; }
.round-btn.danger { color: #a3412f; }
.round-btn:disabled { opacity: .4; }
.capsules { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.capsule { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 12px; border-radius: 999px / 48px; font-size: 1rem; }
.capsule b { font-size: 1.15rem; }
.capsule small { font-size: .72rem; color: var(--muted); }
.cap-ico { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--bg); }
.icon-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.icon-actions button { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  border-radius: var(--r); border: 1px solid var(--glass-line); background: var(--glass); color: var(--fg); font: 600 .78rem var(--body); }
.icon-actions button[aria-pressed="true"] svg { fill: currentColor; color: var(--accent); }
.servings-card { align-items: center; gap: 12px; }
.kbju-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; }
.kbju-grid span { display: flex; flex-direction: column; gap: 2px; }
.kbju-grid span + span { border-left: 1px solid var(--line); }
.kbju-grid small { font-size: .75rem; color: var(--muted); }
.link-btn { align-self: center; border: 0; background: none; color: var(--accent); font: 700 .9rem var(--body); cursor: pointer; padding: 8px; }
.link-btn:disabled { opacity: .4; cursor: default; }
.kbju-card { gap: 6px; }
/* зоны рецепта (спека зон §2, макет docs/mockups/recipe-zones.html без значков): название · количество колонкой · «⋯»;
   акцент — только у «Добавить» и основной кнопки */
.zone-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 40px; }
.zone-head h2 { flex: 1; margin: 0; }
.zone-head .meta { font-size: .85rem; }
@media (max-width: 340px) { .zone-head { flex-wrap: wrap; row-gap: 8px; } .zone-head .serv { order: 2; } }
.serv { display: inline-flex; align-items: center; border-radius: 999px; background: var(--track); border: 1px solid var(--track-edge); }
.serv button { width: 44px; height: 44px; border: 0; background: none; color: var(--fg); display: grid; place-items: center; }
.serv button:disabled { opacity: .35; }
.serv > span, .serv output { min-width: 5.2em; text-align: center; font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.zcard { padding: 4px 0; overflow: hidden; gap: 0; }
.zcard ul, .steps-z ol { list-style: none; margin: 0; padding: 0; }
.ing-r { display: grid; grid-template-columns: 1fr auto 32px; column-gap: 12px; align-items: center; padding: 10px 6px 10px 16px;
  min-height: 56px; box-sizing: border-box; position: relative; }
.ing-r + .ing-r::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--line); }
.ing-r .nm { min-width: 0; font-size: 1rem; font-weight: 500; line-height: 1.3; overflow-wrap: break-word; hyphens: manual; color: var(--fg); }
a.nm { text-decoration: none; }
a.nm::after { content: ""; position: absolute; inset: 0; }  /* вся строка — ссылка */
.nm small { display: block; font-weight: 500; font-size: .78rem; color: var(--muted); margin-top: 3px; }
.nm small.warn, .warn-t { color: var(--warn); }
.warn-t { margin: 0; font-weight: 500; }
.q { text-align: right; font-weight: 600; font-size: .95rem; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.q.guess { color: var(--muted); }
.q.need { color: var(--muted); font-weight: 500; }
.dots { width: 32px; height: 44px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; margin-left: -4px; padding: 0; }
.dots svg { width: 22px; height: 22px; stroke-width: 3; }
.add-r { grid-column: 1 / -1; display: flex; align-items: center; min-height: 36px; border: 0; background: none; padding: 0; text-align: left;
  color: var(--accent); font: 600 1rem var(--body); }
.zone-empty { margin: 0; padding: 0 16px 12px; font-size: .85rem; }
.pantry { display: flex; gap: 14px; align-items: center; width: 100%; padding: 12px 16px 14px; margin-top: 2px; border: 0; text-align: left;
  font: inherit; background: color-mix(in srgb, var(--surface) 45%, transparent); }
.pantry .meta { font-size: .85rem; } .pantry b { color: var(--fg); font-weight: 600; }
button.pantry { min-height: 44px; }
.steps-z { padding: 18px 0 14px; gap: 0; }
.st { display: grid; grid-template-columns: 22px 1fr; column-gap: 16px; padding: 0 16px; position: relative; }
.st .n { font: 600 1.15rem/1.4 var(--display); color: var(--muted); padding-top: 1px; }
.st p, .st .st-t { margin: 0; line-height: 1.55; padding-bottom: 18px; overflow-wrap: break-word; min-width: 0; }
.st .st-t { border: 0; background: none; text-align: left; font: inherit; color: var(--fg); min-height: 44px; padding-top: 0; }
.st-add .n, .st-add .st-t { color: var(--accent); font-weight: 600; }
.st:last-child p, .st:last-child .st-t { padding-bottom: 4px; }
.st + .st { padding-top: 18px; }
.st + .st::before { content: ""; position: absolute; top: 0; left: 54px; right: 16px; border-top: 1px solid var(--line); }
/* шторки зон */
.ing-sub { margin: -8px 0 0; }
.big { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 12px; }
.big > .btn { width: 52px; min-height: 52px; padding: 0; }
.big-v { position: relative; }
.big-v .grams { font: 600 1.6rem var(--display); text-align: center; padding: 0 44px; min-height: 52px; }
.big-v .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 500 1rem var(--body); color: var(--muted); }
.two { display: flex; gap: 10px; } .two .btn { flex: 1; }
.pantry-list { list-style: none; margin: 0; padding: 0; }
.pantry-list li { min-height: 52px; }
.pantry-list li + li { border-top: 1px solid var(--line); }
/* форма своего блюда строками (спека зон §4): «название — значение ›», выбор в шторке */
.tinput { width: 100%; box-sizing: border-box; border: 0; background: none; font: 600 1.1rem var(--body); color: var(--fg); padding: 16px;
  min-height: 56px; border-radius: var(--r-lg); }
.frow { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; position: relative; width: 100%; box-sizing: border-box;
  border: 0; background: none; font: inherit; color: var(--fg); text-align: left; }
.frow + .frow::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--line); }
/* подпись уступает место короткому значению («не указано» целиком, подпись — в две строки на 320); длинное значение — с … */
.frow > b { font-weight: 500; flex: 0 1 auto; min-width: 0; }
.frow .serv { margin-left: auto; }
.frow .val { flex: 1 1 auto; min-width: 5.6em; text-align: right; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .val.on { color: var(--fg); font-weight: 600; }
.frow .chev { flex: none; color: var(--muted); width: 18px; height: 18px; }
.tgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wrapchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tgrid .chip { min-height: 44px; padding: 0; border-radius: var(--r); justify-content: center; font-variant-numeric: tabular-nums; }
.wrapchips .chip { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.chip .tick { display: none; } .chip .tick svg { width: 16px; height: 16px; }
.chip[aria-pressed="true"] .tick { display: inline-flex; }
.chip:disabled { opacity: .4; cursor: default; }
.hint { font-size: .8rem; color: var(--muted); margin: 0 4px; }
.hint:empty { display: none; }
.details { display: grid; gap: 6px; margin: 0; }
.details div { display: flex; gap: 8px; } .details dt { flex: 1; } .details dd { margin: 0; }
.ing-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--accent); }
.btn-dashed { border-style: dashed; background: transparent; }
.notes summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; list-style: none; }
.notes[open] textarea { margin-top: 10px; }
/* «Поделиться рецептом» (опись §1.3, снимок 31): экран-шторка на всю высоту, превью трёх форматов */
dialog.share-screen { max-height: 100dvh; height: 100dvh; border-radius: 0; }
.share-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; }
.share-head h2 { text-align: center; font-size: 1.15rem; }
.share-screen .switch-row span { display: flex; flex-direction: column; }
.share-screen .switch-row small { font-weight: 400; font-size: .78rem; }
.share-screen .btn .ico { width: 18px; height: 18px; }
.share-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: start; }
.share-tile { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer; font: inherit; }
.share-prev { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 10px; aspect-ratio: 4 / 5;
  border-radius: var(--r); overflow: hidden; color: #fff; text-align: left;
  background: linear-gradient(180deg, rgb(30 22 16 / 0) 40%, rgb(30 22 16 / .78)), var(--img, linear-gradient(135deg, #f3e7da, #d9c2ad));
  background-size: cover; background-position: center; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.share-stories .share-prev { aspect-ratio: 9 / 16; }
.share-prev small { position: absolute; top: 8px; left: 10px; font-size: .62rem; font-weight: 600; opacity: .9; }
.share-prev b { font: 600 .82rem/1.15 var(--display); }
.share-prev .share-kbju { font-size: .62rem; opacity: .9; }
.share-tile[aria-checked="true"] .share-prev { outline-color: var(--accent); }
.share-cap { font-size: .8rem; font-weight: 600; text-align: center; }
/* шторка замены: «Похожие по КБЖУ» — строка со значком, справа «≈ та же норма» */
.near-list { gap: 8px; }
button.near-item { gap: 12px; min-height: 60px; padding: 10px 14px; border: 1px solid var(--glass-line); border-radius: var(--r); background: var(--glass); }
.near-item .meta { flex: none; font-size: .8rem; }
/* «Планы» (опись §2, снимки 06–08): витрина стартов, шапка плана, блоки приёмов, плитки недели */
.plans-lead h2 { font-size: 1.25rem; }
.norm-plate { margin: 0; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--glass-line); background: color-mix(in srgb, var(--ok) 12%, var(--glass));
  color: var(--fg); font-size: .85rem; font-weight: 600; }
.plan-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; color: var(--fg); text-decoration: none; }
.plan-card .cover { aspect-ratio: 16 / 9; border-radius: calc(var(--r) - 4px); }
.plan-card-body { gap: 6px; }
.plan-card-kbju { flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 600; }
/* Б · Ж · У — всегда одной строкой: три таблетки помещаются от 320px, перенос рвёт ряд (founder 29.10) */
.macro-chips { display: inline-flex; flex-wrap: nowrap; white-space: nowrap; gap: 4px; font-size: .72rem; font-weight: 700; }
.macro-chips > span { padding: 1px 7px; border-radius: 6px; }
.m-p { background: color-mix(in srgb, #c2553b 14%, transparent); color: #a3402c; }
.m-f { background: color-mix(in srgb, #c4902c 16%, transparent); color: #8a6214; }
.m-c { background: color-mix(in srgb, #3f7f73 14%, transparent); color: #2f6b5f; }
:root[data-theme="dark"] .m-p { color: #e7a08e; } :root[data-theme="dark"] .m-f { color: #e3c07a; } :root[data-theme="dark"] .m-c { color: #8fc7bb; }
.tabs-line { display: flex; border-bottom: 1px solid var(--line); }
.tabs-line button { flex: 1; min-height: 44px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none;
  color: var(--muted); font: 600 .9rem var(--body); cursor: pointer; }
.tabs-line button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.plan-head { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--glass);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); }
.plan-head h1 { font-size: 1.4rem; margin: 0; }
.plan-head p { margin: 0; }
.plan-title { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.plan-title .ico { width: 18px; height: 18px; color: var(--muted); }
.badge-active { flex: none; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, transparent); }
.badge-active::before { content: "● "; }
.plan-day-kbju { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plan-day-h { font-size: 1.2rem; }
.meal-block { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.plan-dishes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan-dish { display: flex; align-items: center; gap: 12px; }
.plan-dish + .plan-dish { padding-top: 10px; border-top: 1px solid var(--line); }
.stack-tight { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-dish-act { display: flex; align-items: center; gap: 6px; flex: none; }
/* «Рецепт →» светлой кнопкой, как в прототипе (снимок 06); ✓ «В дневник» — круглой, отмеченная — зелёной */
.btn-soft { background: var(--surface); color: var(--fg); box-shadow: none; text-shadow: none; border-color: var(--line); }
.diary-btn[aria-pressed="true"] { background: var(--ok); color: var(--on-accent); border-color: transparent; }
a.plain { color: inherit; text-decoration: none; }
.row-meal { font-size: .66rem; }
.kbju-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.meal-head { align-items: center; }
.check-line { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.dock.stack { gap: 8px; }
.dock .row > .btn:not(.grow) { flex: none; }
.month-week { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; font: inherit; color: var(--fg); cursor: pointer; }
.month-week > .ico { flex: none; color: var(--muted); }
/* Б Ж У в плитке недели — в один ряд (снимок 07) */
.meal-tile .macro-chips, .plan-dish .macro-chips { flex-wrap: nowrap; font-size: .64rem; gap: 3px; }
.meal-tile .macro-chips > span, .plan-dish .macro-chips > span { padding: 1px 4px; white-space: nowrap; }
.day-total { margin: 0; padding: 10px 14px; border-radius: var(--r); background: var(--surface); font-weight: 600; font-size: .9rem; }
.done-mark { color: var(--ok); font-weight: 700; }
.meal-tiles { list-style: none; margin: 0 -16px; padding: 2px 16px 4px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.meal-tiles > li { flex: 0 0 148px; scroll-snap-align: start; }
.meal-tile { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 10px; border-radius: var(--r); background: var(--surface);
  color: var(--fg); text-decoration: none; }
.meal-tile b { font-size: .85rem; line-height: 1.25; }
.tile-kcal { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: rgb(30 22 16 / .6); color: #fff; font-size: .72rem; font-weight: 700; }
/* календарь периода (снимки 09, 12): прошлые дни серые, сегодня обведён, отрезок подсвечен, концы — акцентом */
.calendar { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-lg); background: var(--glass);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head b { font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-wd { font-size: .7rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day { aspect-ratio: 1; min-height: 40px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--fg);
  font: 600 .9rem var(--body); font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-day:disabled { color: color-mix(in srgb, var(--muted) 45%, transparent); cursor: default; }
.cal-day[aria-current="date"] { border-color: var(--accent); }
.cal-day.in-range { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 6px; }
.cal-day.edge { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-color: transparent; box-shadow: none; font-weight: 700; }
/* «Мой план» (E6, снимок 11): «пусто» / «N блюд» в полосе дней, плитки первого дня рациона, пустая вкладка */
.day-count { font-size: .62rem; font-weight: 600; opacity: .8; white-space: nowrap; }
.ration-card .meal-tile { padding: 0; overflow: hidden; }
.ration-card .meal-tile .cover { aspect-ratio: 4 / 3; border-radius: 0; }
.ration-card .meal-tile > :not(.cover) { margin-inline: 10px; }
.ration-card .meal-tile b { margin-bottom: 10px; }
.ration-card .tile-kcal { margin-top: -30px; position: relative; }
.row-time { display: inline-flex; align-items: center; gap: 4px; }
.row-time .ico { width: 14px; height: 14px; }
.empty-note { padding: 18px 14px; text-align: center; border-radius: var(--r); border: 1px dashed var(--line); }
.empty-note p { margin: 4px 0 0; }
.plan-grid > li, .week-cards > li { min-width: 0; }  /* лента плиток не растягивает карточку шире экрана */
/* «Мои планы» (E5, снимок 10): активный — карточка с меткой, сохранённые — строки с датой справа */
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-active { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--fg); text-decoration: none;
  background: color-mix(in srgb, var(--ok) 10%, var(--glass)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.plan-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; }
.plan-saved > a { color: var(--fg); text-decoration: none; }
.plan-date { flex: none; font-size: .78rem; }
.plan-acts { width: 100%; justify-content: flex-end; gap: 8px; }
.sheet-head .btn-small { flex: none; width: auto; }
.plan-active, .plan-saved { flex-direction: row; text-align: left; align-items: center; }
.plan-active > .grow, .plan-saved > .grow { flex: 1; align-items: flex-start; }
/* «Мои рецепты» (снимки 13–15): плашка-обучение, кнопка-плюс, авто-полки строками, свои папки плитками, способы добавления */
.edu { position: relative; padding: 0; background: color-mix(in srgb, var(--accent) 8%, var(--glass)); }
.edu-body { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px 48px 14px 16px; border: 0; background: none;
  color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.edu-body b { font-weight: 600; line-height: 1.35; }
.edu-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.edu-icons span { padding: 4px 10px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-line); font-size: .72rem; font-weight: 600; color: var(--muted); }
.edu-x { position: absolute; top: 10px; right: 10px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tabs-h) + 12px + var(--safe-b)); z-index: 5; width: 56px; height: 56px; border-radius: 999px; border: 0;
  display: grid; place-items: center; background: var(--gloss); color: var(--on-accent); box-shadow: var(--gloss-shadow); cursor: pointer; }
.fab .ico { width: 26px; height: 26px; }
/* экран с круглым «+»: конец списка прокручивается выше кнопки (76 + 56 + 16) */
#screen:has(.fab) { padding-bottom: calc(148px + var(--safe-b)); }
.shelf-row, .add-way { display: flex; flex-direction: row; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; color: var(--fg); font: inherit;
  text-align: left; text-decoration: none; cursor: pointer; }
.folder-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.folder-tile { display: flex; align-items: flex-start; gap: 6px; padding: 12px; min-height: 84px; }
.folder-tile > button.grow { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: var(--fg);
  font: inherit; text-align: left; cursor: pointer; }
.folder-new { width: 100%; justify-content: center; align-items: center; border-style: dashed; color: var(--muted); font: 600 .9rem var(--body); cursor: pointer; }
.sheet-sub { margin: 6px 0 0; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.voice-time { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.6rem; margin: 8px 0; }
.rec-dot { width: 12px; height: 12px; border-radius: 999px; background: #c2412f; animation: rec 1s ease-in-out infinite alternate; }
@keyframes rec { to { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.switch-row.always { cursor: default; }
.switch-row.always::after { content: "✓"; width: auto; height: auto; background: none; box-shadow: none; color: var(--accent); font-size: 1.1rem; }
.share-screen .add-way { justify-content: flex-start; }
.way-text { display: flex; flex-direction: column; gap: 2px; }
.btn-danger { color: var(--danger, #a3412f); }
.store-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.store-card { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; }
.store-card.dragging { opacity: .85; box-shadow: var(--gloss-shadow); }
.drag-handle { flex: none; width: 32px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none;
  color: var(--muted); cursor: grab; touch-action: none; }
.store-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 0;
  border: 0; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.store-title { font-size: 1rem; }
a.round-btn { color: var(--fg); text-decoration: none; }
.entry-del .ico { width: 24px; height: 24px; }
#copied:empty { display: none; }
.entry-row .entry-more { min-height: 40px; min-width: 40px; margin-right: -8px; }
.btn-add-meal { border-style: dashed; color: var(--muted); background: transparent; box-shadow: none; }
.slot-row { justify-content: flex-start; gap: 12px; min-height: 52px; padding: 0 12px; text-align: left; }

/* «Добавить еду» = корзина (задача 140.4): шапка с ✕, чипы приёма, вкладки линией, строки с мягким «+»,
   корзина над Сканером, Поиском и «Ккал» — панель стоит внизу экрана над меню даже при коротком списке */
#screen:has(.add-dock) { min-height: 100dvh; padding-bottom: calc(56px + var(--safe-b)); gap: 16px; }
.add-dock { margin-top: auto; }
.add-head { gap: 8px; }
.add-head h1 { margin: 0; font-size: 1.35rem; }
.add-head > span.btn-icon { visibility: hidden; }
/* пять вкладок в ширину телефона от 320px: 14px, промежуток тянется; уже — прокрутка */
.add-tabs { gap: 14px; justify-content: space-between; }
.add-tabs .chip { font-size: .875rem; }
/* линия выбранной вкладки — тенью внутри: ::after обрезается прокруткой ряда */
.add-tabs .chip[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--accent); }
.add-tabs .chip[aria-pressed="true"]::after { content: none; }
.add-pane { display: flex; flex-direction: column; gap: 12px; }
.add-row { min-height: 64px; gap: 12px; align-items: center; }
.add-row .cover, .add-thumb { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.add-thumb { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent); }
.add-thumb .ico { width: 22px; height: 22px; }
.add-row .food-hit { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--fg); text-decoration: none; }
.add-row .food-hit b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-row .btn-plus { flex: none; }
.add-tools { gap: 4px; }
.basket { gap: 10px; }
.basket-chips { list-style: none; -webkit-mask-image: linear-gradient(to left, transparent, #000 24px);
  mask-image: linear-gradient(to left, transparent, #000 24px); }
.basket-chip { display: inline-flex; align-items: center; gap: 2px; padding: 0 2px 0 14px; flex: none; max-width: 70vw; min-height: 36px; }
.basket-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basket-chip .btn-icon { min-width: 36px; min-height: 36px; padding: 0; }
.basket-go { display: flex; justify-content: space-between; align-items: center; width: 100%; }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1) opacity(.6); }
/* «Описать» (140.5): крупная круглая кнопка микрофона по центру, под ней подпись */
.describe-mic { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.mic { width: 88px; height: 88px; border-radius: 999px; border: 0; display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 5%, transparent); }
.mic .ico { width: 36px; height: 36px; }
.mic:disabled { opacity: .5; }
.said { font-size: .8rem; font-style: italic; }
/* founder 29.10 (вариант Б): инструменты в ряд — круглые лаковые кнопки, подпись под ними, как быстрые действия
   банковских приложений. Один класс на всё приложение: «Добавить еду», «Список покупок» (пустой список, шторка) */
.round-tools { display: flex; justify-content: space-around; gap: 8px; }
.round-tools .btn { flex: 1 1 0; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 0; padding: 0;
  background: none; border: 0; box-shadow: none; font-size: .78rem; font-weight: 500; color: var(--fg); }
.round-tools .ico { box-sizing: border-box; width: 54px; height: 54px; padding: 15px; flex: none; border-radius: 50%;
  border: 1px solid transparent; background: var(--lac-btn); box-shadow: var(--lac-float); color: var(--accent); }
.round-tools .btn:active .ico { transform: scale(.96); }
/* Блюдо в корзину (140.6): степперы порций и граммов, итог карточкой */
.stepper { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.stepper .btn-icon { min-width: 40px; min-height: 40px; font-size: 1.2rem; }
.stepper input { width: 52px; min-height: 40px; text-align: center; font: 600 1.05rem var(--body); color: var(--fg);
  border: 1px solid var(--glass-line); border-radius: var(--r); background: var(--glass-flat); }
.stepper-val { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.dish-portions { gap: 12px; align-items: center; }
.dish-portions .grow, .dish-total { display: flex; flex-direction: column; gap: 2px; }
.dish-ing { min-height: 64px; gap: 4px; align-items: center; flex-wrap: wrap; }
.dish-chips { flex-basis: 100%; margin-top: -4px; }
.dish-ing .grow { min-width: 0; }
.dish-total b { font-weight: 600; }
/* ккал — обычным текстом рядом с БЖУ-«таблетками» (founder 29.10: калории без акцента) */
.kb-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.kb-kcal { font-size: .85rem; font-weight: 600; white-space: nowrap; }
/* История питания (140.7): среднее крупно, столбцы по дням с пунктиром нормы, строки дней */
.hist-avg { font-size: 1.15rem; font-weight: 600; }
.hist-sum .row { align-items: flex-start; gap: 12px; }
.hist-sum .grow { display: flex; flex-direction: column; }
.pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.kbars { position: relative; margin: 0; padding-bottom: 22px; }
.kbars-plot { position: relative; height: 150px; }
.kbars ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 6px; height: 100%; }
.kbars.month ol { gap: 2px; }
.kbars li { flex: 1; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.kbars li > .meta { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: .75rem; white-space: nowrap; }
.kbar { display: flex; align-items: flex-end; height: 100%; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.kbars.month .kbar { border-radius: 3px; }
.kbar i { display: block; width: 100%; border-radius: inherit; background: color-mix(in srgb, var(--accent) 55%, transparent); min-height: 0; }
.kbar.today i { background: var(--accent); }
.kbars-norm { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--fg) 35%, transparent);
  z-index: 1; pointer-events: none; }
.day-row, .ate-row { gap: 12px; align-items: center; min-height: 64px; }
.day-row .grow, .ate-row .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day-row .bar { margin-top: 4px; }
.day-kcal { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.day-kcal b { font-variant-numeric: tabular-nums; }
.nutr-row { gap: 12px; align-items: center; min-height: 52px; }
.nutr summary { list-style: none; cursor: pointer; }
.nutr summary::-webkit-details-marker { display: none; }
.nutr summary::after { content: ""; width: 7px; height: 7px; flex: none; border: solid var(--muted); border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg); transition: transform .2s; margin: -4px 2px 0 0; }
.nutr[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.nutr-val { flex: none; font-variant-numeric: tabular-nums; }
.nutr-src { padding: 4px 0 12px; }
.nutr-src .row { gap: 12px; min-height: 36px; align-items: center; }
.nutr-src .meta { font-variant-numeric: tabular-nums; flex: none; }
/* Вид карточки дня (140.8): дуги, шкалы, датчик; шторка выбора с маленькими рисунками */
.kcal-arc, .kcal-gauge { position: relative; display: grid; justify-items: center; }
.kcal-arc .kcal-left { bottom: 0; }
.kcal-gauge .kcal-left { position: static; margin-top: 2px; }
.macro-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.macro-arc, .macro-cell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.macro-arc > span, .macro-cell > span { display: flex; flex-direction: column; align-items: center; }
.macro-cell { padding: 10px 6px; border-radius: var(--r); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.kring path.track { stroke: var(--line); }
.kring path + path { stroke: var(--accent); transition: stroke-dashoffset .4s ease; }
.kring.protein path + path { stroke: #c9825a; } .kring.fat path + path { stroke: #c9a24a; } .kring.carbs path + path { stroke: #6f9e8a; }
.bar.protein i { background: #c9825a; } .bar.fat i { background: #c9a24a; } .bar.carbs i { background: #6f9e8a; }
.kgauge .track { stroke: var(--line); } .kgauge .fill { stroke: var(--accent); }
.kgauge .tick { stroke: var(--fg); stroke-width: 2; opacity: .4; }
.kgauge .needle { stroke: var(--fg); stroke-width: 3; stroke-linecap: round; } .kgauge .hub { fill: var(--fg); }
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.style-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: var(--r-lg);
  border: 1.5px solid var(--line); background: var(--glass); font: 600 .95rem var(--body); color: var(--fg); cursor: pointer; }
.style-opt[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }
.style-pic { height: 64px; display: grid; place-items: center; }
.style-pic .kgauge { width: 96px; height: 54px; }
.mini-bars { display: flex; flex-direction: column; gap: 6px; width: 80px; }
.mini-bars i { display: block; height: 6px; border-radius: 3px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .kring path + path { transition: none; } }
.dish-portions { padding-inline: 14px; }
.dish-portions .meta { white-space: nowrap; }
.dish-portions .stepper .btn-icon { min-width: 36px; }
.dish-portions .stepper input { width: 44px; }
/* «Нашли N рецептов» (задача 137): галочка, фото, название */
.found-row { gap: 12px; align-items: center; }
.found-row input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
/* «Нутриенты на порцию» (спека питания §4.2; founder 29.10 — свёрнуты, не «Состав»): 16 нутриентов строками, «мало данных» — мелко перед числом */
.micro-card { gap: 8px; }
.micro-card .nutr-row { min-height: 44px; }
.micro-card .nutr[open] .nutr-row { margin-bottom: 4px; }
.micro-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.micro-list li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.micro-list li:last-child { border-bottom: 0; }
.micro-list b { font-variant-numeric: tabular-nums; }
.micro-list small { white-space: nowrap; }
