:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --bg2: var(--tg-theme-secondary-bg-color, #f1f2f5);
  --text: var(--tg-theme-text-color, #16181d);
  --hint: var(--tg-theme-hint-color, #868b94);
  --link: var(--tg-theme-link-color, #2f7de1);
  --accent: var(--tg-theme-button-color, #2f7de1);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --card: var(--tg-theme-section-bg-color, var(--bg));
  --danger: var(--tg-theme-destructive-text-color, #e5484d);
  --sep: color-mix(in srgb, var(--hint) 24%, transparent);
  --fill: color-mix(in srgb, var(--hint) 14%, transparent);
  --tint: color-mix(in srgb, var(--accent) 13%, transparent);
  --radius: 16px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --pad: max(12px, calc((100% - 560px) / 2));
}
@media (prefers-color-scheme: dark) {
  :root:not([style*="--tg-theme-bg-color"]) {
    --bg: #1c1d22; --bg2: #101114; --text: #f1f2f4; --hint: #8d929b; --link: #6ab0ff; --accent: #3d8bef; --card: #1c1d22;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg2); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%; }
/* Оболочка: документ не прокручивается (в iOS WebView Telegram 100vh выше видимой области и низ обрезается).
   body прибит к видимой области, прокручивается только #app. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; display: flex; flex-direction: column;
  padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; margin: 0; touch-action: manipulation; }
button:disabled { opacity: .35; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); }
a { color: var(--link); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { flex: 1; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding: 12px var(--pad) 20px; background: var(--bg2); }
.backbar { flex: none; width: 100%; min-height: 44px; text-align: left; color: var(--link); font-weight: 600; font-size: 17px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px; background: var(--bg2); }

/* нижняя навигация */
.tabs { flex: none; display: flex; background: var(--bg); border-top: 1px solid var(--sep);
  padding: 4px 4px calc(4px + var(--safe-b)); z-index: 10; }
.tabs button { flex: 1; min-width: 0; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--hint); white-space: nowrap; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--accent); font-weight: 600; }

/* общее */
h1 { font-size: 24px; line-height: 1.2; margin: 4px 4px 12px; letter-spacing: -.3px; }
h2 { font-size: 17px; margin: 0 0 8px; }
h2.sec { margin: 18px 4px 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--hint); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.prog-card { text-align: left; width: 100%; cursor: pointer; border: none; font: inherit; color: inherit; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tags .tag { margin: 0; }
ul.plain { list-style: none; padding: 0; margin: 8px 0 0; }
ul.plain li { padding: 4px 0; }
.card.flush { padding: 4px 0; }
.kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--hint); }
.btn { display: block; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 16px;
  background: var(--accent); color: var(--accent-text); text-align: center; text-decoration: none; transition: transform .08s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.big { min-height: 56px; font-size: 18px; }
.btn.ghost { background: var(--fill); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.text { background: none; color: var(--link); font-weight: 500; }
.btn.text.danger { color: var(--danger); background: none; }
.btn.sm { min-height: 44px; padding: 8px 12px; font-size: 15px; }
.row > .btn.sm { width: auto; flex: none; margin: 0; }
.btn + .btn { margin-top: 8px; }
.link { color: var(--link); text-align: left; min-height: 32px; }
.center { display: flex; justify-content: center; padding: 40px 0; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--sep); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 36px 16px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.empty.tall { padding-top: 22%; }
.empty-t { font-size: 19px; font-weight: 700; }
.toast { position: fixed; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  z-index: 60; max-width: 536px; margin: 0 auto; background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 14px;
  font-size: 15px; animation: drop .22s; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 560px; max-height: 88%; overflow-y: auto; background: var(--bg); border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(16px + var(--safe-b)); animation: up .2s; }
.sheet-t { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.sheet-x { margin-bottom: 12px; }
.sheet .btn:first-of-type { margin-top: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.seg { display: flex; background: var(--fill); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 6px; }
.seg button { flex: 1; min-height: 44px; border-radius: 10px; font-size: 16px; font-weight: 600; color: var(--hint); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg.mini { margin: 0; flex: none; }
.seg.mini button { min-height: 36px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
.seg.sticky { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--hint) 14%, var(--bg2)); }
.seg-hint { margin: 0 4px 12px; }
.workout-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto;
  margin-bottom: 8px; padding: 2px 0; }
.workout-pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 10px 12px;
  border-radius: 12px; background: var(--fill); text-align: left; font-weight: 600; }
.workout-pick.on { background: var(--tint); color: var(--accent); }
.field { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--sep); background: var(--bg2);
  font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; }
.field:focus { border-color: var(--accent); }
textarea.field { resize: none; display: block; margin: 10px 0; }
.foot-note { margin: 12px 4px; }
.tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 99px; background: var(--fill); color: var(--hint);
  font-size: 11px; font-weight: 600; vertical-align: middle; }
.kv { flex-wrap: wrap; display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--sep); }
.kv:first-of-type { border-top: 0; }
.kv .r, .kv b { text-align: right; overflow-wrap: anywhere; }
.kv.pr { border-top: 1px solid var(--sep); margin-top: 8px; padding-top: 10px; }

/* главная */
.hero h1 { margin: 4px 0 6px; }
.hero .btn { margin-top: 12px; }
.ex-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; text-align: left; border-top: 1px solid var(--sep); }
.ex-row:first-child { border-top: 0; }
.ex-row-r { text-align: right; flex: none; max-width: 52%; }
.list-cap { padding: 12px 14px 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--hint);
  border-top: 1px solid var(--sep); }
.list-cap + .ex-row { border-top: 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { background: var(--card); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font-size: 22px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiles.three .tile { padding: 12px 10px; text-align: center; }
.tiles.three .tile b { font-size: 19px; }

/* тренировка */
.prog { position: sticky; top: 0; z-index: 5; background: var(--bg2); margin: -12px -12px 8px; padding: 10px 16px 10px; }
.prog h2 { margin: 0; font-size: 18px; }
.prog-t { flex: 1; font-size: 14px; color: var(--hint); }
.sync { color: var(--hint); text-align: right; }
.sync.warn { color: var(--danger); }
.bar { height: 6px; border-radius: 99px; background: var(--sep); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s; }
.card.ex { padding: 12px; }
.ex-head { display: flex; align-items: flex-start; gap: 8px; }
.ex-name { flex: 1; min-width: 0; min-height: 44px; text-align: left; font-size: 18px; font-weight: 700; line-height: 1.25; padding: 2px 0; }
.chev { color: var(--hint); font-weight: 400; }
.count { flex: none; margin-top: 4px; padding: 3px 9px; border-radius: 99px; background: var(--fill); color: var(--hint);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card.ex.complete .count { background: var(--accent); color: var(--accent-text); }
.ex-meta { font-size: 14px; color: var(--hint); margin-top: -4px; }
.hint-up { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 99px; background: var(--tint); color: var(--accent);
  font-size: 13px; font-weight: 600; }
.ex-note { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--fill); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.ex-last { margin-top: 8px; overflow-wrap: anywhere; }
.set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 54px; gap: 8px; align-items: center; padding: 4px 0; }
.set.cap { font-size: 12px; text-align: center; padding: 10px 0 0; }
.slot { min-width: 0; }
.stepper { display: flex; align-items: stretch; height: 50px; background: var(--fill); border-radius: 13px; overflow: hidden; min-width: 0; }
.stp { flex: none; width: 44px; font-size: 24px; line-height: 1; color: var(--text); }
.stp:active { background: var(--sep); }
.num { flex: 1; min-width: 0; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: center; outline: none;
  font-size: 18px; font-weight: 650; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.num::placeholder { color: var(--hint); font-weight: 500; opacity: 1; }
.num.static { display: flex; align-items: center; justify-content: center; }
.stepper.narrow { width: 136px; flex: none; height: 44px; }
.stepper.narrow.wide { width: 152px; }
.addw, .swbtn { width: 100%; height: 50px; border-radius: 13px; border: 1.5px dashed var(--sep); color: var(--hint); font-size: 15px; font-weight: 500; white-space: nowrap; }
.swbtn { border-style: solid; color: var(--text); font-variant-numeric: tabular-nums; }
.swbtn.run { background: var(--tint); border-color: var(--accent); color: var(--accent); font-weight: 700; font-size: 17px; }
.chk { width: 54px; height: 50px; border-radius: 13px; border: 2px solid var(--sep); display: flex; align-items: center; justify-content: center;
  color: var(--hint); transition: background .12s, transform .08s; }
.chk:active { transform: scale(.94); }
.chk .ic { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.set.done .chk { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.set.done .stepper { background: var(--tint); }
.ex-foot { display: flex; gap: 8px; margin-top: 8px; }
.ex-foot .btn { margin: 0; }
.btn.swap { width: 100%; margin: 4px 0 0; }
details.optional { margin-bottom: 10px; }
details.optional > summary { list-style: none; min-height: 48px; display: flex; align-items: center; padding: 0 14px; margin-bottom: 10px;
  border-radius: var(--radius); background: var(--card); font-weight: 600; cursor: pointer; }
details.optional > summary::-webkit-details-marker { display: none; }
details.optional > summary::after { content: "›"; margin-left: auto; color: var(--hint); font-size: 20px; transform: rotate(90deg); transition: transform .15s; }
details.optional[open] > summary::after { transform: rotate(-90deg); }
.session > .btn.big { margin-top: 6px; }
.summary-head { text-align: center; padding: 20px 0 12px; }
.summary-head h1 { font-size: 30px; margin: 0 0 4px; }
.next-t { font-size: 18px; font-weight: 700; margin-top: 2px; }

/* таймер отдыха */
.dock { flex: none; position: relative; display: flex; align-items: center; gap: 6px; background: var(--bg); border-top: 1px solid var(--sep);
  padding: 8px max(12px, calc((100% - 560px) / 2)) calc(8px + var(--safe-b)); z-index: 11; overflow: hidden; }
.dock:has(+ .tabs:not(.hidden)) { padding-bottom: 8px; }
.dock > i { position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--accent); transition: width .25s linear; }
.dock-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.dock-main span { font-size: 12px; color: var(--hint); }
.dock-main b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.dock button { min-width: 52px; height: 46px; padding: 0 12px; border-radius: 12px; background: var(--fill); font-weight: 600; font-size: 15px; }
.dock button.skip { background: var(--accent); color: var(--accent-text); }
.dock.over { background: var(--accent); color: var(--accent-text); border-top-color: transparent; }
.dock.over .dock-main span { color: inherit; opacity: .85; }
.dock.over button, .dock.over > i { display: none; }

/* упражнение */
.media { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--card); margin-bottom: 12px; }
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.media > svg:not(.ph) { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--text); --bg: var(--card); background: none; }
.media.frames img { opacity: 0; transition: opacity .35s ease; }
.media img.on { opacity: 1; }
.media-badge { position: absolute; right: 10px; top: 10px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; }
.media.none { aspect-ratio: auto; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; }
.media .ph { width: 56px; height: 56px; fill: none; stroke: var(--hint); stroke-width: 1.4; stroke-linecap: round; opacity: .6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { padding: 5px 11px; border-radius: 99px; background: var(--card); font-size: 14px; font-weight: 500; }
.chip.outline { background: none; border: 1px solid var(--sep); color: var(--hint); }
.lead { margin: 0 4px 12px; font-size: 16px; }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 6px; }
.steps li:last-child { margin-bottom: 0; }

/* графики */
.chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.c-grid { stroke: var(--sep); stroke-width: 1; }
.c-guide { stroke: var(--hint); stroke-width: 1; stroke-dasharray: 2 3; opacity: .6; }
.c-lbl { fill: var(--hint); font-size: 10.5px; }
.c-val { fill: var(--text); font-size: 11.5px; font-weight: 600; }
.c-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.c-dot.sel { stroke: var(--accent); fill: var(--card); stroke-width: 2.5; }
.c-bar { fill: var(--accent); opacity: .45; }
.c-bar.sel { opacity: 1; }
.c-bar.zero { fill: var(--hint); opacity: .35; }
.c-hit { fill: transparent; cursor: pointer; }
.chart-cap { min-height: 22px; margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }

/* программа, прогресс, настройки */
.card.pitem { padding: 0; overflow: hidden; }
.pitem-head { display: flex; align-items: stretch; }
.pitem-main { flex: 1; min-width: 0; min-height: 56px; padding: 12px 14px; text-align: left; display: block; width: 100%; }
.pitem-name { font-weight: 600; font-size: 16px; }
.icon-btn { flex: none; width: 48px; font-size: 24px; color: var(--hint); border-left: 1px solid var(--sep); }
.editor { padding: 4px 14px 14px; border-top: 1px solid var(--sep); }
.erow { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; min-height: 52px; padding: 4px 0; }
.erow.tall { min-height: 56px; cursor: pointer; }
.erow.col { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 0; }
.range { display: flex; align-items: center; gap: 6px; flex: none; }
.range .field { width: 62px; }
.wfield { display: flex; align-items: center; gap: 6px; flex: none; }
.wfield .field { width: 96px; }
.field.num { text-align: center; font-weight: 600; padding: 10px 4px; font-size: 16px; letter-spacing: 0; flex: none; }
.field.num::placeholder { font-size: 13px; font-weight: 400; }
.err { color: var(--danger); font-size: 14px; margin: 4px 0 10px; }
.switch { -webkit-appearance: none; appearance: none; flex: none; width: 52px; height: 32px; border-radius: 99px; background: var(--sep);
  position: relative; transition: background .15s; cursor: pointer; margin: 0; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 8px 0; }
.days.presets { grid-template-columns: repeat(4, 1fr); }
.days button { min-height: 44px; border-radius: 12px; background: var(--fill); font-weight: 600; font-size: 14px; color: var(--hint); }
.days button.on { background: var(--accent); color: var(--accent-text); }
.dim { opacity: .5; }
.field.time { width: auto; min-width: 110px; text-align: center; flex: none; }

@media (max-width: 370px) {
  .stp { width: 40px; }
  .set { gap: 6px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 50px; }
  .chk { width: 50px; }
  .num { font-size: 17px; }
  .range .field { width: 54px; }
  .wfield .field { width: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* английское название под русским */
.exl { display: block; min-width: 0; }
.exl .en { display: block; margin-top: 1px; font-size: .72em; font-weight: 400; line-height: 1.25; letter-spacing: 0; color: var(--hint); }
h1 .exl .en { font-size: 15px; margin-top: 3px; }
.sheet .btn .exl { text-align: center; }
.sheet .btn .exl .en { color: inherit; opacity: .65; }

/* панель «Готово» над клавиатурой */
.kbbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: flex-end; padding: 6px 12px; background: var(--bg2, var(--fill)); border-top: 1px solid var(--sep); }
.kbbar.hidden { display: none; }
.kbbar button { min-height: 40px; padding: 6px 18px; font-size: 17px; font-weight: 600; color: var(--link); }

/* кабинет тренера / конструктор */
.card.stack .btn { margin-top: 8px; }
.flab { display: block; margin: 0 0 10px; }
.flab .field { margin-top: 4px; }
.flab textarea.field { margin: 4px 0 0; }
.title-in { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.mini { flex: none; width: 40px; height: 44px; border-radius: 10px; background: var(--fill); font-size: 18px; color: var(--text); }
.mini:disabled { opacity: .35; }
.mini.danger { color: var(--danger); }
.irow { display: flex; align-items: center; gap: 4px; padding: 6px 0; border-top: 1px solid var(--sep); }
.irow-main { flex: 1; min-width: 0; min-height: 48px; text-align: left; padding: 2px 0; }
.irow-n { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.wcard .erow { padding-bottom: 8px; }
.bld-bar { position: sticky; bottom: 0; z-index: 4; margin: 12px -4px 0; padding: 8px 4px calc(8px + var(--safe-b, 0px)); background: var(--bg); }
.err-card { color: var(--danger); }
.sheet.tall { height: 88%; display: flex; flex-direction: column; }
.sheet.tall > div:last-child { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pick-list { flex: 1; min-height: 120px; overflow-y: auto; margin: 8px 0; }
.pick { display: block; width: 100%; text-align: left; min-height: 52px; padding: 8px 4px; border-top: 1px solid var(--sep); }
.setgrid { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 0; }
.setgrid.cap { padding-bottom: 0; text-align: center; }
.setgrid .stepper.narrow { width: 100%; }
.chips .chip { min-height: 40px; padding: 6px 12px; border-radius: 99px; background: var(--fill); font-size: 15px; }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* прогресс: итог, вес, календарь */
.insight { padding: 8px 0; border-top: 1px solid var(--sep); font-size: 15px; }
.insight:first-child { border-top: none; }
.insight.warn { color: var(--danger); }
.insight.good { color: var(--link); }
.chart.spark { width: 72px; height: 28px; flex: none; }
.chart.cal { width: 100%; max-width: 260px; }
.c-dot.faint { opacity: .45; }
.c-trend { fill: none; stroke: var(--text); stroke-width: 2.5; }
.c-goal { stroke: var(--link); stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.c-cal { fill: var(--fill); }
.c-cal.on { fill: var(--link); opacity: .85; }
.row.tight { align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 0; border: none; background: none; min-height: 44px; }
