/* IRON HOME — app styles. Dark only. Tokens first, then base, components, screens. */

:root {
  /* neutral layers — spaced further apart so nested things read as separate */
  --bg: #060608;
  --s1: #17171d;
  --s2: #1e1e26;
  --s3: #292932;
  --well: #08080b;     /* darker inset for lists inside cards */
  --zebra: #101015;    /* alternate row inside a well */
  --line: #30303a;
  --line-soft: rgba(255, 255, 255, 0.06);
  /* zones: what a section is for — background / border / accent */
  --z-info: #131a23;  --z-info-b: #26323f;  --z-info-a: #9cc0e6;
  --z-act: #1e1510;   --z-act-b: #4a2d1f;   --z-act-a: #ff8a3d;
  --z-prog: #101c15;  --z-prog-b: #22412e;  --z-prog-a: #3ddc84;
  --z-rest: #0f1a2b;  --z-rest-b: #2b4a78;  --z-rest-a: #5aa2ff;
  --z-gold: #1d1a0f;  --z-gold-b: #4a3f1a;  --z-gold-a: #ffc145;
  /* workout-type colours (data-tone) */
  --t-push: #ff8a3d;
  --t-pull: #5aa2ff;
  --t-legs: #3ddc84;
  --t-upper: #ffc145;
  --t-full: #b48cff;
  --t-mob: #2ec4b6;
  --text: #f5f5f7;
  --mute: #b9b9c5;
  --dim: #9595a3;
  --acc: #ff4d2a;
  --acc2: #ff8a3d;
  --acc-d: rgba(255, 77, 42, 0.14);
  --ok: #3ddc84;
  --ok-d: rgba(61, 220, 132, 0.14);
  --blue: #5aa2ff;
  --warn: #ffb020;
  --danger: #ff6464;
  --r: 18px;
  --r-s: 12px;
  --f-d: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --f-c: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-b: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --maxw: 520px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--f-b); font-size: 16px; line-height: 1.4; color: var(--text); background: var(--bg);
  min-height: 100dvh; overscroll-behavior: none; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
body.in-player, body.in-onboard, body.has-sheet { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; text-align: inherit; }
button:disabled, [aria-disabled='true'] { opacity: 0.4; pointer-events: none; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; background: none; border: 0; outline: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--acc2); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex-shrink: 0; vertical-align: middle; }
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ── type ─────────────────────────────────────────────── */
.display { font-family: var(--f-d); font-weight: 400; letter-spacing: 0.02em; line-height: 0.95; text-transform: uppercase; }
.h0 { font-size: 40px; } .h1 { font-size: 38px; } .h2 { font-size: 28px; }
.label { font-family: var(--f-c); font-weight: 700; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.label.acc, .acc { color: var(--acc2); }
.label.sect { margin: 22px 0 10px; }
.label.month { padding: 14px 4px 6px; }
.muted { color: var(--mute); } .dim { color: var(--dim); } .small { font-size: 14px; }
.warn { color: var(--warn); }
.lead { font-size: 18px; color: var(--mute); }

/* ── shell ────────────────────────────────────────────── */
.app {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100dvh;
  max-width: var(--maxw); margin: 0 auto; background: var(--bg); position: relative;
  padding-top: var(--sat);
}
@media (min-width: 560px) { .app { border-inline: 1px solid var(--line); } }
.appbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 18px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #0a0a0c; background: linear-gradient(135deg, var(--acc), var(--acc2)); }
.brand-t { font-family: var(--f-d); font-size: 25px; letter-spacing: 0.14em; line-height: 1; }
.brand-t em { font-style: normal; color: var(--acc); }
.view { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-padding-bottom: 24px; outline: 0; }
.page { padding: 8px 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.page-head { padding: 4px 2px 0; }
.page-head .h0 { margin-top: 4px; }

.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(18, 18, 22, 0.94); backdrop-filter: blur(14px); padding-bottom: var(--sab); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; color: var(--dim); font-family: var(--f-c); font-weight: 700; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.15s; }
.tab.on { color: var(--acc2); }
.tab.on::before { content: ''; position: absolute; top: 0; width: 30px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.tab:active { transform: scale(0.94); }

/* ── buttons & controls ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px;
  font-family: var(--f-c); font-weight: 800; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center;
  background: var(--s3); color: var(--text); border: 1px solid var(--line); transition: transform 0.1s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #0a0a0c; border-color: transparent; box-shadow: 0 6px 22px rgba(255, 77, 42, 0.28); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:not(.ghost) { background: var(--danger); color: #0a0a0c; border-color: transparent; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.lg { min-height: 56px; font-size: 19px; }
.btn.xl { min-height: 64px; font-size: 21px; border-radius: 18px; }
.btn.block, .block { width: 100%; }
.grow { flex: 1; min-width: 0; }
.link { min-height: 44px; padding: 0 12px; color: var(--mute); font-family: var(--f-c); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.link.block { display: flex; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; color: var(--mute); transition: background 0.15s, transform 0.1s; flex-shrink: 0; }
.icon-btn:active { background: var(--s3); transform: scale(0.93); }
.icon-btn.sm { width: 40px; height: 40px; }
.ghost-spacer { visibility: hidden; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--s2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--mute); }
.chip.up { color: var(--ok); background: var(--ok-d); border-color: rgba(61, 220, 132, 0.3); }
.btn-chip { min-height: 40px; padding: 0 14px; }
.btn-chip.on { color: #0a0a0c; background: var(--acc2); border-color: transparent; }
.chips[role='group'] { overflow-x: auto; flex-wrap: nowrap; margin: 10px 0 4px; padding-bottom: 2px; }
.chips[role='group'] .chip { flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--acc-d); color: var(--acc2); font-family: var(--f-c); font-weight: 800; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }

.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-align: left; }
.card.flat { background: var(--s2); border-radius: var(--r-s); padding: 12px 14px; }
button.card { width: 100%; }
button.card:active { background: var(--s2); }
.bar { height: 8px; border-radius: 99px; background: var(--s3); overflow: hidden; margin: 14px 0; }
.bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--acc), var(--acc2)); transition: width 0.3s; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field input, .search input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r-s); background: var(--s2); border: 1px solid var(--line); font-size: 17px; }
.field input:focus, .search input:focus { border-color: var(--acc2); }
.search { position: relative; display: block; }
.search .ic { position: absolute; left: 14px; top: 16px; color: var(--dim); }
.search input { padding-left: 42px; }
.count { font-size: 14px; padding: 8px 2px 4px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); }
.seg-btn { min-height: 44px; border-radius: 10px; text-align: center; font-family: var(--f-c); font-weight: 800; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.seg-btn.on { background: var(--acc2); color: #0a0a0c; }
.switch { width: 54px; height: 32px; border-radius: 99px; background: var(--s3); border: 1px solid var(--line); position: relative; flex-shrink: 0; transition: background 0.2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--mute); transition: transform 0.2s, background 0.2s; }
.switch.on { background: var(--ok-d); border-color: var(--ok); }
.switch.on span { transform: translateX(22px); background: var(--ok); }

/* ── lists ────────────────────────────────────────────── */
.sect-head { margin: 10px 2px 8px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: var(--r-s); background: var(--s1); border: 1px solid var(--line); text-align: left; transition: background 0.12s, transform 0.1s; }
button.li:active { background: var(--s2); transform: scale(0.99); }
.li.static { pointer-events: none; }
.li.danger { color: var(--danger); }
.li.preset.cur { border-color: var(--acc2); }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.li-t { font-family: var(--f-c); font-weight: 800; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.15; }
.li-sub { font-size: 14px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-sub.wrap { white-space: normal; }
.li-end { color: var(--dim); display: inline-flex; }
.li-num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--acc-d); color: var(--acc2); font-family: var(--f-d); font-size: 20px; flex-shrink: 0; }
.li-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--s3); color: var(--mute); flex-shrink: 0; }
.li-ic.pr { background: var(--acc-d); color: var(--acc2); }
.li-date { width: 44px; text-align: center; display: flex; flex-direction: column; line-height: 1; gap: 2px; flex-shrink: 0; }
.li-date .display { font-size: 28px; }
.li-row { display: flex; align-items: stretch; gap: 8px; }
.li-row .li { flex: 1; min-width: 0; }
.li-row.next .li { border-color: rgba(255, 138, 61, 0.5); }
.reorder { display: flex; gap: 2px; align-items: center; }
.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px; }
.empty-ic { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: var(--acc-d); color: var(--acc2); }

/* ── today ────────────────────────────────────────────── */
.week { display: flex; gap: 16px; align-items: center; }
.wk-ring { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.wk-ring svg { transform: rotate(-90deg); display: block; }
.ring-bg { fill: none; stroke: var(--s3); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--acc); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.3s linear, stroke 0.2s; }
.ring-fg.met { stroke: var(--ok); }
.ring-fg.warn { stroke: var(--danger); }
.ring-fg.hold { stroke: var(--blue); }
.wk-ring-n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.wk-ring-n .display { font-size: 32px; }
.wk-main { flex: 1; min-width: 0; }
.wk-title { font-family: var(--f-c); font-weight: 800; font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase; }
.streak { color: var(--acc2); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.wk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.wk-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--f-c); font-weight: 700; font-size: 12px; color: var(--dim); }
.wk-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #0a0a0c; }
.wk-day.hit .wk-dot { background: var(--ok); border-color: var(--ok); }
.wk-day.today .wk-dot { border-color: var(--acc2); }
.wk-day.today { color: var(--text); }

.hero { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(160deg, #1c1411, var(--s1) 60%); border-color: #3a2a24; }
.hero .h1 { margin-top: 2px; }
.hero .btn { margin-top: 14px; }
.active-hero { border-color: rgba(255, 138, 61, 0.5); }
.ex-prev { margin-top: 10px; border-top: 1px solid var(--line); }
.ex-prev li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 16px; }
.ex-prev-n { font-weight: 600; }
.ex-prev-s { color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.last { display: flex; align-items: center; gap: 12px; }
.last-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--ok-d); color: var(--ok); display: grid; place-items: center; flex-shrink: 0; }

/* ── progress ─────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { text-align: left; }
.stat.card { padding: 14px 16px; }
.stat-n { font-family: var(--f-d); font-size: 40px; line-height: 1; letter-spacing: 0.02em; }
.stat-n small { font-size: 20px; margin-left: 4px; color: var(--mute); }
.stat-n.sm { font-size: 24px; padding-top: 6px; }
.sum-grid, .hist-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.hist-stats { grid-template-columns: repeat(3, 1fr); margin: 14px 0; }
.sum-grid .stat, .hist-stats .stat { background: var(--s2); border-radius: var(--r-s); padding: 10px 6px; text-align: center; }
.sum-grid .stat-n { font-size: 28px; }
.heat { display: flex; gap: 8px; margin-top: 12px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; font-family: var(--f-c); font-weight: 700; font-size: 11px; color: var(--dim); padding: 0; align-items: center; }
.heat-grid { flex: 1; display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; }
.heat-col { display: grid; gap: 4px; }
.heat-cell { aspect-ratio: 1; border-radius: 4px; background: var(--s3); }
.heat-cell.l1 { background: #8a3a28; }
.heat-cell.l2 { background: var(--acc); }
.heat-cell.l3 { background: var(--acc2); box-shadow: 0 0 8px rgba(255, 138, 61, 0.5); }
.heat-cell.future { opacity: 0.25; }
.heat-cell.today { outline: 2px solid var(--text); outline-offset: -1px; }
.chart { width: 100%; height: auto; margin: 6px 0 10px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: var(--acc-d); stroke: none; }
.chart .line { fill: none; stroke: var(--acc2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--bg); stroke: var(--acc2); stroke-width: 2; }
.chart .pt.best { fill: var(--acc2); }
.chart .ax { fill: var(--dim); font-size: 10px; font-family: var(--f-c); font-weight: 700; letter-spacing: 0.04em; }
.chart .ax.hi { fill: var(--text); font-size: 11px; }
.sess-ex { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sess-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.set-pill { padding: 4px 10px; border-radius: 8px; background: var(--s3); font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.set-pill b { color: var(--dim); margin-right: 4px; font-family: var(--f-c); }

/* ── sheets ───────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, 0.62); opacity: 0; transition: opacity 0.22s; }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901; width: 100%; max-width: var(--maxw); margin: 0 auto;
  max-height: 88dvh; display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0; transform: translateY(105%); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); outline: 0;
}
.sheet.tall { height: 88dvh; }
.sheet.on { transform: none; }
.sheet-grab { padding: 10px 0 4px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grab span { width: 40px; height: 5px; border-radius: 99px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 4px 20px; touch-action: none; }
.sheet-title { font-family: var(--f-d); font-weight: 400; font-size: 28px; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(24px + var(--sab)); flex: 1; }
.sheet-copy { color: var(--mute); margin: 4px 0 8px; }
.sheet-body > .btn.block { margin-top: 16px; }
.sheet-body .search { margin-bottom: 4px; }
.chip-toggle { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 4px; font-weight: 600; margin-bottom: 10px; }
.sw-box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--dim); display: grid; place-items: center; color: #0a0a0c; }
.chip-toggle.on .sw-box { background: var(--acc2); border-color: var(--acc2); }
.saved { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 16px; }
.done-ic { width: 76px; height: 76px; border-radius: 26px; display: grid; place-items: center; background: var(--ok-d); color: var(--ok); margin-bottom: 6px; }

/* ── exercise detail / video ──────────────────────────── */
.vid { display: flex; align-items: center; gap: 14px; margin: 12px 0 0; padding: 10px; border-radius: var(--r); background: var(--s2); border: 1px solid var(--line); }
.vid:active { background: var(--s3); }
.vid-thumb { position: relative; width: 112px; height: 72px; border-radius: 12px; background: linear-gradient(135deg, #2a1812, #1a1a20); overflow: hidden; flex-shrink: 0; display: grid; place-items: center; }
.vid-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid-play { position: relative; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 77, 42, 0.95); color: #fff; display: grid; place-items: center; }
.vid-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vid-t { font-family: var(--f-c); font-weight: 800; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.15; }
.vid-s { font-size: 14px; }
.cues { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.cues li { position: relative; padding-left: 20px; color: var(--mute); font-size: 16px; line-height: 1.45; }
.cues li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }

/* ── routine editor ───────────────────────────────────── */
.ed-item { margin-bottom: 10px; }
.ed-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; min-height: 44px; justify-content: center; }
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.mini-grid.three { grid-template-columns: repeat(3, 1fr); }
.mini-step { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.mini-step .label { font-size: 11px; letter-spacing: 0.1em; }
.mini-ctl { display: flex; align-items: center; gap: 2px; }
.mini-btn { width: 36px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); }
.mini-btn:active { background: var(--line); }
.mini-v { min-width: 30px; text-align: center; font-family: var(--f-d); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }

/* ── settings ─────────────────────────────────────────── */
.set-sect { margin-bottom: 22px; }
.set-sect > .label { margin: 0 2px 8px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 14px; margin-top: 8px; border-radius: var(--r-s); background: var(--s2); border: 1px solid var(--line); }
.set-t { font-family: var(--f-c); font-weight: 800; font-size: 17px; letter-spacing: 0.05em; text-transform: uppercase; }
.set-d { font-size: 14px; color: var(--mute); }
.set-d.pad { padding: 8px 2px 0; }
.warn-box { padding: 12px 14px; border-radius: var(--r-s); background: rgba(255, 176, 32, 0.12); border: 1px solid rgba(255, 176, 32, 0.4); color: var(--warn); margin-bottom: 10px; font-size: 15px; }
.about { text-align: center; color: var(--dim); font-family: var(--f-c); font-weight: 700; letter-spacing: 0.14em; padding-top: 4px; }

/* ── onboarding ───────────────────────────────────────── */
.onboard { position: fixed; inset: 0; z-index: 800; background: var(--bg); overflow-y: auto; padding: calc(var(--sat) + 8px) 0 var(--sab); }
.onboard > div { max-width: var(--maxw); margin: 0 auto; min-height: 100%; padding: 12px 20px 28px; display: flex; flex-direction: column; gap: 12px; }
.ob-welcome { justify-content: center; text-align: center; align-items: center; }
.ob-logo { width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; color: #0a0a0c; background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 14px 44px rgba(255, 77, 42, 0.35); }
.ob-welcome .h0 { font-size: 64px; letter-spacing: 0.1em; }
.ob-welcome .h0 em { font-style: normal; color: var(--acc); }
.ob-points { display: flex; flex-direction: column; gap: 14px; text-align: left; margin: 12px 0 18px; width: 100%; }
.ob-points li { display: flex; gap: 14px; align-items: flex-start; color: var(--mute); }
.ob-points .ic { color: var(--acc2); margin-top: 2px; }
.ob-points b { color: var(--text); }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ob-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.ob-dots span { width: 22px; height: 4px; border-radius: 4px; background: var(--s3); }
.ob-dots span.on { background: var(--acc2); }
.ob-step .btn.xl { margin-top: auto; }
.ob-opts { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.ob-opt { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 't c' 'd c'; align-items: center; gap: 2px 12px; padding: 14px 16px; min-height: 68px; border-radius: var(--r); background: var(--s1); border: 1.5px solid var(--line); transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.ob-opt:active { transform: scale(0.99); }
.ob-opt.on { border-color: var(--acc2); background: var(--acc-d); }
.ob-opt-t { grid-area: t; font-family: var(--f-c); font-weight: 800; font-size: 21px; letter-spacing: 0.04em; text-transform: uppercase; }
.ob-opt-d { grid-area: d; color: var(--mute); font-size: 15px; }
.ob-opt-c { grid-area: c; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #0a0a0c; }
.ob-opt.on .ob-opt-c { background: var(--acc2); border-color: var(--acc2); }
.ob-days { display: flex; flex-direction: column; gap: 8px; }

/* ── player ───────────────────────────────────────────── */
.player { position: fixed; inset: 0; z-index: 100; max-width: var(--maxw); margin: 0 auto; background: var(--bg); display: flex; flex-direction: column; padding-top: var(--sat); }
.player[hidden] { display: none; }
.pl-top { display: flex; align-items: center; gap: 4px; padding: 4px 8px; }
.pl-title { flex: 1; min-width: 0; text-align: center; }
.pl-day { font-family: var(--f-c); font-weight: 800; font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta { font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.pl-segs { display: flex; gap: 4px; padding: 6px 16px 10px; }
.seg-bar { flex: 1; height: 10px; border-radius: 6px; background: var(--s3); position: relative; min-width: 6px; }
.seg-bar::before { content: ''; position: absolute; inset: -14px -2px; }
.seg-bar.part { background: linear-gradient(90deg, var(--acc2) 50%, var(--s3) 50%); }
.seg-bar.done { background: var(--ok); }
.seg-bar.skip { background: repeating-linear-gradient(45deg, var(--s3) 0 4px, var(--bg) 4px 8px); }
.seg-bar.cur { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--acc2); }
.rest-bar { display: flex; align-items: center; gap: 12px; margin: 0 16px 8px; padding: 6px 8px 6px 14px; border-radius: 14px; background: rgba(90, 162, 255, 0.12); border: 1px solid rgba(90, 162, 255, 0.4); color: var(--blue); }
.rest-bar .label { color: var(--blue); }
.rest-bar-n { flex: 1; font-family: var(--f-d); font-size: 26px; font-variant-numeric: tabular-nums; }
.pl-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 0; }
.pl-head { padding: 4px 2px 12px; }
.pl-name { font-family: var(--f-d); font-weight: 400; font-size: 46px; letter-spacing: 0.02em; line-height: 0.95; text-transform: uppercase; margin: 6px 0 6px; }
.pl-target { color: var(--mute); font-size: 17px; font-weight: 500; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.stage { background: var(--s1); border: 1px solid var(--line); border-radius: 24px; padding: 18px 16px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; text-align: center; }
.stage > .label { text-align: center; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.steps.one { grid-template-columns: 1fr; }
.step { background: var(--s2); border-radius: 20px; padding: 12px 10px 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.step-ctl { width: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: 'val val' 'm p'; gap: 8px; align-items: center; }
.steps.one .step-ctl { grid-template-columns: 72px 1fr 72px; grid-template-areas: 'm val p'; }
.step-ctl > :nth-child(1) { grid-area: m; }
.step-ctl > :nth-child(2) { grid-area: val; }
.step-ctl > :nth-child(3) { grid-area: p; }
.step-btn { height: 60px; border-radius: 16px; background: var(--s3); display: grid; place-items: center; transition: transform 0.08s, background 0.12s; }
.step-btn:active { transform: scale(0.92); background: var(--line); }
.step-val { width: 100%; text-align: center; font-family: var(--f-d); font-size: 58px; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; min-height: 60px; }
input.step-val { border-radius: 12px; }
input.step-val:focus { background: var(--s3); }
.link-btn { color: var(--mute); }
.stage .link { align-self: center; }

.ring { position: relative; align-self: center; width: 220px; height: 220px; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .ring-bg, .ring .ring-fg { stroke-width: 7; }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-n { font-family: var(--f-d); font-size: 84px; line-height: 0.9; font-variant-numeric: tabular-nums; }
.rest-stage { border-color: rgba(90, 162, 255, 0.4); background: linear-gradient(180deg, rgba(90, 162, 255, 0.08), var(--s1)); }
.rest-stage .ring-fg { stroke: var(--blue); }
.rest-stage .ring-fg.warn { stroke: var(--danger); }
.rest-next { color: var(--mute); font-size: 16px; }
.rest-btns { display: flex; gap: 10px; }
.rest-btns .btn.ghost { min-width: 84px; }
.done-stage { align-items: center; padding: 26px 16px; }

.pl-sets { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.pset { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px 6px 8px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); text-align: left; }
.pset:active { background: var(--s2); }
.set-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); font-family: var(--f-d); font-size: 20px; color: var(--mute); flex-shrink: 0; }
.set-v { flex: 1; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--dim); }
.set-end { font-family: var(--f-c); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.pset.done { border-color: rgba(61, 220, 132, 0.35); }
.pset.done .set-n { background: var(--ok); color: #0a0a0c; }
.pset.done .set-v { color: var(--text); }
.pset.now { border-color: var(--acc2); background: var(--acc-d); }
.pset.now .set-n { background: var(--acc2); color: #0a0a0c; }
.pset.now .set-v { color: var(--text); }

.pl-tools { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); font-family: var(--f-c); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.tool:active { background: var(--s3); }
.pl-scroll .cues { margin: 12px 4px 0; }
.pl-space { height: 20px; }
.pl-nav { display: flex; gap: 10px; padding: 10px 16px calc(12px + var(--sab)); border-top: 1px solid var(--line); background: rgba(9, 9, 11, 0.96); }
.pl-nav .btn.ghost:first-child { width: 64px; padding: 0; }

/* ── toast ────────────────────────────────────────────── */
.toast-root { position: fixed; left: 0; right: 0; bottom: calc(76px + var(--sab)); z-index: 1100; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
body.in-player .toast-root, body.has-sheet .toast-root { bottom: calc(96px + var(--sab)); }
.toast { display: flex; align-items: center; gap: 12px; max-width: 460px; padding: 12px 18px; border-radius: 16px; background: #f5f5f7; color: #0a0a0c; font-weight: 600; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5); opacity: 0; transform: translateY(10px); transition: opacity 0.2s, transform 0.2s; pointer-events: auto; }
.toast.on { opacity: 1; transform: none; }
.toast.error { background: var(--danger); }
.toast-btn { font-family: var(--f-c); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #c2260a; min-height: 36px; padding: 0 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (max-height: 640px) {
  .pl-name { font-size: 38px; }
  .step-val { font-size: 48px; min-height: 52px; }
  .step-btn { height: 52px; }
  .ring, .ring svg { width: 180px; height: 180px; }
  .ring-n { font-size: 68px; }
}
.set-l { flex: 1; min-width: 0; }
.hero .link.block { margin-top: 2px; }
.hero .ex-prev { margin-top: 6px; }
.rest-btns .btn { white-space: nowrap; padding: 0 14px; }
.rest-btns .btn.ghost { min-width: 76px; }
.btn-row .btn { white-space: nowrap; padding: 0 12px; }
.btn-row .btn.primary { flex: 1.6; }
.mini-grid, .mini-grid.three { grid-template-columns: 1fr 1fr; row-gap: 12px; }
.mini-ctl { justify-content: center; }
.mini-btn { width: 44px; height: 44px; }
.mini-v small, .rest-bar-n small { font-family: var(--f-b); font-size: 13px; font-weight: 600; color: var(--mute); margin-left: 1px; }

/* ── plan / preview ───────────────────────────────────── */
.ex-tap { cursor: pointer; }
.pv-sum { margin-bottom: 4px; }
.pv-note { font-size: 15px; margin-top: 6px; }
.pv-item { margin: 12px 0; padding: 14px; }
.pv-head { align-items: flex-start; gap: 12px; }
.pv-head .li-main { padding-top: 2px; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.pv-steps { grid-template-columns: repeat(2, 1fr); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pv-steps:has(> :only-child) { grid-template-columns: 1fr; }
.pv-v { min-width: 56px; font-size: 30px; }
.pv-tools { margin-top: 12px; }
.pv-tools .tool { min-height: 44px; padding: 0 12px; font-size: 14px; }
.tool.danger { color: var(--danger); margin-left: auto; padding: 0 14px; }
.tool:disabled { opacity: 0.35; }
.pv-foot { position: sticky; bottom: calc(-24px - var(--sab)); margin: 16px -16px calc(-24px - var(--sab)); padding: 12px 16px calc(14px + var(--sab)); background: linear-gradient(180deg, rgba(18, 18, 22, 0), var(--s1) 22%); display: flex; flex-direction: column; gap: 6px; }
.pv-foot .btn.block { margin-top: 0; }
.pv-foot-row { display: flex; gap: 8px; }
.pv-foot-row .btn { white-space: nowrap; }
.pv-tools { flex-wrap: nowrap; gap: 6px; }
.pv-tools .tool { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 6px; gap: 5px; font-size: 13px; letter-spacing: 0.04em; }
.pv-tools .tool.danger { flex: 0 0 48px; margin-left: 0; padding: 0; }
.pv-head .li-sub { white-space: normal; }
body.has-sheet .toast-root { bottom: calc(168px + var(--sab)); }

/* ── inline form video ───────────────────────────────── */
.vid-inline { margin: 12px 0 4px; }
.vid-inline:empty { display: none; }
.pl-scroll .vid-inline { margin: 0 0 14px; }
.pv-item .vid-inline { margin: 10px 0 2px; }
.vid-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; border-radius: var(--r); background: var(--s2); border: 1px solid var(--line); text-align: left; }
.vid-row:active { background: var(--s3); }
.vid-row .vid-play { flex-shrink: 0; }
.vid-frame { width: min(100%, calc(36dvh * 16 / 9)); aspect-ratio: 16 / 9; margin: 0 auto; border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--line); }
.vid-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.vid-bar { display: flex; gap: 8px; margin-top: 8px; }
.vid-bar .btn { flex: 1; white-space: nowrap; }
.vid-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--s2); border: 1px solid var(--line); color: var(--mute); }

/* ═══ Zones & tones — colour-coded sections ═════════════════════════════════
   Neutral layers step apart (bg → card → control); inset "wells" sit darker than their card;
   what a section is FOR decides its tint (info / action / progress / rest / records);
   each workout type and muscle group has its own colour via data-tone. */

:root { --tone: var(--acc2); --tone-bg: var(--z-act); --tone-b: var(--z-act-b); }
[data-tone='push']  { --tone: var(--t-push);  --tone-bg: #1f150e; --tone-b: #4a2d1c; }
[data-tone='pull']  { --tone: var(--t-pull);  --tone-bg: #0f1a2a; --tone-b: #254269; }
[data-tone='legs']  { --tone: var(--t-legs);  --tone-bg: #0f1c14; --tone-b: #234a30; }
[data-tone='upper'] { --tone: var(--t-upper); --tone-bg: #1d190c; --tone-b: #4a3d17; }
[data-tone='full']  { --tone: var(--t-full);  --tone-bg: #19142a; --tone-b: #3d3166; }
[data-tone='mob']   { --tone: var(--t-mob);   --tone-bg: #0c1c1b; --tone-b: #1d4744; }

/* breathing room */
.page { gap: 20px; }
.card { padding: 18px; }
.sect-head { display: flex; align-items: center; gap: 10px; margin: 14px 2px 10px; }
.sect-head::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* utilities */
.zone { background: var(--zbg); border: 1px solid var(--zb); }
.zone-info { --zbg: var(--z-info); --zb: var(--z-info-b); --za: var(--z-info-a); }
.zone-act  { --zbg: var(--z-act);  --zb: var(--z-act-b);  --za: var(--z-act-a); }
.zone-prog { --zbg: var(--z-prog); --zb: var(--z-prog-b); --za: var(--z-prog-a); }
.zone-rest { --zbg: var(--z-rest); --zb: var(--z-rest-b); --za: var(--z-rest-a); }
.zone-gold { --zbg: var(--z-gold); --zb: var(--z-gold-b); --za: var(--z-gold-a); }
.zone > .label, .zone .sect-head .label { color: var(--za, var(--dim)); }
.well { background: var(--well); border: 1px solid var(--line-soft); border-radius: var(--r-s); }
.zebra > :nth-child(even) { background: var(--zebra); }
.tone-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.tone-stripe { position: relative; }
.tone-stripe::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tone); z-index: 1; pointer-events: none; }
.li.tone-stripe, .card.flat.tone-stripe, .card.last.tone-stripe { padding-left: 20px; }
.li-row.tone-stripe .li { padding-left: 20px; }
.tone-stripe .li-num { background: var(--tone-bg); color: var(--tone); }

/* alternating rows in lists (buttons only, so month labels don't break the rhythm) */
.list > button.li:nth-of-type(even):not(.rec):not(:active) { background: var(--s2); }
.sheet .li { background: var(--s2); }
.sheet .list > button.li:nth-of-type(even):not(.rec):not(:active) { background: var(--s3); }

/* tip lists in the info zone */
.cues.zone { padding: 12px 14px; border-radius: var(--r-s); }
.cues.zone li::before { background: var(--za); }

/* Today */
.week { background: var(--z-prog); border-color: var(--z-prog-b); --za: var(--z-prog-a); }
.week .ring-bg { stroke: rgba(255, 255, 255, 0.09); }
.week .wk-dot { border-color: var(--z-prog-b); }
.hero { background: linear-gradient(160deg, var(--tone-bg), var(--s1) 78%); border-color: var(--tone-b); }
.hero .label.acc { color: var(--tone); }
.hero.active-hero { border-color: var(--tone); }
.hero .ex-prev { margin-top: 16px; background: var(--well); border: 1px solid var(--line-soft); border-radius: var(--r-s); padding: 2px 0; }
.ex-prev li { border-bottom: 0; padding: 11px 14px; }
.ex-prev li:nth-child(even) { background: var(--zebra); }
.card.last { padding-left: 20px; }

/* Progress */
.stats .stat:nth-child(1) .stat-n { color: var(--t-push); }
.stats .stat:nth-child(2) .stat-n { color: var(--t-legs); }
.stats .stat:nth-child(3) .stat-n { color: var(--t-pull); }
.stats .stat:nth-child(4) .stat-n { color: var(--t-mob); }
.zone-prog .heat-cell { background: #1a2b21; }
.zone-prog .heat-cell.l1 { background: #2a6b45; }
.zone-prog .heat-cell.l2 { background: #35b36c; }
.zone-prog .heat-cell.l3 { background: var(--ok); box-shadow: 0 0 8px rgba(61, 220, 132, 0.5); }
.zone-prog .heat-cell.future { opacity: 0.35; }
.li.rec { background: var(--z-gold); border-color: var(--z-gold-b); }
.li.rec .li-ic.pr { background: rgba(255, 193, 69, 0.16); color: var(--z-gold-a); }

/* Workout player */
.player .seg-bar.part { background: linear-gradient(90deg, var(--tone) 50%, var(--s3) 50%); }
.player .seg-bar.done { background: var(--tone); }
.player .seg-bar.cur { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--tone); }
.pl-head { padding: 4px 2px 16px; }
.pl-chips { background: var(--z-info); border: 1px solid var(--z-info-b); border-radius: var(--r-s); padding: 10px 12px; margin-top: 14px; }
.pl-chips .chip:not(.up) { background: transparent; border-color: transparent; padding-left: 0; }
.stage { background: var(--z-act); border-color: var(--z-act-b); gap: 16px; }
.stage > .label { color: var(--z-act-a); }
.stage .step { background: rgba(0, 0, 0, 0.34); }
.stage .step-btn { background: #2b1e16; }
.stage .step-btn:active { background: #3b291d; }
.rest-stage { background: var(--z-rest); border-color: var(--z-rest-b); }
.rest-stage > .label { color: var(--z-rest-a); }
.done-stage { background: var(--z-prog); border-color: var(--z-prog-b); }
.pl-sets { background: var(--well); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 6px; gap: 2px; margin-top: 20px; }
.pset { background: transparent; border-color: transparent; }
.pl-sets .pset:nth-child(even):not(.now):not(.done) { background: var(--zebra); }
.pl-tools { margin-top: 20px; }
.pl-scroll .vid-inline { margin-bottom: 18px; }

/* Planner */
.pv-item { margin: 14px 0; }
.pv-item:nth-of-type(odd) { background: var(--s1); }
.pv-item:nth-of-type(even) { background: var(--s2); }
.pv-item .pv-chips { background: var(--z-info); border: 1px solid var(--z-info-b); border-radius: var(--r-s); padding: 8px 10px; }
.pv-item .pv-chips .chip:not(.up) { background: transparent; border-color: transparent; padding-left: 2px; }
.pv-steps { background: var(--z-act); border: 1px solid var(--z-act-b); border-radius: var(--r-s); padding: 12px 8px; margin-top: 14px; }
.pv-steps .mini-btn { background: #2b1e16; }

/* Settings: each group is its own block */
.set-sect { background: var(--s2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 14px 14px; margin-bottom: 16px; }
.set-sect .set-row { background: var(--s3); border-color: var(--line-soft); }
.set-sect .seg { background: var(--s3); border-color: var(--line-soft); }

/* polish pass after visual review */
.week .ring-fg { stroke: var(--ok); }
.pv-sum .label.acc { color: var(--tone); }
.pv-steps { column-gap: 0; }
.pv-steps .mini-step { padding: 0 6px; }
.pv-steps .mini-step + .mini-step { border-left: 1px solid var(--z-act-b); }
.li-row .li-sub { white-space: normal; }

/* ── rest-time editor ────────────────────────────────── */
.rest-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--z-rest); border: 1px solid var(--z-rest-b); color: var(--z-rest-a); font: inherit; font-weight: 600; vertical-align: middle; }
.rest-chip:active { background: var(--s3); }
.re-zone { margin: 14px 0 4px; padding: 14px; border-radius: var(--r); text-align: center; }
.re-ctl { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: center; margin: 8px 0 10px; }
.re-val { font-family: var(--f-d); font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.re-val small { font-family: var(--f-b); font-size: 18px; font-weight: 600; color: var(--mute); margin-left: 2px; }
.re-presets { justify-content: center; margin: 4px 0 0; }
.re-zone .btn-chip { min-height: 44px; }
.re-list { margin-bottom: 14px; padding: 4px 0; }
.re-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 15px; }
.re-row:nth-child(even) { background: var(--zebra); }
.re-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-d { white-space: nowrap; color: var(--mute); font-variant-numeric: tabular-nums; }
.re-d b { color: var(--z-act-a); }
.pv-steps .mini-step.wide { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--z-act-b); padding-top: 10px; margin-top: 4px; }
.pv-steps .mini-step.wide .mini-ctl { gap: 10px; }
.pv-sum .btn.sm { margin-top: 4px; }

/* ── colour bars: drawn INSIDE the box ───────────────────────────────────────
   The first version was a floating ::before with z-index, which painted over sticky footers
   (Start workout / Discard plan) while cards scrolled underneath. An inset shadow is clipped to
   the element's rounded corners and can never stack above anything else. */
.tone-stripe::before { content: none; }
.li.tone-stripe,
.card.tone-stripe,
.li-row.tone-stripe .li { box-shadow: inset 4px 0 0 var(--tone); }
.pv-foot { z-index: 5; }

/* buttons in a row wrap instead of being clipped on narrow phones (320–360 px) */
.btn-row { flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 140px; min-width: 0; }
.btn-row .btn.primary { flex: 1.6 1 160px; }
.btn-row .btn { letter-spacing: 0.05em; gap: 6px; }
