/* ============================================================
   Дизайн-система AIRO — Fitness TMA
   ============================================================ */
:root {
  --bg: #0d0e11;            /* глубокий матовый графит */
  --bg-soft: #131419;
  --accent: #96c396;       /* светящийся шалфейный неон */
  --accent-soft: #c8e6c8;
  --accent-dim: rgba(150, 195, 150, 0.16);
  --title: #e5e5e7;        /* молочно-титановый */
  --muted: rgba(229, 229, 231, 0.55);
  --muted-2: rgba(229, 229, 231, 0.32);

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-2: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 10px;

  --radius: 22px;
  --radius-sm: 16px;
  --tick-gap: 14px; /* шаг делений шкалы, синхронизирован с app.js (TICK) */
  --topbar-h: 56px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(120% 55% at 50% -8%, rgba(150, 195, 150, 0.09), transparent 60%),
    var(--bg);
  color: var(--title);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

.hidden {
  display: none !important;
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 18px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, var(--bg) 55%, rgba(13, 14, 17, 0));
}

.progress-track {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(150, 195, 150, 0.6);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 0.5px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--title);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.icon-btn:active {
  transform: scale(0.94);
  background: var(--glass-bg-2);
}
.icon-btn.ghost {
  border: none;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}

/* ---------- Step layout ---------- */
.step {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + var(--topbar-h) + 8px) 20px 0;
}
.step--center {
  justify-content: center;
  padding-top: calc(var(--safe-top) + 24px);
}
.step-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
}

/* ---------- Headings ---------- */
.heading h1 {
  margin: 4px 0 8px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
}
.heading p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Glass card ---------- */
.card {
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}

/* ---------- CTA dock + button ---------- */
.cta-dock {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 14px 0 calc(var(--safe-bottom) + 16px);
  background: linear-gradient(0deg, var(--bg) 62%, rgba(13, 14, 17, 0));
}
.step--center .cta-dock {
  margin-top: 40px;
}

.cta {
  position: relative;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 18px;
  background: var(--accent);
  color: #0d2a14;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(150, 195, 150, 0.35),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.25);
  transition: transform 0.14s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.cta:active {
  transform: scale(0.985);
}
.cta:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: default;
}
.cta--grad {
  background: linear-gradient(120deg, #a9d4a9 0%, #96c396 55%, #7fb98a 100%);
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(13, 42, 20, 0.35);
  border-top-color: #0d2a14;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}
.cta.loading .cta-text { opacity: 0; }
.cta.loading .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ШАГ 1 · Welcome
   ============================================================ */
.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.brand-mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 0 40px rgba(150, 195, 150, 0.2);
}
.brand-mark svg { width: 48px; height: 48px; }
.brand-title {
  margin: 6px 0 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
  color: var(--title);
}
.brand-sub {
  margin: 0;
  max-width: 280px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ============================================================
   ШАГ 2 · Цель
   ============================================================ */
.goal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.goal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  text-align: left;
  color: var(--title);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.2s ease, background 0.2s ease;
}
.goal-card:active { transform: scale(0.985); background: var(--glass-bg-2); }
.goal-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 22px rgba(150, 195, 150, 0.28);
}
.goal-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-dim);
  color: var(--accent);
}
.goal-icon svg { width: 24px; height: 24px; }
.goal-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.goal-text b { font-size: 16px; font-weight: 600; }
.goal-text i { font-size: 13px; font-style: normal; color: var(--muted); }
.goal-arrow { color: var(--muted-2); }
.goal-arrow svg { width: 22px; height: 22px; }

/* ============================================================
   ШАГ 3 · Силуэт тела
   ============================================================ */
.bodymap-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px 0 4px;
}
.bodymap {
  width: auto;
  height: min(58vh, 440px);
}
.body-outline {
  fill: none;
  stroke: rgba(229, 229, 231, 0.22);
  stroke-width: 1.5;
}
.zone {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(229, 229, 231, 0.18);
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.18s ease, stroke 0.18s ease, filter 0.18s ease;
}
.zone:active { fill: rgba(255, 255, 255, 0.08); }
.zone.active {
  fill: rgba(150, 195, 150, 0.34);
  stroke: var(--accent);
  filter: drop-shadow(0 0 6px rgba(150, 195, 150, 0.55));
}

/* ============================================================
   ШАГ 4 · Линейки (рост/вес)
   ============================================================ */
.metric { padding: 18px 18px 14px; }
.metric-head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
.metric-icon { display: grid; place-items: center; color: var(--accent); }
.metric-icon svg { width: 18px; height: 18px; }
.metric-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.metric-value {
  margin: 4px 0 12px;
  font-size: 50px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.metric-value .unit { font-size: 18px; font-weight: 500; font-style: normal; color: var(--muted); }

.ruler-wrap { position: relative; height: 84px; }
.ruler {
  position: absolute;
  inset: 0;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ruler::-webkit-scrollbar { display: none; }
.track { display: flex; align-items: flex-start; height: 100%; padding-top: 8px; }
.spacer { flex: 0 0 auto; }
.tick {
  flex: 0 0 var(--tick-gap);
  height: 30px;
  position: relative;
  display: flex;
  justify-content: center;
  scroll-snap-align: center;
}
.tick::before {
  content: "";
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: rgba(229, 229, 231, 0.22);
}
.tick.major::before { height: 28px; background: rgba(229, 229, 231, 0.5); }
.tick-label {
  position: absolute;
  top: 36px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
}
.pointer {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  width: 3px;
  height: 40px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(150, 195, 150, 0.85);
  pointer-events: none;
}
.fade { position: absolute; top: 0; bottom: 0; width: 56px; pointer-events: none; z-index: 2; }
.fade-left { left: 0; background: linear-gradient(90deg, var(--bg) 4%, rgba(13, 14, 17, 0)); }
.fade-right { right: 0; background: linear-gradient(270deg, var(--bg) 4%, rgba(13, 14, 17, 0)); }

/* ИМТ */
.bmi { padding: 16px 18px; }
.bmi-row { display: flex; align-items: baseline; justify-content: space-between; }
.bmi-label { font-size: 13px; color: var(--muted); }
.bmi-value b { font-size: 20px; font-weight: 700; }
.bmi-bar {
  position: relative;
  height: 6px;
  margin: 12px 0 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #6ea8d8 0%, var(--accent) 38%, #d8c46e 68%, #d88c6e 100%);
  opacity: 0.85;
}
.bmi-thumb {
  position: absolute;
  top: 50%;
  left: 38%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--title);
  border: 2px solid var(--bg);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: left 0.18s ease;
}
.bmi-tag { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }

/* ============================================================
   ШАГ 5 · Уровень подготовки
   ============================================================ */
.level-list { display: flex; flex-direction: column; gap: 12px; }
.level-card {
  padding: 20px 18px;
  text-align: left;
  color: var(--title);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.14s ease, border-color 0.2s ease, background 0.2s ease;
}
.level-card:active { transform: scale(0.985); background: var(--glass-bg-2); }
.level-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 22px rgba(150, 195, 150, 0.28);
}
.level-card b { font-size: 17px; font-weight: 600; }
.level-card i { font-size: 13px; font-style: normal; color: var(--muted); }

/* ============================================================
   ШАГ 6 · Ограничения
   ============================================================ */
.restrict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.restrict-card {
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--title);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.2s ease, background 0.2s ease;
}
.restrict-card:active { transform: scale(0.97); }
.restrict-card b { font-size: 14px; font-weight: 500; }
.restrict-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--glass-bg-2);
  color: var(--muted);
  transition: all 0.2s ease;
}
.restrict-icon svg { width: 26px; height: 26px; }
.restrict-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(150, 195, 150, 0.25);
}
.restrict-card.active .restrict-icon {
  background: var(--accent-dim);
  color: var(--accent);
}
.restrict-card.active b { color: var(--accent-soft); }

/* ============================================================
   ШАГ 7 · AI-генерация (blackout)
   ============================================================ */
.blackout {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px;
  text-align: center;
}
.sphere {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 38%,
    var(--accent-soft) 0%,
    var(--accent) 42%,
    rgba(150, 195, 150, 0.15) 70%,
    transparent 76%
  );
  box-shadow: 0 0 70px rgba(150, 195, 150, 0.55);
  animation: pulse 1.7s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}
.gen-text {
  margin: 0;
  min-height: 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--title);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gen-text.show { opacity: 1; }

/* ============================================================
   ШАГ 8 · Результат / график
   ============================================================ */
.chart-card { padding: 18px; }
.forecast-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.forecast-col { display: flex; flex-direction: column; gap: 4px; }
.forecast-col--target { text-align: right; }
.forecast-label { font-size: 12px; color: var(--muted); }
.forecast-num { font-size: 15px; color: var(--title); }
.forecast-num b { font-size: 22px; font-weight: 700; }
.forecast-num.accent b { color: var(--accent); }
.chart { width: 100%; height: 210px; display: block; }

/* ============================================================
   ШАГ 9 · Paywall
   ============================================================ */
.plan-list { display: flex; flex-direction: column; gap: 12px; }
.plan-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  text-align: left;
  color: var(--title);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.2s ease;
}
.plan-card:active { transform: scale(0.99); }
.plan-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 26px rgba(150, 195, 150, 0.3);
}
.plan-info { display: flex; flex-direction: column; gap: 4px; }
.plan-info b { font-size: 17px; font-weight: 600; }
.plan-info i { font-size: 13px; font-style: normal; color: var(--muted); }
.plan-price { text-align: right; display: flex; flex-direction: column; gap: 3px; }
.plan-amount { font-size: 18px; font-weight: 700; }
.plan-per { font-size: 12px; color: var(--muted); }
.plan-badge {
  position: absolute;
  top: -10px;
  left: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0d2a14;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(150, 195, 150, 0.4);
}

.consent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
  margin-top: 4px;
}
.switch {
  width: 46px;
  height: 28px;
  flex: 0 0 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid var(--glass-border);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--title);
  transition: left 0.2s ease, background 0.2s ease;
}
.switch.on { background: var(--accent); }
.switch.on::after { left: 21px; background: #0d2a14; }
.consent-text { font-size: 13px; line-height: 1.45; color: var(--muted); }
.consent-text a { color: var(--accent); text-decoration: none; }

/* ============================================================
   ШАГ 10 · Успешная оплата / проверка статуса
   ============================================================ */
.step[data-step="10"] {
  /* На этом шаге шапка скрыта — убираем запас под неё, центрируем контент. */
  padding-top: calc(var(--safe-top) + 20px);
}
.pay-state {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pay-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 0 8px;
}

/* Состояние А · светящееся шалфейное кольцо */
.loader-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(150, 195, 150, 0.18);
  border-top-color: var(--accent);
  box-shadow: 0 0 28px rgba(150, 195, 150, 0.4);
  animation: spin 0.9s linear infinite;
  margin-bottom: 8px;
}

/* Состояние Б · галочка */
.success-check {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 56px rgba(150, 195, 150, 0.45);
  animation: pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-bottom: 6px;
}
.success-check svg { width: 74px; height: 74px; }
.sc-ring { opacity: 0.6; }
.sc-tick {
  stroke-dasharray: 64;
  stroke-dashoffset: 64;
  animation: draw 0.5s 0.15s ease forwards;
}
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.pay-title {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
}
.pay-sub {
  margin: 0;
  max-width: 300px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.pay-fallback {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ghost-btn {
  padding: 13px 22px;
  border-radius: 14px;
  border: 0.5px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--title);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.2s ease;
}
.ghost-btn:active { transform: scale(0.97); background: var(--glass-bg-2); }
.link-btn {
  border: none;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
}
.link-btn:active { color: var(--accent); }

/* ============================================================
   ДАШБОРД (главный экран)
   ============================================================ */
.dash {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: calc(var(--safe-top) + 18px) 20px calc(var(--safe-bottom) + 88px);
}

/* Шапка */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dash-hello h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
}
.dash-hello p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.dash-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0.5px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--title);
  cursor: pointer;
  transition: transform 0.14s ease;
}
.dash-avatar:active { transform: scale(0.94); }
.dash-avatar svg { width: 24px; height: 24px; }

/* Фокус дня */
.focus-card {
  position: relative;
  overflow: hidden;
  padding: 22px 20px;
}
.focus-card::before {
  content: "";
  position: absolute;
  top: -45%;
  left: -10%;
  width: 75%;
  height: 170%;
  background: radial-gradient(circle, rgba(150, 195, 150, 0.2), transparent 70%);
  pointer-events: none;
}
.focus-tag {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.focus-title {
  position: relative;
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--title);
}
.focus-meta {
  position: relative;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.focus-cta {
  position: relative;
  height: 52px;
}

/* Трекеры — горизонтальная карусель */
.trackers {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 20px;
  margin: 0 -20px; /* full-bleed по краям экрана */
}
.trackers::-webkit-scrollbar { display: none; }
.tracker-card {
  flex: 0 0 150px;
  scroll-snap-align: start;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  color: var(--title);
  font-family: inherit;
}
button.tracker-card {
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.2s ease;
}
button.tracker-card:active { transform: scale(0.97); }
.tracker-icon { color: var(--accent); }
.tracker-icon svg { width: 26px; height: 26px; }
.tracker-label { font-size: 13px; color: var(--muted); }
.tracker-value { font-size: 14px; color: var(--title); }
.tracker-value b { font-size: 17px; font-weight: 700; }
.tracker-bar {
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.tracker-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(150, 195, 150, 0.5);
  transition: width 0.5s ease;
}
.tracker-add {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* Таббар */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(64px + var(--safe-bottom));
  padding: 8px 12px var(--safe-bottom);
  display: flex;
  background: rgba(13, 14, 17, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 0.5px solid var(--glass-border);
  z-index: 40;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--muted-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}
.tab svg { width: 24px; height: 24px; }
.tab:active { transform: scale(0.95); }
.tab.active { color: var(--accent); }
.tab.active svg { filter: drop-shadow(0 0 8px rgba(150, 195, 150, 0.6)); }

/* ============================================================
   ЭКРАН ТРЕНИРОВКИ (плеер)
   ============================================================ */
#workout-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
}
.wo {
  max-width: 480px;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 12px) 20px calc(var(--safe-bottom) + 20px);
}

/* Topbar */
.wo-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wo-counter {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* Сегментированный прогресс */
.wo-progress {
  display: flex;
  gap: 5px;
  margin: 16px 0 4px;
}
.wo-seg {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}
.wo-seg.done {
  background: var(--accent);
}
.wo-seg.active {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(150, 195, 150, 0.6);
}

/* Центральная зона */
.wo-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 0;
}
.wo-media {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  max-height: 40vh;
  border-radius: 26px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-border);
}
.wo-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.03) 30%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}
.wo-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wo-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--title);
}

/* Индикатор: таймер / повторы */
.wo-indicator {
  min-height: 70px;
  display: grid;
  place-items: center;
}
.wo-timer,
.wo-reps {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--title);
  font-variant-numeric: tabular-nums;
}

/* Нижняя панель управления */
.wo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}
.wo-side {
  min-width: 86px;
  padding: 10px 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}
.wo-side:active { color: var(--title); }
.wo-center {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.wo-play {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 0.5px solid var(--glass-border);
  background: var(--glass-bg-2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--title);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s ease;
}
.wo-play:active { transform: scale(0.96); }
.wo-play svg { width: 34px; height: 34px; }
.wo-play .ic-play { display: none; }
.wo-play.paused .ic-pause { display: none; }
.wo-play.paused .ic-play { display: block; }
.wo-done {
  height: 64px;
  padding: 0 30px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: #0d2a14;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(150, 195, 150, 0.35);
  transition: transform 0.14s ease;
}
.wo-done:active { transform: scale(0.97); }

/* Overlay отдыха */
.wo-rest {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(13, 14, 17, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 40px;
}
.wo-rest-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.wo-rest-timer {
  font-size: 76px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--title);
  font-variant-numeric: tabular-nums;
}
.wo-rest-next {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.wo-rest-next b { color: var(--title); font-weight: 600; }
.wo-rest-skip {
  margin-top: 18px;
  padding: 13px 24px;
  border-radius: 16px;
  border: 0.5px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--title);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.wo-rest-skip:active { transform: scale(0.97); }

/* ============================================================
   ЭКРАН ТРИУМФА (конец тренировки)
   ============================================================ */
#workout-success-screen {
  position: fixed;
  inset: 0;
  z-index: 85;
  background:
    radial-gradient(120% 55% at 50% 12%, rgba(150, 195, 150, 0.12), transparent 60%),
    var(--bg);
}
.ws {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 20px) 20px calc(var(--safe-bottom) + 16px);
}
.ws-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.ws-trophy {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  animation: pop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    ws-glow 2.6s 0.5s ease-in-out infinite;
}
.ws-trophy svg { width: 72px; height: 72px; }
@keyframes ws-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(150, 195, 150, 0.35); }
  50% { box-shadow: 0 0 72px rgba(150, 195, 150, 0.6); }
}
.ws-title {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
}
.ws-sub {
  margin: 0;
  max-width: 300px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.ws-stats {
  display: flex;
  width: 100%;
  margin-top: 22px;
  padding: 4px 0;
}
.ws-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 18px 12px;
}
.ws-stat + .ws-stat {
  border-left: 0.5px solid var(--glass-border);
}
.ws-stat b {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
  font-variant-numeric: tabular-nums;
}
.ws-stat span {
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   ВКЛАДКА «ПИТАНИЕ»
   ============================================================ */
.dash-tab {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nut-heading h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
}

/* Сводка КБЖУ */
.nut-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nut-cal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.nut-cal-label {
  font-size: 13px;
  color: var(--muted);
}
.nut-cal-value b {
  font-size: 18px;
  font-weight: 700;
  color: var(--title);
  font-variant-numeric: tabular-nums;
}
.nut-cal-bar {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.nut-cal-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(150, 195, 150, 0.5);
  transition: width 0.5s ease;
}
.nut-macros {
  margin: 2px 0 0;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--title);
}

/* Лента блюд */
.meals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  text-align: left;
  color: var(--title);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.2s ease;
}
.meal-card:active {
  transform: scale(0.99);
  background: var(--glass-bg-2);
}
.meal-media {
  position: relative;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg-2);
}
.meal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.meal-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.03) 30%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
.meal-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.meal-type {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.meal-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}
.meal-meta {
  font-size: 13px;
  color: var(--muted);
}
.meal-arrow {
  flex: 0 0 auto;
  color: var(--muted-2);
}
.meal-arrow svg {
  width: 20px;
  height: 20px;
}

/* Кнопка списка покупок */
.shop-btn {
  margin-top: 2px;
  padding: 18px;
  border-radius: var(--radius);
  border: 0.5px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--title);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.2s ease;
}
.shop-btn:active {
  transform: scale(0.99);
  background: var(--glass-bg-2);
}

/* ============================================================
   МОДАЛЬНЫЕ ОКНА (bottom sheet)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  animation: fade 0.25s ease;
}
.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 86dvh;
  overflow-y: auto;
  background: #15161b;
  border-radius: 24px 24px 0 0;
  border: 0.5px solid var(--glass-border);
  border-bottom: none;
  padding: 10px 22px calc(var(--safe-bottom) + 24px);
  animation: sheet-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  scrollbar-width: none;
}
.sheet::-webkit-scrollbar { display: none; }
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  margin: 8px auto 10px;
}
.sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--glass-bg-2);
  color: var(--title);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sheet-close svg { width: 18px; height: 18px; }
.sheet h2 {
  margin: 6px 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-right: 40px;
  color: var(--title);
}
.sheet-meta {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}
.sheet-section {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ingredients li {
  font-size: 15px;
  color: var(--title);
  padding: 11px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}
.ingredients li:last-child { border-bottom: none; }
.recipe-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.recipe-steps li {
  position: relative;
  padding: 3px 0 16px 40px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--title);
  counter-increment: step;
}
.recipe-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Чек-лист покупок (Notion-style) */
.shop-group { margin-top: 2px; }
.shop-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shop-item {
  position: relative;
  padding: 13px 0 13px 34px;
  font-size: 15px;
  color: var(--title);
  cursor: pointer;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  transition: opacity 0.2s ease;
}
.shop-item:last-child { border-bottom: none; }
.shop-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--muted-2);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.shop-item.checked {
  opacity: 0.45;
  text-decoration: line-through;
}
.shop-item.checked::before {
  background: var(--accent);
  border-color: var(--accent);
}
.shop-item.checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 5px;
  height: 9px;
  border: solid #0d2a14;
  border-width: 0 2px 2px 0;
  transform: translateY(-60%) rotate(45deg);
}

/* ============================================================
   ВКЛАДКА «ПРОФИЛЬ»
   ============================================================ */
.profile-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -4px;
}

/* Карточка атлета */
.athlete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.athlete-avatar {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  box-shadow: 0 0 32px rgba(150, 195, 150, 0.3);
}
.athlete-avatar svg { width: 48px; height: 48px; }
.athlete-name {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
}
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.premium-badge svg { width: 15px; height: 15px; }
.premium-activate {
  padding: 10px 20px;
  border-radius: 14px;
  border: 0.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.14s ease;
}
.premium-activate:active {
  background: var(--accent-dim);
  transform: scale(0.98);
}

/* Ключевые метрики */
.metrics-row {
  display: flex;
  margin-top: 4px;
}
.metric-mini {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 6px;
}
.metric-mini + .metric-mini {
  border-left: 0.5px solid var(--glass-border);
}
.metric-mini b {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--title);
  font-variant-numeric: tabular-nums;
}
.metric-mini span {
  font-size: 12px;
  color: var(--muted);
}

/* График прогресса */
.profile-progress { padding: 16px 18px; }
.profile-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.profile-progress-title {
  font-size: 13px;
  color: var(--muted);
}
.profile-progress-goal {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.profile-chart {
  width: 100%;
  height: 150px;
  display: block;
}

/* Достижения */
.ach-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ach-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ach-item {
  position: relative;
  padding: 13px 0 13px 32px;
  font-size: 15px;
  color: var(--title);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}
.ach-item:last-child { border-bottom: none; }
.ach-mark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--muted-2);
}
.ach-item.done { color: var(--muted); }
.ach-item.done .ach-mark {
  background: var(--accent);
  border-color: var(--accent);
}
.ach-item.done .ach-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 5px;
  height: 9px;
  border: solid #0d2a14;
  border-width: 0 2px 2px 0;
  transform: translateY(-60%) rotate(45deg);
}

/* Настройки (bottom sheet) */
.settings-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  font-size: 15px;
  color: var(--title);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
}
.settings-row:last-child { border-bottom: none; }
.settings-row b { font-weight: 600; color: var(--muted); }
.settings-link { cursor: pointer; }
.settings-link svg { width: 18px; height: 18px; color: var(--muted-2); }

@media (max-width: 360px) {
  .metric-value { font-size: 44px; }
  .heading h1 { font-size: 24px; }
  .brand-title { font-size: 34px; }
  .tracker-card { flex-basis: 140px; }
  .wo-timer, .wo-reps { font-size: 56px; }
}

/* Отметка «съедено» — в карточке блюда и в карточке рецепта */
.meal-card.eaten .meal-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(150, 195, 150, 0.32);
}
.meal-card.eaten .meal-title {
  color: var(--muted);
}
.meal-card.eaten .meal-type::after {
  content: " · съедено";
  color: var(--muted-2);
}
.eat-btn {
  margin-top: 22px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-2);
  color: var(--title);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.14s ease;
}
.eat-btn:active {
  transform: scale(0.99);
}
.eat-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.eat-check {
  display: inline-flex;
  width: 20px;
  height: 20px;
  opacity: 0.35;
}
.eat-check svg {
  width: 100%;
  height: 100%;
}
.eat-btn[aria-pressed="true"] .eat-check {
  opacity: 1;
}

/* Плашка «пройти онбординг заново» в профиле */
.restart-onboarding {
  margin-top: 18px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  text-align: left;
  color: var(--title);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.2s ease;
}
.restart-onboarding:active {
  transform: scale(0.99);
  background: var(--glass-bg-2);
}
.restart-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.restart-text b {
  font-size: 16px;
  font-weight: 600;
}
.restart-text span {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}
.restart-arrow {
  flex: 0 0 auto;
  color: var(--muted-2);
}
.restart-arrow svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   Вкладка «Программа»
   ============================================================ */
.program-head {
  padding: 8px 0 4px;
}
.program-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.program-head p {
  margin: 6px 0 14px;
  font-size: 14px;
  color: var(--muted);
}
.program-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--glass-bg-2);
  overflow: hidden;
}
.program-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.program-counter {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted-2);
}
.program-week {
  margin-top: 26px;
}
.program-week-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.program-week-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.program-week-count {
  font-size: 12px;
  color: var(--muted-2);
}
.program-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.program-day {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--glass-bg);
  color: var(--title);
  font-family: inherit;
  text-align: left;
  transition: transform 0.14s ease, background 0.2s ease;
}
.program-day.tappable {
  cursor: pointer;
}
.program-day.tappable:active {
  transform: scale(0.99);
  background: var(--glass-bg-2);
}
/* Сегодняшний день — единственный акцент на экране: взгляд должен
   находить его без чтения. */
.program-day.today {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.program-day.locked {
  opacity: 0.45;
}
.day-mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.program-day.done .day-mark {
  border-color: var(--accent);
  background: var(--accent);
  color: #0d0e11;
}
.program-day.today .day-mark {
  border-color: var(--accent);
  color: var(--accent);
}
.program-day.missed .day-mark {
  border-style: dashed;
}
.day-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.day-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.day-meta {
  font-size: 12.5px;
  color: var(--muted);
}
.program-day.today .day-meta {
  color: var(--accent-soft);
}

/* Запись веса и подсказка под графиком */
.chart-empty {
  margin: 10px 2px 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted-2);
}
.weigh-btn {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.weigh-btn:active {
  background: var(--glass-bg-2);
}
/* Прогресс достижения — цифра вместо молчаливой галочки */
.ach-hint {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted-2);
}
.ach-item.done .ach-hint {
  color: var(--accent);
}

/* Переключатель в настройках */
.switch {
  width: 46px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-2);
  padding: 2px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.switch[aria-checked="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.switch-knob {
  display: block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--muted);
  transform: translateX(0);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}
.switch[aria-checked="true"] .switch-knob {
  background: var(--accent);
  transform: translateX(19px);
}

/* Силуэт рабочей зоны в плеере тренировки */
.wo-zone {
  position: absolute;
  inset: 0;
  margin: auto;
  height: 88%;
  width: auto;
}
.wo-zone.hidden {
  display: none;
}
.wo-body {
  fill: none;
  stroke: rgba(229, 229, 231, 0.18);
  stroke-width: 1.5;
}
.wo-part {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(229, 229, 231, 0.12);
  stroke-width: 1;
  transition: fill 0.35s ease, stroke 0.35s ease;
}
/* Активная зона — единственное цветное пятно на экране тренировки. */
.wo-part.active {
  fill: var(--accent-dim);
  stroke: var(--accent);
}
/* Кардио и растяжка не привязаны к одной зоне: подсвечиваем всё тело. */
.wo-zone.whole .wo-part {
  fill: var(--accent-dim);
  stroke: rgba(150, 195, 150, 0.5);
}

/* Пометка про учтённые ограничения здоровья */
.program-limits {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--accent-soft);
}
.program-limits.hidden {
  display: none;
}
