/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --cyan: #38bdf8;
  --bg: #0f172a;
  --bg2: #1e293b;
  --bg3: #162032;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --green: #4ade80;
  --red: #f87171;
  --gold: #fbbf24;
  --on-accent: #ffffff;
  --on-success: #052e16;
  --on-warning: #431407;
  --success-text: #86efac;
  --warning-text: #fed7aa;
  --info-text: #bae6fd;
  --chart-bg: #0f172a;
  --chart-panel: #1e293b;
  --chart-border: #334155;
  --chart-text: #f8fafc;
  --chart-muted: #cbd5e1;
  --chart-subtle: #94a3b8;
  --radius: 16px;
  --item-h: 52px;
  --drum-visible: 5;
  --font-scale: 1;
  --app-zoom: 1;
}
:root[data-theme-mode="light"] {
  --bg: #f8fafc;
  --bg2: #ffffff;
  --bg3: #e8eef7;
  --border: #94a3b8;
  --text: #0f172a;
  --muted: #334155;
  --accent-light: #6d28d9;
  --cyan: #0284c7;
  --green: #16a34a;
  --red: #dc2626;
  --gold: #d97706;
  --success-text: #166534;
  --warning-text: #9a3412;
  --info-text: #075985;
}
html, body { height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: calc(16px * var(--font-scale)); overscroll-behavior: none;
  transition: background-color .18s ease, color .18s ease; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
button:disabled { cursor: not-allowed; opacity: .52; }
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}
input  { font: inherit; color: inherit; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; width: 100%; outline: none; }
textarea { font: inherit; color: inherit; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; width: 100%; outline: none; resize: vertical; min-height: 90px; }
select { font: inherit; color: inherit; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; width: 100%; outline: none; }
input:focus { border-color: var(--accent); }
textarea:focus { border-color: var(--accent); }
select:focus { border-color: var(--accent); }

/* ── Screen system ────────────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  height: calc(100vh / var(--app-zoom));
  height: calc(100svh / var(--app-zoom));
  height: calc(100dvh / var(--app-zoom));
  width: calc(100vw / var(--app-zoom));
  overflow: hidden;
  transform-origin: top left;
}
.screen.active {
  display: flex;
  transform: scale(var(--app-zoom));
}

/* ── Login ────────────────────────────────────────────────────────────── */
#s-login { justify-content: center; align-items: center; padding: 32px; gap: 20px; }
.login-logo { font-size: 48px; margin-bottom: 8px; }
.login-title { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.login-sub   { color: var(--muted); font-size: 14px; }
.login-form  { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.login-btn {
  background: var(--accent); color: #fff; border-radius: 12px;
  padding: 14px; font-size: 16px; font-weight: 600; letter-spacing: 0.2px;
  transition: opacity .15s;
}
.login-btn:active { opacity: .8; }
.login-err { color: var(--red); font-size: 13px; text-align: center; min-height: 18px; }

/* ── Top nav ──────────────────────────────────────────────────────────── */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px; background: var(--bg2);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
  padding-top: max(16px, env(safe-area-inset-top));
}
.topnav-title { font-size: 18px; font-weight: 700; flex: 0 0 auto; }
.topnav-user  {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  margin: 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.topnav-user-chip {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topnav-user-search-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}
.topnav-user-search {
  width: min(220px, 100%);
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
}
.topnav-user-search::placeholder { color: var(--muted); }
.topnav-user-search-status {
  font-size: 11px;
  color: var(--red);
  margin-top: 4px;
  text-align: center;
}
.topnav-btn   { font-size: 22px; padding: 4px 8px; border-radius: 8px; color: var(--muted); }
.topnav-btn:active { background: var(--bg3); color: var(--text); }

/* ── Bottom tab bar ───────────────────────────────────────────────────── */
.tabbar {
  display: flex; background: var(--bg2); border-top: 1px solid var(--border);
  flex-shrink: 0;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 10px 2px 8px; font-size: 11px; color: var(--muted);
  min-width: 0; transition: color .15s; border-top: 2px solid transparent;
}
.tab.active { color: var(--cyan); border-top-color: var(--cyan); }
.tab-icon { font-size: 20px; line-height: 1.2; }
.tab span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }

/* ── Scrollable page body ─────────────────────────────────────────────── */
.page-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* ── Home page ────────────────────────────────────────────────────────── */
.home-greeting { padding: 26px 20px 4px; font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.home-sub      { padding: 0 20px 6px; color: var(--muted); font-size: 14px; }
.home-ai-coach-countdown {
  margin: 0 20px 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .01em;
}
.home-ai-coach-countdown-text { min-width: 0; }
.home-ai-coach-countdown::before {
  content: "AI";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0284c7, #22c55e);
  font-size: 10px;
  font-weight: 950;
}
.home-codex-status-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-left: 2px;
  font-size: 13px;
}
.home-codex-status-btn.has-usage {
  width: auto;
  min-width: 24px;
  padding: 0 7px;
  font-size: 11px;
}
.home-ai-note  {
  margin: 0 16px 16px; background: var(--bg2); border-radius: var(--radius);
  padding: 14px 16px; font-size: 14px; color: var(--muted); line-height: 1.5;
  border-left: 3px solid var(--accent);
}
.home-coaching-notes {
  margin: 0 16px 16px;
  border: 1px solid rgba(56,189,248,.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(56,189,248,.14), transparent 42%),
    linear-gradient(135deg, rgba(15,23,42,.04), rgba(34,197,94,.08)),
    var(--bg2);
  overflow: hidden;
}
.home-coaching-notes summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.home-coaching-notes summary::-webkit-details-marker { display: none; }
.home-coaching-eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.home-coaching-title {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--text);
}
.home-coaching-toggle {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
  font-weight: 900;
}
.home-coaching-notes[open] .home-coaching-toggle { transform: rotate(45deg); }
.home-training-status {
  margin: 12px 0;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border) 70%);
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 8%, var(--card) 92%), var(--card));
  overflow: hidden;
}
.home-training-status summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 13px 15px;
}
.home-training-status summary::-webkit-details-marker { display: none; }
.home-training-status-badge {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--border) 55%);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, var(--bg2) 90%);
  font-size: 11px;
  font-weight: 900;
}
.home-training-status-body { padding: 0 15px 14px; }
.home-training-muscles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.home-training-muscle {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 9px;
  background: var(--bg2);
}
.home-training-muscle-name { color: var(--text); font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-training-muscle-dose { color: var(--muted); font-size: 11px; margin-top: 3px; }
.home-training-muscle[data-state="fatigue_rising"] { border-color: rgba(249,115,22,.48); }
.home-training-muscle[data-state="below_recent_dose"] { border-color: rgba(59,130,246,.42); }
.home-training-experiment {
  margin-top: 9px;
  border-radius: 12px;
  padding: 9px 10px;
  background: color-mix(in srgb, var(--accent) 9%, var(--bg2) 91%);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}
.home-training-experiment-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-training-experiment-state {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border) 52%);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent);
  background: var(--bg2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.home-training-experiment-change { margin-top: 7px; font-weight: 750; }
.home-training-experiment-steps {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 7px;
  color: var(--text);
}
.home-training-experiment-steps div { margin-top: 3px; }
.home-training-experiment-success { margin-top: 7px; color: var(--muted); }
.home-training-status-note { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.4; }
@media (max-width: 430px) {
  .home-training-status summary { padding: 11px 12px; }
  .home-training-status-body { padding: 0 12px 12px; }
  .home-training-muscles { grid-template-columns: 1fr 1fr; gap: 6px; }
  .home-training-experiment-head { align-items: flex-start; }
}
.home-coaching-body {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.home-coaching-summary {
  color: var(--text);
  font-weight: 650;
}
.home-coaching-bullets {
  margin: 10px 0 0;
  padding-left: 18px;
}
.home-coaching-bullets li { margin: 6px 0; }
.home-coaching-meta {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  opacity: .9;
}
/* Stats grid */
.home-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 0 16px 20px;
}
.home-stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  min-width: 0;
  overflow: hidden;
}
.home-stat-card.gains-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
}
.home-stat-card.summary-card {
  grid-column: 1 / -1;
  padding: 12px 14px;
}
.home-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.home-summary-item {
  min-width: 0;
  padding: 0 8px;
  border-right: 1px solid var(--border);
}
.home-summary-item:first-child { padding-left: 0; }
.home-summary-item:last-child { border-right: 0; padding-right: 0; }
.home-stat-label {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; font-weight: 600;
}
.home-stat-value { font-size: 30px; font-weight: 800; color: var(--text); margin-top: 4px; line-height: 1; }
.home-summary-item .home-stat-value { font-size: 23px; }
.home-stat-sub   { font-size: 12px; color: var(--muted); margin-top: 4px; }
.home-gains-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  min-height: 62px;
  justify-content: center;
}
.home-gain-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.home-gain-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.home-gain-value {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
  white-space: nowrap;
  text-align: right;
}
.home-gain-empty {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.home-plan-strip {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px;
  padding: 0 16px 20px;
}
.home-plan-day {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 6px; text-align: center; min-width: 0;
}
.home-plan-day.today { box-shadow: 0 0 0 1px var(--accent) inset; }
.home-plan-day.done { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10); }
.home-plan-day.rest { border-color: rgba(148,163,184,.28); background: rgba(148,163,184,.08); }
.home-plan-day.planned { border-color: rgba(56,189,248,.35); background: rgba(56,189,248,.10); }
.home-plan-day.missed { border-color: rgba(239,68,68,.38); background: rgba(239,68,68,.10); }
.home-plan-day.off { opacity: .72; }
.home-plan-day-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.home-plan-day-status { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1; margin-top: 6px; }
.home-plan-day-sub { font-size: 10px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-plan-note {
  padding: 0 16px 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.setting-help-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.setting-help-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(148,163,184,.12);
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
}
:root[data-theme-mode="light"] .setting-help-icon {
  border-color: rgba(59,130,246,.28);
  background: rgba(59,130,246,.12);
  color: #1e3a8a;
}
.setting-help-icon:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.ai-review-history-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg3);
  overflow: hidden;
}
.ai-review-history-head {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
}
.ai-review-history-toggle {
  flex: 1;
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-review-history-toggle:active {
  background: rgba(148,163,184,.08);
}
.ai-review-history-delete {
  align-self: flex-start;
  color: var(--red);
  border: 1px solid rgba(248,113,113,.28);
  background: rgba(248,113,113,.1);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.ai-review-history-delete:active {
  background: rgba(248,113,113,.18);
}
.ai-review-history-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ai-review-history-caret {
  color: var(--muted);
  font-size: 12px;
  transition: transform .15s ease;
}
.ai-review-history-toggle[aria-expanded="true"] .ai-review-history-caret {
  transform: rotate(90deg);
}
.ai-review-history-body {
  padding: 0 14px 14px;
}

/* Action buttons row */
.home-actions {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  padding: 0 16px 20px;
}
.home-actions.rest-available { grid-template-columns: minmax(0, 1fr) minmax(130px, .34fr); }
.home-rest-today-btn {
  min-height: 52px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg2); color: var(--text); font-size: 14px; font-weight: 850; text-align: center;
}
.home-rest-today-btn:active { background: var(--bg3); }
.home-rest-today-btn:disabled { opacity: .6; }
.home-actions.voice-enabled { grid-template-columns: minmax(0, 1fr) auto auto; }
.home-plan-action-banner {
  margin: 0 16px 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--gold) 58%, var(--border) 42%);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--gold) 18%, transparent 82%), transparent 46%),
    color-mix(in srgb, var(--gold) 8%, var(--bg2) 92%);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--gold) 13%, transparent 87%);
}
.home-plan-action-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--gold) 34%, transparent 66%);
}
.home-plan-action-content { min-width: 0; }
.home-plan-action-eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-plan-action-title {
  margin-top: 3px;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
}
.home-plan-action-copy {
  margin-top: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.48;
}
.home-plan-action-cta {
  width: 100%;
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 7px 18px rgba(34,197,94,.23);
}
.home-plan-action-cta:active { transform: translateY(1px); }
@media (max-width: 430px) {
  .home-actions.rest-available { grid-template-columns: minmax(0, 1fr) minmax(112px, .42fr); }
  .home-rest-today-btn { min-height: 50px; padding-inline: 10px; }
  .home-plan-action-banner { margin: 0 12px 14px; padding: 12px; gap: 10px; border-radius: 16px; }
  .home-plan-action-icon { width: 32px; height: 32px; font-size: 18px; }
  .home-plan-action-title { font-size: 16px; }
  .home-plan-action-copy { font-size: 12px; }
  .home-plan-action-cta { min-height: 46px; margin-top: 10px; }
}
.start-workout-btn {
  background: var(--accent); color: #fff;
  border-radius: 14px; padding: 16px; font-size: 16px; font-weight: 700;
  text-align: center; box-shadow: 0 4px 20px rgba(124,58,237,.3);
}
.start-workout-btn:active { opacity: .85; }
.home-manage-btn {
  background: var(--bg2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 0 16px; font-size: 13px; font-weight: 600; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.voice-mode-entry {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 30px rgba(37,99,235,.24);
}
.voice-mode-entry:active { opacity: .86; }
.home-manage-btn:active { background: var(--bg3); }

/* Section headers */
.home-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px 10px;
}
.home-section-actions {
  display: flex; align-items: center; gap: 8px;
}
.home-today-section-header .home-section-actions { min-width: 0; margin-left: auto; }
.home-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
}
.home-section-action {
  font-size: 12px; font-weight: 700; color: var(--accent-light);
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px;
}
.home-today-section-header .home-section-action { white-space: nowrap; }
.home-section-action:active { background: var(--bg3); }
.home-today-more-wrap {
  position: relative; display: none; flex: 0 0 auto;
}
.home-today-more-btn {
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); display: inline-flex; align-items: center;
  justify-content: center; font-size: 24px; line-height: 1; padding: 0;
}
.home-today-more-menu {
  position: absolute; top: 40px; right: 0; z-index: 6;
  width: min(240px, calc((100vw - 32px) / var(--app-zoom)));
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 12px;
  display: none; flex-direction: column; gap: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.home-today-more-row { display: flex; gap: 8px; }
.home-today-more-status {
  min-height: 16px; font-size: 12px; color: var(--muted); text-align: center;
}
@media (max-width: 380px) {
  .home-today-section-header { padding-inline: 14px; gap: 6px; }
  .home-today-section-header .home-section-actions { gap: 6px; }
  .home-today-section-header .home-section-action { padding-inline: 9px; }
}
@media (max-width: 340px) {
  .home-today-section-header { padding-inline: 10px; }
  .home-today-section-header .home-section-title { font-size: 10px; }
  .home-today-section-header .home-section-actions { gap: 4px; margin-right: 12px; }
  .home-today-section-header .home-section-action { font-size: 11px; padding-inline: 7px; }
}
.missed-workouts-list {
  margin: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.missed-workout-card {
  border: 1px solid rgba(245,158,11,.32);
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(239,68,68,.08));
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.missed-workout-date {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.missed-workout-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-top: 3px;
  line-height: 1.2;
}
.missed-workout-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.missed-workout-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.missed-workout-btn {
  background: #f97316;
  color: #fff;
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(249,115,22,.24);
}
.missed-workout-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.missed-workout-more-wrap { align-self: flex-end; }
.missed-workout-card.is-dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 32%, transparent);
}
.missed-workout-btn.secondary {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.missed-workout-btn:active { opacity: .86; }

/* Keep old section-label for admin/other screens */
.section-label {
  padding: 4px 20px 10px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .8px; color: var(--muted);
}

/* Muscle group badges */
.muscle-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  padding: 2px 7px; border-radius: 999px; flex-shrink: 0;
}
.badge-Chest      { background: rgba(220,38,38,.2);   color: #fca5a5; }
.badge-Back       { background: rgba(37,99,235,.2);   color: #93c5fd; }
.badge-Shoulders  { background: rgba(124,58,237,.2);  color: #c4b5fd; }
.badge-Biceps     { background: rgba(22,163,74,.2);   color: #86efac; }
.badge-Triceps    { background: rgba(217,119,6,.2);   color: #fcd34d; }
.badge-Legs       { background: rgba(139,92,246,.2);  color: #c4b5fd; }
.badge-Thighs     { background: rgba(234,88,12,.2);   color: #fdba74; }
.badge-Hamstrings { background: rgba(161,98,7,.2);    color: #fde68a; }
.badge-Glutes     { background: rgba(236,72,153,.2);  color: #f9a8d4; }
.badge-Core       { background: rgba(6,182,212,.2);   color: #67e8f9; }
.badge-Calves     { background: rgba(20,184,166,.2);  color: #6ee7b7; }
.badge-Forearms   { background: rgba(245,158,11,.2);  color: #fbbf24; }
:root[data-theme-mode="light"] .muscle-badge { color: #111827; }
.badge-Other      { background: rgba(148,163,184,.2); color: #94a3b8; }

.workout-card {
  margin: 0 16px 10px; background: var(--bg2); border-radius: var(--radius);
  padding: 16px; display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border);
}
.workout-card:active { border-color: var(--accent); }
.workout-card-date { font-weight: 700; font-size: 15px; }
.workout-card-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.workout-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.workout-card-arrow { margin-left: auto; color: var(--muted); font-size: 18px; }
.plan-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px; }
.plan-item {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; display: flex; align-items: center; gap: 10px;
}
.plan-item-main { flex: 1; min-width: 0; }
.plan-item-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exercise-variation-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}
.plan-item-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.plan-item-target {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}
.plan-item-target.loading {
  color: var(--muted);
  font-weight: 700;
}
.plan-item-e1rm {
  font-size: 12px; color: var(--gold); margin-top: 3px; line-height: 1.25;
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
}
.plan-item-actions {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.plan-item-remove,
.plan-item-swap {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; padding: 0; font-size: 17px; line-height: 1; font-weight: 800; flex-shrink: 0;
}
.plan-item-remove {
  color: var(--red); background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.2);
}
.plan-item-swap {
  width: auto; min-width: 52px; padding: 0 9px; font-size: 11px; letter-spacing: .02em;
  color: #eff6ff; background: linear-gradient(135deg, #1d4ed8, #2563eb 58%, #38bdf8);
  border: 1px solid rgba(29, 78, 216, 0.28); box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}
.plan-item-actions .yt-link-btn,
.plan-item-actions .ig-link-btn { box-shadow: 0 8px 16px rgba(255,45,45,.18); }
.plan-item-remove:active,
.plan-item-swap:active { transform: translateY(1px); opacity: .9; }
@media (max-width: 430px) {
  .home-section-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .home-today-more-btn {
    width: 44px;
    height: 44px;
  }
  .plan-item-remove,
  .plan-item-swap {
    min-height: 44px;
  }
  .plan-item-remove {
    width: 44px;
    height: 44px;
  }
  .plan-item-actions .yt-link-btn.mini,
  .plan-item-actions .ig-link-btn.mini {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
}
.plan-add-btn {
  margin: 0 16px 16px; background: var(--bg2); color: var(--accent-light);
  border: 1px dashed var(--border); border-radius: 12px; padding: 14px; width: calc(100% - 32px);
  text-align: center; font-weight: 600;
}
.upcoming-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 20px; }
.upcoming-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 16px;
  cursor: pointer; transition: border-color .15s;
}
.upcoming-card:not(.upcoming-rest):active { border-color: var(--accent); }
.upcoming-card-head { display: flex; align-items: flex-start; gap: 12px; }
.upcoming-card-main { flex: 1; min-width: 0; }
.upcoming-date { font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; letter-spacing: .03em; }
.upcoming-date.editable { color: var(--accent-light); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.upcoming-title { font-size: 16px; font-weight: 700; }
.upcoming-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.upcoming-muscle-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.upcoming-rest { border-left: 3px solid var(--border); cursor: default; }
.upcoming-start-btn {
  margin-top: 12px; background: var(--accent); color: #fff; border-radius: 10px;
  padding: 12px 14px; font-size: 14px; font-weight: 700; width: 100%; text-align: center;
}
.upcoming-start-btn:active { opacity: .8; }
.upcoming-start-btn.top-start {
  margin-top: 8px; margin-bottom: 4px;
}
.upcoming-card-actions {
  display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0;
}
.upcoming-card.is-dragging { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 32%, transparent); }
.upcoming-move-tray {
  position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center;
  padding: 18px; background: rgba(2,6,23,.62); backdrop-filter: blur(5px);
}
.upcoming-move-sheet {
  width: min(980px,100%); max-height: min(84dvh,720px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--border); border-radius: 22px; padding: 18px;
  background: var(--bg2); color: var(--text); box-shadow: 0 24px 70px rgba(0,0,0,.46);
}
.upcoming-move-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.upcoming-move-kicker { color: var(--accent-light); font-size: 11px; font-weight: 900; letter-spacing: .09em; }
.upcoming-move-title { margin-top: 3px; font-size: 19px; font-weight: 900; }
.upcoming-move-help { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.upcoming-move-close {
  width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg3); color: var(--text); font-size: 26px; line-height: 1;
}
.upcoming-drop-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.upcoming-move-empty {
  grid-column: 1 / -1; padding: 16px; border: 1px dashed var(--border);
  border-radius: 14px; color: var(--muted); text-align: center; font-size: 13px;
}
.upcoming-drop-day {
  min-width: 0; min-height: 82px; padding: 10px 6px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg3); color: var(--text); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; text-align: center;
}
.upcoming-drop-day:not(:disabled):active,
.upcoming-drop-day.is-drag-over { border-color: var(--green); background: color-mix(in srgb,var(--green) 18%,var(--bg3)); transform: translateY(-2px); }
.upcoming-drop-day.is-current { border-color: var(--accent); }
.upcoming-drop-day.upcoming-drop-other {
  border-style: dashed; border-color: color-mix(in srgb,var(--accent-light) 62%,var(--border));
  background: color-mix(in srgb,var(--accent) 10%,var(--bg3));
}
.upcoming-drop-day.is-full,
.upcoming-drop-day.is-past { opacity: .48; }
.upcoming-drop-weekday { font-size: 14px; font-weight: 900; text-transform: uppercase; }
.upcoming-drop-date { font-size: 12px; color: var(--muted); }
.upcoming-drop-capacity { font-size: 11px; font-weight: 800; color: var(--accent-light); }
.upcoming-move-status { min-height: 20px; margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.upcoming-more-wrap {
  position: relative; flex-shrink: 0;
}
.upcoming-more-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); display: inline-flex; align-items: center;
  justify-content: center; font-size: 28px; line-height: 1; padding: 0;
}
.upcoming-more-btn:active { background: var(--bg3); }
.upcoming-more-menu {
  position: absolute; top: 46px; right: 0; z-index: 5; width: min(240px, calc(100vw - 56px));
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 12px;
  display: none; flex-direction: column; gap: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.upcoming-more-menu-row { display: flex; gap: 8px; }
.upcoming-more-menu-btn {
  flex: 1; min-height: 42px; border-radius: 10px; padding: 10px 12px; font-size: 13px;
  font-weight: 700; border: 1px solid var(--border); background: var(--bg2); color: var(--text);
}
.upcoming-more-menu-btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.upcoming-more-menu-btn.upcoming-menu-move {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: color-mix(in srgb, var(--green) 14%, var(--bg2));
  border-color: color-mix(in srgb, var(--green) 52%, var(--border)); color: var(--text);
}
.upcoming-more-menu-btn.upcoming-menu-move span { font-size: 17px; }
.upcoming-copy-label { margin-bottom: -5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.upcoming-more-menu-btn.danger {
  background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.28); color: #fca5a5;
}
.upcoming-more-status {
  min-height: 16px; font-size: 12px; color: var(--muted); text-align: center;
}
.upcoming-plan-action-copy {
  color: var(--muted); font-size: 13px; line-height: 1.45; margin: 4px 0 10px;
}
.upcoming-plan-action-status {
  min-height: 18px; color: var(--muted); font-size: 13px; text-align: center; margin-bottom: 8px;
}
.upcoming-plan-action-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upcoming-plan-action-actions > button { flex: 1 1 110px; min-width: 0; margin: 0; }
.upcoming-plan-copy-action { background: var(--bg2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
@media (max-width: 640px) {
  .upcoming-card-head {
    gap: 10px;
  }
  .upcoming-card-actions {
    gap: 6px;
  }
  .upcoming-move-tray { padding: 0; }
  .upcoming-move-sheet {
    width: 100%; max-height: min(88dvh,760px); border-radius: 24px 24px 0 0;
    padding: 16px max(14px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
  }
  .upcoming-drop-week { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .upcoming-drop-day { min-height: 76px; }
  .upcoming-more-btn {
    width: 44px; height: 44px; font-size: 30px;
  }
  .upcoming-more-menu {
    width: min(260px, calc(100vw - 40px));
    right: -6px;
  }
  .upcoming-more-menu-row {
    flex-direction: column;
  }
  .upcoming-more-menu input[type="date"] {
    min-height: 44px; font-size: 16px;
  }
  .upcoming-more-menu-btn {
    width: 100%;
  }
}

.admin-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.program-builder-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.program-builder-mode-btn {
  min-width: 0; padding: 14px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); text-align: left; display: flex; flex-direction: column; gap: 4px;
}
.program-builder-mode-btn strong { font-size: 15px; line-height: 1.25; }
.program-builder-mode-btn small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.program-builder-mode-kicker { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.program-builder-mode-btn.active {
  border-color: color-mix(in srgb, var(--accent) 72%, white 8%);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, var(--bg2)), var(--bg2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 18%, transparent);
}
.program-builder-mode-btn.active .program-builder-mode-kicker { color: var(--accent-light); }
.program-builder-panel { display: flex; flex-direction: column; gap: 14px; }
.program-builder-panel[hidden] { display: none !important; }
.program-builder-panel-intro,
.program-builder-ai-hero {
  padding: 15px; border: 1px solid var(--border); border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 8%, var(--bg2)), var(--bg2));
}
.program-builder-ai-hero { border-color: color-mix(in srgb, #38bdf8 35%, var(--border)); }
.program-builder-ai-badge { color: #38bdf8; font-size: 10px; font-weight: 900; letter-spacing: .1em; margin-bottom: 6px; }
.program-builder-panel-title { color: var(--text); font-size: 17px; font-weight: 900; line-height: 1.25; }
.program-builder-panel-copy { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 5px; }
.program-builder-fixed-value {
  min-height: 48px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg3); display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.program-builder-fixed-value span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.program-builder-fixed-value strong { color: var(--text); font-size: 14px; }
.program-builder-ai-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.program-builder-ai-evidence span {
  padding: 9px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, #38bdf8 22%, var(--border));
  background: color-mix(in srgb, #38bdf8 7%, var(--bg3)); color: var(--text); font-size: 11px; text-align: center;
}
.admin-row { display: flex; flex-direction: column; gap: 8px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-week-list { display: flex; flex-direction: column; gap: 10px; }
.admin-day-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.admin-day-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-week-list .day-drag-handle { display: none; }
.admin-day-label { font-weight: 700; }
.admin-day-type { font-size: 12px; color: var(--muted); }
.admin-day-name { display: flex; flex-direction: column; gap: 6px; }
.admin-day-name label { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.admin-day-actions { display: flex; gap: 8px; }
.admin-chip {
  background: var(--bg3); color: var(--muted); border-radius: 999px; padding: 8px 10px; font-size: 12px;
}
.admin-chip.active { background: var(--accent); color: #fff; }
.admin-ex-summary { font-size: 13px; color: var(--muted); }
.admin-save-btn {
  background: var(--accent); color: #fff; border-radius: 12px; padding: 16px; text-align: center; font-weight: 700;
}
.admin-status { font-size: 13px; color: var(--muted); min-height: 18px; text-align: center; }
.admin-status.error { color: var(--red); }
.admin-status.ok { color: var(--green); }
@media (max-width: 520px) {
  .program-builder-mode { grid-template-columns: 1fr; }
  .program-builder-mode-btn { padding: 12px 13px; }
  .program-builder-panel .admin-grid { grid-template-columns: 1fr; }
  .program-builder-ai-evidence { grid-template-columns: 1fr; }
}
.app-feedback-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(18px);
  z-index: 2400;
  min-width: min(520px, calc(100vw - 24px));
  max-width: min(520px, calc(100vw - 24px));
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.app-feedback-bar.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.app-feedback-message {
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
}
.app-feedback-action,
.app-feedback-close {
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  flex-shrink: 0;
}
.app-feedback-action {
  background: #f59e0b;
  color: #111827;
}
.app-feedback-close {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.app-feedback-bar.no-action .app-feedback-action {
  display: none;
}
@media (max-width: 700px) {
  .app-feedback-bar {
    top: max(12px, env(safe-area-inset-top));
    bottom: auto;
    transform: translateX(-50%) translateY(-18px);
    max-height: min(32dvh, 180px);
  }
  .app-feedback-bar.open {
    transform: translateX(-50%) translateY(0);
  }
  .app-feedback-message {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
.ai-swap-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-swap-sheet {
  overflow-x: hidden;
  max-height: min(92dvh, calc(100vh - 18px));
}
.ai-swap-sheet * {
  max-width: 100%;
}
.ai-swap-sheet .modal-title {
  flex-shrink: 0;
}
.ai-swap-intro {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ai-swap-textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg3);
  color: var(--text);
  padding: 10px;
  font-size: 14px;
  resize: vertical;
}
.ai-swap-permanent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg3);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(34, 197, 94, .22);
  touch-action: manipulation;
}
.ai-swap-permanent > span {
  min-width: 0;
}
.ai-swap-permanent input {
  width: 28px;
  height: 28px;
  min-width: 28px;
  margin: 0;
  accent-color: var(--green);
  flex-shrink: 0;
  cursor: pointer;
  touch-action: manipulation;
}
.ai-swap-permanent-help {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.ai-swap-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-swap-summary {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.ai-swap-option {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg3);
}
.ai-swap-option-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.ai-swap-option-main {
  min-width: 0;
}
.ai-swap-option-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ai-swap-option-title-row .exercise-media-links {
  margin-left: 0;
  flex-shrink: 0;
}
.ai-swap-option-title {
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.ai-swap-option-reason {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}
.ai-swap-option-sets {
  font-size: 12px;
  color: var(--accent-light);
  margin-top: 6px;
  line-height: 1.45;
}
.ai-swap-option-when {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.ai-swap-apply-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 16px;
  flex-shrink: 0;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .01em;
  box-shadow: 0 12px 24px rgba(34,197,94,.22);
  cursor: pointer;
  text-align: center;
}
.ai-swap-apply-btn:active {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(34,197,94,.18);
}
@media (max-width: 520px) {
  .ai-swap-sheet {
    padding: 14px 14px max(14px, env(safe-area-inset-bottom));
    gap: 10px;
    border-radius: 20px 20px 0 0;
  }
  .ai-swap-modal-body {
    gap: 10px;
  }
  .ai-swap-intro {
    font-size: 12px;
    line-height: 1.4;
  }
  .ai-swap-textarea {
    min-height: 82px;
    font-size: 16px;
  }
  .ai-swap-permanent {
    padding: 9px 10px;
    font-size: 12px;
  }
  .ai-swap-option {
    padding: 11px 12px;
  }
  .ai-swap-option-row {
    flex-direction: column;
  }
  .ai-swap-apply-btn {
    width: 100%;
    min-height: 48px;
    white-space: normal;
    text-align: center;
  }
}
.exercise-rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.exercise-rule-summary {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 520px) {
  .exercise-rule-grid {
    grid-template-columns: 1fr;
  }
}
.admin-focus-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-check {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); border-radius: 999px; padding: 8px 10px; font-size: 12px;
}
.admin-check input { width: auto; }
.program-list { display: flex; flex-direction: column; gap: 10px; }
.program-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 14px;
}
.program-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.program-card-title { font-size: 15px; font-weight: 700; }
.program-card-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.program-card-badge {
  background: var(--bg3); color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: 11px; white-space: nowrap;
}
.program-card-badge.active-badge { background: var(--accent); color: #fff; }
.program-card-days { font-size: 13px; color: var(--muted); margin-top: 8px; }
.program-card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.program-card-btn {
  flex: 1; min-width: 70px; background: var(--bg3); color: var(--text); border-radius: 10px;
  padding: 10px 8px; font-size: 12px; font-weight: 600; text-align: center;
}
.program-card-btn:active { opacity: .7; }
.program-card-btn.danger { color: var(--red); }
.week-flow-modal {
  display: flex; flex-direction: column; gap: 12px;
}
.week-flow-note {
  font-size: 13px; color: var(--muted); line-height: 1.45;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
}
.week-flow-grid { display: flex; flex-direction: column; gap: 8px; }
.week-flow-row {
  display: grid; grid-template-columns: 108px 1fr; gap: 10px; align-items: center;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 10px;
}
.week-flow-target {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.week-flow-target strong { font-size: 13px; color: var(--text); }
.week-flow-target span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.week-flow-row select { min-width: 0; }
.week-flow-status { min-height: 18px; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) {
  .week-flow-row { grid-template-columns: 1fr; gap: 6px; }
  .week-flow-target { flex-direction: row; justify-content: space-between; align-items: baseline; }
}
/* ── Upcoming card expanded ───────────────────────────────────────────── */
.upcoming-card { transition: border-color .15s, box-shadow .15s; }
.upcoming-card.expanded { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.upcoming-detail-hidden { display: none; }
.upcoming-card.expanded .upcoming-detail-hidden { display: block; }
.upcoming-card-chevron { color: var(--muted); font-size: 14px; transition: transform .2s; margin-left: auto; flex-shrink: 0; }
.upcoming-card.expanded .upcoming-card-chevron { transform: rotate(180deg); }
.upcoming-ex-block {
  margin-top: 10px; background: var(--bg3); border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 0;
}
.upcoming-ex-block-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.upcoming-ex-block-head { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.upcoming-ex-latest {
  font-size: 12px; color: var(--muted); font-weight: 600;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
}
.uex-progress-btn {
  align-self: flex-start; flex-shrink: 0; font-size: 11px; color: var(--accent-light);
  font-weight: 600; background: none; padding: 2px 0; white-space: nowrap;
}
.uex-swap-btn {
  width: auto; min-width: 54px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(29, 78, 216, .28);
  background: linear-gradient(135deg, #1d4ed8, #2563eb 58%, #38bdf8);
  color: #eff6ff; font-size: 11px; font-weight: 900; letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}
.uex-swap-btn:active { transform: translateY(1px); opacity: .88; }
.uex-remove-btn {
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.12); color: var(--red); font-size: 16px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.uex-remove-btn:active { transform: translateY(1px); opacity: .88; }
.uex-action-stack {
  display: flex; flex-direction: column; gap: 6px; align-items: center; flex-shrink: 0;
}
.uex-action-stack .yt-link-btn { box-shadow: 0 8px 16px rgba(255,45,45,.16); }
.uex-progress-btn:active { opacity: .7; }

@media (max-width: 520px) {
  .upcoming-ex-block-name {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }
  .upcoming-ex-block-head {
    min-width: 0;
  }
  .uex-action-stack {
    align-self: start;
    gap: 7px;
  }
  .uex-swap-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }
  .uex-remove-btn,
  .uex-action-stack .yt-link-btn.mini,
  .uex-action-stack .ig-link-btn.mini {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    padding: 0;
  }
  .uex-remove-btn { font-size: 14px; }
  .uex-swap-btn {
    width: auto;
    min-width: 56px;
    padding: 0 10px;
  }
}

/* ── History (read-only reference) ──────────────── */
.uex-history { margin-bottom: 10px; }
.uex-history-date {
  font-size: 11px; color: var(--muted); font-weight: 600;
  margin-bottom: 6px; letter-spacing: .02em;
}
.uex-hist-row {
  display: grid;
  grid-template-columns: 18px 1fr auto auto;
  align-items: center; gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(51,65,85,.5);
}
.uex-hist-row:last-child { border-bottom: none; }
.uex-hist-num  { font-size: 10px; color: var(--muted); font-weight: 700; }
.uex-hist-val  { font-size: 13px; font-weight: 600; color: var(--text); }
.uex-hist-e1rm { font-size: 12px; color: var(--cyan); font-weight: 700; text-align: right; }
.uex-hist-pb   {
  font-size: 9px; font-weight: 800; color: var(--gold);
  background: rgba(251,191,36,.15); border-radius: 4px;
  padding: 1px 5px; white-space: nowrap;
}
.uex-no-history { font-size: 12px; color: var(--muted); font-style: italic; margin-bottom: 8px; }

/* ── Target rows (editable, live e1RM) ────────────── */
.uex-targets-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 6px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.uex-targets-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
}
.uex-save-btn {
  background: var(--accent); color: #fff; border-radius: 8px;
  padding: 5px 12px; font-size: 12px; font-weight: 700;
}
.uex-save-btn:active { opacity: .8; }
.uex-target-rows { display: flex; flex-direction: column; gap: 5px; }
.uex-target-row {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 8px;
  transition: border-color .15s, background .15s;
}
.uex-target-row.pb-hit {
  border-color: rgba(251,191,36,.45);
  background: rgba(251,191,36,.07);
}
.uex-t-num  { font-size: 10px; color: var(--muted); font-weight: 700; width: 16px; text-align: center; flex-shrink: 0; }
.uex-t-sep  { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.uex-t-e1rm { font-size: 12px; color: var(--cyan); font-weight: 700; flex: 1; text-align: right; white-space: nowrap; }
.uex-t-pb   { font-size: 9px; font-weight: 800; color: var(--gold); white-space: nowrap; flex-shrink: 0; min-width: 0; }
.uex-t-input {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 14px; font-weight: 700;
  padding: 5px 4px; text-align: center;
  -moz-appearance: textfield; width: 62px; flex-shrink: 0;
}
.uex-t-input.narrow { width: 44px; }
.uex-t-input::-webkit-inner-spin-button,
.uex-t-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.uex-t-input:focus { border-color: var(--accent); outline: none; }
.uex-add-set-btn {
  margin-top: 6px; background: none; border: 1px dashed var(--border);
  border-radius: 8px; padding: 7px; font-size: 12px; font-weight: 600;
  color: var(--accent-light); width: 100%; text-align: center;
}
.uex-add-set-btn:active { background: var(--bg3); }
.uex-save-status {
  font-size: 11px; color: var(--green); text-align: center;
  min-height: 14px; margin-top: 5px; transition: opacity .3s;
}

/* ── Program edit screen ──────────────────────────────────────────────── */
.prog-edit-day-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.prog-edit-day-card.is-rest { border-left: 3px solid var(--muted); }
.prog-edit-day-card.is-workout { border-left: 3px solid var(--accent); }
.prog-edit-day-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.prog-edit-day-label { font-weight: 700; font-size: 15px; }
.prog-edit-day-date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.prog-edit-ex-list { display: flex; flex-direction: column; gap: 6px; }
.prog-edit-ex-row {
  display: flex; align-items: center; gap: 10px; background: var(--bg3);
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.prog-edit-ex-name { flex: 1; font-weight: 500; }
.prog-edit-ex-group { font-size: 12px; color: var(--muted); }
.prog-edit-ex-remove {
  background: none; color: var(--muted); font-size: 18px; padding: 0 4px; border-radius: 6px;
  flex-shrink: 0;
}
.prog-edit-ex-remove:active { color: var(--red); background: var(--bg); }

/* ── Drag & drop ──────────────────────────────────────────────────────── */
.drag-handle {
  font-size: 18px; line-height: 1; color: var(--border);
  cursor: grab; flex-shrink: 0; padding: 4px 8px 4px 2px;
  touch-action: none; user-select: none;
}
.drag-handle:active { cursor: grabbing; color: var(--muted); }
.sortable-dragging {
  opacity: 0.3 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
}
.sortable-ghost {
  border: 2px dashed var(--accent) !important;
  background: rgba(124,58,237,.07) !important;
  border-radius: 12px;
  pointer-events: none;
}

.prog-edit-add-btn {
  background: var(--bg3); border: 1px dashed var(--border); border-radius: 10px;
  padding: 10px; font-size: 13px; color: var(--accent-light); text-align: center; font-weight: 600;
}
.prog-edit-week-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); padding: 4px 0 2px;
}
.prog-save-bar {
  position: sticky; bottom: 0; background: var(--bg); padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.prog-save-btn {
  background: var(--accent); color: #fff; border-radius: 12px; padding: 16px;
  text-align: center; font-weight: 700; font-size: 16px; width: 100%;
}
.prog-save-status { font-size: 13px; color: var(--muted); text-align: center; margin-top: 6px; min-height: 18px; }

/* ── Exercise picker ──────────────────────────────────────────────────── */
.ex-search-wrap { padding: 12px 16px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.ex-search { width: 100%; padding: 12px 14px 12px 40px; }
.ex-search-wrap { position: relative; }
.ex-filter-panel {
  margin: 0 16px 10px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg2); overflow: hidden;
}
.ex-filter-panel summary {
  cursor: pointer; list-style: none; padding: 12px 14px; color: var(--text);
  font-size: 14px; font-weight: 800; display: flex; align-items: center;
  justify-content: space-between; min-height: 44px;
}
.ex-filter-panel summary::-webkit-details-marker { display: none; }
.ex-filter-panel summary::after { content: '+'; color: var(--accent-light); font-size: 20px; line-height: 1; }
.ex-filter-panel[open] summary::after { content: '−'; }
.ex-filter-panel-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.ex-filter { margin: 0; padding-left: 10px; width: 100%; }
.ex-filter-toggle {
  margin: 0; display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; color: var(--text);
}
.ex-filter-toggle input {
  width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0;
}
.ex-filter-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-filter-toggle-sub { font-size: 12px; color: var(--muted); }
.ex-picker-instruction {
  margin: 0 16px 6px; color: var(--muted); font-size: 13px; font-weight: 700;
}
.ex-search-icon {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 17px; pointer-events: none;
}
.ex-item {
  display: flex; align-items: center; padding: 14px 20px;
  border-bottom: 1px solid var(--border); gap: 14px;
}
.ex-item:active { background: var(--bg3); }
.ex-item-main { flex: 1; min-width: 0; }
.ex-item-name-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ex-item-name { font-weight: 500; font-size: 16px; }
.ex-item-group { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ex-item-stats { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ex-item-icon { font-size: 20px; width: 32px; text-align: center; }
.ex-item-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 3px 7px; border-radius: 999px; background: rgba(251,191,36,.14); color: var(--gold);
}
.ex-item-badge.ai-verified {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 38%, transparent);
}
.video-ai-verification-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--green) 34%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 8%, var(--bg3));
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}
.ex-item-stats-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px;
}
.ex-db-tool-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  color: inherit;
  text-align: left;
}
.ex-db-tool-card-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.ex-db-tool-card-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.ex-video-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ex-video-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.ex-video-row-name {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}
.ex-video-row-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.ex-video-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ex-video-actions input {
  flex: 1 1 230px;
  min-width: 0;
}
@media (max-width: 520px) {
  .ex-video-row-head,
  .ex-video-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
.ex-item-view {
  background: var(--bg3); color: var(--accent-light); border-radius: 9px;
  padding: 7px 10px; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.ex-add-btn {
  margin: 16px; background: var(--bg2); border: 1px dashed var(--border);
  border-radius: 12px; padding: 16px; width: calc(100% - 32px);
  font-size: 15px; color: var(--muted); text-align: center;
}
.ex-add-btn:active { background: var(--bg3); }
/* ── Active workout ───────────────────────────────────────────────────── */
.workout-header {
  padding: 16px 20px; background: var(--bg2); border-bottom: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.workout-header-main { flex: 1; min-width: 0; }
.workout-title   { font-size: 18px; font-weight: 700; }
.workout-meta-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.workout-elapsed { font-size: 13px; color: var(--muted); }
.workout-home-btn {
  width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg3); color: var(--accent-light); display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; flex-shrink: 0; line-height: 1;
}
.workout-home-btn:active { background: var(--bg); color: var(--text); }
.workout-voice-btn {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 30px rgba(37,99,235,.24);
}
.workout-voice-btn:active { opacity: .86; }
.workout-codex-status-btn {
  font-weight: 900;
  font-size: 16px;
  border-width: 2px;
  box-shadow: 0 8px 22px rgba(15,23,42,.12);
}
.workout-codex-status-btn.has-usage {
  width: auto;
  min-width: 28px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}
.workout-codex-status-btn.ok {
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.82);
  color: var(--success-text);
}
.workout-codex-status-btn.bad {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.75);
  color: var(--red);
}
.workout-codex-status-btn.checking {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--muted);
}
.finish-btn {
  background: var(--green); color: var(--on-success); border-radius: 10px;
  padding: 8px 16px; font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.finish-btn:active { opacity: .8; }
.discard-btn {
  background: none; border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted); padding: 8px 12px; font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.discard-btn:active { background: var(--bg3); color: var(--red); }
@media (max-width: 640px) {
  .workout-header {
    padding: 10px 12px;
    gap: 8px;
    align-items: center;
  }
  .workout-title {
    font-size: clamp(15px, 1rem, 18px);
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .workout-meta-row {
    margin-top: 3px;
  }
  .discard-btn,
  .finish-btn {
    padding: 7px 9px;
    font-size: 12px;
  }
  .workout-home-btn {
    width: 30px;
    height: 30px;
  }
}
.rest-timer-bar {
  padding: 12px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
}
.rest-timer-bar::-webkit-scrollbar { display: none; }
.rest-timer-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.rest-timer-display {
  min-width: 64px; font-size: 18px; font-weight: 700; color: var(--accent-light);
}
.rest-timer-btn {
  background: var(--bg3); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.rest-timer-btn.primary { background: var(--accent); color: #fff; }
@media (min-width: 721px) {
  .rest-timer-bar.active {
    display: none;
  }
}
@media (max-width: 640px) {
  .rest-timer-bar {
    padding: 10px 12px;
    gap: 6px;
  }
  .rest-timer-label {
    margin-right: 0;
    font-size: 12px;
  }
  .rest-timer-display {
    min-width: 52px;
    font-size: 16px;
  }
  .rest-timer-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}

.ex-section { margin: 12px 16px; }
.workout-warmup-card {
  margin: 8px 16px 2px; background: color-mix(in srgb, var(--bg2) 86%, transparent); border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
}
.workout-warmup-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; text-align: left;
}
.workout-warmup-card.open { border-radius: 14px; }
.workout-warmup-main { min-width: 0; display: flex; align-items: center; gap: 8px; }
.workout-warmup-title {
  font-size: 13px; font-weight: 900; color: var(--text); white-space: nowrap;
}
.workout-warmup-sub {
  font-size: 12px; color: var(--muted); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.workout-warmup-chevron {
  width: 24px; height: 24px; border-radius: 999px; color: var(--accent-light); background: var(--bg3);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.workout-warmup-body {
  border-top: 1px solid var(--border); padding: 10px 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.workout-warmup-step {
  background: var(--bg3); border-radius: 10px; padding: 10px 12px;
}
.workout-warmup-step-title {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-light);
}
.workout-warmup-step-copy {
  font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 4px;
}
.workout-warmup-note {
  font-size: 12px; color: var(--muted); line-height: 1.45; padding: 0 2px;
}
.workout-stretch-card {
  margin: 8px 16px 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--bg2) 92%), color-mix(in srgb, var(--bg3) 88%, transparent));
  overflow: hidden;
}
.workout-stretch-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
}
.workout-stretch-title {
  font-size: 13px;
  font-weight: 950;
  color: var(--text);
}
.workout-stretch-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}
.workout-stretch-status {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg3);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.workout-stretch-card.done .workout-stretch-status {
  background: rgba(34,197,94,.14);
  color: var(--green);
}
.workout-stretch-card.skipped .workout-stretch-status {
  color: var(--muted);
}
.workout-stretch-body {
  border-top: 1px solid var(--border);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.workout-stretch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg2) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
}
.workout-stretch-name {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}
.workout-stretch-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.workout-stretch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.workout-stretch-action {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
}
.workout-stretch-action.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border-color: transparent;
}
@media (max-width: 420px) {
  .workout-stretch-row {
    grid-template-columns: 1fr;
  }
}
.workout-drills-page {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}
.workout-drills-hero {
  border-radius: 24px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent-light) 22%, transparent), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--bg2) 88%), var(--bg2));
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
}
.workout-drills-kicker {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.workout-drills-title {
  margin-top: 6px;
  font-size: clamp(30px, 8vw, 48px);
  line-height: .98;
  font-weight: 950;
  color: var(--text);
}
.workout-drills-sub {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}
.workout-drills-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}
.workout-drill-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg2) 92%, transparent), color-mix(in srgb, var(--bg3) 86%, transparent));
}
.workout-drill-name {
  font-size: 16px;
  font-weight: 950;
  color: var(--text);
}
.workout-drill-meta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.workout-drill-reason {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.workout-drills-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 10px;
  margin-top: 0;
  padding: 6px 0 max(2px, env(safe-area-inset-bottom));
  flex: 0 0 auto;
  background: linear-gradient(180deg, transparent, var(--bg) 18%, var(--bg));
}
.workout-drills-btn {
  border-radius: 18px;
  padding: 16px;
  font-size: 16px;
  font-weight: 950;
  border: 1px solid var(--border);
  min-height: 58px;
  line-height: 1.08;
  white-space: nowrap;
}
.workout-drills-btn.primary {
  color: var(--on-success);
  border-color: transparent;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  box-shadow: 0 14px 36px rgba(34,197,94,.28);
}
.workout-drills-btn.secondary {
  color: var(--text);
  background: var(--bg2);
}
@media (max-width: 420px) {
  .workout-drill-item { grid-template-columns: 1fr; }
  .workout-drills-actions { grid-template-columns: 1fr 1fr; }
}
html[data-display-size="large"] .workout-drills-page,
html[data-display-size="extra-large"] .workout-drills-page,
html[data-display-size="maximum"] .workout-drills-page {
  grid-template-rows: auto auto auto;
  gap: 8px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
}
html[data-display-size="large"] .workout-drills-list,
html[data-display-size="extra-large"] .workout-drills-list,
html[data-display-size="maximum"] .workout-drills-list {
  max-height: min(44dvh, 360px);
  padding-bottom: 8px;
}
html[data-display-size="large"] .workout-drills-hero,
html[data-display-size="extra-large"] .workout-drills-hero,
html[data-display-size="maximum"] .workout-drills-hero {
  padding: 14px;
  border-radius: 18px;
}
html[data-display-size="large"] .workout-drills-title,
html[data-display-size="extra-large"] .workout-drills-title,
html[data-display-size="maximum"] .workout-drills-title {
  font-size: clamp(24px, 6.4vw, 38px);
}
html[data-display-size="extra-large"] .workout-drills-sub,
html[data-display-size="maximum"] .workout-drills-sub {
  font-size: 13px;
}
html[data-display-size="large"] .workout-drill-item,
html[data-display-size="extra-large"] .workout-drill-item,
html[data-display-size="maximum"] .workout-drill-item {
  padding: 10px;
  border-radius: 14px;
}
html[data-display-size="large"] .workout-drills-btn,
html[data-display-size="extra-large"] .workout-drills-btn,
html[data-display-size="maximum"] .workout-drills-btn {
  min-height: 50px;
  padding: 12px;
  border-radius: 14px;
}
html[data-display-size="maximum"] .workout-drills-title {
  font-size: clamp(22px, 5.8vw, 34px);
}
html[data-display-size="maximum"] .workout-drills-sub {
  line-height: 1.34;
}
html[data-display-size="maximum"] .workout-drill-reason {
  line-height: 1.34;
}
@media (max-height: 720px) {
  .workout-drills-page {
    grid-template-rows: auto auto auto;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .workout-drills-hero {
    padding: 12px;
    border-radius: 18px;
  }
  .workout-drills-title {
    font-size: clamp(22px, 6vw, 34px);
  }
  .workout-drills-sub,
  .workout-drill-reason {
    line-height: 1.34;
  }
  .workout-drills-list {
    max-height: min(42dvh, 320px);
  }
  .workout-drills-btn {
    min-height: 48px;
    padding: 10px 12px;
  }
}
.stretch-db-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.stretch-db-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: calc(62dvh / var(--app-zoom));
  overflow: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
html[data-display-size="large"] .stretch-db-filter-grid,
html[data-display-size="extra-large"] .stretch-db-filter-grid,
html[data-display-size="maximum"] .stretch-db-filter-grid {
  grid-template-columns: 1fr;
}
html[data-display-size="extra-large"] .stretch-db-list,
html[data-display-size="maximum"] .stretch-db-list {
  max-height: calc(54dvh / var(--app-zoom));
}
.ex-section.ex-pb-hit {
  background: linear-gradient(180deg, rgba(251,191,36,0.10), rgba(251,191,36,0.03));
  border: 1px solid rgba(251,191,36,0.35);
  border-radius: 14px;
  padding: 12px;
}
.ex-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.ex-section-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.ex-section-name-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ex-section-name { font-size: 16px; font-weight: 700; }
.ex-section.ex-pb-hit .ex-section-name { color: var(--gold); }
.exercise-intent-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
  width: 100%;
}
.exercise-intent-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  color: var(--text);
}
.exercise-intent-badge.attack {
  border-color: rgba(34,197,94,.38);
  background: rgba(34,197,94,.14);
  color: #34d399;
}
.exercise-intent-badge.build {
  border-color: rgba(56,189,248,.35);
  background: rgba(56,189,248,.12);
  color: #38bdf8;
}
.exercise-intent-badge.hold {
  border-color: rgba(251,191,36,.38);
  background: rgba(251,191,36,.13);
  color: var(--gold);
}
.exercise-intent-badge.protect {
  border-color: rgba(248,113,113,.42);
  background: rgba(248,113,113,.13);
  color: #f87171;
}
.exercise-intent-info-btn {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg2) 90%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}
.exercise-intent-info-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}
.exercise-warmup-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid rgba(249,115,22,.48);
  background: linear-gradient(135deg, rgba(249,115,22,.18), rgba(251,191,36,.13));
  color: #f97316;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(249,115,22,.10);
  cursor: pointer;
}
.exercise-warmup-chip-btn:active {
  transform: translateY(1px);
}
.exercise-form-video-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid rgba(56,189,248,.52);
  background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(14,165,233,.15));
  color: #38bdf8;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(14,165,233,.10);
  cursor: pointer;
}
.exercise-form-video-chip-btn:active { transform: translateY(1px); }
.exercise-personal-cues-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid rgba(16,185,129,.52);
  background: linear-gradient(135deg, rgba(16,185,129,.20), rgba(34,197,94,.14));
  color: #34d399;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(16,185,129,.10);
  cursor: pointer;
}
.exercise-personal-cues-chip-btn:active { transform: translateY(1px); }
:root[data-theme-mode="light"] .exercise-warmup-chip-btn {
  color: #9a3412;
}
:root[data-theme-mode="light"] .exercise-form-video-chip-btn { color: #075985; }
:root[data-theme-mode="light"] .exercise-personal-cues-chip-btn { color: #047857; }
:root[data-theme-mode="light"] .exercise-intent-badge.attack,
:root[data-theme-mode="light"] .exercise-intent-badge.build,
:root[data-theme-mode="light"] .exercise-intent-badge.hold,
:root[data-theme-mode="light"] .exercise-intent-badge.protect {
  color: #0f172a;
}
.exercise-inline-rest {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,.24);
  background: rgba(56,189,248,.10);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.exercise-inline-rest button {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg3);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}
@media (min-width: 721px) {
  .exercise-inline-rest.active {
    display: inline-flex;
  }
}
.ex-remove-btn {
  width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .14);
  color: #ef4444; font-size: 18px; font-weight: 800; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ex-section-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
}
.ex-swap-btn {
  width: auto; min-width: 52px; height: 32px; padding: 0 9px; border-radius: 999px;
  border: 1px solid rgba(29, 78, 216, .28);
  background: linear-gradient(135deg, #1d4ed8, #2563eb 58%, #38bdf8);
  color: #eff6ff; font-size: 11px; font-weight: 900; line-height: 1; letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ex-section-actions .yt-link-btn,
.ex-section-actions .ig-link-btn { flex-shrink: 0; }
.ex-section-latest {
  font-size: 12px; color: var(--muted); font-weight: 600;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.ex-section-e1rm { font-size: 13px; color: var(--muted); }
.sets-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sets-table th { color: var(--muted); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px; padding: 4px 8px; text-align: center; }
.sets-table td { padding: 8px; text-align: center; border-radius: 8px; }
.set-row.done td { color: var(--muted); }
.set-row.pb td.e1rm-cell { color: var(--gold); font-weight: 700; }
.set-actions-cell { width: 40px; }
.set-edit-btn {
  width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg3); color: var(--text); display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; padding: 0; line-height: 1;
}
.set-edit-btn:active { background: var(--bg2); }
.pb-badge {
  display: inline-block; background: var(--gold); color: #000;
  border-radius: 5px; font-size: 10px; font-weight: 800; padding: 1px 5px;
  vertical-align: middle; margin-left: 4px;
}
.log-set-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff; border-radius: 10px;
  padding: 11px 16px; font-size: 14px; font-weight: 900;
  margin-top: 8px; width: 100%;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 22%, transparent);
}
.log-set-btn:active { opacity: .8; }
.log-set-btn[aria-busy="true"],
.ex-extra-set-btn[aria-busy="true"],
.workout-mobile-primary-btn[aria-busy="true"] {
  cursor: wait;
  opacity: .72;
}
.ex-view-progress {
  text-align: center; font-size: 12px; color: var(--accent-light);
  padding: 6px 0 2px; cursor: pointer; letter-spacing: .01em;
}
.ex-view-progress:active { opacity: .6; }

/* ── Planned vs ad-hoc set flow ─────────────────────────────────────── */
.ex-section.ex-done { opacity: 1; }
.ex-section.ex-done > :not(.ex-complete-card) { opacity: .6; }
.ex-section.ex-done .ex-section-name::after {
  content: ' - Done';
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}
.ex-plan-badge {
  font-size: 11px; color: var(--muted); font-weight: 600;
  text-align: center; padding: 4px 0 2px; letter-spacing: .03em;
}
.ex-set-actions { display: flex; gap: 8px; margin-top: 8px; }
.ex-complete-card {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border) 70%);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 12%, var(--bg3) 88%), color-mix(in srgb, var(--bg2) 94%, transparent));
}
.ex-complete-title {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}
.ex-complete-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.ex-complete-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.ex-extra-set-btn {
  flex: 1; background: color-mix(in srgb, var(--bg2) 88%, transparent); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; font-size: 13px; font-weight: 600;
  color: var(--text);
}
.ex-extra-set-btn:active { background: var(--bg3); }
.ex-done-btn {
  flex: 1; background: var(--green); color: #0f172a;
  border-radius: 10px; padding: 10px; font-size: 13px; font-weight: 700;
}
.ex-done-btn:active { opacity: .85; }
.ex-done-btn.secondary {
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  border: 1px solid var(--border);
  color: var(--muted);
}
.ex-done-btn.secondary:active {
  background: var(--bg3);
  color: var(--text);
}

/* ── Inline e1RM display in exercise header ─────────────────────────── */
.ex-section-e1rm-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.ex-section-e1rm-mobile { display: none; }
.ex-e1rm-best { font-size: 12px; color: var(--muted); font-weight: 600; }
.ex-e1rm-latest {
  font-size: 12px; color: var(--cyan); font-weight: 700;
}
.ex-e1rm-edit-link {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ex-e1rm-edit-link:hover,
.ex-e1rm-edit-link:focus-visible {
  text-decoration-thickness: 2px;
}
.ex-e1rm-edit-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}
@media (max-width: 640px) {
  .ex-section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    row-gap: 8px;
  }
  .ex-section-name-wrap { min-width: 0; }
  .ex-section-title-row { align-items: flex-start; }
  .ex-section-e1rm-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    align-items: center;
    margin-top: 4px;
    max-width: 100%;
    overflow: visible;
  }
  .ex-section-e1rm-mobile .ex-e1rm-best,
  .ex-section-e1rm-mobile .ex-e1rm-latest {
    display: inline-flex;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.25;
  }
  .ex-section-e1rm-mobile .ex-e1rm-latest::before { content: none; }
  .ex-section-e1rm-desktop { display: none; }
  .ex-section-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
}

@media (max-width: 460px) {
  .plan-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .plan-item-actions {
    width: 100%;
    justify-content: flex-end;
    order: 3;
  }
  .plan-item-main { flex-basis: 100%; }
  .plan-item-edit { margin-left: auto !important; }
}
.yt-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: #ff2d2d;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 45, 45, .22);
}
.yt-link-btn:hover { filter: brightness(1.05); }
.yt-link-btn:focus-visible {
  outline: 2px solid rgba(255, 45, 45, .35);
  outline-offset: 2px;
}
.yt-link-btn .yt-play {
  font-size: 11px;
  line-height: 1;
  transform: translateX(1px);
}
.yt-link-btn.compact {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 11px;
}
.yt-link-btn.compact .yt-label {
  font-size: 11px;
  letter-spacing: .04em;
}
.yt-link-btn.mini {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  font-size: 10px;
}
.yt-link-btn.mini .yt-label {
  font-size: 10px;
  letter-spacing: .04em;
}
.exercise-media-links {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.ig-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 28%, #d62976 58%, #962fbf 78%, #4f5bd5 100%);
  box-shadow: 0 8px 20px rgba(214,41,118,.22);
}
.ig-link-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.ig-link-btn.compact { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; }
.ig-link-btn.mini { width: 26px; min-width: 26px; height: 26px; min-height: 26px; padding: 0; }
.yt-link-btn.micro,
.ig-link-btn.micro { width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; }
.yt-link-btn.micro .yt-label { display: none; }
.picker-target-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.ex-section-video-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
}

.add-exercise-row {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  color: var(--accent-light); font-size: 15px; font-weight: 500;
}
.add-exercise-row:active { background: var(--bg2); }

.workout-mobile-action-dock { display: none; }

@media (max-width: 719px) {
  #s-workout .add-exercise-row { display: none; }
  #s-workout .log-set-btn { display: none; }
  .workout-mobile-action-dock {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px minmax(148px, 1.35fr);
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg2) 96%, transparent);
    box-shadow: 0 -12px 28px rgba(2,6,23,.18);
    z-index: 12;
  }
  .workout-mobile-action-copy { min-width: 0; }
  .workout-mobile-action-status {
    overflow: hidden;
    color: var(--text);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .workout-mobile-save-state {
    min-height: 14px;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
  }
  .workout-mobile-save-state.saved { color: var(--green); }
  .workout-mobile-save-state.error { color: var(--red); }
  .workout-mobile-add-btn,
  .workout-mobile-primary-btn {
    min-height: 44px;
    border-radius: 13px;
    font-weight: 900;
  }
  .workout-mobile-add-btn {
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--accent-light);
    font-size: 24px;
    line-height: 1;
  }
  .workout-mobile-primary-btn {
    overflow: hidden;
    padding: 9px 11px;
    background: linear-gradient(135deg, var(--green), #22c55e);
    color: #07140c;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
  }
  .workout-mobile-primary-btn.waiting {
    background: color-mix(in srgb, var(--bg3) 90%, transparent);
    color: var(--muted);
    border: 1px solid var(--border);
  }
  .workout-mobile-primary-btn.choose {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #07140c;
  }
  .workout-mobile-primary-btn:active:not(:disabled),
  .workout-mobile-add-btn:active { transform: translateY(1px); }
  #workout-body { scroll-padding-bottom: 76px; }
  .workout-session-strip {
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 8px;
    padding: 7px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .workout-session-strip::-webkit-scrollbar { display: none; }
  .workout-session-chip {
    flex: 0 0 auto;
    padding: 5px 8px;
    font-size: 10px;
  }
}

@media (max-width: 365px) {
  .workout-mobile-action-dock {
    grid-template-columns: minmax(0, .8fr) 42px minmax(134px, 1.2fr);
    gap: 6px;
    padding-inline: 7px;
  }
  .workout-mobile-action-status { font-size: 10px; }
  .workout-mobile-primary-btn { font-size: 11px; padding-inline: 8px; }
}

@media (max-width: 719px) {
  html[data-display-size="large"] .workout-mobile-action-dock,
  html[data-display-size="extra-large"] .workout-mobile-action-dock,
  html[data-display-size="maximum"] .workout-mobile-action-dock {
    grid-template-columns: minmax(0, .72fr) 46px minmax(150px, 1.28fr);
  }
}
.exercise-protocol-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-left: 6px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg2));
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: middle;
}
/* ── Hamburger + slide-in drawer ──────────────────────────────────────── */
.hamburger-btn {
  font-size: 22px; padding: 4px 8px; border-radius: 8px; color: var(--muted);
  line-height: 1; flex-shrink: 0; min-width: 36px; min-height: 36px;
  position: relative;
}
.hamburger-btn:active { background: var(--bg3); color: var(--text); }
.hamburger-notification-badge {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 950; line-height: 1;
  box-shadow: 0 8px 18px rgba(239,68,68,.34);
  border: 2px solid var(--bg);
}

.drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 10000;
}
.drawer-overlay.open { display: block; }
.drawer-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
}
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 88vw);
  background: var(--bg2); display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.5);
  transform: translateX(100%); transition: transform .25s ease;
  overflow: hidden;
}
.drawer-overlay.open .drawer-panel { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  padding-top: max(20px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.drawer-title { font-size: 17px; font-weight: 700; }
.drawer-close-btn { font-size: 22px; color: var(--muted); padding: 4px 6px; border-radius: 8px; }
.drawer-close-btn:active { background: var(--bg3); }

.drawer-body { flex: 1; overflow-y: auto; padding: 0 0 20px; }

.drawer-section { padding: 16px 20px 0; }
.drawer-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 10px;
}
.drawer-profile {
  background: var(--bg3); border-radius: 12px; padding: 14px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 4px;
}
.drawer-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 700;
  flex-shrink: 0; color: #fff;
}
.drawer-profile-info { flex: 1; min-width: 0; }
.drawer-profile-name { font-size: 15px; font-weight: 700; }
.drawer-profile-user { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drawer-profile-badge {
  font-size: 10px; font-weight: 700; background: var(--accent);
  color: #fff; border-radius: 6px; padding: 2px 7px; margin-top: 4px;
  display: inline-block;
}

.drawer-user-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.drawer-user-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border-radius: 10px; padding: 10px 12px;
}
.drawer-user-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.drawer-user-name { flex: 1; font-size: 14px; font-weight: 600; }
.drawer-user-sub { font-size: 11px; color: var(--muted); }
.drawer-view-btn {
  font-size: 12px; font-weight: 700; color: var(--accent-light);
  background: rgba(124,58,237,.15); border-radius: 8px; padding: 5px 10px;
  flex-shrink: 0;
}
.drawer-view-btn:active { background: rgba(124,58,237,.3); }

.drawer-action-btn {
  width: 100%; text-align: left; padding: 12px 14px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); margin-top: 6px;
}
.drawer-action-btn:active { background: var(--border); }
.drawer-action-icon { font-size: 18px; width: 24px; text-align: center; }
.drawer-action-badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: #ef4444; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; line-height: 1;
  box-shadow: 0 8px 18px rgba(239,68,68,.28);
}
.drawer-logout-btn {
  width: calc(100% - 40px); margin: 16px 20px 0; padding: 13px;
  border-radius: 12px; background: rgba(248,113,113,.12);
  color: var(--red); font-size: 14px; font-weight: 700; text-align: center;
  border: 1px solid rgba(248,113,113,.25);
}
.drawer-logout-btn:active { background: rgba(248,113,113,.25); }

/* Voice Mode beta */
.voice-mode-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 10060;
  width: min(460px, calc(100vw - 24px)); max-height: min(680px, calc(100vh - 28px));
  background: var(--bg2); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 26px 80px rgba(0,0,0,.34); overflow: hidden;
  display: flex; flex-direction: column;
}
.voice-mode-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, #0ea5e9 18%, var(--bg3)), var(--bg2));
}
.voice-mode-title { font-size: 17px; font-weight: 1000; color: var(--text); }
.voice-mode-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.voice-mode-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow: auto; }
.voice-mode-status {
  border: 1px solid rgba(14,165,233,.24); border-radius: 14px; padding: 10px 12px;
  background: rgba(14,165,233,.08); color: var(--text); font-size: 13px; line-height: 1.45;
}
.voice-mode-log {
  min-height: 120px; max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--border); border-radius: 14px; padding: 10px; background: var(--bg3);
}
.voice-mode-bubble {
  max-width: 92%; padding: 9px 11px; border-radius: 14px; font-size: 13px; line-height: 1.35;
  background: var(--bg2); color: var(--text); border: 1px solid var(--border);
}
.voice-mode-bubble.user { align-self: flex-end; background: rgba(37,99,235,.16); border-color: rgba(37,99,235,.32); }
.voice-mode-bubble.coach { align-self: flex-start; background: rgba(34,197,94,.11); border-color: rgba(34,197,94,.22); }
.voice-mode-bubble.system { align-self: center; font-size: 12px; color: var(--muted); }
.voice-mode-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.voice-mode-btn {
  border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 900;
  border: 1px solid var(--border); background: var(--bg3); color: var(--text);
}
.voice-mode-btn.primary { background: linear-gradient(135deg, #0ea5e9, #2563eb); border-color: transparent; color: #fff; }
.voice-mode-btn.danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.26); color: #fecaca; }
.voice-mode-command-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.voice-mode-command-row input { min-width: 0; }
.voice-mode-help {
  font-size: 12px; color: var(--muted); line-height: 1.45;
  border-top: 1px solid var(--border); padding-top: 10px;
}
@media (max-width: 520px) {
  .home-actions.voice-enabled { grid-template-columns: 1fr 1fr; }
  .home-actions.voice-enabled .start-workout-btn { grid-column: 1 / -1; }
  .voice-mode-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); }
}

/* ── View-as banner ────────────────────────────────────────────────────── */
.viewas-banner {
  display: none; align-items: center; gap: 8px;
  background: #854d0e; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: #fef08a;
  flex-shrink: 0;
}
.viewas-banner.active { display: flex; }
.viewas-banner-text { flex: 1; }
.viewas-exit-btn {
  background: rgba(255,255,255,.2); border-radius: 8px;
  padding: 4px 12px; font-size: 12px; font-weight: 700; color: #fff;
}
.viewas-exit-btn:active { background: rgba(255,255,255,.35); }

/* ── User management modal ─────────────────────────────────────────────── */
.user-mgmt-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.user-mgmt-info { flex: 1; min-width: 0; }
.user-mgmt-name { font-size: 14px; font-weight: 600; }
.user-mgmt-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.user-mgmt-badge {
  font-size: 10px; font-weight: 700; background: var(--accent);
  color: #fff; border-radius: 5px; padding: 1px 6px;
}
.user-mgmt-del-btn {
  font-size: 18px; color: var(--muted); padding: 4px 8px; border-radius: 6px;
}
.user-mgmt-del-btn:active { color: var(--red); }
.profile-workout-days {
  display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; margin-top: 7px;
}
.profile-workout-day {
  min-width: 0; min-height: 48px; border: 1px solid var(--border); border-radius: 11px;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
}
.profile-workout-day input { position: absolute; opacity: 0; pointer-events: none; }
.profile-workout-day span { font-size: 12px; font-weight: 800; color: var(--muted); }
.profile-workout-day:has(input:checked) {
  border-color: var(--green); background: color-mix(in srgb,var(--green) 18%,var(--bg3));
}
.profile-workout-day:has(input:checked) span { color: var(--text); }
@media (max-width: 640px) {
  .hamburger-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .profile-workout-days { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .profile-workout-day { min-height: 52px; }
}
/* ── Drum scroll picker ───────────────────────────────────────────────── */
.picker-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: none; align-items: flex-end; justify-content: center; z-index: 100;
  backdrop-filter: blur(4px);
}
.picker-overlay.open { display: flex; }
.picker-sheet {
  background: var(--bg2); border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  width: calc(100% / var(--app-zoom)); height: auto; max-height: calc(94vh / var(--app-zoom)); overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  animation: slide-up .25s ease;
  box-shadow: 0 -24px 70px rgba(2,6,23,.38);
  transform: scale(var(--app-zoom));
  transform-origin: bottom center;
}
@keyframes slide-up {
  from { transform: translateY(100%) scale(var(--app-zoom)); }
  to   { transform: translateY(0) scale(var(--app-zoom)); }
}
.picker-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 14px auto 0;
}
.picker-mission-card {
  margin: 12px 16px 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(56,189,248,.22);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.16), transparent 40%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg3) 86%, transparent), color-mix(in srgb, var(--bg2) 92%, transparent));
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.picker-mission-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.picker-mission-copy {
  min-width: 0;
}
.picker-mission-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.picker-title {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
}
.picker-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 700;
}
.picker-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.picker-rest-timer {
  display: none; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 8px 12px; border-radius: 999px;
  background: var(--bg3); border: 1px solid var(--border);
}
.picker-rest-timer.active { display: flex; }
.picker-rest-timer-label {
  font-size: 12px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.picker-rest-timer-display {
  min-width: 52px; text-align: center; font-size: 16px; font-weight: 800;
  color: var(--accent-light);
}
.picker-pb-target {
  font-size: 12px;
  color: var(--gold);
}
.picker-metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.picker-metric-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg2) 82%, transparent);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 800;
}
.picker-metric-edit {
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.picker-metric-edit:hover,
.picker-metric-edit:focus-visible {
  border-color: var(--accent-light);
  text-decoration-thickness: 2px;
}
.picker-metric-edit:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.picker-metric-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.picker-target-card {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border) 65%);
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg2) 84%), color-mix(in srgb, var(--bg3) 96%, transparent));
  padding: 12px;
}
.picker-target-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.picker-target-intent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.picker-warmup-chip-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  border: 1px solid rgba(249,115,22,.48);
  background: linear-gradient(135deg, rgba(249,115,22,.18), rgba(251,191,36,.13));
  color: #f97316;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(249,115,22,.10);
}
.picker-warmup-chip-btn:active {
  transform: translateY(1px);
}
:root[data-theme-mode="light"] .picker-warmup-chip-btn {
  color: #9a3412;
}
.picker-personal-cues-chip-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  border: 1px solid rgba(16,185,129,.52);
  background: linear-gradient(135deg, rgba(16,185,129,.20), rgba(34,197,94,.14));
  color: #34d399;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(16,185,129,.10);
}
.picker-personal-cues-chip-btn:active { transform: translateY(1px); }
:root[data-theme-mode="light"] .picker-personal-cues-chip-btn { color: #047857; }
.picker-target-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.picker-target-main {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 950;
  color: var(--text);
}
.picker-target-sub {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.picker-coaching {
  margin: 0 16px 12px; background: color-mix(in srgb, var(--bg3) 92%, transparent); border-radius: 14px;
  padding: 11px 13px; font-size: 13px; color: var(--muted); line-height: 1.5;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
}
.picker-last-session {
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, var(--accent) 18%);
  background: color-mix(in srgb, var(--bg3) 88%, transparent);
  font-size: 11px;
  line-height: 1.2;
}
.picker-last-session-label {
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}
.picker-last-session-date,
.picker-last-session-basis {
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}
.picker-last-session-sets {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-warmup {
  margin: 0 16px 12px; background: var(--bg3); border-radius: 12px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--border);
}
.picker-warmup-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.picker-warmup-title {
  font-size: 13px; font-weight: 800; color: var(--text);
}
.picker-warmup-sub {
  font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45;
}
.picker-warmup-tag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-light); background: rgba(124,58,237,.14); border: 1px solid rgba(124,58,237,.22);
  border-radius: 999px; padding: 5px 8px; white-space: nowrap;
}
.picker-warmup-row {
  display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: start;
}
.picker-warmup-reps {
  font-size: 12px; font-weight: 800; color: var(--text);
}
.picker-warmup-load {
  font-size: 12px; color: var(--muted); line-height: 1.45;
}
.picker-warmup-note {
  font-size: 12px; color: var(--muted); line-height: 1.45; border-top: 1px solid var(--border);
  padding-top: 10px;
}
.picker-carousel-shell {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.picker-dial-card {
  margin: 0 16px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg3) 92%, transparent), color-mix(in srgb, var(--bg2) 96%, transparent));
  padding: 13px 0 12px;
}
.picker-dial-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 6px;
}
.picker-dial-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}
.picker-base-weight-row {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 750;
}
.picker-base-weight-row[hidden] {
  display: none !important;
}
.picker-base-weight-edit {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border) 55%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg2) 88%);
  color: var(--accent);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}
.picker-base-weight-edit:active {
  transform: scale(.96);
}
.picker-accessible-controls {
  display: none;
  padding: 0 14px 10px;
  gap: 10px;
}
.picker-accessible-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border) 78%);
  background: color-mix(in srgb, var(--bg2) 82%, transparent);
}
.picker-accessible-label {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.picker-accessible-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(88px, 1.35fr) repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}
.picker-accessible-step {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}
.picker-accessible-step:active {
  transform: translateY(1px);
}
.picker-accessible-value {
  min-height: 46px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--bg3) 82%), var(--bg3));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border) 58%);
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}
.picker-jump-effort {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, .55);
  background: linear-gradient(135deg, rgba(34, 197, 94, .18), rgba(34, 197, 94, .08));
  color: #15803d;
  font-size: 15px;
  font-weight: 950;
}
html[data-display-size="extra-large"] .drum-row,
html[data-display-size="maximum"] .drum-row {
  display: none;
}
html[data-display-size="extra-large"] .picker-accessible-controls,
html[data-display-size="maximum"] .picker-accessible-controls {
  display: grid;
}
html[data-display-size="extra-large"] .picker-base-weight-row,
html[data-display-size="maximum"] .picker-base-weight-row {
  display: inline-flex;
}
.picker-carousel-track {
  display: flex; width: 100%;
  transition: transform .24s ease;
  touch-action: pan-y;
}
.picker-page {
  width: 100%;
  flex: 0 0 100%;
  min-width: 0; overflow: hidden;
}
.picker-carousel-nav {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 16px 12px;
}
.picker-carousel-dot {
  flex: 1 1 0; min-width: 0; height: 36px; border-radius: 999px;
  background: var(--bg3); color: var(--muted); border: 1px solid var(--border);
  font-size: 12px; font-weight: 800;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}
.picker-carousel-dot.active {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg2) 84%);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border) 45%);
}
.picker-action-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  bottom: auto;
  z-index: 10;
  margin-top: 0;
  background: var(--bg2);
}
.picker-secondary-actions {
  display: flex; gap: 8px; padding: 0 16px 12px;
}
.picker-secondary-btn {
  flex: 1; margin: 0; min-height: 42px;
}
.picker-plates-page {
  padding: 0 16px 4px;
}
.picker-plates-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin: 0 0 10px;
}
.picker-plates-title {
  font-size: 14px; font-weight: 800;
}
.picker-plates-sub {
  font-size: 12px; color: var(--muted); margin-top: 4px;
}
.picker-plates-settings-btn {
  width: 34px; height: 34px; border-radius: 999px; flex-shrink: 0;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.picker-plate-status {
  background: var(--bg3); border-radius: 12px; border: 1px solid var(--border);
  padding: 10px 12px; font-size: 12px; color: var(--muted); line-height: 1.45;
}
.picker-plate-status strong { color: var(--text); }
.plate-calc-visual {
  margin-top: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--bg3) 92%, #ffffff 8%), var(--bg3));
  border: 1px solid var(--border); border-radius: 16px; padding: 16px 10px 14px;
}
.plate-calc-rig {
  display: flex; align-items: flex-end; justify-content: center; gap: 8px;
  min-height: 120px;
}
.plate-stack {
  display: flex; align-items: flex-end; gap: 4px; min-width: 70px;
}
.plate-stack.left { justify-content: flex-end; }
.plate-stack.right { justify-content: flex-start; }
.plate-stack-empty {
  font-size: 11px; color: var(--muted); padding-bottom: 12px;
}
.plate-machine-core {
  min-width: 90px; height: 18px; border-radius: 999px; background: linear-gradient(90deg, #334155, #64748b);
  color: #e2e8f0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; padding: 0 14px; position: relative;
}
.plate-machine-core::before,
.plate-machine-core::after {
  content: ''; position: absolute; top: 50%; width: 18px; height: 4px; border-radius: 999px;
  background: #94a3b8; transform: translateY(-50%);
}
.plate-machine-core::before { left: -14px; }
.plate-machine-core::after { right: -14px; }
.plate-disc {
  border-radius: 10px 10px 6px 6px; color: #f8fafc; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; padding-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.plate-disc[data-size="25"] { width: 34px; height: 92px; background: #7c2d12; }
.plate-disc[data-size="20"] { width: 30px; height: 82px; background: #0f766e; }
.plate-disc[data-size="15"] { width: 28px; height: 76px; background: #1d4ed8; }
.plate-disc[data-size="10"] { width: 24px; height: 66px; background: #7c3aed; }
.plate-disc[data-size="5"] { width: 20px; height: 54px; background: #c2410c; }
.plate-disc[data-size="2.5"] { width: 18px; height: 44px; background: #475569; }
.plate-disc[data-size="1.25"] { width: 16px; height: 38px; background: #64748b; }
.plate-calc-summary {
  margin-top: 12px; display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--muted);
}
.plate-calc-summary strong { color: var(--text); }
.picker-cues-page {
  padding: 0 16px 4px;
}
.picker-cues-card {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border) 72%);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 42%),
    var(--bg3);
  padding: 14px;
}
.picker-cues-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}
.picker-cues-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 10px;
}
.picker-cues-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.picker-cue-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}
.picker-cue-dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--bg2) 84%);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
}
.plate-settings-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.plate-settings-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 8px; font-size: 13px; color: var(--text);
}
.plate-settings-chip input { accent-color: var(--accent); }
.plate-settings-chip-main {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0;
}
.plate-settings-count-wrap {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted); flex-shrink: 0;
}
.plate-settings-count-input {
  width: 56px; min-width: 56px; padding: 6px 8px; text-align: center;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 13px; font-weight: 700;
}
.plate-settings-help {
  font-size: 12px; color: var(--muted); line-height: 1.45;
}
.exercise-progress-wrap { display: flex; flex-direction: column; gap: 14px; max-height: 76vh; overflow: auto; }
.exercise-progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.exercise-progress-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
.exercise-progress-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.exercise-progress-close { color: var(--muted); font-size: 22px; padding: 4px 6px; }
.exercise-progress-cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.exercise-progress-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 12px;
}
.exercise-progress-card.full { grid-column: 1 / -1; }
.exercise-progress-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.exercise-progress-label { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.exercise-progress-value { font-size: 22px; font-weight: 800; margin-top: 6px; }
.exercise-progress-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.exercise-progress-edit-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-light);
  text-align: left;
  cursor: pointer;
}
.exercise-progress-edit-link .exercise-progress-label {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.exercise-progress-edit-link .exercise-progress-value {
  color: inherit;
}
.exercise-progress-edit-link:hover .exercise-progress-label,
.exercise-progress-edit-link:focus-visible .exercise-progress-label {
  text-decoration-thickness: 2px;
}
.exercise-progress-edit-link:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 4px;
  border-radius: 4px;
}
.exercise-progress-edit-link:active { transform: translateY(1px); }
.exercise-progress-section {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 14px;
}
.exercise-progress-section-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.exercise-progress-chart {
  width: 100%;
  height: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: hidden;
}
.exercise-progress-chart.tall { height: 300px; }
.exercise-progress-chart > .chart-legend {
  flex: 0 0 auto;
  margin-bottom: 0;
}
.exercise-progress-chart > .chart-wrap {
  flex: 1 1 0;
  min-height: 0;
  height: auto !important;
}
.exercise-progress-controls,
.bodydash-mini-period {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.exercise-progress-head-row,
.bodydash-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.exercise-progress-pill,
.bodydash-mini-pill {
  width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg3); color: var(--muted); font-size: 11px; font-weight: 800; border: 1px solid var(--border);
}
.exercise-progress-pill.active,
.bodydash-mini-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.exercise-progress-mode {
  background: var(--bg3); color: var(--muted); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; border: 1px solid var(--border);
}
.exercise-progress-mode.active,
.exercise-progress-mode[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.chart-legend {
  display: flex; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 12px; color: var(--muted); line-height: 1.4;
}
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend-item.is-toggleable {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  user-select: none;
}
.chart-legend-item.is-toggleable.is-off {
  opacity: .45;
}
body.light-mode .chart-legend,
:root[data-theme-mode="light"] .chart-legend {
  color: #f8fafc;
}
body.light-mode .chart-legend-item,
:root[data-theme-mode="light"] .chart-legend-item {
  color: #f8fafc;
}
body.light-mode .chart-legend-item.is-toggleable,
:root[data-theme-mode="light"] .chart-legend-item.is-toggleable {
  color: #f8fafc;
}
body.light-mode .chart-legend-item.is-toggleable.is-off,
:root[data-theme-mode="light"] .chart-legend-item.is-toggleable.is-off {
  color: #cbd5e1;
  opacity: .86;
}
.chart-legend-item.is-toggleable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}
.chart-legend-swatch { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }
.chart-wrap { position: relative; width: 100%; height: 100%; overflow: visible; }
.chart-tooltip {
  position: absolute; z-index: 4; pointer-events: none; min-width: 110px; max-width: 220px;
  background: rgba(15, 23, 42, 0.96); color: #e2e8f0; border: 1px solid #334155; border-radius: 10px;
  padding: 8px 10px; font-size: 12px; line-height: 1.45; opacity: 0; transform: translate(10px, -12px);
  transition: opacity .12s ease; box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}
.chart-tooltip.visible { opacity: 1; }
.chart-hit,
.chart-ptr { cursor: pointer; pointer-events: all; }
.exercise-progress-list { display: flex; flex-direction: column; gap: 8px; }
.exercise-progress-row {
  background: var(--bg3); border-radius: 12px; padding: 12px; display: flex; justify-content: space-between; gap: 10px;
}
.exercise-progress-row-main { min-width: 0; }
.exercise-progress-row-date { font-size: 13px; font-weight: 700; }
.exercise-progress-row-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.exercise-progress-row-side { text-align: right; flex-shrink: 0; }
.exercise-progress-row-val { font-size: 16px; font-weight: 800; color: var(--accent-light); }
.exercise-progress-row-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.detail-ex-header-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg3); color: var(--text); border-radius: 10px; padding: 10px 12px; font-weight: 700;
}
.detail-ex-header-btn small { color: var(--accent-light); font-size: 11px; font-weight: 700; }

@media (min-width: 900px) {
  .modal-sheet.exercise-progress-modal-sheet {
    width: min(1180px, calc((100vw - 72px) / var(--app-zoom)));
    max-height: calc((100dvh - 56px) / var(--app-zoom));
    padding: 22px;
  }
  .modal-sheet.exercise-progress-modal-sheet .exercise-progress-wrap {
    max-height: calc((100dvh - 112px) / var(--app-zoom));
    gap: 16px;
  }
  .modal-sheet.exercise-progress-modal-sheet .exercise-progress-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .modal-sheet.exercise-progress-modal-sheet .exercise-progress-chart {
    height: 250px;
  }
  .modal-sheet.exercise-progress-modal-sheet .exercise-progress-chart.tall {
    height: 340px;
  }
}

@media (min-width: 1200px) {
  .modal-sheet.exercise-progress-modal-sheet {
    width: min(1280px, calc((100vw - 96px) / var(--app-zoom)));
  }
}

@media (max-width: 699px) {
  .modal-sheet.exercise-progress-modal-sheet {
    width: calc(100% / var(--app-zoom));
    max-height: calc((100dvh - 8px) / var(--app-zoom));
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
  }
  .modal-sheet.exercise-progress-modal-sheet .exercise-progress-wrap {
    max-height: calc((100dvh - 36px) / var(--app-zoom));
  }
}

@media (max-width: 420px) {
  .exercise-progress-cards { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .exercise-progress-wrap {
    gap: 12px;
    max-height: 82vh;
  }
  .exercise-progress-title {
    font-size: 18px;
  }
  .exercise-progress-sub {
    font-size: 12px;
  }
  .exercise-progress-head-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .exercise-progress-controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .exercise-progress-controls::-webkit-scrollbar {
    display: none;
  }
  .exercise-progress-pill {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
  }
  .exercise-progress-mode {
    flex: 1 0 auto;
    min-height: 34px;
    padding: 8px 10px;
    white-space: nowrap;
  }
  #exercise-progress-custom.bodydash-custom.visible {
    display: grid;
    grid-template-columns: 1fr;
  }
  #exercise-progress-custom.bodydash-custom input[type="date"] {
    width: 100%;
    min-width: 0;
  }
  .exercise-progress-section {
    padding: 12px;
  }
  .exercise-progress-chart {
    height: 190px;
    margin: 0 -4px;
  }
  .exercise-progress-chart.tall {
    height: 230px;
  }
  .exercise-progress-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .exercise-progress-row-side {
    text-align: left;
  }
}

.drum-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 0 14px; margin-bottom: 8px; position: relative;
}
.picker-drum-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.picker-drum-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.picker-drum-unit {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}
.drum-label-between {
  font-size: 24px; font-weight: 300; color: var(--muted);
  flex-shrink: 0; padding: 42px 0 0; user-select: none;
}
.drum-wrap {
  position: relative; flex: 0 0 auto; width: min(100%, 160px); max-width: 160px;
  height: calc(var(--item-h) * 3);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%, rgba(0,0,0,.4) 20%, rgba(0,0,0,1) 40%,
    rgba(0,0,0,1) 60%, rgba(0,0,0,.4) 80%, transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0%, rgba(0,0,0,.4) 20%, rgba(0,0,0,1) 40%,
    rgba(0,0,0,1) 60%, rgba(0,0,0,.4) 80%, transparent 100%);
  cursor: grab; user-select: none;
  contain: layout paint;
}
.drum-wrap:active { cursor: grabbing; }
.drum-wrap::before, .drum-wrap::after {
  content: ''; position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none;
  background: rgba(255,255,255,.08); height: 1px;
}
.drum-wrap::before { top: var(--item-h); }
.drum-wrap::after  { top: calc(var(--item-h) * 2); }
.drum-selection {
  position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none;
  top: var(--item-h); height: var(--item-h);
  background: rgba(124,58,237,.15); border-radius: 10px;
}
.drum-list {
  display: flex; flex-direction: column;
  padding-top: var(--item-h);
  padding-bottom: var(--item-h);
  will-change: transform; transition: none;
}
.drum-list.snapping { transition: transform .2s cubic-bezier(.25,.46,.45,.94); }
.drum-item {
  height: var(--item-h); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: var(--muted);
  flex-shrink: 0; transition: color .1s, font-size .1s;
}
.drum-item.selected { color: var(--text); font-size: 26px; }

.picker-e1rm-bar {
  padding: 4px 14px 0;
  color: var(--muted);
}
.picker-e1rm-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--bg2) 80%, transparent);
  border: 1px solid var(--border);
  padding: 10px 12px;
}
.picker-e1rm-card.pb {
  border-color: rgba(251,191,36,.42);
  background: linear-gradient(135deg, rgba(251,191,36,.16), color-mix(in srgb, var(--bg2) 88%, transparent));
}
.picker-e1rm-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.picker-e1rm-value {
  font-size: 17px;
  color: var(--accent-light);
  font-weight: 950;
}
.picker-e1rm-bar .pb-tag { color: var(--gold); font-weight: 800; }
.picker-effort-primer {
  margin: 6px 14px 0;
  border-radius: 12px;
  padding: 7px 10px 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border) 72%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--bg3) 90%), color-mix(in srgb, var(--bg2) 94%, transparent));
  transition: border-color .18s ease, background .18s ease, outline-color .18s ease;
}
.picker-effort-primer.needs-effort {
  border-color: #16a34a;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, .34), rgba(34, 197, 94, .14)),
    color-mix(in srgb, #22c55e 10%, var(--bg2) 90%);
  outline: 2px solid rgba(34, 197, 94, .30);
  outline-offset: 0;
}
.picker-effort-primer.needs-effort.effort-cue {
  border-color: #15803d;
  outline: 5px solid rgba(34, 197, 94, .42);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, .50), rgba(34, 197, 94, .20)),
    color-mix(in srgb, #22c55e 16%, var(--bg2) 84%);
}
.picker-effort-primer.effort-selected {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border) 76%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--bg3) 93%), color-mix(in srgb, var(--bg2) 95%, transparent));
  outline-color: transparent;
}
.picker-effort-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.picker-effort-primer.needs-effort .picker-effort-title {
  color: #14532d;
}
.picker-effort-primer.needs-effort.effort-cue .picker-effort-title {
  color: #14532d;
}
.picker-effort-primer.needs-effort .picker-effort-title::before {
  content: 'NEXT STEP';
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #16a34a;
  color: var(--on-success);
  font-size: 10px;
  letter-spacing: .06em;
}
.picker-effort-copy {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
}
.picker-effort-primer.needs-effort .picker-effort-copy {
  color: color-mix(in srgb, var(--text) 86%, #14532d 14%);
}
.form-review-privacy-note {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(56,189,248,.28);
  border-radius: 13px;
  background: rgba(56,189,248,.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.form-review-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.form-review-choice-btn {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg3);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}
.form-review-choice-btn.primary {
  border-color: rgba(34,197,94,.5);
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: var(--on-success);
}
.form-review-upload-stack {
  position: fixed;
  z-index: 10030;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.form-review-upload-panel {
  pointer-events: auto;
  padding: 11px 12px;
  border: 1px solid rgba(56,189,248,.40);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg2) 94%, transparent);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(2,6,23,.30);
  backdrop-filter: blur(12px);
}
.form-review-upload-panel.complete { border-color: rgba(34,197,94,.55); }
.form-review-upload-panel.error { border-color: rgba(248,113,113,.60); }
.form-review-upload-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.form-review-upload-title { font-size: 13px; font-weight: 950; color: var(--text); }
.form-review-upload-status { font-size: 12px; color: var(--muted); margin-top: 2px; }
.form-review-upload-close {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 99px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.form-review-upload-track {
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(148,163,184,.22);
  margin-top: 9px;
}
.form-review-upload-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  transition: width .18s ease;
}
.form-review-upload-panel:not(.complete):not(.error) .form-review-upload-track span {
  animation: form-review-progress-pulse 1.2s ease-in-out infinite alternate;
}
.form-review-upload-detail {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
@keyframes form-review-progress-pulse {
  from { filter: brightness(.90); }
  to { filter: brightness(1.22); }
}
.picker-target-topline {
  align-items: flex-start;
  flex-wrap: nowrap;
}
.picker-target-actions {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-left: 0;
  min-width: 0;
  flex-wrap: wrap;
}
.picker-equipment-image-btn {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 58px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 13px;
  background: color-mix(in srgb, var(--bg3) 92%, var(--accent) 8%);
  color: var(--muted);
}
.picker-equipment-image-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.workout-focus-equipment-btn {
  flex: 0 0 auto;
  width: 72px;
  height: 58px;
  align-self: flex-start;
  box-shadow: 0 8px 20px rgba(2, 6, 23, .2);
  cursor: pointer;
}
.picker-equipment-image-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.picker-equipment-image-zoom {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 99px;
  background: rgba(5, 8, 22, .82);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
}
.equipment-image-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.equipment-image-modal-name {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.equipment-image-modal-close {
  padding: 0 4px;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
}
.equipment-image-stage {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: min(48vh, 420px);
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg3) 94%, #000 6%);
}
.equipment-image-stage img {
  width: 100%;
  max-height: min(62vh, 620px);
  object-fit: contain;
}
.equipment-image-empty {
  max-width: 250px;
  padding: 32px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.equipment-image-scope-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.equipment-image-ai-disclaimer {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--orange) 42%, var(--border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--orange) 10%, var(--bg3));
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}
.equipment-image-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.equipment-image-choice-btn {
  min-height: 48px;
  margin: 0;
}
.equipment-image-crop-hint,
.equipment-image-crop-copy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.equipment-image-crop-frame {
  position: relative;
  width: 100%;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.equipment-image-crop-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  cursor: grab;
  touch-action: none;
}
.equipment-image-crop-frame canvas:active {
  cursor: grabbing;
}
.equipment-image-crop-guide {
  position: absolute;
  inset: 8%;
  pointer-events: none;
  border: 1px dashed rgba(255, 255, 255, .72);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .10);
}
.equipment-image-zoom-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
.equipment-image-zoom-control input {
  width: 100%;
  min-height: 36px;
  accent-color: var(--accent);
}
.equipment-image-crop-actions {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(150px, 1.3fr);
  gap: 10px;
  margin-top: 12px;
}
.equipment-image-crop-actions .modal-save,
.equipment-image-crop-actions .modal-cancel {
  min-height: 48px;
  margin: 0;
}
.equipment-image-upload-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.ai-swap-equipment-thumb {
  position: relative;
  width: 76px;
  min-width: 76px;
  height: 62px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}
.ai-swap-equipment-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ai-swap-equipment-thumb > span:first-child {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 8px;
}
.ai-swap-equipment-expand {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, .88);
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .28);
}
.ai-swap-option-main {
  flex: 1 1 auto;
}
@media (max-width: 430px) {
  .picker-equipment-image-btn {
    flex-basis: 62px;
    width: 62px;
    height: 52px;
  }
  .workout-focus-equipment-btn {
    flex: 0 0 auto;
  }
  .equipment-image-stage {
    min-height: 42vh;
  }
  .equipment-image-choice-grid,
  .equipment-image-crop-actions {
    grid-template-columns: 1fr;
  }
  .equipment-image-crop-frame {
    max-height: none;
  }
  .ai-swap-option-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: start;
  }
  .ai-swap-equipment-thumb {
    width: 68px;
    min-width: 68px;
    height: 56px;
  }
  .ai-swap-option-row .ai-swap-apply-btn {
    grid-column: 1 / -1;
  }
}
@media (max-width: 360px), (max-height: 740px) {
  .picker-equipment-image-btn {
    flex-basis: 54px;
    width: 54px;
    height: 46px;
  }
  .workout-focus-equipment-btn {
    flex: 0 0 auto;
  }
  .picker-equipment-image-placeholder {
    font-size: 9px;
  }
}
@media (max-width: 520px) {
  .form-review-choice-grid { grid-template-columns: 1fr; }
  .form-review-upload-stack { bottom: calc(78px + env(safe-area-inset-bottom)); }
  #s-workout.form-review-upload-active #workout-body {
    padding-bottom: calc(150px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom));
  }
  #s-workout.form-review-upload-active .log-set-btn {
    scroll-margin-bottom: calc(150px + env(safe-area-inset-bottom));
  }
}
.history-form-review-wrap {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(56,189,248,.28);
  border-radius: 14px;
  background: rgba(56,189,248,.06);
}
.history-form-review-card {
  padding: 12px;
  border: 1px solid rgba(34,197,94,.25);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg3) 94%, transparent);
}
.history-form-review-card.error { border-color: rgba(248,113,113,.38); }
.history-form-review-title { font-size: 13px; font-weight: 950; color: var(--text); }
.history-exercise-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}
.history-exercise-actions .detail-secondary-btn {
  flex: 1 1 0;
  min-width: 110px;
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
}
.history-exercise-actions .detail-ex-form-upload-btn {
  border-color: rgba(56,189,248,.42);
  color: #38bdf8;
}
.history-exercise-form-status {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.history-warmup-log {
  margin: 0 0 9px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border) 65%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--green) 7%, var(--bg2) 93%);
  overflow: hidden;
}
.history-warmup-log.partial {
  border-color: color-mix(in srgb, var(--gold) 42%, var(--border) 58%);
}
.history-warmup-log summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}
.history-warmup-log.partial summary { color: var(--gold); }
.history-warmup-log summary::-webkit-details-marker { display: none; }
.history-warmup-toggle {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.history-warmup-log[open] .history-warmup-toggle::after { content: ' less'; }
.history-warmup-rows {
  padding: 0 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.history-warmup-row {
  display: grid;
  grid-template-columns: 18px minmax(52px, auto) 1fr;
  gap: 7px;
  align-items: start;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
}
.history-warmup-state { color: var(--green); font-weight: 900; }
.history-warmup-reps { font-weight: 800; }
.history-warmup-load { color: var(--muted); }
.history-form-report-control {
  margin-top: 6px;
  padding: 14px;
  border: 1px solid rgba(56,189,248,.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(14,165,233,.06));
}
.history-form-report-control.ready {
  border-color: rgba(34,197,94,.48);
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(14,165,233,.05));
}
.history-form-report-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}
.history-form-report-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.history-form-report-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}
.history-form-report-counts span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg3);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}
.history-form-report-control .detail-save-meta-btn {
  width: 100%;
  margin-top: 2px;
}
.history-form-report-control .detail-save-meta-btn:disabled {
  opacity: .52;
  cursor: not-allowed;
}
.history-form-report-status {
  min-height: 16px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}
.history-form-review-headline { margin-top: 3px; font-size: 12px; font-weight: 850; color: var(--accent-light); }
.history-form-review-identification {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.history-form-score {
  min-width: 58px;
  padding: 7px 9px;
  border: 1px solid rgba(34,197,94,.48);
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
  text-align: center;
}
.history-form-review-meta { max-width: 42%; font-size: 10px; line-height: 1.35; color: var(--muted); text-align: right; }
.history-form-review-copy { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--text); }
.history-form-takeaway {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(16,185,129,.38);
  border-radius: 14px;
  background: rgba(16,185,129,.09);
}
.history-form-takeaway-title {
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.history-form-takeaway-cues {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
}
.history-form-takeaway-cues span { color: var(--accent-light); }
.history-form-full-review {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.history-form-full-review > summary {
  cursor: pointer;
  padding: 11px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  background: var(--bg3);
}
.history-form-full-review-body { padding: 0 12px 12px; }
.history-form-review-limit { margin-top: 9px; font-size: 11px; line-height: 1.45; color: var(--muted); }
.history-form-overall,
.history-form-prescription,
.history-form-final-summary {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg3);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}
.history-form-prescription {
  border-color: rgba(56,189,248,.38);
  background: rgba(56,189,248,.07);
}
.history-form-final-summary {
  border-color: rgba(34,197,94,.42);
  background: rgba(34,197,94,.08);
}
.history-form-technical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.history-form-technical-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.history-form-technical-row {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg2) 80%, transparent);
}
.history-form-technical-area {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}
.history-form-technical-action {
  margin-top: 6px;
  color: var(--accent-light);
  font-size: 12px;
  line-height: 1.45;
}
.history-form-review-detail {
  margin-top: 9px;
  padding: 9px 10px;
  border-left: 3px solid rgba(56,189,248,.48);
  border-radius: 8px;
  background: rgba(56,189,248,.06);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}
.history-form-review-detail.priority {
  border-left-color: rgba(34,197,94,.65);
  background: rgba(34,197,94,.08);
}
.history-form-review-coverage {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.history-form-review-coverage.complete {
  color: var(--green);
  font-weight: 800;
}
:root[data-theme-mode="dark"] .picker-effort-primer.needs-effort .picker-effort-title,
:root[data-theme-mode="dark"] .picker-effort-primer.needs-effort.effort-cue .picker-effort-title {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
:root[data-theme-mode="dark"] .picker-effort-primer.needs-effort .picker-effort-copy {
  color: rgba(255, 255, 255, .88);
}
.picker-effort-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 6px;
}
.picker-effort-btn {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--bg2) 86%, transparent);
  color: var(--text);
  padding: 9px 7px;
  font-size: 12px;
  font-weight: 900;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.picker-effort-primer.needs-effort .picker-effort-btn {
  border-color: rgba(22, 163, 74, .74);
  background: color-mix(in srgb, #22c55e 22%, var(--bg2) 78%);
}
.picker-effort-primer.needs-effort .picker-effort-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(34, 197, 94, .16);
}
.picker-effort-primer.needs-effort.effort-cue .picker-effort-btn {
  border-color: rgba(34, 197, 94, .72);
}
.picker-effort-btn.active {
  border-color: #16a34a;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: var(--on-success);
  box-shadow: 0 10px 20px rgba(34, 197, 94, .22);
}

@media (prefers-reduced-motion: reduce) {
  .picker-effort-primer.needs-effort.effort-cue {
    outline: 4px solid rgba(34, 197, 94, .28);
  }
}
.picker-effort-status {
  min-height: 0;
  margin-top: 2px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}
.picker-effort-status:empty {
  display: none;
}
.picker-confirm-locked {
  margin: 0 16px 12px;
  width: calc(100% - 32px);
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--accent) 32%, var(--border) 68%);
  background: color-mix(in srgb, var(--bg3) 88%, transparent);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}
.picker-confirm-locked.hidden {
  display: none;
}

.picker-confirm {
  margin: 0 16px 12px; background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff;
  border-radius: 16px; padding: 16px; font-size: 17px; font-weight: 900;
  width: calc(100% - 32px); text-align: center;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 28%, transparent);
}
.picker-confirm.ready {
  display: block;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  box-shadow: 0 16px 34px rgba(34, 197, 94, .30);
}
.picker-confirm.locked {
  display: none !important;
}
.picker-confirm:active { opacity: .8; }

@media (max-width: 719px) {
  .picker-overlay.open {
    align-items: flex-end;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
  }
  .picker-sheet {
    min-height: 0;
    height: auto;
    max-height: calc(100vh / var(--app-zoom));
    max-height: calc(100svh / var(--app-zoom));
    max-height: calc(100dvh / var(--app-zoom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
    scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }
  .picker-handle {
    flex: 0 0 auto;
    margin-top: 8px;
  }
  .picker-mission-card {
    flex: 0 0 auto;
    margin: 8px 12px;
    padding: 9px 10px;
    border-radius: 18px;
    gap: 7px;
  }
  .picker-mission-label {
    font-size: 10px;
  }
  .picker-title {
    font-size: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .picker-subtitle {
    font-size: 12px;
    margin-top: 3px;
  }
  .picker-close-btn {
    width: 32px;
    height: 32px;
  }
  .picker-rest-timer {
    padding: 6px 10px;
  }
  .picker-rest-timer.active {
    align-self: flex-start;
    min-height: 28px;
    padding: 4px 9px;
  }
  .picker-mission-card:has(.picker-rest-timer.active) {
    gap: 6px;
  }
  .picker-target-card {
    padding: 8px 10px;
    border-radius: 14px;
  }
  .picker-target-topline {
    gap: 6px;
    margin-bottom: 6px;
  }
  .picker-warmup-chip-btn {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 10px;
  }
  .picker-target-main {
    font-size: 17px;
  }
  .picker-target-sub {
    display: none;
    overflow: hidden;
  }
  .picker-metric-chips {
    gap: 6px;
  }
  .picker-metric-chip {
    padding: 5px 7px;
    font-size: 11px;
  }
  .picker-carousel-shell {
    flex: 0 0 auto;
    min-height: auto;
  }
  .picker-dial-card {
    margin: 0 12px 8px;
    padding: 8px 0;
    border-radius: 18px;
  }
  .picker-dial-head {
    padding: 0 12px 4px;
  }
  .picker-dial-title {
    font-size: 12px;
    display: none;
  }
  .picker-base-weight-row {
    display: inline-flex;
    font-size: 11px;
    margin-top: 2px;
  }
  .picker-base-weight-edit {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 14px;
  }
  .picker-accessible-controls {
    padding: 0 12px 8px;
    gap: 8px;
  }
  .picker-accessible-row {
    padding: 8px;
    gap: 6px;
  }
  .picker-accessible-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(76px, 1.2fr) repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .picker-accessible-step,
  .picker-accessible-value {
    min-height: 42px;
    font-size: 14px;
  }
  .picker-jump-effort {
    min-height: 44px;
    font-size: 14px;
  }
  .picker-effort-primer {
    margin: 4px 10px 0;
    padding: 6px 8px 4px;
    border-radius: 11px;
  }
  .picker-effort-copy {
    display: none;
  }
  .picker-effort-buttons {
    gap: 5px;
    margin-top: 5px;
  }
  .picker-effort-btn {
    padding: 8px 4px;
    font-size: 11px;
  }
  .picker-effort-status {
    margin-top: 2px;
  }
  .drum-row {
    margin-bottom: 4px;
  }
  .picker-drum-stack {
    gap: 4px;
  }
  .picker-drum-label,
  .picker-drum-unit {
    font-size: 10px;
  }
  .picker-e1rm-bar {
    padding: 2px 12px 0;
  }
  .picker-e1rm-card {
    padding: 8px 10px;
  }
  .picker-e1rm-value {
    font-size: 16px;
  }
  .picker-coaching,
  .picker-warmup {
    margin: 0 12px 8px;
    padding: 9px 10px;
  }
  .picker-action-footer {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 7px 0 max(9px, env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--bg2) 82%, transparent), var(--bg2) 18px),
      var(--bg2);
    box-shadow: 0 -12px 26px rgba(2,6,23,.22);
  }
  .picker-carousel-nav {
    padding: 0 12px 6px;
  }
  .picker-carousel-dot {
    height: 32px;
    font-size: 12px;
  }
  .picker-secondary-actions {
    gap: 6px;
    padding: 0 12px 6px;
  }
  .picker-secondary-btn {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .picker-confirm {
    margin: 0 12px;
    width: calc(100% - 24px);
    padding: 13px;
    border-radius: 14px;
    font-size: 16px;
  }
  .picker-confirm-locked {
    margin: 0 12px;
    width: calc(100% - 24px);
    padding: 11px 12px;
    border-radius: 14px;
    font-size: 12px;
  }
  .drum-wrap {
    height: calc(var(--item-h) * 3);
  }
  .drum-wrap::before {
    top: var(--item-h);
  }
  .drum-wrap::after {
    top: calc(var(--item-h) * 2);
  }
  .drum-selection {
    top: var(--item-h);
  }
  .drum-list {
    padding-top: var(--item-h);
    padding-bottom: var(--item-h);
  }
  html[data-display-size="large"] .picker-sheet,
  html[data-display-size="extra-large"] .picker-sheet,
  html[data-display-size="maximum"] .picker-sheet {
    height: calc(100vh / var(--app-zoom));
    height: calc(100svh / var(--app-zoom));
    height: calc(100dvh / var(--app-zoom));
    max-height: calc(100vh / var(--app-zoom));
    max-height: calc(100svh / var(--app-zoom));
    max-height: calc(100dvh / var(--app-zoom));
    overflow: hidden;
  }
  html[data-display-size="large"] .picker-carousel-shell,
  html[data-display-size="extra-large"] .picker-carousel-shell,
  html[data-display-size="maximum"] .picker-carousel-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  html[data-display-size="large"] .picker-action-footer,
  html[data-display-size="extra-large"] .picker-action-footer,
  html[data-display-size="maximum"] .picker-action-footer {
    position: sticky;
    bottom: 0;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 719px) {
    .picker-overlay {
      height: -webkit-fill-available;
    }
    .picker-sheet {
      max-height: calc(100svh / var(--app-zoom));
    }
    .picker-carousel-shell {
      padding-bottom: 8px;
    }
    .picker-action-footer {
      padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
  }
}

@media (min-width: 720px) {
  .picker-overlay.open {
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .picker-sheet {
    width: min(520px, calc((100vw - 48px) / var(--app-zoom)));
    height: auto;
    max-height: calc((100dvh - 32px) / var(--app-zoom));
    overflow: hidden;
    border-radius: 28px;
    padding-bottom: 8px;
    box-shadow: 0 30px 90px rgba(2,6,23,.45);
    transform-origin: center center;
  }
  .picker-handle {
    margin-top: 8px;
    margin-bottom: 6px;
  }
  .picker-mission-card {
    margin-top: 0;
    margin-bottom: 8px;
    padding: 9px 12px;
    gap: 7px;
  }
  .picker-title {
    font-size: 20px;
  }
  .picker-subtitle {
    margin-top: 3px;
  }
  .picker-target-card {
    padding: 8px 10px;
  }
  .picker-target-main {
    font-size: 18px;
  }
  .picker-target-sub {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.25;
  }
  .picker-dial-card {
    padding-top: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }
  .picker-mission-card,
  .picker-dial-card,
  .picker-coaching,
  .picker-warmup,
  .picker-confirm {
    margin-left: 18px;
    margin-right: 18px;
  }
  .picker-secondary-actions {
    padding-left: 18px;
    padding-right: 18px;
  }
  .picker-carousel-shell {
    flex: 0 1 auto;
    min-height: 0;
  }
  .picker-effort-primer {
    margin-top: 4px;
    padding: 6px 8px 4px;
    border-radius: 11px;
  }
  .picker-effort-copy {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.25;
  }
  .picker-effort-buttons {
    margin-top: 5px;
  }
  .picker-effort-btn {
    padding: 7px 6px;
    border-radius: 11px;
  }
  .picker-effort-status {
    min-height: 0;
    margin-top: 2px;
  }
  .picker-e1rm-card {
    padding: 9px 11px;
  }
  .picker-action-footer {
    padding-top: 6px;
    box-shadow: 0 -12px 26px rgba(2,6,23,.14);
  }
  .picker-carousel-nav {
    padding: 0 18px 6px;
  }
  .picker-confirm {
    width: calc(100% - 36px);
    margin-bottom: 0;
    padding: 12px;
  }
  .picker-confirm-locked {
    width: calc(100% - 36px);
    margin-left: 18px;
    margin-right: 18px;
    margin-bottom: 0;
    padding: 10px 12px;
  }
  .drum-row {
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
  }
  .drum-wrap {
    height: calc(var(--item-h) * 2.65);
    max-width: 170px;
  }
  .drum-wrap::before {
    top: calc(var(--item-h) * .825);
  }
  .drum-wrap::after {
    top: calc(var(--item-h) * 1.825);
  }
  .drum-selection {
    top: calc(var(--item-h) * .825);
  }
  .drum-list {
    padding-top: calc(var(--item-h) * .825);
    padding-bottom: calc(var(--item-h) * .825);
  }
}

@media (max-width: 420px) {
  .picker-title { font-size: 20px; }
  .drum-row { gap: 6px; padding: 0 10px; }
  .drum-wrap { max-width: 132px; }
  .drum-label-between { font-size: 20px; }
}

/* Only genuinely narrow phones need the e1RM result stacked. Keeping it
   inline on normal iPhone/Android widths saves prime vertical space. */
@media (max-width: 359px) {
  .picker-e1rm-card { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Compact-height phones, including older iPhones, keep every required action
   reachable without making the drum controls fight the sheet scroll. */
@media (max-width: 719px) and (max-height: 759px) {
  :root {
    --item-h: 46px;
  }
  .picker-mission-card {
    margin: 6px 10px;
    padding: 8px 9px;
    gap: 5px;
  }
  .picker-title {
    font-size: 18px;
  }
  .picker-target-card {
    padding: 7px 9px;
  }
  .picker-target-main {
    font-size: 16px;
  }
  .picker-dial-card {
    margin: 0 10px 6px;
    padding: 6px 0;
  }
  .picker-effort-primer {
    margin-inline: 8px;
  }
  .picker-effort-btn {
    min-height: 38px;
  }
  .picker-action-footer {
    padding-top: 5px;
  }
}

/* Modern tall phones have room for a more confident, easier-to-hit logger.
   This applies to larger iPhones as well as Android devices, while the footer
   remains sticky for Safari's changing browser chrome. */
@media (max-width: 719px) and (min-width: 390px) and (min-height: 800px) {
  :root:where([data-display-size="compact"], [data-display-size="standard"]) {
    --item-h: 56px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-handle {
    width: 44px;
    height: 5px;
    margin-top: 10px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-mission-card {
    margin: 10px 14px;
    padding: 12px;
    gap: 9px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-mission-card:has(.picker-rest-timer.active) {
    gap: 6px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-mission-label {
    font-size: 11px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-title {
    font-size: 22px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-subtitle {
    font-size: 13px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-close-btn {
    width: 38px;
    height: 38px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-target-card {
    padding: 11px 12px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-target-main {
    font-size: 20px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-warmup-chip-btn {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 11px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-metric-chip {
    padding: 6px 9px;
    font-size: 12px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-dial-card {
    margin: 0 14px 9px;
    padding: 10px 0;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .drum-item {
    font-size: 24px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .drum-item.selected {
    font-size: 30px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-e1rm-card {
    padding: 10px 12px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-e1rm-value {
    font-size: 18px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-effort-primer {
    margin: 6px 12px 0;
    padding: 8px 10px 6px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-effort-title {
    font-size: 12px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-effort-btn {
    min-height: 42px;
    font-size: 12px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-carousel-nav {
    padding-inline: 14px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-carousel-dot {
    height: 38px;
    font-size: 13px;
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-confirm,
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-confirm-locked {
    margin-inline: 14px;
    width: calc(100% - 28px);
  }
  :where(html[data-display-size="compact"], html[data-display-size="standard"]) .picker-confirm-locked {
    padding: 13px 14px;
    font-size: 13px;
  }
}
/* Keep dense plate and warm-up guidance usable at enlarged mobile display sizes. */
.plate-calc-rig {
  transform: scale(var(--plate-rig-fit-scale, 1));
  transform-origin: center bottom;
  transition: transform 120ms ease-out;
}
html[data-display-size="maximum"] .picker-warmup-head {
  align-items: stretch;
  flex-direction: column;
}
html[data-display-size="maximum"] .picker-warmup-tag {
  align-self: flex-start;
}
/* ── History screen ───────────────────────────────────────────────────── */
.hist-workout {
  margin: 0 16px 12px; background: var(--bg2); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.hist-workout-header {
  padding: 14px 16px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.hist-workout-header > div:first-child {
  flex: 1;
  min-width: 0;
}
.hist-workout-date { font-weight: 700; font-size: 15px; }
.hist-workout-name { color: var(--muted); font-weight: 700; }
.hist-workout-stats { font-size: 13px; color: var(--muted); }
.hist-workout-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.35;
  background: color-mix(in srgb, var(--bg3) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 9px;
}
.hist-set-row {
  display: flex; padding: 10px 16px; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.hist-set-row:last-child { border-bottom: none; }
.hist-ex-name { flex: 1; font-weight: 500; color: var(--text); }
.hist-set-val { color: var(--muted); font-size: 13px; }
.hist-pb-dot { color: var(--gold); font-size: 11px; margin-left: 4px; }
.hist-detail-summary {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg3);
}
.hist-detail-summary-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hist-detail-summary-row {
  display: grid;
  grid-template-columns: minmax(92px, .85fr) minmax(0, 1.65fr);
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.35;
}
.hist-detail-summary-ex {
  color: var(--text);
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hist-detail-summary-sets {
  color: var(--muted);
  min-width: 0;
}
.history-drills-card {
  flex-shrink: 0;
  margin: 0 0 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border) 66%);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, var(--bg3) 93%);
  overflow: hidden;
}
.history-drills-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}
.history-drills-card summary::-webkit-details-marker { display: none; }
.history-drills-card[open] .history-drills-toggle::after { content: ' less'; }
.history-drills-toggle { color: var(--muted); font-size: 11px; font-weight: 750; }
.history-drills-body { display: flex; flex-direction: column; gap: 10px; padding: 0 13px 13px; }
.history-drills-phase {
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.history-drills-phase:first-child { border-top: 0; padding-top: 0; }
.history-drills-phase-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); font-size: 12px; font-weight: 850; }
.history-drills-status { border-radius: 999px; padding: 3px 7px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.history-drills-status.done { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.history-drills-status.skipped { color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, transparent); }
.history-drills-status.unrecorded { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.history-drills-list { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; }
.history-drill-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 7px; align-items: baseline; color: var(--text); font-size: 12px; line-height: 1.35; }
.history-drill-check { color: var(--accent-light); font-weight: 900; text-align: center; }
.history-drill-name { min-width: 0; overflow-wrap: anywhere; }
.history-drill-video-link {
  color: var(--accent-light);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.history-drill-video-link:hover,
.history-drill-video-link:focus-visible { color: var(--accent); }
.history-drill-meta { color: var(--muted); font-size: 10px; text-align: right; }
.history-drills-empty { margin-top: 7px; color: var(--muted); font-size: 11px; }
.hist-delete-btn {
  background: none; border: none; font-size: 18px; padding: 4px 8px;
  color: var(--muted); border-radius: 8px; flex-shrink: 0;
}
.hist-edit-btn {
  background: none; border: none; font-size: 18px; padding: 4px 8px;
  color: var(--accent-light); border-radius: 8px; flex-shrink: 0;
}
.hist-copy-btn {
  background: none; border: none; font-size: 18px; padding: 4px 8px;
  color: var(--accent); border-radius: 8px; flex-shrink: 0;
}
.hist-copy-btn:active { background: var(--bg3); color: var(--accent-light); }
.hist-edit-btn:active { background: var(--bg3); color: var(--accent); }
.hist-delete-btn:active { background: var(--bg3); color: var(--red); }
.hist-workout-header > div:last-child {
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .hist-workout-header {
    gap: 8px;
  }
  .hist-delete-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .hist-edit-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .hist-copy-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .hist-detail-summary-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .hist-detail-summary-ex {
    white-space: normal;
  }
  .plate-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.hist-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 16px 20px;
}
.hist-pager-btn {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; font-weight: 600;
}
.hist-pager-btn:disabled { opacity: .45; }
.hist-pager-text { font-size: 13px; color: var(--muted); }

.bodydash-wrap { padding: 16px; display:flex; flex-direction:column; gap:14px; }
.bodydash-heading { font-size: 22px; font-weight: 800; color: var(--text); }
.bodydash-subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }
.bodydash-period { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.bodydash-period-btn {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 12px; font-size: 12px; color: var(--muted);
}
.bodydash-period-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.bodydash-custom { display:none; flex-wrap:wrap; gap:8px; align-items:center; }
.bodydash-custom.visible { display:flex; }
.bodydash-custom input[type="date"] { width:auto; min-width: 140px; color-scheme: dark; }
:root[data-theme-mode="light"] .bodydash-custom input[type="date"] { color-scheme: light; }
.bodydash-card-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:10px; }
.bodydash-stat-card {
  background: var(--chart-panel); border: 1px solid var(--chart-border); border-radius: 14px; padding: 14px;
}
.bodydash-stat-label { font-size: 11px; color: var(--chart-subtle); text-transform: uppercase; letter-spacing: .06em; }
.bodydash-stat-value { font-size: 24px; font-weight: 800; color: var(--chart-text); margin-top: 8px; }
.bodydash-stat-change { font-size: 12px; margin-top: 6px; color: #4ade80; }
.bodydash-section {
  background: var(--chart-panel); border: 1px solid var(--chart-border); border-radius: 14px; padding: 16px;
}
.bodydash-section-title { font-size: 14px; font-weight: 700; color: var(--chart-muted); margin-bottom: 12px; line-height: 1.3; }
.bodydash-section .bodydash-subtitle { color: var(--chart-text); }
.bodydash-chart { width: 100%; height: 220px; }
.bodydash-chart.tall { height: 300px; }
.bodydash-chart.hbar { height: auto; min-height: 120px; }
.chart-ptr { cursor: crosshair; }
.chart-xhair { pointer-events: none; }
.chart-idot  { pointer-events: none; transition: opacity .08s; }
.bodydash-svg { width: 100%; height: 100%; display: block; overflow: hidden; }
.bodydash-section-action {
  background: var(--chart-bg); border: 1px solid var(--chart-border); color: var(--chart-muted); border-radius: 999px;
  min-width: 32px; height: 32px; padding: 0 10px; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.bodydash-site-grid { display:grid; grid-template-columns: 1fr; gap:10px; }
.bodydash-site-card { background: var(--chart-bg); border: 1px solid var(--chart-border); border-radius: 10px; padding: 12px; }
.bodydash-site-name { font-size: 11px; color: var(--chart-subtle); text-transform: uppercase; letter-spacing: .05em; }
.bodydash-site-vals { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-top:8px; flex-wrap:wrap; }
.bodydash-site-start { font-size: 12px; color: #f87171; }
.bodydash-site-end { font-size: 16px; font-weight: 700; color: #4ade80; }
.bodydash-site-spark { width:100%; height:72px; margin-top:8px; }
.bodydash-site-bar-bg { height: 6px; background:#1e293b; border-radius: 999px; margin-top: 10px; overflow:hidden; }
.bodydash-site-bar { height:100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #38bdf8); }
.bodydash-site-change { margin-top: 8px; font-size: 12px; color: #4ade80; }
.bodydash-kpi-grid { display:grid; grid-template-columns: 1fr; gap:10px; }
.bodydash-kpi-card { background:var(--chart-bg); border:1px solid var(--chart-border); border-radius:10px; padding:12px; }
.bodydash-kpi-title { font-size: 12px; font-weight: 700; color:var(--chart-text); }
.bodydash-kpi-meta { font-size:11px; color:var(--chart-muted); margin-top:4px; }
.bodydash-kpi-value { font-size:20px; font-weight:800; color:#38bdf8; margin-top:8px; }
.bodydash-kpi-spark { width:100%; height:72px; margin-top:8px; }
.bodydash-kpi-variation-list { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.bodydash-kpi-variation { border-top:1px solid var(--chart-border); padding-top:9px; }
.bodydash-kpi-variation:first-child { border-top:0; padding-top:0; }
.bodydash-kpi-variation-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.bodydash-kpi-variation-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:800; color:var(--chart-text); }
.bodydash-kpi-variation-value { flex:0 0 auto; font-size:15px; color:#38bdf8; }
.bodydash-kpi-empty { font-size:12px; color:var(--chart-subtle); padding:16px 0; }
.bodydash-keylift-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.bodydash-toggle-list { display:flex; flex-direction:column; gap:8px; max-height:52vh; overflow:auto; }
.bodydash-toggle-item {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:var(--chart-bg); border:1px solid var(--chart-border); border-radius:12px; padding:12px;
}
.bodydash-toggle-item input { width:18px; height:18px; accent-color: var(--accent); }
.bodydash-toggle-main { min-width:0; }
.bodydash-toggle-name { font-size:13px; font-weight:700; color:var(--chart-text); }
.bodydash-toggle-meta { font-size:11px; color:var(--chart-subtle); margin-top:4px; }
.progress-lift-count { font-size:12px; font-weight:800; color:var(--chart-text); }
.progress-lift-badges { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.progress-lift-badge {
  display:inline-flex; align-items:center; border:1px solid var(--chart-border); border-radius:999px;
  padding:3px 7px; font-size:10px; font-weight:800; line-height:1.1; color:var(--chart-muted);
}
.progress-lift-badge.manual { color:#4ade80; border-color:rgba(74,222,128,.42); background:rgba(74,222,128,.08); }
.progress-lift-badge.automatic { color:#38bdf8; border-color:rgba(56,189,248,.42); background:rgba(56,189,248,.08); }
.progress-lift-badge.program { color:#fbbf24; border-color:rgba(251,191,36,.42); background:rgba(251,191,36,.08); }
.bodydash-heatmap-wrap { overflow-x:auto; }
.bodydash-heatmap-months { display:flex; gap:3px; margin-bottom:6px; font-size:10px; color:var(--chart-muted); }
.bodydash-heatmap-grid { display:flex; gap:3px; }
.bodydash-heatmap-legend {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  margin-top: 10px; font-size: 11px; color: var(--chart-subtle);
}
.bodydash-heatmap-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.bodydash-heatmap-legend-swatch {
  width: 12px; height: 12px; border-radius: 3px; background: var(--chart-bg); border: 1px solid var(--chart-panel);
  flex-shrink: 0;
}
.bodydash-hm-col { display:flex; flex-direction:column; gap:3px; }
.bodydash-hm-cell { width:12px; height:12px; border-radius:2px; background:var(--chart-bg); }
.bodydash-hm-tooltip {
  position: fixed; display:none; pointer-events:none; z-index: 250;
  background:var(--chart-panel); border:1px solid var(--chart-border); border-radius:8px; color:var(--chart-text);
  padding:8px 10px; font-size:12px;
}
.bodydash-workouts { display:flex; flex-direction:column; gap:10px; }
.bodydash-workout-card {
  background:var(--chart-bg); border:1px solid var(--chart-border); border-radius:12px; padding:12px;
}
.bodydash-workout-date { font-size: 13px; font-weight: 700; color: var(--chart-text); }
.bodydash-workout-meta { font-size: 12px; color: var(--chart-subtle); margin-top: 4px; }
.bodydash-form { display:flex; flex-direction:column; gap:10px; }
.bodydash-form-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:8px 0 2px; flex-wrap:wrap; }
.bodydash-unit-select,
.bodydash-compact-select {
  width:auto; min-width:150px; max-width:100%; padding:9px 34px 9px 10px;
  background:var(--bg2); border:1px solid var(--border); border-radius:10px; color:var(--text); font-weight:700;
}
.bodydash-section .bodydash-compact-select {
  background: var(--chart-bg);
  border-color: var(--chart-border);
  color: var(--chart-text);
  color-scheme: dark;
}
.bodydash-upload-btn {
  width:100%; padding:12px 14px; border-radius:12px; border:1px solid #0891b2;
  background:linear-gradient(135deg,#0e7490,#0369a1); color:var(--on-accent); font-weight:800;
}
.bodydash-import-status:empty { display:none; }
.bodydash-import-working,
.bodydash-import-success,
.bodydash-import-warning { font-size:12px; line-height:1.45; padding:10px 12px; border-radius:10px; }
.bodydash-import-working { color:var(--info-text); background:rgba(14,116,144,.18); border:1px solid rgba(34,211,238,.35); display:flex; align-items:center; gap:8px; }
.bodydash-import-success { color:var(--success-text); background:rgba(22,163,74,.16); border:1px solid rgba(74,222,128,.35); }
.bodydash-import-warning { color:var(--warning-text); background:rgba(194,65,12,.16); border:1px solid rgba(251,146,60,.35); margin-top:8px; }
.bodydash-import-review { background:var(--bg3); border:1px solid #0891b2; border-radius:12px; padding:12px; }
.bodydash-import-review.warning { border-color:#f97316; }
.bodydash-import-head { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--text); font-size:13px; }
.bodydash-import-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; margin-top:10px; font-size:12px; color:var(--muted); }
.bodydash-import-values span { display:flex; justify-content:space-between; gap:8px; }
.bodydash-import-apply { width:100%; margin-top:10px; padding:11px; border-radius:10px; background:var(--green); color:var(--on-success); font-weight:800; }
.bodydash-import-apply:disabled { opacity:.4; cursor:not-allowed; }
.bodydash-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.bodydash-metric-field {
  display:flex; flex-direction:column; gap:6px;
}
.bodydash-metric-field label {
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}
.bodydash-section .bodydash-metric-field label { color: var(--chart-text); }
.bodydash-site-inputs { display:grid; grid-template-columns:1fr; gap:8px; }
.bodydash-site-field {
  display:grid; grid-template-columns: minmax(0, 1fr) 96px; gap:10px; align-items:center;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.bodydash-site-field label {
  font-size: 13px; font-weight: 600; color: var(--text);
}
.bodydash-site-field input {
  width: 96px; justify-self: end; text-align: center; padding: 10px 8px;
}
.bodydash-site-inputs input[readonly] { background: var(--bg2); opacity: .9; }
.bodydash-save-btn { background: var(--accent); color:#fff; border-radius:12px; padding:14px; font-weight:700; }
.bodydash-status { font-size:12px; color:var(--muted); min-height:16px; }
.bodydash-section .bodydash-status { color:var(--chart-muted); }
.bodydash-measure-list { display:flex; flex-direction:column; gap:10px; }
.bodydash-measure-card { background:var(--chart-bg); border:1px solid var(--chart-border); border-radius:12px; padding:12px; display:flex; flex-direction:column; gap:6px; }
.bodydash-measure-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.bodydash-measure-actions { display:flex; gap:8px; flex-shrink:0; }
.bodydash-measure-btn {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--accent-light); font-size: 12px; font-weight: 700; padding: 6px 10px;
}
.bodydash-measure-btn.danger { color: var(--red); }
.bodydash-measure-date { font-size:13px; font-weight:700; color:var(--chart-text); }
.bodydash-measure-meta { font-size:12px; color:var(--chart-subtle); }
.bodydash-measure-pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 2px; gap: 8px;
}
.bodydash-pager-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--accent-light); font-size: 13px; font-weight: 600;
  padding: 5px 14px; flex-shrink: 0;
}
.bodydash-pager-btn:disabled { opacity: .3; pointer-events: none; }
.bodydash-pager-btn:active { background: var(--bg2); }
.bodydash-pager-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.bodydash-section .bodydash-pager-label { color:var(--chart-muted); }
.bodydash-measure-empty { color:var(--chart-text); font-size:13px; }
.bodydash-section-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:12px; flex-wrap:wrap;
}
.bodydash-mini-period {
  display:flex; gap:6px; align-items:center; flex-wrap:wrap; justify-content:flex-start;
}
@media (min-width: 900px) {
  .bodydash-wrap { max-width: 1240px; margin: 0 auto; gap: 18px; }
  .bodydash-card-grid { grid-template-columns: repeat(5, 1fr); }
  .bodydash-site-grid { grid-template-columns: repeat(2, 1fr); }
  .bodydash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .bodydash-site-inputs { grid-template-columns: 1fr 1fr; }
  .bodydash-section { padding: 18px; }
  .bodydash-section-title { font-size: 15px; }
  .bodydash-chart { height: 250px; }
  .bodydash-chart.tall { height: 340px; }
}
@media (max-width: 640px) {
  .bodydash-wrap { padding: 12px; gap: 12px; }
  .bodydash-heading { font-size: 20px; }
  .bodydash-card-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bodydash-stat-card,
  .bodydash-section { padding: 14px; }
  .bodydash-section-title { font-size: 13px; margin-bottom: 0; }
  .bodydash-chart { height: 190px; }
  .bodydash-chart.tall { height: 230px; }
  .bodydash-site-name { font-size: 10px; }
  .bodydash-site-start,
  .bodydash-site-change,
  .bodydash-kpi-meta,
  .chart-legend { font-size: 11px; }
  .bodydash-site-end,
  .bodydash-kpi-value { font-size: 18px; }
  .bodydash-site-spark,
  .bodydash-kpi-spark { height: 64px; }
  .bodydash-form-section-head { align-items:stretch; }
  .bodydash-unit-select,
  .bodydash-compact-select { width:100%; }
  .bodydash-import-values { grid-template-columns:1fr; }
}
/* ── Add exercise modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  display: none; align-items: flex-end; justify-content: center; z-index: 200;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
button[data-modal-close] {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-sheet {
  background: var(--bg2); border-radius: 24px 24px 0 0;
  width: calc(100% / var(--app-zoom)); padding: 20px 20px max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  max-height: calc((100vh - 18px) / var(--app-zoom));
  max-height: calc((100dvh - 18px) / var(--app-zoom));
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: slide-up .22s ease;
  transform: scale(var(--app-zoom));
  transform-origin: bottom center;
}
.modal-title { font-size: 18px; font-weight: 700; padding-bottom: 4px; }
.modal-cancel { color: var(--muted); font-size: 15px; text-align: center; padding: 8px; }
.modal-save {
  background: var(--accent); color: #fff; border-radius: 12px;
  padding: 14px; font-size: 16px; font-weight: 700; width: 100%; text-align: center;
}
.modal-save:active { opacity: .8; }
@media (min-width: 720px) {
  .modal-overlay.open {
    align-items: center;
    padding: 16px;
  }
  .modal-sheet {
    width: min(680px, calc((100vw - 48px) / var(--app-zoom)));
    max-height: calc((100dvh - 48px) / var(--app-zoom));
    border-radius: 24px;
    transform-origin: center center;
  }
  .modal-sheet.notification-login-alert-sheet {
    width: min(420px, calc((100vw - 48px) / var(--app-zoom)));
    padding: 18px;
    gap: 10px;
  }
  .modal-sheet.notification-login-alert-sheet .modal-title {
    font-size: 17px;
  }
}
html[data-display-size="large"] .modal-sheet,
html[data-display-size="extra-large"] .modal-sheet,
html[data-display-size="maximum"] .modal-sheet {
  padding: 14px 14px max(14px, env(safe-area-inset-bottom));
  gap: 10px;
}
.display-size-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56,189,248,.12), rgba(124,58,237,.10));
  padding: 12px;
  margin: 4px 0 14px;
}
.display-size-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.display-size-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.display-size-value {
  font-size: 13px;
  font-weight: 900;
  color: var(--accent-light);
}
.display-size-controls {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 8px;
}
.display-size-step {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}
.display-size-step:disabled {
  opacity: .42;
  cursor: default;
}
.display-size-preview {
  min-height: 44px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(15,23,42,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  font-size: calc(15px * var(--preview-font-scale, 1));
  font-weight: 800;
}
.display-size-help {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.readiness-score-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
}
.readiness-score-btn {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px;
  min-height: 56px; font-size: 18px; font-weight: 800; color: var(--text);
}
.readiness-score-btn.active {
  background: linear-gradient(180deg, rgba(56,189,248,.16), rgba(56,189,248,.08));
  border-color: rgba(56,189,248,.55); color: var(--text);
  box-shadow: 0 0 0 1px rgba(56,189,248,.18);
}
:root[data-theme-mode="light"] .readiness-review-card {
  background: linear-gradient(180deg, rgba(56,189,248,.12), rgba(255,255,255,.96));
  border-color: rgba(2,132,199,.24);
}
.readiness-band {
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--bg3); display: flex; flex-direction: column; gap: 4px;
}
.readiness-band-title { font-size: 14px; font-weight: 800; color: var(--text); }
.readiness-band-copy { font-size: 12px; color: var(--muted); line-height: 1.45; }
.readiness-review-card {
  background: linear-gradient(180deg, rgba(56,189,248,.1), rgba(15,23,42,.18));
  border: 1px solid rgba(56,189,248,.2); border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.readiness-review-headline { font-size: 16px; font-weight: 800; color: var(--text); }
.readiness-review-reason { font-size: 13px; color: var(--text); line-height: 1.5; }
.readiness-review-signals {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.readiness-review-chip {
  font-size: 11px; color: var(--muted); padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04);
}
.modal-sheet.adaptive-readiness-sheet {
  gap: 10px;
}
.adaptive-readiness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.adaptive-readiness-kicker {
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  margin-top: 3px;
  text-transform: uppercase;
}
.adaptive-readiness-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--bg3);
  font-size: 18px;
  font-weight: 900;
}
.adaptive-feedback-card {
  border: 1px solid rgba(56,189,248,.35);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(56,189,248,.10), rgba(15,23,42,.12));
  padding: 12px;
}
.adaptive-feedback-card label {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}
.adaptive-feedback-card p {
  margin: 5px 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.adaptive-feedback-card textarea {
  display: block;
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  color: var(--text);
  padding: 10px 11px;
  font: inherit;
  line-height: 1.4;
}
.adaptive-feedback-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56,189,248,.12);
  outline: none;
}
.adaptive-feedback-hint,
.adaptive-model-note,
.adaptive-choice-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.adaptive-feedback-hint { margin-top: 7px; }
.adaptive-feedback-quote {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 3px solid #f59e0b;
  border-radius: 0 12px 12px 0;
  background: rgba(245,158,11,.08);
  padding: 9px 11px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}
.adaptive-feedback-quote span {
  color: #f59e0b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.adaptive-feedback-quote strong { overflow-wrap: anywhere; }
.adaptive-action-pill {
  align-self: flex-start;
  border: 1px solid rgba(56,189,248,.35);
  border-radius: 999px;
  background: rgba(56,189,248,.11);
  color: var(--accent-light);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.adaptive-review-error {
  border-color: rgba(239,68,68,.4);
  background: rgba(239,68,68,.08);
}
.adaptive-deload-note,
.adaptive-safety-note {
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.4;
}
.adaptive-deload-note {
  background: rgba(245,158,11,.10);
  color: #fbbf24;
}
.adaptive-safety-note {
  border: 1px solid rgba(245,158,11,.32);
  background: rgba(245,158,11,.08);
  color: var(--text);
}
.adaptive-section-title {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.adaptive-change-list,
.adaptive-exercise-list {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg3);
  padding: 11px;
}
.adaptive-change-row + .adaptive-change-row,
.adaptive-exercise-row + .adaptive-exercise-row {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}
.adaptive-change-row > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
}
.adaptive-change-row span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.adaptive-change-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.adaptive-exercise-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}
.adaptive-exercise-row > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(56,189,248,.12);
  color: var(--accent-light);
  font-size: 10px;
  font-weight: 900;
}
.adaptive-exercise-row strong { min-width: 0; color: var(--text); font-size: 12px; }
.adaptive-exercise-row small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.adaptive-wait-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(56,189,248,.32);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(56,189,248,.13), rgba(16,185,129,.08));
  padding: 14px;
}
.adaptive-wait-card strong { color: var(--text); font-size: 14px; line-height: 1.35; }
.adaptive-wait-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.adaptive-wait-pulse {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(145deg, #0284c7, #10b981);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  animation: adaptive-wait-pulse 1.5s ease-in-out infinite;
}
@keyframes adaptive-wait-pulse {
  50% { transform: scale(1.05); box-shadow: 0 0 0 9px rgba(56,189,248,.08); }
}
.adaptive-wait-time {
  color: #ef4444;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}
.adaptive-skip-btn,
.adaptive-readiness-actions .detail-secondary-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}
.adaptive-readiness-actions {
  position: sticky;
  bottom: -1px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 -4px -4px;
  padding: 8px 4px 4px;
  background: var(--bg2);
}
:root[data-theme-mode="light"] .adaptive-feedback-card,
:root[data-theme-mode="light"] .adaptive-wait-card {
  background: linear-gradient(145deg, rgba(2,132,199,.09), rgba(255,255,255,.96));
}
@media (max-width: 480px) {
  .modal-sheet.adaptive-readiness-sheet { padding-left: 14px; padding-right: 14px; }
  .adaptive-exercise-row { grid-template-columns: 24px minmax(0, 1fr); }
  .adaptive-exercise-row small { grid-column: 2; }
}
html[data-display-size="extra-large"] .adaptive-feedback-card p,
html[data-display-size="maximum"] .adaptive-feedback-card p,
html[data-display-size="extra-large"] .adaptive-wait-card p,
html[data-display-size="maximum"] .adaptive-wait-card p {
  display: none;
}
html[data-display-size="maximum"] .adaptive-feedback-card textarea { min-height: 66px; }
html[data-display-size="maximum"] .adaptive-readiness-actions { gap: 6px; }
.workout-session-strip {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(56,189,248,.08), rgba(15,23,42,.16));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.workout-session-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
button.workout-session-chip {
  font: inherit;
  cursor: pointer;
}
.workout-session-chip.action {
  color: var(--accent-light);
}
.workout-session-chip.action:hover {
  border-color: var(--accent);
}
.workout-session-chip.muted {
  color: var(--muted);
  font-weight: 700;
}
.workout-session-chip.deload {
  background: rgba(251,191,36,.12);
  border-color: rgba(251,191,36,.28);
}
.workout-session-chip.resting {
  background: rgba(56,189,248,.12);
  border-color: rgba(56,189,248,.24);
}
:root[data-theme-mode="light"] .workout-session-strip {
  background: linear-gradient(180deg, rgba(56,189,248,.1), rgba(255,255,255,.96));
  border-color: rgba(2,132,199,.22);
}
:root[data-theme-mode="light"] .workout-session-chip {
  background: rgba(255,255,255,.7);
}

.workout-focus-shell {
  margin: 12px 16px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(56,189,248,.22);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.16), transparent 38%),
    linear-gradient(180deg, rgba(15,23,42,.72), rgba(15,23,42,.34));
  box-shadow: 0 14px 36px rgba(2,6,23,.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.workout-focus-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.workout-focus-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.workout-focus-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.workout-focus-title {
  margin-top: 4px;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--text);
}
.workout-focus-target {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-light);
}
.workout-focus-transition {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 14%, var(--bg3) 86%);
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--border) 70%);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  animation: focusTransitionIn .26s ease;
}
@keyframes focusTransitionIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.workout-focus-controls {
  display: flex;
  gap: 8px;
  width: 100%;
}
.workout-focus-nav {
  flex: 1;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 11px;
  font-weight: 900;
  cursor: pointer;
}
.workout-focus-nav:disabled {
  opacity: .36;
  cursor: not-allowed;
}
.workout-focus-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.workout-focus-meter span {
  display: block;
  width: var(--focus-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green));
}
.workout-focus-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.workout-focus-list::-webkit-scrollbar { display: none; }
.workout-focus-pill {
  min-width: 122px;
  max-width: 164px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--text);
  border-radius: 14px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}
.workout-focus-pill.active {
  border-color: var(--accent);
  background: rgba(56,189,248,.16);
}
.workout-focus-pill.done {
  border-color: color-mix(in srgb, var(--muted) 38%, transparent);
  background: color-mix(in srgb, var(--bg3) 82%, transparent);
  color: var(--muted);
  opacity: .58;
  filter: grayscale(.35);
}
.workout-focus-pill.done:not(.active) {
  box-shadow: none;
}
.workout-focus-pill.done .workout-focus-pill-name::before {
  content: "Done · ";
  color: var(--muted);
  font-weight: 900;
}
.workout-focus-pill.done.active {
  opacity: .72;
  border-color: color-mix(in srgb, var(--muted) 54%, var(--accent) 20%);
}
.workout-focus-pill-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}
.workout-focus-pill-meta {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}
.workout-focus-active {
  scroll-margin-top: 96px;
}
:root[data-theme-mode="light"] .workout-focus-shell {
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.18), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,249,255,.92));
  box-shadow: 0 14px 34px rgba(15,23,42,.08);
}
:root[data-theme-mode="light"] .workout-focus-nav,
:root[data-theme-mode="light"] .workout-focus-pill {
  background: rgba(255,255,255,.78);
}
@media (max-width: 640px) {
  .workout-focus-shell {
    margin: 10px 12px;
    padding: 12px;
  }
  .workout-focus-title {
    font-size: 19px;
  }
}
/* ── Finish / summary ─────────────────────────────────────────────────── */
.summary-hero {
  text-align: center; padding: 28px 20px 14px;
}
.summary-icon { font-size: 64px; margin-bottom: 12px; }
.summary-title { font-size: 28px; font-weight: 900; margin-bottom: 0; }
.summary-sub   { color: var(--muted); font-size: 15px; }
.summary-pbs   {
  margin: 16px; background: var(--bg3); border-radius: var(--radius);
  padding: 16px; border-left: 3px solid var(--gold);
}
.summary-pbs-title { font-size: 13px; color: var(--gold); font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.summary-pb-item { font-size: 14px; padding: 4px 0; }
.summary-ai-note {
  margin: 0 16px 16px; background: var(--bg3); border-radius: var(--radius);
  padding: 14px 16px; font-size: 14px; color: var(--muted); line-height: 1.6;
  border-left: 3px solid var(--accent);
}
.summary-rating-card {
  margin: 0 16px 12px; background: var(--bg3); border-radius: var(--radius);
  padding: 14px;
}
.summary-rating-title { font-size: 18px; font-weight: 900; margin-bottom: 10px; }
.summary-rating-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.summary-rating-row { display: flex; gap: 10px; }
.summary-rating-btn {
  flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 10px; font-size: 13px; font-weight: 700;
}
.summary-rating-btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.summary-rating-status { margin-top: 10px; font-size: 12px; color: var(--muted); min-height: 16px; }
.ex-feedback-row {
  margin-top: 10px; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
}
.ex-session-ai {
  margin-top: 10px; display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, rgba(56,189,248,.08), rgba(15,23,42,.22));
  border: 1px solid rgba(56,189,248,.22); border-radius: 12px; padding: 10px 12px;
}
:root[data-theme-mode="light"] .ex-session-ai {
  background: linear-gradient(180deg, rgba(56,189,248,.08), rgba(255,255,255,.98));
  border-color: rgba(2,132,199,.24);
}
.ex-session-ai-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ex-session-ai-title {
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-light);
}
.ex-session-ai-action {
  font-size: 11px; color: var(--text); font-weight: 700;
  padding: 4px 8px; border-radius: 999px; background: rgba(56,189,248,.12);
}
.ex-session-ai-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ex-session-ai-chip {
  font-size: 11px; color: var(--muted); padding: 4px 8px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
}
.ex-session-ai-chip.waiting {
  color: var(--red);
  border-color: rgba(239,68,68,.45);
  background: rgba(239,68,68,.12);
  font-weight: 950;
}
.ex-session-ai-wait {
  color: var(--red);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.45;
  text-align: center;
  padding: 6px 4px 2px;
}
.ex-session-ai-error {
  color: var(--red);
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.22);
}
.ex-feedback-title { font-size: 12px; color: var(--muted); font-weight: 700; }
.ex-feedback-buttons { display: flex; gap: 8px; }
.ex-feedback-btn {
  flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 8px; font-size: 12px; font-weight: 700;
}
.ex-feedback-btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.ex-feedback-status { font-size: 11px; color: var(--muted); min-height: 14px; }
.ex-feedback-saved {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700;
}
.set-effort-cell { padding: 0 !important; border-top: 0 !important; }
.set-effort-wrap {
  padding: 8px 10px 12px;
  border-top: 1px dashed var(--border);
  background: color-mix(in srgb, var(--bg3) 88%, transparent);
}
.set-effort-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.set-effort-title { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.set-effort-explainer { font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.35; }
.set-effort-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.set-effort-btn {
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
}
.set-effort-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.set-effort-status { font-size: 11px; color: var(--muted); min-height: 14px; }
.summary-note-card {
  margin: 0 16px 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-note-title { font-size: 14px; font-weight: 800; }
.summary-note-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.summary-note-card textarea {
  min-height: 92px;
  resize: vertical;
}
.summary-note-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.summary-note-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: var(--on-warning);
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 14px 26px rgba(249,115,22,.24);
  text-align: center;
}
.summary-note-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(249,115,22,.20);
}
.summary-note-submit-btn:disabled {
  opacity: .7;
  cursor: wait;
}
.summary-note-status { font-size: 12px; color: var(--muted); min-height: 16px; }
@media (max-width: 520px) {
  .summary-note-submit-btn {
    width: 100%;
  }
  .summary-note-status {
    width: 100%;
  }
}
.summary-done-btn {
  margin: 0 16px; background: var(--accent); color: #fff;
  border-radius: 14px; padding: 18px; font-size: 17px; font-weight: 700;
  width: calc(100% - 32px); text-align: center;
}
.summary-done-btn:active { opacity: .85; }
.summary-done-btn.compact {
  margin: 0;
  width: auto;
  flex: 0 0 auto;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 13px 16px;
  font-size: 15px;
}
.summary-share-btn {
  margin: 0 16px 12px; background: linear-gradient(135deg, #0f172a, #1e293b 58%, #334155);
  color: #fff; border-radius: 14px; padding: 16px; font-size: 16px; font-weight: 800;
  width: calc(100% - 32px); text-align: center; border: 1px solid rgba(255,255,255,.12);
}
.summary-share-btn:active { opacity: .88; }
.detail-section {
  background: var(--bg3); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.detail-ex-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600;
}
.detail-set-row {
  display: grid; grid-template-columns: 26px 1fr 1fr auto auto; gap: 8px; align-items: center;
}
.detail-add-btn, .detail-save-meta-btn {
  background: var(--accent); color: #fff; border-radius: 10px; padding: 12px 14px; text-align: center; font-weight: 700;
}
.detail-secondary-btn {
  color: var(--accent-light); background: var(--bg3); border-radius: 10px; padding: 12px 14px; text-align: center; font-weight: 600;
}
.ex-session-ai-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.ex-session-ai-prompt {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.ex-ai-choice-btn {
  width: 100%;
  border-radius: 12px;
  padding: 13px 14px;
  text-align: center;
  font-weight: 800;
  line-height: 1.35;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.ex-ai-choice-btn:active {
  transform: translateY(1px);
  opacity: .92;
}
.ex-ai-choice-btn {
  color: #fff7ed;
  background: linear-gradient(135deg, #c2410c, #ea580c 55%, #fb923c);
  border-color: rgba(124, 45, 18, 0.34);
  box-shadow: 0 10px 18px rgba(194, 65, 12, 0.22);
}
.ex-ai-choice-btn:hover,
.ex-ai-choice-btn:focus-visible {
  box-shadow: 0 12px 22px rgba(194, 65, 12, 0.28);
}
.ex-ai-choice-btn.plan {
  background: linear-gradient(135deg, #2563eb, #0284c7 58%, #38bdf8);
  border-color: rgba(2,132,199,.35);
  color: #fff;
}
.ex-ai-choice-btn.ai-now {
  background: linear-gradient(135deg, var(--green), #22c55e 55%, #86efac);
  border-color: rgba(34,197,94,.38);
  color: #052e16;
}
.ex-ai-choice-btn.ai-later {
  background: linear-gradient(135deg, #7c2d12, #c2410c 48%, #fb923c);
}
/* ── Misc utilities ───────────────────────────────────────────────────── */
.spacer { flex: 1; }
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .6s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Adaptive Plan Builder */
.adaptive-plan-loading { min-height:190px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; text-align:center; color:var(--text); }
.adaptive-plan-loading .spinner { margin:8px auto; }
.adaptive-plan-loading span, .adaptive-plan-result-copy { color:var(--muted); line-height:1.55; }
.adaptive-plan-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:12px; }
.adaptive-plan-kicker { color:var(--green); font-size:11px; font-weight:950; letter-spacing:.12em; text-transform:uppercase; margin-bottom:4px; }
.adaptive-plan-close { width:38px; height:38px; flex:0 0 38px; border:1px solid var(--border); border-radius:999px; color:var(--text); background:var(--bg3); font-size:24px; line-height:1; }
.adaptive-plan-intro, .adaptive-plan-trust, .adaptive-plan-activate-note { border:1px solid rgba(52,211,153,.28); border-radius:14px; padding:13px 14px; background:rgba(16,185,129,.08); color:var(--text); font-size:13px; line-height:1.5; margin-bottom:12px; }
.adaptive-plan-section { display:flex; flex-direction:column; gap:9px; padding:14px; margin-bottom:10px; border:1px solid var(--border); border-radius:15px; background:var(--bg3); }
.adaptive-plan-section-title { color:var(--text); font-size:14px; font-weight:900; }
.adaptive-plan-section textarea, .adaptive-plan-section select, .adaptive-plan-section input { width:100%; }
.adaptive-plan-days { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.adaptive-plan-day { display:flex; align-items:center; gap:9px; min-width:0; padding:10px; border:1px solid var(--border); border-radius:12px; background:var(--bg2); cursor:pointer; }
.adaptive-plan-day.selected { border-color:var(--green); background:rgba(34,197,94,.11); }
.adaptive-plan-day input { width:auto; flex:0 0 auto; }
.adaptive-plan-day span { min-width:0; display:flex; flex-direction:column; }
.adaptive-plan-day strong, .adaptive-plan-day small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.adaptive-plan-day strong { color:var(--text); font-size:13px; }
.adaptive-plan-day small { color:var(--muted); font-size:11px; }
.adaptive-plan-inline-field { display:grid; grid-template-columns:1fr 82px; align-items:center; gap:4px 10px; color:var(--text); font-size:13px; font-weight:750; }
.adaptive-plan-inline-field small { grid-column:1 / -1; color:var(--muted); font-weight:500; }
.adaptive-plan-error { padding:12px 14px; margin-bottom:10px; border:1px solid rgba(248,113,113,.45); border-radius:12px; background:rgba(248,113,113,.10); color:var(--red); line-height:1.45; }
.adaptive-plan-primary { margin-top:10px; width:100%; }
.adaptive-plan-result-icon { width:64px; height:64px; display:grid; place-items:center; margin:12px auto 16px; border-radius:999px; background:linear-gradient(135deg,#16a34a,#4ade80); color:#052e16; font-size:34px; font-weight:950; }
.adaptive-plan-result-copy { text-align:center; margin:10px auto 20px; max-width:520px; }
.adaptive-plan-ready-banner { display:flex; flex-direction:column; gap:2px; padding:11px 13px; margin-bottom:12px; border:1px solid rgba(251,146,60,.42); border-radius:12px; background:rgba(251,146,60,.10); color:var(--text); }
.adaptive-plan-ready-banner span { color:var(--muted); font-size:12px; }
.adaptive-plan-program-name { color:var(--text); font-size:21px; font-weight:950; line-height:1.15; }
.adaptive-plan-program-summary { color:var(--muted); line-height:1.5; margin:7px 0 13px; }
.adaptive-plan-preview { display:flex; flex-direction:column; gap:7px; margin-bottom:12px; }
.adaptive-plan-preview-day { border:1px solid var(--border); border-radius:12px; background:var(--bg3); overflow:hidden; }
.adaptive-plan-preview-day summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 13px; color:var(--text); cursor:pointer; }
.adaptive-plan-preview-day summary span:first-child { display:flex; flex-direction:column; min-width:0; }
.adaptive-plan-preview-day summary small { color:var(--muted); margin-top:2px; }
.adaptive-plan-preview-count { color:var(--green); font-size:11px; font-weight:850; white-space:nowrap; }
.adaptive-plan-preview-exercises { display:flex; flex-wrap:wrap; gap:6px; padding:0 13px 12px; }
.adaptive-plan-preview-exercises span { padding:5px 8px; border-radius:999px; background:var(--bg2); color:var(--text); font-size:11px; }
@media (max-width:430px) {
  .adaptive-plan-section { padding:12px; }
  .adaptive-plan-days { grid-template-columns:1fr; }
  .adaptive-plan-day { min-height:48px; }
  .adaptive-plan-program-name { font-size:19px; }
}
@media (max-width:350px) {
  .adaptive-plan-inline-field { grid-template-columns:1fr 70px; }
  .adaptive-plan-section { padding:10px; }
}
@media (max-width:719px) {
  #s-workout .workout-session-strip {
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 8px;
    padding: 7px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #s-workout .workout-session-strip::-webkit-scrollbar { display: none; }
  #s-workout .workout-session-chip {
    flex: 0 0 auto;
    padding: 5px 8px;
    font-size: 10px;
  }
}
