:root {
  --bg: #0b0c0e;
  --surface: #16181c;
  --surface-2: #1f2227;
  --line: #2a2e35;
  --text: #f2f3f5;
  --muted: #8a9099;
  --accent: #c8f550;
  --accent-text: #0b0c0e;
  --danger: #ff6b6b;
  --warn: #ffb547;
  --ok: #4ade80;
  --radius: 16px;
  --tabbar-h: 64px;
}

/* manipulation: без приближения по двойному тапу, щипок работает */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

html, body {
  margin: 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;
}

body { min-height: 100vh; }

/* Свой жест «потянуть вниз», поэтому родное обновление Safari выключено */
html, body { overscroll-behavior-y: contain; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; }

.screen {
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
}
.screen.no-tabbar { padding-bottom: calc(env(safe-area-inset-bottom) + 200px); }

/* Заголовки */
.eyebrow { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 16px; letter-spacing: -.01em; }
h2 { font-size: 20px; margin: 28px 0 12px; }
h3 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 44px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; background: var(--surface);
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}

/* Карточки */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card.accent-border { box-shadow: inset 3px 0 0 var(--accent); }
.list { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px;
  border-bottom: 1px solid var(--line); width: 100%; text-align: left;
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .chev { color: var(--muted); font-size: 20px; }
.num { font-variant-numeric: tabular-nums; }

.tag {
  display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); margin: 0 4px 4px 0;
}
.tag.easy { color: var(--ok); }
.tag.normal { color: var(--accent); }
.tag.hard { color: var(--warn); }
.tag.pain { color: var(--danger); }

/* Кнопки */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; border-radius: 14px; font-weight: 600; font-size: 17px;
  background: var(--surface-2);
}
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; color: var(--muted); min-height: 44px; font-weight: 500; }
.btn.ghost.danger { color: var(--danger); }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

.sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(transparent, var(--bg) 30%);
}
.sticky-bottom.above-tabbar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
.sticky-bottom > * { max-width: 448px; margin: 0 auto; }

/* Таб-бар */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(22, 24, 28, .92); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: center;
}
.tabbar-inner { display: flex; width: 100%; max-width: 480px; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none;
}
.tab .ico { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: .7; }
.tab.active { color: var(--accent); }
.tab.active .ico { filter: none; opacity: 1; }

/* Следующая тренировка */
.coach-note { font-size: 15px; }
.coach-note .who { color: var(--accent); font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.ex-plan .grow .sub { color: var(--muted); font-size: 14px; }

/* Активная тренировка */
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.progress > div { height: 100%; background: var(--accent); transition: width .3s; }
.dots { display: flex; gap: 6px; margin: 12px 0 20px; }
.dot { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); }
.dot.done { background: var(--accent); }
.dot.current { background: var(--text); }
.dot.skipped { background: var(--muted); }
.dot.warm { flex: 0 0 18px; }

.ex-title { padding: 0; font-size: 26px; font-weight: 700; line-height: 1.2; margin: 0 0 6px; text-align: left; }
.ex-title .i { color: var(--muted); font-size: 18px; font-weight: 400; }
.ex-meta { color: var(--muted); margin-bottom: 8px; }
.coach-hint { background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; }

.set {
  display: grid; grid-template-columns: 28px 1fr 1fr 56px; gap: 8px; align-items: center;
  background: var(--surface); border-radius: 14px; padding: 8px 8px 8px 12px; margin-bottom: 8px;
}
.set.done { background: #1b2410; }
.set.done .set-n { color: var(--accent); }
.set-n { color: var(--muted); font-weight: 600; }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: 10px; height: 48px; }
.stepper button { width: 36px; height: 48px; font-size: 20px; color: var(--muted); }
.stepper .val { flex: 1; text-align: center; font-weight: 700; font-size: 18px; }
.stepper .val small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: -3px; }
.check {
  width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2);
  font-size: 24px; color: var(--muted);
}
.set.done .check { background: var(--accent); color: var(--accent-text); }

.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.rate button {
  min-height: 56px; border-radius: 14px; background: var(--surface-2); font-weight: 600;
}
.rate button.sel.easy { background: var(--ok); color: #06200f; }
.rate button.sel.normal { background: var(--accent); color: var(--accent-text); }
.rate button.sel.hard { background: var(--warn); color: #2a1a00; }

/* Таймер отдыха */
.timer {
  position: fixed; left: 12px; right: 12px; z-index: 40;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  max-width: 456px; margin: 0 auto;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 10px 12px 10px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  transform: translateY(40px); opacity: 0; pointer-events: none;
  transition: transform .25s, opacity .25s;
}
.timer.show { transform: none; opacity: 1; pointer-events: auto; }
.timer-inner { max-width: 448px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.timer .time { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; flex: 1; }
.timer .time.over { color: var(--accent); }
.timer .label { font-size: 12px; color: var(--muted); }
.timer .icon-btn { width: auto; padding: 0 14px; background: var(--line); font-size: 15px; font-weight: 600; }

.check.play { background: var(--accent); color: var(--accent-text); font-size: 20px; }

/* Таймер подхода на время: на весь экран */
.work {
  position: fixed; inset: 0; z-index: 70; background: var(--bg);
  display: none; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 24px);
}
.work.show { display: flex; }
.work-head { width: 100%; max-width: 480px; display: flex; align-items: center; }
.work-title { flex: 1; text-align: center; font-weight: 600; }
.work-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.work-ring { position: relative; width: min(78vw, 340px); aspect-ratio: 1; }
.work-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.work-ring circle { fill: none; stroke-width: 10; }
.work-ring .track { stroke: var(--surface-2); }
.work-ring .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.work-inside { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.work-time { font-size: min(17vw, 76px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.work-label { color: var(--muted); font-size: 15px; margin-top: 8px; }
.work.prep .work-time { color: var(--muted); }
.work.over .work-time { color: var(--accent); }
.work.over .bar { stroke: var(--ok); }
.work-stop { width: 100%; max-width: 448px; min-height: 72px; font-size: 22px; }
.work.prep .work-stop { background: var(--surface-2); color: var(--text); }

/* Нижний лист */
.backdrop {
  /* cursor: pointer нужен, иначе Safari на iPhone не отдаёт тап обычному div */
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(env(safe-area-inset-bottom) + 16px);
  transform: translateY(105%); transition: transform .25s;
}
.sheet.show { transform: none; }
.sheet-inner { max-width: 448px; margin: 0 auto; }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 1; }
.sheet-close + h1, .sheet-close + h2 { padding-right: 44px; } /* заголовок не заходит под крестик */
.sheet.dragging { transition: none; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface-2);
  font-size: 15px;
}
.chip.sel { background: var(--accent); color: var(--accent-text); font-weight: 600; }

.scale { display: grid; gap: 8px; }
.scale.s2 { grid-template-columns: repeat(2, 1fr); }
.scale.s3 { grid-template-columns: repeat(3, 1fr); }
.scale.s4 { grid-template-columns: repeat(4, 1fr); }
.scale.s5 { grid-template-columns: repeat(5, 1fr); }
.scale button { min-height: 52px; border-radius: 12px; background: var(--surface-2); font-weight: 600; font-size: 18px; }
.scale button small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.scale button.sel { background: var(--accent); color: var(--accent-text); }
.scale button.sel small { color: var(--accent-text); }

textarea {
  width: 100%; min-height: 80px; resize: vertical; background: var(--surface-2);
  border: 0; border-radius: 12px; padding: 12px; outline: none;
}
.field-label { color: var(--muted); font-size: 14px; margin: 18px 0 8px; }

.search {
  width: 100%; height: 48px; background: var(--surface); border: 0; border-radius: 12px;
  padding: 0 14px; outline: none; margin-bottom: 12px;
}
.hscroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .chip { flex-shrink: 0; }

/* Итоги */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.stat { background: var(--surface); border-radius: 14px; padding: 12px; }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12px; color: var(--muted); }

/* Детали истории */
.set-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.set-table td { padding: 6px 0; border-top: 1px solid var(--line); }
.set-table td:first-child { color: var(--muted); width: 32px; }
.set-table .miss { color: var(--warn); }

ol.steps { padding-left: 20px; margin: 0; }
ol.steps li { margin-bottom: 8px; }
ul.mistakes { padding-left: 20px; margin: 0; }
ul.mistakes li { margin-bottom: 6px; }

.empty { text-align: center; padding: 80px 24px; }
.empty .big { font-size: 48px; margin-bottom: 12px; }

.toast {
  position: fixed; top: calc(env(safe-area-inset-top) + 12px); left: 50%; transform: translate(-50%, -150%);
  background: var(--surface-2); padding: 10px 16px; border-radius: 12px; z-index: 80;
  transition: transform .25s; font-size: 15px; white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }

/* Прогресс */
a.row, a.kpi, a.stat, a.pill-btn, a.icon-btn { color: inherit; text-decoration: none; }
.row .right { text-align: right; }
.strong { font-weight: 600; }
.pill-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text) !important; font-weight: 600; font-size: 15px; flex-shrink: 0;
}
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.kpi { display: block; background: var(--surface); border-radius: var(--radius); padding: 12px 12px 8px; min-width: 0; }
.kpi .k { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-size: 26px; font-weight: 700; line-height: 1.2; }
.kpi .v span, .big-val span { font-size: 15px; font-weight: 500; color: var(--muted); }
.spark { display: block; width: 100%; height: 32px; margin-top: 6px; }

.delta { font-weight: 600; white-space: nowrap; }
.delta.good { color: var(--ok); }
.delta.bad { color: var(--warn); }
.delta.neutral { color: var(--text); }
.delta.flat { color: var(--muted); }

.big-val { font-size: 40px; font-weight: 700; line-height: 1.1; }
.stat .small-v { font-size: 17px; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: 12px; padding: 4px; margin: 16px 0 8px; }
.seg button { min-height: 40px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 15px; }
.seg button.sel { background: var(--surface-2); color: var(--text); }

.chart-card { padding: 12px 8px 4px; }
.chart { display: block; width: 100%; height: auto; }
.chart .ax { fill: var(--muted); font-size: 11px; }
.pt-info { min-height: 22px; padding: 0 8px 4px; font-size: 14px; color: var(--muted); }
.pt-info b { color: var(--text); }

.text-input {
  width: 100%; height: 48px; background: var(--surface); border: 0; border-radius: 12px;
  padding: 0 14px; outline: none; color-scheme: dark;
}
.sheet .text-input { background: var(--surface-2); }
.measure-row { border-bottom: 1px solid var(--line); padding: 8px 12px 8px 16px; }
.measure-row:last-child { border-bottom: 0; }
.mr-top { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.mr-top .grow { flex: 1; }
.hint-btn { color: var(--muted); padding: 4px 8px; font-size: 16px; }
.num-input {
  width: 96px; height: 44px; background: var(--surface-2); border: 0; border-radius: 10px;
  text-align: right; padding: 0 12px; font-size: 18px; font-weight: 600; outline: none;
  font-variant-numeric: tabular-nums;
}
.num-input::placeholder { color: #5a606a; font-weight: 500; }
.unit { color: var(--muted); width: 22px; font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; padding: 0 0 8px; }

.checkin-card { display: flex; align-items: center; gap: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.big-stepper { height: 56px; }
.big-stepper button { width: 64px; height: 56px; font-size: 24px; }
.big-stepper .val { font-size: 22px; }
a.stat { display: block; }

/* Фотоотчёт */
a.card, a.btn { color: inherit; text-decoration: none; }
.photo-card { display: block; }
.pc-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pc-head .spacer { flex: 1; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.frame {
  position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  background: var(--surface-2);
}
.frame svg, .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.big-frame { border-radius: var(--radius); }
.no-photo { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.seg.seg3 { grid-template-columns: repeat(3, 1fr); }
.seg.seg2 { grid-template-columns: repeat(2, 1fr); }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.slot { text-align: center; cursor: pointer; }
.slot .frame { border: 1.5px dashed var(--line); margin-bottom: 6px; }
.slot .no-photo { font-size: 28px; }
.retake {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 0; font-size: 12px;
  background: rgba(0, 0, 0, .6);
}

.cmp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cmp-pick select { font-size: 14px; padding: 0 10px; appearance: none; -webkit-appearance: none; }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-by-side .cap { text-align: center; margin-top: 6px; }

.slider .layer { position: absolute; inset: 0; }
.slider .handle {
  position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent);
  pointer-events: none;
}
.slider .handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-weight: 700;
}
.slider .corner {
  position: absolute; top: 10px; padding: 3px 8px; border-radius: 8px; font-size: 12px;
  background: rgba(0, 0, 0, .55); pointer-events: none;
}
.slider .corner.left { left: 10px; }
.slider .corner.right { right: 10px; }
.slider { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }

/* Анимация упражнения */
.ex-anim { background: var(--surface); border-radius: var(--radius); overflow: hidden; margin: 8px 0 12px; }
.ex-anim svg { display: block; width: 100%; height: auto; }
.anim-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; }
.anim-label { font-weight: 600; flex: 1; }
.anim-legend { font-size: 11px; color: var(--muted); white-space: nowrap; }
.anim-legend .lg { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 3px 0 6px; }
.anim-legend .lg.main { background: #c8f550; }
.anim-legend .lg.extra { background: #7f9a45; }
.anim-pause { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--muted); flex-shrink: 0; }

/* Потянуть вниз, чтобы обновить */
.ptr {
  position: fixed; top: calc(env(safe-area-inset-top) - 36px); left: 50%; z-index: 15;
  width: 36px; height: 36px; margin-left: -18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface-2); color: var(--muted);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  font-size: 18px; opacity: 0; pointer-events: none;
}
.ptr span { display: block; transition: transform .2s; }
.ptr.ready { color: var(--accent); }
.ptr.snap { transition: opacity .2s, transform .2s; }
.ptr.spin span { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Чат с коучем */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.chat-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.chat-log { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 16px; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; }
.msg.ai p { margin: 0 0 8px; }
.msg.ai p:last-child, .msg.ai ul:last-child, .msg.ai ol:last-child { margin-bottom: 0; }
.msg.ai ul, .msg.ai ol { margin: 0 0 8px; padding-left: 20px; }
.msg.ai code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; font-size: 14px; }
.msg .status { color: var(--muted); font-size: 14px; }
.msg .status:empty { display: none; }
.msg .body:empty { display: none; }
.msg.err .status { color: var(--danger); }
.chat-sugg { margin-top: auto; }
.chat-sugg .chip { text-align: left; }
.proposal { margin: 0; }
.mem-line { align-self: flex-start; color: var(--muted); font-size: 14px; text-decoration: none; padding: 0 4px; }
.goal-card { display: flex; flex-direction: column; gap: 2px; position: relative; margin-bottom: 12px; padding-right: 36px; color: inherit; text-decoration: none; }
.goal-card .chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.mem-item { white-space: pre-wrap; overflow-wrap: anywhere; }
.prop-ex { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.prop-ex:last-of-type { border-bottom: 0; }
.prop-ex .grow { flex: 1; min-width: 0; }
.composer {
  position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 16px calc(env(safe-area-inset-bottom) + 8px); background: var(--bg);
  border-top: 1px solid var(--line);
}
.composer textarea { min-height: 44px; max-height: 140px; resize: none; padding: 11px 14px; border-radius: 22px; line-height: 1.4; }
.composer .send {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; font-size: 22px; font-weight: 700;
  background: var(--accent); color: var(--accent-text);
}
.composer .send:disabled { opacity: .35; }

/* Карта посещений на экране прогресса */
.visits-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; font-size: 17px; }
.hm { display: grid; grid-template-columns: 16px 1fr; column-gap: 4px; }
.hm-months { grid-column: 2; position: relative; height: 16px; font-size: 11px; color: var(--muted); }
.hm-months span { position: absolute; top: 0; white-space: nowrap; }
.hm-days { display: grid; grid-template-rows: repeat(7, 1fr); row-gap: 2px; font-size: 10px; color: var(--muted); }
.hm-days span { line-height: 1; align-self: center; }
.hm-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); gap: 2px; min-width: 0; }
.hm-grid i { aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); }
.hm-grid i.on { background: var(--accent); }
.hm-grid i.future { background: transparent; }
.hm-grid i.today { box-shadow: inset 0 0 0 1.5px var(--muted); }
.hm-grid i.sel { outline: 2px solid var(--text); outline-offset: 1px; }
.hm-info { margin-top: 12px; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 8px 10px; background: var(--surface-2); border-radius: 12px; font-size: 14px; }
.hm-item { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.hm-item .grow { flex: 1; }
.hm-open { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Превью упражнения: кадр из анимации, номер в углу */
.ex-thumb { position: relative; width: 64px; height: 54px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: #2a2d33; }
.ex-thumb svg { display: block; width: 100%; height: 100%; }
.ex-thumb span {
  position: absolute; left: 3px; top: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px;
  background: rgba(11, 12, 14, .75); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; color: var(--text);
}

/* Чек-лист разминки */
.warm-item .box {
  width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; color: transparent;
}
.warm-item.on .box { background: var(--accent); color: var(--accent-text); }
.warm-item.on .grow { color: var(--muted); text-decoration: line-through; }
