/* Ordered cascade: do not sort imports; publish compiles one stylesheet. */
/* GYM TRACKER · V16.1 · Reference Matched / crimson design system
 * Dark surfaces remain neutral; red communicates interaction, not decoration.
 * Editing these semantic tokens updates every primary screen consistently.
 */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  --bg: #08080c;
  --surface: #131217;
  --surface-hover: #232128;
  --surface-2: #0e0d12;
  --panel-elevated: #1a1920;
  --line: #2c2a32;
  --muted: #a6a2ac;
  --text: #fbfafc;
  --red: #fc1c47;
  --red-hot: #ff4c6d;
  --red-dark: #27151c;
  --red-glow: rgba(252, 28, 71, .22);
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
  min-width: 300px;
}
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
}
button, input, select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: .48;
}
button, select, input {
  touch-action: manipulation;
}
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #ff7690;
  outline-offset: 2px;
}
.icon {
  flex: 0 0 auto;
  vertical-align: middle;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: auto;
  padding: calc(13px + env(safe-area-inset-top, 0px)) 16px calc(26px + env(safe-area-inset-bottom, 0px));
}
.screen {
  animation: enter .13s ease-out;
}
@keyframes enter {
  from {
    opacity: .83;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.loading-screen {
  text-align: center;
  padding-top: 35vh;
  letter-spacing: .3em;
  font-weight: 850;
}
.loading-screen span {
  color: var(--red-hot);
}
.bottom-spacer {
  height: 58px;
}
/* Home — matches structural rhythm from reference, with independent styling */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 55px;
  margin-bottom: 7px;
}
.home-header h1 {
  margin: 0;
  font-size: clamp(24px,6.5vw,29px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-brand {
  color: var(--red-hot);
  font-size: 9px;
  letter-spacing: .07em;
  font-weight: 850;
  display: flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
  border-radius: 9px;
  background: #1a161c;
  border: 1px solid #372c35;
  padding: 7px;
}
.wide-action {
  width: 100%;
  border: none;
  min-height: 53px;
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-weight: 500;
  font-size: 15px;
}
.wide-action:hover, .shortcut:hover {
  background: #24232a;
}
.live-dot, .live-label span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fc1c4720;
}
.live-dot {
  margin-left: auto;
}
.section-label-row {
  margin: 27px 0 13px;
}
.section-label-row h2 {
  margin: 0;
  font-weight: 780;
  font-size: 17px;
  letter-spacing: -.01em;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.shortcut {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-height: 58px;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--surface);
  color: #f3f3f5;
  font-size: 14px;
  font-weight: 600;
}
.shortcut .icon {
  color: #eaebf1;
}
.shortcut span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-heading {
  width: 100%;
  border: 0;
  background: transparent;
  color: #a2a3a9;
  font-size: 13px;
  text-align: left;
  margin: 19px 0 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.list-heading[aria-expanded=false] .icon {
  transform: rotate(-90deg);
}
.empty-programs {
  min-height: 128px;
  border: 1px dashed #303136;
  border-radius: 12px;
  color: var(--muted);
  padding: 22px 18px;
  text-align: center;
}
.empty-mark {
  color: var(--red);
  opacity: .83;
}
.empty-programs p {
  color: #eeeff5;
  font-size: 14px;
  font-weight: 700;
  margin: 9px 0 5px;
}
.empty-programs span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
}
.program-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.program-card {
  background: linear-gradient(150deg, #1c1d25, #151419);
  padding: 15px 13px 12px;
  border-radius: 12px;
}
.program-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.program-info {
  min-width: 0;
  flex: 1;
}
.program-info h3 {
  font-size: 15px;
  font-weight: 780;
  margin: 0 0 4px;
}
.program-info p {
  margin: 0;
  color: #9c9da3;
  font-size: 12.5px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.menu-trigger {
  background: transparent;
  color: #edeef4;
  border: 0;
  padding: 2px 4px;
  align-self: flex-start;
}
.program-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 4px;
}
.program-menu button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #303136;
  color: #f2f3f9;
  font-size: 12px;
  border: 0;
  border-radius: 8px;
  padding: 8px;
}
.program-menu button.danger {
  color: #ff7690;
}
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: white;
  border: 0;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  min-height: 43px;
  padding: 10px 16px;
  box-shadow: 0 8px 23px rgba(252, 28, 71, .17);
  transition: background-color 170ms ease, box-shadow 170ms ease, transform 160ms ease;
}
.program-start {
  width: 100%;
  margin-top: 14px;
  min-height: 43px;
}
.full-btn {
  width: 100%;
}
.history-section {
  margin-top: 30px;
}
.history-heading {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: 0;
  font-weight: 750;
  font-size: 16px;
  text-align: left;
  padding: 5px 0 12px;
  color: var(--text);
}
.history-line {
  background: #121116;
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.history-line div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.history-line small {
  color: var(--muted);
}
.history-line span {
  color: #cbccd2;
  white-space: nowrap;
}
/* Top navigation / editor */
.topbar {
  display: grid;
  grid-template-columns: minmax(68px,1fr) minmax(0,2fr) minmax(68px,1fr);
  gap: 6px;
  align-items: center;
  height: 58px;
  margin-bottom: 21px;
}
.topbar-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar-right {
  justify-self: end;
}
.top-back {
  border: 0;
  color: #f9f9fb;
  min-width: 39px;
  min-height: 38px;
  background: #1b1a20;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.top-cancel {
  background: #1b1a20;
  color: #ff7690;
  font-size: 13px;
  padding: 0 12px;
  border-radius: 22px;
}
.top-round {
  border-radius: 50%;
}
.top-save, .top-finish {
  min-height: 37px;
  border: 0;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  border-radius: 20px;
  font-weight: 700;
  padding: 0 13px;
  white-space: nowrap;
}
.top-save:disabled {
  background: #302e35;
  color: #a8a9af;
  opacity: 1;
}
.top-finish {
  background: #382d36;
  color: #ffccd1;
}
.name-input {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #1d1c22;
  border-radius: var(--radius);
  outline: 1px solid transparent;
  outline-offset: 2px;
  background: transparent;
  color: #fff;
  padding: 14px 2px 17px;
  font-size: 17px;
  font-weight: 560;
  transition: border-color var(--motion-fast,180ms) ease,outline-color var(--motion-fast,180ms) ease,box-shadow var(--motion-fast,180ms) ease;
}
.name-input::placeholder {
  color: #919298;
  opacity: 1;
}
.name-input:focus,.name-input:focus-visible {
  border-bottom-color: transparent;
  outline: 1px solid var(--red);
  outline-offset: 2px;
  box-shadow: 0 0 8px var(--red-glow);
}
@media (prefers-reduced-motion: reduce) { .name-input { transition: none; } }
.editor-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 270px;
  color: #95969c;
  text-align: center;
}
.editor-empty-icon {
  color: #b2b3b9;
}
.editor-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}
.editor-add {
  min-height: 44px;
}
.page-hint {
  text-align: center;
  color: #707176;
  font-size: 11px;
  margin-top: 15px;
  line-height: 1.5;
}
.editor-selected {
  margin: 26px 0 14px;
}
.editor-reorder-hint {
  color: #909197;
  font-size: 11px;
  line-height: 1.5;
  margin: 0 0 8px;
}
.editor-reorder-hint > span:first-child { margin-right: 5px; }
.editor-screen .topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  height: 46px;
  margin-bottom: 9px;
}
.editor-screen .topbar-title {
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.editor-screen .top-cancel { font-size: 11px; min-height: 32px; padding: 0 10px; }
.editor-screen .top-save { font-size: 11px; min-height: 32px; padding: 0 12px; }
.editor-screen .editor-selected { margin-top: 20px; }
.editor-group-title {
  color: #c9c8ce;
  font-size: 13px;
  margin: 20px 0 10px;
  overflow-wrap: anywhere;
}
.editor-exercises {
  position: relative;
}
.editor-exercise-card {
  list-style: none;
  border: 1px solid #242229;
  border-radius: 12px;
  background: var(--surface-2);
  margin-bottom: 6px;
  padding: 0 6px;
}
.editor-exercise-card > .selected-row {
  gap: 8px;
  border: 0;
  padding: 8px 0;
  min-height: 64px;
}
.editor-exercise-card .round-exercise-icon { width: 32px; height: 32px; }
.editor-exercise-card .selected-text b { font-size: 12px; }
.editor-exercise-card .selected-text small { font-size: 11px; }
.editor-exercise-card > .selected-row > .reorder-handle { flex-basis: 28px; width: 28px; }
.editor-exercise-card .remove-selected { display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 44px; flex-shrink: 0; }
.editor-screen .selected-heading { margin-bottom: 10px; }
.editor-screen .selected-heading h2 { font-size: 14px; }
.editor-screen .selected-heading small { font-size: 12px; }
.editor-screen .editor-add { min-height: 40px; font-size: 14px; }
.editor-exercise-card .selected-text b {
  overflow-wrap: anywhere;
}
.reorder-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #a3a0aa;
  background: transparent;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.reorder-handle:disabled { opacity: .25; cursor: default; touch-action: pan-y; }
.reorder-handle:focus-visible { outline: 2px solid var(--red-hot); outline-offset: -3px; }
.is-sort-placeholder { opacity: .25; }
.sort-ghost {
  position: fixed;
  z-index: 1500;
  margin: 0;
  pointer-events: none;
  border: 1px solid var(--red-hot);
  box-shadow: 0 12px 32px #0008;
  will-change: transform;
}
.is-sorting, .is-sorting * { cursor: grabbing !important; user-select: none !important; }
.selected-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}
.selected-heading h2 {
  margin: 0;
  font-size: 16px;
}
.selected-heading small {
  color: var(--red-hot);
  font-size: 13px;
}
.selected-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.selected-row {
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #222128;
  padding: 11px 0;
}
.round-exercise-icon, .exercise-avatar, .workout-exercise-avatar {
  color: #ff7690;
  background: #221e24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
}
.round-exercise-icon {
  width: 37px;
  height: 37px;
}
.selected-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.selected-text b {
  font-size: 13px;
  font-weight: 640;
  line-height: 1.35;
}
.selected-text small {
  color: #909197;
  font-size: 12px;
}
.remove-selected, .remove-workout-exercise {
  color: #ff7690;
  background: transparent;
  border: 0;
  padding: 8px;
}
/* Exercise picker; list style from Hevy's interaction, custom graphics */
.exercise-artwork {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d7d5d9;
  padding: 2px;
  object-fit: contain;
}
.editor-exercise-card .exercise-artwork { width: 32px; height: 32px; }
.exercise-artwork.is-placeholder { display: inline-flex; align-items: center; justify-content: center; background: #232228; border-color: #302d35; color: #b8b4c0; }
.exercise-row .exercise-artwork { width: 52px; height: 52px; }
.progress-record-open .exercise-artwork { width: 36px; height: 36px; margin-bottom: 8px; }
.progress-detail-line .exercise-artwork { width: 28px; height: 28px; }
.dropdown-exercise-artwork { width: 28px; height: 28px; }
.progress-detail-line { gap: 8px; }
.progress-detail-line > span:not(.exercise-artwork) { flex: 1; }
.progress-apply-exercise { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.progress-apply-exercise p { min-width: 0; }
.custom-artwork-preview { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); }
.custom-artwork-preview small { font-size: 12px; line-height: 1.5; }
.picker-screen .topbar { grid-template-columns: auto minmax(0,1fr) auto; }
.picker-screen .topbar-title { white-space: normal; line-height: 1.25; font-size: 14px; }
.picker-screen .top-cancel { font-size: 12px; padding: 0 10px; }
.picker-screen .top-save { font-size: 12px; padding: 0 11px; }
.picker-filters { position: relative; z-index: 5; }
.equipment-menu { position: relative; min-width: 0; }
.equipment-menu > summary, .muscle-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  text-align: left;
  list-style: none;
  cursor: pointer;
}
.equipment-menu > summary::-webkit-details-marker { display: none; }
.equipment-menu > summary span, .muscle-filter-trigger span { min-width: 0; overflow-wrap: anywhere; }
.equipment-menu > summary i, .muscle-filter-trigger i { width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); flex: 0 0 auto; margin: -4px 2px 0; }
.equipment-menu[open] > summary { border-color: var(--red); }
.equipment-menu[open] > summary i { transform: rotate(225deg); margin-top: 4px; }
.equipment-menu > summary:focus-visible, .muscle-filter-trigger:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 2px; }
.equipment-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(290px, calc(100vw - 32px));
  max-height: min(460px, 65dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #39353e;
  border-radius: 13px;
  background: #17161c;
  box-shadow: 0 18px 48px #0009;
}
.equipment-options button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 49px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; font-size: 13px; }
.equipment-options button svg { color: var(--muted); flex: 0 0 auto; }
.equipment-options button span { flex: 1; }
.equipment-options button b { color: var(--red); font-weight: 500; }
.equipment-options button[aria-checked="true"] { background: #2b191f; }
.equipment-options button:hover { background: #27232b; }
.filter-sheet-open { overflow: hidden; }
.muscle-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(600px,100%);
  max-width: 100%;
  max-height: min(90dvh,900px);
  margin: 0 auto;
  padding: 0;
  border: 1px solid #35313a;
  border-bottom: 0;
  border-radius: 23px 23px 0 0;
  background: #141318;
  color: var(--text);
  box-shadow: 0 -20px 60px #0006;
  overflow: hidden;
}
.muscle-sheet[open] { display: flex; flex-direction: column; }
.muscle-sheet::backdrop { background: #0009; }
.muscle-sheet-grip { width: 42px; height: 4px; border-radius: 3px; background: #48444e; margin: 9px auto 0; flex: 0 0 auto; }
.muscle-sheet > header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid #28252d; }
.muscle-sheet h2 { margin: 0; font-size: 17px; font-weight: 600; }
.muscle-sheet > header button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #252229; color: var(--muted); font-size: 23px; }
.muscle-sheet-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 18px; }
.muscle-sheet-note { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.muscle-sheet-body h3 { margin: 17px 0 9px; color: var(--muted); font-size: 12px; font-weight: 500; }
.muscle-options-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.muscle-option { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 67px; padding: 8px; border: 1px solid #2e2b33; border-radius: 11px; background: #1b191f; color: var(--text); text-align: left; }
.muscle-option > span:not(.muscle-preview) { min-width: 0; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.muscle-option small { color: var(--muted); margin-left: auto; font-size: 10px; }
.muscle-option.is-selected { border-color: var(--red); background: #2a1a22; }
.muscle-preview { position: relative; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #232228; }
.muscle-preview-model { position: absolute; width: 200%; height: 200%; top: 0; left: 0; background: url('/muscles/anatomy-neutral.webp') 0 0 / 100% 100%; }
.muscle-preview-model::after { content: ''; position: absolute; inset: 0; background: var(--red); mask: var(--muscle-mask) 0 0 / 100% 100% no-repeat; -webkit-mask: var(--muscle-mask) 0 0 / 100% 100% no-repeat; }
.muscle-preview.is-back .muscle-preview-model { left: -100%; }
.muscle-preview.is-legs .muscle-preview-model { top: -100%; }
.muscle-preview.is-symbol { display: flex; align-items: center; justify-content: center; color: var(--red-hot); }
.muscle-sheet > footer { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: 8px; flex: 0 0 auto; padding: 12px 14px max(12px,env(safe-area-inset-bottom)); border-top: 1px solid #302b35; background: #141318; }
.muscle-sheet > footer button { min-width: 0; min-height: 46px; padding: 9px; font-size: 12px; line-height: 1.3; }
.filter-clear { border: 1px solid #39353e; border-radius: 11px; background: #201d25; color: var(--text); }
@media (max-width:359px) {
  .muscle-option { gap: 6px; padding: 6px; }
  .muscle-preview { width: 34px; height: 34px; }
  .muscle-option > span:not(.muscle-preview) { font-size: 11px; }
  .equipment-menu > summary, .muscle-filter-trigger { padding: 9px; font-size: 11px; }
}
.picker-controls {
  margin: 2px 0 23px;
}
.input-search {
  height: 43px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  color: #94959b;
  background: var(--surface);
}
.input-search input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  flex: 1;
  height: 100%;
  color: white;
  font-size: 14px;
}
.input-search input::placeholder {
  color: #919298;
}
.picker-filters {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
  margin-top: 10px;
}
.picker-filters select, .overview-filters select {
  width: 100%;
  min-width: 0;
  height: 39px;
  border: 0;
  border-radius: 9px;
  background: #211f25;
  color: #edeef4;
  font-size: 12px;
  padding: 0 8px;
}
.results-subhead {
  font-size: 12px;
  color: #8c8d93;
  margin: 2px 0 22px;
}
.picker-section-title {
  color: #a6a7ad;
  font-size: 13px;
  font-weight: 650;
  margin: 18px 0 6px;
}
.exercise-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.exercise-row {
  transition: background-color 180ms ease;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid #1e1d24;
  text-align: left;
  background: transparent;
  color: white;
}
.exercise-row.selected .exercise-avatar {
  background: var(--red-dark);
  color: #ffb5bc;
}
.exercise-avatar {
  width: 43px;
  height: 43px;
  color: #d9dae0;
  background: #232228;
}
.exercise-row-copy {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.35;
}
.exercise-row-copy small {
  color: #93949a;
  font-size: 11.5px;
}
.row-check {
  flex-shrink: 0;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #535459;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a8a9af;
}
.exercise-row.selected .row-check {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.no-results {
  padding: 20px 12px;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
/* Browse: prebuilt programs / exploration, NOT exercise picker */
.overview-heading {
  margin: 7px 0 11px;
}
.overview-filters {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin-bottom: 13px;
}
.preset-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preset-card {
  width: 100%;
  display: flex;
  align-items: stretch;
  min-height: 108px;
  padding: 0;
  color: #f2f2f5;
  background: var(--surface);
  border: 1px solid #201f25;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.preset-cover {
  min-width: 103px;
  width: 103px;
  min-height: 100%;
  background: linear-gradient(135deg, #211d23 0%, #151419 80%);
  color: #ff7690;
  padding: 15px 9px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  word-break: normal;
}
.preset-cover strong {
  font-size: 19px;
  line-height: 1.08;
  letter-spacing: -.02em;
  white-space: normal;
}
.preset-cover small {
  color: #f04d6c;
  font-size: 9px;
  letter-spacing: .09em;
}
.preset-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 10px;
  gap: 5px;
}
.preset-copy b {
  font-size: 14px;
  line-height: 1.3;
}
.preset-copy span {
  color: #c2c3c9;
  font-size: 12px;
}
.preset-copy small {
  color: #898a90;
  font-size: 11px;
  margin-top: auto;
}
.preset-arrow {
  font-size: 24px;
  color: #a0a1a7;
  align-self: center;
  padding-right: 11px;
}
.preset-hero {
  display: flex;
  gap: 15px;
  background: #121318;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 26px;
}
.preset-cover.large {
  min-height: 143px;
  min-width: 112px;
}
.preset-hero > div {
  padding: 17px 12px 17px 0;
  min-width: 0;
}
.preset-hero h2 {
  margin: 0 0 8px;
  font-size: 19px;
}
.preset-hero p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #adaeb4;
}
.pill {
  display: inline-flex;
  color: #ffc3c9;
  background: #332831;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 10px;
}
.detail-subheading {
  margin: 0 0 11px;
}
.routine-preview {
  background: var(--surface);
  border-radius: 11px;
  margin-bottom: 9px;
}
.routine-preview h4 {
  font-size: 14px;
}
.routine-preview p {
  color: #adaeb4;
  margin: 0;
  line-height: 1.6;
}
.import-btn {
  margin-top: 17px;
}
/* Workout tracking */
.workout-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0 13px;
}
.workout-title h2 {
  font-size: 22px;
  margin: 0;
  overflow-wrap: anywhere;
}
.live-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  color: #ff7690;
  letter-spacing: .06em;
  white-space: nowrap;
  font-weight: 750;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
}
.stat {
  background: var(--surface);
  padding: 13px 8px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.stat small {
  color: #96979d;
  font-size: 11px;
}
.stat b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.stat b em {
  font-size: 10px;
  font-style: normal;
  color: #909197;
}
.workout-exercise {
  margin: 0 0 25px;
}
.workout-exercise-title {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.workout-exercise-avatar {
  width: 45px;
  height: 45px;
}
.workout-exercise-title > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.workout-exercise-title h3 {
  color: #ff7690;
  font-size: 15px;
  margin: 0 0 5px;
}
.workout-exercise-title p {
  color: #9a9ba1;
  font-size: 11px;
  margin: 0;
}
.sets-head, .set-row {
  display: grid;
  grid-template-columns: 40px repeat(3, minmax(0, 1fr)) 42px;
  align-items: center;
  column-gap: 6px;
}
.sets-head {
  padding: 10px 0;
  color: #818287;
  font-size: 10px;
  text-align: center;
}
.rpe-heading { display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 0; }
.rpe-help { position: relative; text-align: left; }
.rpe-help > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  list-style: none;
  border-radius: 50%;
}
.rpe-help > summary::before { content: ''; position: absolute; width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 50%; }
.rpe-help > summary::-webkit-details-marker { display: none; }
.rpe-help > summary:focus-visible { outline: 2px solid var(--red-hot); outline-offset: -1px; }
.rpe-help-content {
  position: absolute;
  z-index: 20;
  right: -12px;
  bottom: calc(100% + 8px);
  width: 220px;
  max-width: calc(100vw - 40px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: 0 8px 24px #0006;
  font-size: 12px;
  line-height: 1.5;
}
.rpe-help-content strong { display: block; color: var(--text); font-size: 12px; }
.rpe-help-content p { margin: 5px 0 0; }
.set-row {
  padding: 9px 0;
  border-radius: 8px;
  text-align: center;
}
.set-row:nth-of-type(2n/**/+1) {
  background: #111116;
}
.set-type-box {
  display: flex;
  justify-content: center;
}
.set-type {
  max-width: 44px;
  border: none;
  background: transparent;
  color: #f1f2f8;
  font-weight: 760;
  font-size: 14px;
  text-align: center;
}
.set-type.is-warmup {
  color: #efb64a;
}
.set-type.is-failure {
  color: #ff7690;
}
.set-input {
  background: #232229;
  border: 1px solid #2b2a31;
  color: white;
  border-radius: 7px;
  padding: 9px 3px;
  font-size: 15px;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}
.set-check {
  width: 35px;
  height: 35px;
  border: 1px solid #5b5c61;
  background: #211f26;
  color: #999aa0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.set-check.checked {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.add-set-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  background: #232229;
  color: #eeeff5;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  gap: 7px;
}
.workout-empty {
  text-align: center;
  padding: 40px 12px;
  color: #aaabb1;
}
.workout-empty p {
  color: white;
  font-weight: 700;
}
.workout-empty span {
  font-size: 12px;
}
.outline-red-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  min-height: 43px;
  color: #ff7690;
  border: 1px solid #4a3f48;
  font-weight: 700;
  font-size: 14px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom,0px));
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%) translateY(30px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 18px;
  text-align: center;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  border-radius: 12px;
  background: #3a2f38;
  border: 1px solid #534851;
  box-shadow: 0 12px 35px #0008;
  transition: opacity .2s, transform .2s;
  z-index: 100;
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border-radius: 9px;
  border: 1px solid #392e37;
  background: #1b171d;
  color: #ffc3ca;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
}
.ghost-btn:hover {
  background: #221e24;
}
.detail-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.detail-row-head small {
  color: #ff7690;
  font-size: 13px;
}
.detail-subheading {
  margin: 0;
  font-size: 16px;
}
.routine-stack, .routine-exercises, .detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.routine-preview {
  width: 100%;
  text-align: left;
  border: 1px solid #2a2b30;
  background: #121116;
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.routine-preview.interactive:hover {
  background: #1a191f;
}
.routine-preview h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.routine-preview p {
  margin: 0 0 7px;
  color: #b5b6bc;
  font-size: 12px;
  line-height: 1.45;
}
.routine-preview small, .routine-pack {
  color: #ff7690;
  font-size: 12px;
}
.routine-hero {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 22px;
}
.routine-hero > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.routine-hero h2 {
  margin: 2px 0 10px;
  font-size: 22px;
}
.routine-exercise-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #111116;
  border: 1px solid #232228;
  border-radius: 13px;
  padding: 13px 12px;
}
.exercise-order {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #242026;
  color: #ff7690;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}
.routine-exercise-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.routine-exercise-copy b {
  font-size: 14px;
}
.routine-exercise-copy small {
  color: #9d9ea4;
  font-size: 12px;
}
.set-sheet-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1b1a20;
  color: #f5f5f7;
  font-weight: 800;
  font-size: 20px;
  flex: 0 0 auto;
}
.set-sheet-badge.warmup {
  color: #efb64a;
}
.set-sheet-badge.failure {
  color: #ff7690;
}
.set-sheet-badge.drop {
  color: #46b9ff;
}
.set-sheet-badge.delete {
  color: #ff4568;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (min-width: 650px) {
  .app {
    box-shadow: 0 0 0 1px #1a1b20;
  }
  body {
    background: linear-gradient(90deg,#0d0e13,#08080c 30%,#08080c 70%,#0d0e13);
  }
}
@media (max-width: 359px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }
  .header-brand {
    font-size: 8px;
  }
  .shortcut {
    font-size: 12px;
    gap: 6px;
  }
  .topbar-title {
    font-size: 13px;
  }
  .set-row, .sets-head {
    grid-template-columns: 40px repeat(3, minmax(0, 1fr)) 40px;
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
/* Create an exercise directly from the picker, like the reference flow. */
.picker-add-footer {
  position: sticky;
  bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  margin-top: 10px;
  padding: 15px 0 4px;
  z-index: 3;
  background: linear-gradient(0deg, #08080c 80%, transparent);
}
.picker-add-footer .primary-btn:disabled {
  background: #2c2a32;
  color: #9a9ba1;
  opacity: 1;
}
.custom-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 9px;
}
.custom-form label {
  color: #acadb3;
  font-size: 13px;
  margin-top: 10px;
}
.custom-form input, .custom-form select {
  min-height: 48px;
  width: 100%;
  border: 1px solid #38393e;
  border-radius: 10px;
  background: #1a191f;
  color: white;
  padding: 10px 13px;
  font-size: 15px;
}
.custom-form input:focus, .custom-form select:focus {
  outline: 1px solid #fc1c47;
}
.topbar .top-back {
  justify-self: start;
}
.topbar .top-round {
  width: 40px;
}
/* Shared theme tokens above also apply to the original V3 components. */
html {
  background: var(--bg);
}
body {
  background: var(--bg);
}
.app {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(118px + env(safe-area-inset-bottom, 0px));
}
.screen {
  min-width: 0;
}
button {
  -webkit-tap-highlight-color: transparent;
}
button:active:not(:disabled) {
  transform: scale(.985);
}
.home-screen, .today-screen, .progress-screen, .profile-screen {
  padding-bottom: 16px;
}
/* Fixed glass navigation. Four real screens, one highlighted item. */
.bottom-nav {
  position: fixed;
  z-index: 25;
  width: min(448px, calc(100vw - 24px));
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 3px;
  padding: 6px;
  border-radius: 25px;
  background: rgba(19, 18, 23, .96);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 18px 48px #000c, inset 0 1px rgba(255, 255, 255, .055);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.nav-item {
  color: #b0b1b7;
  border: 0;
  border-radius: 20px;
  background: transparent;
  padding: 10px 1px 9px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.nav-item span {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 650;
  white-space: nowrap;
}
.nav-item.active {
  color: var(--red-hot);
  background: #0c0b11;
  box-shadow: 0 4px 14px #0008;
}
.nav-item.active .icon {
  filter: drop-shadow(0 0 8px #fc1c4750);
}
/* Home — actual date, calendar, activity and a clear action. */
.today-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 11px;
  margin: 10px 0 23px;
}
.eyebrow {
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .14em;
  color: #b8b9bf;
}
.eyebrow-red {
  color: #ff4568;
}
.today-header h1 {
  font-size: clamp(23px, 5.75vw, 30px);
  line-height: 1.14;
  font-weight: 830;
  margin: 11px 0 0;
  letter-spacing: -.04em;
}
.streak-bubble {
  height: 41px;
  min-width: 67px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #1b171d;
  color: #ff4568;
  border: 1px solid #3a2f38;
  border-radius: 16px;
  font-weight: 850;
  font-size: 19px;
  flex-shrink: 0;
}
.streak-bubble .icon {
  fill: #fc1c4730;
}
.calendar-number {
  width: 35px;
  height: 35px;
  border: 1px solid #2b2931;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: 720;
  color: #9fa0a6;
}
.today-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 9px;
  margin: 9px 0 17px;
}
.today-stat {
  min-width: 0;
  padding: 14px 11px 13px;
  background: linear-gradient(150deg, #1b1c24 0%, #151419 100%);
  border: 1px solid #2c2d38;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.stat-icon {
  color: #ff4568;
  height: 25px;
}
.today-stat small {
  color: #a4a5ab;
  font-size: 11px;
  margin-top: 8px;
  line-height: 1.15;
}
.today-stat b {
  font-size: clamp(16px,4.1vw,22px);
  font-weight: 850;
  letter-spacing: -.035em;
  margin-top: 8px;
  white-space: normal;
  line-height: 1.06;
  word-break: keep-all;
}
.today-stat em {
  color: #808186;
  font-size: 10px;
  font-style: normal;
  margin-top: 6px;
}
.today-card {
  background: linear-gradient(160deg, #17161c, #14151c);
  border: 1px solid #2b2932;
  border-radius: 22px;
  padding: 17px 14px;
  margin-bottom: 16px;
}
.section-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.section-split h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 780;
  display: flex;
  gap: 8px;
  align-items: center;
}
.section-split h2 .icon {
  color: #fc1c47;
}
.muted-xs {
  font-size: 10px;
  color: #a4a5ab;
  white-space: nowrap;
}
.empty-subtle {
  font-size: 12.5px;
  color: #a9aab0;
  line-height: 1.6;
  margin: 13px 0 2px;
}
.ready-card {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 21px;
  padding: 13px 12px;
  margin: 0 0 24px;
  background: linear-gradient(115deg, #201721 0%, #17171e 55%, #13141b 100%);
  border: 1px solid #3a2f38;
  box-shadow: 0 8px 28px #08080c66;
}
.ready-icon {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  background: linear-gradient(135deg,#fc1c47,#dc204a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px #fc1c4745;
}
.ready-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.ready-tag {
  color: #ff4568;
  letter-spacing: .065em;
  font-size: 9px;
  font-weight: 850;
}
.ready-content b {
  font-size: 14px;
  line-height: 1.12;
  font-weight: 750;
}
.ready-content small {
  font-size: 11px;
  color: #9c9da3;
  line-height: 1.3;
}
.ready-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 100px;
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 12px 12px;
  min-height: 44px;
  box-shadow: 0 8px 20px #fc1c4730;
}
.ready-btn .icon {
  width: 14px;
  height: 14px;
}
.today-summary {
  margin-top: 4px;
}
.today-summary .section-split {
  margin-bottom: 10px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #ff7690;
  font-size: 12px;
  padding: 7px 0 7px 6px;
}
.two-metrics {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.two-metrics > div {
  background: #151419;
  border: 1px solid #211f26;
  padding: 15px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.two-metrics small {
  color: #94959b;
  font-size: 11px;
}
.two-metrics b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
/* General history card — reusable on Today, Workouts and Progress. */
.activity-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #151419;
  padding: 12px 9px 12px 12px;
  border: 1px solid #232228;
  border-radius: 14px;
  margin-top: 8px;
  min-width: 0;
}
.activity-row.compact {
  margin-top: 11px;
  background: #1b1a20;
}
.activity-mark {
  border-radius: 12px;
  color: #ff4568;
  background: #221a22;
  padding: 9px;
  display: flex;
}
.activity-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.activity-copy b {
  font-size: 12.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.activity-copy small {
  color: #93949a;
  font-size: 10px;
  line-height: 1.35;
}
.history-delete {
  border: 0;
  background: transparent;
  color: #f04d6c;
  padding: 8px;
  border-radius: 10px;
}
.history-delete:hover {
  background: #272329;
  color: #ff4568;
}
.history-section {
  margin-top: 26px;
}
.history-section .activity-stack {
  gap: 0;
}
.history-section .activity-row {
  margin-top: 7px;
}
/* Progress and settings */
.tab-heading {
  margin: 14px 0 23px;
}
.tab-heading h1 {
  font-size: 30px;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin: 9px 0 9px;
}
.tab-heading p {
  font-size: 12px;
  color: #96979d;
  margin: 0;
}
.disclaimer-text {
  font-size: 11px;
  color: #9a9ba1;
  line-height: 1.6;
  margin: 12px 0;
}
.local-profile-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 19px;
  background: linear-gradient(115deg, #201720 0%, #16151b 100%);
  border: 1px solid #34303a;
  padding: 15px 12px;
}
.local-avatar {
  display: flex;
  padding: 12px;
  border-radius: 15px;
  color: #ff4568;
  background: #2d292f;
}
.local-profile-banner > div:nth-child(2) {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.local-profile-banner b {
  font-size: 14px;
}
.local-profile-banner small {
  color: #9c9da3;
  font-size: 11px;
}
.local-pill {
  font-size: 8px;
  background: #332f35;
  border-radius: 7px;
  padding: 6px 5px;
  color: #ffb2bd;
  font-weight: 800;
  letter-spacing: .03em;
}
.settings-section {
  margin: 23px 0 0;
}
.settings-section h2 {
  font-size: 16px;
  margin: 0 0 11px;
}
.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(145deg, #1c1d25, #151419);
  border: 1px solid #2c2d37;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 8px;
}
.setting-line > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.setting-line b {
  font-size: 13px;
}
.setting-line small {
  color: #94959b;
  font-size: 11px;
  line-height: 1.4;
}
.toggle-input {
  width: 40px;
  height: 22px;
  accent-color: #fc1c47;
  cursor: pointer;
}
.secondary-wide {
  width: 100%;
  padding: 13px;
  color: #edeef4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #2c2a32;
  border-radius: 13px;
  background: #1b1a20;
  min-height: 43px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 680;
}
.secondary-wide:hover {
  background: #28292e;
}
.account-note {
  margin-top: 25px;
  font-size: 12px;
  color: #9a9ba1;
  line-height: 1.55;
  padding: 15px;
  border: 1px dashed #2b2a31;
  border-radius: 14px;
}
/* Visual consistency in the preexisting workout and program screens. */
.home-header {
  margin-top: 7px;
}
.wide-action, .shortcut, .program-card, .stat {
  background: #17161c;
}
.shortcut {
  min-height: 61px;
  border: 1px solid #232228;
  border-radius: 14px;
}
.primary-btn, .top-save {
  background: var(--red);
}
.primary-btn:hover {
  background: var(--red-hot);
  box-shadow: 0 9px 25px rgba(252, 28, 71, .23);
}
.program-card {
  border: 1px solid #24232a;
  border-radius: 15px;
}
.outline-red-btn {
  background: #1c181e;
  border-color: #493e47;
  color: #ff4568;
}
.set-type-chip {
  background: #222128;
  border-color: #37383d;
  border-radius: 11px;
}
.set-input {
  min-height: 41px;
  background: #201f25;
  border: 1px solid #35323a;
  border-radius: 10px;
}
.set-row {
  padding: 8px 1px;
}
.set-row:nth-of-type(2n/**/+1) {
  background: #111217;
}
@media (max-width: 365px) {
  .today-stats {
    gap: 5px;
  }
  .today-stat {
    padding: 11px 7px;
  }
  .ready-card {
    padding: 11px 8px;
    gap: 7px;
  }
  .ready-icon {
    width: 40px;
    height: 40px;
  }
  .ready-btn {
    padding: 11px 9px;
  }
  .activity-mark {
    display: none;
  }
  .local-pill {
    display: none;
  }
}
@media (min-width: 650px) {
  body {
    background: radial-gradient(ellipse at 50% 10%, #18141a 0%, #08080c 62%);
  }
}
/* V4 — music library and personal rest notification */
.today-stat small {
  min-height: 26px;
  line-height: 1.23;
  overflow-wrap: normal;
}
.sound-settings {
  margin-top: 26px;
}
.sound-title {
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.sound-title > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sound-title b {
  font-size: 15px;
  color: #fff;
}
.sound-title small {
  font-size: 11px;
  color: #9e9fa5;
  line-height: 1.4;
}
.sound-counter {
  flex-shrink: 0;
  border: 1px solid #382d36;
  background: #221e24;
  color: #ff7690;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}
.sound-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.sound-tile {
  display: flex;
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 11px;
  position: relative;
  min-width: 0;
  min-height: 112px;
  color: #f6f5f7;
  background: linear-gradient(145deg, #1d1e26, #151419);
  border: 1px solid #2b2931;
  border-radius: 16px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.sound-tile:hover {
  background: #1d1c22;
}
.sound-tile:active {
  transform: scale(.985);
}
.sound-tile.selected {
  background: linear-gradient(145deg,#262228,#17161c);
  border-color: #ff4568;
  box-shadow: inset 0 0 0 1px #4d424b;
}
.sound-symbol {
  color: #ff7690;
  font-size: 21px;
  line-height: 1;
  width: 34px;
  height: 34px;
  background: #272329;
  border: 1px solid #41363f;
  border-radius: 11px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.sound-tile.selected .sound-symbol {
  background: #fc1c47;
  color: #fff;
  border-color: #ff4568;
}
.sound-tile-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.sound-tile-text b {
  font-size: 13px;
  line-height: 1.2;
}
.sound-tile-text small {
  color: #9c9da3;
  font-size: 10px;
  line-height: 1.3;
}
.sound-tile-status {
  position: absolute;
  right: 12px;
  top: 16px;
  width: 20px;
  height: 20px;
  border: 1px solid #434449;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #afb0b6;
}
.sound-tile.selected .sound-tile-status {
  background: #ff4568;
  border-color: #ff4568;
  color: #fff;
  font-weight: 900;
}
.custom-sound-section {
  margin: 17px 0 15px;
  padding: 15px;
  border: 1px solid #302e36;
  background: #1a191f;
  border-radius: 18px;
}
.custom-sound-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}
.custom-sound-heading > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.custom-sound-heading b {
  font-size: 14px;
}
.custom-sound-heading small {
  font-size: 11px;
  color: #a9aab0;
  line-height: 1.4;
}
.sound-symbol.custom {
  background: #2d292f;
  color: #ff7690;
}
.custom-sound-loaded {
  margin-top: 10px;
  padding: 11px 9px;
  background: #111116;
  border: 1px solid #2b2a31;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-sound-loaded > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.custom-sound-loaded b {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.custom-sound-loaded small {
  font-size: 10px;
  color: #98999f;
}
.custom-play,.custom-remove {
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid #473c45;
  background: #2c282e;
  color: #ff9caf;
  font-size: 16px;
}
.custom-remove {
  border-color: #302e35;
  background: #201f25;
  color: #a7a8ae;
}
.sound-test {
  min-height: 49px;
  margin-top: 12px;
  border-radius: 13px;
  box-shadow: 0 7px 20px #fc1c4726;
}
@media (max-width:360px) {
  .sound-grid {
    gap: 7px;
  }
  .sound-tile {
    padding: 11px 9px;
  }
  .sound-title {
    flex-wrap: wrap;
  }
  .sound-counter {
    font-size: 9px;
  }
  .today-stat small {
    font-size: 10px;
    min-height: 28px;
  }
}
/* V5 — компактное меню типа подхода вместо полноэкранного окна */
.set-popover-overlay {
  position: fixed;
  z-index: 75;
  inset: 0;
  background: rgba(0,0,0,.12);
}
.set-popover {
  position: fixed;
  width: 235px;
  max-height: min(315px, calc(100dvh - 24px));
  overflow-y: auto;
  padding: 8px;
  background: #17161c;
  border: 1px solid #3d323b;
  border-radius: 15px;
  box-shadow: 0 14px 36px rgba(0,0,0,.55);
}
.set-popover-title {
  font-size: 12px;
  font-weight: 750;
  color: #a7a8ae;
  margin: 6px 9px 10px;
}
.set-popover-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 49px;
  border-radius: 10px;
  padding: 6px 8px;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  color: #f4f3f6;
}
.set-popover-option:hover,.set-popover-option.active {
  background: #2e2a30;
}
.set-popover-option.delete {
  margin-top: 6px;
  border-top: 1px solid #414247;
  border-radius: 0 0 10px 10px;
  color: #ff7690;
}
.set-popover .set-sheet-badge {
  width: 33px;
  height: 33px;
  border-radius: 9px;
  font-size: 17px;
}
.set-popover-copy {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}
/* V5 — три программы в обзоре: день недели + план подходов */
.routine-preview.interactive {
  justify-content: flex-start;
  text-decoration: none;
}
.routine-day {
  background: #242026;
  border-radius: 10px;
  color: #ff7690;
  padding: 9px;
  font-weight: 800;
  font-size: 14px;
  flex: 0 0 43px;
  text-align: center;
}
.routine-preview-info {
  flex: 1;
  min-width: 0;
}
.routine-preview-info h4 {
  font-size: 15px;
}
.routine-preview-info p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.routine-exercise-card {
  align-items: flex-start;
}
.routine-exercise-copy {
  min-width: 0;
  flex: 1;
}
.routine-scheme {
  color: #ff9ca6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.preset-note {
  background: #1c181e;
  border: 1px solid #322e34;
  color: #babbc1;
  padding: 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 19px;
}
.preset-days-off {
  color: #a3a4aa;
  font-size: 12px;
  text-align: center;
  padding: 12px 0 19px;
}
/* Экран телефона: никакого горизонтального скролла таблицы */
.sets-head, .set-row {
  grid-template-columns: 40px repeat(3, minmax(0,1fr)) 42px;
  gap: 6px;
}
.sets-head span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.set-type-chip {
  width: 39px;
  min-height: 39px;
}
@media (max-width: 359px) {
  .sets-head,.set-row {
    grid-template-columns: 38px repeat(3, minmax(0,1fr)) 40px;
    gap: 4px;
  }
  .set-type-chip {
    width: 38px;
  }
}
/* V6 — compact sound library, single-card plans with day sections */
.sound-disclosure {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  color: var(--text);
  background: #17161c;
  border: 1px solid #303136;
  border-radius: 16px;
  text-align: left;
}
.sound-disclosure:hover {
  background: #1e1d24;
}
.sound-disclosure-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #242026;
  color: #ff4568;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sound-disclosure-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.sound-disclosure-copy b {
  font-size: 14px;
}
.sound-disclosure-copy small {
  color: #a1a2a8;
  font-size: 12px;
}
.sound-disclosure-arrow {
  color: #ff7690;
  transition: transform .15s ease;
}
.sound-library {
  margin: 10px 0 4px;
  padding: 11px 0 7px;
  border: 1px solid #232229;
  border-radius: 15px;
  background: #111217;
}
.sound-library-hint {
  margin: 0 13px 12px;
  font-size: 12px;
  color: #a5a6ac;
}
.sound-carousel {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  padding: 0 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: #4e434c #111217;
  -webkit-overflow-scrolling: touch;
}
.sound-carousel .sound-tile {
  min-width: 171px;
  width: 171px;
  min-height: 139px;
  flex: 0 0 171px;
  scroll-snap-align: start;
}
.sound-carousel .sound-tile .sound-tile-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.program-day-tag {
  display: inline-block;
  margin: 2px 0 7px;
  background: #231f25;
  color: #ff7690;
  border: 1px solid #41363f;
  border-radius: 8px;
  font-size: 10px;
  padding: 4px 7px;
}
.editor-days-note {
  margin: 12px 0;
  background: #1c181e;
  border: 1px solid #3a2f38;
  color: #c4c5cb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}
.preset-unity-note {
  border: 1px solid #3a2f38;
  background: #1d191f;
  padding: 12px;
  border-radius: 12px;
  color: #f1c7ce;
  font-size: 13px;
  line-height: 1.5;
}
.workout-day-divider {
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid #3b373d;
  margin: 24px 0 12px;
  padding: 15px 2px 3px;
}
.workout-day-divider strong {
  flex-shrink: 0;
  font-size: 13px;
  background: #fc1c47;
  color: white;
  border-radius: 9px;
  padding: 8px 11px;
}
.workout-day-divider span {
  min-width: 0;
  color: #e8e9ef;
  font-size: 14px;
  font-weight: 700;
}
/* V7 — functional, compact additions. Existing V6 styles are retained. */
/* Confirmation dialog replaces the browser's system confirm(). */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(0,0,0,.75);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(7px);
}
.confirm-dialog {
  width: min(100%,365px);
  background: #17161c;
  border: 1px solid #414247;
  border-radius: 24px;
  padding: 23px 20px 18px;
  box-shadow: 0 20px 70px #000b;
  text-align: center;
  animation: dialogEnter .17s ease-out;
}
@keyframes dialogEnter {
  from {
    opacity: .65;
    transform: scale(.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.confirm-symbol {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  background: #262228;
  color: #ff7690;
  border-radius: 15px;
}
.confirm-dialog h2 {
  font-size: 19px;
  line-height: 1.25;
  margin: 0 0 9px;
}
.confirm-dialog p {
  font-size: 13px;
  color: #abacb2;
  line-height: 1.5;
  margin: 0 0 21px;
}
.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.confirm-actions button {
  min-height: 45px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.confirm-cancel-btn {
  background: #2b2a31;
}
.confirm-accept-btn {
  background: #fc1c47;
}
.confirm-accept-btn.danger {
  background: #dc204a;
}
/* Progress record tiles — unlimited user-selected exercises, real logged numbers only. */
.record-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.record-card {
  position: relative;
  min-height: 115px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 15px 13px;
  background: linear-gradient(155deg, #22232d, #17161c);
  border: 1px solid #2c2a32;
  border-radius: 17px;
  overflow: hidden;
}
.record-title {
  font-size: 12px;
  line-height: 1.25;
  color: #c6c7cd;
  padding-right: 18px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.record-card b {
  font-size: 23px;
  line-height: 1.12;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.record-card small {
  font-size: 11px;
  color: #ff7690;
}
.record-remove {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #999aa0;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0;
}
.record-remove:hover {
  color: #ff7690;
  background: #2b272d;
}
.record-add {
  min-height: 115px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  background: #121318;
  color: #f5a0af;
  border: 1px dashed #4b4049;
  border-radius: 17px;
  font-size: 12px;
  font-weight: 650;
  padding: 14px;
}
.record-add svg {
  display: block;
}
.record-add:hover {
  background: #19181e;
}
/* Previous recorded result only when the exercise has a completed historical set. */
.workout-exercise-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.workout-exercise-meta h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.workout-exercise-meta p {
  margin: 0;
  font-size: 11px;
  color: #a5a6ac;
}
.workout-exercise-title {
  gap: 7px;
  align-items: center;
}
.workout-exercise-avatar {
  flex-shrink: 0;
}
.exercise-rest-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 7px;
  border-radius: 9px;
  border: 1px solid #3d393f;
  background: #1a191f;
  color: #ff7690;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
}
.remove-workout-exercise {
  flex-shrink: 0;
}
/* Per-exercise rest preferences */
.exercise-rest-config {
  margin-top: 11px;
  padding: 12px;
  background: #1a191f;
  border: 1px solid #3b373d;
  border-radius: 14px;
}
.rest-config-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
}
.rest-config-top strong {
  font-size: 14px;
  color: #ff7690;
}
.exercise-rest-config input[type=range] {
  width: 100%;
  accent-color: #fc1c47;
  min-width: 0;
}
.rest-config-range {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  color: #7e7f84;
  font-size: 10px;
}
.rest-stepper {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
}
.rest-stepper button {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid #3a363c;
  background: #222128;
  color: #ff7690;
  font-size: 12px;
  font-weight: 700;
}
/* Preset cards and day previews stay consistent with the app's black-red palette. */
.routine-stack {
  gap: 9px;
}
.preset-days-off:empty {
  display: none;
}
.routine-exercises {
  margin-bottom: 20px;
}
@media (max-width:359px) {
  .workout-exercise-title {
    gap: 5px;
  }
  .exercise-rest-chip {
    font-size: 10px;
    padding: 5px;
  }
  .record-card b {
    font-size: 19px;
  }
}
.sound-caveat {
  color: #848587;
  font-size: 11px;
  line-height: 1.45;
  margin: 14px 0 0;
}
/* V8 · Read-only workout history: compact, tappable entries and detailed sets */
.activity-row {
  padding: 4px 7px 4px 5px;
  gap: 2px;
}
.activity-open {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 4px;
  text-align: left;
  border-radius: 11px;
}
.activity-open:hover,.activity-open:focus-visible {
  background: #222128;
}
.activity-open .activity-mark {
  flex: 0 0 auto;
}
.activity-open .activity-copy {
  min-width: 0;
}
.activity-volume {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 650;
  color: #d4d5db;
  white-space: nowrap;
}
.activity-chevron {
  color: #8b8c92;
  display: flex;
  transform: rotate(-90deg);
}
.history-delete {
  flex: 0 0 auto;
  min-width: 37px;
  min-height: 39px;
  display: grid;
  place-items: center;
}
.history-detail-header {
  margin: 7px 0 19px;
}
.history-detail-header h1 {
  font-size: clamp(23px,6vw,29px);
  line-height: 1.18;
  letter-spacing: -.035em;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.history-detail-stats {
  margin-bottom: 26px;
}
.history-detail-section h2 {
  font-size: 17px;
  margin: 0 0 15px;
}
.history-exercise {
  background: #16151a;
  border: 1px solid #28292e;
  border-radius: 17px;
  padding: 15px 12px;
  margin-bottom: 12px;
}
.history-exercise-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}
.history-exercise-title > div {
  min-width: 0;
  flex: 1;
}
.history-exercise-title h3 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.history-exercise-title p {
  margin: 0;
  color: #a0a1a7;
  font-size: 11px;
}
.history-set-count {
  color: #97989e;
  font-size: 11px;
  white-space: nowrap;
}
.history-set-labels,.history-set-row {
  display: grid;
  grid-template-columns: minmax(36px,.65fr) repeat(3,minmax(0,1fr));
  align-items: center;
  text-align: center;
  gap: 8px;
}
.history-set-labels {
  color: #8f9096;
  font-size: 10px;
  letter-spacing: .035em;
  padding: 4px 0 10px;
}
.history-set-row {
  background: #201f25;
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  margin: 5px 0;
}
.history-set-kind {
  color: #e7e8ee;
  font-weight: 850;
  justify-self: center;
  min-width: 32px;
  border-radius: 8px;
  padding: 7px 5px;
  background: #16151a;
}
.history-set-kind.warmup {
  color: #eeb94d;
}
.history-set-kind.failure {
  color: #ff4568;
}
.history-set-kind.drop {
  color: #61bffc;
}
.history-no-sets {
  color: #9a9ba1;
  font-size: 12px;
  margin: 7px 0 2px;
}
.history-old-record {
  color: #b2b3b9;
  border: 1px solid #302e35;
  background: #151419;
  border-radius: 14px;
  padding: 18px;
  font-size: 13px;
  line-height: 1.5;
}
.history-detail-delete {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  color: #ff7690;
  border: 1px solid #433841;
  border-radius: 12px;
  min-height: 44px;
  margin-top: 23px;
  font-weight: 700;
}
.history-detail-delete:hover {
  background: #201c22;
}
@media (max-width:359px) {
  .activity-open {
    gap: 6px;
  }
  .activity-volume {
    font-size: 10px;
  }
  .activity-row {
    gap: 0;
  }
}
.history-set-row.pending {
  opacity: .48;
}
.history-set-kind .set-pending-dot {
  display: block;
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  margin-top: 3px;
}
/* Workout controls and animated rest drawer */
.workout-screen {
  padding-top: 0;
}
.workout-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 82;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 42px auto;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  margin: -12px -16px 14px;
  padding: 12px 16px;
  background: rgba(8, 8, 12, .965);
  border-bottom: 1px solid transparent;
  isolation: isolate;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: border-color .22s ease, box-shadow .22s ease;
}
.workout-header.is-scrolled {
  border-bottom-color: #232229;
  box-shadow: 0 12px 30px #0007;
}
.workout-header-back,.workout-timer-button,.timer-panel-close {
  display: grid;
  place-items: center;
  color: #eaebf1;
  background: #201f25;
  border: 1px solid #302e36;
  border-radius: 50%;
  padding: 0;
}
.workout-header-back {
  width: 36px;
  height: 36px;
}
.workout-timer-button {
  position: relative;
  width: 42px;
  height: 42px;
  transition: background .2s,border-color .2s,color .2s;
}
.workout-timer-button.is-active {
  background: #242026;
  border-color: #4a3f48;
  color: #ff7690;
}
.timer-running-dot {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4568;
  box-shadow: 0 0 0 3px #211d23;
}
.workout-header-finish {
  height: 39px;
  min-width: 83px;
  border: 0;
  border-radius: 999px;
  background: #fc1c47;
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  padding: 0 12px;
  transition: background .2s,transform .15s;
}
.workout-header-finish:hover {
  background: #ff4568;
}
.workout-header-title {
  height: 31px;
  position: relative;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(13px,3.7vw,16px);
  font-weight: 770;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.workout-header-title span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform .26s cubic-bezier(.2,.7,.2,1),opacity .23s ease;
}
.workout-header-title .title-default {
  transform: translateY(0);
  opacity: 1;
}
.workout-header-title .title-elapsed {
  color: #ff4568;
  transform: translateY(13px);
  opacity: 0;
}
.workout-header.is-scrolled .title-default {
  transform: translateY(-13px);
  opacity: 0;
}
.workout-header.is-scrolled .title-elapsed {
  transform: translateY(0);
  opacity: 1;
}
.workout-screen>.workout-title {
  margin: 4px 0 13px;
}
.workout-screen>.workout-title h2 {
  font-size: clamp(17px,5vw,21px);
}
.workout-screen>.stats-grid {
  margin-bottom: 27px;
}
.timer-panel {
  position: fixed;
  z-index: 92;
  left: 50%;
  bottom: 0;
  width: min(100%,480px);
  color: #fff;
  background: #16151b;
  border: 1px solid #37303c;
  border-bottom: 0;
  border-radius: 21px 21px 0 0;
  box-shadow: 0 -15px 50px #000b;
  transform: translate(-50%,calc(100% + 9px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .34s cubic-bezier(.2,.86,.2,1),opacity .25s,visibility 0s linear .34s;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.timer-panel.is-open {
  transform: translate(-50%,0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform .34s cubic-bezier(.2,.86,.2,1),opacity .25s,visibility 0s;
}
.timer-panel-progress {
  height: 3px;
  background: #2b2c31;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}
.timer-panel-progress>div {
  height: 100%;
  background: linear-gradient(90deg,#fc1c47,#ff7690);
  width: 0;
  transition: width .35s linear;
}
.timer-panel-inner {
  padding: 10px 16px 17px;
}
.timer-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a5a6ac;
  font-size: 10px;
  letter-spacing: .11em;
  font-weight: 760;
}
.timer-panel-close {
  width: 28px;
  height: 28px;
  background: #201f25;
  border: 0;
  color: #b3b4ba;
  transform: rotate(90deg);
}
.timer-panel-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: clamp(45px,12vw,64px);
  font-variant-numeric: tabular-nums;
  font-weight: 670;
  line-height: 1.1;
  letter-spacing: -.05em;
}
.timer-panel-time>.icon {
  color: #858687;
  margin-top: 10px;
}
.timer-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.23fr;
  gap: 9px;
}
.timer-panel-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 710;
}
.timer-adjust {
  background: #29272f;
  color: #f0f1f7;
  transition: background .16s,transform .15s;
}
.timer-adjust:active {
  background: #424348;
}
.timer-primary {
  background: #fc1c47;
  color: #fff;
  transition: background .16s,transform .15s;
}
.timer-primary:hover {
  background: #ff4568;
}
.set-check {
  transition: background-color .18s ease,border-color .18s ease,color .18s ease,transform .15s ease;
}
.set-check:active {
  transform: scale(.94);
}
.timer-panel-config {
  margin-top: 13px;
  padding: 13px;
  border-radius: 12px;
  background: #1d1c22;
  border: 1px solid #36373c;
}
.timer-panel-config input[type=range] {
  width: 100%;
  accent-color: #fc1c47;
}
/* Stable scroll height: opening or closing the drawer never alters the page height. */
.workout-screen {
  padding-bottom: 300px;
}
.timer-config-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .3s cubic-bezier(.2,.86,.2,1),opacity .2s ease;
}
.timer-config-reveal.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
}
.timer-config-content {
  min-height: 0;
  overflow: hidden;
}
.timer-panel-time>.icon {
  transition: transform .25s ease;
}
.timer-panel-time[aria-expanded=true]>.icon {
  transform: rotate(180deg);
}
@media (max-width:359px) {
  .workout-header {
    gap: 5px;
    grid-template-columns: 34px minmax(0,1fr) 38px auto;
  }
  .workout-header-back {
    width: 34px;
    height: 34px;
  }
  .workout-timer-button {
    width: 38px;
    height: 38px;
  }
  .workout-header-finish {
    min-width: 76px;
    padding: 0 10px;
    font-size: 11px;
  }
  .timer-panel-actions {
    gap: 6px;
  }
  .timer-panel-actions button {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .workout-header, .workout-header-title span, .timer-panel, .timer-panel-progress>div, .timer-config-reveal, .timer-panel-time>.icon {
    transition: none !important;
  }
}
/* Layering: the rest drawer never covers toasts or set menus. */
body.timer-panel-visible .toast {
  bottom: calc(var(--timer-panel-height,190px) + 12px);
}
.set-popover-overlay {
  z-index: 120;
}
/* Weekly training planner — native-feeling, compact, touch-friendly. */
.schedule-card {
  margin: 0 0 17px;
  padding: 17px 13px 13px;
  border: 1px solid #302b35;
  border-radius: 22px;
  background: linear-gradient(150deg, #1b1b23 0%, #14151c 55%, #101116 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .26), inset 0 1px rgba(255, 255, 255, .025);
}
.schedule-card-heading,.schedule-detail-head,.schedule-detail-footer,.scheduled-workout-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.schedule-card-heading {
  margin-bottom: 17px;
}
.schedule-card-heading .eyebrow {
  color: #ff7690;
  font-size: 9px;
}
.schedule-card-heading h2 {
  margin: 5px 0 0;
  font-size: 19px;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.schedule-settings-btn {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid #404146;
  color: #d8d9df;
  background: #201f25;
  display: grid;
  place-items: center;
}
.schedule-day-strip {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 5px;
  margin-bottom: 13px;
}
.schedule-day {
  min-width: 0;
  height: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 0;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #aaabb1;
  background: #211f26;
  transition: background-color .2s,border-color .2s,color .2s,transform .15s;
}
.schedule-day span {
  font-weight: 750;
  font-size: 11px;
}
.schedule-day.is-today:not(.selected) {
  border-color: #5b5059;
}
.schedule-day.selected {
  background: var(--red);
  border-color: #ff4568;
  color: white;
}
.schedule-day-indicator {
  width: 6px;
  height: 6px;
  border-radius: 20px;
  background: #ff4568;
  display: block;
}
.schedule-day-indicator.rest {
  background: #5c5d62;
}
.schedule-day-indicator.done {
  background: #6cda9d;
}
.schedule-day.selected .schedule-day-indicator {
  background: white;
}
.schedule-plan-detail {
  background: linear-gradient(160deg, #1e1f27, #16151b);
  border: 1px solid #31323d;
  padding: 14px;
  border-radius: 16px;
}
.schedule-detail-head {
  margin-bottom: 13px;
  min-height: 19px;
}
.schedule-detail-head > span:first-child {
  font-size: 11px;
  color: #bfc0c6;
  line-height: 1.4;
}
.schedule-status {
  color: #ff7690;
  font-size: 9px;
  letter-spacing: .045em;
  font-weight: 850;
  white-space: nowrap;
}
.schedule-status.complete {
  color: #8ae6b5;
}
.schedule-status.override {
  color: #ebb58a;
}
.scheduled-workout-stack {
  display: grid;
  gap: 10px;
}
.scheduled-workout {
  background: #232228;
  border: 1px solid #302e35;
  padding: 12px;
  border-radius: 13px;
}
.scheduled-workout-title {
  justify-content: flex-start;
}
.scheduled-workout-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: #ff4568;
  background: #2d292f;
  border-radius: 12px;
  flex-shrink: 0;
}
.scheduled-workout-title>div {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}
.scheduled-workout-title b {
  font-size: 13px;
  line-height: 1.27;
  overflow-wrap: anywhere;
}
.scheduled-workout-title small {
  font-size: 10px;
  color: #a9aab0;
}
.scheduled-complete {
  color: #78dca5;
}
.scheduled-start {
  margin-top: 12px;
  height: 41px;
  border: 0;
  width: 100%;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 780;
  background: var(--red);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  transition: background-color .17s,transform .17s;
}
.scheduled-start:hover {
  background: #ff4568;
}
.scheduled-done-label {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 760;
  color: #86d4a8;
}
.schedule-rest-state {
  min-height: 85px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.schedule-rest-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #2e2a30;
  color: #ff7690;
  display: grid;
  place-items: center;
}
.schedule-rest-state b {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}
.schedule-rest-state small {
  color: #a4a5ab;
  font-size: 11px;
  line-height: 1.4;
}
.schedule-detail-footer {
  justify-content: flex-end;
  gap: 7px;
  margin-top: 14px;
}
.schedule-create {
  width: 100%;
  background: var(--red);
  color: white;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 750;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.schedule-date-edit {
  background: transparent;
  border: 0;
  color: #db9ba7;
  min-height: 31px;
  font-weight: 680;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.schedule-date-reset {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #2a2b30;
  color: #f1b8c2;
  border: 1px solid #3b3c41;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.schedule-editor-header,.schedule-assign-intro {
  margin: 19px 1px 20px;
}
.schedule-editor-header h1,.schedule-assign-intro h1 {
  font-size: 26px;
  letter-spacing: -.045em;
  line-height: 1.15;
  margin: 8px 0 8px;
}
.schedule-editor-header p,.schedule-assign-intro p {
  color: #a6a7ad;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0;
}
.schedule-week-list,.schedule-assign-list {
  display: grid;
  gap: 9px;
}
.schedule-week-row {
  min-height: 75px;
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: 12px;
  border: 1px solid #2b2931;
  background: #1a1b20;
  border-radius: 13px;
  padding: 13px;
  color: #eaebf1;
}
.schedule-week-short {
  flex: 0 0 35px;
  font-size: 13px;
  font-weight: 820;
  color: #b1b2b8;
}
.schedule-week-short.current {
  color: #ff4568;
}
.schedule-week-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 5px;
}
.schedule-week-info b {
  font-size: 13px;
}
.schedule-week-info small {
  color: #a2a3a9;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-week-row>.icon {
  color: #8c8d93;
  transform: rotate(-90deg);
}
.schedule-autofill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #1e1d24;
  border: 1px solid #36373c;
  border-radius: 12px;
  color: #e6b1bd;
  font-size: 12px;
  font-weight: 680;
  min-height: 46px;
  width: 100%;
  padding: 8px 10px;
  margin: 16px 0 11px;
}
.schedule-editor-done {
  margin-top: 16px;
}
.schedule-assign-program {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 12px;
  border-radius: 13px;
  background: #19181e;
  border: 1px solid #2b2a31;
  color: #f2f3f9;
  min-height: 62px;
}
.schedule-assign-program.is-picked {
  background: #1b1a20;
  border-color: #dc204a;
}
.schedule-pick-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ff7690;
  background: #2b272d;
}
.schedule-pick-title {
  min-width: 0;
  flex: 1;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 680;
}
.schedule-pick-check {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #24232a;
  display: grid;
  place-items: center;
  color: #a7a8ae;
  flex-shrink: 0;
}
.schedule-assign-program.is-picked .schedule-pick-check {
  background: var(--red);
  color: white;
}
.schedule-assign-footer {
  margin-top: 18px;
  padding-bottom: 35px;
  display: grid;
  gap: 9px;
}
.schedule-clear {
  min-height: 42px;
  border: 1px solid #302e35;
  background: #1d1c22;
  color: #dddee4;
  font-weight: 680;
  font-size: 12px;
  border-radius: 11px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.schedule-restore {
  border: 0;
  background: transparent;
  padding: 12px;
  color: #e2a4b2;
  font-size: 12px;
}
.schedule-editor-empty {
  padding: 22px 13px;
  border-radius: 12px;
  background: #19181e;
  color: #aaabb1;
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width:359px) {
  .schedule-card {
    padding: 13px 9px 10px;
  }
  .schedule-day-strip {
    gap: 3px;
  }
  .schedule-day {
    height: 58px;
  }
  .schedule-plan-detail {
    padding: 11px;
  }
  .schedule-status {
    font-size: 8px;
  }
  .schedule-detail-head>span:first-child {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .schedule-day,.scheduled-start {
    transition: none;
  }
}
/* ─────────────────────────────────────────────────────
   V12 · MOTION SYSTEM
   Fast, restrained transitions; animate opacity and transform rather than
   constantly rebuilding the DOM. Reduced-motion follows the user's OS.
   ───────────────────────────────────────────────────── */
:root {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-standard: 260ms;
  --motion-quick: 170ms;
}
/* Whole-screen transitions are handled by the browser when supported.
   The bottom navigation is a separately named, stable surface. */
.screen {
  animation: none;
  view-transition-name: gt-screen;
}
.bottom-nav {
  view-transition-name: gt-navigation;
}
::view-transition-old(gt-screen) {
  animation: gt-screen-out 165ms cubic-bezier(.3,0,.7,1) both;
}
::view-transition-new(gt-screen) {
  animation: gt-screen-in 285ms var(--motion-ease) both;
}
::view-transition-old(gt-navigation),::view-transition-new(gt-navigation) {
  animation: none;
}
@keyframes gt-screen-out {
  to {
    opacity: 0;
    transform: translate3d(var(--gt-out,-12px),0,0) scale(.992);
  }
}
@keyframes gt-screen-in {
  from {
    opacity: 0;
    transform: translate3d(var(--gt-in,18px),5px,0) scale(.988);
  }
  to {
    opacity: 1;
    transform: translate3d(0,0,0) scale(1);
  }
}
html[data-motion-direction="back"] {
  --gt-in: -18px;
  --gt-out: 12px;
}
html[data-motion-direction="forward"] {
  --gt-in: 18px;
  --gt-out: -12px;
}
@supports not (view-transition-name:gt-screen) {
  .screen {
    animation: gt-screen-in 240ms var(--motion-ease) both;
  }
}
/* Persisted 4-tab bar, with one sliding selection indicator. */
.bottom-nav {
  isolation: isolate;
}
.bottom-nav::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: calc((100% - 21px) / 4);
  background: #0c0b11;
  border-radius: 20px;
  box-shadow: 0 4px 14px #0008, inset 0 1px 0 #ffffff0a;
  transform: translate3d(calc(var(--active-index,0) * (100% + 3px)),0,0);
  transition: transform 350ms var(--motion-ease);
  will-change: transform;
}
.nav-item {
  position: relative;
  z-index: 1;
  transition: color 220ms ease;
}
.nav-item.active {
  background: transparent;
  box-shadow: none;
}
.nav-item .icon {
  transition: color 220ms ease,transform 270ms var(--motion-ease);
}
.nav-item.active .icon {
  transform: translateY(-1px);
}
/* Navigation colors follow the pill's actual fractional position.
   Do not independently animate the label or icon after the selection changes. */
.bottom-nav::before {
  transition: none;
}
.bottom-nav .nav-item {
  transition: none;
}
.bottom-nav .nav-item .icon {
  transform: translateY(calc(-1px * var(--nav-weight, 0)));
  filter: drop-shadow(0 0 8px rgba(252, 28, 71, var(--nav-glow, 0)));
  transition: none;
}
.bottom-nav .nav-item.active .icon {
  transform: translateY(calc(-1px * var(--nav-weight, 0)));
  filter: drop-shadow(0 0 8px rgba(252, 28, 71, var(--nav-glow, 0)));
}
/* Accordions remain mounted: their height can truly interpolate. */
.smooth-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 340ms var(--motion-ease),opacity 220ms ease;
}
.smooth-collapse.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
}
.smooth-collapse-inner {
  min-height: 0;
  overflow: hidden;
}
.list-heading .icon,.history-heading .icon {
  transition: transform 300ms var(--motion-ease);
}
.history-heading[aria-expanded="false"] .icon {
  transform: rotate(-90deg);
}
/* Sound chooser opens as a short, unobtrusive inline drawer. */
.sound-library {
  display: grid;
  grid-template-rows: 0fr;
  border-color: transparent;
  padding: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 320ms var(--motion-ease),
             opacity 220ms ease,border-color 250ms ease,
             padding 320ms var(--motion-ease),margin 320ms var(--motion-ease),
             visibility 0s linear 320ms;
}
.sound-library.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  border-color: #232229;
  padding: 11px 0 7px;
  margin: 10px 0 4px;
  transition: grid-template-rows 320ms var(--motion-ease),
             opacity 220ms ease,border-color 250ms ease,
             padding 320ms var(--motion-ease),margin 320ms var(--motion-ease),
             visibility 0s;
}
.sound-library-inner {
  min-height: 0;
  overflow: hidden;
}
.sound-disclosure-arrow,.schedule-week-row>.icon {
  transition: transform 260ms var(--motion-ease);
}
.sound-disclosure-arrow.expanded {
  transform: rotate(180deg);
}
/* Dialogs animate independently; the workout below never remounts. */
.confirm-overlay {
  animation: gt-overlay-in 220ms ease-out both;
  will-change: opacity;
}
.confirm-dialog {
  animation: gt-dialog-in 300ms var(--motion-ease) both;
}
.confirm-overlay.is-leaving {
  animation: gt-overlay-out 170ms ease-in both;
  pointer-events: none;
}
.confirm-overlay.is-leaving .confirm-dialog {
  animation: gt-dialog-out 170ms ease-in both;
}
@keyframes gt-overlay-in {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(7px);
  }
}
@keyframes gt-overlay-out {
  to {
    opacity: 0;
    backdrop-filter: blur(0);
  }
}
@keyframes gt-dialog-in {
  from {
    opacity: 0;
    transform: translate3d(0,18px,0) scale(.955);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gt-dialog-out {
  to {
    opacity: 0;
    transform: translate3d(0,10px,0) scale(.98);
  }
}
/* New cards are revealed in a small cascade, capped under 200ms. */
.program-card,.record-card,.schedule-week-row,.schedule-assign-program,.scheduled-workout,.history-line {
  animation: gt-card-in 270ms var(--motion-ease) backwards;
}
.program-card:nth-child(2),.record-card:nth-child(2),
.schedule-week-row:nth-child(2),.schedule-assign-program:nth-child(2),.scheduled-workout:nth-child(2) {
  animation-delay: 35ms;
}
.program-card:nth-child(3),.record-card:nth-child(3),
.schedule-week-row:nth-child(3),.schedule-assign-program:nth-child(3),.scheduled-workout:nth-child(3) {
  animation-delay: 65ms;
}
.program-card:nth-child(n/**/+4),.record-card:nth-child(n/**/+4),
.schedule-week-row:nth-child(n/**/+4),.schedule-assign-program:nth-child(n/**/+4),.scheduled-workout:nth-child(n/**/+4) {
  animation-delay: 85ms;
}
@keyframes gt-card-in {
  from {
    opacity: 0;
    transform: translate3d(0,8px,0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.program-menu,.set-popover {
  animation: gt-menu-in 210ms var(--motion-ease) both;
  transform-origin: top right;
}
@keyframes gt-menu-in {
  from {
    opacity: 0;
    transform: translate3d(0,-5px,0) scale(.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Tactile feedback, but no scale animations on text inputs. */
:is(.primary-btn,.top-save,.top-finish,.top-back,.shortcut,.wide-action,
  .program-start,.menu-trigger,.schedule-settings-btn,.schedule-day,
  .scheduled-start,.schedule-create,.schedule-week-row,.schedule-assign-program,
  .record-add,.record-remove,.sound-tile,.secondary-wide,.nav-item,
  .timer-adjust,.timer-primary,.workout-header-finish,.workout-timer-button,
  .add-set-button,.set-check,.schedule-autofill,.confirm-actions button) {
  -webkit-tap-highlight-color: transparent;
  transition-property: transform,background-color,border-color,color,box-shadow;
  transition-duration: 190ms;
  transition-timing-function: var(--motion-ease);
}
:is(.primary-btn,.top-save,.top-finish,.top-back,.shortcut,.wide-action,
  .program-start,.schedule-settings-btn,.scheduled-start,.schedule-create,
  .schedule-week-row,.schedule-assign-program,.record-add,.secondary-wide,
  .timer-adjust,.timer-primary,.workout-header-finish,.workout-timer-button,
  .add-set-button,.set-check,.schedule-autofill,.confirm-actions button):active:not(:disabled) {
  transform: scale(.974);
}
/* Keep previously designed stateful motions: panel slide, header title change,
   and nav-pill movement should never be overridden by the generic rule. */
.workout-timer-button {
  transition: background-color 200ms,border-color 200ms,color 200ms,transform 180ms var(--motion-ease);
}
.schedule-day {
  transition: transform 180ms var(--motion-ease),background-color 240ms ease,border-color 240ms ease,box-shadow 240ms ease;
}
.schedule-day.selected {
  box-shadow: 0 6px 18px #fc1c4750;
}
.schedule-assign-program.is-picked {
  border-color: #ff4568;
  box-shadow: 0 0 0 1px #ff456826 inset;
}
.schedule-pick-check {
  transition: background-color 200ms ease,transform 260ms var(--motion-ease);
}
.schedule-detail-frame {
  min-width: 0;
}
.schedule-plan-detail {
  transition: border-color 210ms ease;
}
.set-row {
  transition: background-color 240ms ease;
}
.set-row.set-done {
  background: linear-gradient(90deg,#1d1e23,#17161c);
}
.set-check.checked {
  box-shadow: 0 0 0 2px #ff456825;
}
.set-input {
  transition: border-color 180ms ease,background-color 180ms ease;
}
.set-input:focus {
  border-color: #ff4568;
  background: #24232a;
  outline: none;
}
.set-input[data-field="rpe"]:invalid { border-color: var(--red-hot); }
.set-input[data-field="rpe"] { appearance: textfield; -moz-appearance: textfield; }
.set-input[data-field="rpe"]::-webkit-inner-spin-button,
.set-input[data-field="rpe"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.timer-panel {
  will-change: transform;
}
.timer-config-reveal {
  will-change: grid-template-rows;
}
@media (hover:hover) and (pointer:fine) {
  .program-card:hover,.record-card:hover {
    background: #1e1d24;
  }
  .schedule-week-row:hover,.schedule-assign-program:hover {
    background: #211f26;
  }
  .scheduled-workout:hover {
    border-color: #544952;
  }
}
@media (prefers-reduced-motion:reduce) {
  .screen,.program-card,.record-card,.schedule-week-row,.schedule-assign-program,
  .scheduled-workout,.history-line,.program-menu,.set-popover,
  .confirm-overlay,.confirm-dialog,.confirm-overlay.is-leaving,
  .confirm-overlay.is-leaving .confirm-dialog {
    animation: none !important;
  }
  .bottom-nav::before,.smooth-collapse,.sound-library,.sound-library.is-expanded {
    transition: none !important;
  }
  ::view-transition-old(gt-screen),::view-transition-new(gt-screen),
  ::view-transition-old(gt-navigation),::view-transition-new(gt-navigation) {
    animation-duration: 0.01ms !important;
  }
}
/* V13 — finger-following tab navigation. Only the four root tabs can swipe. */
html.swipe-active,html.swipe-active body {
  overscroll-behavior-x: contain;
  overflow-x: clip;
}
html.swipe-active .app>.screen {
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}
.swipe-neighbor {
  position: fixed;
  z-index: 17;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0a0b10;
  box-sizing: border-box;
  will-change: transform;
  contain: layout style paint;
}
.swipe-neighbor>.screen {
  animation: none !important;
  min-width: 0;
}
.bottom-nav.is-swiping::before {
  transition: none !important;
}
@media (prefers-reduced-motion:reduce) {
  .swipe-neighbor,.swipe-active .app>.screen {
    transition: none !important;
  }
}
/* V14 — Progress hub. Scoped styles; other screens keep the original design. */
.progress-screen {
  padding-bottom: 30px;
}
.progress-screen .tab-heading {
  margin-bottom: 19px;
}
.progress-main-tabs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 4px;
  background: #151419;
  border: 1px solid #232228;
  padding: 4px;
  border-radius: 15px;
  margin-bottom: 19px;
}
.progress-main-tabs button {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  color: #adaeb4;
  background: transparent;
  font-size: 13px;
  font-weight: 670;
  transition: background 200ms ease,color 200ms ease,box-shadow 220ms ease;
}
.progress-main-tabs button.active {
  background: #fc1c47;
  color: white;
  box-shadow: 0 5px 19px #fc1c4735;
}
.progress-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  animation: gt-progress-reveal 260ms cubic-bezier(.2,.82,.2,1) both;
}
@keyframes gt-progress-reveal {
  from {
    opacity: .62;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.progress-chips {
  display: flex;
  gap: 5px;
  min-width: 0;
  background: #121116;
  border-radius: 14px;
  padding: 4px;
}
.progress-chip {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 6px 2px;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: #adaeb4;
  font-size: 11px;
  font-weight: 660;
  white-space: nowrap;
  transition: background 180ms,color 180ms,box-shadow 220ms;
}
.progress-chip.is-active {
  color: #fff;
  background: #fc1c47;
  box-shadow: 0 4px 15px #fc1c4729;
}
.progress-panel {
  background: linear-gradient(145deg,#17161c,#121318);
  border: 1px solid #2b2932;
  border-radius: 19px;
  padding: 16px;
  min-width: 0;
}
.progress-section {
  min-width: 0;
}
.progress-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
  min-width: 0;
}
.progress-section-head h2 {
  font-size: 15px;
  letter-spacing: -.015em;
  font-weight: 760;
  margin: 0;
}
.progress-section-head>span {
  font-size: 10px;
  color: #a2a3a9;
  text-align: right;
  line-height: 1.4;
  max-width: 55%;
}
.progress-overview-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.progress-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 93px;
  background: #1b1a20;
  border: 1px solid #2a2b30;
  border-radius: 16px;
  padding: 14px 12px;
}
.progress-tile.accent {
  background: linear-gradient(125deg,#221e24,#1a191f);
  border-color: #453a43;
}
.progress-tile>span {
  font-size: 11px;
  color: #a5a6ac;
}
.progress-tile>strong {
  font-size: clamp(15px,4.5vw,23px);
  color: #fcfbfd;
  letter-spacing: -.026em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.progress-tile>small {
  font-size: 10px;
  color: #a2a3a9;
}
.progress-tile.accent>small {
  color: #ff7690;
}
.progress-footnote {
  font-size: 10.5px;
  line-height: 1.6;
  color: #999aa0;
  margin: 12px 0 0;
}
.progress-bar-graph {
  display: flex;
  align-items: stretch;
  gap: 7px;
  height: 156px;
  border-bottom: 1px solid #302e35;
  padding: 4px 0 0;
  overflow: hidden;
}
.progress-bar-column {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  height: 100%;
}
.progress-bar-track {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 37px;
  background: repeating-linear-gradient(to top,transparent,transparent 34px,#ffffff09 35px);
}
.progress-bar-fill {
  display: block;
  background: linear-gradient(0deg,#dc204a,#ff4568);
  width: min(100%,24px);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 0 17px #fc1c471a;
  transition: height 350ms cubic-bezier(.22,1,.36,1);
}
.progress-bar-column small {
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  color: #9fa0a6;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}
.progress-overview-duo {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.progress-overview-duo>div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.progress-overview-duo>div+div {
  padding-left: 14px;
  border-left: 1px solid #2b2a31;
}
.progress-overview-duo span {
  font-size: 10px;
  color: #a0a1a7;
  line-height: 1.3;
}
.progress-overview-duo b {
  font-size: 25px;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.progress-screen .record-card {
  padding: 0;
  min-height: 122px;
}
.progress-record-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 9px;
  width: 100%;
  height: 100%;
  padding: 15px 13px;
  background: transparent;
  border: 0;
  color: #fff;
}
.progress-record-open b {
  font-size: 22px;
}
.progress-record-open .record-title {
  display: block;
  line-height: 1.3;
}
.progress-plus {
  font-size: 29px;
  color: #ff7690;
  font-weight: 300;
  line-height: 1;
}
.progress-chart-panel {
  padding: 16px 9px 12px;
}
.progress-chart-panel .progress-section-head {
  padding: 0 8px;
}
.progress-line-graph {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: pan-y;
}
.progress-guide {
  stroke: #302e35;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.progress-axis {
  font-size: 10px;
  fill: #999aa0;
  font-family: inherit;
}
.progress-line {
  fill: none;
  stroke: #fc1c47;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px #fc1c4740);
}
.progress-point {
  fill: #ff4568;
  stroke: #ffc0cb;
  stroke-width: 1.6;
  pointer-events: none;
}
.progress-point.selected {
  fill: #fff;
  stroke: #ff4568;
  stroke-width: 3;
}
.progress-point-hit {
  fill: transparent;
  cursor: pointer;
}
.progress-chart-empty {
  display: grid;
  place-items: center;
  color: #9a9ba1;
  border: 1px dashed #302e35;
  border-radius: 14px;
  font-size: 12px;
  text-align: center;
  min-height: 178px;
  padding: 20px;
}
.progress-three-metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
}
.progress-three-metrics .progress-tile {
  min-height: 81px;
  gap: 6px;
  padding: 11px 8px;
}
.progress-three-metrics .progress-tile>span {
  font-size: 10px;
}
.progress-three-metrics .progress-tile>strong {
  font-size: clamp(12px,3.7vw,16px);
}
.progress-next {
  display: grid;
  grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr);
  align-items: stretch;
  gap: 8px;
}
.progress-next>div {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid #302e35;
  background: #1b1a20;
  border-radius: 13px;
}
.progress-next>div.target {
  border-color: #dc204a;
  background: linear-gradient(145deg,#28242a,#1a191f);
}
.progress-next small {
  font-size: 10px;
  color: #a9aab0;
  line-height: 1.25;
}
.progress-next b {
  font-size: clamp(13px,4vw,19px);
  font-variant-numeric: tabular-nums;
}
.progress-next em {
  font-size: 11px;
  font-style: normal;
  color: #ff7690;
}
.progress-next-arrow {
  font-size: 22px;
  color: #ff7690;
  align-self: center;
  text-align: center;
}
.progress-primary {
  border: 0;
  border-radius: 12px;
  background: #fc1c47;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  min-height: 47px;
  width: 100%;
  padding: 11px;
  transition: background 160ms,transform 170ms;
}
.progress-primary:active {
  transform: scale(.985);
}
.progress-calm-note {
  border-radius: 13px;
  background: #1e1d24;
  border: 1px solid #2c2a32;
  padding: 15px;
  color: #b7b8be;
  font-size: 12px;
  line-height: 1.6;
}
.progress-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  padding: 35px 18px;
  border-radius: 17px;
  border: 1px dashed #302e35;
  text-align: center;
}
.progress-empty strong {
  font-size: 15px;
}
.progress-empty p {
  margin: 0;
  font-size: 12px;
  color: #aaabb1;
  line-height: 1.5;
}
.progress-empty-icon {
  font-size: 31px;
  color: #ff4568;
}
.progress-muscle-panel .progress-section-head {
  margin-bottom: 7px;
}
.progress-muscle-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}
.progress-muscle-tile {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 76px;
  padding: 11px 10px;
  background: #1a191f;
  border: 1px solid #2b2931;
  border-radius: 13px;
  text-align: left;
  min-width: 0;
  transition: background 180ms,border-color 180ms,transform 180ms;
}
.progress-muscle-tile.selected {
  background: #1b1a20;
  border-color: #dc204a;
}
.progress-muscle-tile:active {
  transform: scale(.98);
}
.progress-muscle-indicator {
  display: flex;
  align-items: flex-end;
  flex: 0 0 5px;
  background: #2d292f;
  border-radius: 20px;
  overflow: hidden;
}
.progress-muscle-indicator i {
  display: block;
  background: linear-gradient(0deg,#dc204a,#ff4568);
  width: 100%;
  min-height: 0;
  border-radius: 20px;
  transition: height 280ms ease;
}
.progress-muscle-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
  color: #e5e6ec;
}
.progress-muscle-copy small {
  font-size: 10px;
  color: #abacb2;
  line-height: 1.3;
}
.progress-muscle-copy strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.progress-muscle-copy em {
  font-size: 9.5px;
  font-style: normal;
  color: #ff7690;
}
.progress-detail-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid #2b2931;
  font-size: 12px;
}
.progress-detail-line span {
  color: #c3c4ca;
}
.progress-detail-line b {
  font-variant-numeric: tabular-nums;
  color: #ff7690;
}
.progress-balance-pair {
  margin: 15px 0;
}
.progress-balance-text {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}
.progress-balance-text span {
  color: #a5a6ac;
}
.progress-balance-track {
  height: 9px;
  margin-top: 10px;
  border-radius: 20px;
  background: #434449;
  overflow: hidden;
}
.progress-balance-track>div {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg,#fc1c47,#ff7690);
  transition: width 280ms ease;
}
.progress-balance-pair small {
  font-size: 10px;
  color: #9fa0a6;
}
.progress-no-data {
  color: #a9aab0;
  font-size: 12px;
  line-height: 1.5;
}
.progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 14px calc(24px + env(safe-area-inset-bottom,0px));
  background: #000b;
  animation: progress-fade 190ms ease-out;
}
.progress-dialog {
  width: min(100%,450px);
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px;
  background: #19181e;
  border: 1px solid #3c383e;
  border-radius: 23px;
  box-shadow: 0 15px 60px #000a;
  animation: progress-sheet 270ms cubic-bezier(.16,1,.3,1) both;
}
.progress-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.progress-dialog h2 {
  font-size: 18px;
  margin: 0;
}
.progress-dialog-head button {
  width: 33px;
  height: 33px;
  border: 0;
  background: #29272f;
  color: #dcdde3;
  border-radius: 50%;
  font-size: 24px;
}
.progress-dialog p {
  font-size: 12px;
  color: #b6b7bd;
  margin: 0;
}
.progress-dialog label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: #aeafb5;
}
.progress-dialog select,.progress-dialog input {
  background: #222128;
  color: #fff;
  border: 1px solid #35323a;
  min-width: 0;
  min-height: 47px;
  width: 100%;
  border-radius: 11px;
  padding: 10px;
  font-size: 14px;
}
.progress-dialog .progress-footnote {
  font-size: 11px;
}
@keyframes progress-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes progress-sheet {
  from {
    opacity: .5;
    transform: translateY(45px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width:355px) {
  .progress-panel {
    padding: 12px;
  }
  .progress-muscle-tile {
    gap: 7px;
    padding: 10px 7px;
  }
  .progress-three-metrics {
    gap: 5px;
  }
  .progress-main-tabs button {
    font-size: 12px;
  }
  .progress-next {
    gap: 5px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .progress-pane,.progress-overlay,.progress-dialog {
    animation: none !important;
  }
  .progress-main-tabs button,.progress-chip,.anatomy-muscle,.progress-bar-fill,
  .progress-muscle-tile,.progress-muscle-indicator i,.progress-balance-track>div {
    transition: none !important;
  }
}
/* Polished selection and compact secondary actions. */
.anatomy-muscle.is-selected {
  stroke: #ffb3c4;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px #ff456882);
}
.progress-text-button {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: transparent;
  color: #ff7690;
  font-size: 11px;
  font-weight: 650;
  padding: 7px 10px;
}
.progress-screen .progress-section-head h2 {
  text-wrap: balance;
}
.progress-panel>.progress-chips {
  margin-bottom: 13px;
}
/* V15 — visual refinement of Progress only; other screens remain unchanged. */
.progress-screen .tab-heading {
  margin-bottom: 17px;
}
.progress-screen .tab-heading .eyebrow {
  display: none;
}
.progress-screen .tab-heading h1 {
  font-size: clamp(27px,7vw,32px);
  letter-spacing: -.045em;
  line-height: 1.15;
}
.progress-screen .progress-main-tabs {
  margin-bottom: 16px;
  background: #151419;
  border: 1px solid #211f25;
  padding: 3px;
  border-radius: 13px;
  gap: 2px;
}
.progress-screen .progress-main-tabs button {
  min-height: 45px;
  border-radius: 11px;
  font-size: 13px;
}
.progress-screen .progress-main-tabs button.active,
.progress-screen .progress-chip.is-active {
  background: var(--red);
  box-shadow: 0 7px 28px rgba(252, 28, 71, .33);
}
.progress-screen .progress-pane {
  gap: 12px;
}
.progress-screen .progress-chips {
  background: #151419;
  border-radius: 13px;
  gap: 4px;
  padding: 4px;
}
.progress-screen .progress-chip {
  min-height: 39px;
  border-radius: 10px;
  font-size: 12px;
}
.progress-screen .progress-panel {
  background: linear-gradient(158deg, #131217 0%, #0e0d12 100%);
  border: 1px solid #2b2932;
  border-radius: 18px;
  box-shadow: 0 4px 22px #0002;
}
.progress-chart-panel {
  padding: 17px 11px 11px !important;
}
.progress-chart-panel .progress-section-head {
  padding: 0 3px;
  margin-bottom: 4px;
}
.progress-chart-panel .progress-section-head h2 {
  font-size: 16px;
}
.progress-chart-panel .progress-section-head>span {
  font-size: 11px;
}
.progress-chart-panel .progress-line-graph {
  margin: 0 auto 9px;
  display: block;
  max-width: 100%;
}
.progress-graph-tip rect,.progress-graph-tip path {
  fill: #111116;
  stroke: #fc1c47;
  stroke-width: 1;
}
.progress-graph-tip text {
  font-size: 13px;
  fill: #fff;
  font-weight: 750;
}
.progress-graph-select-line {
  stroke: #fc1c474d;
  stroke-width: 1.3;
  stroke-dasharray: 3 3;
}
.progress-chart-panel .progress-point {
  fill: #fc1c47;
  stroke: #ff9bb0;
  stroke-width: 2;
}
.progress-chart-panel .progress-point.selected {
  fill: #fff;
  stroke: #fc1c47;
  stroke-width: 4;
  filter: drop-shadow(0 0 4px #fc1c479c);
}
.progress-chart-panel .progress-line {
  stroke: #fc1c47;
  stroke-width: 3.4;
  filter: drop-shadow(0 1px 7px #fc1c4753);
}
.progress-chart-panel .progress-guide {
  stroke: #302e35;
  stroke-dasharray: 3 4;
}
.progress-chart-panel .progress-axis {
  fill: #b0b1b7;
  font-size: 10px;
}
.progress-chart-panel .progress-three-metrics {
  gap: 6px;
}
.progress-chart-panel .progress-three-metrics .progress-tile {
  border-radius: 11px;
  padding: 11px 9px;
  background: #1b1a20;
  min-height: 74px;
  gap: 8px;
}
.progress-chart-panel .progress-three-metrics .progress-tile>span {
  color: #b2b3b9;
  font-size: 10px;
  line-height: 1.2;
}
.progress-chart-panel .progress-three-metrics .progress-tile>strong {
  color: #faf8fb;
  font-size: clamp(11px,3.55vw,15px);
  white-space: normal;
  line-height: 1.25;
  letter-spacing: -.035em;
}
.progress-recommend-panel {
  padding: 15px !important;
  box-shadow: 0 13px 35px rgba(0, 0, 0, .16);
}
.progress-recommend-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.progress-recommend-icon {
  display: grid;
  place-items: center;
  flex: 0 0 37px;
  height: 37px;
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  background: #211d23;
  color: #ff4568;
  border-radius: 11px;
}
.progress-recommend-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -.025em;
}
.progress-recommend-head small {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  background: #201f25;
  border-radius: 18px;
  font-size: 10px;
  color: #b3b4ba;
}
.progress-recommend-panel .progress-next {
  grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr);
  gap: 5px;
  align-items: center;
}
.progress-recommend-panel .progress-next>div {
  min-height: 108px;
  background: #17161c;
  border: 1px solid #302e36;
  border-radius: 13px;
  padding: 12px 9px;
  justify-content: center;
  gap: 7px;
}
.progress-recommend-panel .progress-next>div.target {
  border: 1px solid #fc1c47;
  background: linear-gradient(125deg,#25121b,#1b1319);
  box-shadow: 0 0 20px #fc1c4721;
}
.progress-recommend-panel .progress-next small {
  font-size: 11px;
}
.progress-recommend-panel .progress-next b {
  font-size: clamp(15px,4.5vw,20px);
  white-space: nowrap;
  letter-spacing: -.04em;
}
.progress-recommend-panel .progress-next span:not(.progress-next-arrow) {
  color: #abacb2;
  font-size: 10px;
}
.progress-recommend-panel .progress-next .progress-next-arrow {
  color: #dbdce2;
  font-size: 25px;
}
.progress-recommend-panel .progress-next em {
  font-style: normal;
  color: #ffc5ce;
  font-size: 12px;
}
.progress-recommend-explain {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 13px 0;
}
.progress-recommend-badge {
  flex: 0 0 auto;
  padding: 10px 12px;
  background: #242026;
  color: #ffcbd4;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 760;
}
.progress-recommend-explain p {
  font-size: 10.5px;
  color: #babbc1;
  line-height: 1.5;
  margin: 0;
}
.progress-recommend-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.progress-recommend-actions button {
  min-height: 47px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 760;
}
.progress-recommend-actions .progress-primary {
  background: #fc1c47;
}
.progress-secondary {
  background: #19181e;
  color: #f7f5f8;
  border: 1px solid #3d3e43;
  transition: background 160ms,transform 150ms;
}
.progress-secondary:active {
  transform: scale(.98);
}
.progress-recommend-calm>p {
  color: #b4b5bb;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
/* Statistics — six priority muscle cards and live heatmap. */
.progress-statistics-pane .progress-muscle-panel {
  padding: 13px 12px 12px !important;
}
.progress-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.progress-map-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.03em;
}
.progress-map-range {
  position: relative;
  max-width: 130px;
}
.progress-map-range::after {
  content: "⌄";
  position: absolute;
  right: 4px;
  top: 5px;
  color: #bcbdc3;
  pointer-events: none;
  font-size: 14px;
}
.progress-map-range select {
  padding: 7px 17px 7px 5px;
  text-align: right;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  color: #adaeb4;
  background: transparent;
  font-size: 12px;
  width: 100%;
  white-space: nowrap;
}
.anatomy-stage {
  position: relative;
  width: 100%;
  margin: 5px auto 8px;
  display: flex;
  align-items: center;
}
.anatomy-art {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 588/587;
  overflow: hidden;
}
.anatomy-base-image,.anatomy-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.anatomy-base-image,.anatomy-overlay {
  object-fit: contain;
  pointer-events: none;
}
.anatomy-base-image {
  mix-blend-mode: screen;
}
.anatomy-overlay {
  mix-blend-mode: screen;
  filter: none;
  transition: opacity 220ms ease,filter 200ms ease;
}
.anatomy-overlay.is-selected {
  filter: brightness(1.13);
}
.anatomy-scale {
  flex: 0 0 41px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.anatomy-scale span {
  color: #999aa0;
  font-size: 8.5px;
  line-height: 1.25;
  text-align: center;
}
.anatomy-scale i {
  display: block;
  height: 96px;
  width: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg,#fc1c47,#dc204a 42%,#2b2931);
  box-shadow: 0 0 15px #fc1c472c;
}
.progress-statistics-pane .progress-muscle-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 7px;
}
.progress-statistics-pane .progress-muscle-tile {
  min-height: 77px;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 12px;
  background: linear-gradient(150deg,#1b1a20,#15161b);
  border: 1px solid #2c2d32;
}
.progress-statistics-pane .progress-muscle-tile.selected {
  border-color: #ff4568;
  background: #221a22;
}
.progress-statistics-pane .progress-muscle-indicator {
  flex-basis: 6px;
  background: #352a33;
  border-radius: 10px;
  box-shadow: 0 0 11px #fc1c4733;
}
.progress-statistics-pane .progress-muscle-indicator i {
  background: linear-gradient(0deg,#dc204a,#fc1c47);
}
.progress-statistics-pane .progress-muscle-copy {
  gap: 3px;
}
.progress-statistics-pane .progress-muscle-copy small {
  font-size: 10px;
  color: #c3c4ca;
  line-height: 1.3;
}
.progress-statistics-pane .progress-muscle-copy strong {
  font-size: 20px;
  line-height: 1.2;
}
.progress-statistics-pane .progress-muscle-copy em {
  font-size: 10px;
  color: #a8a9af;
}
.progress-show-more {
  display: block;
  margin: 9px auto 0;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: #a6a7ad;
  font-size: 11px;
}
.progress-show-more span {
  color: #ff4568;
  margin-left: 3px;
}
.progress-selected-muscle {
  margin-top: 10px;
  padding: 10px 12px 3px;
  border: 1px solid #3e3a40;
  border-radius: 12px;
  background: #19181e;
  animation: gt-progress-reveal 190ms ease-out both;
}
.progress-selected-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
}
.progress-selected-head strong {
  display: block;
  font-size: 13px;
}
.progress-selected-head small {
  display: block;
  font-size: 10px;
  color: #acadb3;
  margin-top: 4px;
}
.progress-selected-head button {
  border: 0;
  border-radius: 50%;
  height: 26px;
  width: 26px;
  color: #fff;
  background: #2b2a31;
  font-size: 20px;
}
.progress-selected-muscle .progress-detail-line {
  padding: 9px 0;
  font-size: 11px;
}
.progress-week-bars {
  padding: 15px 12px 12px !important;
}
.progress-week-bars .progress-section-head h2 {
  font-size: 16px;
}
.progress-week-graphic {
  display: grid;
  grid-template-columns: minmax(0,1fr) 61px;
  align-items: end;
  gap: 9px;
}
.progress-week-plot {
  min-width: 0;
}
.progress-week-plot .progress-bar-graph {
  height: 134px;
  gap: 5px;
}
.progress-week-plot .progress-bar-fill {
  width: min(100%,23px);
  border-radius: 2px 2px 0 0;
}
.progress-week-plot .progress-bar-column small {
  font-size: 9px;
}
.progress-week-total {
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 3px;
}
.progress-week-total b {
  font-size: 30px;
  letter-spacing: -.055em;
  line-height: 1;
}
.progress-week-total span {
  color: #a7a8ae;
  font-size: 11px;
}
.progress-stats-disclaimer {
  margin: 0 3px !important;
  font-size: 10px;
}
.progress-balance-panel {
  padding: 16px 13px !important;
}
.progress-balance-panel .progress-balance-pair {
  margin: 12px 0;
}
@media (max-width:375px) {
  .progress-statistics-pane .progress-muscle-tile {
    gap: 5px;
    padding: 9px 6px;
  }
  .progress-statistics-pane .progress-muscle-copy small {
    font-size: 9px;
  }
  .progress-statistics-pane .progress-muscle-copy strong {
    font-size: 19px;
  }
  .anatomy-scale {
    flex-basis: 31px;
  }
  .progress-recommend-panel .progress-next b {
    font-size: 14px;
  }
  .progress-chart-panel .progress-three-metrics .progress-tile>span {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .anatomy-overlay,.progress-statistics-pane .progress-muscle-tile,.progress-recommend-actions button {
    transition: none !important;
  }
}
/* ────────────────────────────────────────────────────────────────────────────
   V17 · Motion refinement
   Scoped to the newer schedule/analytics UI. All controls remain functional
   with reduced motion; only decorative transitions are disabled in that mode.
   ──────────────────────────────────────────────────────────────────────────── */
:root {
  --motion-fast: 180ms;
  --motion-normal: 280ms;
  --motion-spring: cubic-bezier(.22, 1, .36, 1);
}

/* The selected Progress tab is ONE moving surface, not three flashing buttons. */
.progress-screen .progress-main-tabs {
  position: relative;
  isolation: isolate;
}
.progress-screen .progress-main-tabs::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 10px) / 3);
  border-radius: 11px;
  background: var(--red);
  box-shadow: 0 7px 24px rgba(252, 28, 71, .28);
  transform: translate3d(calc(var(--progress-index, 0) * (100% + 2px)), 0, 0);
  transition: transform 340ms var(--motion-spring);
  pointer-events: none;
}
.progress-screen .progress-main-tabs button,
.progress-screen .progress-main-tabs button.active {
  position: relative;
  z-index: 1;
  background: transparent;
  box-shadow: none;
  transition: color var(--motion-normal) ease;
}
.progress-screen .progress-main-tabs button.active {
  color: #fff;
}

/* Switching subpages is different from changing chart filters: don't replay
   the entire page entrance animation every time a number changes. */
.progress-screen .progress-pane-stable {
  animation: none;
}
.progress-screen .progress-pane-transition {
  animation: gt-progress-section-enter 300ms var(--motion-spring) both;
}
@keyframes gt-progress-section-enter {
  from { opacity: .38; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Live muscle overlays remain mounted: opacity changes instead of flashing. */
.progress-screen .anatomy-overlay {
  transition: opacity 340ms var(--motion-spring), filter 280ms ease;
}
.progress-screen .progress-muscle-indicator i {
  transition: height 340ms var(--motion-spring);
}
.progress-screen .progress-chip,
.progress-screen .progress-muscle-tile {
  transition: color 240ms ease, background-color 260ms ease,
              border-color 260ms ease, box-shadow 260ms ease,
              transform var(--motion-fast) var(--motion-spring);
}
.progress-screen .progress-week-graphic,
.progress-screen .progress-three-metrics {
  contain: layout style;
}
.progress-screen .progress-line-graph .progress-point {
  transition: fill 190ms ease, stroke 190ms ease, r 190ms ease;
}
.progress-screen .progress-selected-muscle {
  animation: gt-detail-expand 250ms var(--motion-spring) both;
  transform-origin: top center;
}
@keyframes gt-detail-expand {
  from { opacity: 0; transform: translate3d(0, -7px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* The day indicator and the corresponding summary react as one interaction. */
.schedule-day > span,
.schedule-day-indicator,
.schedule-day.selected {
  transition: color 240ms ease, background-color 260ms ease,
              border-color 260ms ease, box-shadow 280ms ease,
              transform 210ms var(--motion-spring);
}
.today-screen .recent-preview {
  animation: gt-recent-appear 240ms var(--motion-spring) both;
}
@keyframes gt-recent-appear {
  from { opacity: .75; transform: translate3d(0, 6px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* A recommendation dialog closes without remounting the entire Progress tab. */
.progress-overlay.is-closing {
  animation: gt-overlay-out 190ms ease-in both;
  pointer-events: none;
}
.progress-overlay.is-closing .progress-dialog {
  animation: gt-dialog-out 190ms ease-in both;
}

@media (prefers-reduced-motion: reduce) {
  .progress-screen .progress-main-tabs::before,
  .progress-screen .progress-main-tabs button,
  .progress-screen .anatomy-overlay,
  .progress-screen .progress-chip,
  .progress-screen .progress-muscle-tile,
  .progress-screen .progress-muscle-indicator i,
  .schedule-day > span, .schedule-day-indicator,
  .schedule-day.selected {
    transition: none !important;
  }
  .progress-screen .progress-pane-transition,
  .progress-screen .progress-selected-muscle,
  .today-screen .recent-preview,
  .progress-overlay.is-closing,
  .progress-overlay.is-closing .progress-dialog {
    animation: none !important;
  }
}

/* V18 · independently highlighted muscle regions. */
.progress-screen .anatomy-overlay { transition: opacity 320ms var(--motion-spring, ease), filter 220ms ease; }
.progress-screen .progress-muscle-copy small { line-height: 1.25; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .progress-screen .anatomy-overlay { transition: none !important; }
}
/* Storage failures stay visible until a successful save or validated import. */
.storage-status {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(440px, calc(100% - 24px));
  padding: 12px 14px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.storage-status[hidden] { display: none; }
/* Interaction feedback never changes layout or moves exercise artwork. */
:where(button, summary) { transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.exercise-row:active:not(:disabled) { transform: none; }
.exercise-row:active .row-check { transform: scale(.92); }
.exercise-row .exercise-artwork { transition: none; }
.equipment-menu > summary i, .muscle-filter-trigger i { transition: transform 200ms ease; }
.muscle-option, .editor-exercise-card, .program-card { transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.muscle-sheet::backdrop { animation: gt-filter-backdrop-in 220ms ease both; }
.muscle-sheet.is-closing::backdrop { animation: gt-filter-backdrop-out 170ms ease both; }
@keyframes gt-filter-backdrop-in { from { background-color: #0000; } to { background-color: #0009; } }
@keyframes gt-filter-backdrop-out { from { background-color: #0009; } to { background-color: #0000; } }
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover, summary:hover { filter: brightness(1.06); }
  .exercise-row:hover { background-color: #ffffff05; filter: none; }
  .editor-exercise-card:hover, .program-card:hover { border-color: #3b343f; }
}
@media (prefers-reduced-motion: reduce) {
  button, summary, .row-check, .muscle-option, .editor-exercise-card, .program-card,
  .equipment-menu > summary i, .muscle-filter-trigger i { transition: none !important; }
  .muscle-sheet::backdrop { animation: none !important; }
}
/* Shared library and analytics filters; menus mount outside animated screens. */
.dropdown { position: relative; min-width: 0; }
.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #36343f;
  border-radius: 12px;
  background: linear-gradient(135deg,#222129,#17161d);
  color: #f2f2f5;
  font: inherit;
  font-size: 12px;
  text-align: left;
  transition: border-color .22s,background .22s,box-shadow .22s;
}
.dropdown-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dropdown-leading { display: inline-flex; flex: 0 0 auto; align-items: center; }
.dropdown-trigger > .icon { flex-shrink: 0; color: #aaa8b5; transition: transform .24s,color .24s; }
.dropdown-trigger[aria-expanded="true"] {
  border-color: #ff6487;
  background: linear-gradient(135deg,#28212a,#21181f);
  box-shadow: 0 0 0 2px #ff17442b,0 5px 22px #ff174416;
}
.dropdown-trigger[aria-expanded="true"] > .icon { transform: rotate(180deg); color: #ff7896; }
.dropdown-trigger:focus-visible { outline: 2px solid #ff6487; outline-offset: 3px; }
.dropdown-panel {
  position: fixed;
  z-index: 500;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid #65505f;
  border-radius: 15px;
  background: linear-gradient(140deg,#282630 0%,#121117 65%,#1f121c 100%);
  box-shadow: 0 10px 28px #0009,inset 0 1px #ffffff0c;
  scrollbar-width: thin;
}
.dropdown-panel-map-range { box-shadow: inset 0 1px #ffffff0c; }
.dropdown-panel[hidden] { display: none; }
.dropdown-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #c1becb;
  font: inherit;
  font-size: 13px;
  text-align: left;
  transition: color .18s,background .18s,border-color .18s;
}
.dropdown-option + .dropdown-option { margin-top: 3px; }
.dropdown-option > .icon { flex-shrink: 0; color: #aaa6b6; }
.dropdown-option-label { min-width: 0; flex: 1; }
.dropdown-check { display: flex; color: #ff6487; opacity: 0; transition: opacity .18s; }
.dropdown-option[aria-selected="true"] {
  border-color: #ff64874a;
  background: linear-gradient(110deg,#ff174426,#ff174412);
  color: #ff7896;
}
.dropdown-option[aria-selected="true"] .dropdown-check { opacity: 1; }
.dropdown-option[aria-selected="true"] > .icon { color: #ff6487; }
.dropdown-option:focus-visible { outline: 1px solid #ff7896; outline-offset: -2px; background-color: #ffffff08; }
.progress-map-range.dropdown { max-width: 142px; }
.progress-map-range.dropdown::after { content: none; }
.progress-map-range .dropdown-trigger { min-height: 38px; padding: 8px 10px; font-size: 11px; }
.progress-exercise-picker.dropdown { width: 100%; }
.progress-exercise-picker .dropdown-trigger {
  min-height: 59px;
  padding: 10px 13px;
  border-color: #302e35;
  border-radius: 14px;
  background: #0c0b11;
  font-size: 15px;
  font-weight: 750;
}
.progress-exercise-picker .dropdown-leading .exercise-artwork { width: 42px; height: 42px; }
.progress-exercise-picker .dropdown-option { min-height: 38px; gap: 10px; padding: 4px 8px; font-size: 12px; }
.progress-exercise-picker .dropdown-option + .dropdown-option { margin-top: 2px; }
.progress-exercise-picker .dropdown-option .dropdown-leading .exercise-artwork { width: 28px; height: 28px; }
.progress-exercise-picker .dropdown-option-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-exercise-picker .dropdown-check { margin-left: auto; }
.compact-dropdown { width: 68px; flex: 0 0 68px; }
.compact-dropdown .dropdown-trigger { min-height: 42px; padding: 8px 10px; font-size: 13px; }
.compact-dropdown .dropdown-value { text-align: center; }
.dropdown-panel-compact { padding: 5px; border-radius: 11px; }
.dropdown-panel-compact .dropdown-option { min-height: 38px; justify-content: center; padding: 7px 9px; }
.dropdown-panel-compact .dropdown-option-label { text-align: center; }
.dropdown-panel-compact .dropdown-check { position: absolute; right: 8px; }
.dropdown-panel-compact .dropdown-option { position: relative; }
@media (hover: hover) {
  .dropdown-trigger:hover { border-color: #736171; }
  .dropdown-option:hover { background-color: #ffffff08; color: #f2f2f5; }
}
@media (prefers-reduced-motion: reduce) {
  .dropdown-trigger,.dropdown-trigger > .icon,.dropdown-option,.dropdown-check { transition: none; }
}
