/* AI Home, phone first. The brand sheet «Светлый шалфей» (style B): sage accent on a light sage ground, Manrope for
   titles and text, the signal colour for what runs low. */
@font-face {
  font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* Brand: ground #F4F6F2, card #FFFFFF, text #1E2A24, accent #3F5A4B, soft #DCE6DE, signal #B5762E, quiet text #5E6B63. */
  --bg: #F4F6F2; --card: #FFFFFF; --line: #E1E7E2; --line-soft: #ECF0EC; --line-strong: #D2DBD4; --tint: #F8FAF7;
  --text: #1E2A24; --text-2: #3A4740; --muted: #5E6B63; --faint: #67746C; --dim: #8D978F;
  --accent: #3F5A4B; --accent-hover: #2F4639; --accent-soft: #DCE6DE; --accent-line: #C3D2C7;
  --have-bg: #DCE6DE; --have: #2F4639; --low-bg: #F5E6D0; --low: #7E4E16; --out-bg: #F6DCD2; --out: #8C2F10;
  --warn-bg: #F7EAD6; --warn: #7E4E16; --edit-bg: #FAF0DF; --edit-line: #D9B27A; --edit: #5E3A0E;
  --signal: #B5762E; --chip: #E8EEE9; --danger: #9A3412; --danger-bg: #FBE4DC; --segment: #E5EBE6; --off: #C2CCC5;
  --radius: 16px; --tabs-h: 82px;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100dvh; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
body.sheet-open { overflow: hidden; overscroll-behavior: none; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
input, select, textarea { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); color: var(--text); }
input, select { height: 44px; padding: 0 12px; }
textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.loading { padding: 12px 0; }

/* Screen frame */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.screen.with-tabs { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
.top { padding: max(16px, env(safe-area-inset-top)) 20px 8px; display: flex; flex-direction: column; gap: 8px; }
.top h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.01em; }
.top > p { font-size: 14px; line-height: 20px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; text-decoration: none; color: var(--accent); font-size: 16px; font-weight: 600; }
.body { flex: 1; padding: 4px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.bar { position: sticky; bottom: 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; z-index: 5; }
/* Over the floating tabs the footer floats too: no strip of its own, just the button with a shadow. */
.with-tabs .bar { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: 0 12px 8px; background: transparent; border-top: 0; pointer-events: none; }
.with-tabs .bar > * { pointer-events: auto; }
.with-tabs .bar .primary { box-shadow: 0 10px 26px rgba(30, 42, 36, .2); }

/* The tabs: a floating island over the page. Scrolling down folds it into a mini island — icons only, smaller; scrolling
   back up or reaching the top unfolds it. */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 456px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid rgba(225, 231, 226, .9); border-radius: 30px; box-shadow: 0 12px 32px rgba(30, 42, 36, .16), 0 2px 6px rgba(30, 42, 36, .06); z-index: 10; transition: width .32s cubic-bezier(.3, .7, .3, 1), padding .32s ease, border-radius .32s ease; }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 0 5px; min-height: 52px; border-radius: 24px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; transition: min-height .32s ease, padding .32s ease, gap .32s ease; }
.tabs a.current { color: var(--accent); font-weight: 700; }
/* The current tab: a soft sage pill behind its icon, as the sage accent alone is close to the quiet grey. */

/* Sections and cards */
.section { display: flex; flex-direction: column; gap: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-head h2, .label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.rows { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 16px; min-height: 56px; }
.row + .row, .row-wrap + .row-wrap { border-top: 1px solid var(--line-soft); }
.row-wrap.open { background: var(--tint); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 17px; line-height: 22px; font-weight: 500; }
.row-sub { font-size: 14px; line-height: 19px; color: var(--muted); }
.row-amount { font-size: 16px; font-weight: 600; white-space: nowrap; }
.row-button { width: 100%; border: 0; background: transparent; text-align: left; color: var(--text); }
.row-main.row-button { padding: 4px 0; align-self: stretch; justify-content: center; }
.row-editor { padding: 2px 14px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.dashed { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 0 16px; border: 1.5px dashed var(--off); border-radius: var(--radius); text-decoration: none; color: var(--text-2); background: transparent; width: 100%; }
.add-dashed { text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 14px; border: 1.5px dashed #A9BCAE; background: transparent; color: var(--accent); font-size: 16px; font-weight: 600; width: 100%; }
.link-row { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--accent); font-size: 15px; font-weight: 600; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; }

/* Buttons */
.primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 16px; border: 0; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; }
.primary:hover { background: var(--accent-hover); }
.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); font-size: 16px; font-weight: 700; text-decoration: none; }
.secondary.small, .primary.small { min-height: 40px; font-size: 15px; border-radius: 12px; padding: 0 14px; width: auto; }
.outline { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); font-size: 16px; font-weight: 600; }
.text-button { border: 0; background: none; color: var(--accent); font-size: 15px; font-weight: 600; min-height: 40px; padding: 0 4px; display: inline-flex; align-items: center; gap: 6px; }
a.text-button { text-decoration: none; }
.text-button.danger { color: var(--danger); }
.text-button.plain { color: var(--text-2); }
.square { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--text); padding: 0; }
.icon-button { width: 40px; height: 44px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--text-2); padding: 0; }
.icon-button:disabled { color: var(--off); opacity: 1; }
.pair { display: flex; gap: 8px; }
.pair > :last-child { flex: 1; }

/* Small parts */
.pill { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.neutral { background: var(--chip); color: var(--text-2); }
.pill.have { background: var(--have-bg); color: var(--have); }
.pill.low { background: var(--low-bg); color: var(--low); }
.pill.out { background: var(--out-bg); color: var(--out); }
.pill.soft { background: var(--accent-soft); color: var(--have); }
.pill.edit { background: var(--edit-bg); color: var(--edit); }
.note { padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note.good { background: var(--accent-soft); color: var(--have); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--danger-bg); color: var(--out); }
.note.plain { background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; }
.chip { flex-shrink: 0; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-size: 15px; font-weight: 600; }
.chip.on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.segmented { display: flex; gap: 4px; padding: 4px; background: var(--segment); border-radius: 12px; }
.segmented button { flex: 1; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-size: 15px; font-weight: 500; }
.segmented button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(28, 31, 29, 0.12); }
.segmented a { flex: 1; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--text-2); font-size: 15px; font-weight: 500; text-decoration: none; }
.segmented a.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(28, 31, 29, 0.12); }
.states { display: flex; flex-shrink: 0; background: var(--bg); border-radius: 12px; padding: 3px; gap: 2px; }
.states button { width: 50px; height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.states button.on.have { background: var(--have-bg); color: var(--have); }
.states button.on.low { background: var(--low-bg); color: var(--low); }
.states button.on.out { background: var(--out-bg); color: var(--out); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 0; }
.stepper-value { min-width: 48px; text-align: center; font-size: 20px; font-weight: 700; }
.avatar { flex-shrink: 0; border-radius: 999px; color: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.avatar.ring { border: 2px solid var(--card); }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -6px; }
.people { display: flex; gap: 8px; flex-wrap: wrap; }
.person { width: 44px; height: 44px; border-radius: 999px; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--off); background: var(--card); color: var(--dim); padding: 0; }
.person.on { border: 0; color: #fff; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; font-size: 15px; font-weight: 600; width: 100%; }
.switch { flex-shrink: 0; width: 46px; height: 28px; border-radius: 999px; padding: 3px; display: flex; background: var(--off); justify-content: flex-start; }
.switch.on { background: var(--accent); justify-content: flex-end; }
.switch span { width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(28, 31, 29, 0.25); }
.qty-editor { display: flex; align-items: center; gap: 8px; }
.qty-editor input { width: 0; flex: 1; min-width: 0; text-align: center; font-size: 17px; font-weight: 600; }
.qty-editor select { width: 84px; flex-shrink: 0; }
.amount-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 12px; font-size: 16px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); }
.amount-pill.empty { border-style: dashed; border-color: var(--dim); color: var(--accent); }
.amount-pill.edited { border-color: var(--edit-line); background: var(--edit-bg); color: var(--edit); }
.amount-pill.open { border: 2px solid var(--accent); }
.amount-pill.have { border: 0; background: var(--have-bg); color: var(--have); }
.amount-pill.low { border: 0; background: var(--low-bg); color: var(--low); }
.amount-pill.out { border: 0; background: var(--out-bg); color: var(--out); }
.check { width: 44px; height: 44px; margin-left: -8px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; }
.check span { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--dim); background: var(--card); display: flex; align-items: center; justify-content: center; color: #fff; }
.check.on span { background: var(--accent); border-color: var(--accent); }
.struck { color: var(--faint); text-decoration: line-through; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--muted); }
.search input { width: 100%; height: 48px; border-radius: 14px; padding: 0 16px 0 44px; font-size: 16px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: 448px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--text); color: #fff; font-size: 15px; z-index: 40; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.toast button { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; color: #B9D3C1; font-weight: 600; flex-shrink: 0; }

/* Sheet */
.sheet-layer { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sheet-scrim { position: absolute; inset: 0; border: 0; background: rgba(28, 31, 29, 0.42); cursor: default; touch-action: none; }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 92dvh; overflow: hidden; background: var(--card); border-radius: 24px 24px 0 0; display: flex; flex-direction: column; outline: none; will-change: transform; animation: sheet-up .26s cubic-bezier(.2, .8, .25, 1); }
/* Tall sheets start just under the status bar. */
.sheet.tall { height: calc(100dvh - env(safe-area-inset-top, 0px) - 12px); max-height: none; }
/* Opening: the sheet slides up and the dim fades in. No fill after the end, so a finger pulling the sheet moves it. */
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes scrim-in { from { opacity: 0; } }
.sheet-scrim { animation: scrim-in .2s ease-out; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-scrim { animation: none; } }
/* The top holds the handle and the title and is where the sheet is pulled down; only the body scrolls, and its scroll
   does not run on into the page. */
.sheet-top { flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; padding: 10px 20px 12px; touch-action: none; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 14px; padding: 2px 20px calc(24px + env(safe-area-inset-bottom)); }
/* Nothing in the body shrinks to fit: it scrolls instead (the card's parts were squeezed and cut off). */
.sheet-body > * { flex-shrink: 0; }
.sheet-handle { align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--line-strong); }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; }

/* Days */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.days.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.days.scroll { display: flex; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; gap: 6px; scrollbar-width: none; }
.days.scroll .day { width: 50px; flex-shrink: 0; }
.day { height: 64px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.day .wd { font-size: 12px; font-weight: 500; }
.day .num { font-size: 17px; font-weight: 700; }
.day .dot { width: 5px; height: 5px; border-radius: 999px; background: transparent; }
.day.planned .dot { background: var(--accent); }
.day.busy .dot { background: #B07A00; }
.day.past { background: #F8FAF7; color: var(--faint); }
.day.past.planned .dot { background: var(--dim); }
.day.today { border: 1.5px solid var(--accent); }
.day.range { border: 0; background: var(--have-bg); color: var(--have); }
.day.on { border: 0; background: var(--accent); color: #fff; }
.day.on .dot { background: #fff; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 -2px -10px; }
.week-nav > div { display: flex; align-items: center; }
.week-nav .range { min-width: 120px; text-align: center; font-size: 15px; font-weight: 600; white-space: nowrap; }
.today-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); font-size: 14px; font-weight: 600; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.me-link { text-decoration: none; }
/* «Купить» in the plan's corner: what to buy for the next days, with how many positions are missing. */
.shop-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text-2); font-size: 15px; font-weight: 600; text-decoration: none; flex-shrink: 0; }
.shop-link.due { border-color: var(--accent-line); background: var(--accent-soft); color: var(--have); }
.shop-link b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }

/* Plan */
.meal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.meal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 0; }
.meal-dish { display: flex; align-items: center; gap: 10px; padding: 6px 16px 12px; width: 100%; border: 0; background: transparent; text-align: left; color: var(--text); }
.meal-dish + .meal-dish { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.meal-dish .name { font-size: 18px; line-height: 23px; font-weight: 600; }
.meal-dish.past .name { color: var(--muted); }
.pot { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; line-height: 18px; color: var(--have); font-weight: 500; }
.eaters { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.banner { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--accent-soft); border-top: 1px solid var(--accent-line); z-index: 5; }
.banner strong { display: block; font-size: 15px; color: var(--have); }
.banner span { font-size: 13px; color: var(--accent-hover); }
.banner .primary { width: auto; min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 15px; flex-shrink: 0; }
.runs { border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; }
.run { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 12px; }
.run + .run { border-top: 1px solid var(--line-soft); }
.run .date { width: 56px; flex-shrink: 0; font-size: 15px; font-weight: 600; }
.run select { flex: 1; min-width: 0; height: 40px; }
.run .meal-name { flex: 1; padding-left: 9px; font-size: 15px; }

/* Dishes */
.dish-card { display: flex; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.dish-card .name { font-size: 18px; line-height: 23px; font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pref { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.recipe { font-size: 15px; line-height: 22px; color: var(--text-2); white-space: pre-wrap; }
.suggest { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 4px; border: 0; background: transparent; text-align: left; color: var(--text); width: 100%; }
.suggest + .suggest { border-top: 1px solid var(--line-soft); }
.adder { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--card); border: 1.5px solid var(--accent); border-radius: var(--radius); }
.new-product { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg); }

/* Family */
.member { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.member-head { display: flex; align-items: center; gap: 12px; }
.member-head h3 { font-size: 18px; line-height: 23px; font-weight: 600; }
.facts { margin: 0; display: grid; grid-template-columns: 84px minmax(0, 1fr); row-gap: 4px; column-gap: 8px; font-size: 15px; line-height: 21px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts dd.bad { color: var(--out); font-weight: 600; }
.journal li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 48px; }
.journal li + li { border-top: 1px solid var(--line-soft); }
.journal { list-style: none; margin: 0; padding: 0; }
.journal time { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Sign-in and the consent page, before the app */
.auth { padding: 48px 16px; display: flex; flex-direction: column; gap: 16px; }
.brand { font-weight: 700; font-size: 22px; letter-spacing: .01em; }
.brand span { color: var(--accent); }
.auth .card { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.auth h1 { font-size: 24px; line-height: 30px; }
.auth h2 { font-size: 18px; }
.auth form { display: flex; flex-direction: column; gap: 6px; }
.auth label { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.auth input { width: 100%; }
.auth .primary { margin-top: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.links button { border: 0; padding: 0; color: var(--accent); background: none; text-decoration: underline; min-height: 32px; }
.message { min-height: 1.4em; color: var(--muted); font-size: 14px; }
.error { background: var(--danger-bg); color: var(--danger); border-radius: 12px; padding: 10px 12px; }
.eyebrow { display: block; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.auth .facts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.auth .facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.auth .facts dd { text-align: right; overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; margin-top: 8px; }
.actions button { flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); font-weight: 600; }
.actions button.primary { border: 0; background: var(--accent); color: #fff; margin: 0; }
.copy { display: flex; gap: 8px; align-items: center; }
.copy code { flex: 1; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; font-size: 14px; }
.copy button { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); padding: 0 12px; font-weight: 600; }
.grants { list-style: none; padding: 0; margin: 0 0 .75rem; }
.grants li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.grants small { display: block; color: var(--muted); }
.grants button { min-height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); padding: 0 12px; }
.boot { padding: 48px 20px; }
.day-title { font-size: 18px; line-height: 24px; font-weight: 600; }
.grow { flex: 1; min-width: 0; }
.calc { color: var(--have); }
.edited-note { color: var(--edit); }
.pair.spread { justify-content: space-between; align-items: center; }
.pair.spread > :last-child { flex: none; }
.not-enough { flex-shrink: 0; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid #E8B19E; background: var(--danger-bg); color: var(--out); font-size: 14px; font-weight: 600; }
.quick-add { display: flex; gap: 8px; }
.quick-add input { flex: 1; min-width: 0; height: 48px; border-radius: 14px; padding: 0 16px; font-size: 16px; }
.square.accent { width: 48px; height: 48px; border-radius: 14px; border: 0; background: var(--accent); color: #fff; }
.quick-wrap { position: relative; }
.quick-options { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 4px 0; list-style: none; max-height: min(360px, 55dvh); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(28, 31, 29, 0.14); }
.quick-option { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 14px 6px 16px; cursor: pointer; color: var(--accent); }
.quick-option .row-main { color: var(--text); }
.quick-option + .quick-option { border-top: 1px solid var(--line-soft); }
.quick-option.active, .quick-option:hover { background: var(--accent-soft); }
.quick-option.new .row-title { color: var(--accent); font-weight: 600; }
.quick-option mark { background: none; color: inherit; font-weight: 700; }
.quick-more { flex-shrink: 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
.ask select { width: 100%; }

/* Stock */
.dot-mark { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 8px; vertical-align: 1px; }
.dot-mark.have { background: var(--have); }
.dot-mark.low { background: #B07A00; }
.dot-mark.out { background: var(--out); }
.stock-row .row-main { padding: 0; }
.unit-text { flex-shrink: 0; min-width: 28px; font-size: 16px; font-weight: 600; color: var(--text-2); }
.settings { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.setting { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 4px 6px 4px 12px; font-size: 15px; }
.setting + .setting { border-top: 1px solid var(--line-soft); }
.mini { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); font-size: 20px; line-height: 1; padding: 0; }
.setting-value { min-width: 64px; text-align: center; font-weight: 600; white-space: nowrap; }

/* Dishes */
.for-whom { display: flex; flex-direction: column; gap: 6px; }
.person.all { width: auto; padding: 0 12px; border: 1px solid var(--line-strong); border-style: solid; color: var(--text); font-size: 14px; }
.person.all.on { background: var(--text); border-color: var(--text); color: #fff; }
.person.filled { border: 3px solid transparent; color: #fff; }
.person.filled.picked { border-color: var(--text); box-shadow: inset 0 0 0 2px #fff; }
.dish-card .row-main { gap: 4px; }
.dish-card > svg { flex-shrink: 0; color: var(--dim); }
.dish-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.note a { font-weight: 600; flex-shrink: 0; }
.card.pad.servings { flex-direction: row; align-items: center; }
.sheet .pair > * { flex: 1; }
.servings .grow { display: flex; flex-direction: column; gap: 2px; }
.row.compact { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
.run-date { width: 92px; flex-shrink: 0; font-size: 15px; font-weight: 600; }
.pref b { font-weight: 600; }
.row-wrap.problem { background: #FFF8F5; }
.toggle { flex-shrink: 0; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 500; }
.toggle.on { border: 0; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
select.grow { width: 0; }
input[aria-invalid='true'] { border-color: var(--danger); }
.row-editor > input { width: 100%; }

/* Family and settings */
.row.link { text-decoration: none; color: var(--text); }
.row.link > svg { flex-shrink: 0; color: var(--dim); }
.journal.rows { list-style: none; margin: 0; padding: 0; }
.journal .grow { font-size: 15px; line-height: 20px; }
.meal-list { list-style: none; margin: 0; padding: 0; }
.meal-title { display: flex; align-items: center; gap: 12px; flex-direction: row; padding: 0; min-height: 44px; }
.meal-title:disabled { opacity: 1; }
.place { width: 28px; height: 28px; flex-shrink: 0; border-radius: 999px; background: var(--chip); color: var(--text-2); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekdays .chip { padding: 0; height: 44px; font-size: 14px; }
.grants-box h2 { font-size: 18px; line-height: 24px; font-weight: 600; }
.grants-box .grants { margin: 0; }

/* Swipe left to delete in the shopping list */
.swipe { position: relative; overflow: hidden; }
.swipe-action { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 22px; border: 0; background: var(--danger); color: #fff; font-size: 15px; font-weight: 600; }
.swipe-body { position: relative; background: var(--card); transition: transform .2s ease; touch-action: pan-y; }
.swipe-body.moving { transition: none; }
.row-wrap.open .swipe-body { background: var(--tint); }

.stock-name { display: flex; flex-direction: column; gap: 2px; padding: 0; }
.to-list { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); font-size: 14px; font-weight: 600; }
.counted-side { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.quick-out { height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 14px; font-weight: 600; }
.quick-out:active { background: var(--out-bg); color: var(--out); }
.to-list.quiet { border-color: var(--line-strong); color: var(--text-2); }
.to-list.listed { border-color: transparent; background: var(--accent-soft); color: var(--have); text-decoration: none; }

.buy-line { display: flex; flex-direction: column; gap: 8px; }
.buy-line + .buy-line { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.buy-head { display: flex; align-items: center; gap: 10px; }
.row-editor > .done { align-self: flex-end; }
.danger-button { min-height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--danger); color: #fff; font-size: 15px; font-weight: 600; }
.note.confirm { flex-direction: column; align-items: stretch; }
body.sheet-open .toast { bottom: auto; top: calc(16px + env(safe-area-inset-top)); }
.pill { display: inline-flex; align-items: center; gap: 4px; }
.pot.muted-pot { color: var(--muted); }
.card.problem { background: #FFF8F5; }
.segmented.kinds button { font-size: 15px; }
.kind-hint { margin-top: -8px; }
.chip.alias { display: inline-flex; align-items: center; gap: 6px; }
.field.grow { flex: 1; min-width: 0; }
.field.grow input { width: 100%; }

/* Whose list a dish is on: a person to tick, with their name. */
.eaters-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.eater { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--muted); font-size: 15px; font-weight: 500; }
.eater .avatar { opacity: 0.4; }
.eater.on { border-color: var(--have); background: var(--have-bg); color: var(--have); font-weight: 600; }
.eater.on .avatar { opacity: 1; }
.eater:disabled { opacity: 0.55; }
.dish-card.with-toggle { padding: 0; gap: 0; }
.dish-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 10px; text-decoration: none; color: var(--text); }
.eats-toggle { flex-shrink: 0; margin-right: 12px; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--muted); font-size: 15px; font-weight: 600; }
.eats-toggle.on { border-color: var(--have); background: var(--have-bg); color: var(--have); }
.eats-toggle:disabled { opacity: 0.55; }

/* Who eats a meal at home: a row per person, a cell per weekday. */
.schedule { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; margin: 0 -3px; }
.schedule th { padding: 0; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.schedule th.off { color: var(--dim); }
.schedule thead th:first-child, .schedule tbody th { width: 34px; }
.schedule td { padding: 0; }
.schedule .who { display: flex; padding: 0; border: 0; background: transparent; }
.schedule .cell { display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; padding: 0; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: #fff; }
.schedule .cell.on { border-color: var(--have); background: var(--have); }
.schedule .cell.off { opacity: 0.35; }
.meal-side { display: inline-flex; align-items: center; gap: 10px; }
.home-who { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 6px; margin: -2px -6px; border: 0; border-radius: 999px; background: transparent; }
.home-who.changed { background: var(--low-bg); }
.avatar.dim { opacity: 0.3; }

/* Photos: in the round avatars and person buttons, and the circle to place one. */
.avatar.photo { object-fit: cover; background: var(--chip); }
.face { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
.person { overflow: hidden; }
.person:not(.on):not(.filled):not(.all) .face { opacity: 0.4; filter: grayscale(1); }
.member-photo { position: relative; display: flex; padding: 0; border: 0; border-radius: 999px; background: transparent; }
.member-photo .badge { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.crop { position: relative; width: 240px; height: 240px; margin: 4px auto; border-radius: 50%; overflow: hidden; background: var(--chip); touch-action: none; cursor: grab; }
.crop img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.photo-now { display: flex; justify-content: center; padding: 8px 0; }
.crop.frame { border-radius: 16px; }
.picture-now { display: block; align-self: center; width: 100%; max-width: 320px; aspect-ratio: 4 / 3; border-radius: 16px; object-fit: cover; background: var(--chip); }
.picture-now.product { max-width: 260px; aspect-ratio: 1; }
.picture-now.empty { display: flex; align-items: center; justify-content: center; color: var(--dim); }
.thumb { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; background: var(--segment); color: var(--dim); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.product { border-radius: 10px; border: 1px solid var(--line); background: var(--tint); }
button.thumb { padding: 0; cursor: zoom-in; }
.zoom-layer { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; background: rgba(28, 31, 29, 0.88); color: #fff; }
.zoom-close { position: absolute; top: max(20px, env(safe-area-inset-top)); right: 20px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.zoom-picture { width: min(320px, 100%); aspect-ratio: 1; border-radius: 20px; object-fit: cover; background: rgba(255, 255, 255, 0.1); }
.zoom-text { align-self: stretch; max-width: 420px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 4px; }
.zoom-text strong { font-size: 20px; }
.zoom-text span { font-size: 15px; color: #D7DAD6; }
.zoom-layer .pair { align-self: stretch; max-width: 420px; margin: 0 auto; width: 100%; }
.zoom-button { flex: 1; height: 48px; border-radius: 14px; border: 0; background: #fff; color: var(--text); font-size: 15px; font-weight: 600; }
.zoom-button.ghost { border: 1px solid rgba(255, 255, 255, 0.4); background: transparent; color: #fff; }
.file-button { cursor: pointer; }
.file-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet input[type="range"] { width: 100%; accent-color: var(--accent); }

/* «Ещё» and a member's page */
.profile-card { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px 12px 16px; text-decoration: none; color: var(--text); }
.profile-card > svg, .row.link > svg { flex-shrink: 0; color: var(--dim); }
.row-title.strong { font-weight: 600; }
.member-top { display: flex; align-items: center; gap: 14px; }
.member-top h1 { font-size: 26px; line-height: 32px; }
.member-top .member-photo .badge { width: 24px; height: 24px; }
.plain-link { text-decoration: none; color: var(--text); }
.square.ghost { border-color: transparent; background: transparent; color: var(--muted); }
a.chip { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.chip.removable, .chip.static { display: inline-flex; align-items: center; gap: 6px; }
.chip.removable svg { color: var(--muted); }
.chip.static { cursor: default; }

/* Ideas */
.row.link > svg.row-icon { flex-shrink: 0; color: var(--accent); }
.count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.idea-details { font-size: 15px; line-height: 21px; color: var(--text-2); white-space: pre-wrap; }
.idea-confirm { display: flex; align-items: center; gap: 8px; }

/* The list: filters, basket, marks */
.filters { display: flex; gap: 8px; }
.filter { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text-2); font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.filter span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; text-align: left; }
.filter-more { flex-shrink: 0; font-weight: 700; }
.filters.single .filter { flex: 0 1 auto; gap: 8px; }
/* Four filters in «Список»: each as wide as its words (a long pick cut at 170px); when they do not fit, the row scrolls. */
.filters.row { overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.filters.row::-webkit-scrollbar { display: none; }
.filters.row .filter { flex: 1 0 auto; max-width: 170px; padding: 0 10px; }
.filter.active { border-color: var(--accent); background: var(--accent-soft); color: var(--have); font-weight: 600; }
.filter.open { border: 2px solid var(--accent); }
.chip.small { height: 36px; padding: 0 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.chip.add-tag { border-style: dashed; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.tag-form input { height: 36px; width: 140px; border-radius: 999px; padding: 0 12px; font-size: 14px; }
.check.round span { border-radius: 999px; }
.row-note { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 19px; color: var(--text-2); }
.row-note .avatar { flex-shrink: 0; }
.row-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.place-mark { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); }
.tag-mark { color: var(--accent); font-weight: 600; }
.rows.basket { background: #EEF3EF; border-color: var(--accent-line); }
.rows.basket .row + .row { border-top-color: var(--have-bg); }
.rows.basket .row-title { color: var(--text-2); }
.rows.basket.theirs { background: var(--card); border-color: var(--line); }
.price-row { min-height: 56px; }
input.price { width: 92px; text-align: right; font-size: 16px; }
.total-line { padding: 4px 4px 0; font-size: 16px; }
.receipt-hint { justify-content: flex-start; align-items: flex-start; }
.receipt-hint svg { flex-shrink: 0; color: var(--accent); }

/* Purchases */
.month-card { gap: 8px; }
.month-head { display: flex; align-items: center; gap: 6px; }
.month-head .grow { display: flex; flex-direction: column; }
.month-title { font-size: 18px; font-weight: 700; }
.month-total { font-size: 20px; white-space: nowrap; }
.spend-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--chip); }
.spend-bar span { display: block; min-width: 4px; }
.trip { overflow: hidden; }
.trip-head { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 0; background: transparent; text-align: left; color: var(--text); }
.trip-head .row-sub { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.trip-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.trip-lines { display: flex; flex-direction: column; }
.trip-line { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; font-size: 15px; }
.trip-line + .trip-line { border-top: 1px solid var(--line-soft); }
.trip-line .unknown { color: var(--warn); font-weight: 600; }
.trip-sum { min-width: 52px; text-align: right; font-weight: 600; }

/* Stores */
.store-mark { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.point { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.point + .point { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.point-head { display: flex; align-items: center; gap: 10px; }
.point-head > svg { flex-shrink: 0; color: var(--accent); }
.route-links > a { flex: 1; text-decoration: none; }
.point-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); }
.add-dashed.small { height: 44px; font-size: 15px; }

/* Groups of dishes */
.search-row { display: flex; gap: 8px; }
.search-row .search { flex: 1; min-width: 0; }
.filters-button { flex-shrink: 0; height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.filters-button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--have); }
.filters-panel { gap: 8px; }
.dish-group { gap: 8px; }
.group-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0; border: 0; background: none; color: var(--muted); text-align: left; }
.group-head:disabled { opacity: 1; cursor: default; }
.group-head h2 { font-size: 13px; line-height: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.group-head span { display: inline-flex; align-items: center; gap: 4px; }
a.chip { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.group-row + .group-row, .group-row + .row.loose { border-top: 1px solid var(--line-soft); }
.groups .row { padding-left: 6px; }
.groups .row.loose { padding-left: 16px; color: var(--muted); }
.group-row .note.confirm { margin: 0 12px 12px; }
.arrows { display: flex; flex-direction: column; }
.square.small { width: 36px; height: 26px; border-radius: 8px; }
.square.ghost:disabled { color: var(--line-strong); opacity: 1; }
.plain-button { border: 0; background: none; padding: 4px 0; text-align: left; color: var(--text); }
.plain-button:disabled { opacity: 1; cursor: default; }
.dish-hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--chip); aspect-ratio: 4 / 3; }
.dish-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-button { position: absolute; right: 10px; bottom: 10px; height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--text); display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.add-photo { min-height: 72px; border-radius: var(--radius); border: 1.5px dashed #A9BCAE; background: var(--tint); color: var(--accent); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 600; }
.photo-field { display: flex; align-items: center; gap: 12px; }
.photo-field .thumb { border-radius: 14px; }
.plan-thumb { align-self: flex-start; margin-top: 2px; border-radius: 10px; }
.meal-dish.past .plan-thumb { opacity: 0.6; }

/* Tasks (дела) */
.count-badge { flex-shrink: 0; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.count-badge.bad { background: #C22F2F; }
.rows.tasks { gap: 0; }
.task-row { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 6px 12px 6px 6px; }
.task-row + .task-row { border-top: 1px solid var(--line-soft); }
.task-row.sub { min-height: 48px; padding-left: 38px; }
.task-check { width: 40px; height: 40px; flex-shrink: 0; border: 0; background: none; padding: 0; display: flex; align-items: center; justify-content: center; }
.task-check > span { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--tone); display: flex; align-items: center; justify-content: center; color: #fff; }
.task-row.sub .task-check > span { width: 20px; height: 20px; }
.task-check > span { transition: background .15s ease; }
.task-check[aria-pressed="true"] > span { background: var(--tone); }
/* Ticked: the tick pops in, a second later the row slides right, fades and closes up. */
.task-row.ticking .task-check svg { animation: tick-pop .3s ease-out; }
.task-row.leaving { overflow: hidden; pointer-events: none; animation: task-leave .42s ease forwards; }
@keyframes tick-pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }
@keyframes task-leave {
  0% { opacity: 1; transform: none; max-height: 120px; }
  45% { opacity: 0; transform: translateX(32px); max-height: 120px; }
  100% { opacity: 0; transform: translateX(32px); max-height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .task-row.ticking .task-check svg { animation: none; } .task-row.leaving { animation-duration: .01s; } }
.task-check.big > span { width: 28px; height: 28px; }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px 0; text-decoration: none; color: var(--text); }
/* The title of a task opens it in a sheet. */
button.task-main { border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.task-sheet-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.task-sheet-list { display: inline-flex; align-items: center; min-width: 0; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-parent { min-height: 52px; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--tint); text-align: left; width: 100%; font: inherit; gap: 10px; }
.task-move { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* Own number of minutes next to the usual durations. */
.duration-field { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 14px; }
.duration-field.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--text); }
.duration-field input { width: 64px; border: 0; background: transparent; font: inherit; text-align: right; padding: 0; }
button.task-row.task-pick { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; color: var(--text); padding-left: 14px; gap: 12px; }
.pad-row { padding: 14px 16px; }
.task-title { font-size: 17px; line-height: 22px; font-weight: 500; }
.task-row.sub .task-title { font-size: 15px; line-height: 20px; }
.task-row.done .task-title { color: var(--dim); text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.due-pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.due-overdue { background: #FDECEC; color: #C22F2F; }
.due-today { background: #FFF0DC; color: #A8570A; }
.due-tomorrow { background: #E9EEFC; color: #1F4BD1; }
.due-week { background: #ECECEA; color: #26292E; }
.due-later { background: #F2F2EF; color: #686C72; }
.due-done { background: none; padding: 0; color: var(--dim); font-weight: 400; }
.task-who { flex-shrink: 0; border: 0; background: none; padding: 4px; display: flex; }
.nobody { flex-shrink: 0; border-radius: 999px; border: 1.5px dashed #A9BCAE; background: var(--card); color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.section-head.overdue h2 { color: #C22F2F; }
.section-head h2 .muted { font-weight: 500; letter-spacing: 0; }
.section-head.plain-button { width: 100%; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.assign-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.assign-person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; }
.assign-person.on { border: 2px solid var(--accent); background: #F2F6F3; }
.task-head { display: flex; align-items: flex-start; gap: 6px; }
.task-title-field { flex: 1; min-width: 0; border: 0; background: transparent; resize: none; padding: 4px 0; font-size: 24px; line-height: 30px; font-weight: 700; color: var(--text); }
.task-title-field.done { color: var(--dim); text-decoration: line-through; }
.task-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.task-assignee { padding: 0; min-height: 52px; border: 0; background: none; text-align: left; width: 100%; }
.task-assignee:disabled { opacity: 1; cursor: default; }
.list-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 999px; display: inline-block; margin-right: 6px; }
.chip .list-dot { margin-right: 6px; }
.chip.on .list-dot { background: #fff !important; }
.small-chips { margin-top: 2px; }
.chip-input { height: 36px; padding: 0 10px; border-radius: 999px; font-size: 14px; }
.color-row { display: flex; gap: 10px; padding: 0 16px 12px 58px; }
.swatch { width: 30px; height: 30px; border-radius: 999px; border: 0; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--text); }
.task-notes { min-height: 120px; }
.task-row.add-step { gap: 10px; padding-left: 16px; color: var(--accent); }
.task-row.add-step input { flex: 1; min-width: 0; border: 0; background: transparent; height: 44px; padding: 0; font-size: 16px; }

/* A task's reminders that cannot reach this device: why, and «Включить» on the same line. */
.push-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; margin: 0; }
.push-hint .text-button { min-height: 32px; font-size: 13px; }

/* Cooking time: in a dish row and the plan, how much cooking a day holds, the minutes field of a dish. */
.time { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.eaters .time { margin-left: 4px; }
.day-load { display: flex; align-items: center; gap: 6px; margin: -4px 0 4px; }
.note.day-load { margin: 0; justify-content: flex-start; }
.minutes-input { display: inline-flex; align-items: center; gap: 6px; }
.minutes-input input { width: 76px; height: 44px; text-align: center; font-size: 16px; }
.dish-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }

/* The plan's day after a swipe slides in from the side it came from. */
@keyframes day-from-right { from { transform: translateX(28px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes day-from-left { from { transform: translateX(-28px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.body.slide-next { animation: day-from-right 0.18s ease-out; }
.body.slide-prev { animation: day-from-left 0.18s ease-out; }
@media (prefers-reduced-motion: reduce) { .body.slide-next, .body.slide-prev { animation: none; } }

/* Prices: what an item costs, the list's budget, prices by store in the item editor and a price given by hand. */
.amount-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.price-mark { color: var(--have); font-weight: 600; font-size: 13px; padding-right: 4px; }
.place-mark { align-items: flex-start; }
.place-mark svg { flex-shrink: 0; margin-top: 3px; }
.budget { margin: 0 0 4px; }
.budget b { color: var(--text); font-size: 15px; }
.prices { display: flex; flex-direction: column; gap: 6px; }
.price-row { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; }
.price-cost { white-space: nowrap; color: var(--text-2); font-weight: 600; }
.price-cost.cheapest { color: var(--have); }
.price-add { display: flex; gap: 8px; align-items: center; }
.price-add select { flex: 1; min-width: 0; height: 40px; }
.price-add input { width: 96px; height: 40px; text-align: center; }

/* Product card: one sheet for a product, its parts folded into lines with a summary */
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head .thumb { border-radius: 14px; }
.card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-title h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.folds { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fold + .fold { border-top: 1px solid var(--line); }
.fold.open { background: var(--tint); }
.fold-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 8px 14px; border: 0; background: transparent; color: var(--text); text-align: left; }
.fold-head > svg { flex-shrink: 0; color: var(--dim); }
.fold-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fold-title { font-size: 16px; font-weight: 600; }
.fold-sum { font-size: 14px; line-height: 19px; color: var(--muted); }
.fold-sum.good { color: var(--accent); font-weight: 600; }
.fold-sum.warn { color: var(--low); font-weight: 600; }
.fold-sum.bad { color: var(--out); font-weight: 600; }
/* The card's outline while it is read: the summaries are soft bars. */
.folds-wait .fold-head { cursor: default; }
.shimmer { display: block; width: 46%; height: 12px; margin-top: 4px; border-radius: 6px; background: linear-gradient(90deg, var(--line) 0%, var(--bg) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.fold:nth-child(even) .shimmer { width: 34%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .shimmer { animation: none; } }
.fold-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.fold-body .rows { margin: 0; }
.states.wide { width: 100%; }
.states.wide button { flex: 1; width: auto; }
.qty-value { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.quick-out.on { background: var(--out-bg); color: var(--out); }
.mini-rows { display: flex; flex-direction: column; }
.mini-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.mini-row:first-child { border-top: 0; }
.mini-date { width: 56px; flex-shrink: 0; font-weight: 600; }
.row.link.here { background: var(--accent-soft); }
.chip.bad { border-color: var(--out-bg); background: var(--out-bg); color: var(--out); font-weight: 600; }
.chip:disabled { opacity: .55; }
.row-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }

/* List: the store I am going to, the rest of the filters under «Отбор», the price per unit */
.stores-row .chip { flex-shrink: 0; white-space: nowrap; }
.chips.scroll::-webkit-scrollbar { display: none; }
.sift-row { display: flex; align-items: center; gap: 10px; }
.sift-row .filter { flex: 0 0 auto; gap: 8px; }
.sift-row .budget { flex: 1; min-width: 0; text-align: right; margin: 0; }
.sift-panel { display: flex; flex-direction: column; gap: 12px; }
.unit-price { font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.fold-line { width: 100%; min-height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; border-radius: 14px; border: 1px dashed var(--line-strong); background: transparent; color: var(--text-2); font-size: 15px; font-weight: 600; }
.fold-line .accent { color: var(--accent); }
.rows.elsewhere { margin-top: 8px; opacity: .85; }
.secondary.danger-text { color: var(--danger); }
.card-close { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--bg); }
.good-text { color: var(--accent); font-weight: 600; }
.text-button.centered { align-self: center; }

/* Products: «+» / «✓» at the row's edge; the «Отбор» button inside the chips row */
.list-mark { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.list-mark.quiet { background: var(--card); border: 1px solid var(--line); color: var(--dim); }
.list-mark.on { background: var(--accent-soft); color: var(--have); }
.filter.inline { flex: 0 0 auto; height: 36px; gap: 6px; }
.stock-row .states button { width: 42px; height: 40px; font-size: 13px; }
.stock-row .amount-pill { height: 40px; }
.stock-row .quick-out { height: 40px; padding: 0 10px; }
.stock-row { gap: 8px; }

/* List rows as in the design: one button for the name, the line under it and the amounts on the right */
.item-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 0; border: 0; background: transparent; color: var(--text); text-align: left; align-self: stretch; }
.item-meta { line-height: 18px; }
.item-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; }
.item-qty { font-size: 16px; line-height: 21px; font-weight: 600; white-space: nowrap; }
.item-qty.empty { color: var(--dim); font-weight: 500; font-size: 15px; }
.item-side .price-mark { padding-right: 0; line-height: 17px; }

/* Brand: the A·I·B mark, the sign-in header and the splash where the mark draws itself (played once on start). */
.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--accent); }
.brand-name { display: flex; flex-direction: column; gap: 2px; }
.brand-name b { font-size: 26px; line-height: 30px; font-weight: 700; color: var(--text); }
.brand-name span { font-size: 13px; color: var(--muted); }
.splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: #3F5A4B; color: #fff; transition: opacity .35s ease; animation: splash-out .4s ease 8s forwards; }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
.splash.gone { opacity: 0; pointer-events: none; }
.splash-icon { width: 132px; height: 132px; border-radius: 36px; background: #F4F6F2; display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); animation: splash-icon .7s cubic-bezier(.3, .7, .3, 1) both; }
.splash-title { font-size: 36px; line-height: 1; font-weight: 700; animation: splash-text .5s ease 1.05s both; }
.splash-sub { font-size: 15px; letter-spacing: .24em; color: #C9D6CD; font-weight: 600; animation: splash-text .5s ease 1.25s both; }
.splash path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: splash-draw .5s cubic-bezier(.6, 0, .3, 1) forwards; }
.splash .m-arch { animation-duration: .6s; animation-delay: .25s; }
.splash .m-i { animation-duration: .25s; animation-delay: .8s; }
.splash .m-bar { animation-duration: .15s; animation-delay: .98s; }
.splash .m-b1 { animation-duration: .2s; animation-delay: 1.08s; }
.splash .m-b2 { animation-duration: .2s; animation-delay: 1.2s; }
@keyframes splash-icon { 0% { transform: scale(.82); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes splash-draw { to { stroke-dashoffset: 0; } }
@keyframes splash-text { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .splash *, .splash path { animation: none !important; stroke-dashoffset: 0; }
}

.tab-label { line-height: 14px; max-height: 14px; overflow: hidden; white-space: nowrap; transition: opacity .2s ease, max-height .32s ease; }
.tab-icon { width: 52px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 999px; transition: width .32s ease, height .32s ease, border-radius .32s ease, background-color .2s ease; }
.tab-icon svg { display: block; flex-shrink: 0; transition: transform .32s ease; }
.tabs a.current .tab-icon { background: var(--accent-soft); }
/* The mini island: the same five boxes, the label gone, the icon scaled down inside its pill — sizes change on the box, never
   on the icon, so nothing slips out of the island. */
.tabs.folded { width: 252px; padding: 5px; border-radius: 24px; }
.tabs.folded a { min-height: 36px; padding: 0; gap: 0; }
.tabs.folded .tab-icon { width: 42px; height: 36px; border-radius: 18px; }
.tabs.folded .tab-icon svg { transform: scale(.84); }
.tabs.folded .tab-label { opacity: 0; max-height: 0; }
@media (prefers-reduced-motion: reduce) { .tabs, .tabs * { transition: none !important; } }

/* Repeat («Повтор», as in Reminders), the «Своё» window, the note editor, the catalog (решение 37). */
.repeat { display: flex; flex-direction: column; gap: 8px; }
.repeat-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.repeat-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px; border: 0; background: transparent; text-align: left; color: var(--text); font: inherit; font-size: 15px; }
.repeat-row > svg:first-child { color: var(--accent-hover); flex-shrink: 0; }
.repeat-row > svg:last-child { color: var(--dim); flex-shrink: 0; }
.repeat-label { flex-shrink: 0; font-weight: 600; }
.repeat-value { flex: 1; min-width: 0; text-align: right; color: var(--muted); line-height: 20px; }
.repeat-menu { border-top: 1px solid var(--line-soft); padding: 4px 0; display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; background: transparent; text-align: left; font: inherit; font-size: 15px; color: var(--text); }
.menu-item:active { background: var(--tint); }
.menu-tick { width: 18px; flex-shrink: 0; color: var(--accent); display: inline-flex; }
.menu-rule { height: 1px; margin: 4px 12px 4px 38px; background: var(--line-soft); }
.repeat-next { font-size: 13px; line-height: 18px; color: var(--accent-hover); font-weight: 600; }
.switch-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.dialog-layer { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog-scrim { position: absolute; inset: 0; border: 0; background: rgba(28, 31, 29, .48); animation: scrim-in .2s ease; }
.dialog { position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto; box-sizing: border-box; padding: 18px 16px 16px; border-radius: 20px; background: var(--card); box-shadow: 0 20px 48px rgba(28, 31, 29, .28); display: flex; flex-direction: column; gap: 12px; }
.dialog .every { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.dialog .every input { width: 60px; height: 40px; box-sizing: border-box; border-radius: 10px; border: 2px solid var(--accent); padding: 0 8px; font-size: 17px; font-weight: 700; text-align: center; }
.cell-grid { display: grid; gap: 4px; }
.cell { height: 36px; padding: 0; border: 0; border-radius: 8px; background: #EEF2EE; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.cell.on { background: var(--accent); color: #fff; }
.radio-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); }
.radio-row .radio { width: 20px; height: 20px; box-sizing: border-box; border-radius: 999px; border: 2px solid var(--line-strong); }
.radio-row[aria-checked="true"] .radio { border: 6px solid var(--accent); }
.radio-row .box { width: 22px; height: 22px; box-sizing: border-box; border-radius: 6px; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.radio-row[aria-checked="true"] .box { background: var(--accent); border-color: var(--accent); }
.dialog .off { opacity: .4; pointer-events: none; }
.dialog .stack { display: flex; flex-direction: column; gap: 6px; }
.dialog-summary { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-hover); font-size: 14px; line-height: 20px; display: flex; flex-direction: column; gap: 2px; }
.dialog .pair > * { flex: 1; }

.note-block { display: flex; flex-direction: column; gap: 8px; }
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.note-head h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pill-button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: #EEF2EE; color: var(--accent-hover); font: inherit; font-size: 14px; font-weight: 700; }
.note-editor { border: 1px solid var(--accent); border-radius: 14px; background: var(--card); overflow: hidden; }
.note-tools { display: flex; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line-soft); background: var(--tint); overflow-x: auto; }
.note-tool { flex-shrink: 0; min-width: 40px; height: 36px; padding: 0 10px; border-radius: 9px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; }
.note-tool:active { background: var(--card); }
.note-tool.tool-b { font-weight: 800; }
.note-tool.tool-i { font-style: italic; font-family: Georgia, serif; }
.note-body { min-height: 140px; padding: 12px 14px; outline: none; }
.note-body:empty::before { content: attr(data-placeholder); color: var(--dim); }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--line-soft); }
.md { font-size: 15px; line-height: 22px; color: var(--text); overflow-wrap: anywhere; }
.md h3 { margin: 12px 0 4px; font-size: 17px; line-height: 24px; font-weight: 700; }
.md > h3:first-child { margin-top: 0; }
.md p, .md div[data-k="todo"], .md blockquote { margin: 0 0 6px; }
.md blockquote { padding-left: 10px; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.md ul, .md ol { margin: 0 0 6px; padding-left: 22px; }
.md li { margin: 0 0 2px; }
.md a { color: var(--accent-hover); }
.md-todo { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 6px; }
.md-box { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; box-sizing: border-box; border-radius: 6px; border: 2px solid var(--line-strong); color: #fff; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.md-todo.on .md-box { background: var(--accent); border-color: var(--accent); }
.md-todo.on > span:last-child { color: var(--dim); text-decoration: line-through; }

/* «Дела» by the new design: «Каталог» and «+» on top, search with «Кто» and «Вид», views, list tabs swiped, «Пора сделать». */
.round-button { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; border: 0; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(63, 90, 75, .28); }
.text-button.strong { font-size: 16px; font-weight: 700; text-decoration: none; padding: 0 6px; min-height: 44px; display: inline-flex; align-items: center; }
.search-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--muted); }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; padding: 0; font-size: 16px; color: var(--text); }
.search-row .filter.inline { height: 44px; flex: 0 0 auto; max-width: 120px; }
.chip-count { margin-left: 6px; font-weight: 700; color: var(--dim); }
.chip.on .chip-count { color: rgba(255, 255, 255, .75); }
.panel { padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.panel.stack { display: flex; flex-direction: column; gap: 8px; }
.list-tabs { display: flex; align-items: center; gap: 2px; margin: 0 -20px; padding: 0 8px 0 20px; border-bottom: 1px solid var(--line); }
.list-tabs-row { flex: 1; min-width: 0; display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.list-tabs-row::-webkit-scrollbar { display: none; }
.list-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 2px; border: 0; border-bottom: 2.5px solid transparent; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); }
.list-tab.on { border-bottom-color: var(--tone); color: var(--text); font-weight: 700; }
.icon-button.on { background: var(--accent-soft); }
.check-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 4px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; text-align: left; font: inherit; font-size: 16px; font-weight: 600; color: var(--text); }
.check-row:first-child { border-top: 0; }
.check-row .box { width: 22px; height: 22px; flex-shrink: 0; box-sizing: border-box; border-radius: 6px; border: 2px solid var(--line-strong); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.check-row .box.on { background: var(--accent); border-color: var(--accent); }
.task-page { display: flex; flex-direction: column; gap: 18px; min-height: 50vh; touch-action: pan-y; }
.task-page.slide-left { animation: page-left .26s ease-out; }
.task-page.slide-right { animation: page-right .26s ease-out; }
@keyframes page-left { from { transform: translateX(48px); opacity: .2; } }
@keyframes page-right { from { transform: translateX(-48px); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .task-page.slide-left, .task-page.slide-right { animation: none; } }
.due-card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); display: flex; flex-direction: column; overflow: hidden; }
.due-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; color: #7E4E16; }
.due-head b { color: var(--text); font-size: 17px; }
.due-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line-soft); }
.repeat-mark { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-hover); font-weight: 600; }
.catalog-pill { align-self: flex-start; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: #EEF2EE; color: var(--accent-hover); font: inherit; font-size: 14px; font-weight: 600; text-align: left; }
.catalog-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows-card { padding: 0; gap: 0; }
.field-row + .field-row, .field-row + .field-row-head, .field-row-head + .field-row { border-top: 1px solid var(--line-soft); }
.field-row-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 12px; border: 0; background: transparent; text-align: left; font: inherit; font-size: 15px; color: var(--text); }
.field-row-head:disabled { opacity: 1; cursor: default; }
.field-row-label { width: 112px; flex-shrink: 0; color: var(--muted); }
.field-row-value { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.field-row-value > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.field-row-head.person .field-row-value { flex-direction: row; align-items: center; gap: 8px; }
.field-row-sub { font-size: 13px; line-height: 18px; color: var(--accent-hover); }
.chev { flex-shrink: 0; color: var(--dim); transition: transform .15s; }
.chev.open { transform: rotate(90deg); }
.field-row-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.date-time { gap: 8px; }
.labelled { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.labelled input { height: 44px; box-sizing: border-box; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); padding: 0 10px; font-size: 16px; color: var(--text); }
.sheet-menu { position: sticky; top: 0; z-index: 3; margin: -4px 0 4px auto; width: min(280px, 100%); padding: 6px; border-radius: 16px; background: var(--card); box-shadow: 0 12px 32px rgba(30, 42, 36, .2), 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.sheet-menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); }
.sheet-menu-item.danger { color: #8C2F10; }
.sheet-menu-item:active { background: var(--tint); }
.title-input { width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--card); font-size: 17px; font-weight: 600; color: var(--text); }
.catalog-row { gap: 8px; }
.catalog-row .row-title { display: flex; align-items: center; gap: 8px; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding-left: 6px; }
.sheet-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 4px; }
.rows.suggest { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rows.suggest .pad { padding: 10px 14px 4px; }

/* Photos in descriptions. */
.md-photo { margin: 6px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.md-photo img { display: block; width: 100%; max-height: 360px; min-height: 120px; object-fit: cover; border-radius: 12px; background: var(--accent-soft); }
.note-view .md-photo img { cursor: zoom-in; }
.md-photo figcaption { font-size: 13px; line-height: 18px; color: var(--muted); }
.note-body .md-photo figcaption { outline: none; min-height: 18px; }
.note-body .md-photo figcaption:empty::before { content: 'Подпись к фото'; color: var(--dim); }
.note-tool.tool-photo { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.photo-ask { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px; border: 1.5px dashed var(--accent); border-radius: 14px; background: var(--accent-soft); color: var(--accent-hover); text-align: left; font: inherit; }
.photo-ask-text { display: flex; flex-direction: column; gap: 2px; }
.note-zoom { z-index: 80; }
.zoom-photo { max-width: 100%; max-height: 78dvh; border-radius: 16px; object-fit: contain; }

/* A child's «Главная» (decision 39): greeting, today's tasks with progress, what is eaten, done this week. */
.kid-hello { display: flex; align-items: center; gap: 12px; padding: 4px 0 2px; }
.kid-hello > div { display: flex; flex-direction: column; min-width: 0; }
.kid-hello h1 { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; }
.dash-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; }
.dash-card h2 { font-size: 18px; line-height: 24px; font-weight: 700; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px 16px; min-height: 52px; }
.dash-progress { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 10px; }
.dash-progress .small { font-size: 14px; }
.progress { height: 8px; border-radius: 999px; background: var(--segment); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s ease; }
.dash-rows { display: flex; flex-direction: column; }
.dash-task { display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 0 16px 0 4px; border-top: 1px solid var(--line-soft); }
.dash-task .tick { width: 48px; height: 48px; flex-shrink: 0; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.dash-task .tick-ring { width: 26px; height: 26px; box-sizing: border-box; border-radius: 999px; border: 2.5px solid var(--accent); display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: background .15s ease; }
.dash-task.done .tick-ring { background: var(--accent); }
.dash-task.done .tick-ring svg { animation: chk-pop .3s ease-out; }
.dash-task.done .row-title { color: var(--dim); text-decoration: line-through; }
.dash-task .row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.dash-task .row-main.row-button { border: 0; background: none; text-align: left; color: var(--text); padding: 8px 0; font: inherit; }
.dash-empty { padding: 0 16px 14px; }
.dash-foot { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--text-2); }
.dash-dish { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 16px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; text-align: left; color: var(--text); width: 100%; font: inherit; }
.dash-dish .label { font-size: 12px; line-height: 16px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.dash-dish .row-title { font-weight: 600; font-size: 16px; line-height: 21px; }
.dash-dish .pill { flex-shrink: 0; white-space: nowrap; }
.mini-seg { padding: 3px; gap: 2px; border-radius: 10px; }
.mini-seg button { flex: none; height: 32px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.dash-week { padding: 14px 16px; gap: 12px; }
.week-sum { display: flex; align-items: flex-end; gap: 16px; }
.week-count { display: flex; flex-direction: column; }
.week-count b { font-size: 40px; line-height: 44px; font-weight: 800; color: var(--accent); }
.week-count span { font-size: 14px; font-weight: 600; }
.week-bars { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; align-items: end; }
.week-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.week-bar > span { width: 100%; max-width: 22px; border-radius: 6px; background: var(--segment); transition: height .4s ease; }
.week-bar > span.on { background: #9DB8A6; }
.week-bar.today > span.on { background: var(--accent); }
.week-bar small { font-size: 11px; font-weight: 600; color: var(--muted); }
.week-bar.today small { font-weight: 800; color: var(--text); }
.home-who.static { display: inline-flex; align-items: center; gap: 6px; }
.away-me { font-size: 12px; font-weight: 700; color: var(--signal); white-space: nowrap; }
@keyframes chk-pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }
