:root {
  --bg: #080809;
  --panel: rgba(20, 14, 16, 0.94);
  --panel-strong: #1a1012;
  --line: rgba(230, 38, 58, 0.2);
  --line-strong: rgba(240, 49, 69, 0.55);
  --text: #fff3f4;
  --muted: #ab9295;
  --cyan: #f02f43;
  --violet: #b51f32;
  --lime: #ed5361;
  --orange: #ff394d;
  --danger: #ff6876;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
}

/* V-Taper workout guide */
.app-shell {
  width: min(100%, 760px);
  padding-top: 20px;
}
.brand-lockup strong {
  letter-spacing: 0.07em;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
}
.brand-mark {
  transform: none;
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: -0.08em;
}
.bottom-nav {
  height: calc(72px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item span {
  font-size: 17px;
  line-height: 1;
}
.nav-item small {
  font-size: 9px;
}
.page-heading h1 {
  font-size: clamp(30px, 8.2vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.today-card {
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(240, 47, 67, 0.4);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(224, 34, 53, 0.2), transparent 42%),
    linear-gradient(150deg, #271114, #100b0c 76%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}
.today-kicker,
.rotation-card small,
.next-session small {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.today-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 5px;
}
.workout-letter {
  display: grid;
  flex: 0 0 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(240, 47, 67, 0.7);
  border-radius: 16px;
  color: var(--cyan);
  background: rgba(240, 47, 67, 0.13);
  font-size: 36px;
  font-weight: 700;
}
.today-title h2 {
  margin: 0;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.05;
}
.today-title p {
  margin: 5px 0 0;
  color: #b4c9d9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.today-subtitle {
  margin: 16px 0;
  color: #c3d4e0;
  font-size: 14px;
}
.focus-banner {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 184, 107, 0.4);
  border-left: 4px solid var(--orange);
  border-radius: 12px;
  background: rgba(255, 184, 107, 0.09);
}
.focus-banner span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.focus-banner strong {
  color: #fff4e6;
  font-size: clamp(18px, 5vw, 24px);
}
.focus-banner small {
  color: #c2b8aa;
  font-size: 12px;
}
.home-progress,
.progress-summary {
  margin: 17px 0;
}
.home-progress > div:first-child,
.progress-summary > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.home-progress > div:first-child strong,
.progress-summary > div:first-child strong {
  font-size: 14px;
}
.home-progress > div:first-child span,
.progress-summary > div:first-child span {
  color: var(--muted);
}
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transition: width 0.25s ease;
}
.wide-btn {
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.rotation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.rotation-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 13px;
}
.rotation-card strong {
  font-size: 14px;
}
.rotation-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.rest-reminder,
.warmup-strip,
.effort-panel,
.offline-note {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(240, 47, 67, 0.2);
  border-radius: 12px;
  background: rgba(13, 26, 42, 0.74);
}
.rest-reminder strong,
.warmup-strip strong {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.rest-reminder span,
.warmup-strip span {
  color: #b3c3d0;
  font-size: 12px;
  line-height: 1.5;
}
.xp-summary {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border-radius: 12px;
}
.xp-summary > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.xp-summary span {
  color: var(--muted);
}
.recent-panel {
  border-radius: 12px;
}
.recent-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}
.personal-best {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(255, 184, 107, 0.28);
  border-radius: 11px;
  background: rgba(255, 184, 107, 0.07);
}
.personal-best small {
  color: var(--orange);
  font-size: 9px;
  letter-spacing: 0.12em;
}
.personal-best strong {
  font-size: 13px;
}
.panel .history-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: transparent;
  text-align: left;
}
.panel .history-item span {
  display: grid;
  gap: 5px;
}
.panel .history-item strong {
  font-size: 12px;
}
.panel .history-item small {
  color: var(--muted);
  font-size: 10px;
}
.panel .history-item b {
  color: var(--cyan);
  white-space: nowrap;
}
.workout-heading {
  align-items: center;
}
.workout-heading h1 {
  margin: 5px 0;
  font-size: clamp(37px, 11vw, 58px);
}
.workout-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.workout-focus {
  margin-bottom: 12px;
}
.warmup-strip {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
}
.progress-summary {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 26, 42, 0.78);
}
.progress-summary > div:first-child {
  margin-bottom: 10px;
}
.workout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 12px 0;
}
.workout-actions button {
  min-height: 42px;
}
.exercise-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.exercise-card {
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(230, 38, 58, 0.18);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(16, 32, 48, 0.98), rgba(9, 19, 31, 0.98));
  scroll-margin-top: 92px;
}
.exercise-card.exercise-focused {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(240, 47, 67, 0.14), 0 0 28px rgba(240, 47, 67, 0.14);
}
.exercise-card.exercise-done {
  border-color: rgba(240, 47, 67, 0.42);
}
.exercise-top {
  align-items: flex-start;
  margin-bottom: 12px;
}
.exercise-number {
  display: grid;
  flex: 0 0 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(240, 47, 67, 0.1);
  font-size: 13px;
  font-weight: 700;
}
.exercise-title-wrap {
  flex: 1;
  min-width: 0;
}
.exercise-title-wrap h2 {
  margin: 1px 0 5px;
  font-size: clamp(19px, 5.5vw, 23px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.exercise-title-wrap .target {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}
.done-badge {
  padding: 6px 8px;
  border-radius: 20px;
  color: var(--lime);
  background: rgba(240, 47, 67, 0.12);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.exercise-visual {
  overflow: hidden;
  border: 1px solid rgba(240, 47, 67, 0.25);
  border-radius: 13px;
  background: #100b0c;
}
.photo-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: #050506;
}
.exercise-photo {
  display: block;
  width: 100%;
  height: clamp(112px, 37vw, 190px);
  object-fit: cover;
  background: #1b0e10;
}
.exercise-photo[hidden] {
  display: none;
}
.visual-fallback[hidden] {
  display: none;
}
.visual-fallback .movement-art {
  max-height: 210px;
}
.media-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
  border-top: 1px solid rgba(240, 47, 67, 0.2);
}
.media-links a {
  color: #d1bfc1;
  font-size: 10px;
  text-decoration: none;
}
.media-links .video-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(240, 47, 67, 0.5);
  border-radius: 9px;
  color: #fff0f1;
  background: linear-gradient(135deg, #9e1727, #5e101a);
  font-size: 11px;
  font-weight: 700;
}
.movement-art {
  display: block;
  width: 100%;
  height: auto;
}
.art-background {
  fill: #1b0e10;
  stroke: rgba(240, 47, 67, 0.14);
}
.art-skin {
  fill: #bdd1df;
  stroke: #e8f5ff;
  stroke-width: 2;
}
.art-body {
  fill: #382024;
  stroke: #ba7d84;
  stroke-width: 2;
}
.art-limbs {
  fill: none;
  stroke: #b7cbd9;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art-muscle {
  fill: none;
  stroke: var(--orange);
  stroke-width: 4;
  stroke-linecap: round;
}
.art-equipment,
.art-floor {
  fill: none;
  stroke: #b51f32;
  stroke-width: 3;
  stroke-linecap: round;
}
.art-floor {
  stroke: rgba(131, 152, 170, 0.38);
  stroke-width: 1;
}
.art-arrow {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art-label {
  fill: var(--cyan);
  font: 700 10px sans-serif;
  letter-spacing: 1.6px;
}
.visual-caption {
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 9px 6px;
  color: #b7c8d6;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.guide-copy {
  padding: 2px 1px 0;
}
.guide-copy > p {
  margin: 10px 0;
  color: #bdcbd7;
  font-size: 13px;
  line-height: 1.55;
}
.guide-copy > p strong {
  color: var(--text);
}
.beginner-reminder {
  padding: 9px 11px;
  border-radius: 9px;
  color: #d8d0ff !important;
  background: rgba(181, 31, 50, 0.08);
}
.form-note {
  padding: 11px 12px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 9px 9px 0;
  background: rgba(240, 47, 67, 0.06);
}
.form-note > strong {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.11em;
}
.form-note ul {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding-left: 18px;
  color: #c6d4df;
  font-size: 12px;
  line-height: 1.45;
}
.mistake-note {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(255, 113, 138, 0.07);
  color: #e4c4ca !important;
}
.mistake-note strong {
  color: #ff9bac !important;
}
.alternatives {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.alternatives summary {
  min-height: 24px;
  color: var(--cyan);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.alternatives > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 9px;
}
.alternatives button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #d2e7f2;
  background: rgba(240, 47, 67, 0.06);
  cursor: pointer;
  font-size: 11px;
}
.prescription {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(240, 47, 67, 0.07);
}
.prescription strong {
  color: var(--lime);
  font-size: 15px;
}
.prescription span {
  color: var(--muted);
  font-size: 11px;
}
.performance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.performance-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(5, 14, 23, 0.55);
}
.performance-grid small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.performance-grid p {
  margin: 5px 0 0;
  color: #e2edf5;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.set-log {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}
.logged-set {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(240, 47, 67, 0.07);
  font-size: 11px;
}
.logged-set > span:last-child {
  color: var(--lime);
}
.logged-set strong {
  font-size: 11px;
}
.set-controls {
  margin-top: 12px;
}
.input-label {
  font-size: 10px;
}
.number-input {
  border-radius: 9px;
  font-size: 16px;
}
.complete-btn {
  min-height: 54px;
  border-radius: 10px;
  font-size: 13px;
}
.exercise-complete-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 9px;
  color: var(--lime);
  background: rgba(240, 47, 67, 0.08);
  font-size: 12px;
}
.rest-panel {
  position: sticky;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 4;
  border-radius: 14px;
}
.rest-panel p {
  color: var(--muted);
  font-size: 12px;
}
.rest-panel .countdown {
  font-size: 50px;
}
.library-search {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.library-search input {
  min-height: 50px;
}
.library-filters {
  margin-bottom: 14px;
}
.library-filters button {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 9px;
}
.priorities-panel {
  border-radius: 14px;
}
.priority-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.priority-row strong {
  font-size: 13px;
}
.stars {
  color: var(--orange);
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.stars > span {
  color: #667585;
}
.priority-explainer {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
}
.effort-panel {
  border-color: rgba(181, 31, 50, 0.28);
}
.effort-panel strong {
  color: #c2adff;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.effort-panel p,
.offline-note {
  margin-bottom: 0;
  color: #c2ced8;
  font-size: 12px;
  line-height: 1.55;
}
.progress-stats {
  margin-top: 12px;
}
.chart-wrap {
  height: 180px;
}
.settings-rotation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
}
.settings-rotation > div {
  display: grid;
  gap: 7px;
}
.settings-rotation small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.settings-rotation strong {
  font-size: 13px;
}
.completion-card {
  display: grid;
  gap: 10px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}
.summary-line span {
  color: var(--muted);
}
.summary-line strong {
  text-align: right;
}
.next-session {
  display: grid;
  gap: 8px;
  margin-top: 3px;
  padding: 14px;
  border: 1px solid rgba(240, 47, 67, 0.25);
  border-radius: 11px;
  background: rgba(240, 47, 67, 0.06);
}
.next-session strong {
  color: var(--cyan);
  font-size: 14px;
  line-height: 1.4;
}
.completion-message {
  margin: 8px 0;
  color: #bdcbd7;
  font-size: 13px;
}
.modal {
  border-radius: 18px 18px 8px 8px;
}
.modal .primary-btn {
  min-height: 50px;
  border-radius: 10px;
}
body.gym-mode .topbar,
body.gym-mode .bottom-nav {
  opacity: 0.18;
}
body.gym-mode .app-shell {
  padding-top: 12px;
}
@media (min-width: 700px) {
  .app-shell {
    width: min(100%, 760px);
  }
  .exercise-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .today-card {
    padding: 26px;
  }
  .exercise-card {
    padding: 20px;
  }
}

/* Keep the workout-system overrides after the original PS-FORGE component rules. */
.app-shell {
  width: min(100%, 760px);
  padding-top: 20px;
}
.brand-lockup strong {
  transform: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  letter-spacing: 0.07em;
}
.brand-mark {
  transform: none;
  border-radius: 10px;
  font-size: 20px;
}
.bottom-nav {
  height: calc(72px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item span {
  font-size: 17px;
  line-height: 1;
}
.nav-item small {
  font-size: 9px;
}
.page-heading h1 {
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.exercise-list {
  grid-template-columns: minmax(0, 1fr);
}
.exercise-card {
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(230, 38, 58, 0.18);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(16, 32, 48, 0.98), rgba(9, 19, 31, 0.98));
  scroll-margin-top: 92px;
}
.exercise-card.exercise-focused {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(240, 47, 67, 0.12), 0 0 28px rgba(240, 47, 67, 0.1);
}
.number-input {
  border-radius: 9px;
  font-size: 16px;
}
.complete-btn {
  min-height: 54px;
  border-radius: 10px;
  font-size: 13px;
}
.rest-panel {
  position: sticky;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 4;
  border-radius: 14px;
}
.modal {
  border-radius: 18px 18px 8px 8px;
}
@media (min-width: 700px) {
  .app-shell {
    width: min(100%, 760px);
  }
  .exercise-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 370px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }
  .rotation-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 370px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }
  .today-card {
    padding: 16px;
  }
  .rotation-grid {
    grid-template-columns: 1fr;
  }
  .visual-caption {
    font-size: 7px;
  }
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(
      circle at 80% -10%,
      rgba(150, 15, 32, 0.2),
      transparent 34rem
    ),
    linear-gradient(145deg, #080809 20%, #140b0d 100%);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.app-bg span {
  position: fixed;
  width: 2px;
  height: 2px;
  background: var(--cyan);
  opacity: 0.38;
  border-radius: 50%;
  box-shadow: 0 0 10px 2px var(--cyan);
  pointer-events: none;
}
.app-bg span:nth-child(1) {
  top: 18%;
  left: 9%;
}
.app-bg span:nth-child(2) {
  top: 31%;
  right: 13%;
  background: var(--violet);
}
.app-bg span:nth-child(3) {
  bottom: 22%;
  left: 78%;
}
.topbar {
  height: 76px;
  padding: 16px max(20px, calc((100vw - 980px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(7, 16, 27, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-weight: 700;
  transform: skew(-9deg);
  box-shadow:
    inset 0 0 14px rgba(240, 47, 67, 0.16),
    0 0 16px rgba(240, 47, 67, 0.15);
}
.brand-lockup strong {
  font:
    700 23px/1 "Barlow Condensed",
    sans-serif;
  letter-spacing: 0.16em;
}
.eyebrow {
  color: var(--cyan);
  margin: 0 0 4px;
  font-size: 9px;
  letter-spacing: 0.2em;
}
.icon-btn,
.ghost-btn,
.primary-btn,
.danger-btn,
.choice-btn {
  border: 1px solid var(--line-strong);
  background: rgba(14, 32, 50, 0.8);
  min-height: 44px;
  padding: 0 15px;
  cursor: pointer;
}
.icon-btn {
  min-width: 48px;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.primary-btn {
  color: #04111a;
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 700;
  box-shadow: 0 0 22px rgba(240, 47, 67, 0.18);
}
.ghost-btn {
  color: var(--cyan);
}
.danger-btn {
  color: var(--danger);
  border-color: rgba(255, 113, 138, 0.35);
}
.app-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 24px 18px 108px;
}
.page {
  animation: rise 0.28s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.page-heading {
  margin: 6px 0 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.page-heading h1 {
  margin: 4px 0 0;
  font:
    700 clamp(34px, 10vw, 56px)/0.9 "Barlow Condensed",
    sans-serif;
  letter-spacing: 0.01em;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.section-label {
  margin: 28px 0 11px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 700;
}
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
}
.panel::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  height: 1px;
  background: var(--cyan);
}
.hero-panel {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(
    135deg,
    rgba(21, 48, 73, 0.95),
    rgba(13, 27, 45, 0.85)
  );
}
.system-label {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.2em;
}
.level-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.level-line strong {
  font:
    700 58px/0.85 "Barlow Condensed",
    sans-serif;
}
.level-line span {
  color: var(--violet);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.xp-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 9px;
}
.xp-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px var(--cyan);
}
.xp-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stat-card {
  padding: 15px;
  border-left: 2px solid var(--cyan);
  background: rgba(14, 32, 50, 0.65);
}
.stat-card.violet {
  border-left-color: var(--violet);
}
.stat-card.lime {
  border-left-color: var(--lime);
}
.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.stat-card strong {
  display: block;
  margin-top: 8px;
  font:
    700 28px/1 "Barlow Condensed",
    sans-serif;
}
.stat-card em {
  color: var(--lime);
  font-style: normal;
  font-size: 11px;
}
.quest-card {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.quest-card h2 {
  margin: 6px 0 3px;
  font:
    700 25px/1 "Barlow Condensed",
    sans-serif;
}
.quest-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.quest-icon {
  color: var(--orange);
  font-size: 27px;
}
.action-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.action-row button {
  flex: 1;
}
.recent-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.recent-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.recent-row h3 {
  margin: 0 0 4px;
  font-size: 14px;
}
.recent-row p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.accent {
  color: var(--cyan);
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 11px;
}
.bottom-nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(7, 16, 27, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-item span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.nav-item small {
  font-size: 10px;
}
.nav-item.active {
  color: var(--cyan);
}
.nav-item.active span {
  text-shadow: 0 0 12px var(--cyan);
}
.workout-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.workout-head h1 {
  margin-bottom: 8px;
}
.timer-pill {
  white-space: nowrap;
  color: var(--orange);
  border: 1px solid rgba(255, 184, 107, 0.35);
  padding: 8px 10px;
  font:
    700 16px "Barlow Condensed",
    sans-serif;
}
.exercise-list {
  display: grid;
  gap: 12px;
}
.exercise-card {
  padding: 16px;
  background: rgba(13, 26, 42, 0.9);
  border: 1px solid var(--line);
}
.exercise-card.active {
  border-color: var(--line-strong);
  box-shadow: 0 0 24px rgba(240, 47, 67, 0.08);
}
.exercise-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.exercise-top h2 {
  margin: 0;
  font:
    700 25px/1 "Barlow Condensed",
    sans-serif;
  letter-spacing: 0.03em;
}
.exercise-guide {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  margin: 2px 0 15px;
  padding: 10px 12px;
  background: linear-gradient(
    120deg,
    rgba(240, 47, 67, 0.08),
    rgba(181, 31, 50, 0.07)
  );
  border: 1px solid rgba(240, 47, 67, 0.14);
}
.guide-art {
  flex: 0 0 108px;
  height: 102px;
  display: grid;
  place-items: center;
  background: rgba(4, 17, 26, 0.52);
  border: 1px solid rgba(240, 47, 67, 0.18);
}
.guide-art svg {
  width: 100%;
  height: 100%;
}
.guide-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guide-fallback[hidden] {
  display: none;
}
.guide-art g {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}
.guide-art .skin {
  fill: rgba(238, 248, 255, 0.12);
  stroke: var(--text);
  stroke-width: 2.5;
}
.guide-art .muscle {
  fill: rgba(255, 184, 107, 0.9);
  stroke: var(--orange);
  stroke-width: 4;
}
.guide-art .equipment {
  stroke: var(--violet);
}
.guide-art .weight {
  fill: var(--orange);
  stroke: var(--orange);
}
.guide-label {
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.exercise-guide p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.guide-source {
  display: block;
  margin-top: 7px;
  color: var(--violet);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.target {
  color: var(--muted);
  margin: 5px 0 14px;
  font-size: 11px;
}
.previous {
  border-left: 2px solid var(--violet);
  padding-left: 10px;
  margin-bottom: 15px;
}
.previous small {
  display: block;
  color: var(--violet);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.previous p {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 12px;
}
.input-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}
.set-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.number-input {
  width: 100%;
  background: #081624;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px;
  min-height: 46px;
}
.complete-btn {
  width: 100%;
  margin-top: 11px;
  min-height: 48px;
  border: 1px solid var(--cyan);
  background: rgba(240, 47, 67, 0.1);
  color: var(--cyan);
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.07em;
}
.complete-btn.done {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(240, 47, 67, 0.09);
}
.sets-row {
  display: flex;
  gap: 6px;
  margin: 13px 0 0;
}
.set-chip {
  min-width: 30px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.set-chip.done {
  border-color: var(--lime);
  color: var(--lime);
}
.rest-panel {
  margin-top: 12px;
  text-align: center;
  border-color: rgba(181, 31, 50, 0.45);
  background: linear-gradient(
    140deg,
    rgba(56, 44, 101, 0.55),
    rgba(13, 26, 42, 0.9)
  );
}
.countdown {
  font:
    700 57px/0.9 "Barlow Condensed",
    sans-serif;
  color: var(--violet);
  margin: 9px 0 14px;
  text-shadow: 0 0 18px rgba(181, 31, 50, 0.45);
}
.timer-actions {
  display: flex;
  gap: 7px;
  justify-content: center;
  flex-wrap: wrap;
}
.timer-actions button {
  min-height: 39px;
  padding: 0 11px;
}
.next-btn {
  margin-top: 14px;
  width: 100%;
}
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}
.filter-row button {
  white-space: nowrap;
}
.choice-btn.active {
  color: #06111a;
  background: var(--cyan);
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.history-item:last-child {
  border-bottom: 0;
}
.history-item h3 {
  margin: 0 0 5px;
  font:
    600 18px/1 "Barlow Condensed",
    sans-serif;
}
.history-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.history-score {
  text-align: right;
  color: var(--cyan);
  font:
    700 23px/1 "Barlow Condensed",
    sans-serif;
}
.chart-wrap {
  height: 210px;
  padding: 12px 4px 0;
}
.chart-wrap canvas {
  width: 100%;
  height: 100%;
}
.record {
  border-left: 2px solid var(--orange);
  padding: 12px 14px;
  background: rgba(255, 184, 107, 0.06);
  margin-bottom: 9px;
}
.record strong {
  display: block;
  color: var(--orange);
  font:
    700 21px/1 "Barlow Condensed",
    sans-serif;
}
.record span {
  color: var(--muted);
  font-size: 11px;
}
.settings-list {
  display: grid;
  gap: 9px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.setting-row label {
  font-size: 13px;
}
.setting-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.warmup-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.warmup-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 1px solid var(--line);
  background: rgba(4, 17, 26, 0.52);
  cursor: pointer;
}
.warmup-item:has(input:checked) {
  border-color: var(--lime);
  background: rgba(240, 47, 67, 0.08);
}
.warmup-item img {
  width: 58px;
  height: 52px;
  object-fit: cover;
  border: 1px solid rgba(240, 47, 67, 0.2);
}
.warmup-item strong,
.warmup-item small {
  display: block;
}
.warmup-phase {
  margin-bottom: 4px;
  color: var(--cyan) !important;
  font-size: 8px !important;
  letter-spacing: 0.08em;
}
.warmup-item strong {
  color: var(--text);
  font-size: 12px;
}
.warmup-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.toggle {
  width: 43px;
  height: 24px;
  border: 0;
  background: #203449;
  position: relative;
  cursor: pointer;
}
.toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  background: var(--muted);
  transition:
    transform 0.2s,
    background 0.2s;
}
.toggle.on {
  background: rgba(240, 47, 67, 0.25);
}
.toggle.on::after {
  transform: translateX(19px);
  background: var(--cyan);
}
.form-grid {
  display: grid;
  gap: 12px;
}
.form-grid label {
  color: var(--muted);
  font-size: 11px;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: #081624;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(2, 7, 13, 0.8);
  display: grid;
  place-items: end center;
  padding: 18px;
}
.modal {
  width: min(100%, 500px);
  max-height: 90vh;
  overflow: auto;
  background: #0d1b2c;
  border: 1px solid var(--line-strong);
  padding: 20px;
  box-shadow: var(--shadow);
}
.modal h2 {
  margin: 0 0 6px;
  font:
    700 30px/1 "Barlow Condensed",
    sans-serif;
}
.modal p {
  color: var(--muted);
  font-size: 12px;
}
.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 20px);
  background: #c7f4ff;
  color: #06111a;
  padding: 11px 15px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 700px) {
  .app-shell {
    padding-left: 28px;
    padding-right: 28px;
  }
  .grid-2 {
    grid-template-columns: repeat(4, 1fr);
  }
  .exercise-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-panel {
    min-height: 220px;
  }
  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(650px, 100%);
    border: 1px solid var(--line);
    bottom: 14px;
    height: 62px;
    padding-bottom: 0;
  }
  .modal-backdrop {
    place-items: center;
  }
}

.app-shell {
  width: min(100%, 760px);
  padding-top: 20px;
}
.brand-lockup strong {
  transform: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  letter-spacing: 0.07em;
}
.brand-mark {
  transform: none;
  border-radius: 10px;
  font-size: 20px;
}
.bottom-nav {
  height: calc(72px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item span {
  font-size: 17px;
  line-height: 1;
}
.nav-item small {
  font-size: 9px;
}
.page-heading h1 {
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.exercise-list {
  grid-template-columns: minmax(0, 1fr);
}
.exercise-card {
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(230, 38, 58, 0.18);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(16, 32, 48, 0.98), rgba(9, 19, 31, 0.98));
  scroll-margin-top: 92px;
}
.exercise-card.exercise-focused {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(240, 47, 67, 0.12), 0 0 28px rgba(240, 47, 67, 0.1);
}
.number-input {
  border-radius: 9px;
  font-size: 16px;
}
.complete-btn {
  min-height: 54px;
  border-radius: 10px;
  font-size: 13px;
}
.rest-panel {
  position: sticky;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 4;
  border-radius: 14px;
}
.modal {
  border-radius: 18px 18px 8px 8px;
}
@media (min-width: 700px) {
  .app-shell {
    width: min(100%, 760px);
  }
  .exercise-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 370px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }
  .rotation-grid {
    grid-template-columns: 1fr;
  }
}
