:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --ink: #050505;
  --muted: #6f6f6f;
  --card: #252525;
  --line: #d7d7d7;
  --accent: #ffc400;
  --blue: #0a7cff;
  --green: #42d51d;
  --orange: #ff9f0a;
  --danger: #d94444;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#app {
  min-height: 100vh;
}

.phone {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  background: #f6f6f6;
  position: relative;
  overflow-x: hidden;
  padding: 18px 18px 96px;
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 21px;
  box-shadow: inset 0 -5px 0 rgba(255, 196, 0, 0.18);
}

.brand h1,
.screen-title {
  font-size: 38px;
  line-height: 1.02;
  margin: 0;
  letter-spacing: 0;
  font-weight: 950;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: #ededed;
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon-button svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  stroke-width: 2.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-card,
.panel,
.workout-card,
.day-card {
  border-radius: 24px;
}

.hero-card {
  color: #fff;
  background: radial-gradient(circle at top left, rgba(255, 196, 0, 0.2), transparent 38%), var(--card);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 0 0 8px;
  font-size: 33px;
  line-height: 1.08;
  font-weight: 950;
}

.hero-card p {
  color: #e7e7e7;
  margin: 0;
  line-height: 1.45;
  font-weight: 650;
}

.sync-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 12px;
  border-radius: 14px;
  background: #eaf3ff;
  color: var(--blue);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-status.offline {
  background: #fff1f1;
  color: var(--danger);
}

.sync-status.syncing {
  background: #fff8dc;
  color: #8a6800;
}

.sync-status strong {
  color: inherit;
  font-size: 12px;
}

.panel {
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-top: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #343434;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  border: 2px solid #e5e5e5;
  border-radius: 15px;
  padding: 14px 13px;
  background: #fbfbfb;
  font-weight: 800;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  background: #fff;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.form-error {
  margin: 0;
  border-radius: 15px;
  background: #fff1f1;
  color: var(--danger);
  padding: 12px 14px;
  font-weight: 850;
  line-height: 1.35;
}

.success-note {
  margin: 0;
  border-radius: 15px;
  background: #eeffe9;
  color: #168a00;
  padding: 12px 14px;
  font-weight: 850;
  line-height: 1.35;
}

.admin-reset {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 2px solid #ededed;
  border-radius: 20px;
}

.admin-reset strong,
.admin-reset span {
  display: block;
}

.admin-reset strong {
  font-size: 19px;
  font-weight: 950;
}

.admin-reset span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.segmented.two {
  grid-template-columns: repeat(2, 1fr);
}

.segmented button {
  border: 2px solid #e2e2e2;
  border-radius: 15px;
  background: #fff;
  min-height: 48px;
  padding: 8px;
  font-weight: 900;
}

.segmented button.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.day-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.day-picker button {
  min-height: 70px;
  border: 2px solid #e2e2e2;
  border-radius: 17px;
  background: #fff;
  color: var(--ink);
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 7px 2px;
}

.day-picker button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.day-picker button.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.day-picker strong {
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.day-picker span {
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
}

.primary,
.secondary,
.danger {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 21px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.primary {
  background: var(--ink);
  color: #fff;
}

.secondary {
  background: #fff;
  color: var(--ink);
  border: 2px solid #dedede;
}

.danger {
  background: #fff1f1;
  color: var(--danger);
}

.stack {
  display: grid;
  gap: 12px;
}

.profile-row {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 9px;
  align-items: stretch;
}

.profile-row > button:first-child {
  min-width: 0;
  min-height: 62px;
  border: 2px solid #dedede;
  border-radius: 21px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  text-align: left;
}

.profile-row.active > button:first-child {
  border-color: var(--blue);
  box-shadow: inset 5px 0 0 var(--blue);
}

.profile-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 950;
}

.profile-row span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.delete-profile {
  width: 58px;
  min-height: 62px;
  border: 0;
  border-radius: 20px;
  background: #fff1f1;
  color: var(--danger);
  display: grid;
  place-items: center;
}

.delete-profile svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar::-webkit-scrollbar {
  display: none;
}

.pill {
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 11px 14px;
  background: #e8e8e8;
  color: var(--ink);
  font-weight: 950;
  white-space: nowrap;
}

.pill.active {
  color: #fff;
  background: var(--blue);
}

.pill.training {
  background: var(--accent);
  color: var(--ink);
}

.pill.rest {
  color: #767676;
  background: #e8e8e8;
}

.pill.extra {
  color: #fff;
  background: var(--green);
}

.pill.active.extra {
  color: #fff;
  background: var(--blue);
  box-shadow: inset 0 -5px 0 var(--green);
}

.pill.completed {
  color: #fff;
  background: var(--green);
}

.pill.active.completed {
  color: #fff;
  background: var(--green);
  box-shadow: none;
}

.week-header {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.schedule-summary {
  background: #fff;
  border-radius: 18px;
  padding: 13px 15px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.schedule-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.schedule-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 950;
}

.extra-summary {
  background: #fff;
  border-radius: 18px;
  padding: 13px 15px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.draft-summary {
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 18px;
  padding: 13px 15px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.extra-summary > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.draft-summary > span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.draft-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 950;
}

.draft-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.extra-summary > div {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.extra-session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.draft-summary div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.extra-summary button {
  border: 0;
  border-radius: 15px;
  background: var(--green);
  color: #fff;
  padding: 10px 13px;
  font-weight: 950;
}

.extra-summary .remove-extra {
  width: 44px;
  min-height: 44px;
  padding: 0;
  background: #fff1f1;
  color: var(--danger);
  display: grid;
  place-items: center;
}

.remove-extra svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.draft-summary button {
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  background: var(--blue);
  color: #fff;
  padding: 10px;
  font-weight: 950;
}

.draft-summary button:last-child {
  background: #ededed;
  color: var(--ink);
}

.extra-summary button.active {
  background: var(--blue);
}

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

.metric {
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  min-height: 74px;
  display: grid;
  align-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.metric strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.metric span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.day-card {
  background: var(--card);
  color: #fff;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.day-card.rest {
  min-height: 156px;
  display: grid;
  align-content: center;
}

.day-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.day-top h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 950;
}

.duration {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f0f0f0;
  font-weight: 850;
  white-space: nowrap;
}

.duration svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.rule {
  height: 3px;
  background: rgba(255, 255, 255, 0.55);
  margin: 20px 0;
}

.exercise-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  margin: 13px 0;
}

.order {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 31px;
}

.exercise-row h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.05;
  font-weight: 950;
}

.exercise-row p {
  margin: 5px 0 0;
  color: #f2f2f2;
  font-size: 18px;
  font-weight: 700;
}

.start-button {
  width: 100%;
  min-height: 66px;
  margin-top: 20px;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  font-size: 21px;
  font-weight: 950;
}

.rest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rest-tile {
  background: var(--card);
  color: #fff;
  border-radius: 18px;
  padding: 16px;
  min-height: 106px;
}

.rest-tile span {
  color: #dbdbdb;
  display: block;
  font-weight: 800;
}

.rest-tile strong {
  display: block;
  font-size: 27px;
  margin-top: 8px;
  font-weight: 950;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  width: min(100%, 460px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 9px 18px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 246, 246, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-button {
  height: 58px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #050505;
  display: grid;
  place-items: center;
  position: relative;
}

.nav-button.active {
  background: #e7e7e7;
}

.nav-button.active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #050505;
}

.nav-button svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen-head {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  margin-bottom: 16px;
}

.screen-head .screen-title {
  text-align: center;
  font-size: 34px;
}

.back-button {
  border: 0;
  width: 48px;
  height: 48px;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
}

.back-button svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

.workout-card {
  background: #fff;
  padding: 22px 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
}

.workout-card-top {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  align-items: start;
  text-align: center;
}

.workout-card h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.1;
  font-weight: 950;
}

.kebab {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
}

.kebab span,
.kebab span::before,
.kebab span::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  display: block;
}

.kebab span {
  position: relative;
}

.kebab span::before,
.kebab span::after {
  content: "";
  position: absolute;
  left: 0;
}

.kebab span::before {
  top: -12px;
}

.kebab span::after {
  top: 12px;
}

.prescription {
  text-align: center;
  margin: 8px 0 16px;
  font-size: 22px;
  font-weight: 800;
}

.last {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 15px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sets {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.set-tile {
  width: 96px;
  min-height: 96px;
  border: 0;
  border-radius: 25px;
  color: #fff;
  background: #050505;
  display: grid;
  place-items: center;
  padding: 10px;
}

.set-tile.done {
  background: var(--green);
}

.set-tile.done.below-target {
  background: var(--orange);
}

.set-tile.review {
  cursor: default;
}

.set-tile strong {
  display: block;
  font-size: 19px;
  line-height: 1;
}

.set-tile span {
  display: block;
  font-size: 31px;
  line-height: 1;
  font-weight: 950;
  margin-top: 7px;
}

.rest-timer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin: 10px auto 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.rest-timer svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exercise-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.tiny-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  padding: 8px;
}

.done-bar {
  position: static;
  display: grid;
  gap: 9px;
  margin-top: 18px;
  margin-bottom: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.38);
  display: grid;
  align-items: end;
}

.modal {
  width: min(100%, 460px);
  margin: 0 auto;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  max-height: 88vh;
  overflow: auto;
}

.modal h2 {
  margin: 0 0 16px;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 950;
}

.analysis-modal {
  display: grid;
  gap: 14px;
}

.analysis-modal .small-note {
  margin: -8px 0 0;
}

.analysis-modal option.history-option {
  font-weight: 950;
}

.analysis-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: #f5f5f5;
}

.analysis-summary strong {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
}

.analysis-summary span {
  color: var(--muted);
  font-weight: 800;
}

.progress-chart {
  border: 2px solid #ececec;
  border-radius: 20px;
  padding: 12px;
  background: #fff;
}

.progress-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-axis {
  stroke: #d7d7d7;
  stroke-width: 2;
}

.chart-bar {
  stroke: rgba(18, 132, 236, 0.22);
  stroke-width: 10;
  stroke-linecap: round;
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-line.trend-up {
  stroke: var(--green);
}

.chart-line.trend-down {
  stroke: var(--orange);
}

.chart-dot {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 3;
}

.chart-value {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 950;
}

.chart-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.chart-scale strong {
  color: var(--ink);
  font-weight: 950;
}

.empty-chart {
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.progress-list {
  display: grid;
  gap: 8px;
}

.progress-list article {
  padding: 12px 13px;
  border-radius: 16px;
  background: #f7f7f7;
}

.progress-list strong,
.progress-list span {
  display: block;
}

.progress-list strong {
  font-weight: 950;
}

.progress-list span {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title-row h2 {
  margin: 2px 0 0;
}

.small-button {
  width: auto;
  min-width: 84px;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13px;
}

.history-calendar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.history-day {
  min-height: 96px;
  border: 2px solid #e1e1e1;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  padding: 12px 8px;
  text-align: left;
}

.history-day.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 136, 242, 0.14);
}

.history-day span,
.history-day strong,
.history-day em {
  display: block;
}

.history-day span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.history-day strong {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 950;
}

.history-day em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.history-detail .metrics,
.history-progress .metrics {
  margin-bottom: 12px;
}

.history-exercises,
.progress-list {
  display: grid;
  gap: 10px;
}

.history-exercises article,
.progress-list article {
  border: 2px solid #eeeeee;
  border-radius: 17px;
  padding: 12px 14px;
}

.history-exercises strong,
.history-exercises span,
.progress-list strong,
.progress-list span {
  display: block;
}

.history-exercises strong,
.progress-list strong {
  font-weight: 950;
}

.history-exercises span,
.progress-list span {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
}

.compact-stack {
  margin-top: 14px;
}

.trend-insight {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  border: 2px solid #ececec;
  border-radius: 17px;
  padding: 12px 14px;
  background: #fbfbfb;
}

.trend-insight strong,
.trend-insight span {
  display: block;
}

.trend-insight strong {
  font-weight: 950;
}

.trend-insight span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
}

.training-analytics {
  display: grid;
  gap: 14px;
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.analytics-section {
  display: grid;
  gap: 9px;
}

.analytics-section h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 950;
}

.analytics-split {
  display: grid;
  gap: 12px;
}

.analytics-bars,
.analytics-insights {
  display: grid;
  gap: 8px;
}

.analytics-bars article,
.analytics-insights article {
  border: 2px solid #eeeeee;
  border-radius: 17px;
  padding: 12px 14px;
  background: #fff;
}

.analytics-bars article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 9px;
  align-items: center;
}

.analytics-bars strong,
.analytics-bars span,
.analytics-bars em,
.analytics-insights strong,
.analytics-insights span {
  display: block;
}

.analytics-bars strong,
.analytics-insights strong {
  overflow-wrap: anywhere;
  font-weight: 950;
}

.analytics-bars span,
.analytics-insights span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.analytics-bars em {
  color: var(--ink);
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.analytics-bar-track {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ededed;
}

.analytics-bar-track div {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.compact-empty {
  margin: 0;
  border: 2px solid #eeeeee;
  border-radius: 17px;
  padding: 12px 14px;
  background: #fff;
}

.history-item {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.history-item strong {
  display: block;
  font-size: 20px;
  font-weight: 950;
}

.history-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}

.analysis-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.analysis-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.analysis-card p,
.empty {
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

.variation-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 18px;
}

.variation-item {
  background: #f5f5f5;
  border-radius: 17px;
  padding: 13px 14px;
}

.variation-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.variation-item strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.12;
}

.variation-item p {
  margin: 5px 0 0;
  color: var(--blue);
  font-weight: 900;
}

.small-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

@media (max-width: 380px) {
  .phone {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand h1,
  .screen-title {
    font-size: 32px;
  }

  .day-card {
    padding: 20px 16px;
  }

  .exercise-row {
    grid-template-columns: 56px 1fr;
    gap: 10px;
  }

  .order {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }

  .set-tile {
    width: 88px;
    min-height: 88px;
    border-radius: 22px;
  }

  .set-tile span {
    font-size: 28px;
  }
}
