/* Week Trainer — dark, mobile-first. Large tap targets, thumb-reachable controls. */
:root {
  /* Surfaces sampled straight off Fitbod: a cool charcoal, not black. Each step up
     is a visibly lighter grey — that separation is what makes chips and cards read
     as raised instead of drawn-on. */
  --bg: #191922;          /* page */
  --bg-2: #1d1d26;        /* session card */
  --card: #2b2c37;        /* chips, pills, elevated controls */
  --card-2: #343542;      /* pressed states, hex badges, tiles */
  --line: #3a3b47;
  --text: #eef2f8;
  --muted: #9a9aa8;
  --accent: #1789fc;      /* logo blue — the app's ONLY accent */
  --accent-2: #4da6ff;    /* lighter blue, links/secondary only */
  --accent-dim: #0f5fb0;
  --amber: #f5a524;
  --amber-bg: #2a2113;
  --green: #34d399;
  --radius: 14px;
  --tap: 44px;
  --navh: 62px;
  --navb: max(14px, calc(env(safe-area-inset-bottom) - 16px));   /* gap under the floating nav */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; scrollbar-width: none; -ms-overflow-style: none; }
/* hide scrollbars everywhere (scrolling still works) — phone-first, no visible scroll bars */
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: calc(var(--navh) + var(--navb) + 12px);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent-2); text-decoration: none; }
h1 { font-size: 1.72rem; margin: 0; font-style: italic; font-weight: 800; }
h3 { font-size: 0.95rem; margin: 0; letter-spacing: 0.02em; }
input, textarea, button { font: inherit; color: inherit; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  /* solid: the old fade to 85% let lift names show through the bar's lower edge */
  background: var(--bg);
  /* +14px: iOS blurs a band under the status bar, and the week line sat inside it, smeared */
  padding-top: calc(env(safe-area-inset-top) + 14px);
  border-bottom: 1px solid var(--line);
}
/* One line, Fitbod's "My Plan >": week + day on the left, Tools gear on the right */
.weeknav { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; }
.plan-line { display: flex; align-items: center; gap: 6px; border: none; background: none; padding: 6px 0; font-size: 1rem; font-weight: 700; color: var(--text, #fff); }
.plan-chev { color: var(--accent); font-size: 1.35rem; line-height: 1; }
.gear { width: 38px; height: 32px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font-size: 1rem; color: var(--muted); position: relative; }

/* the week panel */
.weeknav-btn { width: 40px; height: 36px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font-size: 1.1rem; }
.wk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wk-title { text-align: center; font-weight: 800; font-style: italic; font-size: 1.15rem; }
.wk-range { font-size: 0.8rem; font-weight: 400; font-style: normal; color: var(--muted); margin-top: 2px; }
.wk-days { display: flex; flex-direction: column; }
.wk-day { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 10px; border: none; border-top: 1px solid var(--line); background: none; text-align: left; border-radius: 0; }
.wk-day:first-child { border-top: none; }
.wk-day.active { background: var(--card); border-radius: 12px; }
.wk-day.active + .wk-day { border-top-color: transparent; }
.wk-mark { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); font-size: 0.8rem; color: #0b2a1f; }
.wk-day.done .wk-mark { background: var(--green); border-color: var(--green); font-weight: 800; }
.wk-day.active .wk-mark { border-color: var(--accent); }
.wk-name { flex: 1; font-weight: 700; }
.wk-day.active .wk-name { color: var(--accent-2); }
.wk-date { color: var(--muted); font-size: 0.85rem; }
.wk-today { font-size: 0.7rem; font-weight: 700; color: var(--accent-2); border: 1px solid var(--accent-dim); border-radius: 999px; padding: 2px 8px; }

/* ---------- day view ---------- */
/* Fitbod frames the whole session in a rounded card a shade off the black page */
.dayview { padding: 22px 16px 4px; display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 0 auto; background: var(--bg-2); border-radius: 24px 24px 0 0; min-height: 70vh; }
.day-head { padding: 2px 0 10px; }
.day-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Fitbod's Swap pill — outlined in the accent, sits on the title row */
.swap-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 19px; border-radius: 999px; background: rgba(23,137,252,0.13); border: 1px solid var(--accent); color: var(--text); font-size: 1.05rem; font-weight: 700; }
.swap-ic { color: var(--accent); font-size: 1.05rem; line-height: 1; }
/* Fitbod's header: "5 Exercises • 2 Muscles" then a row of pill chips */
.day-sub { margin-top: 8px; font-size: 1rem; color: var(--muted); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.day-chips { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.day-chip { display: inline-flex; align-items: center; height: 38px; padding: 0 17px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 1.02rem; font-weight: 600; color: var(--text); }
.day-chip.on { border-color: var(--accent); color: var(--accent); }
.day-chip .vol-value { font-weight: 600; }
.elapsed { font-variant-numeric: tabular-nums; font-weight: 700; }
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.3; }
.day-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

.banner { background: var(--amber-bg); border: 1px solid var(--amber); color: var(--amber); border-radius: 10px; padding: 8px 12px; font-size: 0.82rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.muted { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }

/* ---------- cardio ---------- */
.cardio { border-left: 3px solid var(--accent); }
.cardio.done { opacity: 0.7; }
.cardio-head { display: flex; align-items: center; justify-content: space-between; }
.cardio-tag { color: var(--accent-2); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.03em; }
.cardio-rx { margin: 8px 0 10px; font-size: 0.9rem; color: var(--text); }
.cardio-inputs { display: flex; gap: 10px; }
.cardio-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.72rem; color: var(--muted); flex: 1; min-width: 0; }
.cardio-field input { width: 100%; min-width: 0; height: var(--tap); border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; text-align: center; }
.cardio-done { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.cardio-done input { width: 22px; height: 22px; }

/* ---------- warmup ---------- */
.warmup h3 { margin-bottom: 8px; }
.checks { display: flex; flex-direction: column; gap: 4px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 8px; font-size: 0.9rem; }
.check input { width: 22px; height: 22px; flex: 0 0 auto; }
.check.on span { color: var(--muted); text-decoration: line-through; }

/* ---------- section / exercise ---------- */
.section { padding: 12px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.section-head h3 { color: var(--text); text-transform: uppercase; font-size: 0.78rem; }
.pill { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 8px; }
.section-note { color: var(--muted); font-size: 0.74rem; }

.ex { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.ex:last-child { margin-bottom: 0; }
.ex-caution { border-color: var(--amber); }
.ex-head { display: flex; align-items: flex-start; gap: 8px; }
.reorder { display: flex; flex-direction: column; gap: 4px; }
.rbtn { width: 30px; height: 26px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 8px; font-size: 0.7rem; color: var(--muted); }
.rbtn:disabled { opacity: 0.3; }
.rbtn.remove { height: 30px; width: 32px; font-size: 0.9rem; }
.ex-title { flex: 1; }
.ex-name { font-weight: 600; font-size: 1rem; }
.ex-scheme { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.target { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.caution { background: var(--amber-bg); color: var(--amber); border-radius: 8px; padding: 7px 10px; font-size: 0.78rem; margin-top: 8px; }
.cues { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.8rem; }
.cues li { margin: 2px 0; }

/* sets */
.sets { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.set-row { display: flex; align-items: center; gap: 8px; }
.set-n { width: 20px; text-align: center; color: var(--muted); font-size: 0.8rem; }
.set-in { flex: 1; min-width: 0; height: var(--tap); border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; text-align: center; font-size: 1rem; }
.set-in:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.set-x { color: var(--muted); }
/* set rows — Fitbod style: hex badge + labeled reps/weight boxes */
.setblock { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.sets-head { display: flex; gap: 12px; padding-left: 46px; }
.sets-head-label { flex: 1; font-size: 0.92rem; color: var(--muted); }
.setrow { display: flex; align-items: center; gap: 12px; }
.hexbadge { width: 38px; height: 42px; flex: 0 0 auto; border: none; background: var(--card-2); color: var(--muted); font-weight: 800; font-style: italic; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font-size: 1.05rem; }
.hexbadge.done { background: var(--green); color: #04241a; }
.setbox { flex: 1; min-width: 0; height: 60px; border: 1px solid var(--line); border-radius: 12px; background: transparent; text-align: left; padding: 0 18px; font-size: 1.5rem; font-style: italic; font-weight: 700; color: var(--text); }
.setbox::placeholder { color: var(--muted); opacity: 0.6; font-style: italic; }
.setbox:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.setrow.done .setbox { color: var(--green); border-color: rgba(52,211,153,0.4); }
/* "Per arm" unit caption — mirrors .setrow's columns so it sits under the right box */
.setrow-note { display: flex; align-items: center; gap: 12px; margin-top: -4px; }
.setrow-note .sn-badge { width: 38px; flex: 0 0 auto; }
.setrow-note .sn-cell { flex: 1; min-width: 0; padding-left: 18px; font-size: 0.86rem; color: var(--muted); }
.setblock-actions { display: flex; align-items: center; gap: 18px; }
.addset { align-self: flex-start; display: flex; align-items: center; gap: 10px; margin-top: 8px; background: none; border: none; color: var(--accent); font-weight: 800; font-size: 1.05rem; padding: 4px 2px; }
.addset-plus { width: 29px; height: 32px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: var(--accent); border: 1.5px solid var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font-weight: 700; }
.addset.removeset { color: var(--muted); }
.addset-plus.minus { color: var(--muted); border-color: var(--line); }

/* complete-set check */
.set-check { width: 42px; height: var(--tap); flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: 1.05rem; }
.set-row.done .set-check { background: var(--green); border-color: var(--green); color: #04241a; font-weight: 700; }
.set-row.done .set-in { border-color: var(--green); color: var(--green); }

/* note + rest chip row */
.ex-foot { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rest-chip { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; }
.rest-chip.off { opacity: 0.55; text-decoration: line-through; }
.hist-chip { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; }
.ex-foot .note-toggle { margin-left: auto; }
.note-toggle { background: none; border: none; color: var(--accent-2); font-size: 0.8rem; padding: 4px 0; }
.note-toggle.has-note { color: var(--green); }

/* custom add */
.custom-add { display: flex; gap: 8px; margin-top: 4px; }
.custom-in { flex: 1; height: var(--tap); border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 0 12px; }

/* deferred */
.deferred { color: var(--muted); }
.deferred summary { font-size: 0.85rem; cursor: pointer; }
.deferred ul { margin: 10px 0 0; padding-left: 18px; font-size: 0.82rem; }
.deferred strong { color: var(--text); }

/* session notes */
.notes h3 { margin-bottom: 8px; }
.session-notes { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); padding: 10px; resize: vertical; }

/* ---------- buttons ---------- */
.btn { height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 0.95rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn-ghost { background: var(--card); }
.btn.block { display: block; width: 100%; height: 54px; margin-top: 10px; text-align: center; line-height: 54px; padding: 0; }
.btn.danger { color: #ff7a7a; }

/* volume (day header) */
.vol { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.vol-label { font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.vol-value { font-weight: 800; font-size: 1.05rem; }
.finish { margin-top: 6px; }

/* "Removed today" undo strip */
.removed-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.removed-label { font-size: 0.75rem; color: var(--muted); }
.removed-chip { background: none; border: 1px dashed var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; }
.removed-chip:active { background: var(--card-2); }

/* ---------- data sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.55); display: flex; align-items: flex-end; }
.sheet-backdrop[hidden] { display: none; }
/* max-height so a tall sheet (the rest sheet runs ~656px with 12 durations + 5 tones) can never
   push its own heading off the top of the screen on a small phone or at a large Dynamic Type size */
.sheet { background: var(--bg-2); border-top-left-radius: 18px; border-top-right-radius: 18px; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); width: 100%; max-width: 640px; margin: 0 auto; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet h2 { margin: 0 0 10px; font-size: 1.1rem; }
.sheet-note { color: var(--muted); font-size: 0.82rem; margin: 0 0 12px; }
.sheet-section { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.sheet-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.sheet-section h3 { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sheet-section summary { font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.adv-label { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
.adv-label input { display: block; width: 100%; margin-top: 6px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 0 12px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; border-radius: 999px; background: var(--amber); color: #1a1205; font-size: 0.62rem; font-weight: 700; text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px);
  background: #22222c; border: 1px solid var(--line); color: var(--text);
  padding: 8px 16px; border-radius: 999px; font-size: 0.82rem; z-index: 80;
  opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* the round stop button owns the bottom centre during a workout — toasts clear it */
body.stopping .toast { bottom: calc(178px + env(safe-area-inset-bottom)); }

/* ---------- docked rest timer ---------- */
.restbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 22px 18px calc(26px + env(safe-area-inset-bottom));
  background: #232a36; border-top-left-radius: 24px; border-top-right-radius: 24px;
  box-shadow: 0 -12px 44px rgba(0,0,0,0.55);
}
.restbar[hidden] { display: none; }
.restbar.front { z-index: 84; } /* brought up from the pill: over the keypad and the rate sheet too */
.rest-x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 999px; border: none; background: rgba(255,255,255,0.08); color: var(--text); font-size: 1.1rem; }
.rest-title { font-size: 1.3rem; font-weight: 800; font-style: italic; }
.rest-row { display: flex; align-items: center; justify-content: center; gap: 22px; width: 100%; }
.rest-adj { width: 54px; height: 54px; border-radius: 15px; border: none; background: rgba(255,255,255,0.06); color: var(--text); font-size: 0.85rem; font-weight: 700; }
.rest-time { font-size: 3.4rem; font-weight: 800; font-style: italic; font-variant-numeric: tabular-nums; line-height: 1; min-width: 168px; text-align: center; }
.rest-pause { width: 54px; height: 40px; border: none; background: none; color: var(--accent); font-size: 1.6rem; line-height: 1; }
.restbar.done .rest-time, .restbar.done .rest-title { color: var(--green); }
/* The small countdown at the top. Above every screen, sheet and modal (all below 80), so the rest
   stays in sight wherever he is, but it sits in the top band where the pop-ups have no buttons. */
.restpill {
  position: fixed; top: calc(env(safe-area-inset-top) + 6px); left: 50%; transform: translateX(-50%); z-index: 85;
  display: flex; align-items: center; height: 36px; border-radius: 999px;
  background: #232a36; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.restpill[hidden] { display: none; }
.rp-open { height: 100%; padding: 0 6px 0 14px; border: none; background: none; color: var(--text); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.rp-time { font-variant-numeric: tabular-nums; font-style: italic; font-weight: 800; }
.rp-x { width: 34px; height: 100%; border: none; background: none; color: var(--muted); font-size: 1.05rem; }
.restpill.done .rp-open { color: var(--green); }

/* ---------- custom numeric keypad ---------- */
.keypad {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 72;
  background: var(--bg-2); border-top: 1px solid var(--line);
  border-top-left-radius: 18px; border-top-right-radius: 18px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 44px rgba(0,0,0,0.6);
}
.keypad[hidden] { display: none; }
.kp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 460px; margin: 0 auto; }
.kp-key {
  height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.kp-key:active { background: var(--card-2); }
.kp-key.kp-back { color: var(--muted); font-size: 1.35rem; }
.kp-key.kp-dot.disabled { opacity: 0.28; }
.kp-action {
  display: block; width: 100%; max-width: 460px; margin: 8px auto 0; height: 54px;
  border-radius: 12px; border: none; background: var(--accent); color: #fff;
  font-weight: 800; font-style: italic; font-size: 1.1rem;
}
.kp-action:active { filter: brightness(0.92); }
.setbox.kp-active { outline: 2px solid var(--accent); border-color: var(--accent); }
/* While the keypad is up, reserve its exact footprint at the bottom of the whole lift screen so
   the scrollable lift body ends ABOVE the keypad — a set box can never hide under it. Collapse the
   tall hero image too, so the middle band is roomy enough to see what you're typing. */
body.keypadding .lift-screen { padding-bottom: var(--kp-pad, calc(340px + env(safe-area-inset-bottom))); }
body.keypadding .lift-hero { min-height: 0; padding-top: calc(env(safe-area-inset-top) + 8px); padding-bottom: 10px; background-image: none; }
body.keypadding .lift-hero h1 { font-size: 1.15rem; }
body.keypadding .lift-howto { display: none; }
body.keypadding .lift-body { padding-bottom: 20px !important; } /* small slack so the last row can nudge fully into view */

/* ---------- Rate Your Last Set (RIR) ---------- */
.ratesheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 73;
  background: var(--bg-2); border-top: 1px solid var(--line);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 44px rgba(0,0,0,0.6);
}
.ratesheet[hidden] { display: none; }
.rate-head { display: flex; align-items: center; justify-content: space-between; }
.rate-title { font-size: 1.3rem; font-weight: 800; font-style: italic; }
.rate-x { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 999px; border: none; background: rgba(255,255,255,0.08); color: var(--text); font-size: 1.1rem; }
.rate-q { color: var(--muted); font-size: 0.95rem; margin: 10px 0 14px; }
.rate-opts { display: flex; gap: 10px; }
.rate-opt { flex: 1; min-width: 0; height: 66px; border-radius: 14px; border: none; font-size: 1.5rem; font-weight: 800; font-style: italic; }
.rate-opt.sel { outline: 3px solid #fff; outline-offset: 2px; }
.rate-4 { background: #f3edb8; color: #1a1205; }
.rate-3 { background: #f5d76e; color: #1a1205; }
.rate-2 { background: #5fb0ff; color: #06213d; }
.rate-1 { background: #1789fc; color: #fff; }
.rate-0 { background: #0d4c8c; color: #fff; }
.rate-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.82rem; color: var(--muted); }
.rate-result { margin: 12px 0 0; font-size: 1rem; font-weight: 700; color: var(--text); }
.rate-result[hidden] { display: none; }
.rate-done { display: block; margin: 16px 0 0 auto; min-width: 150px; height: 50px; border-radius: 999px; border: none; background: #fff; color: #111; font-weight: 800; font-style: italic; font-size: 1.05rem; padding: 0 28px; }
.rate-done:active { filter: brightness(0.92); }

/* ---------- rest picker ---------- */
.rest-toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.92rem; padding: 2px 0 4px; }
.rest-toggle-row input { width: 46px; height: 26px; }
.rest-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; margin-bottom: 10px; }
.rest-opt { height: 48px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.rest-opt.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---------- centered modal (note) ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 62; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px; width: 100%; max-width: 420px; }
.modal h2 { margin: 0 0 12px; font-size: 1.1rem; text-align: center; }
.note-input { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 12px; resize: vertical; font-size: 1rem; }
.note-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.modal-actions .btn { flex: 1; }
.swap-sub { margin: 2px 0 10px; color: var(--muted); font-size: 0.85rem; }
.idle-sub { margin: -4px 0 2px; color: var(--muted); font-size: 0.9rem; text-align: center; line-height: 1.4; }

/* ---------- active workout page ---------- */
/* While the clock runs the page sheds its chrome: no week nav, no day tabs, no bottom
   nav — just the X, the options dots, the big clock, and the lifts. */
body.active-workout #topbar,
body.active-workout #bottomNav { display: none !important; }
body.active-workout #dayView { padding-top: calc(env(safe-area-inset-top) + 8px); }
.act-bar {
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: env(safe-area-inset-top); z-index: 5;
  margin: 0 -16px; padding: 6px 16px;
  background: var(--bg-2);
}
/* the small clock that takes over in the bar once the big one scrolls away */
.act-mini {
  font-size: 1.15rem; font-weight: 800; font-style: italic; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity .15s ease;
}
body.act-folded .act-mini { opacity: 1; }
.act-x, .act-dots {
  width: 62px; height: 62px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line);
  color: var(--accent); font-size: 1.5rem; line-height: 1; display: flex;
  align-items: center; justify-content: center;
}
.act-dots { letter-spacing: 1px; }
.act-clock { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 46px 0 40px; }
/* the recording dot pairs with the stop button, so it stays red while everything else
   follows the app's blue */
.act-dot { width: 15px; height: 15px; border-radius: 50%; background: #d92546; animation: actpulse 2s ease-in-out infinite; }
@keyframes actpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.act-time {
  font-size: 3.3rem; font-weight: 800; font-style: italic; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.day-chip.elapsed { cursor: pointer; }

/* ---------- finish summary ---------- */
/* Above the other .screen layers (all z-index 55): the summary can be opened FROM the
   past-workout screen, and equal z-index would let that screen paint over it — leaving a
   summary you can see but not tap. Share sits above the summary for the same reason.
   Both stay below sheets/modals (60+). */
/* two classes on purpose: .screen sets z-index 55 further down the file, and a
   single-class rule up here would lose to it on source order */
.screen.summary-screen { z-index: 58; }
.screen.share-screen { z-index: 59; }
.summary-body { flex: 1; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 26px) 18px 18px; overscroll-behavior: contain; }
.sum-hero { margin-bottom: 20px; }
.sum-kicker { color: var(--accent); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.14em; }
.sum-hero h1 { font-size: 2.1rem; font-style: italic; font-weight: 800; margin: 6px 0 2px; }
.sum-date { color: var(--muted); font-size: 0.92rem; margin: 0; }
.sum-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sum-stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.sum-stat-v { font-size: 1.9rem; font-style: italic; font-weight: 800; line-height: 1.1; }
.sum-stat-l { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; margin-top: 4px; }
.sum-prs { margin-top: 14px; background: rgba(23,137,252,0.10); border: 1px solid var(--accent-dim); border-radius: 16px; padding: 14px; }
.sum-prs-n { font-weight: 800; font-size: 1.02rem; }
.sum-prs-l { color: var(--muted); font-size: 0.88rem; margin-top: 4px; line-height: 1.4; }
.sum-h2 { font-size: 1.05rem; font-style: italic; font-weight: 800; margin: 24px 0 10px; }
.sum-mus { margin-bottom: 12px; }
.sum-mus-top { display: flex; justify-content: space-between; font-size: 0.94rem; margin-bottom: 6px; }
.sum-mus-pct { color: var(--muted); }
.sum-mus-bar { height: 9px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.sum-mus-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.sum-lift { padding: 11px 0; border-bottom: 1px solid var(--line); }
.sum-sets { margin-top: 4px; }
.sum-set { color: var(--muted); font-size: 0.88rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.sum-hero { position: relative; }
.sum-menu-btn { position: absolute; top: -6px; right: -6px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg-2); color: var(--accent); font-size: 1.2rem; font-weight: 800; letter-spacing: 1px; }
/* Fitbod's confirm step after Stop */
.fin-title { font-size: 1.2rem; font-style: italic; font-weight: 800; margin: 2px 0 14px; }
.fin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.fin-stat-l { color: var(--muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; }
.fin-stat-v { font-size: 1.02rem; font-weight: 800; margin-top: 4px; white-space: nowrap; }
.fin-actions { display: flex; gap: 10px; }
.fin-actions .btn { flex: 1; border-radius: 999px; }
.dur-row { display: flex; gap: 12px; margin: 6px 0 16px; }
.dur-field { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.dur-field input { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 1.2rem; text-align: center; }
.btn-danger { background: #d92546; border-color: #d92546; color: #fff; font-weight: 700; }
.more-item.danger { color: #ff5a7a; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.sum-lift:last-child { border-bottom: 0; }
.sum-lift-n { font-weight: 700; }
.sum-pr { color: var(--accent); font-size: 0.76rem; font-weight: 800; margin-left: 8px; }
.sum-lift-s { color: var(--muted); font-size: 0.86rem; flex: 0 0 auto; }
.sum-foot { color: var(--muted); font-size: 0.76rem; margin-top: 20px; line-height: 1.5; }
.summary-bar { display: flex; gap: 10px; padding: 12px 18px calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid var(--line); background: var(--bg-2); }
.summary-bar .btn { flex: 1; }

/* ---------- share cards ---------- */
.share-head { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 12px) 16px 10px; }
.share-title { font-weight: 800; font-style: italic; font-size: 1.05rem; }
.share-x { width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); color: var(--text); font-size: 1.3rem; line-height: 1; border: 0; }
/* one card per screen-width, snapped — that's the swipe */
.share-screen { background: #0d0d13; }   /* darker than the card, so the card reads as a card */
.share-cards { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; align-items: center; }
.share-slide {
  flex: 0 0 100%; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
  padding: 4px 26px; box-sizing: border-box; height: 100%;
}
.share-card {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
}
.share-dots { display: flex; justify-content: center; gap: 7px; padding: 12px 0 4px; }
.share-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--card-2); }
.share-dot.on { background: var(--accent); }
.share-bar { display: flex; flex-direction: column; gap: 8px; padding: 8px 18px calc(env(safe-area-inset-bottom) + 14px); }

/* The round stop button, Fitbod's. Floats above the bottom nav for the whole workout;
   red rather than the app's blue because it is the one control that ends something. */
.stopbtn {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--navh) + var(--navb) + 14px);   /* clear of the nav labels */
  width: 76px; height: 76px; border-radius: 50%;
  /* flat crimson, no ring: the dark border read as a black halo against the page, which
     Fitbod's doesn't have, and the bright glow made it look like a different control */
  background: #b82544; border: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); z-index: 36; cursor: pointer;
  transition: transform .12s ease;
}
.stopbtn:active { transform: translateX(-50%) scale(0.93); }
/* On the active-workout page the bottom nav is hidden, so reserving --navh for it parked
   the button 56px too high — Fitbod's sits 48px off the bottom, i.e. safe-area + 14. Must
   stay scoped: exit via the X and this same button floats over the real nav again. */
body.active-workout .stopbtn { bottom: calc(env(safe-area-inset-bottom) + 14px); }
.stopbtn-sq { width: 26px; height: 26px; border-radius: 4px; background: #fff; }
/* keep the last row clear of the floating button */
.cta-spacer { height: 124px; }   /* the page's last box ends above the fade below */
/* A dark fade along the bottom while a workout runs, so list text fades out under the
   stop button and the shrunk nav instead of showing behind them. Sits under both. */
body.stopping::after {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0; z-index: 34; pointer-events: none;
  height: calc(var(--navh) + var(--navb) + 104px);
  background: linear-gradient(180deg, rgba(25,25,34,0), var(--bg) 55%);
}
body.stopping.active-workout::after { height: calc(env(safe-area-inset-bottom) + 104px); }
/* the full-screen page has no .cta-spacer, so its bottom room comes from here */
body.stopping.active-workout { padding-bottom: calc(env(safe-area-inset-bottom) + 112px); }

/* a finished lift: green hexagon tick where the muscle badge was, green summary line */
.lift-tick {
  position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px;
  background: var(--green); color: #04241a; font-size: 0.95rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}
.lift-row.done .lift-sum { color: var(--green); }
.lift-pr { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 8px; border-radius: 50%; background: var(--green); color: #0b2a1f; font-size: 0.8rem; font-weight: 800; vertical-align: 1px; }
.coach-btn { margin-top: 10px; }
.coach-body { margin: 4px 0 2px; max-height: 60vh; overflow-y: auto; }
.coach-bullet { position: relative; padding-left: 16px; margin: 8px 0; line-height: 1.4; }
.coach-bullet::before { content: '•'; position: absolute; left: 2px; color: var(--accent); }
.coach-line { margin: 8px 0; line-height: 1.4; }
.ask-q { margin: 14px 0 4px; font-weight: 600; color: var(--accent); }
.ask-q:first-child { margin-top: 4px; }
.ask-wait .ask-q { margin-top: 14px; }
/* the tap shows: the button dips, and dims while the answer is on its way */
#askModal .btn { transition: transform 0.08s, opacity 0.15s; }
#askModal .btn:active { transform: scale(0.95); opacity: 0.8; }
#askModal .btn:disabled { opacity: 0.5; }
.ask-dots { display: flex; gap: 6px; padding: 10px 2px 4px; }
.ask-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: askdot 1s infinite ease-in-out; }
.ask-dots span:nth-child(2) { animation-delay: 0.15s; }
.ask-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes askdot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }
.ask-dots .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ask-dots span { animation: none; opacity: 0.8; } }
.modal-actions.swap-actions { flex-direction: column; }
.modal-actions.swap-actions .btn { width: 100%; }

/* ---------- add/replace library picker ---------- */
.lib-modal { max-width: 460px; max-height: 86vh; display: flex; flex-direction: column; }
.lib-modal h2 { text-align: left; }
.lib-mode { display: flex; gap: 6px; margin: 0 0 10px; }
.lib-mode[hidden] { display: none; }
.lib-seg { flex: 1; padding: 7px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .85rem; }
.lib-seg.on { background: var(--card-2); border-color: var(--accent); color: var(--text); }
.lib-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.lib-chip { font-size: .8rem; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.lib-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lib-results { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; min-height: 140px; }
.lib-row { display: flex; flex-direction: row; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.lib-row:active { background: var(--card-2); }
.lib-thumb { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--bg-2); }
.lib-thumb-fb { display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.lib-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lib-row-name { font-weight: 600; line-height: 1.25; }
.lib-row-meta { font-size: .76rem; color: var(--muted); text-transform: capitalize; }
.lib-row-custom { border-style: dashed; }
.lib-count { text-align: center; margin: 8px 0 2px; font-size: .8rem; }

/* ---------- full-screen detail (history) ---------- */
.screen { position: fixed; inset: 0; z-index: 55; background: var(--bg); display: flex; flex-direction: column; }
/* iOS-safe scroll lock: freeze the page behind any overlay so it can't scroll (and show
   a scroll indicator) underneath. Driven by syncScrollLock() in app.js. */
body.scroll-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.screen[hidden] { display: none; }
.screen-top { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 10px) 12px 10px; border-bottom: 1px solid var(--line); }
.screen-back { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--accent); font-size: 1.2rem; }
.screen-top h2 { margin: 0; font-size: 1.1rem; }
.seg { display: flex; gap: 8px; padding: 12px; }
.seg-btn { flex: 1; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.seg-btn.on { background: var(--card-2); color: var(--text); border-color: var(--accent); }
.screen-body { flex: 1; overflow-y: auto; padding: 0 12px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.hist-empty { padding: 20px 4px; }

/* results */
.hist-results { display: flex; flex-direction: column; gap: 10px; }
.hist-day { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.hist-date { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.hist-sets { display: flex; flex-direction: column; gap: 4px; }
.hist-set { display: flex; gap: 10px; font-size: 0.92rem; }
.hist-set-n { width: 18px; text-align: center; color: var(--muted); }
.hist-1rm { margin-top: 8px; font-size: 0.8rem; color: var(--muted); }

/* trends */
.hist-trends { display: flex; flex-direction: column; gap: 12px; }
.trend-card h3 { color: var(--text); font-size: 0.85rem; margin-bottom: 6px; }
.trend-val { font-size: 2rem; font-weight: 800; line-height: 1; }
.trend-unit { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.trend-date { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.trend-foot { text-align: center; font-size: 0.76rem; color: var(--muted); margin-top: 6px; }
.chart { width: 100%; height: auto; margin-top: 10px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .gridlabel { fill: var(--muted); font-size: 9px; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--muted); }
.chart .dot.last { fill: var(--accent); }

/* ===================================================================
   Fitbod-style redesign: lift list, per-lift detail, bottom nav
   =================================================================== */

/* day header */
.day-head { align-items: flex-start; }

/* lift list */
.list-section { margin-top: 2px; }
.list-section-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 2px 8px; }
.list-section-label h3 { text-transform: uppercase; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
/* Row pitch is set by the tile, not by air. Measured off Fitbod: their thumbnail fills
   ~0.73 of the row pitch (200px tile in a 274px pitch on a 1206-wide shot). A square 72px
   tile with 26px of padding only reached 0.58, which is why the photos read small and the
   rows read empty. 96px tile + 18px padding = 132px pitch, ratio 0.727. */
/* Negative margins pull the row out to the card's edges so the swipe actions can
   bleed off-screen the way Fitbod's Delete does; the padding puts the content back. */
.lift-row { display: flex; align-items: center; gap: 22px; background: none; border: none; border-radius: 0; padding: 18px; margin: 0 -16px; cursor: pointer; }
.lift-row:active { background: var(--card-2); }
.lift-row.done { border-color: rgba(52,211,153,0.45); }
/* PORTRAIT, not square — Fitbod's tile is the same width as this one but half again as
   tall, so object-fit: cover keeps the whole standing figure instead of cropping to torso. */
.lift-tile { width: 72px; height: 96px; flex: 0 0 auto; border-radius: 14px; background: linear-gradient(145deg, var(--card-2), var(--bg-2)); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.lift-tile-img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.lift-main { flex: 1; min-width: 0; }
.lift-name { font-weight: 700; font-size: 1.26rem; line-height: 1.24; letter-spacing: -0.01em; }
.lift-sum { color: var(--muted); font-size: 0.97rem; margin-top: 6px; }
.lift-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.lift-check { width: 26px; height: 26px; border-radius: 8px; background: var(--green); color: #04241a; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.lift-right .reorder { flex-direction: column; gap: 3px; }
.lift-right .rbtn { width: 30px; height: 22px; }

/* per-lift detail screen */
.lift-screen { background: var(--bg); }
.lift-hero { position: relative; padding: calc(env(safe-area-inset-top) + 20px) 16px 22px; background: linear-gradient(160deg, var(--card-2), var(--bg) 85%); border-bottom: 1px solid var(--line); }
.lift-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 14px; width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,0.35); color: var(--text); font-size: 1.05rem; }
.lift-hero-inner { display: flex; flex-direction: column; gap: 12px; padding-right: 48px; }
.lift-hero h1 { font-size: 1.95rem; line-height: 1.1; letter-spacing: -0.01em; }
.lift-howto { align-self: flex-start; font-family: inherit; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.10); color: var(--text); border-radius: 999px; padding: 13px 22px; font-weight: 700; font-size: 1.05rem; }
.lift-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
/* while a rest timer is docked, pad the bottom so you can still scroll your sets above the rest bar */
body.resting .lift-body { padding-bottom: var(--dock-pad, calc(248px + env(safe-area-inset-bottom))); }
.lift-body::-webkit-scrollbar { display: none; }
.lift-body { scrollbar-width: none; }
/* never let a child (esp. the scrollable chips row) collapse when content overflows — it must scroll, not shrink */
.lift-body > * { flex-shrink: 0; }
.lift-next { margin-top: 16px; }
.lift-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -14px; padding: 0 14px; scrollbar-width: none; }
.lift-chips::-webkit-scrollbar { display: none; }
.lift-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid transparent; color: var(--text); border-radius: 999px; padding: 9px 14px; font-size: 0.95rem; font-weight: 700; white-space: nowrap; }
.lift-chip-ic { display: flex; color: var(--muted); }
.lift-chip.off { opacity: 0.55; }
.lift-chip.has-note { border-color: var(--green); color: var(--green); }
.lift-scheme { color: var(--muted); font-size: 0.98rem; margin: 0; }
.lift-body .sets { margin-top: 4px; }

/* bottom nav: Fitbod's floating pill. It shrinks to one round button (the current tab's icon)
   while you scroll down, and grows back on a scroll up or a tap. */
.bottomnav { position: fixed; left: 20px; right: 20px; bottom: var(--navb); z-index: 35; display: flex; align-items: center; height: var(--navh); padding: 0 5px; border-radius: 999px; background: rgba(34,34,43,0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,0.45); overflow: hidden; transition: right .22s ease, height .22s ease, padding .22s ease; }
.navbtn { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: calc(var(--navh) - 12px); padding: 0 4px; background: none; border: none; border-radius: 999px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.01em; }
.navbtn .navicon { display: flex; }
.navbtn .navicon svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.navbtn.on { color: var(--accent); background: rgba(23,137,252,0.18); }
.bottomnav.mini { right: calc(100% - 20px - 52px); height: 52px; padding: 0; }
.bottomnav.mini .navbtn:not(.on) { display: none; }
.bottomnav.mini .navbtn.on { height: 100%; padding: 0; background: none; }
.bottomnav.mini .navlbl { display: none; }

/* per-row options menu */
.rowmenu { position: fixed; z-index: 75; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; min-width: 156px; box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
.rowmenu[hidden] { display: none; }
.rowmenu button { background: none; border: none; color: var(--text); text-align: left; padding: 11px 12px; border-radius: 8px; font-size: 0.9rem; }
.rowmenu button:disabled { opacity: 0.35; }
.rowmenu button.danger { color: #ff7a7a; }

/* lift list extras: timeline, thumbnail badge, focus label, ⋯ */
.lift-row { position: relative; overflow: hidden; touch-action: pan-y; }
/* no hairline between rows — Fitbod separates them with space and the rail alone */
.lift-row::before { content: ''; position: absolute; left: 49px; top: 0; height: 100%; width: 2px; background: var(--line); z-index: 0; }

/* swipe a row left to reveal Replace / Delete, exactly as Fitbod does */
/* hidden until the gesture starts — the slide above them is transparent so the
   timeline rail still shows through on a row at rest */
.lift-actions { position: absolute; top: 0; right: 0; bottom: 0; display: flex; z-index: 0; visibility: hidden; }
.lift-row.swiping .lift-actions, .lift-row.swiped .lift-actions { visibility: visible; }
.lift-row.swiping::before, .lift-row.swiped::before { opacity: 0; }
.lift-act { width: 78px; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 0.95rem; font-weight: 600; color: #fff; }
.lift-act-ic { display: flex; line-height: 0; }
.lift-act.replace { background: #23262f; }
.lift-act.delete { background: #c0453f; }
.lift-slide { display: flex; align-items: center; gap: inherit; flex: 1; position: relative; z-index: 1; will-change: transform; }
.lift-row:not(.swiping) .lift-slide { transition: transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.lift-tile { position: relative; z-index: 1; }
/* Fitbod's anatomy chip: overlaps the photo's bottom-RIGHT corner, big enough to
   actually read, and cropped to the region the lift trains (see cropSprite). */
.lift-badge { position: absolute; bottom: -8px; right: -12px; width: 46px; height: 46px; border-radius: 13px; background: #23252f; border: none; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; overflow: hidden; z-index: 2; }
.bodysprite { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.bodysprite svg { width: 100%; height: 100%; display: block; }
/* the big figure on the lift screen stays a whole body — it reads fine at that size */
.mw-fig .bodysprite svg { width: auto; max-width: 100%; }

/* lift screen — "muscles worked" strip */
.mw { display: flex; align-items: center; gap: 14px; padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 12px; }
.mw-fig { width: 54px; height: 82px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.mw-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mw-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mw-label { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); width: 100%; }
.mw-chip { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 5px 11px; font-size: 0.78rem; font-weight: 600; }
.mw-chip.p { border-color: var(--accent); color: var(--accent-2); }

/* estimated session length, shown until the real clock starts */

/* "last time" line + suggested (ghost) set values */
.lasttime { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 10px; font-size: 0.78rem; color: var(--muted); }
.lasttime-l { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; }
.lasttime-up { color: var(--accent-2); font-weight: 700; }
/* dim enough that a suggestion never reads as a number he already logged */
.setrow.suggested .setbox::placeholder { color: #46536b; font-style: normal; opacity: 1; }

/* warm-up sets — amber so they never read as working sets */
.warmset-add { width: 100%; background: none; border: 1px dashed var(--line); color: var(--muted); border-radius: 10px; padding: 11px; font-size: 0.83rem; font-weight: 600; margin-bottom: 12px; min-height: var(--tap); }
.warmsets { margin-bottom: 14px; }
.warmsets-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.warmsets-label { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; color: var(--amber); }
.warmsets-clear { background: none; border: none; color: var(--muted); font-size: 0.75rem; padding: 4px 2px; }
.setrow.warmrow { opacity: 0.92; }
.setrow.warmrow.done { opacity: 0.5; }
.hexbadge.warm { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.warm-val { display: flex; align-items: center; color: var(--muted); font-size: 0.9rem; font-weight: 600; }

/* rotate-today proposal */
.rot-row { padding: 11px 0; border-bottom: 1px solid var(--line); }
.rot-row:last-child { border-bottom: none; }
.rot-from { color: var(--muted); font-size: 0.84rem; text-decoration: line-through; }
.rot-arrow { color: var(--accent); font-size: 0.75rem; line-height: 1.3; }
.rot-to { font-weight: 700; font-size: 0.95rem; }
#rotateBody { max-height: 46vh; overflow-y: auto; }

/* manual recovery adjustment (Body → a muscle) */
.fadj { margin: 10px 0 16px; }
.fadj-toggle { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 14px; font-size: 0.78rem; font-weight: 600; min-height: 36px; }
.fadj-body { padding-top: 12px; }
.fadj-note { margin: 0 0 10px; font-size: 0.8rem; line-height: 1.4; color: var(--muted); }
.fadj-row { display: flex; align-items: center; gap: 12px; }
.fadj-range { flex: 1; accent-color: var(--accent); height: 30px; }
.fadj-val { width: 46px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-2); }
.fadj-reset { margin-top: 10px; background: none; border: none; color: var(--accent-2); font-size: 0.8rem; padding: 6px 0; }

/* lift screen — form steps + common mistakes */
.howto-steps { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 10px; }
.howto-steps li { font-size: 0.88rem; line-height: 1.45; color: var(--text); }
.howto-steps li::marker { color: var(--accent); font-weight: 800; }
.tips { display: flex; flex-direction: column; gap: 12px; }
.tip { border-left: 3px solid var(--amber); padding-left: 11px; }
.tip-title { font-weight: 700; font-size: 0.86rem; color: var(--amber); }
.tip-text { margin: 3px 0 0; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.focus-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; background: linear-gradient(90deg, #7fd0ff, #339dff, #1789fc); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 2px; }
.lift-menu { width: 34px; height: 34px; border: none; background: none; color: var(--muted); font-size: 1.3rem; }

/* lift detail: hero + focus panel + customize */
/* The demo clip is the point of this screen, so give it real estate — Fitbod runs
   the video ~34% of the viewport with the title sitting over its bottom edge. */
.lift-hero { min-height: min(35vh, 330px); display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center; }
.lift-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; background: var(--bg); }
.lift-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,15,21,0.05) 38%, rgba(15,15,21,0.72) 78%, rgba(25,25,34,0.96)); z-index: 0; pointer-events: none; }
.lift-close { z-index: 2; }
/* Title left, How-To pill right, both sitting on the bottom edge of the video (Fitbod). */
.lift-hero-inner { position: relative; z-index: 1; display: flex; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 14px; padding-right: 0; }
.lift-hero h1 { flex: 1; }
.lift-howto { flex: 0 0 auto; }
.lift-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lift-chips::-webkit-scrollbar { display: none; }
.lift-chip { flex: 0 0 auto; }
.focus-panel { display: flex; gap: 12px; align-items: flex-start; background: rgba(240,136,62,0.08); border: 1px solid rgba(240,136,62,0.22); border-radius: 14px; padding: 12px 14px; }
.focus-burst { color: #f0883e; font-size: 1.2rem; line-height: 1; }
.focus-title { font-weight: 800; background: linear-gradient(90deg, #f5d76e, #f0883e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.focus-text { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
.customize-label { color: var(--accent); font-weight: 800; font-size: 1.08rem; margin-top: 2px; }

/* finish button + day meta */
.finish .btn { height: 58px; line-height: 58px; border-radius: 999px; font-style: italic; font-size: 1.2rem; }
.day-meta { color: var(--muted); font-size: 0.85rem; margin: 2px 0 0; }

/* coming-soon placeholder */
.otherview { padding: calc(env(safe-area-inset-top) + 16px) 12px 14px; max-width: 640px; margin: 0 auto; }
.coming { text-align: center; min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.coming-icon { font-size: 2.6rem; margin-bottom: 10px; }
.coming h2 { margin: 0 0 6px; }
.coming p { margin: 0; }

/* ===================================================================
   BODY tab — Recovery (anatomical heatmap) + Results (composition/measurements)
   =================================================================== */
.body-body { display: flex; flex-direction: column; gap: 8px; }
.body-loading { padding: 16px 4px; }

/* top segmented control (Fitbod pill) */
.body-seg { gap: 4px; padding: 4px; margin: 8px 0 6px; background: #26262f; border: 1px solid var(--line); border-radius: 999px; }
.body-seg .seg-btn { height: 38px; border: none; border-radius: 999px; background: transparent; color: var(--muted); }
.body-seg .seg-btn.on { background: #434455; color: var(--text); border: none; }

/* results: actions + grouped stat lists */
.results-actions { display: flex; gap: 10px; margin: 2px 0 6px; }
.results-actions .btn { height: 46px; }
.results-actions .btn-primary { flex: 1; }
.results-sec { font-size: 1.05rem; font-weight: 800; font-style: italic; margin: 14px 2px 2px; }
/* the Overall Strength heading is also the way into its page */
.results-sec-link { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 4px); background: none; border: none; padding: 0; color: var(--text); text-align: left; }
.sec-chev { color: var(--accent); font-size: 1.4rem; font-style: normal; line-height: 1; padding: 0 4px; }
.results-group { margin-top: 10px; }
.results-group-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 2px 6px; }
.stat-rows { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px; background: none; border: none; border-top: 1px solid var(--line); color: var(--text); text-align: left; }
.stat-row:first-child { border-top: none; }
.stat-row:active { background: var(--card-2); }
.stat-row-name { font-size: 0.95rem; font-weight: 600; }
.stat-row-right { display: flex; align-items: center; gap: 8px; }
.stat-row-val { font-size: 0.92rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-row-add { font-size: 0.85rem; color: var(--accent); }
.chev { color: var(--muted); font-size: 1.2rem; line-height: 1; }

/* stat detail screen */
.stat-hero { padding: 8px 2px 4px; }
.stat-hero-val { font-size: 2.6rem; font-weight: 800; font-style: italic; line-height: 1; }
.stat-unit { font-size: 1rem; color: var(--muted); font-weight: 600; font-style: normal; }
.stat-when { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.stat-history { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stat-hrow { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.stat-hrow:first-child { border-top: none; }
.stat-hrow-v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Results: Overall Strength, per-muscle rows, focus lift cards */
.str-hero { display: flex; align-items: center; gap: 14px; padding: 2px 2px 6px; }
.str-big { font-size: 3.2rem; font-weight: 800; font-style: italic; line-height: 1; min-width: 1.4em; }
.ss-bars svg { display: block; width: 170px; height: 46px; }
.ss-on { fill: var(--accent); }
.ss-off { fill: var(--card-2); }
.str-hint { margin: 0 2px 4px; }
.str-note { display: flex; flex-direction: column; gap: 10px; }
.str-note p { margin: 0; }
.str-group { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 8px; }
.str-ghead { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px 8px; background: var(--card-2); }
.str-gname { font-size: 0.95rem; font-weight: 800; }
.str-gscore { font-size: 1rem; font-weight: 800; font-style: italic; }
.str-unit { font-size: 0.66rem; letter-spacing: 0.05em; color: var(--muted); font-style: normal; font-weight: 700; }
.str-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; background: none; border: none; border-top: 1px solid var(--line); color: var(--text); text-align: left; }
.str-row:active { background: var(--card-2); }
.str-row-l { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.str-name { font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.str-score { font-size: 1.6rem; font-weight: 800; font-style: italic; line-height: 1.1; }
.str-lock { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.spark { flex: 0 0 120px; height: 26px; }
.spark svg { display: block; width: 120px; height: 26px; }
.spark-line { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.spark-dot { fill: var(--muted); }
.spark-dot.last { fill: var(--accent); }
.orm-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -12px; padding: 2px 12px 6px; scrollbar-width: none; }
.orm-cards::-webkit-scrollbar { display: none; }
.orm-card { flex: 0 0 82%; scroll-snap-align: center; text-align: left; color: var(--text); background: rgba(240,136,62,0.08); border: 1px solid rgba(240,136,62,0.22); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.orm-card-name { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; background: linear-gradient(90deg, #f5d76e, #f0883e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.orm-card-sub { font-size: 0.82rem; color: var(--muted); }
.orm-card-val { font-size: 2.4rem; font-weight: 800; font-style: italic; line-height: 1.1; margin: 4px 0 6px; }
.orm-unit { font-size: 0.8rem; color: var(--muted); font-weight: 600; font-style: normal; }
.orm-card .spark, .orm-card .spark svg { width: 100%; flex-basis: auto; height: 40px; }
.orm-card .spark-dot.last { fill: #f0883e; }
.orm-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.orm-about { line-height: 1.4; }

/* measurement entry + profile modal fields */
.body-fields { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 46vh; overflow-y: auto; }
.body-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.9rem; }
.body-field-name { color: var(--muted); }
.body-field input, .body-field .body-select { width: 130px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 12px; text-align: right; font-size: 1rem; }
.body-field .body-select { text-align: left; }
.body-field input:focus, .body-field .body-select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* recovery: stat headers */
.rec-stats { display: flex; gap: 10px; padding: 10px 4px 2px; }
.rec-stat { flex: 1; text-align: center; }
.rec-stat-n { font-size: 2.7rem; font-weight: 800; font-style: italic; line-height: 1; }
.rec-stat-l { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 8px; line-height: 1.35; }

/* recovery: single anatomical figure (real SVG, img/front.svg + img/back.svg) */
.rec-figbox { position: relative; display: flex; justify-content: center; padding: 6px 0 4px; }
.rec-figwrap { display: flex; justify-content: center; width: 100%; }
.rec-figwrap svg { height: min(54vh, 540px); width: auto; max-width: 94%; display: block; }
.rec-figwrap svg .st0, .rec-figwrap svg .sil { fill: #2b3140; }
.rec-figwrap svg .st1 { transition: fill 0.2s; }
.rec-flip { position: absolute; left: 8px; bottom: 10px; width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); display: flex; align-items: center; justify-content: center; }
.flip-ic { display: flex; }

/* muscle detail screen */
.msc-status { color: var(--muted); font-size: 0.85rem; padding: 6px 2px 4px; }
.msc-lift { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.msc-tile { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 12px; background: linear-gradient(145deg, var(--card-2), var(--bg-2)); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; border: 1px solid var(--line); }
.msc-ago { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.msc-name { font-weight: 700; font-size: 1rem; margin-top: 1px; }
.msc-sets { font-size: 0.8rem; color: var(--muted); margin-top: 1px; }

/* Recovery: FRESH MUSCLE GROUPS opens the Muscle Recovery list */
.rec-stat-btn { background: none; border: none; color: var(--text); font: inherit; padding: 4px 0; border-radius: 12px; }
.rec-stat-btn:active { background: var(--card-2); }
.rl-sec { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rl-sec-t { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); padding: 0 2px; }
.rl-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rl-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; background: none; border: none; border-top: 1px solid var(--line); color: var(--text); text-align: left; }
.rl-row:first-child { border-top: none; }
.rl-row:active { background: var(--card-2); }
.rl-thumb { width: 34px; height: 52px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.rl-thumb svg { width: 100%; height: 100%; display: block; }
.rl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rl-name { font-weight: 700; font-size: 0.98rem; }
.rl-sub { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-pct { font-size: 1.15rem; font-weight: 800; font-style: italic; }

/* ===================================================================
   TARGETS tab — weekly Push/Pull/Legs set goals
   =================================================================== */
.tg-head { padding: 10px 2px 2px; }
.tg-head .subtitle { margin-top: 4px; }

/* hexagon progress ring */
.tg-ring { position: relative; display: flex; justify-content: center; padding: 8px 0 14px; }
.hexsvg { width: min(64vw, 240px); height: auto; display: block; }
.hex-track { fill: none; stroke: #222b3b; stroke-width: 11; stroke-linejoin: round; }
.hex-prog { fill: none; stroke: url(#hexg); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.tg-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.3rem; font-weight: 800; font-style: italic; }

/* group rows */
.tg-list { display: flex; flex-direction: column; gap: 10px; }
.tg-group { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tg-grow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; background: none; border: none; color: var(--text); text-align: left; }
.tg-grow:active { background: var(--card-2); }
.tg-hex { display: flex; flex: 0 0 auto; }
.hexmini { width: 26px; height: 25px; display: block; }
.hm-track { fill: none; stroke: #2a3140; stroke-width: 3; stroke-linejoin: round; }
.hm-prog { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tg-gmain { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tg-gname { font-weight: 700; font-size: 1rem; }
.tg-gsets { font-size: 0.8rem; color: var(--muted); }
.tg-togo { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; font-weight: 800; font-style: italic; font-size: 1.05rem; }
.tg-togo-l { font-size: 0.6rem; color: var(--muted); font-weight: 600; font-style: normal; text-transform: uppercase; letter-spacing: 0.04em; }
.tg-grdone { color: var(--green); font-weight: 800; font-size: 1.2rem; }
.tg-chev { color: var(--muted); font-size: 1.2rem; line-height: 1; transition: transform 0.2s; }
.tg-chev.open { transform: rotate(90deg); }

/* per-muscle breakdown */
.tg-muscles { border-top: 1px solid var(--line); }
.tg-mrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; background: none; border: none; border-top: 1px solid var(--line); color: var(--text); text-align: left; }
.tg-mrow:first-child { border-top: none; }
.tg-mrow:active { background: var(--card-2); }
.tg-mcheck { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 999px; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; color: transparent; }
.tg-mcheck.on { background: var(--amber); border-color: var(--amber); color: #1a1205; }
.tg-mname { flex: 1; font-size: 0.92rem; font-weight: 600; }
.tg-msets { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tg-mtogo { font-size: 0.7rem; color: var(--muted); min-width: 52px; text-align: right; }
.tg-foot { color: var(--muted); font-size: 0.72rem; padding: 8px 14px 12px; margin: 0; }

/* past weeks: a row of small rings under the group cards */
.tg-hist { display: flex; justify-content: space-between; gap: 8px; padding: 4px 2px 8px; }
.tg-hcell { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tg-hring { position: relative; width: 60px; height: 56px; }
.hexhist { width: 60px; height: 56px; display: block; }
.hh-track { fill: none; stroke: #222b3b; stroke-width: 5; stroke-linejoin: round; }
.hh-prog { fill: none; stroke: url(#hexgh); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.tg-hpct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 800; font-style: italic; }
.tg-hdate { font-size: 0.75rem; color: var(--muted); }

/* edit-target stepper */
.target-stepper { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 4px; }
.step-btn { width: 50px; height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 1.5rem; }
.target-stepper input { width: 92px; height: 50px; text-align: center; font-size: 1.4rem; font-weight: 800; font-style: italic; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.target-stepper input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* ===================================================================
   LOG tab — stats, calendar, past-workout history
   =================================================================== */
.log-title { padding: 8px 2px 2px; }
.log-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 4px; }
.log-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 4px; text-align: center; }
.log-stat-n { font-size: 1.4rem; font-weight: 800; font-style: italic; line-height: 1; }
.log-stat-l { font-size: 0.54rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.log-sec { font-size: 1.05rem; font-weight: 800; font-style: italic; margin: 16px 2px 2px; }

/* calendar */
.cal { padding: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-month { font-weight: 700; font-size: 0.95rem; }
.cal-nav { width: 36px; height: 32px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 9px; color: var(--text); font-size: 1.1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { margin-bottom: 4px; }
.cal-dowc { text-align: center; font-size: 0.66rem; color: var(--muted); padding: 2px 0; }
/* Fitbod: the date in gray, white on a trained day, with the minutes in green under it */
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 0.82rem; border-radius: 9px; color: var(--muted); background: none; border: none; padding: 0; }
.cal-cell.empty { background: none; }
.cal-cell.has { color: #fff; font-weight: 700; }
.cal-cell.has:active { background: var(--card-2); }
.cal-cell.today { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.cal-min { font-size: 0.62rem; font-weight: 700; color: var(--green); line-height: 1; }

/* past workouts list: date line, card (title, 3 stats), lift names under it */
.log-sec-row { display: flex; align-items: flex-end; justify-content: space-between; }
.pw-add { width: 36px; height: 32px; border: none; background: none; color: var(--accent); font-size: 1.7rem; font-weight: 600; line-height: 1; padding: 0; }
.pw-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; border-left: 2px solid var(--line); padding-left: 12px; margin-left: 4px; }
.pw-item { position: relative; }
.pw-item::before { content: ''; position: absolute; left: -17px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pw-head { display: flex; justify-content: space-between; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; color: var(--muted); margin: 0 2px 6px; }
.pw-dur { letter-spacing: 0; font-weight: 600; }
.pw-card { display: block; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--text); text-align: left; overflow: hidden; cursor: pointer; }
.pw-card:active { background: var(--card-2); }
.pw-top { display: flex; align-items: center; gap: 12px; padding: 10px 6px 4px 12px; }
.pw-tile { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: linear-gradient(145deg, var(--card-2), var(--bg-2)); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; border: 1px solid var(--line); }
.pw-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1rem; }
.pw-more { width: 40px; height: 36px; flex: 0 0 auto; border: none; background: none; color: var(--muted); font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; }
.pw-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 0 10px; }
.pw-stat { padding: 0 12px; border-left: 1px solid var(--line); }
.pw-stat:first-child { border-left: none; }
.pw-stat-l { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em; color: var(--muted); }
.pw-stat-v { font-size: 0.95rem; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.pw-names { background: var(--card-2); color: var(--muted); font-size: 0.76rem; padding: 7px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* weekly goal stat opens the streak sheet */
.log-stat-btn { color: var(--text); font: inherit; }
.log-stat-btn:active { background: var(--card-2); }

/* milestone badges */
.ms { padding: 12px; margin-top: 8px; }
.ms-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ms-t { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.ms-sub { font-size: 0.72rem; color: var(--muted); }
.ms-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.ms-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; border: none; background: none; padding: 0; color: var(--muted); }
.ms-hex { width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--line); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); position: relative; }
.ms-hex::after { content: ''; position: absolute; inset: 2px; background: var(--bg-2); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.ms-n { position: relative; z-index: 1; font-weight: 800; font-style: italic; font-size: 0.88rem; }
.ms-l { font-size: 0.56rem; letter-spacing: 0.02em; }
.ms-badge.got { color: var(--text); }
.ms-badge.got .ms-hex { background: var(--accent); }
.ms-badge.got .ms-hex::after { display: none; }
.ms-badge.got .ms-n { color: #fff; }

/* "Unlock your streak" sheet */
.streak-sheet { position: relative; text-align: center; padding-top: 26px; background: linear-gradient(180deg, #23243a, var(--bg-2) 70%); }
.st-x { position: absolute; left: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--card); color: var(--text); font-size: 0.95rem; }
.sheet .st-title { font-size: 1.6rem; font-weight: 800; font-style: italic; margin: 8px 0 6px; }
.st-goal { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; color: var(--accent-2); }
.st-big { width: 88px; height: 98px; margin: 18px auto 12px; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--card-2); border: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.st-big.on { background: var(--accent); color: #fff; }
.st-sub { color: var(--muted); font-size: 0.86rem; margin: 0 0 14px; }
.st-row { display: flex; justify-content: center; gap: 10px; margin-bottom: 6px; }
.st-hex { width: 30px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; color: var(--muted); background: var(--card-2); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.st-hex.on { background: #fff; color: var(--bg); }

/* "+" add a past workout */
.add-past-date { display: block; width: 100%; height: 48px; margin: 6px 0 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 1.05rem; padding: 0 12px; color-scheme: dark; }

/* past-workout detail */
.ses-hero { padding: 6px 2px 4px; }
.ses-date { color: var(--muted); font-size: 0.82rem; margin: 4px 0 0; }
.ses-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 6px; }
.ses-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 4px; text-align: center; }
.ses-stat-n { font-size: 1.3rem; font-weight: 800; font-style: italic; line-height: 1; }
.ses-stat-l { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-top: 6px; }
.ses-ex { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ses-ex-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ses-ex-name { font-weight: 700; font-size: 1rem; }
.ses-pr { font-size: 0.72rem; font-weight: 700; color: var(--amber); flex: 0 0 auto; }
.ses-sets { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ses-set { display: flex; gap: 10px; font-size: 0.9rem; }
.ses-set-n { width: 18px; text-align: center; color: var(--muted); }
.ses-note { margin-top: 8px; font-size: 0.84rem; color: var(--muted); font-style: italic; }


/* ---------- collapsible sections + session CTA (Fitbod list layout) ---------- */
/* Cardio and warm-up collapse to a single row so the exercise list is what you
   see first. Flat rows with a divider, not nested cards. */
.fold { border-bottom: 1px solid var(--line); }
.fold-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: none; border: none; padding: 13px 2px; text-align: left;
  font-size: 1.02rem; font-weight: 700; color: var(--text); min-height: var(--tap);
}
.fold-label { display: flex; align-items: center; gap: 8px; }
.fold-caret { color: var(--muted); font-size: 1.1rem; line-height: 1; }
.fold-body { padding: 0 0 12px; }
.fold-body > .card, .fold-body > .cardio { background: none; border: none; padding: 0; margin: 0; }

/* bottom action bar — Start Workout, then Finish & Save once running */
.cta-bar { position: sticky; bottom: calc(var(--navh) + var(--navb) + 6px); padding: 10px 0 4px; background: linear-gradient(180deg, transparent, var(--bg-2) 45%); z-index: 15; }
.cta { height: 58px; border-radius: 999px; font-size: 1.2rem; font-weight: 800; font-style: italic; letter-spacing: 0.01em; }

/* custom checkboxes — the default square ones read as a web form next to the hex set badges */
.warmup input[type="checkbox"], .cardio-done input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; flex: 0 0 auto;
  border: 2px solid var(--line); border-radius: 7px; background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; margin: 0;
}
.warmup input[type="checkbox"]:checked, .cardio-done input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.warmup input[type="checkbox"]:checked::after, .cardio-done input[type="checkbox"]:checked::after {
  content: '✓'; color: #fff; font-size: 0.85rem; font-weight: 900; line-height: 1;
}

/* ---------- press-and-hold drag reorder ---------- */
/* The lifted row floats above its neighbours; the rest shift under it. */
.lift-row.dragging {
  position: relative; z-index: 40;
  background: var(--card-2); border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.6);
  transform-origin: center;
  transition: box-shadow 120ms ease, background 120ms ease;
}
.lift-row.dragging::before { opacity: 0; }        /* hide the timeline rail while floating */
.lift-row:not(.dragging) { transition: transform 140ms ease; }
/* while reordering: no text selection, no scrolling, no accidental taps */
body.reordering { user-select: none; -webkit-user-select: none; }
body.reordering .lift-row { touch-action: none; }
body.reordering .lift-menu { pointer-events: none; }
/* iOS: a long press on a row would otherwise raise the selection/"Save Image"
   callout before our hold timer fires. Suppress it on the row itself, not just
   while reordering — by the time body.reordering lands, iOS has already acted. */
.lift-row, .lift-row * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.lift-tile-img { pointer-events: none; }
/* .screen-body is a flex column, so without this the button gets shrunk by the layout
   once the session is long enough to overflow. */
.ses-share { margin: 22px 0 8px; flex: 0 0 auto; }

/* Fitbod parity, 2026-10-28: phase card, Log All Sets, plate calculator */
.phase-panel { background: rgba(23,137,252,0.10); border: 1px solid rgba(23,137,252,0.28); border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.phase-title { font-weight: 800; color: var(--accent); }
.phase-text { margin: 4px 0 0; color: var(--text); font-size: 0.95rem; }
.logall { margin-top: 12px; font-weight: 800; }
.plate-bar { text-align: center; margin: -6px 0 10px; }
.plate-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.plate-set { color: var(--muted); white-space: nowrap; }
.plate-out { font-weight: 700; text-align: right; }
.plate-try { width: 100%; margin-top: 14px; font-size: 16px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.plate-try-out { text-align: center; min-height: 1.4em; margin-top: 10px; }

/* ---------- lift screen, Fitbod layout (2026-10-28) ---------- */
/* reps box left, weight box right; the row "Log Set" logs next floats its labels in the border */
.setblock { display: flex; flex-direction: column; gap: 12px; }
.setfield { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setfield .setbox { width: 100%; height: 52px; background: var(--card); border-color: transparent; }
.setfield-l { display: none; position: absolute; top: -8px; left: 12px; padding: 0 5px; background: var(--bg); color: var(--muted); font-size: 0.72rem; font-weight: 600; line-height: 1.2; z-index: 1; }
.setrow.next .setfield-l { display: block; }
.setrow.next .setfield .setbox { background: transparent; border: 1.5px solid var(--text); }
.setrow.done .setfield .setbox { background: transparent; border-color: var(--line); }
.setfield-cap { align-self: flex-start; background: none; border: none; color: var(--muted); font-size: 0.74rem; padding: 4px 0 0 14px; }
.setrow { align-items: flex-start; }
.setrow .hexbadge { margin-top: 5px; width: 30px; height: 34px; font-size: 0.9rem; }
.warmbox { display: flex; align-items: center; }
.warmbox.planned { color: var(--muted); font-style: normal; }
.setrow.warmrow { opacity: 1; }
.setrow.warmrow.done { opacity: 0.55; }
.hexbadge.warm { background: var(--card-2); color: var(--text); font-style: normal; }
.setblock-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.lift-scheme { margin-top: 10px; }

/* the fixed bottom bar */
.lift-bar { display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.lift-bar[hidden], body.keypadding .lift-bar { display: none; }
.lift-bar-all { flex: 0 0 auto; height: 50px; padding: 0 20px; border-radius: 999px; border: none; background: var(--card); color: var(--text); font-weight: 800; font-style: italic; font-size: 0.98rem; font-family: inherit; }
.lift-bar-set { flex: 1; height: 50px; border-radius: 999px; border: none; background: var(--accent); color: #fff; font-weight: 800; font-style: italic; font-size: 1.05rem; font-family: inherit; }
.lift-bar-all:active, .lift-bar-set:active { filter: brightness(0.9); }

/* "··· More" sheet */
.more-item { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); color: var(--text); font-size: 1.02rem; font-weight: 600; padding: 15px 4px; font-family: inherit; }
.sheet .btn.block { margin-top: 12px; width: 100%; }

/* How-To page */
.howto-screen { overflow-y: auto; }
.howto-hero { position: relative; flex: 0 0 auto; height: 42vh; min-height: 240px; background: var(--card-2) center / cover no-repeat; overflow: hidden; }
.howto-hero .lift-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.howto-back { position: absolute; z-index: 2; top: calc(env(safe-area-inset-top) + 12px); left: 14px; width: 42px; height: 42px; border-radius: 999px; border: none; background: rgba(0,0,0,0.45); color: var(--text); font-size: 1.2rem; }
.howto-body { padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); }
.howto-title { font-size: 2rem; font-style: italic; font-weight: 800; line-height: 1.1; margin: 0; }
.howto-aka { color: var(--muted); font-size: 0.98rem; margin: 6px 0 0; }
.howto-tabs { margin: 16px 0 6px; }
.howto-step { font-size: 1.02rem; line-height: 1.5; margin: 14px 0 0; }
.howto-h { color: var(--muted); font-size: 0.98rem; font-weight: 600; margin: 22px 0 6px; }
.howto-row { display: flex; align-items: center; gap: 16px; width: 100%; background: none; border: none; border-bottom: 1px solid var(--line); color: var(--text); font-size: 1.05rem; font-weight: 700; padding: 10px 0; text-align: left; font-family: inherit; }
.howto-ic { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 12px; background: #23252f; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.howto-ic.eq { font-size: 1.4rem; }
.howto-search { display: inline-block; margin-top: 16px; font-weight: 700; }
.howto-pane .tip { margin-top: 8px; }
/* while the rest timer is docked, lift the whole screen (bar included) above it, so
   "Log Set" stays tappable during the rest */
body.resting:not(.keypadding) .lift-screen { padding-bottom: calc(var(--dock-pad, calc(264px + env(safe-area-inset-bottom))) - 16px); }
body.resting .lift-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
body.resting .lift-bar { padding-bottom: 10px; }
/* warm-up rows in amber with their own heading, so they never read as working sets */
.sets-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 4px 0 -2px; }
.sets-label.warm { color: var(--amber); }
.hexbadge.warm { background: var(--amber-bg); color: var(--amber); }
.warmbox, .warmbox.planned { color: var(--amber); }
.setrow.warmrow.next .setfield .setbox { border-color: var(--amber); }
.setrow.warmrow .setfield-l { color: var(--amber); }

/* ---------- batch 2 (2026-10-28): Fitbod's lift-screen extras ---------- */
/* rest card: Working | Warm-up, then a wheel in 5-second steps (RW_ROW = 40px in app.js) */
.rest-pick { margin: 4px 0 10px; }
.rest-seg { padding: 0 0 10px; }
.rest-wheel-wrap { position: relative; height: 200px; border-radius: 12px; background: var(--bg); overflow: hidden; }
.rw-band { position: absolute; left: 10px; right: 10px; top: 80px; height: 40px; border-radius: 10px; background: var(--card); pointer-events: none; }
.rest-wheel { position: relative; height: 200px; overflow-y: auto; scroll-snap-type: y mandatory; scroll-padding: 80px 0; padding: 80px 0; box-sizing: border-box; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.rest-wheel::-webkit-scrollbar { display: none; }
.rw-item { height: 40px; line-height: 40px; text-align: center; scroll-snap-align: start; color: var(--muted); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.rw-item.on { color: var(--text); font-weight: 700; font-size: 1.3rem; }

/* swipe a set left for Delete */
.setswipe { position: relative; }
.setswipe > .setrow { position: relative; z-index: 1; background: var(--bg); touch-action: pan-y; }
.set-del { position: absolute; top: 2px; right: 0; bottom: 2px; width: 84px; border: none; border-radius: 12px; background: #e5484d; color: #fff; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; visibility: hidden; }
.setswipe.open .set-del { visibility: visible; }
.undo-toast { display: flex; align-items: center; gap: 14px; pointer-events: auto; padding: 6px 8px 6px 16px; z-index: 81; bottom: calc(150px + env(safe-area-inset-bottom)); }
.undo-btn { background: none; border: none; color: var(--accent-2); font-weight: 700; font-size: 0.85rem; padding: 6px 8px; }

/* History: his "Rate Your Last Set" answer beside the date */
.hist-date { display: flex; align-items: center; gap: 8px; }
.hist-rir { background: #f3ead2; color: #1a1205; border-radius: 999px; padding: 2px 9px; font-size: 0.72rem; font-weight: 700; }
.chart .bar { fill: var(--accent-dim); }
.chart .bar.last { fill: var(--accent); }

/* Replace list: times logged, and the browse rows */
.lib-row-count { margin-left: auto; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; padding-left: 8px; }
.lib-browse { justify-content: space-between; }
.lib-browse-go { color: var(--muted); font-size: 1.3rem; line-height: 1; }

/* ---------- supersets / circuits (fix list 3, item 6) ---------- */
.day-head-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.day-dots { width: 40px; height: 40px; border: none; background: none; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.ss-group { position: relative; margin: 6px 0 4px; }
.ss-group::before { content: ''; position: absolute; left: 6px; top: 46px; bottom: 26px; width: 2px; border-radius: 2px; background: var(--accent); opacity: 0.7; }
.ss-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 0; }
.ss-title { font-weight: 700; color: var(--muted); font-size: 1rem; }
.ss-title::before { content: '↻ '; color: var(--accent); }
.lift-group { position: absolute; top: calc(env(safe-area-inset-top) + 12px); left: 14px; z-index: 2; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,0.35); color: var(--text); font-size: 1rem; font-weight: 700; }
.lift-group[hidden] { display: none; }
.group-screen { z-index: 58; }
.gb-head { display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top) + 16px) 16px 8px; }
.gb-cancel { background: none; border: none; color: #ff7a7a; font-size: 1.05rem; font-weight: 600; padding: 6px 0; }
.gb-title { font-weight: 700; font-size: 1.05rem; }
.gb-note { color: var(--muted); font-size: 0.85rem; margin: 0 16px 6px; }
.gb-list { flex: 1; overflow-y: auto; padding: 0 16px 110px; -webkit-overflow-scrolling: touch; }
.gb-row { display: flex; align-items: center; gap: 16px; width: 100%; background: none; border: none; border-bottom: 1px solid var(--line); color: var(--text); text-align: left; padding: 14px 0; }
.gb-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gb-name { font-weight: 700; font-size: 1.02rem; }
.gb-sum { color: var(--muted); font-size: 0.88rem; }
.gb-box { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 7px; border: 2px solid var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.gb-row.on .gb-box { background: var(--text); border-color: var(--text); }
.gb-row.on .gb-box::after { content: '✓'; color: var(--bg); font-weight: 800; }
.gb-none { padding: 16px 0; }
.gb-bar { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 18px); }
.gb-bar .btn { min-width: 150px; height: 54px; border-radius: 999px; font-size: 1.1rem; font-weight: 800; }
.gb-bar .btn:disabled { opacity: 0.4; }
.gs-sub { color: var(--muted); margin: 2px 0 12px; }
.gs-opt { margin-bottom: 8px; background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.gs-opt.on { border-color: var(--accent); }
