*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg-gradient);
  background-color: var(--base);
  z-index: -1;
}
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 10px; }
.ic { flex: none; display: block; }
/* Иконки-картинки: красятся currentColor через маску */
.ic-mask {
  flex: none;
  display: block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.ic-rider { -webkit-mask-image: url(../icons/rider.png); mask-image: url(../icons/rider.png); }
.ic-bike-menu { -webkit-mask-image: url(../icons/bike-menu.png); mask-image: url(../icons/bike-menu.png); }

.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Оболочка ---------- */
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px var(--pad) 12px;
  background: linear-gradient(to bottom, rgba(11,35,34,.96) 38%, rgba(11,35,34,.7) 72%, rgba(11,35,34,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.head__title { font-size: 17px; font-weight: 640; letter-spacing: -.02em; line-height: 1.25; }
.head__sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.head__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.screen {
  flex: 1;
  padding: 0 var(--pad) calc(var(--nav-h) + 40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.screen[hidden] { display: none; }

/* ---------- Нижняя панель вкладок ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 0 var(--pad) calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.tabbar__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 400px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(10,32,31,.72);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 14px 34px rgba(5,22,21,.5);
}
.tab {
  flex: 1;
  height: 48px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 14px; font-weight: 550;
  transition: color .2s var(--ease), background .25s var(--ease), flex-grow .25s var(--ease);
  overflow: hidden;
}
.tab__label { display: none; white-space: nowrap; }
.tab[aria-selected="true"] {
  flex-grow: 1.9;
  background: var(--lime);
  color: var(--on-accent);
}
.tab[aria-selected="true"] .tab__label { display: inline; }

/* ---------- Базовые элементы ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r);
  padding: var(--pad);
}
.card--plain { background: none; border: 0; padding: 0; }

.btn {
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s var(--ease), opacity .12s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--lime); color: var(--on-accent); }
.btn--ghost { background: var(--glass-2); color: var(--text); }
.btn--quiet { color: var(--text-2); font-weight: 500; }
.btn--danger { color: var(--orange); background: rgba(251,120,20,.14); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.icon-btn {
  width: var(--tap); height: var(--tap);
  min-width: var(--tap);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  background: var(--glass-2);
  border: 1px solid var(--glass-line-soft);
  transition: transform .12s var(--ease), background .15s var(--ease);
}
.icon-btn:active { transform: scale(.93); }
.icon-btn--bare { background: none; border: 0; color: var(--text-2); }
.icon-btn--sm { width: 38px; height: 38px; min-width: 38px; }

.add-btn {
  height: 42px; padding: 0 16px 0 13px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--on-accent);
  font-size: 14px; font-weight: 650;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.add-btn:active { transform: scale(.96); }

.section-title {
  font-size: 19px;
  font-weight: 640;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.section-title small { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }

.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.link {
  color: var(--lime);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap);
}

.empty {
  text-align: center;
  padding: 26px 16px;
  color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty__icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-2);
  color: var(--lime);
}

.error {
  background: rgba(251,120,20,.1);
  border: 1px solid rgba(251,120,20,.28);
  color: var(--orange-soft);
  border-radius: var(--r-sm);
  padding: 16px;
  font-size: 14px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}

/* Скелетоны загрузки */
@keyframes shimmer { 0% { background-position: -220px 0; } 100% { background-position: 360px 0; } }
.skel {
  border-radius: var(--r);
  background: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.12) 42%, rgba(255,255,255,.05) 82%);
  background-size: 360px 100%;
  animation: shimmer 1.3s infinite linear;
  height: 14px;
}
.skel--card { height: 128px; }
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Приветствие и фраза дня ---------- */
.greeting {
  position: relative;
  border-radius: var(--r-xl);
  padding: 22px var(--pad) 24px;
  background-color: var(--lime);
  background-image:
    repeating-radial-gradient(circle at 86% 8%, rgba(16,48,46,.045) 0 1px, transparent 1px 13px),
    repeating-radial-gradient(circle at 10% 96%, rgba(16,48,46,.035) 0 1px, transparent 1px 16px);
  color: var(--on-accent);
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(139,175,26,.16);
}
.greeting__hi {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.greeting__phrase {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -.012em;
  text-wrap: pretty;
  max-width: 30ch;
}
/* ---------- Неделя: цель и прогресс ---------- */
.goal { display: flex; flex-direction: column; gap: 16px; }
.goal__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goal__plan { display: flex; flex-direction: column; gap: 2px; }
.goal__plan b { font-size: 19px; font-weight: 640; letter-spacing: -.02em; }

.banner-done {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  padding: 8px 15px 8px 12px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--on-accent);
  font-size: 14px; font-weight: 650;
}

.bar { position: relative; height: 48px; }
.bar__track {
  position: absolute; left: 0; right: 0; top: 18px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--grad-distance);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .7s var(--ease);
}
.bar.is-done .bar__fill { background: linear-gradient(90deg, #C9DD34, #EBFA5F); }
.bar__rider {
  position: absolute;
  top: 6px; left: 0;
  width: 36px; height: 36px;
  margin-left: -18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--lime);
  background: #10302E;
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 50%;
  transition: left .7s var(--ease);
  box-shadow: 0 4px 14px rgba(8,26,25,.55);
}
.bar__flag { position: absolute; right: -2px; top: 4px; color: var(--lime); opacity: .75; }
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(235,250,95,0); }
  45% { box-shadow: 0 0 0 12px rgba(235,250,95,.18); }
}
.bar.is-celebrating .bar__track { animation: pulseRing 1.5s var(--ease); }

.goal__score { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.goal__numbers {
  display: flex; align-items: baseline; gap: 7px;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
  min-width: 0;
}
.goal__numbers .big { font-size: 44px; }
.goal__numbers .of { font-size: 17px; color: var(--text-2); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.goal__pct {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(235,250,95,.14);
  color: var(--lime);
  font-size: 17px; font-weight: 700; letter-spacing: -.02em;
}
.goal.is-done .goal__pct { background: var(--lime); color: var(--on-accent); }
.goal__split { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); margin-top: 6px; }
.goal__split b { color: var(--text); font-weight: 600; }

.cta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.cta__text { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; text-wrap: pretty; }

/* Сводка недели тремя показателями */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.summary__item {
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r-sm);
  padding: 12px 13px 13px;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.summary__value { font-size: 23px; font-weight: 680; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; }
.summary__value small { font-size: 12px; font-weight: 500; color: var(--text-2); margin-left: 2px; letter-spacing: 0; }
.summary__label { font-size: 11px; color: var(--text-3); letter-spacing: .05em; text-transform: uppercase; }
.summary--empty { color: var(--text-2); font-size: 15px; display: block; padding: 2px 2px 4px; }

/* ---------- Карточки тренировок ---------- */
.wlist { display: flex; flex-direction: column; gap: 8px; }
.wcard {
  display: flex; align-items: center; gap: 13px;
  width: 100%;
  text-align: left;
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r);
  padding: 13px 14px 13px 16px;
  min-height: var(--tap);
  transition: background .15s var(--ease), transform .12s var(--ease);
}
.wcard:active { transform: scale(.99); background: var(--glass-2); }
.wcard__badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-2);
  color: var(--lime);
}
.wcard__main { flex: 1; min-width: 0; }
.wcard__date { font-size: 12.5px; color: var(--text-2); }
.wcard__vals { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 1px; }
.wcard__km { font-size: 22px; font-weight: 680; letter-spacing: -.035em; }
.wcard__km small { font-size: 12px; font-weight: 500; color: var(--text-2); margin-left: 2px; letter-spacing: 0; }
.wcard__meta { font-size: 13px; color: var(--text-2); }
.wcard__tags { display: flex; gap: 8px; align-items: center; margin-top: 5px; color: var(--text-3); }
.wcard__chev { color: var(--text-3); flex: none; }
.dot-feel { width: 8px; height: 8px; border-radius: 50%; display: block; }
.dot-feel[data-v="easy"] { background: var(--zone-fat); }
.dot-feel[data-v="normal"] { background: var(--lime); }
.dot-feel[data-v="hard"] { background: var(--orange); }

/* ---------- Чипы и фильтры ---------- */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
  margin: 0 calc(var(--pad) * -1);
  padding-inline: var(--pad);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  color: var(--text-2);
  font-size: 14px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--lime); border-color: transparent; color: var(--on-accent); }

.period-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: 999px;
  padding: 5px 6px;
}
.period-nav__label { font-size: 15px; font-weight: 600; letter-spacing: -.015em; text-align: center; flex: 1; }

/* ---------- Плитки ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile {
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r);
  padding: 15px var(--pad) 16px;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.tile__label { font-size: 12px; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.tile__value {
  font-size: 30px; font-weight: 700; letter-spacing: -.04em; line-height: 1.08;
  overflow-wrap: anywhere;
}
.tile__value small { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 3px; letter-spacing: 0; }
.tile--hero { grid-column: span 2; background: var(--glass-2); }
.tile--hero .tile__value { font-size: 46px; color: var(--lime); }
.tile--hero .tile__value small { color: rgba(235,250,95,.6); font-size: 16px; }

/* ---------- Графики ---------- */
.chart-card {
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r);
  padding: var(--pad);
}
.chart-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.chart-card__title { font-size: 17px; font-weight: 640; letter-spacing: -.02em; }
.chart-card__total { font-size: 13px; color: var(--text-2); text-align: right; flex: none; }
.chart-box { position: relative; height: 172px; }
.chart-box--short { height: 124px; }
.chart-note { font-size: 12px; color: var(--text-3); margin-top: 10px; line-height: 1.5; }

/* Пульсовые зоны */
.zones { display: flex; flex-direction: column; gap: 12px; }
.zone__top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; gap: 10px; }
.zone__name { color: var(--text); }
.zone__val { color: var(--text-2); }
.zone__track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.zone__fill { display: block; height: 100%; border-radius: 999px; transition: width .5s var(--ease); }

/* Сравнение месяцев */
.compare { display: flex; flex-direction: column; gap: 16px; }
.compare__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.compare__month { font-size: 24px; font-weight: 700; letter-spacing: -.035em; color: var(--lime); }
.compare__vs { font-size: 13px; color: var(--text-2); text-align: right; }
.crow {
  display: flex; flex-direction: column; gap: 8px;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.05);
  border-left: 3px solid var(--crow-color, var(--lime));
}
.crow__line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.crow__val { font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.crow__name { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--crow-color, var(--lime)); }
.crow__delta { font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.crow__bars { display: flex; flex-direction: column; gap: 4px; }
.crow__bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.crow__bar i { display: block; height: 100%; border-radius: 999px; }
.crow__cap { font-size: 12px; color: var(--text-3); }

/* ---------- Форма ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; color: var(--text-2); }
.field__label .req { color: var(--orange); }
.field__hint { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.input, .textarea, select.input {
  width: 100%;
  min-height: var(--tap);
  background: rgba(255,255,255,.07);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r-xs);
  padding: 11px 14px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  appearance: none;
}
.input:focus, .textarea:focus { border-color: var(--lime); background: rgba(255,255,255,.1); outline: none; }
.input.is-invalid { border-color: var(--orange); }
.textarea { min-height: 104px; resize: vertical; line-height: 1.5; font-variant-numeric: normal; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.dur { display: flex; align-items: center; gap: 6px; }
.dur .input { text-align: center; padding-inline: 4px; }
.dur span { color: var(--text-3); font-size: 13px; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form__group { display: flex; flex-direction: column; gap: 13px; }
.disclosure {
  width: 100%;
  min-height: var(--tap);
  border-radius: 999px;
  background: var(--glass-2);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 0 18px;
  font-size: 15px; font-weight: 600;
}
.disclosure__chev { transition: transform .2s var(--ease); color: var(--text-2); }
.disclosure[aria-expanded="true"] .disclosure__chev { transform: rotate(180deg); }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-top: 6px; }

.splits { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: flex; align-items: center; gap: 8px; }
.split-row__km { width: 66px; flex: none; }

.seg { display: flex; gap: 6px; background: rgba(255,255,255,.07); padding: 5px; border-radius: 999px; }
.seg__item {
  flex: 1; min-height: 40px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.seg__item[aria-pressed="true"] { background: var(--lime); color: var(--on-accent); }

/* ---------- Нижняя панель (bottom sheet) ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 60; }
.sheet-root[hidden] { display: none !important; }
.sheet__scrim {
  position: absolute; inset: 0;
  background: rgba(4,18,17,.62);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.sheet-root.is-open .sheet__scrim { opacity: 1; }
.sheet {
  position: absolute;
  left: 50%; bottom: 0;
  width: min(520px, 100%);
  transform: translate(-50%, 100%);
  max-height: 93%;
  background: #17403E;
  border: 1px solid var(--glass-line);
  border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease);
  box-shadow: 0 -18px 50px rgba(3,16,15,.55);
}
.sheet-root.is-open .sheet { transform: translate(-50%, 0); }
.sheet--full { height: 93%; }
.sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); margin: 10px auto 2px; flex: none; }
.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 8px var(--pad) 12px;
  flex: none;
}
.sheet__title { font-size: 20px; font-weight: 680; letter-spacing: -.025em; }
.sheet__body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px var(--pad) var(--pad); flex: 1; }
.sheet__foot {
  flex: none;
  padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--glass-line-soft);
  display: flex; flex-direction: column; gap: 8px;
}

/* ---------- Плавающая кнопка веса ---------- */
.fab {
  position: fixed;
  right: max(var(--pad), calc(50% - 260px + var(--pad)));
  bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  min-height: 50px;
  padding: 0 20px 0 17px;
  border-radius: 999px;
  background: var(--orange);
  color: #1C0C00;
  font-size: 15px; font-weight: 650;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 10px 28px rgba(251,120,20,.32);
  transition: transform .15s var(--ease);
}
.fab:active { transform: scale(.96); }
.fab.is-done { background: var(--glass-2); color: var(--text-2); box-shadow: none; border: 1px solid var(--glass-line-soft); }

/* ---------- История веса ---------- */
.wrow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  width: 100%; text-align: left;
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r-sm);
  padding: 13px var(--pad);
  min-height: var(--tap);
}
.wrow__date { font-size: 12.5px; color: var(--text-2); }
.wrow__kg { font-size: 21px; font-weight: 680; letter-spacing: -.03em; }
.wrow__kg small { font-size: 12px; font-weight: 500; color: var(--text-2); margin-left: 2px; letter-spacing: 0; }
.wrow__delta { font-size: 13px; color: var(--text-2); text-align: right; }
.wrow__delta.is-down { color: var(--lime); }

/* ---------- Карточка тренировки ---------- */
.big-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.metrics-list { display: flex; flex-direction: column; }
.metrics-list__row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-line-soft);
  font-size: 14px;
}
.metrics-list__row:last-child { border-bottom: 0; }
.metrics-list__row dt { color: var(--text-2); }
.metrics-list__row dd { font-weight: 640; font-variant-numeric: tabular-nums; }

.note-box {
  background: rgba(255,255,255,.06);
  border-radius: var(--r-sm);
  padding: 15px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.note-placeholder {
  width: 100%; text-align: left;
  min-height: var(--tap);
  background: rgba(255,255,255,.06);
  border: 1px dashed var(--glass-line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  color: var(--text-2);
  font-size: 15px;
  display: flex; align-items: center; gap: 9px;
}
.note-actions { display: flex; gap: 8px; margin-top: 12px; }

.shots { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.shots::-webkit-scrollbar { display: none; }
.shot {
  flex: none;
  width: 86px; height: 114px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255,255,255,.06);
  position: relative;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot--add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
  border: 1px dashed var(--glass-line);
}

.viewer { position: fixed; inset: 0; z-index: 70; background: #061A19; display: flex; flex-direction: column; }
.viewer__top { display: flex; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px; flex: none; }
.viewer__strip { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer__strip::-webkit-scrollbar { display: none; }
.viewer__item { flex: none; width: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.viewer__item img { max-height: 100%; width: auto; object-fit: contain; border-radius: 12px; }
.viewer__count { padding: 12px; text-align: center; color: var(--text-2); font-size: 13px; flex: none; }

/* ---------- Тост ---------- */
.toast-root {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  padding: 0 var(--pad);
}
.toast {
  background: rgba(12,38,36,.95);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(3,16,15,.5);
  animation: toastIn .25s var(--ease);
  max-width: 100%;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Конфетти ---------- */
.confetti { position: fixed; inset: 0; z-index: 75; pointer-events: none; }

/* ---------- Календарь ---------- */
.cal { display: flex; flex-direction: column; gap: 12px; }
.cal__head { display: flex; align-items: center; justify-content: space-between; }
.cal__month { font-size: 17px; font-weight: 640; letter-spacing: -.02em; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal__dow { text-align: center; font-size: 11px; color: var(--text-3); padding-bottom: 2px; }
.cal__day {
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.06);
  position: relative;
}
.cal__day.is-empty { background: none; pointer-events: none; }
.cal__day.is-today { box-shadow: inset 0 0 0 1.5px var(--lime); }
.cal__day[aria-pressed="true"] { background: var(--lime); color: var(--on-accent); }
.cal__day.in-range { background: rgba(235,250,95,.16); }
.cal__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.cal__day[aria-pressed="true"] .cal__dot { background: var(--on-accent); }

/* Подсказка */
.hint {
  background: var(--glass);
  border: 1px solid var(--glass-line-soft);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-size: 13px;
  color: var(--text-2);
  display: flex; gap: 10px; align-items: flex-start;
}

/* Меню ⋯ */
.menu { display: flex; flex-direction: column; }
.menu button {
  text-align: left;
  min-height: 52px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--glass-line-soft);
  font-size: 15px;
  display: flex; align-items: center; gap: 12px;
}
.menu button:last-child { border-bottom: 0; }
.menu .ic { color: var(--text-2); }
