/* Часть «здоровье» второго захода (18.10.2026): вкладка, экраны показателей,
   окна ввода тела. Цвета показателей те же, что в макетах (penpot lib2.js):
   без красного, пульс тёплым терракотовым, перебор и срочное песочным. */

:root {
  --m-kcal: #c8801f;   --m-kcal-s: #f7ebd8;
  --m-steps: #35935a;  --m-steps-s: #e6f1e6;
  --m-mins: #4f86b0;   --m-mins-s: #e3eef6;
  /* те же цвета темнее для текста на белой карточке: контраст от 5:1 */
  --m-kcal-t: #9a5f0e; --m-steps-t: #2b7a4b; --m-mins-t: #3c6c94;
  --m-sleep: #6a6fb5;  --m-sleep-s: #e9e9f6;
  --m-pulse: #a86f4c;  --m-pulse-s: #f4e6dc;
  --m-bp: #4f86b0;     --m-bp-s: #e3eef6;
  --m-bp2: #8fb4d0;
  --m-weight: #35935a; --m-weight-s: #e6f1e6;
  --m-meas: #8c6e45;   --m-meas-s: #f1e9dc;
  --m-labs: #7a7f5a;   --m-labs-s: #eeefe4;
  --m-zone: #ede8da;
  --line2: #d6cfbc;
}

/* ================================================================ *
 * Вкладка «здоровье» (макет B01)
 * ================================================================ */

/* ---------- карточка активности: три полудуги, числа под ними ---------- */

.hzact { padding: 18px 8px 12px; }
/* лента дней движения над радугой: под днём три кольца, они крупнее, чем у еды */
.hzribbon { margin: -8px 0 10px; }
.hzribbon .ribbon__day { min-height: 66px; padding: 4px 0; gap: 2px; }
.hzribbon .ribbon__ring { width: 26px; height: 26px; }
.hzribbon .ribbon__day.is-open { background: var(--bg); }
.hzribbon__svg { display: block; width: 100%; height: 100%; }
.hzact__arcs { display: flex; justify-content: center; }
.hzact__arcs .arcs { width: min(260px, 80%); height: auto; display: block; }
.arcs__track, .arcs__fill { fill: none; stroke-linecap: round; }
.arcs__track { opacity: .16; }
.arcs .is-kcal { stroke: var(--m-kcal); }
.arcs .is-steps { stroke: var(--m-steps); }
.arcs .is-mins { stroke: var(--m-mins); }
.arcs__label { fill: var(--muted); font-size: 13px; font-family: var(--font); }

.hzact__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin-top: 14px; }
.hzact__col {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 60px; padding: 6px 2px 6px 6px; border: 0; border-radius: 12px;
  background: none; text-align: left; color: var(--text);
}
.hzact__col:active { background: var(--card-2); }
.hzact__label { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text); font-weight: 500; }
.hzact__chev { display: inline-flex; color: #9a9384; }
.hzact__chev svg { width: 13px; height: 13px; }
/* «240 /300 ккал» одной строкой; на узком экране «/300 ккал» целиком уходит вниз */
.hzact__num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; min-width: 0; }
.hzact__fact { font-family: var(--serif); font-size: 22px; line-height: 1.2; white-space: nowrap; }
.hzact__goal { font-size: 12.5px; color: var(--muted); line-height: 1.3; white-space: nowrap; }
.hzact__col.is-kcal .hzact__fact { color: var(--m-kcal-t); }
.hzact__col.is-steps .hzact__fact { color: var(--m-steps-t); }
.hzact__col.is-mins .hzact__fact { color: var(--m-mins-t); }
.hzact__col.is-word .hzact__fact { font-family: var(--font); font-size: 15px; font-weight: 600; white-space: normal; }
.hzact__add {
  display: flex; align-items: center; justify-content: center;
  width: calc(100% - 16px); min-height: 48px; margin: 12px auto 0; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-dark); font-size: 15px; font-weight: 600;
}
.hzact__add:active { filter: brightness(.97); }

/* ---------- плитки 2 в ряд ---------- */

.hztiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hztile {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  min-height: 156px; padding: 14px 12px 12px 14px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--card);
  box-shadow: var(--shadow-soft); text-align: left; color: var(--text);
}
.hztile:active { transform: translateY(1px); }
.hztile__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hztile__icon {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
}
.hztile__icon svg { width: 18px; height: 18px; }
.hztile__title { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hztile__chev { display: inline-flex; color: #9a9384; flex: none; }
.hztile__chev svg { width: 14px; height: 14px; }
.hztile__num { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 4px; margin-top: 10px; min-width: 0; }
.hztile__value { font-family: var(--serif); font-size: 27px; line-height: 1.1; white-space: nowrap; }
.hztile__value small { font-family: var(--font); font-size: 13px; color: var(--muted); }
.hztile__unit { font-size: 13px; color: var(--muted); }
.hztile__sub { margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.hztile__spark { display: block; margin-top: auto; padding-top: 8px; }
.hztile__spark .spark { display: block; width: 100%; height: 30px; }
.hztile__body { display: flex; justify-content: flex-start; }
.hztile__body .body__mini { width: auto; height: 46px; }
.body__mini .body__shape > * { fill: var(--m-meas-s); stroke: var(--m-meas); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.body__mini .body__dot { fill: var(--m-meas); }

/* Нечётная последняя плитка на всю ширину; у обмеров силуэт справа (B01). */
.hztile--wide { grid-column: 1 / -1; min-height: 124px; }
.hztile--wide .hztile__spark { max-width: 60%; }
.hztile--wide.hztile--measures .hztile__num,
.hztile--wide.hztile--measures .hztile__sub { max-width: 58%; }
.hztile--wide.hztile--measures .hztile__spark {
  position: absolute; top: 12px; bottom: 10px; right: 18%; max-width: none; margin: 0; padding: 0;
}
.hztile--wide.hztile--measures .hztile__body { height: 100%; }
.hztile--wide .hztile__body .body__mini { height: 100%; width: auto; }

.hztile--sleep .hztile__icon { background: var(--m-sleep-s); color: var(--m-sleep); }
.hztile--pulse .hztile__icon { background: var(--m-pulse-s); color: var(--m-pulse); }
.hztile--weight .hztile__icon { background: var(--m-weight-s); color: var(--m-weight); }
.hztile--bp .hztile__icon { background: var(--m-bp-s); color: var(--m-bp); }
.hztile--measures .hztile__icon { background: var(--m-meas-s); color: var(--m-meas); }
.hztile--labs .hztile__icon { background: var(--m-labs-s); color: var(--m-labs); }
.hztile--warn { border-color: var(--sand); background: #fffaf2; }

.hztile--empty { background: none; box-shadow: none; border: 1.5px dashed var(--line2); }
.hztile__hint { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.hztile__add {
  display: flex; align-items: center; gap: 6px; margin-top: auto;
  min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 600; color: var(--accent-dark);
}
.hztile__plus { display: inline-flex; color: var(--accent); }
.hztile__plus svg { width: 16px; height: 16px; }

/* мини-графики плиток: прошлые дни светлые, последний тёмный */
.spark__bar { fill: currentColor; opacity: .45; }
.spark__bar.is-last { opacity: 1; }
.spark__bar.is-empty { fill: var(--card-2); opacity: 1; }
.spark__dot { fill: currentColor; }
.spark__line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark__end { fill: currentColor; stroke: var(--card); stroke-width: 2; }
.spark--sleep { color: var(--m-sleep); }
.spark--pulse { color: var(--m-pulse); }
.spark--weight { color: var(--m-weight); }
.spark--bp { color: var(--m-bp); }

.hzempty { margin: 0; padding: 0 4px; font-size: 14px; color: var(--muted); }

/* ---------- выписка и ссылка «что вести» ---------- */

.hzdoc {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 72px; padding: 14px 14px 14px 16px; text-align: left; color: var(--text);
}
.hzdoc__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); }
.hzdoc__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hzdoc__text b { font-size: 15px; font-weight: 600; }
.hzdoc__text span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.hzdoc__chev, .hzlink__chev { display: inline-flex; flex: none; color: #9a9384; }
.hzdoc__chev svg, .hzlink__chev svg { width: 16px; height: 16px; }
.hzlink {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 48px; padding: 0 6px; border: 0; background: none;
  font-size: 15px; color: var(--accent-dark); text-align: left; text-decoration: none;
}

/* ================================================================ *
 * Экран показателя (ui-metric.js), макеты B02-B05
 * ================================================================ */

.metric .layer__body { gap: 12px; }

/* переключатели: сегменты, как в макетах */
.mhead { display: flex; flex-direction: column; gap: 8px; }
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  padding: 4px; border-radius: 999px; background: var(--card-2);
}
.seg__btn {
  min-height: 44px; padding: 0 6px; border: 0; border-radius: 999px; background: none;
  font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.seg__btn.is-on { background: var(--card); color: var(--accent-dark); font-weight: 600; box-shadow: 0 1px 4px rgba(47, 43, 37, .12); }

.mper { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.mper__label { flex: 1 1 auto; text-align: center; font-size: 15px; font-weight: 600; }
.mper__btn { color: var(--text); }
.mper__btn:disabled { color: var(--line2); }

/* крупное число */
.mhero { padding: 2px 4px 0; }
.mhero__when { margin: 0 0 2px; font-size: 13.5px; color: var(--muted); }
.mhero__num { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin: 0; }
.mhero__value { font-family: var(--serif); font-size: 44px; line-height: 1.1; }
.mhero__unit { font-family: var(--serif); font-size: 18px; color: var(--muted); margin-right: 4px; }
.mhero__sub { margin: 6px 0 0; font-size: 15px; color: var(--text); line-height: 1.4; }
.mhero__word { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.mhero__word b { font-weight: 600; }
.mhero__word.is-warn b { color: var(--sand-deep); }
.mhero--empty { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.dashadd {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; border-radius: 16px;
  border: 1.5px dashed var(--accent); background: none;
  font-size: 15px; font-weight: 600; color: var(--accent-dark);
}
.dashadd__plus { display: inline-flex; color: var(--accent); }

/* график */
.mchart { padding: 14px 14px 14px; }
.mchart__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; }
.mchart__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.mchart__aside { font-size: 13px; font-weight: 500; color: var(--text); }
.mchart__head .mleg { margin-left: auto; }
.mc { display: flex; flex-direction: column; }
/* Точная строка для чтения с экрана: на виду число у точки, а строка нужна
   экранному диктору. Видна, только когда записей за период нет. */
.mc__tip {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mc__tip.is-empty {
  position: static; width: auto; height: auto; margin: 0 0 6px; overflow: visible; clip: auto; white-space: normal;
  font-size: 14px; color: var(--muted);
}
.mc__svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; cursor: pointer; }
.mc__svg:focus { outline: none; }
.mc__svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.mc__grid { stroke: var(--card-2); stroke-width: 1; }
.mc__base { stroke: var(--line2); stroke-width: 1; }
.mc__tick { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.mc__tick.is-strong, .mc__val.is-strong { font-weight: 700; fill: var(--text); }
.mc__val { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.mc__float {
  fill: var(--text); font-size: 16px; font-family: var(--serif);
  paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round;
}
.mc__float.is-static { fill: var(--muted); }
.mc--weight .mc__float:not(.is-static) { fill: var(--accent-dark); }
.mc--pulse .mc__float { fill: var(--m-pulse); }
.mc--bp .mc__float { fill: var(--m-bp); }
.mc--sleep .mc__float { fill: var(--m-sleep); }
.mc__goal { stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 6 5; }
.mc__goal-label { fill: var(--muted); font-size: 12px; font-family: var(--font); font-weight: 600; paint-order: stroke; stroke: var(--card); stroke-width: 3px; }
.mc__goal.is-goal { stroke: var(--m-weight); }
.mc__goal-label.is-goal { fill: var(--accent-dark); }
.mc--bp .mc__goal { stroke: var(--sand); }
.mc__zone-bg { fill: #f3eee2; }
.mc__zone-line { stroke: var(--m-zone); stroke-width: 2.2; }
.mc__zone-label { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.mc__trendband { fill: var(--m-weight); opacity: .14; }
.mc__bar { fill: var(--accent); opacity: .45; }
.mc__bar.is-picked { opacity: 1; }
.mc--steps .mc__bar { fill: var(--m-steps); }
.mc--kcal .mc__bar { fill: var(--m-kcal); }
.mc--mins .mc__bar { fill: var(--m-mins); }
.mc--sleep .mc__bar { fill: var(--m-sleep); }
.mc__line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mc__dot { stroke-width: 1.8; }
.mc__dot.is-picked { stroke: var(--text) !important; stroke-width: 2; }
.mc__dot.is-hollow { fill: var(--card) !important; }
.mc--weight .mc__line { stroke: var(--m-weight); }
.mc--weight .mc__dot { fill: var(--m-weight); stroke: var(--card); opacity: 0; }
.mc--weight .mc__dot.is-picked { opacity: 1; r: 5; stroke: var(--card) !important; stroke-width: 2.4; }
.mc--pulse .mc__dot { fill: var(--m-pulse); stroke: var(--m-pulse); }
.mc--bp .mc__line.is-sys { stroke: var(--m-bp); }
.mc--bp .mc__line.is-dia { stroke: var(--m-bp2); }
.mc--bp .mc__dot.is-sys { fill: var(--m-bp); stroke: var(--m-bp); }
.mc--bp .mc__dot.is-dia { fill: var(--m-bp2); stroke: var(--m-bp2); }
/* ночи недели: выбранная строка лавандовой полосой, ночи вне 7-9 ч светлее */
.mc__band { fill: transparent; }
.mc__band.is-picked { fill: var(--m-sleep-s); }
.mc__night { fill: var(--m-sleep); }
.mc__night.is-short { fill: #bfc1e4; }
/* дневной сон: светлая полоска с обводкой за ночью и верх столбика */
.mc__nap { fill: var(--m-sleep-s); stroke: var(--m-sleep); stroke-width: 1.2; }
.mc--sleep .mc__bar.is-extra { fill: var(--m-sleep-s); stroke: var(--m-sleep); stroke-width: 1.2; }
.mc__nightday.is-picked { font-weight: 700; fill: var(--text); }
.mc__nightval { fill: var(--text); font-size: 15px; font-family: var(--serif); }
.mc__nightval.is-short { fill: var(--muted); }
.mchart__note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* подписи графика */
.mleg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.mleg--below { margin-top: 12px; }
.mleg__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mleg__mark { display: inline-block; flex: none; color: var(--text); }
.mleg__mark--dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.mleg__mark--ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box; }
.mleg__mark--bar { width: 18px; height: 8px; border-radius: 4px; background: currentColor; }
.mleg__mark--band { width: 18px; height: 8px; border-radius: 2px; background: currentColor; opacity: .22; }
.mleg__mark--line { width: 16px; height: 0; border-top: 2.5px solid currentColor; border-radius: 2px; }
.mleg__mark--dash { width: 16px; height: 0; border-top: 2px dashed currentColor; }
.mleg__mark--hatch { width: 18px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(45deg, #f3eee2 0 3px, var(--m-zone) 3px 5px); }
.mleg__mark.is-sleep { color: var(--m-sleep); }
.mleg__mark--nap { width: 18px; height: 8px; border-radius: 4px; background: var(--m-sleep-s); border: 1.2px solid var(--m-sleep); box-sizing: border-box; }
.mleg__mark.is-light { opacity: .45; }
.mleg__mark.is-pulse { color: var(--m-pulse); }
.mleg__mark.is-weight { color: var(--m-weight); }
.mleg__mark.is-sys, .mleg__mark.is-bp { color: var(--m-bp); }
.mleg__mark.is-dia { color: var(--m-bp2); }
.mleg__mark.is-sand { color: var(--sand); }

/* итог 2 × 2 */
.msum { padding: 14px 16px 16px; }
.msum__title { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.msum__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.msum__cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msum__label { font-size: 13px; color: var(--muted); }
.msum__value { font-family: var(--serif); font-size: 23px; line-height: 1.2; overflow-wrap: anywhere; }
.msum__value small { font-family: var(--font); font-size: 12px; color: var(--muted); }
.msum--few .muted { margin: 0; font-size: 15px; }

/* записи периода: дата и подробность слева, значение справа (B03-B05) */
.mrec { padding: 14px 16px 4px; }
.mrec__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin-bottom: 2px; }
.mrec__title { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 400; }
.mrec__add {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--accent); background: var(--accent-soft);
  font-size: 14px; font-weight: 600; color: var(--accent-dark); white-space: nowrap;
}
.mrec__empty { margin: 4px 0 12px; }
.mrec__list { display: flex; flex-direction: column; }
.mrec__row { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--card-2); }
.mrec__list > .mrec__row:first-child { border-top: 0; }
.mrec__main {
  flex: 1 1 auto; min-width: 0; min-height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border: 0; background: none; text-align: left; color: var(--text);
}
.mrec__left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mrec__when { font-size: 15px; color: var(--text); }
.mrec__sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.mrec__val { flex: none; font-family: var(--serif); font-size: 21px; line-height: 1.2; white-space: nowrap; }
.mrec__val small { font-family: var(--font); font-size: 12px; color: var(--muted); }
.mrec__del {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: none; color: var(--muted); border-radius: 50%;
}
.mrec__del svg { width: 18px; height: 18px; }
.mrec__del:active { background: var(--card-2); }
.mrec__more { width: 100%; min-height: 44px; border: 0; border-top: 1px solid var(--card-2); background: none; color: var(--accent-dark); font-size: 14px; font-weight: 600; }

/* карточка-строка со значком: цель шагов, расход дня, сон и еда */
.minfo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 14px 14px 16px; text-align: left; color: var(--text); }
.minfo__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); color: var(--muted); }
.minfo__icon svg { width: 20px; height: 20px; }
.minfo__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.minfo__text b { font-size: 15px; font-weight: 600; }
.minfo__text span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.minfo__chev { display: inline-flex; flex: none; color: #9a9384; }
.minfo__chev svg { width: 16px; height: 16px; }
.minfo--steps .minfo__icon { background: var(--m-steps-s); color: var(--m-steps); }
.minfo--kcal .minfo__icon { background: var(--m-kcal-s); color: var(--m-kcal); }
.minfo--mins .minfo__icon { background: var(--m-mins-s); color: var(--m-mins); }
.minfo--sleep { background: var(--m-sleep-s); border-color: transparent; box-shadow: none; }
.minfo--sleep .minfo__icon { background: var(--card); color: var(--m-sleep); }
.minfo--sleep .minfo__text span { color: var(--text); font-size: 14px; }

/* «что это значит» и «спросить нутрициолога» */
.mexp { display: flex; flex-direction: column; gap: 8px; }
.mexp__fold { border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.mexp__fold > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; padding: 0 16px; font-size: 15px; color: var(--text); cursor: pointer;
}
.mexp__fold > summary::-webkit-details-marker { display: none; }
.mexp__fold > summary::after {
  content: ''; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 0;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
.mexp__fold[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.mexp__body, .mexp__list { padding: 0 16px 12px; margin: 0; }
.mexp__body p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.mexp__list { padding-left: 32px; }
.mexp__list li { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.mexp__ask {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 48px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--accent-soft); color: var(--accent-dark); font-size: 15px; font-weight: 600; text-align: left;
}
.mexp__chev { display: inline-flex; }
.mexp__chev svg { width: 16px; height: 16px; }

/* активность: окно выбора */
.choose { display: flex; flex-direction: column; gap: 10px; }
.choose__btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 64px; padding: 12px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--bg-soft); text-align: left; color: var(--text);
}
.choose__btn b { font-size: 16px; }
.choose__btn span { font-size: 13px; color: var(--muted); }
.choose__btn:active { border-color: var(--accent); background: var(--accent-soft); }

/* вес: путь и дата цели (B05) */
.wpath2 { padding: 14px 16px 14px; }
.wpath2__ends { position: relative; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.wpath2__now { position: absolute; top: 0; transform: translateX(-50%); color: var(--accent-dark); font-weight: 600; white-space: nowrap; }
.wpath2__track { position: relative; height: 10px; margin: 10px 0 12px; border-radius: 999px; background: var(--card-2); }
.wpath2__track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--m-weight); }
.wpath2__track b {
  position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--card); border: 3px solid var(--m-weight);
}
.wpath2__foot { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; }
.wpath2__done { font-size: 15px; font-weight: 600; }
.wpath2__left { font-size: 13px; color: var(--muted); }
.mgoal { padding: 16px 16px 6px; background: var(--m-weight-s); border-color: transparent; box-shadow: none; }
.mgoal__date { margin: 0; font-family: var(--serif); font-size: 23px; line-height: 1.25; color: var(--accent-dark); }
.mgoal__note { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.mgoal__why {
  display: flex; align-items: center; min-height: 44px; padding: 0;
  border: 0; background: none; color: var(--accent-dark); font-size: 14px; font-weight: 600;
}
.why__line { margin: 0 0 10px; font-size: 15px; line-height: 1.45; }

/* давление: срочное */
.murgent { border-color: var(--sand); background: #fdf5e6; }
.murgent .card__title { color: var(--sand-deep); margin-bottom: 6px; }
.murgent p { margin: 0 0 6px; font-size: 15px; color: #6d4b14; line-height: 1.45; }
.murgent .muted { font-size: 13px; }
.mexp__fold--card { margin: 0; }

/* обмеры: силуэт с ярлыками (B07) */
.mbody__when { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 4px; font-size: 13.5px; color: var(--muted); }
.mbody__when.is-due { color: var(--sand-deep); }
.mbody__clock { display: inline-flex; flex: none; }
.mbody__clock svg { width: 16px; height: 16px; }
.mbody { padding: 14px 8px 10px; }
.mbody__after { display: flex; flex-direction: column; gap: 12px; }
.mbody__hint { margin: 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.mbody__start { margin: 0; padding: 0 4px; font-size: 14px; color: var(--accent-dark); text-align: center; }
.mbody__all { min-height: 52px; margin: 0; }
.body { position: relative; width: 100%; max-width: 420px; margin: 0 auto; }
.body__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.body__floor { fill: var(--card-2); }
.body__shape > * { fill: var(--m-meas-s); stroke: var(--m-meas); stroke-width: 1.4; stroke-linejoin: round; }
.body__lead { stroke: var(--m-meas); stroke-width: 1.2; }
.body__lead.is-empty { stroke: var(--line2); stroke-dasharray: 3 3; }
.body__dot { fill: var(--m-meas); stroke: var(--card); stroke-width: 2; }
.body__dot.is-empty { fill: var(--card); stroke: var(--m-meas); stroke-dasharray: 2 2; stroke-width: 1.4; }
.body__pill {
  position: absolute; transform: translateY(-50%);
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line2); background: var(--card);
  box-shadow: 0 1px 3px rgba(47, 43, 37, .08);
  font-size: 13.5px; color: var(--text); white-space: nowrap;
}
/* касание 44 px при пилюле 34 px: невидимое поле сверху и снизу */
.body__pill::after { content: ''; position: absolute; inset: -5px 0; }
.body__pill.is-main:not(.is-empty) { background: var(--m-meas-s); border-color: var(--m-meas); }
.body__pill.is-empty { border: 1.5px dashed var(--line2); box-shadow: none; background: var(--bg-soft); color: var(--accent-dark); font-weight: 600; }
.body__name { color: var(--text); }
.body__val { white-space: pre; }
.mchg { padding: 14px 16px; }
.mchg__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.mchg__cell { display: flex; justify-content: space-between; gap: 6px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--card-2); }
.mchg__label { color: var(--muted); }
.mchg__value { font-family: var(--serif); white-space: nowrap; }

/* анализы слоем: прежние карточки на месте */
.metric--labs .layer__body > .fold { margin-bottom: 0; }

/* ================================================================ *
 * Окна ввода тела (inputs.js): одно окно на всё приложение
 * ================================================================ */

.inrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
/* за какой день: «сегодня · вчера · позавчера · календарь» */
.daypick { gap: 6px; }
.daypick__b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 13px; font-size: 14px; background: var(--card); }
.daypick__b.chip--active { background: var(--accent-soft); font-weight: 700; }
.daypick__cal { position: relative; min-width: 44px; padding: 0 12px; cursor: pointer; }
.daypick__ic { display: inline-flex; }
.daypick__ic svg { width: 18px; height: 18px; }
.daypick__cal:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
/* чип с системным выбором под ним: дата или «утро ▾» */
.pickchip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; font-size: 15px; font-weight: 600;
  color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent);
}
.pickchip__arrow { font-size: 12px; color: var(--accent-dark); }
.pickchip__native {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  opacity: 0; border: 0; cursor: pointer; font-size: 16px;
}
.pickchip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.inpast { margin: 0 0 4px; font-size: 15px; color: var(--muted); }
.inword { margin: 0; font-size: 15px; }
.chip--big { min-height: 44px; padding: 0 18px; font-size: 15px; }
.bpin .input--big::placeholder, .pulsein .input--big::placeholder, .field--big .input--big::placeholder { color: #c9c2b2; }
.pulsein { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.pulsein__num { margin-bottom: 0; }
.pulsein__time { display: flex; flex-direction: column; gap: 4px; }
.input--time-sm { width: 116px; font-size: 20px; padding: 13px 8px; text-align: center; }
.pulsein + .input-error { margin-top: 10px; }
.msrchart { margin: 12px 0 0; }
.mc--meas .mc__line { stroke: var(--m-meas); opacity: .6; }
.mc--meas .mc__dot { fill: var(--m-meas); stroke: var(--m-meas); }

/* ---------- окно давления (макет B08) ---------- */
/* Сессия и ночь в строке заголовка справа, перед крестиком (inHead в inputs.js). */
.sheet__head--side { align-items: center; }
.sheet__headside { display: flex; align-items: center; min-width: 0; margin-left: auto; }
.bpin__sess .pickchip { background: var(--card); border: 1px solid var(--line2); color: var(--text); }
.bpin__sess .pickchip__arrow { color: var(--muted); }
.bpbox3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bpbox {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 96px; padding: 10px 12px 8px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: text;
}
.bpbox:focus-within { border: 2px solid var(--accent); padding: 9px 11px 7px; }
.bpbox.is-warn { border-color: var(--sand); background: #fffaf2; }
.bpbox__label { font-size: 13px; color: var(--muted); }
.bpbox__input {
  width: 100%; min-width: 0; margin-top: auto; padding: 0; border: 0; background: none; outline: none;
  font-family: var(--serif); font-size: 32px; line-height: 1.2; color: var(--text); -moz-appearance: textfield;
}
.bpbox__input::-webkit-outer-spin-button, .bpbox__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bpbox__input::placeholder { font-family: var(--font); font-size: 15px; color: #a9a294; }
.bpbox3 + .input-error { margin-top: 10px; }
.bpin__hint { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.bpin__info { display: inline-flex; flex: none; margin-top: 2px; }
/* клетки замеров сессии над полями (1.29.3): записанный, текущий, следующий */
.bpslots__wrap { margin: 0 0 10px; }
.bpslots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.bpslot {
  display: flex; align-items: center; gap: 6px; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px dashed var(--line2); border-radius: 12px; background: none; white-space: nowrap; overflow: hidden;
}
.bpslot.is-done { border-style: solid; border-color: var(--line); background: var(--card); }
/* обводка тенью, не толщиной рамки: клетка не прыгает, когда обводка переходит */
.bpslot.is-active { border-style: solid; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--card); }
.bpslot__check { display: inline-flex; flex: none; color: var(--accent); }
.bpslot__n { flex: none; display: inline-flex; flex-direction: column; line-height: 1.1; font-size: 13px; color: var(--muted); }
.bpslot__time { font-size: 11px; font-variant-numeric: tabular-nums; }
.bpslot__val { min-width: 0; font-family: var(--serif); font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.bpslot__when { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bpslot.is-active .bpslot__when { color: var(--accent-dark); }
.bpslots__avg { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
/* поле «время замера» (1.33.0): «сейчас 7:41 ▾», своё время зелёным */
.bpin__time { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0; }
.bpin__timelabel { font-size: 14px; color: var(--muted); }
.bpin__timechip.is-default { background: var(--card); border: 1px solid var(--line2); color: var(--text); font-weight: 400; }
.bpin__timechip.is-default .pickchip__arrow { color: var(--muted); }
.bpslots__avg b { font-weight: 600; color: var(--text); }

/* ---------- окно сна (макет B09): барабаны «отбой» и «подъём» ---------- */
.pickchip--plain {
  position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 2px;
  font-size: 14px; font-weight: 400; color: var(--muted); background: none; border: 0;
}
.pickchip--plain .pickchip__arrow { color: var(--muted); }
.sleepin { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 8px; }
.sleepin__cell { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.sleepin__label { text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.wheel { position: relative; height: 132px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }
.wheel__band { position: absolute; left: 10px; right: 10px; top: 44px; height: 44px; border-radius: 10px; background: var(--m-sleep-s); }
.wheel__list {
  position: relative; height: 100%; overflow-y: auto; padding: 44px 0; box-sizing: border-box;
  scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none;
}
.wheel__list::-webkit-scrollbar { display: none; }
.wheel__list:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 18px; }
.wheel__item {
  display: flex; align-items: center; justify-content: center; height: 44px; scroll-snap-align: center;
  font-family: var(--serif); font-size: 20px; color: #a9a294; cursor: pointer; user-select: none;
}
.wheel__item.is-on { font-size: 30px; color: var(--text); }
.sleepin__total { margin: 4px 0 12px; text-align: center; font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--m-sleep); }
.sleepin__ask { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.sleepin__chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.sleepin__chip { justify-content: center; padding: 0 6px; }
/* Невыбранные белые с рамкой, как в макете B09: бежевая заливка читалась как выбранная. */
.sleepin__chip:not(.chip--active) { background: var(--card); border-color: var(--line2); }
/* дневной сон: кнопка под суммой ночи и окно поверх (1.29.0) */
.sleepin__nap {
  display: block; margin: -4px auto 14px; min-height: 44px; padding: 0 18px;
  border: 1.5px dashed var(--line2); border-radius: 999px; background: none;
  color: var(--m-sleep); font: inherit; font-size: 14px; font-weight: 600;
}
.sleepin__nap.is-set { border-style: solid; border-color: var(--m-sleep-s); background: var(--m-sleep-s); }
.sleepin__nap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.napin__chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 14px; }
.napin__chip { justify-content: center; padding: 0 6px; }
.napin__chip:not(.chip--active) { background: var(--card); border-color: var(--line2); }
.napin__ownrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.napin__own { width: 104px; flex: none; text-align: center; }

/* ---------- давление (макет B06) ---------- */
.mhero__badge {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 4px 12px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 13.5px; font-weight: 600;
}
.mhero__badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mhero__badge.is-warn { background: #fdf0da; color: var(--sand-deep); }
.mc__thr { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 6 5; opacity: .7; }
.mc__panelword { fill: var(--muted); font-size: 12px; }
.mc--bp2 .mc__line.is-sys { stroke: var(--m-bp); stroke-width: 2.2; }
.mc--bp2 .mc__line.is-dia { stroke: var(--m-bp2); stroke-width: 2.2; }
/* 1.33.0: вечер пунктиром, зона выше границы песочная с подписью */
.mc--bp2 .mc__line.is-eve { stroke-width: 1.8; stroke-dasharray: 5 4; }
.mc--bp2 .mc__over { fill: var(--sand); opacity: .12; }
.mc--bp2 .mc__overword { fill: var(--sand-deep); font-size: 11px; }
.mc--bp2 .mc__dot.is-sys { fill: var(--m-bp); stroke: var(--m-bp); }
.mc--bp2 .mc__dot.is-dia { fill: var(--m-bp2); stroke: var(--m-bp2); }
.mexp__fold--icon > summary { justify-content: flex-start; gap: 12px; padding-left: 12px; }
.mexp__fold--icon > summary::after { margin-left: auto; }
.mexp__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--m-bp-s); color: var(--m-bp); }
.mexp__fold--icon > summary { min-height: 60px; }
/* «вся неделя ›»: зона 44 по высоте, поля -2 px держат прежнюю высоту строки (04 №5) */
.bprec__more { min-height: 44px; margin: -2px 0; padding: 0 0 0 8px; border: 0; background: none; color: var(--accent-dark); font-size: 14px; font-weight: 600; white-space: nowrap; }
.bprec__list { display: flex; flex-direction: column; }
.bprec__day { padding: 6px 0 10px; border-top: 1px solid var(--card-2); }
.bprec__list > .bprec__day:first-child { border-top: 0; padding-top: 0; }
.bprec__date { margin: 6px 0 6px; font-size: 15px; font-weight: 600; }
.bprec__row { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px 0; }
.bprec__sess { font-size: 13.5px; color: var(--muted); }
.bprec__chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bprec__chip { display: flex; align-items: center; min-width: 0; min-height: 44px; border-radius: 999px; background: var(--card-2); }
.bprec__val {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 0 0 14px; border: 0; background: none; text-align: left;
  font-family: var(--serif); font-size: 18px; color: var(--text); white-space: nowrap;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; line-height: 1.1;
}
/* время замера под числом (1.33.0) */
.bprec__time { font-family: var(--font); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bprec__del { display: grid; place-items: center; flex: none; width: 40px; height: 44px; border: 0; background: none; color: var(--muted); border-radius: 0 999px 999px 0; }
.bprec__del svg { width: 16px; height: 16px; }
.bprec__del:active, .bprec__val:active { background: rgba(47, 43, 37, .06); }
.bprec__add {
  display: grid; place-items: center; min-height: 44px; border-radius: 999px;
  border: 1.5px dashed var(--line2); background: none; color: var(--accent);
}
.bprec__add svg { width: 20px; height: 20px; }

/* ---------- карточка «Медкарта» (18.10.2026): анализы живут в семейной медкарте ---------- */

.hzmed { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 12px; }
.hzmed__head { display: flex; align-items: flex-start; gap: 12px; }
.hzmed__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #e3eef3; color: #2f6f8f; }
.hzmed__icon svg { width: 20px; height: 20px; }
.hzmed__btn {
  display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 23px;
  border: 1.5px solid #2f6f8f; color: #2f6f8f; background: var(--card); font-size: 15px; font-weight: 600; text-decoration: none;
}
.hzmed__btn:active { background: #e3eef3; }
.hzmed__note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.hzmed__old { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-dark); cursor: pointer; }
