/* Токены оформления: 8 тем и 4 кегля из согласованного health-мока (reference/mock/appearance.css). Все цвета — через переменные. */
@font-face { font-family: Manrope; src: url("../fonts/Manrope-variable.ttf") format("truetype"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root, [data-theme] {
  --bg:#f6f7f2; --paper:#fff; --ink:#253b30; --muted:#69736b; --green:#24523c; --green2:#367555; --lime:#ddeaac; --line:#e3e7dd; --soft:#edf1e8; --warm:#faf0de; --orange:#925126;
  --outer:#e5e9e1; --on-accent:#fff; --hero:#24523c; --hero-text:#fff; --hero-sub:#e1eadd; --ring-track:#557760; --selected:#e7eedb; --focus:#718532; --danger:#a33a30; --danger-bg:#fbefeb;
  --pattern-invert:0; --pattern-opacity:.13; --radius:22px;
  --status-pass:#2f7a4f; --status-pass-bg:#e4f2e8; --status-fail:#a33a30; --status-fail-bg:#fbefeb; --status-unknown:#8a6d1f; --status-unknown-bg:#fbf3dc; --status-info:#3a5f8a; --status-info-bg:#e6eef8;
}
[data-theme="sea"] { --bg:#eef6fa; --paper:#fff; --ink:#203b48; --muted:#5c707b; --green:#185d79; --green2:#267999; --lime:#c4e7f2; --line:#d5e4ed; --soft:#e1eff6; --warm:#fff1d9; --orange:#865321; --outer:#d7e5ef; --hero:#185d79; --hero-sub:#dceff7; --ring-track:#54899c; --selected:#d6eaf3; --focus:#2c7792; }
[data-theme="ice"] { --bg:#f5faff; --paper:#fff; --ink:#233b54; --muted:#576e86; --green:#2e67a6; --green2:#255b94; --lime:#d8eaff; --line:#dce9f6; --soft:#eaf3fd; --warm:#ecf3fa; --orange:#536e8e; --outer:#e8f2fc; --hero:#326baa; --hero-sub:#e4f0ff; --ring-track:#6f97c4; --selected:#e1eefc; --focus:#3276bd; }
[data-theme="clay"] { --bg:#fbf3ec; --paper:#fffdfa; --ink:#493329; --muted:#80695b; --green:#9b452f; --green2:#a95337; --lime:#f3d6aa; --line:#ecded0; --soft:#f3e5d8; --warm:#f9e8d5; --orange:#8d4b20; --outer:#ebddd0; --hero:#98442f; --hero-sub:#f9e1d6; --ring-track:#b67b60; --selected:#f4ddcb; --focus:#a9583d; }
[data-theme="lavender"] { --bg:#f5f2fc; --paper:#fff; --ink:#3c3154; --muted:#746883; --green:#655096; --green2:#7963ab; --lime:#e1d5fa; --line:#e4ddef; --soft:#ece5f6; --warm:#faf0db; --orange:#875626; --outer:#e5dff0; --hero:#60488f; --hero-sub:#eae1fb; --ring-track:#8c78ae; --selected:#e8ddf6; --focus:#8163b3; --status-pass:#4f6a3a; --status-pass-bg:#e9efe0; }
[data-theme="paper"] { --bg:#f7f4ed; --paper:#fffdf8; --ink:#363530; --muted:#726e65; --green:#4d4b43; --green2:#696451; --lime:#e8dfc3; --line:#e3ded3; --soft:#eee9de; --warm:#f3e6cf; --orange:#855323; --outer:#e5e1d7; --hero:#4d4b43; --hero-sub:#eeeade; --ring-track:#807d70; --selected:#e9e2d2; --focus:#81775e; }
[data-theme="graphite"] { --bg:#181e1d; --paper:#242d29; --ink:#edf3ed; --muted:#adbcb1; --green:#b4d8bc; --green2:#b4d8bc; --lime:#c7e2aa; --line:#3b4941; --soft:#303e35; --warm:#413629; --orange:#efd1a4; --outer:#101513; --on-accent:#1b3324; --hero:#334b3d; --hero-text:#f1f7ee; --hero-sub:#c5d9c9; --ring-track:#5a7461; --selected:#354b3d; --focus:#bfdc92; --danger:#ffb4a6; --danger-bg:#4d2d29; --pattern-invert:1; --pattern-opacity:.16;
  --status-pass:#9fd6ad; --status-pass-bg:#27402f; --status-fail:#ffb4a6; --status-fail-bg:#4d2d29; --status-unknown:#f0d48a; --status-unknown-bg:#463a1d; --status-info:#a9c8f0; --status-info-bg:#26374a; }
[data-theme="midnight"] { --bg:#151e2e; --paper:#212e43; --ink:#edf3ff; --muted:#b0bfd5; --green:#b5d1ff; --green2:#b5d1ff; --lime:#bed0f7; --line:#3b4c67; --soft:#2b3b55; --warm:#433a33; --orange:#f3d0a2; --outer:#0d1420; --on-accent:#172c4b; --hero:#2d456b; --hero-text:#f0f5ff; --hero-sub:#ccdbf2; --ring-track:#5b7497; --selected:#304764; --focus:#aacdff; --danger:#ffb4b2; --danger-bg:#4b2c39; --pattern-invert:1; --pattern-opacity:.16;
  --status-pass:#a5dcb5; --status-pass-bg:#243f33; --status-fail:#ffb4b2; --status-fail-bg:#4b2c39; --status-unknown:#f2d68f; --status-unknown-bg:#463c22; --status-info:#b5d1ff; --status-info-bg:#2b3b55; }

:root, [data-theme] {
  --photo-label-bg: color-mix(in srgb, var(--paper) 94%, transparent);
  --photo-time-bg: color-mix(in srgb, var(--hero) 94%, transparent);
  --overlay: color-mix(in srgb, color-mix(in srgb, var(--hero) 30%, black) 48%, transparent);
  --outer-glow: color-mix(in srgb, var(--selected) 72%, var(--outer));
  --shadow-app: color-mix(in srgb, var(--ink) 12%, transparent);
  --shadow-nav: color-mix(in srgb, var(--ink) 3%, transparent);
  --shadow-soft: color-mix(in srgb, var(--ink) 7%, transparent);
  --shadow-panel: color-mix(in srgb, var(--ink) 15%, transparent);
  --shadow-toast: color-mix(in srgb, var(--ink) 15%, transparent);
  --favorite: var(--orange);
}

/* Кегль меняет текст, а не ширину оболочки 440px. */
:root { font-family: Manrope, "Segoe UI", Arial, sans-serif; font-size: 100%; font-weight: 400; font-synthesis: none; line-height: 1.5; color: var(--ink); background: var(--outer); }
:root[data-text-size="compact"] { font-size: 93.75%; }
:root[data-text-size="normal"] { font-size: 100%; }
:root[data-text-size="large"] { font-size: 112.5%; }
:root[data-text-size="extra"] { font-size: 125%; }

/* Базовая оболочка: узкий PWA-макет 440px, карточки, кнопки, листы, навигация — по reference/mock/styles.css. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--outer); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: var(--green); }
svg { flex: none; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 1.875rem; line-height: 1.18; letter-spacing: -.035em; font-weight: 600; }
h2 { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
h3 { font-size: 1.0625rem; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
h4 { font-size: 1rem; font-weight: 600; }
p { font-size: 1rem; line-height: 1.55; }
strong, b { font-weight: 600; }
ul, ol { margin: 0; padding-left: 1.2em; }
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
input, textarea, select { accent-color: var(--green); }
textarea::placeholder, input::placeholder { color: var(--muted); opacity: 1; }

.app-shell { width: 100%; max-width: 440px; min-height: 100dvh; margin: auto; background: var(--bg); position: relative; box-shadow: 0 0 80px var(--shadow-app); isolation: isolate; }
.app-shell::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: url("../art/ornament.png"); background-size: 420px 420px; background-repeat: repeat; filter: invert(var(--pattern-invert)); mix-blend-mode: multiply; opacity: var(--pattern-opacity); }
:root[data-theme="graphite"] .app-shell::before, :root[data-theme="midnight"] .app-shell::before { mix-blend-mode: screen; }
:root[data-pattern="false"] .app-shell::before { display: none; }
/* Подложка цвета фона под текстом, попадающим на орнамент. */
:root[data-pattern="true"] main > :is(p, .chat-context, .demo-note, .nutrition-note),
:root[data-pattern="true"] main > .page-title > div,
:root[data-pattern="true"] main > .section-head > :is(h2, span, button, .list-counter),
:root[data-pattern="true"] main > .row > :is(p, h2, span),
:root[data-pattern="true"] main > .profile-row > :is(.grow, svg) { background: var(--bg); box-shadow: 0 0 0 3px var(--bg); }
.app-shell.wide { max-width: 1180px; }
.app-shell.wide > main { max-width: none; }
@media (min-width: 700px) { body { background: radial-gradient(ellipse at 25% 10%, var(--outer-glow), transparent 50%), var(--outer); } .app-shell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

main { padding: 16px 20px 116px; outline: none; overflow-wrap: anywhere; }
dialog.sheet { overflow-wrap: anywhere; }
.app-header { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--bg); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: clamp(16px, 1.125rem, 21px); letter-spacing: -.035em; text-align: left; line-height: 1.2; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; }
.brand-mark img { width: 38px; height: 38px; display: block; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { min-width: 44px; min-height: 44px; border-radius: 50%; display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; }
.icon-btn:hover { background: var(--soft); }
.avatar { background: var(--selected); border: 1px solid var(--line); font-size: 0.875rem; font-weight: 700; }
.eyebrow { font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: max(12px, .8125rem); line-height: 1.4; }
.tiny { font-size: 0.75rem; }
.page-title { display: flex; align-items: center; justify-content: space-between; margin: 5px 0 21px; gap: 12px; }
.page-title .eyebrow { margin-bottom: 6px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 10px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.1875rem; }
.section-head .text-btn { margin-left: auto; }
.text-btn { min-height: 44px; padding: 8px 0 8px 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 0.875rem; font-weight: 600; color: var(--green); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.button { min-height: 48px; border-radius: 14px; padding: 12px 17px; font-size: 0.9375rem; font-weight: 600; display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-align: center; line-height: 1.3; }
.button.primary { background: var(--green); color: var(--on-accent); }
.button.primary:hover { background: var(--green2); }
.button.secondary { background: var(--soft); color: var(--green); }
.button.outline { border: 1px solid var(--line); background: var(--paper); }
.button.full { width: 100%; }
.button.danger { color: var(--danger); background: var(--danger-bg); }
.button.compact { padding: 9px 12px; min-height: 44px; font-size: 0.875rem; }
.button-row { display: flex; gap: 9px; }
.button-row > * { flex: 1; min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; background: var(--soft); border-radius: 20px; padding: 6px 10px; font-size: 0.75rem; font-weight: 600; line-height: 1.2; }
.badge.green { background: var(--selected); color: var(--green); }
.badge.warm { background: var(--warm); color: var(--orange); }
.badge.pass { background: var(--status-pass-bg); color: var(--status-pass); }
.badge.fail { background: var(--status-fail-bg); color: var(--status-fail); }
.badge.unknown, .badge.needs_parameter, .badge.unsupported, .badge.conflict { background: var(--status-unknown-bg); color: var(--status-unknown); }
.badge.info, .badge.not_applicable { background: var(--status-info-bg); color: var(--status-info); }
.badge.synthetic { background: var(--warm); color: var(--orange); border: 1px dashed var(--orange); }
.pill-group { display: flex; gap: 7px; flex-wrap: wrap; }
.pill-group .badge { font-size: 0.8125rem; padding: 8px 12px; }
.summary { background: var(--soft); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 15px 18px; display: flex; align-items: center; gap: 18px; min-width: 0; }
.summary > div { min-width: 0; }
.summary p { color: var(--muted); font-size: 0.8125rem; }
.summary strong { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.summary .summary-sub { margin-top: 5px; }
.ring { width: 59px; height: 59px; min-width: 59px; border-radius: 50%; background: conic-gradient(var(--green2) var(--percent), var(--line) 0); display: grid; place-items: center; flex: none; }
.ring span { width: 48px; height: 48px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; color: var(--ink); font-size: 0.875rem; font-weight: 600; }
.hint { border-radius: 16px; background: var(--soft); padding: 13px 15px; display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; }
.hint.warm { background: var(--warm); }
.hint.danger { background: var(--danger-bg); color: var(--danger); }
.hint p { font-size: 0.875rem; }
.hint > svg { flex: none; margin-top: 2px; }
.inline-link { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 440px; z-index: 15; background: var(--paper); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 7px 8px max(10px, env(safe-area-inset-bottom)); box-shadow: 0 -8px 20px var(--shadow-nav); }
.nav-item { flex: 1; min-width: 0; min-height: 61px; display: flex; align-items: center; flex-direction: column; gap: 5px; font-size: .6875rem; line-height: 1.3; font-weight: 600; color: var(--muted); padding: 4px 1px; }
.nav-item span:first-child { width: 48px; height: 31px; display: grid; place-items: center; border-radius: 12px; }
.nav-item.active { color: var(--green); }
.nav-item.active span:first-child { background: var(--soft); }
.week-strip { display: flex; gap: 5px; margin: 18px 0 20px; }
.day-chip { flex: 1; min-width: 0; min-height: 64px; padding: 8px 2px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); display: flex; align-items: center; flex-direction: column; gap: 7px; font-size: 0.75rem; color: var(--muted); }
.day-chip b { font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.day-chip.active { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.day-chip.active b { color: var(--on-accent); }
.day-chip.today:not(.active) { border-color: var(--green); }
.segments { display: flex; flex-wrap: wrap; background: var(--soft); border-radius: 14px; padding: 4px; gap: 3px; }
.segments button { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 8px; border-radius: 11px; font-size: 0.875rem; white-space: nowrap; }
.segments .active { background: var(--paper); color: var(--green); box-shadow: 0 2px 7px var(--shadow-soft); font-weight: 600; }
.day-total { display: flex; justify-content: space-between; gap: 8px; margin: 18px 0; padding: 15px; background: var(--soft); border-radius: 16px; }
.day-total div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day-total b { font-size: 1rem; }
.day-total span { font-size: 0.6875rem; color: var(--muted); }
.simple-list { list-style: none; margin: 0; padding: 0; }
.simple-list li { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.simple-list li:last-child { border: 0; }
.empty { padding: 30px 18px; text-align: center; }
.empty .icon-box { margin: 0 auto 15px; width: 58px; height: 58px; border-radius: 19px; }
.empty p { margin: 10px 0 18px; color: var(--muted); }
.icon-box { height: 44px; width: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--green); flex: none; }
.entry { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.entry h3 { font-size: 1rem; margin: 4px 0; }
.entry-time { font-size: 0.75rem; color: var(--muted); width: 41px; padding-top: 7px; flex: none; }
.week-dots { display: flex; justify-content: space-between; gap: 3px; margin: 20px 0 4px; }
.week-dot { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.week-dot span { width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.week-dot span.yes { background: var(--green); color: var(--on-accent); }
.weight-number { font-size: 2.25rem; font-weight: 550; letter-spacing: -.035em; }
.weight-number span { font-size: 1rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.chart { width: 100%; height: auto; overflow: visible; margin: 17px 0 0; }
.chart text { font-family: inherit; font-size: 0.6875rem; fill: var(--muted); }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.6875rem; margin-bottom: 6px; }
.article-card { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); text-align: left; width: 100%; align-items: center; }
.article-card h3 { font-size: 1rem; margin: 5px 0; }
.article-body p { margin: 14px 0; }
.article-body h2, .article-body h3 { margin: 22px 0 8px; font-size: 1.125rem; }
.article-body li { margin: 10px 0; font-size: 0.9375rem; line-height: 1.5; }
.meta-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 7px; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 15px 0; }
.field label, .field .label { font-size: 0.875rem; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--ink); font-size: max(16px, 1rem); min-width: 0; }
.field textarea { min-height: 6.25rem; max-height: 15rem; resize: none; overflow-y: hidden; line-height: 1.45; scrollbar-width: thin; }
.field .small { font-size: 0.75rem; }
.error-text { color: var(--danger); font-size: 0.8125rem; margin: 9px 0; }
.range-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 8px; }
.stepper { display: flex; gap: 5px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 3px; background: var(--paper); }
.stepper button { height: 44px; width: 44px; border-radius: 9px; font-size: 1.375rem; display: grid; place-items: center; }
.stepper button:hover { background: var(--soft); }
.stepper strong { min-width: 44px; text-align: center; font-size: 0.9375rem; }
.stepper input { width: 4.5rem; text-align: center; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: max(16px, 1rem); font-weight: 600; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0; }
.steps li { counter-increment: step; display: flex; gap: 12px; margin: 17px 0; font-size: 0.9375rem; line-height: 1.5; }
.steps li::before { content: counter(step); width: 29px; height: 29px; display: grid; place-items: center; background: var(--soft); color: var(--green); border-radius: 50%; flex: none; font-size: 0.8125rem; font-weight: 600; }
.subheading { margin: 20px 0 10px; }
.nutrition-note { font-size: 0.75rem; color: var(--muted); line-height: 1.5; padding-top: 10px; }
.filter-row { display: flex; gap: 8px; overflow: auto; padding: 2px 0 8px; margin: 14px 0; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row button, .chip { min-height: 42px; white-space: nowrap; padding: 9px 13px; border-radius: 22px; border: 1px solid var(--line); background: var(--paper); font-size: 0.8125rem; display: inline-flex; align-items: center; gap: 6px; }
.filter-row button.active, .chip.active { background: var(--green); color: var(--on-accent); border-color: var(--green); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips .chip, .row.wrap .chip { white-space: normal; text-align: left; max-width: 100%; }
.option-card { padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); margin: 11px 0; }
.option-card.selected { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.change-preview { background: var(--soft); padding: 15px; border-radius: 15px; margin: 15px 0; font-size: 0.875rem; line-height: 1.5; }
.sheet-handle { width: 34px; height: 4px; background: var(--line); border-radius: 5px; margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0 10px; }
.sheet-head h2 { font-size: 1.4375rem; min-width: 0; }
.sheet-body { padding: 16px 20px 20px; }
.sheet-body .button.full { margin-top: 12px; }
.sheet-footer { position: sticky; bottom: 0; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); z-index: 2; }
dialog.sheet { position: fixed; inset: auto 0 0; max-width: 440px; width: 100%; max-height: 92dvh; margin: 0 auto; border: 0; border-radius: 26px 26px 0 0; padding: 0; background: var(--bg); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 -10px 80px var(--shadow-panel); scrollbar-width: none; }
dialog.sheet::-webkit-scrollbar { display: none; }
dialog.sheet::backdrop { background: var(--overlay); }
dialog.sheet[open] { animation: sheet-in .2s ease-out; }
dialog.sheet.tall { max-height: 96dvh; }
@media (pointer: fine) { dialog.sheet:focus-within { scrollbar-width: thin; } }
.sheet-back { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; color: var(--green); font-size: 0.875rem; padding: 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%) translateY(20px); bottom: 96px; max-width: calc(100% - 32px); width: max-content; background: var(--hero); color: var(--hero-text); border: 1px solid var(--ring-track); border-radius: 14px; padding: 13px 16px; font-size: 0.875rem; z-index: 40; box-shadow: 0 6px 20px var(--shadow-toast); opacity: 0; pointer-events: none; transition: .2s; display: flex; align-items: center; gap: 12px; line-height: 1.4; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast button { color: var(--lime); font-size: 0.875rem; font-weight: 600; min-height: 32px; white-space: nowrap; }
.profile-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.profile-row span.grow { font-size: 0.9375rem; }
.profile-row .small { display: block; }
.scenario-card { width: 100%; border: 1px solid var(--line); border-radius: 17px; padding: 16px; text-align: left; background: var(--paper); display: flex; gap: 12px; align-items: center; margin: 11px 0; }
.scenario-card.active { border-color: var(--green); background: var(--selected); }
.scenario-card h3 { font-size: 1rem; margin-bottom: 5px; }
.status-panel { text-align: center; padding: 26px 16px; }
.status-panel h2 { margin: 15px 0 9px; }
.status-panel p { margin-bottom: 20px; color: var(--muted); }
.status-panel .icon-box { margin: auto; }
.inline-check { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; padding: 13px 0; cursor: pointer; }
.inline-check input { width: 21px; height: 21px; accent-color: var(--green); flex: none; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.success-panel { background: var(--selected); text-align: center; border-radius: 22px; padding: 25px 20px; }
.success-panel .icon-box { margin: 0 auto 12px; background: var(--hero); color: var(--lime); width: 52px; height: 52px; border-radius: 50%; }
.success-panel p { margin-top: 9px; font-size: 0.875rem; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-grid strong { font-size: 1.5625rem; display: block; margin: 8px 0 4px; letter-spacing: -.035em; font-weight: 550; }
.loader { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; margin: auto; }
.demo-note { font-size: 0.75rem; color: var(--muted); line-height: 1.5; margin: 12px 0; }
.search-input { min-height: 47px; border: 1px solid var(--line); border-radius: 13px; width: 100%; padding: 12px 14px; background: var(--paper); color: var(--ink); font-size: max(16px, 1rem); }
.info-banner { margin-top: 18px; padding: 14px; border: 1px dashed var(--line); border-radius: 15px; font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.spaced { margin-top: 18px; }
.low-margin { margin-top: 9px; }
.list-counter { font-size: 0.8125rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 6px 12px; font-size: 0.875rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; overflow-wrap: anywhere; }
pre.mono { white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 12px; margin: 10px 0; max-height: 60vh; overflow: auto; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--muted); min-height: 24px; }
.status-line.saved { color: var(--status-pass); }
.status-line.error { color: var(--danger); }
.progress-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--green2); transition: width .15s; }
.table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.table th { color: var(--muted); font-weight: 600; }
.banner { position: sticky; top: 72px; z-index: 9; margin: -8px 0 12px; }
.update-banner { background: var(--warm); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.875rem; }
.expert-strip { background: var(--selected); border-bottom: 1px solid var(--line); padding: 6px 20px; font-size: 0.75rem; color: var(--green); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
details.editorial-details { border-top: 1px solid var(--line); margin-top: 20px; padding: 14px 0; font-size: .8125rem; line-height: 1.65; }
details.editorial-details summary { cursor: pointer; font-weight: 600; font-size: .875rem; color: var(--ink); }
details.editorial-details p { margin-top: 12px; color: var(--muted); }
.source-link { display: block; font-size: .8125rem; line-height: 1.7; overflow-wrap: anywhere; margin: 8px 0; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
@keyframes sheet-in { from { transform: translateY(30px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 360px) { main { padding-left: 15px; padding-right: 15px; } .app-header { padding-left: 15px; padding-right: 15px; } .sheet-body { padding-left: 16px; padding-right: 16px; } .button { padding-left: 10px; padding-right: 10px; } .nav-item { font-size: clamp(10px, .625rem, 11px); } .brand { font-size: 16px; gap: 6px; } .day-total { padding: 12px; gap: 5px; } .section-head h2 { font-size: 1.125rem; } .sheet-head h2 { font-size: 1.375rem; } }
@media (max-height: 850px) { .app-header { height: 64px; } main { padding-top: 10px; } .banner { top: 64px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Компоненты контента: карточки блюд с фото до края, продукты, покупки (список/3 колонки), опросы, здоровье, composer, оформление. */
.photo { display: block; width: 100%; height: 100%; background: var(--soft); overflow: hidden; position: relative; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.photo.contain img { object-fit: contain; padding: 6%; }
.photo.contain { background: transparent; }
.photo-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 8px; text-align: center; font-size: .75rem; color: var(--muted); background: var(--soft); line-height: 1.3; }
.photo-fallback b { display: block; font-size: 1.5rem; color: var(--green); }
.image-caption { font-size: .6875rem; color: var(--muted); margin: 7px 0 12px; text-align: right; }

.meal-hero { overflow: hidden; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); position: relative; }
.meal-photo { height: 190px; position: relative; background: var(--soft); }
.meal-hero > .photo-labels { position: absolute; top: 0; left: 0; right: 0; padding: 15px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.photo-labels .badge { background: var(--photo-label-bg); color: var(--ink); }
.photo-labels .time { background: var(--photo-time-bg); color: var(--hero-text); }
.meal-body { padding: 14px 17px; }
.meal-body h2 { font-size: 1.375rem; line-height: 1.2; margin: 0 0 9px; }
.meal-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: max(12px, .8125rem); color: var(--muted); }
.dot-sep::before { content: '·'; margin-right: 7px; }
.meal-body .button-row { margin-top: 17px; }
.meal-footer { padding: 0 17px 16px; display: flex; gap: 8px; }
.meal-footer .button { flex: 1; }
.meal-compact { display: block; position: relative; padding: 0; overflow: hidden; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.meal-compact > .meal-compact-main { display: grid; grid-template-columns: clamp(88px, 26vw, 112px) minmax(0, 1fr); align-items: stretch; gap: 0; width: 100%; min-height: 112px; text-align: left; }
.meal-compact > .meal-compact-main > .photo { min-height: 112px; align-self: stretch; }
.meal-compact > .meal-compact-main > .grow { align-self: center; padding: 12px 54px 12px 12px; }
.meal-compact h3 { line-height: 1.4; margin: 5px 0; font-size: .9375rem; }
.meal-compact .small { display: block; line-height: 1.45; }
.meal-compact > .icon-btn, .meal-compact > .check-round { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); }
.meal-compact > .check-round { right: 13px; }
.check-round { height: 32px; width: 32px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--green); flex: none; background: var(--paper); }
.check-round.checked { background: var(--green); color: var(--on-accent); border-color: var(--green); }
.plan-meals { display: grid; gap: 12px; }
.plan-meals > .meal-line { display: grid; grid-template-columns: clamp(88px, 26vw, 112px) minmax(0, 1fr); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); overflow: hidden; }
.plan-meals > .meal-line > .meal-line-head { grid-column: 2; grid-row: 1; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; padding: 12px 12px 0; justify-content: space-between; }
.plan-meals > .meal-line > .photo { grid-column: 1; grid-row: 1 / 3; align-self: stretch; min-height: 136px; }
.plan-meals > .meal-line > .meal-line-body { grid-column: 2; grid-row: 2; align-self: center; padding: 8px 12px 12px; }
.plan-meals .meal-line h3 { margin: 0 0 8px; font-size: 1rem; line-height: 1.4; }
.plan-meals > .meal-line > .button-row { grid-column: 1 / -1; grid-row: 3; margin: 0; padding: 12px; gap: 8px; }
.plan-meals .meal-line .eyebrow { letter-spacing: .5px; font-size: .6875rem; }
.plan-meals .meal-line .badge { padding: 4px 7px; font-size: .625rem; }
.plan-meals > .meal-line.unfilled { grid-template-columns: 1fr; padding: 14px; }
.option-card.recipe-option { display: grid; grid-template-columns: clamp(88px, 26vw, 112px) minmax(0, 1fr); padding: 0; overflow: hidden; border-radius: 20px; margin: 10px 0; }
.option-card.recipe-option > .photo { grid-column: 1; grid-row: 1 / 3; min-height: 156px; }
.option-card.recipe-option > .grow { grid-column: 2; grid-row: 1; padding: 13px 12px 10px; align-self: center; }
.option-card.recipe-option > .button { grid-column: 2; grid-row: 2; align-self: end; margin: 0 12px 12px; }
.option-card h3 { line-height: 1.4; font-size: 1rem; margin-bottom: 6px; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.recipe-tile { display: flex; flex-direction: column; align-items: stretch; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); text-align: left; min-width: 0; }
.recipe-tile > .photo { aspect-ratio: 1.1; width: 100%; height: auto; }
.recipe-tile-body { padding: 12px 11px 14px; display: flex; flex: 1; flex-direction: column; gap: 7px; }
.recipe-tile strong { font-size: .875rem; line-height: 1.45; font-weight: 600; }
.tile-meta { font-size: .6875rem; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 5px; }
.recipe-notice { color: var(--orange); font-size: .75rem; line-height: 1.6; }
.result-count { padding: 14px 0 10px; }
.catalog-personal { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; color: var(--ink); background: var(--soft); padding: 13px; border-radius: 16px; font-size: .875rem; }
.catalog-personal small { display: block; color: var(--muted); font-size: .6875rem; margin-top: 4px; line-height: 1.5; }
.recipe-photo { height: auto !important; aspect-ratio: 1.2; border-radius: 18px; overflow: hidden; }
.recipe-save { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recipe-save h2 { min-width: 0; line-height: 1.4; }
.illustrated-ingredient { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 1rem; min-width: 0; }
.illustrated-ingredient .product-art { width: 72px; height: 72px; flex: 0 0 72px; }
.illustrated-ingredient > span.grow { flex: 1; min-width: 0; }
.illustrated-ingredient strong { font-size: 1rem; font-weight: 600; text-align: right; max-width: 34%; }
.illustrated-ingredient .small { display: block; }
.product-art { display: block; width: 64px; height: 64px; flex: 0 0 64px; pointer-events: none; background: none; border-radius: 0; overflow: hidden; }
.product-art img, .product-art svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-art.large-art { width: 100px; height: 100px; flex-basis: 100px; }
.product-placeholder { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 16px; background: var(--soft); color: var(--green); font-weight: 600; font-size: 1.25rem; }
.editorial-links { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--paper); }
.illustrated-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 12px; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: var(--paper); color: var(--ink); border-radius: 0; min-height: 88px; }
.illustrated-link:last-child { border-bottom: 0; }
.illustrated-link > span.grow { min-width: 0; flex: 1; }
.illustrated-link strong { display: block; font-size: 1rem; font-weight: 600; line-height: 1.45; }
.illustrated-link small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.55; margin-top: 4px; }
.quiz-status { color: var(--green); font-weight: 600; }

/* Покупки: список и три колонки; купленное — галочка + зачёркивание, картинка не блёкнет (opacity 1). */
.purchase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.purchase { position: relative; display: grid; grid-template-columns: 30px 68px minmax(0, 1fr) 5.25rem; column-gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.purchase .product-art { width: 68px; height: 68px; grid-column: 2; grid-row: 1; opacity: 1 !important; filter: none !important; }
.purchase-check { width: 30px; min-height: 44px; display: flex; align-items: center; justify-content: center; grid-column: 1; grid-row: 1; padding: 0; }
.purchase-check .check-round { border-radius: 9px; width: 25px; height: 25px; }
.purchase-name { grid-column: 3; min-width: 0; }
.purchase h3 { font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.purchase .stock { grid-column: 4; grid-row: 1; justify-self: stretch; min-height: 44px; padding: 6px 2px; color: var(--green); font-size: .9375rem; line-height: 1.4; text-align: right; white-space: normal; }
.purchase .qty { font-size: 1rem; margin-top: 6px; color: var(--ink); line-height: 1.4; display: block; }
.purchase.is-done h3 { text-decoration: line-through; color: var(--muted); }
.purchase-tile { display: flex; flex-direction: column; align-items: stretch; border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 10px 7px 6px; gap: 8px; min-width: 0; }
.purchase-tile .product-art { width: 100%; max-width: 110px; height: auto; aspect-ratio: 1; flex-basis: auto; align-self: center; margin: 24px 0 0; }
.purchase-tile .purchase-check { position: absolute; top: 0; left: 3px; }
.purchase-tile .purchase-name { flex: 1; text-align: center; }
.purchase-tile .stock { border-top: 1px solid var(--line); margin-top: 2px; min-height: 46px; font-size: .875rem; padding: 8px 0 3px; text-align: center; }
.remaining-quantity { display: block; color: var(--orange); font-size: .875rem; margin-top: 5px; line-height: 1.4; }
@media (max-width: 340px), (min-width: 0) and (max-width: 360px) and (min-resolution: 1dppx) { :root[data-text-size="extra"] .purchase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
:root[data-text-size="extra"] .purchase-grid.narrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Опросы и выбор: видимые карточки/чипы с пиктограммами, нативные radio/checkbox ради доступности. */
.quiz-progress { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.quiz-progress span { height: 100%; display: block; background: var(--green2); transition: width .15s; }
.quiz-question { margin: 14px 0 12px; font-size: 1.5rem; line-height: 1.4; }
.choice-options { display: grid; gap: 8px; margin: 18px 0 12px; }
.choice-options.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.choice-input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.choice-card { display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--ink); transition: background .15s, border-color .15s; }
.choice-icon { display: flex; align-items: center; color: var(--muted); flex: none; }
.choice-title { min-width: 0; flex: 1; font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.choice-title small { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.choice-indicator { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--on-accent); }
.choice-indicator.square { border-radius: 6px; }
.choice-indicator svg { opacity: 0; }
.choice-input:checked + .choice-card { background: var(--selected); border-color: var(--green); }
.choice-input:checked + .choice-card .choice-icon { color: var(--green); }
.choice-input:checked + .choice-card .choice-indicator { background: var(--green); border-color: var(--green); }
.choice-input:checked + .choice-card .choice-indicator svg { opacity: 1; }
.choice-input:focus-visible + .choice-card { outline: 3px solid var(--focus); outline-offset: 3px; }
.choice-input:disabled + .choice-card { opacity: .5; }
.tiles .choice-card { flex-direction: column; text-align: center; padding: 16px 10px 14px; gap: 8px; min-height: 93px; height: 100%; position: relative; }
.tiles .choice-indicator { position: absolute; top: 9px; right: 9px; }
.tiles .choice-card .product-art { width: 76px; height: 76px; flex-basis: 76px; margin-top: 12px; }
.tiles .choice-option.full { grid-column: 1 / -1; }
.tiles .choice-option.full .choice-card { flex-direction: row; text-align: left; padding: 16px; min-height: 62px; }
.tiles .choice-option.full .choice-indicator { position: static; }
.quiz-footer { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.disease-list { display: grid; gap: 8px; margin-top: 16px; }
.disease-choice { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 15px 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); color: var(--ink); }
.disease-choice > span.grow { flex: 1; min-width: 0; }
.disease-choice strong { font-size: 1rem; line-height: 1.5; font-weight: 600; }
.disease-choice small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.55; margin-top: 3px; }
.disease-choice.selected { background: var(--selected); border-color: var(--green2); }
.choice-mark { display: flex; width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid var(--line); border-radius: 7px; align-items: center; justify-content: center; }
.selected .choice-mark, .choice-mark.on { background: var(--green); color: var(--on-accent); border-color: var(--green); }
.health-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.health-option { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; min-height: 44px; font-size: .875rem; color: var(--ink); }
.health-option.active { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.health-condition-card { margin-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.health-condition-card h3 { margin-bottom: 8px; font-size: 1.125rem; }
.health-plan-banner { display: flex; align-items: center; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 14px; width: 100%; text-align: left; color: var(--ink); margin: 15px 0; }
.health-plan-banner > span.grow { flex: 1; min-width: 0; }
.health-plan-banner strong { font-size: .9375rem; font-weight: 600; }
.health-plan-banner small { display: block; font-size: .8125rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.health-recipe-note { margin: 18px 0; padding: 16px; background: var(--soft); border-radius: 16px; font-size: .875rem; line-height: 1.65; }
.health-recipe-note h3 { font-size: 1rem; margin-bottom: 8px; }
.health-error { padding: 14px 16px; border: 1px solid var(--line); background: var(--warm); border-radius: 15px; margin-top: 16px; font-size: .875rem; line-height: 1.6; }

/* Composer: после ~2,5 строк текст занимает всю ширину над строкой действий (гистерезис 2,5/1,5). */
.comp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: end; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 8px; margin: 18px 0 10px; }
.comp:focus-within { border-color: var(--green); }
.comp textarea { grid-column: 1; background: none; min-width: 0; width: 100%; resize: none; border: 0; outline: none; font-size: max(16px, 1rem); padding: 7px; min-height: 2.5rem; max-height: 11rem; line-height: 1.5; color: var(--ink); overflow-y: hidden; scrollbar-width: thin; }
.comp textarea:focus-visible { outline: none; }
.comp .comp-ctl { grid-column: 2; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.comp .comp-send { width: 44px; height: 44px; border-radius: 13px; background: var(--green); color: var(--on-accent); display: grid; place-items: center; }
.comp.tall { grid-template-columns: minmax(0, 1fr); }
.comp.tall textarea { grid-column: 1 / -1; }
.comp.tall .comp-ctl { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; border-top: 1px solid var(--line); }
.comp .comp-hint { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); padding: 0 7px; }
.chat-intro { padding: 24px 20px; background: var(--selected); border-radius: 23px; text-align: center; }
.chat-intro .icon-box { margin: 0 auto 14px; background: var(--hero); color: var(--lime); width: 54px; height: 54px; border-radius: 18px; }
.chat-intro h2 { font-size: 1.5rem; }
.chat-intro p { color: var(--muted); margin-top: 9px; font-size: .875rem; }
.chat-context { display: flex; align-items: center; gap: 7px; font-size: .75rem; color: var(--muted); padding: 14px 2px; flex-wrap: wrap; }
.chat-message { padding: 15px 16px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); margin: 10px 0; font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-message.user { margin-left: 37px; background: var(--selected); border: 0; border-bottom-right-radius: 5px; }
.chat-message.assistant { margin-right: 12px; border-bottom-left-radius: 5px; }
.chat-message .button { margin-top: 13px; width: 100%; }
.chat-message .small { display: block; margin-top: 8px; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin: 15px 0; }
.suggestions button { padding: 11px 13px; min-height: 44px; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; font-size: .875rem; text-align: left; }

/* Оформление: темы и кегли */
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.theme-option { border: 1px solid var(--line); border-radius: 17px; padding: 8px; text-align: left; background: var(--paper); min-width: 0; overflow-wrap: anywhere; }
.theme-option[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.theme-option strong { display: block; font-size: .9375rem; margin: 9px 5px 3px; }
.theme-description { display: block; font-size: .75rem; line-height: 1.4; color: var(--muted); margin: 0 5px 5px; }
.theme-preview { display: block; height: 81px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); position: relative; overflow: hidden; }
.preview-top { position: absolute; top: 9px; left: 10px; width: 34%; height: 6px; border-radius: 8px; background: var(--green); }
.preview-message { position: absolute; top: 26px; left: 10px; width: 64%; height: 20px; border: 1px solid var(--line); border-radius: 7px 7px 7px 2px; background: var(--paper); }
.preview-reply { position: absolute; top: 52px; right: 10px; width: 53%; height: 18px; border-radius: 7px 7px 2px 7px; background: var(--selected); }
.preview-check { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: var(--on-accent); display: none; place-items: center; }
.theme-option[aria-pressed="true"] .preview-check { display: grid; }
.size-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.size-option { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; min-height: 54px; border-radius: 13px; border: 1px solid var(--line); background: var(--paper); font-size: .8125rem; overflow-wrap: anywhere; }
.size-option[aria-pressed="true"] { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); background: var(--selected); }
.size-sample { font-size: var(--sample-size); line-height: 1.2; font-weight: 550; min-width: 30px; color: var(--green); }
.type-preview { background: var(--paper); border: 1px solid var(--line); border-radius: 17px; padding: 16px; margin: 16px 0; }
.type-preview h3 { font-size: 1.125rem; margin-bottom: 5px; }
.type-preview p { font-size: 1rem; color: var(--muted); }
.type-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: .8125rem; }
.pattern-setting { display: flex; gap: 15px; align-items: center; justify-content: space-between; min-height: 66px; border-top: 1px solid var(--line); padding: 16px 0; cursor: pointer; }
.pattern-setting strong { display: block; font-size: .9375rem; margin-bottom: 4px; }
.switch { appearance: none; width: 44px; height: 27px; flex: none; border: 1px solid var(--muted); border-radius: 30px; background: var(--soft); position: relative; cursor: pointer; margin: 0; }
.switch::after { content: ""; position: absolute; left: 4px; top: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--muted); }
.switch:checked { background: var(--green); border-color: var(--green); }
.switch:checked::after { left: 21px; background: var(--on-accent); }
.wellness-icon { display: inline-flex; flex: none; background: transparent; overflow: hidden; }
.wellness-icon svg { width: 100%; height: 100%; display: block; }
.icon-box.art { background: transparent; border-radius: 0; width: 66px; height: 66px; flex: 0 0 66px; }
.kitchen-banner { background: var(--soft); border-radius: 20px; overflow: hidden; }
.kitchen-banner img { display: block; width: 100%; height: 165px; object-fit: cover; object-position: center 60%; }
.kitchen-banner > div { padding: 18px; }
.kitchen-banner h2 { font-size: 1.5rem; line-height: 1.3; margin-top: 6px; }
.eval-list { display: grid; gap: 8px; margin: 12px 0; }
.eval-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); font-size: .8125rem; line-height: 1.5; }
.eval-item .badge { margin-top: 2px; }
.eval-item small { display: block; color: var(--muted); }
@media (max-width: 360px) { .recipe-grid { gap: 10px; } .purchase-grid { gap: 7px; } .recipe-tile-body { padding: 10px 8px 12px; } .illustrated-link { gap: 9px; } .illustrated-link .product-art { width: 56px; height: 56px; flex-basis: 56px; } .purchase { column-gap: 6px; grid-template-columns: 28px 60px minmax(0, 1fr) 4rem; } .purchase .product-art { width: 60px; height: 60px; } .purchase-tile { padding: 8px 5px 5px; } .purchase-tile .product-art { max-width: 100px; } .purchase-tile h3 { font-size: .875rem; } .illustrated-ingredient .product-art { width: 64px; height: 64px; flex-basis: 64px; } .quiz-question { font-size: 1.375rem; } }

/* Экспертная рабочая область: на широком экране вторая панель доказательств; телефонный предпросмотр остаётся узким. */
.review-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .app-shell.wide .review-layout { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; } .app-shell.wide main { padding-bottom: 116px; } .app-shell.wide .bottom-nav { max-width: 1180px; } }
.review-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 14px; min-width: 0; }
.review-panel h3 { margin-bottom: 8px; }
.lane-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
@media (max-width: 339px) { .lane-grid { grid-template-columns: minmax(0, 1fr); } }
.lane-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--paper); text-align: left; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lane-card strong { font-size: .9375rem; }
.lane-card small { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.queue-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.queue-item .title { font-size: .9375rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.queue-item .meta { font-size: .75rem; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.review-state { font-size: .6875rem; padding: 4px 8px; border-radius: 10px; background: var(--soft); white-space: nowrap; }
.review-state.not_started { background: var(--soft); color: var(--muted); }
.review-state.draft { background: var(--warm); color: var(--orange); }
.review-state.reviewed { background: var(--status-pass-bg); color: var(--status-pass); }
.review-state.has_findings { background: var(--status-fail-bg); color: var(--status-fail); }
.review-state.conflict { background: var(--status-unknown-bg); color: var(--status-unknown); }
.review-state.cannot_assess { background: var(--status-info-bg); color: var(--status-info); }
.review-state.historical, .review-state.integrity_conflict { background: var(--danger-bg); color: var(--danger); }
.ref-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .75rem; color: var(--muted); }
.ref-line code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); padding: 2px 6px; border-radius: 6px; color: var(--ink); overflow-wrap: anywhere; }
.tabs { display: flex; gap: 6px; overflow: auto; scrollbar-width: none; margin: 12px 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: .8125rem; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--green); color: var(--on-accent); border-color: var(--green); }
.check-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check-row .check-label { font-size: .9375rem; line-height: 1.4; }
.check-row .segments button { font-size: .75rem; min-height: 36px; padding: 6px 4px; }
.finding-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin: 10px 0; background: var(--paper); }
.finding-card .row { flex-wrap: wrap; }
.severity { font-size: .6875rem; padding: 3px 8px; border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.severity.blocker { background: var(--status-fail-bg); color: var(--status-fail); }
.severity.major { background: var(--status-unknown-bg); color: var(--status-unknown); }
.severity.minor { background: var(--status-info-bg); color: var(--status-info); }
.severity.note { background: var(--soft); color: var(--muted); }
.json-tree { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); border-radius: 12px; padding: 12px; max-height: 70vh; overflow: auto; }
.json-tree .k { color: var(--green); }
.json-tree .s { color: var(--orange); }
.json-tree .n { color: var(--status-info); }
.json-tree .null { color: var(--muted); font-style: italic; }
.diff-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; font-size: .75rem; padding: 8px 0; border-bottom: 1px solid var(--line); }
.diff-row .before { color: var(--status-fail); text-decoration: line-through; }
.diff-row .after { color: var(--status-pass); }
.measure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.measure-grid .field { margin: 6px 0; }
.trace { border-left: 3px solid var(--line); padding-left: 12px; margin: 10px 0; font-size: .8125rem; }
.trace li { margin: 6px 0; }
.contact-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-sheet .photo { aspect-ratio: 1; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.alpha-check { background: repeating-conic-gradient(var(--line) 0 25%, var(--paper) 0 50%) 0 0 / 16px 16px; }
.report-print h1, .report-print h2 { margin: 16px 0 8px; }
@media print { .bottom-nav, .app-header, .expert-strip, .banner, .no-print { display: none !important; } main { padding: 0 !important; } .app-shell { max-width: none; box-shadow: none; } .app-shell::before { display: none; } }

