/* Readable metadata, restrained separators and visible reorder affordances. */
.workoutMetaRow{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:17px 0 20px}
.workoutMetaRow .workoutFacts{display:flex;align-items:center;flex-wrap:wrap;gap:10px;flex:1;min-width:0;margin:0;padding:0;border:0;font-size:16px;line-height:1.35}
.workoutMetaRow .routineChooser{margin:0;flex:none;padding-inline:12px}
.preparationLinks button{display:flex;align-items:center;justify-content:flex-start;min-height:48px;font-size:17px;padding:12px 0}
.preparationLinks button>span:empty,.preparationRow>b:empty,.recoveryShortcut>b:empty{display:none}
.workoutStart .startWorkout{justify-content:center}
.cardioPreview>span:last-child:empty{display:none}
:root[data-theme] .cardioPreview{border-bottom:0;margin-bottom:0}
.cardioPreview+.homeSecondary>.sessionDetails:first-child{border-top:0}
#session-options .sessionToggle{border-top:1px solid var(--border);border-bottom:0}
#session-options .sessionOption+.sessionToggle{border-top:0}
#session-options .sessionToggle+.sessionToggle{margin-top:0}
.catalogMeta{grid-template-columns:minmax(0,1fr) 48px;gap:10px}
.catalogMeta>.compactMuscles{width:48px;max-width:48px;height:92px}
.catalogMeta>.compactMuscles .muscleAtlas{width:48px;max-width:48px;height:92px}
.catalogMeta>.compactMuscles .atlasSvg{width:48px;max-width:48px;height:92px}
.routineTools{display:flex;flex-direction:column;gap:1px;align-self:center}
.routineTools .iconButton{min-height:36px;height:36px;width:36px;min-width:36px}
.routineDragHandle{touch-action:none;color:var(--muted);cursor:grab}
.routineDragHandle svg{width:20px;height:20px;fill:currentColor;stroke:none}
.routineRow[data-reorder-id]{position:relative;transition:opacity .12s,background-color .12s}
.orderHint{font-size:15px;line-height:1.45;color:var(--muted);margin:8px 0 12px}
.exerciseTab[data-reorder-id]{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.orderDragging{opacity:.4;cursor:grabbing}
.orderDropTarget{outline:2px solid var(--accent-text);outline-offset:3px;border-radius:12px}
.orderEditorRow{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 0;border-top:1px solid var(--border);font-size:18px;line-height:1.3}
.orderEditorRow>div{display:flex;gap:3px}.orderEditorRow .iconButton{width:40px;min-width:40px}
.orderEditorRow .iconButton:disabled{opacity:.3}.orderPosition{color:var(--muted)}.orderSelected{color:var(--accent-text)}
.orderEditorRow svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sessionSetup{overflow:hidden;will-change:auto}
@keyframes restContrastPulse{0%,100%{transform:scale(1);color:var(--timer-ink);text-shadow:none}50%{transform:scale(1.025);color:#fff;text-shadow:0 1px #102022,0 -1px #102022,1px 0 #102022,-1px 0 #102022}}
:root[data-theme] #workout-timer-host .restEnding #rest-clock{color:var(--timer-ink);animation:restContrastPulse .8s ease-in-out infinite}
:root[data-theme] :is(.setNumber,.setEffort,.swipeHint,.catalogTools,.cardioPreview p,.workoutUtility button,.preparationRow small,.sessionToggle small,.recoveryGroup summary,.recoveryGroup summary strong,.recoveryGroup p,.recoveryMethod,.recoveryScale button,.analyticsMethod summary,.chartInsight>small,.analyticsSession small,.trendSetDetails,.trendMethod){font-size:15px;line-height:1.45}
:root[data-theme] :is(.stat span,.stat small,.infoBox p,.mediaVariantNote,.mediaAttribution,.mediaAttribution summary){font-size:15px;line-height:1.45}
:root[data-theme] .exercisePrescription{font-size:19px}:root[data-theme] .exercisePrescription strong{font-size:23px}
@media(max-width:360px){.workoutMetaRow{gap:8px}.workoutMetaRow .workoutFacts{gap:7px;font-size:15px}.workoutMetaRow .routineChooser{font-size:16px;padding-inline:10px;gap:6px}.catalogMeta{grid-template-columns:minmax(0,1fr) 42px}.catalogMeta>.compactMuscles,.catalogMeta>.compactMuscles .muscleAtlas,.catalogMeta>.compactMuscles .atlasSvg{width:42px;max-width:42px}.routineTools .iconButton{width:32px;min-width:32px}}
@media(prefers-reduced-motion:reduce){.routineRow[data-reorder-id]{transition:none}:root[data-theme] #workout-timer-host .restEnding #rest-clock{animation:none;font-weight:600}}

:root[data-theme] #workout-timer-host #rest-clock[data-hours=true]{font-size:44px}
@media(max-width:360px){:root[data-theme] #workout-timer-host #rest-clock[data-hours=true]{font-size:38px}}
.exerciseVariants {
  min-width: 0;
  margin: 0 0 8px;
}
.exerciseVariants > summary {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
}
.exerciseVariants > summary span {
  margin-inline-start: 6px;
  color: var(--muted);
  font-weight: 400;
}
.variantRows {
  padding-inline-start: clamp(8px, 3vw, 18px);
  border-inline-start: 2px solid var(--border);
}
.variantRows .catalogCard { min-width: 0; }
.variantTechniqueIcon { font-size: 1.65rem; color: var(--accent-text); }
.variantReferenceThumb { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: inherit; }

/* Let spacing separate sections and reserve rules for comparable rows. */
.workoutHeading .workoutUtility {
  border-top: 0;
  padding-top: .45rem;
}

.preparationLinks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  border: 0;
  padding: 0;
  margin-block: .85rem .65rem;
}
.preparationLinks button {
  justify-content: center;
  padding: .5rem .35rem;
  border-radius: .7rem;
  background: var(--surface);
  line-height: 1.2;
  text-align: center;
}
.preparationLinks button:focus-visible,
.recoveryShortcut:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.routineList > .routineRow:first-child,
.addExerciseButton { border-top: 0; }
.addExerciseButton {
  width: auto;
  min-height: 44px;
  padding: .5rem 0;
}
:root[data-theme] button.cardioPreview {
  margin: 1rem 0 0;
  padding: .8rem .9rem;
  border: 0;
  border-radius: .85rem;
  background: var(--surface);
}
.cardioPreview .cardioGlyph { line-height: 1; }

.homeSecondary {
  margin-top: 1.4rem;
  padding-top: 0;
  border: 0;
}
.homeSecondary > .sessionDetails + .sessionDetails { margin-top: .45rem; }
.sessionDetails.feedbackEntry {
  margin: .45rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.homeSecondary summary,
.feedbackEntry > summary {
  min-height: 44px;
  padding-block: .65rem;
}
.recoveryShortcut {
  margin-top: .8rem;
  padding: .85rem .95rem;
  border: 0;
  border-radius: .85rem;
  background: var(--focus-gradient);
}
.recoveryShortcut small { color: var(--focus-label); }
.muscleRecovery {
  padding-bottom: 0;
  border-bottom: 0;
}

.catalogSection > h2 {
  margin-bottom: .2rem;
  padding: .1rem 0 .1rem .65rem;
  border: 0;
  border-inline-start: 3px solid var(--accent-border);
}
.catalogSection .catalogCard:last-child { border-bottom: 0; }
.exerciseVariants > summary { border-radius: .55rem; }
.exerciseVariants[open] > summary { background: var(--surface); }
.techMuscles,
.techMuscles + .infoBox { border-block: 0; }

.progressAnalytics {
  margin-block: 1.85rem;
  padding-block: 0;
  border-block: 0;
}
.analyticsTabs { border-bottom: 0; }
.analyticsDetail {
  background: var(--surface);
  border: 0;
  border-radius: .75rem;
  padding: .75rem .85rem;
}
:root[data-theme] .statgrid .stat,
.progressCardio { border-bottom: 0; }
.progressCardio { padding-bottom: 0; }
.historyEditor .editSet:first-of-type { border-top: 0; }
.pickerList .pickerRow:last-child { border-bottom: 0; }

.profileSection[open] > summary { border-bottom: 0; }
.profileSection[open] > summary::after { color: var(--accent-text); }
.profileSection[open] > .profileSectionContent { padding-top: .3rem; }
.dayEditor label:last-of-type { border-bottom: 0; }

.stopwatchFace {
  flex: 0 0 auto;
  min-height: clamp(132px, 28svh, 210px);
  margin-block: .9rem .35rem;
  border-radius: 1.25rem;
  background: radial-gradient(ellipse at center, var(--surface2), var(--bg) 75%);
}
.lapHeading { border-top: 0; }
.stopwatchLaps li:last-child { border-bottom: 0; }
/* Profile overview is editorial; the settings below are interactive rows. */
.profileHero { display: block; margin-bottom: 1.15rem; }
.profileHero .title { margin: 0; }
.profileHero .eyebrow {
  margin-bottom: .35rem;
  color: var(--focus-label);
}
.profileHero.hasOverview {
  padding: clamp(.95rem, 4vw, 1.35rem);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--focus-gradient);
}
.profileOverview {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(.6rem, 4vw, 1.25rem);
  margin: 1rem 0 0;
}
.profileOverview dt { color: var(--focus-label); font-size: .94rem; }
.profileOverview dd {
  margin: .25rem 0 0;
  color: var(--ink);
  font-size: clamp(1.06rem, 5vw, 1.38rem);
  font-weight: 650;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.profileWeekMarks {
  display: flex;
  gap: .2rem;
  width: min(100%, 6.75rem);
  margin-top: .55rem;
}
.profileWeekMarks i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--control-border);
}
.profileWeekMarks .planned { background: var(--accent-text); }

.profileSettings {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.05rem;
  background: var(--surface);
}
.profileSettings .profileSection {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.profileSettings > .profileSection + .profileSection { border-top: 1px solid var(--border); }
.profileSettings .profileSection > summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 14px;
  align-items: center;
  gap: .75rem;
  min-height: 72px;
  margin: 0;
  padding: .8rem clamp(.65rem, 3vw, 1rem);
}
.profileSettings .profileSection > summary:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: -3px;
}
.profileSettings .profileSection > summary::after {
  position: static;
  justify-self: center;
}
.profileSettings .profileSectionTitle {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.25;
}
.profileSettings .sectionHint {
  margin: .2rem 0 0;
  font-size: .9375rem;
  line-height: 1.3;
}
.profileSettingIcon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: .65rem;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
}
.profileSettingIcon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profileSettings .profileSection[open] { background: var(--bg); }
.profileHub .recoveryBackupShortcut { margin: 0 0 .85rem; font-size: 1rem; }


.profileSettings .profileSection[open] > summary { color: var(--accent-text); }
.profileSettings .profileSection[open] .profileSectionTitle { color: var(--accent-text); }
.profileSettings .profileSectionContent { padding-inline: clamp(.75rem, 4vw, 1.15rem); }
.profileSettings #profile-personal form > .panel {
  padding: .9rem;
  margin: 0;
  border: 0;
  border-radius: .85rem;
  background: var(--surface);
}
.profileSettings #profile-personal form > .panel .field { min-width: 0; }
.profileSettings .appearancePanel {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .8rem;
}
.profileSettings .appearancePanel > .field { margin: 0; }
.profileSettings .appearancePanel > :not(.field) { grid-column: 1/-1; }
.profileSettings .appearancePanel > .characterSetting { margin-top: .4rem; border: 0; }
.profileSettings #profile-share .secondary { margin-top: .35rem; }
.profileSettings .backupSection { margin-bottom: 1rem; border: 0; padding-bottom: 0; }
.profileSettings .backupSection > h3 { margin: .65rem 0 .25rem; }
.profileSettings .backupSection .dataDeleteOptions { margin-block: .75rem; }
.profileSettings .backupSection .deviceDataRow { min-height: 48px; }

.bodyMetrics {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  margin: .35rem 0 .6rem;
  gap: .75rem;
  padding: .85rem;
  border-radius: .85rem;
}
.bodyMetrics dt { color: var(--focus-label); font-size: .94rem; }
.bodyMetrics dd {
  margin: .18rem 0 0;
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.weightTimeline { list-style: none; margin: 0; padding: 0; max-height: 17rem; overflow: auto; }
.weightTimeline li { display: flex; justify-content: space-between; gap: .5rem; padding: .62rem 0; }
.weightTimeline li + li { border-top: 1px solid var(--border); }
.weightTimeline time { color: var(--muted); }

.manualQuickGrid .manualCombo[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-soft-text);
}
.manualQuickGrid .manualCombo[aria-pressed="true"] span { color: inherit; }
.manualGroupChips .tag[aria-pressed="true"]:not([data-priority="true"]) {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-soft-text);
}

.profileBodyMetrics {
  margin-top: .9rem;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}
.profileBodyMetrics .bodyMetrics {
  margin: 0 0 .6rem;
  padding: 0;
  background: transparent;
}
.profileBodyMetrics .caption { margin: .25rem 0; color: var(--focus-label); }
.profileBodyMetrics .bmiStatus {
  width: fit-content;
  margin-top: .3rem;
  padding: .2rem .48rem;
  border-radius: .4rem;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: .875rem;
  line-height: 1.35;
}
.profileBodyMetrics .bmiStatus[data-status="in"] { background: var(--success-bg); color: var(--success-text); }
.manualFocus { min-height: 106px; }
.manualFocusEmpty {
  display: flex;
  align-items: center;
  background: var(--surface);
}
.manualFocusText label { color: var(--focus-label); font-size: .88rem; line-height: 1.3; }
.manualFocusText select {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: .45rem .55rem;
  border: 1px solid var(--control-border);
  border-radius: .65rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.manualFocusText p { line-height: 1.35; }
.manualGroupHeading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}
.manualGroupHeading > span { color: var(--muted); font-variant-numeric: tabular-nums; }
.manualGroupActions { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.manualGroupActions button { min-height: 44px; padding-inline: 0; }
.manualGroupActions button:disabled { opacity: .45; }
#workout-settings { overflow-anchor: none; }
@media (prefers-reduced-motion: no-preference) {
  .profileSettings summary::after { transition: transform .3s ease, color .3s ease; }
}

:root[data-theme] .manualGroupChips .tag[aria-pressed="true"][data-priority="true"] { background:var(--accent); color:var(--limeInk); border-color:var(--accent-border); }
.deleteScope svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
#profile-measurement-visibility svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }

#preparation-dialog .preparationRow { display:grid; grid-template-columns:58px minmax(0,1fr) 42px; gap:12px; min-height:82px; }
#preparation-dialog .preparationCharacter { display:grid; place-items:center; width:58px; height:64px; border-radius:10px; overflow:hidden; background:var(--surface2); }
#preparation-dialog .preparationCharacter img { width:100%; height:100%; object-fit:contain; }
#preparation-dialog .preparationText { min-width:0; }
#preparation-dialog .preparationAtlas,#preparation-dialog .preparationAtlas .muscleAtlas { width:42px; height:70px; overflow:hidden; }
#preparation-dialog .preparationAtlas svg { width:100%; height:100%; max-height:70px; }
.profileWeightHistory > summary { cursor:pointer; min-height:44px; color:var(--accent-text); }
.manualPrimaryChoices { display:flex; flex-wrap:wrap; gap:.35rem; }
.manualPrimaryChoices button { min-height:40px; padding:.4rem .6rem; border:1px solid var(--control-border); border-radius:.6rem; background:var(--surface); color:var(--ink); font:inherit; }
.manualPrimaryChoices button[aria-pressed="true"] { background:var(--accent); color:var(--limeInk); border-color:var(--accent-border); }

.profileBodyMetrics { position: relative; }
.profileBodyMetrics > [hidden] + .linkButton { position: static; }
.profileBodyMetrics #profile-measurement-visibility {
  display: grid;
  width: 44px;
  min-height: 44px;
  margin: 0 0 0 auto;
  padding: 8px;
  place-items: center;
  color: var(--focus-label);
}
.profileBodyMetrics > :not([hidden]) + .linkButton { position: absolute; inset: .35rem 0 auto auto; }
.profileBodyMetrics .bodyMetrics { padding-inline-end: 46px; }
.profileWeightHistory {
  padding: 0 .65rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
  background: var(--bg);
}
.profileWeightHistory > summary { align-content: center; }
.catalogEmpty p { margin: 0; }
.catalogEmpty .linkButton { min-height: 44px; }
.shell > .toast { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .appDialog[open] { animation: dialog-appear .24s ease-out; }
  @keyframes dialog-appear {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
