.header--compact {
  min-height: 0;
  padding-bottom: 0;
  margin-bottom: -8px;
}

.screen {
  animation: screen-in 0.22s ease;
}

.screen--settings {
  padding-bottom: 12px;
}

.screen--stats {
  padding-bottom: 12px;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.screen__lead {
  font-size: 14px;
  color: var(--c-ink-muted);
  margin-bottom: 20px;
}

.screen__section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-ink-faint);
  margin: 24px 0 12px;
}

.screen-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  margin-bottom: 10px;
  border-radius: var(--r-sm);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
}

.screen-back__icon svg {
  width: 16px;
  height: 16px;
}

/* Training location switch */
.training-location {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.training-location__option {
  min-width: 0;
  min-height: 76px;
  padding: 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
  cursor: pointer;
}

.training-location__option--active {
  border-color: var(--c-success);
  background: #f0fdf4;
  box-shadow: 0 0 0 3px var(--c-success-soft);
}

.training-location__logo-wrap {
  width: 100%;
  height: 30px;
  display: grid;
  place-items: center;
}

.training-location__option[data-training-location="fitnesswerk"] .training-location__logo-wrap {
  border-radius: 6px;
  background: var(--c-ink);
}

.training-location__logo {
  display: block;
  max-width: 112px;
  max-height: 30px;
  object-fit: contain;
}

.training-location__name {
  max-width: 100%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

/* Highlight card */
.highlight-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--c-ink);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.highlight-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.highlight-card__icon svg {
  width: 22px;
  height: 22px;
}

.highlight-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.highlight-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
}

.highlight-card__title {
  font-size: 16px;
  font-weight: 700;
}

.highlight-card__sub {
  font-size: 13px;
  opacity: 0.7;
}

.highlight-card__btn {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--c-ink);
  font-size: 13px;
  font-weight: 700;
}

/* List cards */
.list-card {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-card__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
}

.list-card__item--active {
  border-color: var(--c-success);
  background: #f0fdf4;
}

.list-card__item--btn {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.list-card--menu .list-card__item--btn:last-child .list-card__title {
  color: #dc2626;
}

.list-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--c-ink-muted);
}

.list-card__icon svg {
  width: 20px;
  height: 20px;
}

.list-card__body {
  flex: 1;
  min-width: 0;
}

.list-card__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.list-card__sub {
  display: block;
  font-size: 13px;
  color: var(--c-ink-muted);
  margin-top: 2px;
}

.list-card__meta {
  text-align: right;
  flex-shrink: 0;
}

.list-card__day {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-ink);
}

.list-card__dur {
  display: block;
  font-size: 11px;
  color: var(--c-ink-faint);
  margin-top: 2px;
}

.list-card__device {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-success-strong);
  margin-top: 2px;
}

.workout-history {
  margin-top: 4px;
}

.workout-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workout-history__title {
  margin-top: 12px;
}

.workout-history__head > span {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.workout-history__item {
  margin-top: 7px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
  overflow: hidden;
}

.workout-history__summary {
  min-height: 56px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.workout-history__summary::-webkit-details-marker {
  display: none;
}

.workout-history__logo-wrap {
  width: 66px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.workout-history__logo-wrap[data-gym-logo="fitnesswerk"] {
  background: #8f1632;
}

.workout-history__logo {
  max-width: 58px;
  max-height: 24px;
  object-fit: contain;
}

.workout-history__logo-wrap[data-gym-logo="fitnesswerk"] .workout-history__logo {
  max-width: 56px;
}

.workout-history__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.workout-history__body strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.15;
}

.workout-history__body small {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-ink-muted);
}

.workout-history__meta {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.workout-history__meta strong {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.15;
}

.workout-history__meta small {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.workout-history__exercises {
  list-style: none;
  padding: 0 10px 10px 92px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workout-history__exercise {
  min-height: 36px;
  padding: 8px 9px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
}

.workout-history__exercise-name {
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
}

.workout-history__exercise-weight {
  font-size: 13px;
  font-weight: 900;
  color: var(--c-ink);
}

.workout-history__machine {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-success-strong);
}

.workout-history__actions {
  padding: 0 10px 10px 92px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.workout-history__action {
  min-height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(18, 19, 22, 0.08);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 12px;
  font-weight: 900;
}

.workout-history__action--save {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: #fff;
}

.workout-history__action--danger {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.workout-history__edit {
  padding: 0 10px 10px 92px;
  display: grid;
  gap: 8px;
}

.workout-history__edit-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.workout-history__edit-meta label {
  min-width: 0;
}

.workout-history__edit-meta span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.workout-history__edit-list {
  display: grid;
  gap: 6px;
}

.workout-history__edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 56px 32px;
  align-items: center;
  gap: 6px;
}

.workout-history__input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 0 8px;
}

.workout-history__input--exercise {
  font-weight: 900;
}

.workout-history__row-delete {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.workout-history__add {
  min-height: 34px;
  border-radius: var(--r-sm);
  border: 1px dashed rgba(18, 19, 22, 0.18);
  background: rgba(255, 255, 255, 0.56);
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 370px) {
  .workout-history__summary {
    grid-template-columns: 64px 1fr;
  }

  .workout-history__meta {
    grid-column: 2 / -1;
    text-align: left;
  }

  .workout-history__exercises,
  .workout-history__actions,
  .workout-history__edit {
    padding-left: 10px;
  }

  .workout-history__edit-row {
    grid-template-columns: minmax(0, 1fr) 60px 48px 30px;
  }
}

/* Stat grid */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-tile {
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-tile--dark {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: #fff;
}

.stat-tile--dark .stat-tile__sub {
  color: rgba(255, 255, 255, 0.6);
}

.stat-tile--green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stat-tile--green .stat-tile__value {
  color: var(--c-success-strong);
}

.stat-tile--amber {
  background: #fffbeb;
  border-color: #fde68a;
}

.stat-tile--amber .stat-tile__value {
  color: #d97706;
}

.stat-tile--blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.stat-tile--blue .stat-tile__value {
  color: #2563eb;
}

.stat-tile__value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-tile__label {
  font-size: 13px;
  font-weight: 600;
}

.stat-tile__sub {
  font-size: 11px;
  color: var(--c-ink-muted);
}

.latest-workout {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(143, 22, 50, 0.16);
  background: rgba(143, 22, 50, 0.045);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.latest-workout__eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.latest-workout strong {
  font-size: 20px;
  line-height: 1.15;
}

.latest-workout span:last-child {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-ink-muted);
}

.stats-panel {
  margin-top: 12px;
  padding: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
}

.stats-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stats-panel__title {
  margin: 0;
}

.stats-panel__head span {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-ink-faint);
}

.area-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.area-summary__label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
}

.area-summary__label span {
  color: var(--c-ink-muted);
}

.area-summary__track {
  height: 8px;
  border-radius: 999px;
  background: var(--c-bg);
  overflow: hidden;
}

.area-summary__track span {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8f1632, #f2e820);
}

.exercise-frames {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.exercise-frame {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  overflow: hidden;
}

.exercise-frame h4 {
  margin: 0;
  padding: 9px 10px;
  border-bottom: 1px solid var(--c-border);
  background: rgba(18, 19, 22, 0.035);
  font-size: 12px;
  font-weight: 900;
}

.exercise-frame__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
}

.exercise-frame__list span {
  min-width: 0;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  background: var(--c-surface);
  border: 1px solid rgba(18, 19, 22, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.exercise-frame__list small {
  color: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 900;
}

.top-exercises {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.top-exercises__row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
}

.top-exercises__row span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--c-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.top-exercises__row strong {
  min-width: 0;
  font-size: 13px;
}

.top-exercises__row small {
  color: var(--c-ink-faint);
  font-size: 11px;
  font-weight: 800;
}

/* Bar chart */
.bar-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}

.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 8px;
}

.bar-chart__bar {
  width: 100%;
  max-width: 28px;
  height: var(--h, 20%);
  min-height: 4px;
  margin-top: auto;
  background: linear-gradient(180deg, var(--c-success), var(--c-success-strong));
  border-radius: 6px 6px 4px 4px;
}

.bar-chart__label {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-ink-faint);
  text-transform: uppercase;
}

.exercise-progress {
  margin-top: 14px;
  padding: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
}

.exercise-progress__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.exercise-progress__title {
  margin: 0 0 3px;
}

.exercise-progress__sub {
  font-size: 11px;
  color: var(--c-ink-faint);
  font-weight: 700;
}

.exercise-progress__select {
  max-width: 142px;
  height: 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 0 8px;
}

.period-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.period-filter--top {
  margin: -8px 0 12px;
}

.period-filter__btn {
  min-height: 32px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-ink-muted);
  font-size: 11px;
  font-weight: 800;
}

.period-filter__btn--active {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: #fff;
}

.progress-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 8px;
}

.progress-mini span {
  min-width: 0;
  padding: 8px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.progress-mini strong {
  font-size: 13px;
  line-height: 1.1;
}

.progress-mini small {
  font-size: 9px;
  font-weight: 900;
  color: var(--c-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-mini__trend--positive strong {
  color: var(--c-success-strong);
}

.progress-mini__trend--negative strong {
  color: #dc2626;
}

.progress-chart {
  overflow: hidden;
}

.progress-chart--empty {
  padding: 24px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.progress-chart__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.progress-chart__stats span {
  padding: 8px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.progress-chart__stats strong {
  font-size: 14px;
  line-height: 1.1;
}

.progress-chart__stats small {
  font-size: 10px;
  font-weight: 800;
  color: var(--c-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-chart__svg {
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 243, 245, 0.85));
}

.progress-chart__grid {
  stroke: rgba(18, 19, 22, 0.08);
  stroke-width: 1;
}

.progress-chart__area {
  fill: rgba(143, 22, 50, 0.08);
}

.progress-chart__line {
  fill: none;
  stroke: url(#progressLine);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-chart__point {
  fill: var(--c-surface);
  stroke: #8f1632;
  stroke-width: 2;
  r: 2.8px;
}

.progress-chart__scale {
  fill: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 800;
}

.progress-chart__latest-label {
  fill: var(--c-ink);
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.progress-chart__axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--c-ink-faint);
}

@media (max-width: 370px) {
  .exercise-progress__head {
    align-items: stretch;
    flex-direction: column;
  }

  .exercise-progress__select {
    max-width: none;
    width: 100%;
  }
}

/* Split stats */
.stats-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: var(--r-md);
  background: var(--c-surface);
  border: 1px solid rgba(18, 19, 22, 0.07);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
}

.stats-switch__btn {
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
}

.stats-switch__btn--active {
  background: var(--c-ink);
  color: #fff;
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.12);
}

.training-stats-view {
  display: grid;
  gap: 10px;
}

.training-latest-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.training-latest-stat {
  min-width: 0;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(143, 22, 50, 0.12);
  background: rgba(143, 22, 50, 0.045);
  display: grid;
  gap: 3px;
}

.training-latest-stat span {
  color: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}

.training-latest-stat strong {
  color: var(--c-ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
}

.training-latest-stat small {
  color: var(--c-ink-muted);
  font-size: 11px;
  font-weight: 800;
}

.training-empty-stat {
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 370px) {
  .stats-switch__btn {
    font-size: 11px;
  }

  .training-latest-stats {
    grid-template-columns: 1fr;
  }
}

/* Bodyweight stats */
.screen--bodyweight {
  display: grid;
  gap: 12px;
}

.bodyweight-progress {
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(18, 19, 22, 0.08);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04), 0 14px 34px rgba(18, 19, 22, 0.05);
}

.bodyweight-progress__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.bodyweight-progress__head h3 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 900;
}

.bodyweight-progress__head p {
  margin: 0;
  color: var(--c-ink-faint);
  font-size: 12px;
  font-weight: 800;
}

.bodyweight-progress__head button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--c-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.bodyweight-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 10px;
}

.bodyweight-metrics span {
  min-width: 0;
  padding: 10px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  border: 1px solid rgba(18, 19, 22, 0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bodyweight-metrics strong {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
}

.bodyweight-metrics small {
  color: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bodyweight-goal {
  margin-bottom: 10px;
  padding: 11px;
  border-radius: var(--r-sm);
  background: rgba(143, 22, 50, 0.055);
  border: 1px solid rgba(143, 22, 50, 0.12);
}

.bodyweight-goal--empty {
  display: grid;
  gap: 5px;
  background: rgba(238, 242, 255, 0.72);
  border-color: rgba(79, 70, 229, 0.14);
}

.bodyweight-goal--empty strong {
  font-size: 14px;
}

.bodyweight-goal--empty span {
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.bodyweight-goal--empty button {
  justify-self: start;
  min-height: 32px;
  margin-top: 3px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: #4f46e5;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.bodyweight-goal__top,
.bodyweight-goal__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bodyweight-goal__top span {
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 800;
}

.bodyweight-goal__top strong {
  font-size: 22px;
  font-weight: 900;
}

.bodyweight-goal__track {
  height: 10px;
  margin: 9px 0 8px;
  border-radius: 999px;
  background: rgba(18, 19, 22, 0.08);
  overflow: hidden;
}

.bodyweight-goal__track span {
  display: block;
  width: var(--p, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8f1632, #111827);
}

.bodyweight-goal__meta span {
  color: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 900;
}

.bodyweight-chart {
  overflow: hidden;
}

.bodyweight-chart--empty {
  padding: 28px 16px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink-muted);
  display: grid;
  gap: 5px;
  text-align: center;
}

.bodyweight-chart--empty strong {
  color: var(--c-ink);
  font-size: 14px;
}

.bodyweight-chart--empty span {
  font-size: 12px;
  font-weight: 700;
}

.bodyweight-chart__svg {
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 243, 245, 0.82));
}

.bodyweight-chart__grid {
  stroke: rgba(18, 19, 22, 0.08);
  stroke-width: 1;
}

.bodyweight-chart__goal {
  stroke: #4f46e5;
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.bodyweight-chart__goal-label,
.bodyweight-chart__scale {
  fill: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 900;
}

.bodyweight-chart__area {
  fill: rgba(143, 22, 50, 0.08);
}

.bodyweight-chart__line {
  fill: none;
  stroke: url(#bodyWeightLine);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bodyweight-chart__point {
  fill: var(--c-surface);
  stroke: #8f1632;
  stroke-width: 2;
}

.bodyweight-chart__latest-label {
  fill: var(--c-ink);
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.bodyweight-chart__axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--c-ink-faint);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 370px) {
  .bodyweight-progress__head {
    align-items: stretch;
    flex-direction: column;
  }

  .bodyweight-progress__head button {
    width: 100%;
  }
}

/* Training coach */
.screen--training {
  padding-bottom: 12px;
}

.training-coach {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(18, 19, 22, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04), 0 14px 34px rgba(18, 19, 22, 0.05);
}

.training-coach::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #8f1632, #f2e820);
}

.training-coach__top {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.training-coach__top > span {
  min-width: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.training-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 3px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  border: 1px solid rgba(18, 19, 22, 0.06);
}

.training-toggle__btn {
  min-height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  color: var(--c-ink-muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
}

.training-toggle__btn--active {
  background: var(--c-ink);
  color: #fff;
}

.training-coach__body {
  position: relative;
  z-index: 1;
}

.training-coach__eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8f1632;
}

.training-coach h2 {
  font-size: 28px;
  line-height: 1;
  margin: 0 0 6px;
}

.training-coach p {
  max-width: 280px;
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.training-coach__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 14px;
}

.training-coach__metrics span {
  min-width: 0;
  padding: 9px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.training-coach__metrics strong {
  font-size: 16px;
  line-height: 1.1;
}

.training-coach__metrics small {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.training-plan {
  margin-top: 12px;
}

.training-plan__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.training-plan__title {
  margin-top: 8px;
}

.training-plan__head span {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.training-plan__list {
  display: grid;
  gap: 7px;
}

.training-plan__item {
  min-height: 68px;
  padding: 9px;
  border-radius: var(--r-md);
  border: 1px solid rgba(18, 19, 22, 0.08);
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  grid-template-columns: 34px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.03);
  cursor: pointer;
}

.training-plan__item--skipped {
  opacity: 0.46;
}

.training-plan__item--active {
  border-color: rgba(143, 22, 50, 0.3);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(143, 22, 50, 0.08);
}

.training-plan__item--done {
  border-color: rgba(5, 150, 105, 0.22);
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.06);
}

.training-plan__item--active .training-plan__check {
  background: #8f1632;
}

.training-plan__item--done .training-plan__check {
  background: #059669;
}

.training-plan__check {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--c-ink);
  color: #fff;
  display: grid;
  place-items: center;
}

.training-plan__check span {
  font-size: 12px;
  font-weight: 900;
}

.training-plan__machine-tile {
  min-width: 0;
  width: 46px;
  height: 34px;
  padding: 0 4px;
  border-radius: var(--r-sm);
  background: #F2E820;
  color: #121316;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.training-plan__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.training-plan__body strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.15;
}

.training-plan__body small {
  color: var(--c-ink-muted);
  font-size: 11px;
  font-weight: 800;
}

.training-plan__weight {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.training-plan__weight strong {
  font-size: 15px;
  line-height: 1.1;
}

.training-plan__weight small {
  color: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 800;
}

.training-plan__tag {
  grid-column: 3 / -1;
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--c-bg);
  color: var(--c-ink-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.training-plan__tag--steigern {
  background: #ecfdf5;
  color: #047857;
}

.training-plan__tag--halten {
  background: #eff6ff;
  color: #2563eb;
}

.training-plan__tag--done {
  background: #dcfce7;
  color: #047857;
}

.training-sets {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--r-md);
  border: 1px solid rgba(18, 19, 22, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
}

.training-sets__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.training-sets__head span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.training-sets__head strong {
  text-align: right;
  font-size: 14px;
  line-height: 1.1;
}

.training-sets__reset {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(18, 19, 22, 0.06);
  color: var(--c-ink-muted);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.training-sets__list {
  display: grid;
  gap: 7px;
}

.training-set {
  min-height: 44px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, 146px) 20px 30px;
  align-items: center;
  gap: 8px;
}

.training-set span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.training-set strong {
  font-size: 13px;
  line-height: 1.1;
}

.training-set small {
  color: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.training-set__control {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
}

.training-set__step {
  height: 32px;
  border: 1px solid rgba(18, 19, 22, 0.08);
  border-radius: 8px;
  background: #fff;
  color: var(--c-ink);
  font-size: 11px;
  font-weight: 900;
}

.training-set input {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(18, 19, 22, 0.08);
  border-radius: 8px;
  background: #fff;
  color: var(--c-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  padding: 0 4px;
}

.training-set em {
  font-style: normal;
  color: var(--c-ink-muted);
  font-size: 11px;
  font-weight: 900;
}

.training-set__remove {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.training-set__remove:disabled {
  opacity: 0.32;
}

.training-sets__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
  margin-top: 9px;
}

.training-sets__add,
.training-sets__done {
  min-height: 38px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 900;
}

.training-sets__add {
  border: 1px dashed rgba(18, 19, 22, 0.2);
  background: rgba(255, 255, 255, 0.7);
  color: var(--c-ink-muted);
}

.training-sets__done {
  background: #16a34a;
  color: #fff;
}

.training-save,
.training-discard,
.training-history-link {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 900;
}

.training-save {
  background: var(--c-ink);
  color: #fff;
}

.training-save:disabled {
  opacity: 0.58;
}

.training-save--done {
  background: var(--c-success-strong);
}

.training-discard {
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.training-history-link {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--c-border);
  color: var(--c-ink);
}

@media (max-width: 370px) {
  .training-plan__item {
    grid-template-columns: 30px 42px minmax(0, 1fr);
    gap: 7px;
  }

  .training-plan__machine-tile {
    width: 42px;
    font-size: 11px;
  }

  .training-plan__weight {
    grid-column: 3 / -1;
    text-align: left;
  }

  .training-set {
    grid-template-columns: minmax(0, 1fr) minmax(116px, 1fr) 18px 28px;
    gap: 6px;
  }

  .training-set__control {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
  }

  .training-sets__footer {
    grid-template-columns: 1fr;
  }
}

/* Profile */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.profile-hero__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--c-ink);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-hero__name {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-hero__meta {
  display: block;
  font-size: 13px;
  color: var(--c-ink-muted);
  margin-top: 2px;
}

.profile-hero__badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--c-streak-soft);
  color: var(--c-streak);
}

.profile-weight-goal {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(79, 70, 229, 0.14);
  background: rgba(238, 242, 255, 0.72);
  display: grid;
  gap: 12px;
}

.profile-weight-goal__top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.profile-weight-goal__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: #fff;
  color: #4f46e5;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.profile-weight-goal__icon svg {
  width: 20px;
  height: 20px;
}

.profile-weight-goal h3 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 900;
}

.profile-weight-goal p {
  margin: 0;
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-weight-goal__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.profile-weight-goal__form label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-weight-goal__form label span {
  color: var(--c-ink-faint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-weight-goal__form input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(79, 70, 229, 0.16);
  background: #fff;
  color: var(--c-ink);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
}

.profile-weight-goal__form button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: #4f46e5;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.profile-weight-goal > small {
  color: var(--c-ink-muted);
  font-size: 11px;
  font-weight: 700;
}

.profile-install-help {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(18, 19, 22, 0.08);
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  gap: 4px;
}

.profile-install-help strong {
  font-size: 14px;
  font-weight: 900;
}

.profile-install-help span {
  color: var(--c-ink-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 370px) {
  .profile-weight-goal__form {
    grid-template-columns: 1fr;
  }
}

.device-db {
  margin-bottom: 16px;
}

.device-db__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.device-db__title {
  margin-top: 0;
}

.device-db__hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.device-db__gym {
  padding: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
}

.device-db__gym + .device-db__gym {
  margin-top: 10px;
}

.device-db__gym-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.device-db__logo-wrap {
  width: 88px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.device-db__logo-wrap[data-gym-logo="fitnesswerk"] {
  border-radius: 6px;
  background: var(--c-ink);
}

.device-db__logo {
  max-width: 78px;
  max-height: 22px;
  object-fit: contain;
}

.device-db__gym-name {
  font-size: 14px;
  font-weight: 700;
}

.device-db__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-db__row {
  display: grid;
  grid-template-columns: 54px 1fr 76px;
  align-items: end;
  gap: 8px;
}

.device-db__workout {
  height: 36px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--c-ink);
}

.device-db__field {
  min-width: 0;
}

.device-db__label {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--c-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.device-db__input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0 8px;
}

.device-db__input:focus {
  outline: 2px solid var(--c-success-soft);
  border-color: var(--c-success);
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .screen {
    animation: none;
  }
}
