/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --surface: #1c1c1e;
  --surface-2: #252527;
  --surface-3: #2c2c2e;
  --accent: #6c63ff;
  --accent-dim: rgba(108,99,255,0.15);
  --accent-glow: rgba(108,99,255,0.3);
  --text: #f2f2f7;
  --text-2: #aeaeb2;
  --text-3: #636366;
  --sep: #2c2c2e;
  --success: #30d158;
  --warning: #ffd60a;
  --danger: #ff453a;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 8px;
  --nav-h: 68px;
  --header-h: 64px;
}

html, body { height: 100%; background: var(--bg); overflow: hidden; }

body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ===== APP SHELL ===== */
#app {
  display: flex;
  flex-direction: column;
  height: 100svh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ===== VIEWS ===== */
.view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  animation: viewIn 0.22s ease;
}

.view.slide-back { animation: viewBack 0.22s ease; }

@keyframes viewIn {
  from { transform: translateX(32px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes viewBack {
  from { transform: translateX(-32px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--sep);
  flex-shrink: 0;
  z-index: 10;
  min-height: var(--header-h);
}

.btn-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: none;
  color: var(--text);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: 0.15s;
}
.btn-back:active { transform: scale(0.88); }

.header-info { flex: 1; min-width: 0; }
.header-info h1 { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-info p  { font-size: 13px; color: var(--text-2); }

.header-logo { font-size: 26px; }

/* ===== SCROLL CONTENT ===== */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.content::-webkit-scrollbar { display: none; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(13,13,13,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--sep);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 200;
}

.nav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 8px;
  background: none; border: none;
  color: var(--text-3);
  gap: 3px;
  transition: color 0.18s;
}
.nav-btn.active { color: var(--accent); }
.nav-btn .ico { font-size: 21px; }
.nav-btn .lbl { font-size: 9.5px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; }

/* ===== HOME: TODAY BANNER ===== */
.home-welcome {
  margin: 14px 18px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 14px;
  align-items: center;
}
.hw-kicker {
  font-size: 10.5px;
  font-weight: 900;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.hw-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.sync-chip {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.sync-chip.synced { background: rgba(48,209,88,0.16); color: var(--success); }
.sync-chip.ready { background: rgba(255,214,10,0.14); color: var(--warning); }
.hw-copy h2 {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.05;
  margin-bottom: 7px;
}
.hw-copy p {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.hw-meter {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 2px solid rgba(108,99,255,0.38);
  background: radial-gradient(circle at center, rgba(108,99,255,0.22), rgba(108,99,255,0.08));
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hw-meter span {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.hw-meter small {
  margin-top: 5px;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.today-banner {
  margin: 16px 18px 0;
  padding: 22px 20px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, #9b59b6 100%);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px -10px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.15s;
}
.today-banner:active { transform: scale(0.985); }
.today-banner::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.today-banner-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; opacity: 0.75; margin-bottom: 4px;
}
.today-banner-day  { font-size: 30px; font-weight: 900; letter-spacing: -1.2px; line-height: 1; margin-bottom: 4px; }
.today-banner-type { font-size: 15px; opacity: 0.85; margin-bottom: 18px; }
.today-banner-btn {
  background: rgba(255,255,255,0.22);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff; padding: 9px 20px;
  border-radius: 20px; font-size: 14px; font-weight: 700;
  transition: 0.15s;
}
.today-banner-btn:active { background: rgba(255,255,255,0.35); }

.rest-banner {
  background: linear-gradient(135deg, #2c2c2e, #3a3a3c);
}

.home-focus {
  margin: 12px 18px 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
}
.hf-label {
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 7px;
}
.hf-main {
  width: 100%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.hf-main strong {
  display: block;
  font-size: 14.5px;
  line-height: 1.25;
  margin-bottom: 4px;
}
.hf-main small {
  display: block;
  color: var(--text-2);
  font-size: 11.5px;
}
.hf-main b {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 18px 0;
}
.hs-card {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  padding: 11px 8px;
  text-align: center;
}
.hs-card strong {
  display: block;
  font-size: 19px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.hs-card span {
  display: block;
  margin-top: 5px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 18px 0;
}
.home-action {
  min-height: 44px;
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.home-action.primary {
  border-color: rgba(108,99,255,0.45);
  background: var(--accent-dim);
  color: var(--accent);
}
.home-action:active { transform: scale(0.98); }

/* ===== HOME: WEEK STRIP ===== */
.section-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-3);
  padding: 20px 18px 10px;
}

.week-strip {
  display: flex;
  gap: 8px;
  padding: 0 18px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.week-strip::-webkit-scrollbar { display: none; }

.day-chip {
  display: flex; flex-direction: column; align-items: center;
  min-width: 60px;
  padding: 10px 8px 8px;
  background: var(--surface); border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer; gap: 5px;
  transition: 0.18s;
  flex-shrink: 0;
}
.day-chip:active { transform: scale(0.93); }
.day-chip.today  { border-color: var(--accent); background: var(--accent-dim); }
.day-chip.rest   { opacity: 0.5; }

.dc-name { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-2); letter-spacing: 0.5px; }
.day-chip.today .dc-name { color: var(--accent); }
.dc-emoji { font-size: 22px; }
.dc-type  { font-size: 10px; color: var(--text-3); text-align: center; line-height: 1.3; }

/* ===== HOME: WEEK SCHEDULE LIST ===== */
.week-list { padding: 0 18px; display: flex; flex-direction: column; gap: 8px; }

.week-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--sep);
  cursor: pointer; transition: 0.15s;
}
.week-row:active { background: var(--surface-2); transform: scale(0.99); }
.week-row.today  { border-color: var(--accent); }

.wr-day  { font-size: 13px; font-weight: 700; color: var(--text-2); width: 36px; flex-shrink: 0; }
.week-row.today .wr-day { color: var(--accent); }
.wr-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wr-type { flex: 1; font-size: 15px; font-weight: 600; }
.wr-count { font-size: 12px; color: var(--text-3); }

/* ===== DAY VIEW: MUSCLE GROUP CARDS ===== */
.muscle-cards { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }

.day-actions { padding: 0 18px 10px; }
.day-action {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(108,99,255,0.36);
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.muscle-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 16px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--sep);
  cursor: pointer; transition: 0.18s;
}
.muscle-card:active { background: var(--surface-2); transform: scale(0.98); }

.mc-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.mc-info { flex: 1; }
.mc-name  { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.mc-sub   { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.mc-arrow { font-size: 18px; color: var(--text-3); }

/* ===== REST DAY ===== */
.rest-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 40px; text-align: center; gap: 12px;
}
.rest-icon  { font-size: 72px; }
.rest-title { font-size: 26px; font-weight: 900; letter-spacing: -0.6px; }
.rest-desc  { font-size: 15px; color: var(--text-2); line-height: 1.6; }

/* ===== EXERCISE LIST ===== */
.ex-list { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }

.ex-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--sep);
  transition: 0.15s;
}
.ex-card:active { background: var(--surface-2); }

.ex-card-top {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 0;
}
.ex-check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--sep); background: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; margin-top: 1px;
  transition: 0.2s;
}
.ex-check.done { background: var(--success); border-color: var(--success); }
.ex-open {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ex-open:active .ex-name { color: var(--accent); }
.ex-open-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
.ex-name { font-size: 16px; font-weight: 800; flex: 1; letter-spacing: -0.2px; line-height: 1.3; }
.ex-demo {
  background: var(--accent-dim); color: var(--accent);
  border: none; padding: 6px 12px; border-radius: 16px;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  transition: 0.15s;
}
.ex-demo:active { background: var(--accent-glow); }

.ex-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 0; }
.ex-stat  { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.ex-stat-i { font-size: 14px; }

.ex-tags  { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
}
.tag-cable    { background: rgba(52,152,219,.18); color: #3498db; }
.tag-dumbbell { background: rgba(241,196,15,.18); color: #f1c40f; }
.tag-barbell  { background: rgba(255,69,58,.18);  color: var(--danger); }
.tag-machine  { background: rgba(108,99,255,.18); color: var(--accent); }
.tag-bw       { background: rgba(48,209,88,.18);  color: var(--success); }
.tag-compound { background: rgba(255,69,58,.12);  color: #ff7675; }
.tag-isolation{ background: rgba(48,209,88,.12);  color: #55efc4; }
.diff-easy    { background: rgba(48,209,88,.15);  color: var(--success); }
.diff-med     { background: rgba(255,214,10,.15); color: var(--warning); }
.diff-hard    { background: rgba(255,69,58,.15);  color: var(--danger); }

/* ===== EXERCISE MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  width: 100%; max-width: 480px;
  max-height: 90svh;
  overflow-y: auto;
  animation: slideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
  padding-bottom: env(safe-area-inset-bottom);
}
.modal::-webkit-scrollbar { display: none; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle { width: 38px; height: 5px; background: var(--sep); border-radius: 3px; margin: 14px auto 0; }

.modal-header {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px 0;
}
.modal-title { font-size: 22px; font-weight: 900; letter-spacing: -0.6px; flex: 1; line-height: 1.2; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-3); border: none; color: var(--text);
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: 0.15s;
}
.modal-close:active { transform: scale(0.88); }

.modal-body { padding: 10px 20px 28px; }

.modal-muscle {
  font-size: 13px; color: var(--text-2);
  margin-bottom: 18px; margin-top: 4px;
}

.modal-demo-box {
  background: var(--surface-2); border-radius: var(--radius);
  padding: 28px 20px; margin-bottom: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center;
}
.modal-demo-emoji { font-size: 52px; }
.modal-demo-hint  { font-size: 13px; color: var(--text-2); }
.btn-youtube {
  display: flex; align-items: center; gap: 8px;
  background: #ff0000; color: #fff;
  border: none; padding: 10px 18px; border-radius: 20px;
  font-size: 13px; font-weight: 700; transition: 0.15s;
  text-decoration: none;
}
.btn-youtube:active { opacity: 0.85; transform: scale(0.97); }

.modal-stats { display: flex; gap: 8px; margin-bottom: 20px; }
.ms-card {
  flex: 1; background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 12px 8px; text-align: center;
}
.ms-val { font-size: 19px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 3px; }
.ms-lbl { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.modal-section { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); margin-bottom: 12px; margin-top: 20px; }

.last-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 12px;
}
.last-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.last-card span {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.last-card strong {
  color: var(--text);
  font-size: 12.5px;
  text-align: right;
}
.last-card.empty {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.steps { display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.step-text { font-size: 14px; line-height: 1.55; color: var(--text); }

.detail-card {
  margin-top: 14px;
  background: var(--surface-2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 14px;
}
.detail-card.warn {
  background: rgba(255,214,10,0.06);
  border-color: rgba(255,214,10,0.18);
}
.detail-title {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
}
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-list div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-2);
  font-size: 12.8px;
  line-height: 1.45;
}
.detail-list span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}
.detail-card.warn .detail-list span { background: var(--warning); }

.tip-box {
  background: rgba(255,214,10,0.08); border: 1px solid rgba(255,214,10,0.2);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 14px;
  font-size: 13px; line-height: 1.5; display: flex; gap: 10px;
}

.secondary-muscles {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}
.sec-tag {
  background: var(--surface-3); color: var(--text-2);
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
}

.preset-empty {
  background: var(--surface-2);
  border: 1px dashed var(--sep);
  border-radius: var(--radius);
  padding: 13px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.preset-btn {
  min-height: 62px;
  border: 1px solid rgba(108,99,255,0.24);
  background: var(--accent-dim);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 7px;
  text-align: left;
}
.preset-btn span {
  display: block;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.15;
}
.preset-btn small {
  display: block;
  margin-top: 5px;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
}
.sub-card {
  margin-top: 14px;
  background: var(--surface-2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  padding: 14px;
}
.sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sub-head strong {
  font-size: 13px;
  font-weight: 900;
}
.sub-head span {
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sub-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sub-btn {
  min-height: 48px;
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
}
.sub-btn span {
  font-size: 13px;
  font-weight: 900;
}
.sub-btn small {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== NUTRITION ===== */
.nut-form { padding: 18px; display: flex; flex-direction: column; gap: 18px; }

.form-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--text-3); margin-bottom: 8px; display: block;
}

.toggle-row { display: flex; gap: 6px; }
.tog {
  flex: 1; padding: 10px 8px; text-align: center;
  background: var(--surface); border: 2px solid transparent; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 14px; font-weight: 600;
  transition: 0.18s;
}
.tog.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.input-row { display: flex; gap: 8px; }
.fin {
  flex: 1; background: var(--surface); border: 1.5px solid var(--sep); color: var(--text);
  padding: 13px 14px; border-radius: var(--radius-sm); font-size: 16px; outline: none;
  transition: 0.18s;
}
.fin:focus { border-color: var(--accent); }

select.fin {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238e8e93' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
select.fin option { background: var(--surface); }

.goal-row { display: flex; gap: 8px; }
.goal-btn {
  flex: 1; padding: 12px 8px; text-align: center;
  background: var(--surface); border: 2px solid transparent; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; color: var(--text-2); transition: 0.18s;
}
.goal-btn.on { border-color: var(--accent); color: var(--text); background: var(--accent-dim); }
.goal-btn .g-emoji { font-size: 20px; display: block; margin-bottom: 4px; }

.calc-btn {
  width: 100%; padding: 16px; border-radius: var(--radius);
  background: var(--accent); color: #fff; border: none;
  font-size: 16px; font-weight: 800; letter-spacing: -0.3px;
  transition: 0.18s;
}
.calc-btn:active { opacity: 0.88; transform: scale(0.99); }

/* ===== NUTRITION RESULTS ===== */
.nut-results { padding: 0 18px 24px; }

.result-hero {
  background: linear-gradient(135deg, var(--accent) 0%, #9b59b6 100%);
  border-radius: var(--radius-lg); padding: 24px; text-align: center;
  margin-bottom: 14px;
}
.rh-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; opacity: 0.75; margin-bottom: 6px; }
.rh-value { font-size: 56px; font-weight: 900; letter-spacing: -3px; line-height: 1; margin-bottom: 4px; }
.rh-unit  { font-size: 16px; opacity: 0.8; font-weight: 600; }
.rh-sub   { font-size: 13px; opacity: 0.75; margin-top: 10px; }

.result-row { display: flex; gap: 8px; margin-bottom: 14px; }
.rc {
  flex: 1; background: var(--surface); border-radius: var(--radius);
  padding: 14px; text-align: center; border: 1px solid var(--sep);
}
.rc-val { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.rc-lbl { font-size: 11px; color: var(--text-3); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }

.macro-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 16px; border: 1px solid var(--sep); margin-bottom: 14px;
}
.macro-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); margin-bottom: 14px; }

.macro-row { display: flex; flex-direction: column; gap: 12px; }
.m-item { display: flex; flex-direction: column; gap: 5px; }
.m-top  { display: flex; justify-content: space-between; align-items: center; }
.m-name { font-size: 15px; font-weight: 700; }
.m-val  { font-size: 13px; color: var(--text-2); }
.m-bar  { height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.m-fill { height: 100%; border-radius: 4px; transition: width 0.7s cubic-bezier(0.34,1.56,0.64,1); }

.tips-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--sep);
}
.tips-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.tip-item   { font-size: 13px; color: var(--text-2); line-height: 1.5; padding: 4px 0; border-bottom: 1px solid var(--sep); }
.tip-item:last-child { border: none; }

/* ===== PROGRESS BADGE ===== */
.prog-badge {
  background: var(--surface-3); border-radius: 12px;
  padding: 3px 8px; font-size: 11px; font-weight: 700; color: var(--text-3);
}
.prog-badge.complete { background: rgba(48,209,88,.18); color: var(--success); }

/* ===== EMPTY STATE ===== */
.empty { padding: 40px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ===== ANIMATED DEMO ===== */
.modal-demo-box { padding: 14px; gap: 8px; }
.demo-svg {
  width: 100%; max-width: 300px; height: auto; display: block;
  filter: drop-shadow(0 6px 18px rgba(108,99,255,0.18));
}
.demo-caption { font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: 0.2px; }

/* ===== REST TIMER ===== */
.rest-timer {
  background: var(--surface-2); border-radius: var(--radius);
  padding: 16px; margin-bottom: 4px; text-align: center;
}
.rt-display {
  font-size: 38px; font-weight: 900; letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 12px;
  color: var(--text);
}
.rt-display.rt-done { color: var(--success); }
.rt-controls { display: flex; gap: 8px; margin-bottom: 12px; }
.rt-btn {
  border: none; border-radius: 10px; font-weight: 700; font-size: 14px;
  padding: 11px 0; transition: 0.15s; color: #fff;
}
.rt-btn:active { transform: scale(0.97); }
.rt-start { flex: 1; background: var(--accent); }
.rt-reset { width: 52px; background: var(--surface-3); color: var(--text-2); font-size: 18px; }
.rt-bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.rt-fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.95s linear; }

/* ===== NUTRITION: HERO ===== */
.nut-hero {
  margin: 16px 18px 0;
  padding: 20px;
  background: linear-gradient(135deg, #16a34a 0%, #0ea5e9 100%);
  border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.nut-hero::after {
  content: ''; position: absolute; top: -40px; right: -30px;
  width: 130px; height: 130px; background: rgba(255,255,255,0.07); border-radius: 50%;
}
.nut-hero h2 { font-size: 19px; font-weight: 900; letter-spacing: -0.4px; margin-bottom: 6px; }
.nut-hero p  { font-size: 13.5px; opacity: 0.92; line-height: 1.5; }
.nut-target {
  margin-top: 12px; background: rgba(255,255,255,0.18);
  border-radius: 11px; padding: 9px 12px; font-size: 13px; font-weight: 600; line-height: 1.4;
  position: relative;
}

.goal-wrap { padding: 18px 18px 4px; }
.goal-wrap .form-label { padding: 0 0 8px; }

/* ===== NUTRITION: PROTEIN-FIRST CALLOUT ===== */
.proteinfirst {
  margin: 14px 18px 4px;
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-dim); border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius); padding: 13px 14px;
  font-size: 13px; line-height: 1.5; color: var(--text);
}
.pf-ico { font-size: 16px; flex-shrink: 0; }

/* ===== NUTRITION: FILTER CHIPS ===== */
.filter-chips {
  display: flex; gap: 8px; padding: 4px 18px 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.filter-chips::-webkit-scrollbar { display: none; }
.fchip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 20px;
  background: var(--surface); border: 1.5px solid var(--sep);
  color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: 0.15s;
}
.fchip.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.fchip:active { transform: scale(0.94); }

/* ===== NUTRITION: FOOD CARDS ===== */
.food-list { padding: 6px 18px 24px; display: flex; flex-direction: column; gap: 10px; }
.food-card {
  background: var(--surface); border: 1px solid var(--sep);
  border-radius: var(--radius); padding: 15px 16px;
  display: flex; gap: 14px; align-items: flex-start;
}
.fc-left { font-size: 30px; flex-shrink: 0; line-height: 1.1; }
.fc-body { flex: 1; min-width: 0; }
.fc-place { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.fc-name  { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; margin: 2px 0 5px; line-height: 1.25; }
.fc-note  { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.fc-tags  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ftag {
  padding: 3px 9px; border-radius: 6px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  background: var(--surface-3); color: var(--text-2);
}
.fc-goal {
  margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--text-2);
  background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 9px 11px;
}
.fc-goal strong { color: var(--text); }
.fc-macros {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px; min-width: 56px; flex-shrink: 0;
}
.fc-prot { font-size: 23px; font-weight: 900; color: var(--accent); letter-spacing: -0.8px; line-height: 1; }
.fc-prot small { font-size: 12px; font-weight: 700; }
.fc-cal  { font-size: 11px; color: var(--text-3); font-weight: 600; }

/* ===== MUSCLE MAP ===== */
.mm-toggle { display: flex; gap: 6px; padding: 16px 18px 4px; }
.mm-tog {
  flex: 1; padding: 10px 0; text-align: center; border-radius: var(--radius-sm);
  background: var(--surface); border: 2px solid transparent; color: var(--text-2);
  font-size: 14px; font-weight: 700; transition: 0.15s;
}
.mm-tog.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.body-wrap { display: flex; justify-content: center; padding: 8px 18px 0; }
.body-svg { width: auto; height: auto; max-height: 380px; max-width: 100%; }
.mzone { cursor: pointer; transition: filter 0.15s; }
.mzone:active { filter: brightness(1.3); }
.mzone.sel { filter: drop-shadow(0 0 6px var(--accent-glow)); }

.heat-legend {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 18px 6px; font-size: 11px; color: var(--text-3); font-weight: 600;
}
.heat-grad {
  width: 90px; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, #2b2c33, rgba(108,99,255,1));
}

.m-empty {
  margin: 12px 18px 24px; padding: 22px 18px; text-align: center;
  background: var(--surface); border: 1px dashed var(--sep); border-radius: var(--radius);
  font-size: 13.5px; color: var(--text-2); line-height: 1.6;
}

.m-detail { padding: 8px 18px 24px; }
.m-dtitle {
  font-size: 20px; font-weight: 900; letter-spacing: -0.4px; margin: 6px 0 12px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.m-dhint { font-size: 11px; font-weight: 600; color: var(--text-3); }
.m-dhint b.pri, .m-emph.pri { color: var(--accent); }
.m-dhint b.sec, .m-emph.sec { color: var(--text-2); }

.m-rcard {
  background: var(--surface); border: 1px solid var(--sep); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
.m-rhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.m-rname { font-size: 14.5px; font-weight: 800; letter-spacing: -0.2px; }
.m-rsets { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-dim); padding: 3px 8px; border-radius: 10px; }

.m-exrow {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 0; border-top: 1px solid var(--sep); font-size: 13px;
}
.m-emph {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
}
.m-emph.pri { background: var(--accent-dim); }
.m-emph.sec { background: var(--surface-3); }
.m-exname { flex: 1; font-weight: 600; line-height: 1.3; }
.m-exday { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; }
.m-exsets { font-size: 11px; color: var(--text-2); font-weight: 600; min-width: 48px; text-align: right; }
.m-none { font-size: 12px; color: var(--text-3); padding-top: 6px; }

/* ===== DAY COVERAGE CARD ===== */
.coverage {
  margin: 4px 18px 8px; padding: 16px;
  background: var(--surface); border: 1px solid var(--sep); border-radius: var(--radius);
}
.cov-title { font-size: 13px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cov-title span { font-size: 10px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.cov-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.cov-name { font-size: 12px; font-weight: 600; width: 116px; flex-shrink: 0; line-height: 1.25; }
.cov-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.cov-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #9b59b6); border-radius: 4px; }
.cov-sets { font-size: 12px; font-weight: 800; color: var(--accent); min-width: 18px; text-align: right; }
.cov-foot { font-size: 11.5px; color: var(--text-3); line-height: 1.5; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sep); }

/* ===== PROGRESS ===== */
.pstats { display: flex; gap: 8px; padding: 16px 18px 4px; }
.pstat {
  flex: 1; background: var(--surface); border: 1px solid var(--sep);
  border-radius: var(--radius); padding: 14px 6px; text-align: center;
}
.pstat-val { font-size: 24px; font-weight: 900; letter-spacing: -1px; line-height: 1; margin-bottom: 5px; }
.pstat-val.accent { color: var(--accent); }
.pstat-lbl { font-size: 10px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }

.wk-strip { display: flex; gap: 6px; padding: 0 18px; }
.wk-day {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 0; background: var(--surface); border-radius: var(--radius-sm);
  border: 1.5px solid var(--sep);
}
.wk-name { font-size: 11px; font-weight: 700; color: var(--text-3); }
.wk-mark { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.wk-done  { border-color: var(--success); }
.wk-done .wk-mark  { background: var(--success); color: #06210f; }
.wk-done .wk-name  { color: var(--success); }
.wk-missed .wk-mark { background: rgba(255,69,58,.15); color: var(--danger); }
.wk-today { border-color: var(--accent); }
.wk-today .wk-mark { background: var(--accent); color: #fff; }
.wk-today .wk-name { color: var(--accent); }
.wk-rest .wk-mark { color: var(--text-3); }
.wk-future { opacity: 0.55; }

.cal-wrap { padding: 0 18px; }
.cal-grid { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.cal-cell { width: 100%; aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); }
.cal-cell.lvl-0 { background: var(--surface-2); }
.cal-cell.lvl-1 { background: rgba(108,99,255,0.35); }
.cal-cell.lvl-2 { background: rgba(108,99,255,0.65); }
.cal-cell.lvl-3 { background: rgba(108,99,255,1); }
.cal-cell.lvl-f { background: transparent; }
.cal-cell.cal-today { outline: 1.5px solid var(--text); outline-offset: 1px; }
.cal-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 8px; font-size: 10px; color: var(--text-3); }
.cal-legend .cal-cell { width: 11px; height: 11px; aspect-ratio: auto; }

.needs-card {
  margin: 14px 18px 0; padding: 14px 16px; border-radius: var(--radius);
  background: rgba(255,214,10,0.08); border: 1px solid rgba(255,214,10,0.22);
}
.needs-card.good { background: rgba(48,209,88,0.08); border-color: rgba(48,209,88,0.22); }
.needs-title { font-size: 13.5px; font-weight: 800; margin-bottom: 5px; }
.needs-body  { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.needs-body strong { color: var(--text); }

.balance-card { margin: 0 18px; background: var(--surface); border: 1px solid var(--sep); border-radius: var(--radius); padding: 14px 16px; }
.bal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bal-row:last-child { margin-bottom: 0; }
.bal-name { font-size: 12px; font-weight: 600; width: 92px; flex-shrink: 0; }
.bal-track { flex: 1; height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bal-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #9b59b6); border-radius: 4px; }
.bal-ago { font-size: 10.5px; color: var(--text-2); font-weight: 600; min-width: 56px; text-align: right; }
.bal-ago.stale { color: var(--warning); }

.sessions { padding: 0 18px; display: flex; flex-direction: column; gap: 8px; }
.sess-row { background: var(--surface); border: 1px solid var(--sep); border-radius: var(--radius); padding: 12px 14px; }
.sess-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.sess-date { font-size: 13px; font-weight: 800; }
.sess-count { font-size: 11px; font-weight: 700; color: var(--accent); }
.sess-names { font-size: 12px; color: var(--text-2); line-height: 1.5; }

.chart-card {
  margin: 0 18px 12px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
}
.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-head h3 {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}
.chart-head p,
.empty-chart p {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}
.chart-total {
  font-size: 23px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.chart-total small,
.rank-val small {
  font-size: 10px;
  color: var(--text-2);
  margin-left: 2px;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.ex { background: var(--accent); }
.legend-dot.vol { background: var(--success); }
.weekly-chart {
  height: 124px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
}
.chart-week {
  min-width: 0;
  display: grid;
  grid-template-rows: 80px 18px 16px;
  align-items: end;
  justify-items: center;
}
.chart-bars {
  height: 80px;
  display: flex;
  align-items: end;
  gap: 3px;
}
.chart-bar {
  width: 8px;
  min-height: 0;
  border-radius: 6px 6px 2px 2px;
  display: block;
}
.chart-bar.ex { background: linear-gradient(180deg, var(--accent), #8f89ff); }
.chart-bar.vol { background: linear-gradient(180deg, var(--success), #208c3e); }
.chart-label {
  font-size: 9px;
  color: var(--text-3);
  white-space: nowrap;
}
.chart-val {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rank-chart { display: flex; flex-direction: column; gap: 10px; }
.rank-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
}
.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}
.rank-title {
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-track {
  height: 7px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}
.rank-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--success));
}
.rank-val {
  color: var(--accent);
  font-size: 15px;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ===== PLAN BUILDER ===== */
.plan-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 14px 18px 0;
}
.plan-tab {
  min-height: 38px;
  border: 1.5px solid var(--sep);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 900;
}
.plan-tab.on {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.plan-summary {
  margin: 12px 18px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.plan-day {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.plan-title-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.4px;
}
.plan-status {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.plan-status.custom {
  background: rgba(48,209,88,0.16);
  color: var(--success);
}
.plan-group {
  margin: 0 18px 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
}
.plan-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.plan-group-head h3 {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.plan-group-head p {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
}
.plan-add,
.plan-remove,
.plan-save,
.plan-reset {
  border: none;
  font-weight: 900;
  border-radius: var(--radius-sm);
}
.plan-add {
  min-width: 68px;
  min-height: 36px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
}
.plan-ex-row {
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.plan-ex-row:last-child { margin-bottom: 0; }
.plan-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  margin-bottom: 10px;
}
.plan-remove {
  width: 36px;
  height: 36px;
  background: rgba(255,69,58,0.12);
  color: var(--danger);
  font-size: 20px;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.plan-grid label {
  min-width: 0;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.plan-input,
.plan-select {
  width: 100%;
  min-height: 36px;
  margin-top: 4px;
  border: 1.5px solid var(--sep);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  font-size: 13px;
  font-weight: 700;
}
.plan-input.name {
  margin-top: 0;
  min-height: 36px;
  font-size: 14px;
  font-weight: 900;
}
.plan-input:focus,
.plan-select:focus { border-color: var(--accent); }
.plan-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.plan-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 2px 18px 24px;
}
.plan-save,
.plan-reset {
  min-height: 46px;
  font-size: 14px;
}
.plan-save {
  background: var(--accent);
  color: #fff;
}
.plan-reset {
  background: var(--surface-2);
  color: var(--text-2);
}

/* ===== LIFT TRACKING (modal) ===== */
.track-card {
  background: var(--surface-2); border-radius: var(--radius);
  padding: 16px; margin-bottom: 4px;
}
.track-title {
  font-size: 13px; font-weight: 800; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.unit-toggle { display: flex; gap: 4px; }
.ut {
  width: 34px; padding: 5px 0; border-radius: 7px; border: none;
  background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 700;
}
.ut.on { background: var(--accent); color: #fff; }

.pb-row { display: flex; gap: 8px; margin-bottom: 14px; }
.pb-stat { flex: 1; background: var(--surface); border-radius: var(--radius-sm); padding: 11px 6px; text-align: center; }
.pb-val { font-size: 19px; font-weight: 900; letter-spacing: -0.6px; line-height: 1; }
.pb-val small { font-size: 11px; font-weight: 700; color: var(--text-2); margin-left: 1px; }
.pb-lbl { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; margin-top: 5px; }
.pb-empty { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; }

.set-form { display: flex; gap: 8px; }
.set-in {
  flex: 1; min-width: 0; background: var(--surface); border: 1.5px solid var(--sep); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-size: 15px; outline: none; transition: 0.15s;
}
.set-in:focus { border-color: var(--accent); }
.set-log {
  background: var(--accent); color: #fff; border: none; padding: 0 20px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 800; transition: 0.15s;
}
.set-log:active { transform: scale(0.96); }

.set-history { margin-top: 12px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 0; border-top: 1px solid var(--sep); font-size: 12.5px;
}
.set-row.pb { color: var(--warning); font-weight: 700; }
.set-date { color: var(--text-3); font-weight: 600; min-width: 52px; }
.set-wt { flex: 1; font-weight: 600; }
.set-e1rm { color: var(--text-3); font-size: 11.5px; }
.set-row.pb .set-e1rm, .set-row.pb .set-date { color: var(--warning); }

/* ===== ACCOUNT / CLOUD ===== */
.acct-card {
  margin: 14px 18px 4px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--sep);
}
.acct-card.journey {
  background:
    linear-gradient(135deg, rgba(108,99,255,0.16), rgba(48,209,88,0.05)),
    var(--surface);
  border-color: rgba(108,99,255,0.28);
}
.acct-card.joined {
  background:
    linear-gradient(135deg, rgba(48,209,88,0.14), rgba(108,99,255,0.07)),
    var(--surface);
  border-color: rgba(48,209,88,0.24);
}
.acct-kicker {
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}
.acct-title { font-size: 18px; font-weight: 900; letter-spacing: -0.35px; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acct-pill { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.acct-pill.local  { background: var(--surface-3); color: var(--text-2); }
.acct-pill.synced { background: rgba(48,209,88,.18); color: var(--success); }
.acct-body { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.acct-body strong { color: var(--text); }
.acct-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.acct-perks span {
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
.acct-user {
  margin-top: 11px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-form { display: flex; gap: 8px; margin-top: 12px; }
.acct-in {
  flex: 1; min-width: 0; background: var(--surface-2); border: 1.5px solid var(--sep); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-size: 15px; outline: none;
}
.acct-in:focus { border-color: var(--accent); }
.acct-btn {
  background: var(--accent); color: #fff; border: none; padding: 0 16px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.acct-btn.ghost { background: var(--surface-3); color: var(--text-2); margin-top: 12px; padding: 10px 16px; width: 100%; }
.acct-msg { margin-top: 10px; font-size: 12.5px; color: var(--accent); font-weight: 600; }

/* ===== PROFILE VIEW ===== */
.profile-header {
  text-align: center;
  padding: 24px 18px 16px;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #9f7aea);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.profile-name {
  font-size: 20px; font-weight: 800; letter-spacing: -0.3px;
}
.profile-email {
  font-size: 12.5px; color: var(--text-2); margin-top: 2px;
}

.profile-section {
  margin: 8px 0 0;
}
.profile-section-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-3);
  padding: 14px 18px 6px;
}
.profile-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin: 0 14px 10px;
  padding: 0;
  overflow: hidden;
}
.profile-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--sep);
  font-size: 14px;
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label { color: var(--text-2); font-weight: 600; }
.profile-row-value {
  color: var(--text); font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.profile-row-value select,
.profile-row-value input {
  background: var(--surface-2);
  border: 1.5px solid var(--sep);
  color: var(--text);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  min-width: 120px;
  text-align: right;
  font-family: inherit;
}
.profile-row-value select:focus,
.profile-row-value input:focus {
  border-color: var(--accent);
}
.profile-row-value input { max-width: 160px; }

/* Equipment chips */
.equip-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 10px 16px 14px;
}
.equip-chip {
  padding: 7px 13px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1.5px solid var(--sep);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.equip-chip.on {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.equip-chip:active { transform: scale(0.94); }

/* Injury text area */
.profile-textarea {
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--sep);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  outline: none;
  line-height: 1.5;
}
.profile-textarea:focus { border-color: var(--accent); }
.profile-textarea::placeholder { color: var(--text-3); }

/* Install button */
.install-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(159,122,234,0.08));
  border: 1.5px solid var(--accent-dim);
  border-radius: var(--radius);
  margin: 0 14px 10px;
  padding: 16px;
  text-align: center;
}
.install-card h3 {
  font-size: 15px; font-weight: 800; margin-bottom: 5px;
}
.install-card p {
  font-size: 12px; color: var(--text-2); margin-bottom: 12px; line-height: 1.5;
}
.install-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}
.install-btn:active { transform: scale(0.95); opacity: 0.9; }

/* Profile danger zone */
.profile-danger {
  margin: 14px 14px 24px;
  padding: 14px 16px;
  background: rgba(255,69,58,0.08);
  border: 1.5px solid rgba(255,69,58,0.18);
  border-radius: var(--radius);
  text-align: center;
}
.profile-danger p {
  font-size: 12px; color: var(--text-2); margin-bottom: 10px;
}
.profile-danger button {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}

/* ===== WORKOUT COMPLETION OVERLAY ===== */
.completion-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.3s ease;
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}
.completion-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: calc(100% - 32px);
  max-width: 380px;
  padding: 32px 24px 24px;
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--sep);
}
@keyframes popIn {
  from { transform: scale(0.8) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.completion-emoji {
  font-size: 56px;
  margin-bottom: 8px;
  animation: bounce 0.6s ease;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-14px); }
  60% { transform: translateY(-6px); }
}
.completion-title {
  font-size: 24px; font-weight: 900; letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.completion-sub {
  font-size: 13px; color: var(--text-2); margin-bottom: 20px;
}
.completion-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.comp-stat {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
}
.comp-stat-val {
  font-size: 22px; font-weight: 900; color: var(--accent);
}
.comp-stat-lbl {
  font-size: 11px; color: var(--text-3); font-weight: 700; margin-top: 2px;
}

/* RPE Rating */
.rpe-section { margin-bottom: 18px; }
.rpe-label {
  font-size: 13px; font-weight: 700; color: var(--text-2);
  margin-bottom: 10px;
}
.rpe-row {
  display: flex; gap: 5px; justify-content: center;
}
.rpe-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--sep);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.rpe-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.rpe-btn:active { transform: scale(0.9); }

.completion-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.comp-btn {
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.comp-btn.primary {
  background: var(--accent);
  color: #fff;
}
.comp-btn.ghost {
  background: var(--surface-2);
  color: var(--text-2);
}
.comp-btn:active { transform: scale(0.97); opacity: 0.9; }

/* ===== ENHANCED PROGRESS ===== */
.pr-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin: 0 0 12px;
  overflow: hidden;
}
.pr-card-head {
  padding: 14px 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.pr-card-head h3 {
  font-size: 15px; font-weight: 800;
}
.pr-card-head small {
  font-size: 11px; color: var(--text-3); font-weight: 600;
}
.pr-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--sep);
}
.pr-medal {
  font-size: 18px; width: 28px; text-align: center;
}
.pr-info { flex: 1; min-width: 0; }
.pr-name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-detail {
  font-size: 11.5px; color: var(--text-3); font-weight: 600;
}
.pr-val {
  font-size: 16px; font-weight: 900; color: var(--accent);
  white-space: nowrap;
}
.pr-val small {
  font-size: 11px; color: var(--text-3); font-weight: 600;
}

/* Most improved lift */
.improved-card {
  background: linear-gradient(135deg, rgba(48,209,88,0.08), rgba(48,209,88,0.03));
  border: 1.5px solid rgba(48,209,88,0.18);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.improved-card h3 {
  font-size: 14px; font-weight: 800; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.improved-card .improved-name {
  font-size: 16px; font-weight: 900; color: var(--success);
}
.improved-card .improved-detail {
  font-size: 12px; color: var(--text-2); margin-top: 4px;
}

/* Missed workout recovery */
.recovery-card {
  background: linear-gradient(135deg, rgba(255,214,10,0.08), rgba(255,214,10,0.03));
  border: 1.5px solid rgba(255,214,10,0.18);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.recovery-card h3 {
  font-size: 14px; font-weight: 800; margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.recovery-card p {
  font-size: 12.5px; color: var(--text-2); line-height: 1.55;
}
.recovery-card .recovery-action {
  margin-top: 10px;
  background: rgba(255,214,10,0.15);
  color: var(--warning);
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* ===== ENHANCED EXERCISE MODAL ===== */
.target-muscles {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 12px;
}
.muscle-tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.muscle-tag.primary {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,0.3);
}
.muscle-tag.secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-2);
  border: 1px solid var(--sep);
}

.equip-warning {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(255,214,10,0.08);
  border: 1.5px solid rgba(255,214,10,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--warning);
  font-weight: 700;
}
.equip-warning span { font-size: 16px; }

/* Finish workout button */
.finish-workout-bar {
  padding: 10px 18px 10px;
}
.finish-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #9f7aea);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.finish-btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}
.finish-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ===== PWA INSTALL GUIDANCE ===== */
.pwa-guide {
  background: var(--surface);
  border-radius: var(--radius);
  margin: 0 14px 10px;
  padding: 16px;
}
.pwa-guide h3 {
  font-size: 14px; font-weight: 800; margin-bottom: 8px;
}
.pwa-guide ol {
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.7;
}
.pwa-guide ol li { margin-bottom: 4px; }

/* ===== INLINE SWAP DRAWER ===== */
.ex-swap-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  border: 1px solid var(--sep);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 1px;
  transition: all 0.15s ease;
}
.ex-swap-btn:active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(0.95);
}
.ex-card-subs-drawer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--sep);
  animation: slideDown 0.2s ease-out;
}
.ex-card-subs-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-2);
  margin-bottom: 8px;
}
.ex-card-subs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ex-card-sub-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  border: 1.5px solid var(--sep);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.ex-card-sub-option:active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(0.98);
}
.ex-card-sub-option .sub-meta {
  font-size: 10.5px;
  color: var(--text-3);
  font-weight: 600;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== UPGRADED REST TIMER RING & CONTROLS ===== */
.rt-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 16px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rt-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.rt-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 5;
}
.rt-ring-indicator {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 282.7;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.rest-timer .rt-display {
  position: absolute;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  font-family: monospace, monospace;
}
.rest-timer .rt-display.rt-done {
  color: var(--success);
  animation: pulse 1s infinite alternate;
}
.rt-btn.rt-adjust {
  background: var(--surface-2);
  border: 1px solid var(--sep);
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}
.rt-btn.rt-adjust:active {
  transform: scale(0.93);
  background: var(--surface-3);
}

/* ===== WARM-UP SET GENERATOR ===== */
.warmup-card {
  background: var(--surface-2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  margin-top: 12px;
  overflow: hidden;
}
.warmup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  font-size: 13.5px;
}
.warmup-header:active {
  background: rgba(255,255,255,0.04);
}
.warmup-header span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
}
.warmup-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--sep);
  font-size: 13px;
  text-align: left;
}
.warmup-intro {
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.wu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--sep);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.wu-row:active {
  transform: scale(0.98);
}
.wu-row.checked {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.wu-chk {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
  flex-shrink: 0;
}
.wu-row.checked .wu-chk {
  background: var(--accent);
  border-color: var(--accent);
}
.wu-row.checked .wu-chk::after {
  content: '✓';
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.wu-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wu-pct {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-3);
}
.wu-row.checked .wu-pct {
  color: var(--accent);
}
.wu-desc {
  font-weight: 700;
  color: var(--text);
  font-size: 13.5px;
}
.wu-tip {
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
}

/* ===== PROGRESS PAGE MUSCLE HEATMAP ===== */
.progress-heatmap-card {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  margin: 0 14px 16px;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.heatmap-views-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  width: 100%;
}
.heatmap-view-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 130px;
}
.heatmap-view-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.heatmap-body-svg-wrap {
  width: 100%;
  aspect-ratio: 240/400;
}
.heatmap-body-svg-wrap .body-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}
.progress-heat-legend {
  margin-top: 14px;
  width: 100%;
  max-width: 220px;
}
.heatmap-tap-tip {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  font-weight: 600;
}

/* ===== BARBELL PLATE CALCULATOR ===== */
.plate-calc-card {
  background: var(--surface-2);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  margin-top: 12px;
  overflow: hidden;
}
.plate-calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  font-size: 13.5px;
}
.plate-calc-header:active {
  background: rgba(255,255,255,0.04);
}
.plate-calc-header span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
}
.plate-calc-body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--sep);
  text-align: left;
}
.plate-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13.5px;
}
.plate-input-row label {
  color: var(--text-2);
  font-weight: 600;
}
.plate-input-row input {
  background: var(--surface);
  border: 1.5px solid var(--sep);
  color: var(--text);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  width: 90px;
  text-align: right;
  outline: none;
}
.plate-input-row input:focus {
  border-color: var(--accent);
}
.plate-calc-intro {
  color: var(--text-3);
  font-size: 11.5px;
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.plate-bar-graphic-wrap {
  display: flex;
  align-items: center;
  height: 80px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.02);
  position: relative;
}
.bar-sleeve-collar {
  width: 8px;
  height: 48px;
  background: #55565b;
  border-radius: 2px;
  box-shadow: inset 1px 0 2px rgba(255,255,255,0.2), 2px 0 4px rgba(0,0,0,0.4);
  z-index: 2;
}
.bar-sleeve-shaft {
  flex: 1;
  height: 18px;
  background: linear-gradient(180deg, #c9ccd4, #8e8e93);
  border-radius: 0 4px 4px 0;
  display: flex;
  align-items: center;
  padding-left: 2px;
  gap: 3px;
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.3), 0 2px 4px rgba(0,0,0,0.3);
}
.bar-plate-gfx {
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.25), inset -1px -1px 2px rgba(0,0,0,0.4), 0 3px 6px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  position: relative;
}
.plate-gfx-label {
  font-size: 8.5px;
  font-weight: 850;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  pointer-events: none;
}
.empty-bar-msg {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 700;
  margin-left: 12px;
  font-style: italic;
}
.plate-list-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
.plate-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.plate-qty {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.plate-name {
  color: var(--text-2);
}

/* ===== MONTHLY WORKOUT CALENDAR ===== */
.monthly-cal-card {
  background: var(--surface);
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  margin: 0 14px 16px;
  padding: 16px 14px 14px;
}
.cal-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cal-nav-btn {
  background: var(--surface-2);
  border: 1px solid var(--sep);
  color: var(--text-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: 0.15s;
}
.cal-nav-btn:active {
  transform: scale(0.9);
  background: var(--surface-3);
}
.cal-month-title {
  font-size: 15px;
  font-weight: 850;
  color: var(--text);
  letter-spacing: -0.3px;
}
.cal-grid-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.cal-day-label {
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-3);
}
.cal-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  position: relative;
  transition: 0.15s;
}
.cal-day-cell.pad {
  color: var(--text-3);
  opacity: 0.22;
}
.cal-day-cell.active-month {
  background: rgba(255,255,255,0.02);
  color: var(--text-2);
}
.cal-day-cell.active-month.today {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
}
.cal-day-cell.completed {
  background: var(--day-color);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-weight: 800;
}
.cal-day-cell.completed:active {
  transform: scale(0.9);
  opacity: 0.85;
}
.cal-dot-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
  background: #fff;
}
.cal-day-cell.completed .cal-dot-indicator {
  background: #fff !important; /* Force white dot on colored cells */
  width: 4px;
  height: 4px;
}

/* ===== CALENDAR LOG DETAILS DRAWER ===== */
.cal-details-drawer {
  margin-top: 14px;
  border-top: 1.5px dashed var(--sep);
  padding-top: 14px;
  animation: slideDown 0.2s ease-out;
  text-align: left;
}
.cal-det-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cal-det-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.cal-det-close {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
}
.cal-det-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.cal-det-ex-card {
  background: var(--surface-2);
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.cal-det-ex-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  padding-left: 8px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.cal-det-sets-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-det-set {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  padding: 3px 0;
}
.cal-det-set:last-child {
  border-bottom: none;
}
.set-num-label {
  color: var(--text-3);
  font-weight: 600;
}
.set-weight-val {
  color: var(--accent);
  font-weight: 700;
}
.set-reps-val {
  color: var(--text-2);
}
