:root {
  color-scheme: dark;
  --ink: #f1f5f2;
  --muted: #98a39d;
  --green: #7de7a3;
  --green-deep: #12271b;
  --green-soft: rgba(125, 231, 163, .12);
  --cream: #080a09;
  --paper: #101311;
  --surface: #171b19;
  --surface-high: #1d221f;
  --line: #2a312d;
  --orange: #ffad68;
  --red: rgba(221, 43, 55, .48);
  --red-dark: #8e2733;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: radial-gradient(circle at 50% -10%, #1a211d 0, #090b0a 48%, #060807 100%);
  font: 14px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.auth-open {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 22px 16px;
  background: radial-gradient(circle at 50% -10%, #233129 0, #0b0e0c 52%, #070908 100%);
}

.auth-panel {
  width: min(390px, 100%);
  padding: 24px 18px 20px;
  border: 1px solid rgba(125, 231, 163, .16);
  border-radius: 26px;
  background: rgba(17, 21, 18, .96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.auth-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 0 14px;
  border-radius: 19px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.auth-panel h1 {
  max-width: 310px;
  margin: 7px 0 8px;
}

.auth-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-options {
  display: grid;
  gap: 8px;
}

.provider-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-weight: 750;
  text-align: left;
}

.provider-button span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.provider-button.active-provider {
  color: #0b130e;
  border-color: var(--green);
  background: var(--green);
  justify-content: center;
}

.auth-divider {
  position: relative;
  height: 20px;
  color: var(--muted);
  text-align: center;
}

.auth-divider::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
  content: '';
}

.auth-divider span {
  position: relative;
  padding: 0 9px;
  background: #111512;
  font-size: 10px;
}

.auth-notice {
  min-height: 0;
  margin: 10px 1px 0;
  color: var(--orange);
  font-size: 10px;
  line-height: 1.45;
}

.auth-notice:empty {
  display: none;
}

.auth-form {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.auth-form label {
  color: #c8d0cb;
  font-size: 11px;
  font-weight: 750;
}

.auth-form .primary {
  margin: 5px 0 0;
}

.auth-form p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(125, 231, 163, .35);
  outline-offset: 2px;
}

.app {
  width: min(430px, 100%);
  max-width: 100%;
  min-height: 100vh;
  margin: auto;
  padding: 28px 16px 82px;
  overflow-x: clip;
  background: linear-gradient(180deg, #111512 0, #0c0f0d 100%);
  box-shadow: 0 0 60px rgba(0, 0, 0, .45);
}

.page {
  display: block;
  min-width: 0;
}

/* Prevent the Home screen from flashing while a saved tab is restored. */
html[data-restoring-page="workout"] #home,
html[data-restoring-page="progress"] #home,
html[data-restoring-page="profile"] #home,
html[data-restoring-page="builder"] #home,
html[data-restoring-page="active"] #home { display: none !important; }

html[data-restoring-page="workout"] #workout,
html[data-restoring-page="progress"] #progress,
html[data-restoring-page="profile"] #profile,
html[data-restoring-page="builder"] #builder,
html[data-restoring-page="active"] #active { display: block !important; }

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.over {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

h1 {
  margin: 5px 0;
  font-size: 28px;
  line-height: 1.12;
}

h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.profile-email {
  margin: 3px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.profile-overview,
.profile-section {
  margin: 18px 0 22px;
}

.profile-account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(125, 231, 163, .22);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(125, 231, 163, .12), rgba(255,255,255,.025));
}

.profile-photo-wrap {
  display: grid;
  justify-items: center;
  gap: 7px;
  flex: 0 0 74px;
}

.profile-photo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid rgba(125, 231, 163, .42);
  border-radius: 18px;
  background: #1d2a21;
}

.profile-photo-button {
  display: inline-grid;
  min-height: 30px;
  align-items: center;
  padding: 0 9px;
  color: var(--green);
  border: 1px solid rgba(125,231,163,.25);
  border-radius: 10px;
  background: rgba(125,231,163,.08);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.profile-photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
}

.profile-photo-actions button {
  min-height: 32px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 850;
}

.profile-photo-confirm {
  color: #07110b;
  border: 1px solid var(--green);
  background: var(--green);
}

.profile-photo-cancel {
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
}

.photo-status {
  max-width: 76px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}

.initials-photo {
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
}

.profile-account-card > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.profile-account-card strong,
.profile-account-card small {
  display: block;
}

.profile-account-card strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-account-card small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-rank-mini {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 50px;
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.profile-rank-mini img {
  width: 39px;
  height: 39px;
  object-fit: contain;
}

.profile-rank-mini span {
  color: var(--muted);
  font-size: 9px;
}

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

.profile-maxes article,
.profile-empty {
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.profile-maxes small,
.profile-maxes strong,
.profile-maxes em {
  display: block;
}

.profile-maxes small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-maxes strong {
  margin: 6px 0 2px;
  color: var(--green);
  font-size: 16px;
}

.profile-maxes em,
.profile-empty {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.home-gym-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255, 173, 104, .24);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 173, 104, .10), rgba(255,255,255,.02));
}

.gym-pin {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 7px solid var(--orange);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.gym-pin::after {
  display: block;
  width: 7px;
  height: 7px;
  margin: 3.5px;
  border-radius: 50%;
  background: #171b18;
  content: '';
}

.gym-pin.muted { border-color: #6a746d; }

.home-gym-card > div:nth-child(2) { min-width: 0; flex: 1; }
.home-gym-card strong, .home-gym-card small { display: block; }
.home-gym-card strong { font-size: 13px; }
.home-gym-card small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.home-gym-card button {
  min-height: 40px;
  padding: 0 11px;
  color: var(--green);
  border: 1px solid rgba(125,231,163,.25);
  border-radius: 11px;
  background: rgba(125,231,163,.08);
  font-size: 11px;
  font-weight: 850;
}

.gym-picker { margin-top: 12px; }
.gym-picker-label, .manual-gym label {
  display: block;
  margin: 14px 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.gym-picker-label span, .manual-gym label span { color: var(--muted); font-size: 10px; font-weight: 700; }
.gym-picker input, .manual-gym input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--surface);
  font-size: 16px;
}
.gym-picker input:focus, .manual-gym input:focus { border-color: var(--green); }
.gym-status { min-height: 18px; margin: 8px 1px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.gym-catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  max-height: 268px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 173, 104, .18);
  border-radius: 13px;
  background: rgba(255, 173, 104, .035);
}

.gym-catalog.hidden,
.gym-confirm.hidden { display: none; }
.gym-choice {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gym-choice:hover, .gym-choice:focus-visible { border-color: rgba(125,231,163,.65); outline: none; }
.gym-choice:active { color: #07110b; border-color: var(--green); background: var(--green); }
.gym-catalog-empty { margin: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.gym-confirm {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(125,231,163,.3);
  border-radius: 13px;
  background: rgba(125,231,163,.06);
}

.gym-confirm p {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.gym-confirm > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gym-confirm button { min-height: 44px; padding: 0 10px; font-size: 11px; }
.manual-gym { margin-top: 14px; padding: 0 12px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.manual-gym summary { min-height: 44px; display: flex; align-items: center; color: var(--green); font-size: 12px; font-weight: 850; cursor: pointer; }
.manual-gym label { margin-top: 8px; }
.manual-gym .secondary-button { width: 100%; min-height: 44px; margin-top: 12px; }

.sync-status {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(125, 231, 163, .18);
  border-radius: 14px;
  background: rgba(125, 231, 163, .07);
}

.sync-status strong {
  display: block;
  font-size: 13px;
}

.sync-status small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.sync-status.local {
  border-color: rgba(255, 173, 104, .25);
  background: rgba(255, 173, 104, .07);
}

.sync-status button {
  min-height: 40px;
  color: #07110b;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  font-weight: 850;
}

.secondary-button {
  width: 100%;
  min-height: 46px;
  color: #ff9c94;
  border: 1px solid rgba(255, 115, 105, .22);
  border-radius: 13px;
  background: rgba(255, 115, 105, .07);
  font-weight: 800;
}

.signout-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.avatar {
  width: 46px;
  height: 46px;
  color: var(--green);
  border: 1px solid rgba(125, 231, 163, .3);
  border-radius: 15px;
  background: var(--green-soft);
  background-position: center;
  background-size: cover;
  font-size: 12px;
  font-weight: 850;
}

.avatar.has-photo {
  color: transparent;
  background-color: #1d2a21;
}

.home-rank-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(125, 231, 163, .18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(125, 231, 163, .11), rgba(125, 231, 163, .025));
}

.home-rank-card img,
.rank-placeholder.home {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
}

.rank-placeholder.home {
  border-radius: 16px;
  font-size: 28px;
}

.home-rank-card > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.home-rank-card h2 {
  margin: 0;
  font-size: 20px;
}

.home-rank-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.home-rank-card button {
  min-height: 38px;
  padding: 0 11px;
  color: var(--green);
  border: 1px solid rgba(125, 231, 163, .25);
  border-radius: 11px;
  background: rgba(125, 231, 163, .08);
  font-size: 11px;
  font-weight: 800;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 20px;
}

.home-stats article {
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.home-stats strong,
.home-stats small {
  display: block;
}

.home-stats strong {
  font-size: 19px;
}

.home-stats small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.home-section {
  margin-top: 2px;
}

.account-program {
  margin: 22px 0;
}

.program-home-summary,
.program-week {
  display: grid;
  gap: 8px;
}

.program-today-card,
.program-next-card,
.program-day {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  text-align: left;
}

.program-today-card {
  min-height: 76px;
  justify-content: space-between;
  padding: 13px;
  border-color: rgba(125, 231, 163, .25);
  background: linear-gradient(135deg, rgba(125, 231, 163, .12), var(--surface));
}

.program-today-card > span:first-child,
.program-next-card > span:first-child,
.program-day-copy {
  min-width: 0;
  flex: 1;
}

.program-today-card small,
.program-today-card b,
.program-today-card em,
.program-next-card small,
.program-next-card b,
.program-day-copy small,
.program-day-copy b,
.program-day-copy em {
  display: block;
}

.program-today-card small,
.program-next-card small,
.program-day-copy small {
  color: var(--orange);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .8px;
}

.program-today-card b {
  margin-top: 2px;
  font-size: 16px;
}

.program-today-card em,
.program-day-copy em {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}

.program-next-card {
  min-height: 50px;
  justify-content: space-between;
  padding: 10px 13px;
  background: rgba(255, 255, 255, .025);
}

.program-next-card b {
  margin-top: 1px;
  font-size: 13px;
}

.program-action,
.rest-label {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .5px;
}

.rest-label {
  color: var(--muted);
}

.library-program {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid rgba(125, 231, 163, .2);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(125, 231, 163, .075), rgba(125, 231, 163, .015));
}

.program-intro {
  margin: -3px 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.program-day {
  min-height: 68px;
  padding: 9px;
}

.program-day.today {
  border-color: rgba(125, 231, 163, .45);
  box-shadow: inset 3px 0 0 var(--green);
}

.program-day.workout-day:hover,
.program-next-card:hover,
.program-today-card.workout-day:hover {
  border-color: rgba(125, 231, 163, .45);
  background: var(--surface-high);
}

.program-day.rest-day {
  border-style: dashed;
  background: rgba(255, 255, 255, .018);
}

.day-badge {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  color: var(--green);
  border: 1px solid rgba(125, 231, 163, .18);
  border-radius: 13px;
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
}

.rest-day .day-badge {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, .025);
}

.program-day-copy b {
  margin-top: 1px;
  font-size: 13px;
}

.today-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 5px;
  color: #0b130e;
  border-radius: 999px;
  background: var(--green);
  font-size: 8px;
  letter-spacing: .3px;
}

.program-instructions {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.program-instructions summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.program-instructions ul {
  margin: -2px 0 12px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.program-instructions li + li {
  margin-top: 5px;
}

.library-heading {
  margin-top: 24px;
}

.compact-heading {
  margin-bottom: 10px;
}

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

.home-plan {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 62px;
  padding: 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  text-align: left;
}

.home-plan:hover {
  border-color: rgba(125, 231, 163, .35);
  background: var(--surface-high);
}

.home-plan-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(125, 231, 163, .16);
  border-radius: 14px;
  background: radial-gradient(circle at 45% 35%, #252c28, #111512 74%);
}

.home-plan-icon img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.home-plan > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.home-plan b,
.home-plan small {
  display: block;
}

.home-plan small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.home-plan i {
  color: var(--green);
  font-size: 18px;
  font-style: normal;
}

.sub,
.anatomy-disclaimer {
  color: var(--muted);
  line-height: 1.55;
}

.card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 10px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.card > div {
  flex: 1;
}

.card b,
.card small {
  display: block;
}

.card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.plan-card {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}

.plan-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(125, 231, 163, .14);
  border-radius: 14px;
  background: radial-gradient(circle at 45% 35%, #252c28, #111512 74%);
}

.plan-icon img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.primary,
.edit,
.back,
.complete {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  font-weight: 750;
}

.primary {
  width: 100%;
  margin: 12px 0;
  padding: 13px;
  color: #0b130e;
  background: var(--green);
  box-shadow: 0 8px 22px rgba(125, 231, 163, .12);
}

.edit {
  min-width: 58px;
  padding: 8px 12px;
  color: var(--orange);
  background: rgba(255, 173, 104, .11);
}

.page > .back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -18px 0 20px -4px;
  padding: 10px 13px;
  color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
}

.page > .back::before {
  content: "\2190";
  font-size: 20px;
  line-height: 12px;
}

.detail {
  margin: 17px 0 22px;
  padding: 17px;
  border: 1px solid rgba(125, 231, 163, .18);
  border-radius: 18px;
  background: var(--green-soft);
}

.plan-guidance {
  margin: -10px 0 22px;
  padding: 13px 14px;
  border-left: 3px solid var(--orange);
  border-radius: 0 13px 13px 0;
  background: rgba(255, 173, 104, .07);
}

.plan-guidance span,
.plan-guidance b {
  display: block;
}

.plan-guidance span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1px;
}

.plan-guidance b {
  margin-top: 2px;
  font-size: 13px;
}

.plan-guidance p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.progress-rank {
  margin-top: 14px;
}

.progress-intro {
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.progress-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.progress-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.progress-metric.highlight {
  border-color: rgba(125, 231, 163, .26);
  background: linear-gradient(135deg, rgba(125, 231, 163, .12), var(--surface));
}

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

.progress-metric span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .7px;
}

.progress-metric strong {
  overflow: hidden;
  margin: 3px 0 1px;
  font-size: 20px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-section {
  margin: 24px 0;
}

.text-button {
  min-height: 38px;
  padding: 0 10px;
  color: var(--green);
  border: 0;
  border-radius: 10px;
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}

.progress-empty {
  padding: 18px 14px;
  color: var(--muted);
  border: 1px dashed #39423d;
  border-radius: 15px;
  background: rgba(255, 255, 255, .015);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.volume-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.volume-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.volume-total span {
  color: var(--muted);
  font-size: 11px;
}

.volume-total b {
  color: var(--green);
  font-size: 13px;
}

.volume-bars {
  display: grid;
  height: 150px;
  grid-template-columns: repeat(var(--bar-count, 6), minmax(0, 1fr));
  gap: 7px;
  align-items: end;
}

.volume-column {
  display: grid;
  height: 100%;
  grid-template-rows: 19px 1fr 21px;
  align-items: end;
  text-align: center;
}

.volume-column > span,
.volume-column small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.volume-column i {
  display: block;
  width: 100%;
  height: var(--bar-height);
  min-height: 4px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--green), #3a8c58);
  box-shadow: 0 0 18px rgba(125, 231, 163, .09);
}

.exercise-records,
.recent-workouts {
  display: grid;
  gap: 8px;
}

.progress-note {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.exercise-record {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.record-top,
.record-stats {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.record-top h3 {
  margin: 0;
  font-size: 14px;
}

.record-top p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.pr-badge {
  flex: 0 0 auto;
  padding: 5px 7px;
  color: #111713;
  border-radius: 8px;
  background: var(--green);
  font-size: 9px;
  letter-spacing: .5px;
}

.record-stats {
  align-items: end;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.record-stats span,
.record-stats strong {
  display: block;
}

.record-stats span {
  color: var(--muted);
  font-size: 10px;
}

.record-stats strong {
  margin-top: 1px;
  font-size: 19px;
}

.record-gain {
  color: var(--green) !important;
  font-weight: 800;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.history-mark {
  width: 7px;
  height: 34px;
  flex: 0 0 7px;
  border-radius: 99px;
  background: var(--green);
}

.history-row > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.history-row b,
.history-row small,
.history-row > strong {
  display: block;
}

.history-row b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row small {
  color: var(--muted);
  font-size: 10px;
}

.history-row > strong {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

.compact-ranks .muscle-rank:nth-child(n+5) {
  display: none;
}

.rank-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid rgba(125, 231, 163, .18);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(125, 231, 163, .10), rgba(125, 231, 163, .025));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.rank-summary img,
.rank-placeholder {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  object-fit: contain;
}

.rank-summary.unranked {
  border-style: dashed;
  background: var(--surface);
}

.rank-placeholder {
  display: grid;
  place-items: center;
  color: #69746e;
  border: 2px dashed #3a443e;
  border-radius: 22px;
  font-size: 37px;
  line-height: 1;
}

.rank-summary h2 {
  margin: 2px 0 4px;
}

.rank-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rank-kicker {
  color: var(--orange);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.4px;
}

.rank-summary.compact {
  margin: 0;
}

.rank-section {
  margin: 22px 0;
}

.rank-heading {
  margin-bottom: 10px;
}

.muscle-rank-list {
  display: grid;
  gap: 9px;
}

.muscle-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 65px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.muscle-rank img,
.rank-placeholder.small {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  object-fit: contain;
}

.rank-placeholder.small {
  border-radius: 13px;
  font-size: 24px;
}

.muscle-rank > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.muscle-rank b,
.muscle-rank small {
  display: block;
}

.muscle-rank small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.muscle-rank-band {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.rank-ladder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rank-tier {
  display: grid;
  min-height: 132px;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.rank-tier img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.rank-tier b {
  margin-top: 2px;
  font-size: 13px;
}

.rank-tier small {
  color: var(--muted);
  font-size: 10px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 11px;
}

.focus-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 17px;
}

.focus-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .2);
}

.focus-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 13px;
  border-bottom: 1px solid var(--line);
}

.target-type {
  color: var(--orange);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.4px;
}

.focus-card h3 {
  margin: 3px 0 1px;
  font-size: 21px;
  line-height: 1.15;
}

.focus-card-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.target-count {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--green);
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 750;
}

.focus-views {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  background: #0e110f;
}

.focus-views.paired {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.anatomy-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 19 / 22;
  border: 1px solid #dedfdc;
  border-radius: 15px;
  background: radial-gradient(circle at 50% 42%, #fff 0, #f1f0ec 72%);
  box-shadow: inset 0 0 30px rgba(71, 72, 66, .05);
}

.anatomy-stage {
  position: absolute;
  aspect-ratio: 2 / 3;
}

.crop-upper .anatomy-stage {
  top: -21.5%;
  left: -52.5%;
  width: 205%;
}

.crop-lower .anatomy-stage {
  top: -91.1%;
  left: -52.5%;
  width: 205%;
}

.crop-calf .anatomy-stage {
  top: -98.8%;
  left: -37.5%;
  width: 175%;
}

.anatomy-stage img {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: .9;
  filter: grayscale(1) contrast(.84) brightness(1.06);
}

.view-label {
  position: absolute;
  z-index: 4;
  top: 9px;
  left: 9px;
  padding: 6px 8px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(31, 48, 38, .84);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .8px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.focus-piece {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background: var(--red);
  filter: drop-shadow(0 0 .35px var(--red-dark));
}

.focus-note {
  margin: 0;
  padding: 13px 16px 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
}

.anatomy-disclaimer {
  margin: 13px 2px 18px;
  padding-left: 11px;
  border-left: 3px solid #d9dfd8;
  font-size: 12px;
}

/* Front: left and right pectoralis major. */
.chest-focus .pec-left {
  inset: 0;
  clip-path: polygon(49.2% 17.4%, 46.2% 16.7%, 42.3% 16.4%, 38.9% 16.9%, 36.5% 18%, 35.1% 20%, 34.8% 22.5%, 35.8% 24.3%, 39.2% 25.6%, 43.7% 26%, 47.1% 25.1%, 49.1% 23.2%);
}

.chest-focus .pec-right {
  inset: 0;
  clip-path: polygon(50.8% 17.4%, 53.8% 16.7%, 57.7% 16.4%, 61.1% 16.9%, 63.5% 18%, 64.9% 20%, 65.2% 22.5%, 64.2% 24.3%, 60.8% 25.6%, 56.3% 26%, 52.9% 25.1%, 50.9% 23.2%);
}

/* Front: anterior and lateral deltoid caps. */
.shoulder-front-focus .deltoid-left {
  inset: 0;
  clip-path: polygon(37.8% 16.2%, 35.9% 15.7%, 33.8% 16%, 32% 16.9%, 30.8% 18.4%, 30.3% 20.2%, 30.6% 22%, 31.5% 23.5%, 32.8% 24.7%, 34% 24.1%, 34.7% 22.6%, 35.4% 20.9%, 36.4% 19.1%, 37.4% 17.6%);
}

.shoulder-front-focus .deltoid-right {
  inset: 0;
  clip-path: polygon(62.2% 16.2%, 64.1% 15.7%, 66.2% 16%, 68% 16.9%, 69.2% 18.4%, 69.7% 20.2%, 69.4% 22%, 68.5% 23.5%, 67.2% 24.7%, 66% 24.1%, 65.3% 22.6%, 64.6% 20.9%, 63.6% 19.1%, 62.6% 17.6%);
}

/* Back: posterior deltoid caps. */
.shoulder-rear-focus .rear-deltoid-left,
.shoulder-rear-focus .rear-deltoid-right,
.back-focus .lat-left,
.back-focus .lat-right,
.triceps-focus .triceps-left,
.triceps-focus .triceps-right,
.glute-focus .glute-left,
.glute-focus .glute-right,
.hamstring-focus .focus-piece,
.calf-focus .focus-piece {
  inset: 0;
}

.shoulder-rear-focus .rear-deltoid-left {
  clip-path: polygon(31.4% 20.8%, 31.7% 19.7%, 32.6% 18.8%, 34.1% 18%, 36.2% 17.4%, 38.2% 17.6%, 39.8% 18.4%, 40.7% 19.4%, 40.8% 20.4%, 40.1% 21.2%, 38.8% 21.9%, 37% 22.6%, 35.1% 22.8%, 33.4% 22.3%, 32.1% 21.7%);
}

.shoulder-rear-focus .rear-deltoid-right {
  clip-path: polygon(31.4% 20.8%, 31.7% 19.7%, 32.6% 18.8%, 34.1% 18%, 36.2% 17.4%, 38.2% 17.6%, 39.8% 18.4%, 40.7% 19.4%, 40.8% 20.4%, 40.1% 21.2%, 38.8% 21.9%, 37% 22.6%, 35.1% 22.8%, 33.4% 22.3%, 32.1% 21.7%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

/* Front: biceps brachii, ending above the elbow. */
.biceps-focus .biceps-left {
  inset: 0;
  clip-path: polygon(33.4% 23.8%, 34.8% 24.2%, 35.6% 25.5%, 35.9% 27.4%, 35.5% 29.4%, 34.6% 31.2%, 33.5% 32.2%, 32.4% 31.5%, 31.5% 30%, 31% 28%, 31.2% 26%, 32% 24.5%);
}

.biceps-focus .biceps-right {
  inset: 0;
  clip-path: polygon(66.6% 23.8%, 65.2% 24.2%, 64.4% 25.5%, 64.1% 27.4%, 64.5% 29.4%, 65.4% 31.2%, 66.5% 32.2%, 67.6% 31.5%, 68.5% 30%, 69% 28%, 68.8% 26%, 68% 24.5%);
}

/* Front: six rectus abdominis sections and two external obliques. */
.core-focus .piece1 {
  inset: 0;
  clip-path: polygon(43.1% 25.3%, 46.2% 24.9%, 49.2% 25.1%, 49.2% 28.2%, 47.8% 29%, 44.1% 28.7%, 42.8% 27.5%);
}

.core-focus .piece2 {
  inset: 0;
  clip-path: polygon(56.9% 25.3%, 53.8% 24.9%, 50.8% 25.1%, 50.8% 28.2%, 52.2% 29%, 55.9% 28.7%, 57.2% 27.5%);
}

.core-focus .piece3 {
  inset: 0;
  clip-path: polygon(43% 29.4%, 46% 29.2%, 49.2% 29.5%, 49.2% 32.6%, 47.9% 33.3%, 44% 32.9%, 42.8% 31.5%);
}

.core-focus .piece4 {
  inset: 0;
  clip-path: polygon(57% 29.4%, 54% 29.2%, 50.8% 29.5%, 50.8% 32.6%, 52.1% 33.3%, 56% 32.9%, 57.2% 31.5%);
}

.core-focus .piece5 {
  inset: 0;
  clip-path: polygon(43.5% 33.7%, 46.5% 33.4%, 49.2% 33.7%, 49.2% 37.1%, 47.6% 37.9%, 44.5% 37.5%, 43.2% 35.8%);
}

.core-focus .piece6 {
  inset: 0;
  clip-path: polygon(56.5% 33.7%, 53.5% 33.4%, 50.8% 33.7%, 50.8% 37.1%, 52.4% 37.9%, 55.5% 37.5%, 56.8% 35.8%);
}

.core-focus .oblique-left {
  inset: 0;
  clip-path: polygon(40% 28.2%, 42.1% 29%, 42.4% 32%, 43% 35.1%, 42.3% 38%, 39.7% 38%, 37.4% 36.7%, 37% 33.5%, 38.2% 30.6%);
}

.core-focus .oblique-right {
  inset: 0;
  clip-path: polygon(60% 28.2%, 57.9% 29%, 57.6% 32%, 57% 35.1%, 57.7% 38%, 60.3% 38%, 62.6% 36.7%, 63% 33.5%, 61.8% 30.6%);
}

/* Front: three separate visible quadriceps regions on each thigh. */
.quad-focus .vl-left {
  inset: 0;
  clip-path: polygon(35.8% 47.9%, 38.9% 48.1%, 39.7% 49.9%, 40.1% 52.5%, 40.1% 55.2%, 39.7% 57.8%, 38.9% 60.2%, 37.9% 61.8%, 36.6% 60.7%, 35.5% 58.4%, 34.8% 55.3%, 34.7% 52.2%, 35% 49.7%);
}

.quad-focus .rf-left {
  inset: 0;
  clip-path: polygon(40.1% 48%, 42.2% 47.5%, 43.6% 48.5%, 44.2% 50.5%, 44.2% 53.4%, 43.8% 56.4%, 43.1% 59.1%, 42.2% 61%, 41.2% 60%, 40.5% 57.7%, 40.4% 54.9%, 40.5% 52.1%, 40.2% 49.6%);
}

.quad-focus .vm-left {
  inset: 0;
  clip-path: polygon(44.7% 53.8%, 45.7% 53.2%, 46.6% 54.1%, 47.3% 55.9%, 47.5% 58%, 47.1% 60.1%, 46.3% 61.8%, 45.2% 62.5%, 44.4% 61.3%, 43.9% 59.2%, 44% 56.7%);
}

.quad-focus .vm-right {
  inset: 0;
  clip-path: polygon(55.3% 53.8%, 54.3% 53.2%, 53.4% 54.1%, 52.7% 55.9%, 52.5% 58%, 52.9% 60.1%, 53.7% 61.8%, 54.8% 62.5%, 55.6% 61.3%, 56.1% 59.2%, 56% 56.7%);
}

.quad-focus .rf-right {
  inset: 0;
  clip-path: polygon(59.9% 48%, 57.8% 47.5%, 56.4% 48.5%, 55.8% 50.5%, 55.8% 53.4%, 56.2% 56.4%, 56.9% 59.1%, 57.8% 61%, 58.8% 60%, 59.5% 57.7%, 59.6% 54.9%, 59.5% 52.1%, 59.8% 49.6%);
}

.quad-focus .vl-right {
  inset: 0;
  clip-path: polygon(64.2% 47.9%, 61.1% 48.1%, 60.3% 49.9%, 59.9% 52.5%, 59.9% 55.2%, 60.3% 57.8%, 61.1% 60.2%, 62.1% 61.8%, 63.4% 60.7%, 64.5% 58.4%, 65.2% 55.3%, 65.3% 52.2%, 65% 49.7%);
}

/* Back: left and right latissimus dorsi. */
.back-focus .lat-left {
  clip-path: polygon(37.4% 25%, 40.2% 24.9%, 43% 25.5%, 45.3% 26.8%, 47% 28.5%, 48.2% 30.2%, 48.1% 32.2%, 47.1% 34.3%, 45.6% 36.1%, 44% 37.3%, 42.3% 36.5%, 40.6% 35.1%, 39.1% 33.1%, 37.8% 30.6%, 36.8% 28.2%, 36.5% 26.4%);
}

.back-focus .lat-right {
  clip-path: polygon(37.4% 25%, 40.2% 24.9%, 43% 25.5%, 45.3% 26.8%, 47% 28.5%, 48.2% 30.2%, 48.1% 32.2%, 47.1% 34.3%, 45.6% 36.1%, 44% 37.3%, 42.3% 36.5%, 40.6% 35.1%, 39.1% 33.1%, 37.8% 30.6%, 36.8% 28.2%, 36.5% 26.4%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

/* Back: left and right triceps brachii. */
.triceps-focus .triceps-left {
  clip-path: polygon(32% 24%, 33.9% 24%, 35.3% 25%, 35.9% 27%, 35.5% 29%, 34.6% 31%, 33.4% 32.5%, 31.9% 32.7%, 30.5% 31.4%, 29.3% 29.4%, 28.9% 27.2%, 29.5% 25.3%, 30.7% 24.3%);
}

.triceps-focus .triceps-right {
  clip-path: polygon(32% 24%, 33.9% 24%, 35.3% 25%, 35.9% 27%, 35.5% 29%, 34.6% 31%, 33.4% 32.5%, 31.9% 32.7%, 30.5% 31.4%, 29.3% 29.4%, 28.9% 27.2%, 29.5% 25.3%, 30.7% 24.3%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

/* Back: gluteus maximus location under the garment. */
.glute-focus .glute-left {
  clip-path: polygon(39% 39.3%, 45.8% 39%, 49% 39.5%, 49.1% 42.1%, 48.7% 44.3%, 46.4% 45.8%, 42.3% 46.7%, 38.6% 46%, 36.8% 44.2%, 36.4% 42%, 37.3% 40.2%);
}

.glute-focus .glute-right {
  clip-path: polygon(39% 39.3%, 45.8% 39%, 49% 39.5%, 49.1% 42.1%, 48.7% 44.3%, 46.4% 45.8%, 42.3% 46.7%, 38.6% 46%, 36.8% 44.2%, 36.4% 42%, 37.3% 40.2%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

/* Back: lateral and medial hamstring regions, kept separate. */
.hamstring-focus .ham-lateral-left {
  clip-path: polygon(36.4% 48.2%, 41.5% 48.3%, 41.8% 51.4%, 41.3% 54.8%, 40.4% 57.7%, 39.3% 60.2%, 38.1% 61.3%, 36.8% 59.5%, 35.8% 56.3%, 35.3% 52.7%, 35.5% 49.8%);
}

.hamstring-focus .ham-medial-left {
  clip-path: polygon(42.1% 48.3%, 48.7% 48.2%, 48.4% 51.5%, 47.4% 54.9%, 46.1% 57.9%, 44.5% 60.6%, 43.2% 62.1%, 42% 60.5%, 41.4% 57.7%, 41.8% 54.8%, 42.2% 51.4%);
}

.hamstring-focus .ham-lateral-right {
  clip-path: polygon(36.4% 48.2%, 41.5% 48.3%, 41.8% 51.4%, 41.3% 54.8%, 40.4% 57.7%, 39.3% 60.2%, 38.1% 61.3%, 36.8% 59.5%, 35.8% 56.3%, 35.3% 52.7%, 35.5% 49.8%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

.hamstring-focus .ham-medial-right {
  clip-path: polygon(42.1% 48.3%, 48.7% 48.2%, 48.4% 51.5%, 47.4% 54.9%, 46.1% 57.9%, 44.5% 60.6%, 43.2% 62.1%, 42% 60.5%, 41.4% 57.7%, 41.8% 54.8%, 42.2% 51.4%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

/* Back: separate lateral and medial gastrocnemius heads. */
.calf-focus .calf-lateral-left {
  clip-path: polygon(36.6% 62.9%, 38.8% 63.2%, 40% 64.5%, 40.1% 67.2%, 39.6% 69.8%, 38.7% 72%, 37.6% 73%, 36.4% 71.8%, 35.2% 69.4%, 34.7% 66.7%, 35.2% 64.6%);
}

.calf-focus .calf-medial-left {
  clip-path: polygon(41.2% 64.3%, 42.9% 62.9%, 44.6% 63.3%, 45.8% 65.1%, 46.2% 67.6%, 45.6% 70.3%, 44.3% 72.8%, 42.7% 74.2%, 41.6% 72.7%, 40.8% 70%, 40.6% 67%);
}

.calf-focus .calf-lateral-right {
  clip-path: polygon(36.6% 62.9%, 38.8% 63.2%, 40% 64.5%, 40.1% 67.2%, 39.6% 69.8%, 38.7% 72%, 37.6% 73%, 36.4% 71.8%, 35.2% 69.4%, 34.7% 66.7%, 35.2% 64.6%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

.calf-focus .calf-medial-right {
  clip-path: polygon(41.2% 64.3%, 42.9% 62.9%, 44.6% 63.3%, 45.8% 65.1%, 46.2% 67.6%, 45.6% 70.3%, 44.3% 72.8%, 42.7% 74.2%, 41.6% 72.7%, 40.8% 70%, 40.6% 67%);
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

.set-row {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

#active {
  padding-bottom: 12px;
}

.set-save-notice {
  margin: 8px 0 13px;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  font-size: 11px;
  line-height: 1.45;
}

.set-save-notice.success {
  color: var(--green);
  border-color: rgba(125, 231, 163, .3);
  background: var(--green-soft);
}

.set-save-notice.error {
  color: #ffaaa3;
  border-color: rgba(255, 115, 105, .28);
  background: rgba(255, 115, 105, .07);
}

.set-row h3 {
  margin: 0;
  font-size: 16px;
}

.exercise-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.exercise-heading h3 {
  min-width: 0;
  flex: 1;
}

.exercise-heading span {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: var(--green);
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 800;
}

.exercise-note {
  margin: -1px 0 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.muscle-label {
  display: inline-flex;
  padding: 4px 7px;
  color: #ffb28e;
  border-radius: 999px;
  background: rgba(221, 79, 62, .17);
  font-size: 11px;
  font-weight: 750;
}

.exercise-targets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.target-prefix {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.assist-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.assist-label b {
  color: #c6cec9;
}

.set-grid {
  display: grid;
  grid-template-columns: 42px 1fr 1fr 72px;
  gap: 7px;
  align-items: center;
}

.set-grid b {
  color: var(--muted);
  font-size: 11px;
}

input {
  width: 100%;
  min-width: 0;
  padding: 10px 8px;
  color: var(--ink);
  border: 1px solid #343d37;
  border-radius: 10px;
  background: #101412;
}

.set-grid input {
  min-height: 44px;
  font-size: 16px;
}

.set-grid input.saved-input {
  color: var(--green);
  border-color: rgba(125, 231, 163, .3);
  background: rgba(125, 231, 163, .06);
}

.complete {
  padding: 9px;
  color: var(--green);
  background: var(--green-soft);
}

.complete.done {
  color: #0b130e;
  background: var(--green);
}

.end-workout-section {
  margin: 26px 0 18px;
  padding: 16px;
  scroll-margin-bottom: 100px;
  border: 1px solid rgba(125, 231, 163, .24);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(125, 231, 163, .09), var(--surface-high));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
}

.end-workout-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.end-workout-heading h2 {
  margin-top: 2px;
}

.end-workout-heading strong {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: var(--green);
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 10px;
}

.end-workout-section progress {
  width: 100%;
  height: 8px;
  margin: 14px 0 8px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #0e120f;
  accent-color: var(--green);
}

.end-workout-section progress::-webkit-progress-bar {
  border-radius: 99px;
  background: #0e120f;
}

.end-workout-section progress::-webkit-progress-value {
  border-radius: 99px;
  background: linear-gradient(90deg, #4fa873, var(--green));
}

.end-workout-section progress::-moz-progress-bar {
  border-radius: 99px;
  background: linear-gradient(90deg, #4fa873, var(--green));
}

.end-workout-section p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.end-workout-section .primary {
  min-height: 50px;
  margin: 14px 0 8px;
}

.primary:disabled {
  cursor: not-allowed;
  opacity: .45;
  box-shadow: none;
}

.discard-workout {
  width: 100%;
  min-height: 44px;
  color: #ff9c94;
  border: 1px solid rgba(255, 115, 105, .2);
  border-radius: 12px;
  background: rgba(255, 115, 105, .055);
  font-weight: 750;
}

.tabs {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  display: flex;
  width: min(430px, 100%);
  justify-content: space-around;
  padding: 12px 10px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(14, 17, 15, .96);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .3);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.tabs button {
  min-width: 64px;
  min-height: 38px;
  color: #7f8a84;
  border: 0;
  background: none;
  font-size: 11px;
}

.tabs .active {
  color: var(--green);
  font-weight: 800;
  border-radius: 12px;
  background: var(--green-soft);
}

@media (max-width: 365px) {
  .app {
    padding-inline: 14px;
  }

  .focus-views.paired {
    grid-template-columns: 1fr;
  }

  .set-grid {
    grid-template-columns: 34px 1fr 1fr 64px;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
