/* Тарелка — интерфейс под палец: крупные цели, тёмный фон, ничего лишнего. */

:root {
  --bg: #0E0F12;
  --card: #17191F;
  --card-2: #1E212A;
  --line: #262A34;
  --text: #F2F3F5;
  --muted: #8A8F98;
  --accent: #C8FF4D;
  --accent-dim: #93BF2F;
  --protein: #6EA8FE;
  --fat: #FFC24B;
  --carb: #FF7A9C;
  --danger: #FF6B6B;
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overscroll-behavior-y: none;
}

body { min-height: 100dvh; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.spacer { height: 130px; }

main { padding: calc(var(--safe-top) + 12px) 16px 0; max-width: 620px; margin: 0 auto; }

/* ─── вход ─── */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 60; padding: 24px; }
.login-box { width: 100%; max-width: 320px; text-align: center; }
.login-box .logo { font-size: 54px; }
.login-box h1 { margin: 4px 0 2px; font-size: 26px; }
.login-box input {
  width: 100%; margin: 18px 0 10px; padding: 15px; text-align: center; font-size: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text);
}
.error { color: var(--danger); font-size: 14px; min-height: 20px; }

/* ─── шапка дня ─── */
.day-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.day-title { flex: 1; text-align: center; }
.day-title h1 { margin: 0; font-size: 21px; letter-spacing: -0.3px; }
.day-title span { font-size: 13px; }
.simple-head h1 { margin: 4px 0 16px; font-size: 26px; letter-spacing: -0.4px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--card); color: var(--text); font-size: 22px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn:disabled { opacity: .3; }

/* ─── кольцо и макросы ─── */
.ring-card {
  background: var(--card); border-radius: 24px; padding: 20px 18px;
  display: flex; gap: 18px; align-items: center;
}
.ring-wrap { position: relative; width: 124px; height: 124px; flex: none; }
.ring { width: 124px; height: 124px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--card-2); stroke-width: 11; }
.ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .55s cubic-bezier(.2,.8,.2,1), stroke .3s;
}
.ring-fill.over { stroke: var(--danger); }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.ring-center b { font-size: 30px; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.ring-center span { font-size: 11px; }

.macros { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.macro-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.macro-top span { color: var(--muted); }
.macro-top b { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar { height: 6px; background: var(--card-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
[data-macro="protein"] .bar i { background: var(--protein); }
[data-macro="fat"] .bar i { background: var(--fat); }
[data-macro="carb"] .bar i { background: var(--carb); }

/* ─── персонаж и прокачка ─── */
.hero {
  display: flex; gap: 14px; align-items: center; background: var(--card);
  border-radius: 22px; padding: 12px 16px 12px 12px; margin-bottom: 12px; cursor: pointer;
}
.hero:active { background: var(--card-2); }
.hero-art { width: 62px; height: 78px; flex: none; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-body { flex: 1; min-width: 0; }
.hero-top { display: flex; justify-content: space-between; align-items: baseline; }
.hero-top b { font-size: 16px; letter-spacing: -0.2px; }
.hero-note { font-size: 12px; }
.streak { font-size: 13px; color: var(--fat); font-variant-numeric: tabular-nums; }

.xp { height: 7px; background: var(--card-2); border-radius: 4px; overflow: hidden; margin: 7px 0 5px; }
.xp i {
  display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}
.xp.big { height: 10px; margin: 12px 0 8px; }

/* Персонаж дышит. Замирает, когда система просит меньше движения. */
@keyframes breathe { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-2px) scaleY(1.015); } }
@keyframes cheer { 0% { transform: translateY(0); } 30% { transform: translateY(-12px) rotate(-3deg); } 60% { transform: translateY(0); } 80% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
.figure { animation: breathe 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.figure.cheer { animation: cheer .9s cubic-bezier(.3,1.4,.5,1); }
@media (prefers-reduced-motion: reduce) { .figure { animation: none; } }

/* ─── подбор рецепта ─── */
.cook-btn {
  width: 100%; margin-top: 12px; display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: none; border-radius: var(--radius); padding: 14px 16px;
  color: var(--text); font-family: inherit; font-size: 15px; cursor: pointer;
}
.cook-btn:active { background: var(--card-2); }
.cook-btn b { font-size: 13px; color: var(--muted); font-weight: 400; }

.recipe {
  background: var(--card-2); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
}
.recipe-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.recipe-top b { font-size: 15.5px; }
.recipe-top span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.recipe-why { font-size: 12.5px; color: var(--accent-dim); margin: 5px 0 9px; }
.recipe-macros { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.recipe-macros b { color: var(--text); font-variant-numeric: tabular-nums; }
.recipe details { margin-bottom: 10px; }
.recipe summary { font-size: 13px; color: var(--muted); cursor: pointer; padding: 4px 0; }
.recipe ul, .recipe ol { margin: 8px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.55; }
.recipe li { margin-bottom: 5px; }

/* ─── трекеры дня ─── */
.trackers { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tracker { background: var(--card); border-radius: var(--radius); padding: 13px 15px; }
.tracker-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tracker-head span { font-size: 14px; }
.tracker-head b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tracker-note { font-size: 11.5px; margin-top: 7px; }
.tracker-actions { display: flex; gap: 7px; margin-top: 10px; }
.tracker-actions button {
  flex: 1; background: var(--card-2); border: none; color: var(--text); border-radius: 11px;
  padding: 9px 6px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.tracker-actions button:active { background: var(--accent); color: #0E0F12; }
.tracker-actions .minus { flex: 0 0 46px; }
#t-water .bar i { background: var(--protein); }
#t-steps .bar i { background: var(--accent); }
.steps-value { display: flex; align-items: baseline; gap: 4px; }
.steps-value input {
  width: 74px; text-align: right; background: none; border: none; padding: 2px 0;
  color: var(--accent); font: inherit; font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; border-bottom: 1px dashed var(--line);
}
.steps-value input:focus { outline: none; border-bottom-color: var(--accent); }
.steps-value input::-webkit-outer-spin-button,
.steps-value input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.steps-value span { font-size: 14px; font-weight: 400; }

.work-list { display: flex; flex-direction: column; gap: 6px; }
.work-row {
  display: flex; align-items: center; gap: 9px; background: var(--card-2);
  border-radius: 11px; padding: 8px 11px; font-size: 13px;
}
.work-row .grow { flex: 1; min-width: 0; }
.work-row b { font-variant-numeric: tabular-nums; }
.work-row .drop {
  background: none; border: none; color: var(--muted); font-size: 17px; cursor: pointer; padding: 0 2px;
}

/* ─── экран прогресса ─── */
.stage {
  background: radial-gradient(120% 90% at 50% 0%, rgba(200,255,77,.10), transparent 70%), var(--card);
  border-radius: 24px; padding: 18px 18px 16px; text-align: center; margin-bottom: 14px;
}
.stage-art { width: 128px; height: 160px; margin: 0 auto 6px; }
.stage-art svg { width: 100%; height: 100%; display: block; }
.stage-level b { font-size: 22px; letter-spacing: -0.4px; display: block; }
.stage-level span { font-size: 13px; }
.stage-meta { display: flex; justify-content: space-between; font-size: 12.5px; }

.section-title { font-size: 16px; margin: 20px 0 10px; letter-spacing: -0.2px; }
.section-title span { font-size: 13px; font-weight: 400; }

.today-xp { padding: 14px 16px; }
.today-xp-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.today-xp-head b { font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; }
.today-xp-why { font-size: 12px; margin-top: 6px; line-height: 1.5; }

.achievements { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ach {
  background: var(--card); border-radius: 15px; padding: 12px 8px; text-align: center;
  opacity: .38; transition: opacity .3s, transform .2s;
}
.ach.got { opacity: 1; }
.ach.got:active { transform: scale(.95); }
.ach-icon { font-size: 26px; line-height: 1.1; filter: grayscale(1); }
.ach.got .ach-icon { filter: none; }
.ach b { display: block; font-size: 11.5px; margin-top: 4px; font-weight: 600; }
.ach span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.3; }

/* ─── быстрые действия ─── */
.quick-row { display: flex; gap: 7px; margin-top: 14px; }
.quick {
  flex: 1; background: var(--card); border: none; color: var(--muted); border-radius: 13px;
  padding: 11px 2px; font-size: 11.5px; cursor: pointer; font-family: inherit; white-space: nowrap;
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.quick[data-act="label"] { color: var(--accent); }
.quick:active { background: var(--card-2); color: var(--text); }

/* ─── список приёмов пищи ─── */
.meals { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.meal {
  display: flex; gap: 12px; align-items: center; padding: 10px;
  background: var(--card); border-radius: var(--radius); cursor: pointer;
}
.meal:active { background: var(--card-2); }
.meal-photo {
  width: 58px; height: 58px; border-radius: 13px; object-fit: cover; flex: none;
  background: var(--card-2);
}
.meal-photo.placeholder { display: grid; place-items: center; font-size: 24px; }
.meal-body { flex: 1; min-width: 0; }
.meal-slot { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.meal-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meal-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meal-kcal { text-align: right; flex: none; }
.meal-kcal b { font-size: 18px; font-variant-numeric: tabular-nums; }
.meal-kcal span { display: block; font-size: 10px; color: var(--muted); }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-emoji { font-size: 42px; margin-bottom: 10px; }

/* ─── нижняя панель ─── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: flex-end; justify-content: space-around;
  padding: 8px 20px calc(8px + var(--safe-bottom));
  background: rgba(14,15,18,.86);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  background: none; border: none; color: var(--muted); font-size: 11px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 18px; cursor: pointer; font-family: inherit;
}
.tab span { font-size: 19px; line-height: 1; }
.tab.active { color: var(--text); }
.shoot {
  width: 62px; height: 62px; border-radius: 50%; border: none; flex: none;
  background: var(--accent); color: #0E0F12; display: grid; place-items: center;
  margin-bottom: 2px; box-shadow: 0 6px 22px rgba(200,255,77,.28); cursor: pointer;
  transition: transform .15s;
}
.shoot:active { transform: scale(.93); }

/* ─── шторка ─── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; }
.sheet-back { position: absolute; inset: 0; background: rgba(0,0,0,.6); animation: fade .2s; }
.sheet {
  position: relative; width: 100%; max-height: 92dvh; overflow-y: auto;
  background: var(--card); border-radius: 26px 26px 0 0;
  padding: 8px 16px calc(20px + var(--safe-bottom));
  animation: rise .28s cubic-bezier(.2,.9,.25,1);
  max-width: 620px; margin: 0 auto; -webkit-overflow-scrolling: touch;
}
.sheet.compact { padding-bottom: calc(14px + var(--safe-bottom)); }
.grabber { width: 38px; height: 4px; background: var(--line); border-radius: 2px; margin: 4px auto 14px; }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.big-action {
  width: 100%; text-align: left; background: var(--card-2); border: none; color: var(--text);
  border-radius: var(--radius); padding: 15px 16px; margin-bottom: 9px; cursor: pointer;
  font-family: inherit; display: block;
}
.big-action:active { background: var(--line); }
.big-action b { display: block; font-size: 16px; font-weight: 600; }
.big-action span { font-size: 12.5px; color: var(--muted); }

/* ─── разбор ─── */
.shots { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; }
.shots img { width: 92px; height: 92px; object-fit: cover; border-radius: 14px; flex: none; }
.shots .add-shot {
  width: 92px; height: 92px; border-radius: 14px; flex: none; border: 1px dashed var(--line);
  background: none; color: var(--muted); font-size: 24px; cursor: pointer;
}

.analysis-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.analysis-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.4px; }
.total { text-align: right; flex: none; }
.total b { font-size: 30px; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.total small { font-size: 12px; color: var(--muted); display: block; margin-top: -3px; }
.scale-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  background: var(--card-2); border: none; color: var(--text); border-radius: 999px;
  padding: 8px 13px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.chip:active { background: var(--line); }
.chip.accent { background: var(--accent); color: #0E0F12; font-weight: 600; }

.macro-line { display: flex; gap: 8px; margin-bottom: 14px; }
.macro-pill {
  flex: 1; background: var(--card-2); border-radius: 13px; padding: 9px 4px; text-align: center;
}
.macro-pill b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.macro-pill span { font-size: 10.5px; color: var(--muted); }
.macro-pill[data-m="p"] b { color: var(--protein); }
.macro-pill[data-m="f"] b { color: var(--fat); }
.macro-pill[data-m="c"] b { color: var(--carb); }

.items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.item { background: var(--card-2); border-radius: var(--radius); padding: 12px 13px; }
.item.off { opacity: .42; }
.item-top { display: flex; align-items: center; gap: 10px; }
.item-name { flex: 1; min-width: 0; }
.item-name b { font-size: 15px; font-weight: 600; display: block; }
.item-name span {
  font-size: 12px; color: var(--muted); display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-kcal { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; flex: none; text-align: right; }
.item-kcal i { display: block; font-style: normal; font-size: 9.5px; font-weight: 400; color: var(--muted); letter-spacing: .3px; }
.item-toggle {
  width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line);
  background: none; color: var(--accent); flex: none; cursor: pointer; font-size: 14px;
  display: grid; place-items: center; padding: 0;
}
.item-toggle.on { background: var(--accent); border-color: var(--accent); color: #0E0F12; }

.grams { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.grams button {
  width: 34px; height: 34px; border-radius: 10px; border: none; background: var(--line);
  color: var(--text); font-size: 19px; cursor: pointer; flex: none; line-height: 1;
}
.grams button:active { background: var(--muted); color: #0E0F12; }
.g-field { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 3px; min-width: 0; }
.g-field i { font-style: normal; font-size: 12px; color: var(--muted); }
.grams .g-value {
  width: 62px; text-align: right; font-variant-numeric: tabular-nums; font-size: 15px;
  background: none; border: none; color: var(--text); font-family: inherit; padding: 0;
}
.grams .g-value::-webkit-outer-spin-button,
.grams .g-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.grams .g-value:focus { outline: none; color: var(--accent); }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 26px; background: none; margin: 2px 0 0;
}
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--line); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent);
  margin-top: -9px; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.why { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.src { font-size: 11px; color: var(--accent-dim); margin-top: 4px; }
.conf { font-size: 10px; padding: 2px 6px; border-radius: 5px; background: var(--line); color: var(--muted); }
.conf.low { background: rgba(255,107,107,.16); color: var(--danger); }
.conf.high { background: rgba(200,255,77,.14); color: var(--accent-dim); }

.portion { display: flex; gap: 7px; margin-bottom: 13px; }
.portion button {
  flex: 1; background: var(--card-2); border: none; color: var(--text); border-radius: 11px;
  padding: 9px 0; font-size: 13px; cursor: pointer; font-family: inherit;
}
.portion button:active, .portion button.on { background: var(--accent); color: #0E0F12; font-weight: 600; }

.ask { display: flex; gap: 8px; margin-bottom: 12px; }
.ask input {
  flex: 1; background: var(--card-2); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 13px; color: var(--text); font-size: 15px; font-family: inherit; min-width: 0;
}
.ask input:focus { outline: none; border-color: var(--accent-dim); }
.ask button {
  width: 46px; border-radius: 13px; border: none; background: var(--accent); color: #0E0F12;
  font-size: 18px; cursor: pointer; flex: none;
}

.note-line { font-size: 13px; color: var(--muted); margin: 0 0 14px; padding-left: 10px; border-left: 2px solid var(--line); }

.btn {
  border: none; border-radius: 15px; padding: 15px; font-size: 16px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn.primary { background: var(--accent); color: #0E0F12; }
.btn.ghost { background: var(--card-2); color: var(--text); }
.btn.danger { background: none; color: var(--danger); font-weight: 500; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; gap: 9px; }
.btn-row .btn { flex: 1; }

/* ─── ожидание ─── */
.thinking { text-align: center; padding: 30px 10px 26px; }
.pulse {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.thinking p { margin: 0; font-size: 15px; }
.thinking .muted { font-size: 13px; margin-top: 5px; }
.preview-strip { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.preview-strip img { width: 74px; height: 74px; object-fit: cover; border-radius: 14px; }

/* ─── история ─── */
.stat-row { display: flex; gap: 9px; margin-bottom: 16px; }
.stat {
  flex: 1; background: var(--card); border-radius: var(--radius); padding: 13px 10px; text-align: center;
}
.stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat span { font-size: 11px; color: var(--muted); }
.history { display: flex; flex-direction: column; gap: 8px; }
.hday {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: var(--radius); padding: 13px 14px; cursor: pointer;
}
.hday-date { flex: 1; }
.hday-date b { font-size: 15px; display: block; }
.hday-date span { font-size: 12px; color: var(--muted); }
.hbar { width: 74px; height: 5px; background: var(--card-2); border-radius: 3px; overflow: hidden; flex: none; }
.hbar i { display: block; height: 100%; background: var(--accent); }
.hbar i.over { background: var(--danger); }
.hday-kcal { font-variant-numeric: tabular-nums; font-weight: 600; width: 62px; text-align: right; }

/* ─── формы ─── */
.card { background: var(--card); border-radius: 20px; padding: 6px 16px; margin-bottom: 14px; }
.card.form { padding: 6px 16px 16px; }
.targets { padding: 18px 18px 16px; }
.target-main { display: flex; justify-content: space-between; align-items: baseline; }
.target-main b { font-size: 30px; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.target-main small { font-size: 13px; color: var(--muted); font-weight: 400; }
.target-macros { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.target-macros b { color: var(--text); font-variant-numeric: tabular-nums; }

.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.row:last-of-type { border-bottom: none; }
.row.column { flex-direction: column; align-items: stretch; gap: 9px; }
.row input[type=number], .row select {
  width: 110px; text-align: right; background: none; border: none; color: var(--text);
  font-size: 16px; font-family: inherit;
}
.row.column select {
  width: 100%; text-align: left; background: var(--card-2); border-radius: 11px; padding: 11px;
}
.row input:focus, .row select:focus { outline: none; color: var(--accent); }
.row.switch input[type=checkbox] {
  appearance: none; -webkit-appearance: none; margin: 0; border: none; cursor: pointer;
  width: 50px; height: 30px; border-radius: 15px; background: var(--card-2);
  position: relative; transition: background .2s; flex: none;
}
.row.switch input[type=checkbox]::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s;
}
.row.switch input[type=checkbox]:checked { background: var(--accent); }
.row.switch input[type=checkbox]:checked::after { transform: translateX(20px); background: #0E0F12; }
.segmented { display: flex; gap: 5px; }
.segmented.wide { width: 100%; }
.segmented button {
  flex: 1; background: var(--card-2); border: none; color: var(--muted); border-radius: 10px;
  padding: 10px 15px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.segmented button.on { background: var(--accent); color: #0E0F12; font-weight: 600; }
.manual { border-top: 1px solid var(--line); }
#f-save, #w-save { margin-top: 16px; }

/* ─── график веса ─── */
.weight-card { padding: 16px; }
.weight-head { display: flex; justify-content: space-between; align-items: baseline; }
.weight-head span.muted { font-size: 13px; }
.weight-head b { font-size: 26px; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; margin-left: 8px; }
.weight-delta { font-size: 13px; font-variant-numeric: tabular-nums; }
.weight-delta.down { color: var(--accent); }
.weight-delta.up { color: var(--fat); }
.weight-chart { margin: 12px 0 4px; }
.weight-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.weight-chart .grid { stroke: var(--line); stroke-width: 1; }
.weight-chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.weight-chart .area { fill: url(#wfade); }
.weight-chart .dot { fill: var(--accent); }
.weight-chart .lbl { fill: var(--muted); font-size: 9px; font-family: inherit; }
.weight-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 6px; }
#weight-add { margin-top: 10px; }

/* ─── подключение Здоровья ─── */
.health { padding: 16px; }
.health-head b { display: block; font-size: 15px; }
.health-head span { font-size: 12px; }
.health-now {
  font-size: 13px; margin: 10px 0 0; padding: 9px 12px; border-radius: 11px;
  background: var(--card-2); color: var(--muted);
}
.health-now.ok { color: var(--accent); }
.health-steps li { margin-bottom: 9px; }
.health-steps { margin: 12px 0; padding-left: 20px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.health-steps li { margin-bottom: 7px; }
.health-steps b { color: var(--text); font-weight: 600; }
.health-steps code, .copy-row code {
  background: var(--card-2); padding: 1px 5px; border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--accent);
}
.copy-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.copy-row code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 9px 10px;
}
.copy-row button {
  flex: none; background: var(--card-2); border: none; color: var(--text); border-radius: 10px;
  padding: 9px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.copy-row button:active { background: var(--accent); color: #0E0F12; }

/* ─── тост ─── */
.toast {
  position: fixed; left: 50%; bottom: calc(104px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 17px; border-radius: 13px; font-size: 14px; z-index: 70; max-width: 88vw;
  text-align: center; animation: fade .2s;
}
