/* ══════════════════════════════════════
   CLIENT CSS — Repchitect Platform
   Styles specific to the client portal.
══════════════════════════════════════ */

/* The client portal references global.css for
   all shared components. This file handles
   client-only overrides and loading screens. */

/* Client nav uses the same .client-nav as global.css */

/* The loading splash (.loading-screen, .loading-inner, the ring, .rc-build)
   is defined once in global.css, shared with the trainer shell. */
.error-screen {
  position:fixed; inset:0; background:var(--bg);
  display:flex; align-items:center; justify-content:center; z-index:var(--z-app);
}
.error-inner {
  display:flex; flex-direction:column; align-items:center; gap:1rem; padding:2rem;
}
.loading-logo, .error-logo { font-weight:800; font-size:1.15rem; letter-spacing:0; color:var(--text); }

/* Nutrition macro rings (conic gauges) */
.macro-ring { display:flex; flex-direction:column; align-items:center; gap:0.5rem; padding:1rem 0; }
.macro-ring-dial { width:72px; height:72px; border-radius:50%; display:grid; place-items:center; }
.macro-ring-center { width:56px; height:56px; border-radius:50%; background:var(--surface-1); display:grid; place-items:center; box-shadow:inset 0 1px 0 rgba(255,255,255,.06); }
.macro-ring-pct {
  font-size:.9rem; font-weight:800; letter-spacing:-0.02em;
  font-variant-numeric:tabular-nums;
  /* The quantity can be "2200" or "182.5g" where the old percentage was never
     more than four characters. Shrink to fit rather than overflow the circle. */
  max-width:52px; text-align:center;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.macro-ring-lab { font-size:.75rem; font-weight:700; text-transform:none; letter-spacing:0; color:var(--text-dim); }
.macro-ring-val { font-size:.75rem; color:var(--text-muted); font-variant-numeric:tabular-nums; }

/* A ring with no target still draws — see _macroRing. The track is empty
   rather than full, because a full ring reads as "goal met", and the whole
   tile steps back so it does not compete with the ones that do have a goal. */
.macro-ring.no-target .macro-ring-dial { opacity:0.72; }
.macro-ring.no-target .macro-ring-val { font-style:italic; opacity:0.8; }
.loading-dots { display:flex; gap:0.4rem; }
.loading-dots span { width:6px; height:6px; border-radius:50%; background:var(--green); opacity:0.3; animation:pulse 1.2s infinite; }
.loading-dots span:nth-child(2) { animation-delay:0.2s; }
.loading-dots span:nth-child(3) { animation-delay:0.4s; }
@keyframes pulse { 0%,80%,100%{opacity:0.3} 40%{opacity:1} }
.error-code { font-weight:700; font-size:2rem; color:var(--text-dim); }
.error-msg  { font-size:.8125rem; color:var(--text-muted); text-align:center; line-height:1.8; }
.error-link { font-size:.75rem; color:var(--text); border:1px solid var(--green-border); padding:0.3rem 0.75rem; border-radius:var(--radius-sm); transition:background 0.15s; }
.error-link:hover { background:var(--green-dim); }

/* Superset grouping — members shown together in one box, in order */
.superset-box {
  /* 5b: the grouping is the accent OUTLINE; a filled box behind the members
     was the light-box pattern. */
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-md);
  background:transparent;
  padding: 0.5rem;
  margin: 0.75rem 0;
}
.superset-box-head {
  font-size: .75rem; font-weight: 800; letter-spacing: 0;
  color:var(--text); text-transform: none;
  padding: 0.15rem 0.3rem 0.5rem;
}
.superset-box .exercise-card { margin: 0.4rem 0; }
.superset-box .exercise-card:first-of-type { margin-top: 0; }
.superset-box .exercise-card:last-of-type { margin-bottom: 0.1rem; }

/* Segmented set logging (drop sets / clusters) */
.set-log-row-seg .set-log-header { display:flex; align-items:center; justify-content:space-between; }
.seg-done-badge { color:var(--text-muted); }
.seg-log-line { display:flex; align-items:center; gap:0.4rem; margin:0.35rem 0; }
.seg-line-num { width:18px; height:18px; flex:none; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--surface-3); color:var(--text); font-size:.75rem; font-weight:800; }
.seg-input-wrap { display:flex; flex-direction:column; align-items:center; }
.seg-input-wrap .log-input { width:64px; text-align:center; }
.seg-x { color:var(--text-muted); font-weight:700; }
.seg-target-hint { font-size:.75rem; color:var(--text-muted); margin-left:auto; white-space:nowrap; }

/* Superset member headers + interleaved set labels */
.ss-members { display:flex; flex-direction:column; gap:0.4rem; margin-bottom:0.5rem; }
.ss-member-head { padding:0.5rem 0.5rem; background:var(--surface,rgba(255,255,255,0.03)); border-radius:var(--radius-sm); }
.ss-member-name { font-weight:800; font-size:.9rem; }
.ss-member-head .form-tip { margin-top:0.25rem; }
.ss-member-head .wiki-link-btn { margin-top:0.35rem; }
.ss-sets .set-log-row { margin:0.35rem 0; }
.ss-set-exname { font-weight:800; color:var(--text); }

/* ══════════ TODAY (client home hero) ══════════ */
/* ── TODAY HEADER (Drew, 2026-08-26) ──
   Day and date large, then the greeting, BOTH in the accent typeface — that
   is --font-display, which every font preset defines, so a trainer's chosen
   face carries through instead of the body font. */
.today-eyebrow { font-size:.75rem; font-weight:700; letter-spacing:0; text-transform:none; color:var(--text-dim); margin-top:0.2rem; }

/* ── TODAY'S AGENDA ──
   What is actually on today, then the three things a client can do about it.
   Unboxed: a label over the accent rule with rows flat beneath. */
.ag-block { margin-bottom:1rem; }
.ag-item {
  display:flex; gap:0.75rem; align-items:baseline;
  padding:0.75rem 0; border-bottom:1px solid var(--border);
}
.ag-item:last-of-type { border-bottom:0; }
.ag-time {
  font-family:var(--font-display); font-weight:900; font-size:.9rem;
  min-width:5rem; flex:none; font-variant-numeric:tabular-nums;
}
.ag-main { flex:1; min-width:0; }
.ag-name { font-size:.9rem; font-weight:700; }
.ag-meta { font-size:.8125rem; color:var(--text-dim); margin-top:0.1rem; }
.ag-note { font-size:.8125rem; color:var(--text-dim); margin-top:0.3rem; font-style:italic; }
/* The calendar's PT switch: label left, switch right (the standing rule). */
.ce-pt { display:flex; align-items:center; justify-content:space-between; gap:.75rem; min-height:44px; }
/* Stacked full-width: on a phone these are the primary actions of the screen,
   and a client taps them with a thumb between sets. */
/* ONE PRIMARY, TWO QUIET ONES SIDE BY SIDE (5d, Drew 2026-09-23): three
   stacked full-width buttons made the agenda card the tallest thing on Today
   and pushed the habits below the fold. The primary keeps the full width; the
   ghost buttons share one row, and whichever of them is on screen takes the
   room (Book stays hidden until the coach publishes times; Rest day goes once
   a workout is in), so one alone still runs the full width. */
.ag-actions { display:flex; flex-wrap:wrap; gap:0.5rem; margin-top:1rem; }
.ag-actions > .rc-btn--primary { flex:1 1 100%; }
/* .cbook-open carries the calendar's margin-bottom; in this row it only
   squeezed Book shorter than Rest day. */
.ag-actions > .cbook-open { margin-bottom:0; }
.ag-actions > .rc-btn--ghost { flex:1 1 0; min-width:0; padding-left:0.5rem; padding-right:0.5rem; }
.today-strip { display:grid; grid-template-columns:1fr 1fr 1fr; gap:0.5rem; margin-top:1rem; }
.today-metric { padding:0.75rem 0; text-align:center; }
.today-metric-n { font-size:1.15rem; font-weight:800; letter-spacing:-0.02em; line-height:1; }
.today-metric-l { font-size:.75rem; color:var(--text-dim); text-transform:none; letter-spacing:0; margin-top:4px; }
.today-coach { display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:var(--surface-2);
  border:1px solid var(--border); border-radius:var(--radius-md); padding:12px; cursor:pointer; font-family:inherit; }
.today-coach:hover { border-color:var(--border-strong); }
.today-coach-ic { width:34px; height:34px; border-radius:0; background:var(--surface-3); color:var(--text); display:grid; place-items:center; flex:none; }
.today-coach-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.today-coach-msg { font-size:.8125rem; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.today-coach-date { font-size:.75rem; color:var(--text-dim); margin-top:2px; }
.today-coach-chev { color:var(--text-dim); font-size:1.15rem; }

/* Scheduled PT session — the time is the hero, lit in the accent */
.today-pt-time { display:inline-flex; align-items:center; gap:8px; margin:0.5rem 0 0.35rem;
  font-size:1.75rem; font-weight:800; letter-spacing:-0.02em; color:var(--text);
  font-variant-numeric:tabular-nums; line-height:1; }

/* No PT scheduled → the client chooses today's workout (no automatic pick) */
.today-choose-list { display:flex; flex-direction:column; gap:0.5rem; margin-top:1rem; }
.today-choose-row { display:flex; align-items:center; gap:12px; width:100%; text-align:left;
  background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:0.75rem 1rem; cursor:pointer; font-family:inherit; color:var(--text);
  transition:border-color 0.15s, transform 0.06s; }
.today-choose-row:hover { border-color:var(--text); }
.today-choose-row:active { transform:scale(0.99); }
.tcr-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.tcr-name { font-size:.9rem; font-weight:700; letter-spacing:-0.01em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tcr-meta { font-size:.75rem; color:var(--text-dim); font-variant-numeric:tabular-nums; }
.tcr-go { width:34px; height:34px; flex:none; border-radius:50%; display:grid; place-items:center;
  background:var(--surface-3); color:var(--text); }

/* Cancel-workout — subtle danger text button under Complete */
.cancel-workout-btn { display:block; width:100%; margin-top:0.5rem; margin-bottom:1rem; background:none; border:0;
  color:var(--text-dim); font-family:inherit; font-size:.75rem; font-weight:800; letter-spacing:0; text-transform:none; padding:0.5rem; cursor:pointer; }
.cancel-workout-btn:hover { color:var(--danger); }

/* ══════════ PROGRESS ⇄ MEASUREMENTS SEGMENT ══════════ */
/* 5b: chosen = accent OUTLINE — the Effort-row grammar, applied to every
   segmented choice after the sweep that followed the Inbox-header miss. */
/* Stats / Measurements / History is a TAB STRIP and speaks the app's one tab
   grammar (Drew, 2026-09-05): text on a hairline, the chosen one carrying an
   accent underline. It was 2px outlined cells — the grammar for choosing an
   OPTION, not for switching VIEW.
   IT WAS MISSED IN THE FIRST PASS because its markup lives in
   client/index.html, not in a renderer, and the sweep grepped js/ only. When
   you convert a control, grep the SHELLS too. */
.prog-seg { display:flex; gap:0.35rem; background:transparent; border:0;
  border-bottom:1px solid var(--border); border-radius:0; padding:0; margin:0 0 1rem; }
.prog-seg button { flex:1; border:0; background:none; color:var(--text-dim); font-family:inherit;
  font-size:.75rem; font-weight:800; letter-spacing:0; text-transform:none;
  padding:0; min-height:44px; border-radius:0; cursor:pointer;
  border-bottom:3px solid transparent; }
.prog-seg button.active { background:transparent; color:var(--text); border-bottom-color:var(--accent); }
.prog-seg-full { display:flex; width:100%; }
.prog-seg-full button { flex:1; text-align:center; }

/* THE MORE SHEET MOVED TO global.css (2026-09-07). The trainer shell gained
   its own More tab and does NOT load this file, so every rule here would have
   styled nothing over there — the `.grp-form` trap from v108 and the `.tw-*`
   trap from the intake wheel, a third time. One definition, in the sheet both
   shells load. */

/* ── what else a set records (v133) ── */
.log-extras { display:grid; grid-template-columns:repeat(auto-fit, minmax(96px, 1fr)); gap:.5rem;
  margin-top:.5rem; padding-top:0.5rem; border-top:1px solid var(--border); }
.log-extra { min-width:0; }
.log-extra-in { width:100%; }

/* ══════════ EXERCISE LIBRARY (redesign) ══════════ */
.lib-search-wrap { position:relative; margin-bottom:0.75rem; }
.lib-search-ic { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-dim); pointer-events:none; }
.lib-search { width:100%; background:transparent; border:2px solid var(--border); border-radius:var(--radius-md);
  color:var(--text); font-family:inherit; font-size:.8125rem; padding:0.75rem 1rem 0.75rem 2rem; }
.lib-search:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.lib-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.5rem; }
@media (max-width:430px) { .lib-grid { grid-template-columns:1fr; } }

/* Exercise detail modal */
.exd-box { position:relative; max-width:520px; width:100%; }
.exd-close { position:absolute; top:-6px; right:-8px; width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; background:none; border:0; color:var(--text-dim); font-size:1.15rem; line-height:1; cursor:pointer; padding:0; }
.exd-close:hover { color:var(--text); }
.exd-title { font-family:var(--font-display); font-size:1.15rem; font-weight:800; letter-spacing:-0.01em; padding-right:2.5rem; margin-bottom:0.75rem; text-wrap:balance; }
.exd-video { position:relative; border-radius:var(--radius-md); overflow:hidden; background:#000; margin-bottom:0.75rem; box-shadow:var(--el-2); }
.exd-speed { position:absolute; top:8px; right:8px; min-width:52px; min-height:44px; padding:0 12px; border:0; border-radius:var(--radius-md); background:rgba(14,17,22,.72); color:#fff; font:inherit; font-size:.8125rem; font-weight:700; cursor:pointer; }
.exd-video video { width:100%; display:block; max-height:58vh; }
.exd-novideo { display:flex; align-items:center; gap:8px; justify-content:center; color:var(--text-dim);
  background:var(--surface-2); border:1px dashed var(--border); border-radius:var(--radius-md); padding:1.5rem; margin-bottom:0.75rem; font-size:.8125rem; }
.exd-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:1rem; }
.exd-section-label { font-size:.75rem; font-weight:800; letter-spacing:0; text-transform:none; color:var(--text); margin-bottom:0.5rem; }
.exd-cue-list { list-style:none; display:flex; flex-direction:column; gap:0.5rem; margin:0; padding:0; }
.exd-cue-list li { position:relative; padding-left:1.5rem; font-size:.8125rem; line-height:1.5; color:var(--text); }
.exd-cue-list li::before { content:''; position:absolute; left:2px; top:0.55em; width:7px; height:7px; border-radius:50%; background:var(--accent); }
.exd-wiki { display:inline-block; margin-top:1rem; font-size:.8125rem; color:var(--text); font-weight:600; }
.exd-wiki:hover { text-decoration:underline; }

/* ══════════ TRAIN — routine chooser + chosen routine ══════════ */
.routine-choose-list { display:flex; flex-direction:column; gap:12px; }   /* 5f: a card has 12px below it */
.routine-choose-card { display:flex; align-items:center; gap:12px; width:100%; text-align:left;
  background:var(--surface-1); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:1rem 1rem; cursor:pointer; font-family:inherit; color:var(--text);
  transition:border-color 0.15s, transform 0.06s; }
.routine-choose-card:hover { border-color:var(--text); }
.routine-choose-card:active { transform:scale(0.99); }
.routine-choose-card.active { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.rcc-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.rcc-name { font-size:1.15rem; font-weight:700; letter-spacing:-0.01em; }
.rcc-meta { font-size:.8125rem; color:var(--text-dim); font-variant-numeric:tabular-nums; }
.rcc-muscles { font-size:.75rem; color:var(--text-muted); text-transform:none; letter-spacing:0; margin-top:2px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rcc-go { flex:none; width:40px; height:40px; border-radius:50%; display:grid; place-items:center; background:var(--surface-3); color:var(--text); }
/* The client's one Back, the same voice as the trainer's (5d). */
.routine-back-btn { display:inline-flex; align-items:center; gap:6px; background:none; border:0; color:var(--text-dim); min-height:44px;
  font-family:inherit; font-size:.8125rem; font-weight:800; letter-spacing:0; text-transform:none; cursor:pointer; padding:0 12px 0 0; margin-bottom:0.25rem; }
.routine-back-btn:hover { color:var(--text); }
.routine-chosen-head { margin-bottom:1rem; }
.routine-chosen-name { font-family:var(--font-display); font-size:1.75rem; font-weight:800; letter-spacing:-0.02em; margin:0; text-wrap:balance; }
.routine-chosen-meta { display:flex; flex-direction:column; gap:0.1rem; margin-top:0.5rem;
  font-size:1.15rem; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }

/* New-message alert on the client Today page (below the workout box) */
.td-newmsg { display:flex; align-items:center; gap:12px; width:100%; text-align:left; margin-top:0.75rem;
  background:var(--surface-3); border:1px solid var(--accent); border-radius:var(--radius-md); padding:12px 12px;
  cursor:pointer; font-family:inherit; }
.td-newmsg-ic { width:38px; height:38px; border-radius:0; background:var(--accent); color:var(--accent-contrast);
  display:grid; place-items:center; flex:none; }
.td-newmsg-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.td-newmsg-t { font-size:.8125rem; font-weight:800; }
.td-newmsg-s { font-size:.8125rem; color:var(--text-muted); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.td-newmsg-chev { color:var(--text); font-size:1.15rem; flex:none; }

/* Full-width Message Center button on the Today page */
/* Was a hairline accent outline over a 14% tint — the weakest control the
   system has, sitting directly under a solid accent CTA, so it read as
   disabled. It now takes the neutral primitive: a real fill, the lit top edge
   and the hard base, so it feels pressable. Deliberately NOT primary — the
   workout CTA is the one accent action on this screen, and two solid accent
   buttons in a column compete instead of ranking. The accent stays on the icon
   and the unread count, which is where it carries information.
   Only the extras live here; geometry comes from .rc-btn. */
.msg-center-btn { margin-top:0.75rem; }
.msg-center-ic { color:var(--text); }
.msg-center-badge { min-width:20px; height:20px; border-radius:0; background:var(--accent); color:var(--accent-contrast);
  font-size:.75rem; font-weight:800; display:grid; place-items:center; padding:0 6px; }

/* ── Habits on the Today hub (Phase 3) ───────────────────────────────────────
   Every value derives from a token, so this holds across all 12 accents and
   both modes. The tick is 44px because it is tapped one-handed, often before
   coffee. */
.habit-list { display:flex; flex-direction:column; gap:0.5rem; }
.habit-row {
  display:flex; align-items:center; gap:0.75rem;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:0.75rem 0.75rem;
  transition:border-color var(--dur-1) var(--ease-out), opacity var(--dur-1) var(--ease-out);
}
.habit-row.done { border-color:color-mix(in srgb, var(--accent), transparent 55%); }
.habit-main { flex:1; min-width:0; }
.habit-title {
  font-size:.8125rem; font-weight:700; color:var(--text);
  display:flex; align-items:center; gap:0.4rem; flex-wrap:wrap;
}
.habit-row.done .habit-title { color:var(--text-muted); }
/* Marks a habit the coach set. The client cannot remove those, so saying who
   asked for it is the difference between a rule and a mystery. */
.habit-tag {
  font-size:.75rem; font-weight:800; letter-spacing:0; text-transform:none;
  color:var(--text); background:var(--surface-3);
  border-radius:var(--radius-sm); padding:0.1rem 0.35rem;
}
.habit-meta { font-size:.75rem; color:var(--text-dim); margin-top:0.15rem; }
.habit-count {
  font-size:.75rem; font-weight:800; color:var(--text-dim);
  background:var(--surface-3); border-radius:var(--radius-sm); padding:0.1rem 0.4rem;
}
.habit-bar {
  height:3px; border-radius:0; background:var(--surface-3);
  margin-top:0.4rem; overflow:hidden;
}
.habit-bar span { display:block; height:100%; background:var(--accent); border-radius:0; }

.habit-tick {
  flex:none; width:44px; height:44px; border-radius:var(--radius-sm);
  border:1px solid var(--border-strong); background:var(--surface-1);
  color:var(--accent-contrast); font-size:1.15rem; font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.habit-tick.done { background:var(--accent); border-color:var(--text); }
.habit-num { flex:none; width:88px; text-align:center; }
.habit-del {
  flex:none; background:none; border:none; color:var(--text-dim);
  cursor:pointer; font-size:.8125rem; padding:0.4rem;
  position:relative; min-height:44px; min-width:44px;
}
.habit-del:hover { color:var(--danger); }
.habit-add { margin-top:0.25rem; }

/* ── Food log (Nutrition v2) ─────────────────────────────────────────────────
   Shares the shape of .habit-row deliberately: both are "a thing you logged
   today, with a number and a way to undo it", and giving them two different
   looks would imply a distinction that is not there. */
.food-list { display:flex; flex-direction:column; gap:0.5rem; }
.food-row {
  display:flex; align-items:center; gap:0.75rem;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:0.5rem 0.75rem;
  /* A logged item is a <button> now: tapping it opens the editor. The ✕ that
     used to sit here deleted with no confirmation and no undo — one mis-tap on
     a phone and the entry was gone — so Remove moved inside that editor. */
  width:100%; min-height:44px; text-align:left;
  font:inherit; color:inherit; cursor:pointer;
}
.food-row:hover { border-color:var(--text); }
.food-row-chev { margin-left:auto; color:var(--text-dim); font-size:1.15rem; line-height:1; }
.food-row:hover .food-row-chev { color:var(--text); }
.food-main { flex:1; min-width:0; }
.food-name { font-size:.8125rem; font-weight:700; color:var(--text); }
.food-meta { font-size:.75rem; color:var(--text-dim); margin-top:0.12rem; }
.food-del {
  flex:none; background:none; border:none; color:var(--text-dim);
  cursor:pointer; font-size:.8125rem; min-height:44px; min-width:44px;
}
.food-del:hover { color:var(--danger); }
.food-total {
  font-size:.75rem; font-weight:800; color:var(--text);
  background:var(--surface-3);
  border-radius:var(--radius-sm); padding:0.1rem 0.4rem; margin-left:0.35rem;
}
/* Says a total is a floor, not a figure. An unqualified number that happens to
   be missing three items reads as authoritative and is not. */
.food-note { font-size:.75rem; color:var(--text-dim); line-height:1.45; margin:0.35rem 0; }

.food-results { display:flex; flex-direction:column; gap:0.35rem; margin-top:0.5rem; max-height:44vh; overflow-y:auto; }
.food-result {
  display:flex; flex-direction:column; align-items:flex-start; gap:0.1rem;
  width:100%; text-align:left; cursor:pointer; min-height:44px;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:0.5rem 0.75rem; font-family:inherit;
}
.food-result:hover { border-color:var(--border-strong); }
.food-result[disabled] { opacity:0.5; }
.food-result-name { font-size:.8125rem; font-weight:700; color:var(--text); }
.food-result-macros { font-size:.75rem; color:var(--text-dim); }

.food-video {
  width:100%; max-height:46vh; border-radius:var(--radius-md);
  background:#000; object-fit:cover; margin-top:0.5rem;
}
.food-picked { font-size:.8125rem; font-weight:700; color:var(--text); }
.food-picked-meta { font-size:.75rem; color:var(--text-dim); margin-top:0.15rem; }
.food-preview {
  font-size:.8125rem; font-weight:700; color:var(--text);
  margin-top:0.5rem; min-height:1.2em;
}

/* Recipe builder totals — one strip, matching the day-total treatment rather
   than inventing a third way to show four macros. */
.recipe-totals {
  display:grid; grid-template-columns:repeat(4,1fr); gap:.5rem;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:0.5rem .5rem; margin-top:0.75rem; text-align:center;
}
.recipe-totals > div { display:flex; flex-direction:column; gap:.1rem; }
.rt-v { font-size:.8125rem; font-weight:800; font-variant-numeric:tabular-nums; }
.rt-l { font-size:.75rem; font-weight:800; letter-spacing:0; text-transform:none; color:var(--text-dim); }

/* The Add Food picker gained a fourth mode; .habit-kind-picker is 3 columns. */
.food-mode { grid-template-columns:repeat(4, 1fr); }
.food-mode .opt-chip { font-size:.75rem; padding:6px 2px; }

/* ── Client-set nutrition targets ────────────────────────────────────────
   Two columns of number fields, each with a permanent caption saying whose
   number it is. The caption is never conditional: an optional one changes a
   cell's height and the two columns stop lining up. A locked cell is dimmed
   and shows the coach's figure, because a field a client can type into but
   whose value would be overridden reads as a broken app. */
.tg-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.75rem 0.5rem; margin-top:0.75rem; }
.tg-cell { display:flex; flex-direction:column; gap:0.25rem; min-width:0; }
.tg-cell .form-label { margin:0; }
.tg-cell .form-input { width:100%; }
.tg-src { font-size:.75rem; letter-spacing:0; text-transform:none; color:var(--text-dim); }
.tg-cell.is-locked .form-input { opacity:0.55; cursor:not-allowed; }
.tg-cell.is-locked .tg-src { color:var(--text); }

/* ── THE TODAY HUB ───────────────────────────────────────────────────────
   Three tabs over one panel.

   The tabs are drawn as ACTUAL tabs, not a pill row: the active tab shares
   the panel's background and border, drops its own bottom border, and sits
   1px lower so it covers the panel's top edge. That single overlapping pixel
   is what makes the panel read as belonging to the tab. A row of separated
   pills above a separate box does not, which is what made the earlier layout
   feel like an unrelated pile of cards.

   Everything derives from --accent and the surface tokens; no literal colour
   appears here, so all 12 combos and both themes follow. */
.hub { margin-top: 1rem; }

.hub-tabs {
  display: flex;
  gap: 0.25rem;
  /* THE STRIP CARRIES ITS OWN HAIRLINE. It used to sit ON the panel's top
     border ("margin-bottom:-1px"), but 5b unboxed the panel — .hub-panel is
     border:0 — so there was no line under these tabs at all and the accent
     underline floated. Every other tab strip in the app draws this line
     itself; this one does now too (Drew, 2026-09-05). */
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.hub-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.4rem;
  font: inherit;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--btn-radius) var(--btn-radius) 0 0;
  /* Colour only; no transform — a tab that moves on selection reads as a
     button being pressed rather than a surface coming forward. */
  transition: color 0.15s ease, background 0.15s ease;
}
.hub-tab:hover { color: var(--text); }

.hub-tab.active {
  /* 5b: the active tab is text + an accent underline BAR — not accent text,
     not a raised surface. */
  color: var(--text);
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -3px 0 var(--accent);
  padding-bottom: calc(0.6rem + 1px);
}

.hub-panel {
  background: transparent;
  border: 0;
  padding: 1rem 0;
  min-height: 120px;
}
/* The two :has() rules that squared a panel corner under the end tabs went
   with the panel's border and radius: .hub-panel has neither, so they were
   correcting a curve that is not drawn. */

.hub-pip, .hub-badge {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0.1rem 0.35rem;
  border-radius:0;
  line-height: 1.5;
}
.hub-pip { color: var(--text-dim); background: var(--surface-3, var(--surface)); border-radius:var(--radius-sm); }
.hub-tab.active .hub-pip { color:var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); }
/* The unread count is the one thing on this row that should pull the eye.
   A circle, like every count badge (Drew, 2026-09-23); the 2/3 pip beside it
   is a ratio, not a count, and keeps its own shape. */
.hub-badge { color: var(--accent-contrast); background: var(--accent); min-width:20px; height:20px; padding:0 6px; box-sizing:border-box; border-radius:var(--radius-pill); display:inline-flex; align-items:center; justify-content:center; line-height:1; vertical-align:middle; }

/* Nutrition panel ------------------------------------------------------- */
.hub-nut-line { font-size: .75rem; color: var(--text-dim); margin: 0.5rem 0 0.75rem; text-align: center; }

/* Messages panel -------------------------------------------------------- */
.hub-notifs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 0.75rem; }   /* 5f: a card has 12px below it */

.hub-notif {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius:0;
}
.hub-notif:hover { border-color:var(--text); }
.hub-notif-ic { color:var(--text); flex: 0 0 auto; margin-top: 1px; }
.hub-notif-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1 1 auto; }
.hub-notif-t { font-size: .8125rem; font-weight: 700; }
/* Two lines, then an ellipsis — a long message must not push the composer
   off the screen on a phone. */
.hub-notif-s {
  font-size: .75rem;
  color: var(--text-dim);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-notif-when { font-size: .75rem; color: var(--text-dim); flex: 0 0 auto; white-space: nowrap; }

.hub-notif-more {
  width: 100%;
  min-height: 44px;
  padding: 0.4rem;
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  color:var(--text);
  background: transparent;
  border: 1px dashed var(--border-strong, var(--border));
  border-radius:0;
}
.hub-notif-more:hover { border-style: solid; }

.hub-quick { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.hub-quick-input { resize: vertical; min-height: 62px; }
/* Two buttons of exactly equal size.

   Grid, not flex, and deliberately. `flex:1 1 auto` sizes from content, which
   is what made "Photo or video" three times the width of "Send" — but
   `flex:1 1 0` does NOT fix it either: with box-sizing:border-box a zero basis
   still has padding and border added on top, so the two ended up 3.2px apart,
   exactly their padding difference. Measured, not assumed. Two 1fr tracks with
   min-width:0 are equal whatever is inside them. */
.hub-quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; align-items: stretch; }
.hub-quick-row > * { min-width: 0; min-height: 44px; }
.hub-quick-row .msg-attach-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.hub-quick-send { padding-inline: 0.5rem; }

.hub-quick-preview:empty { display: none; }
.hub-quick-preview { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius:0;
}
.hub-chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: .8125rem;
  line-height: 1;
  padding: 0;
  /* Small on purpose; the tap target is restored invisibly. */
  position: relative;
}
.hub-chip button::after { content: ''; position: absolute; inset: -12px; }
.hub-chip button:hover { color: var(--danger, var(--accent)); }

/* Quantity · unit · meal, on one line at 375px.

   Flex with a 35% cap on the quantity gave the three controls whatever was
   left in the order they appeared, and "Breakfast" — the longest meal name —
   was clipped mid-word inside its select. Explicit proportions instead: the
   number needs the least room and the meal name the most. */
.food-amount-row {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1.15fr;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.food-amount-row > * { min-width: 0; }
/* The native chevron needs room of its own or it overlaps the last glyph. */
.food-amount-row select.form-input { padding-inline: 0.5rem 1.5rem; }

/* Typed barcode entry — the only scanning path that works on an iPhone.
   BarcodeDetector is Chromium-only, so on iOS the camera cannot decode. */
.bc-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin-top: 0.4rem; }
.bc-row > * { min-width: 0; min-height: 44px; }
/* Barcode digits are read off a packet and checked one at a time against the
   screen, so they get a monospaced, evenly spaced face. */
.bc-row input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  font-size: .9rem;
}
.bc-row button { padding-inline: 1rem; }
.bc-bad { color: var(--danger, var(--warning)); }

/* The hub's "N items logged today" is a way into the list, not a caption. */
.hub-nut-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
  color:var(--text);
  background: transparent;
  border: 1px dashed var(--border-strong, var(--border));
  border-radius:var(--radius-md);
  margin: 0.5rem 0 0.75rem;
}
.hub-nut-link:hover { border-style: solid; }

/* ── CALORIES AS A BAR, MACROS AS A ROW ──────────────────────────────────
   Calories is the figure most people steer by, and as one of four equal rings
   it carried no more weight than fat. A bar also answers a different question:
   it has a far end, so "how much room is left today" is a distance you can see
   rather than a percentage to interpret. The three macros keep their dials
   because they are parallel quantities being compared with each other, which
   is exactly what a row of identical shapes is for. */
.macro-cal {
  padding: 0.75rem 0;
}
.macro-cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.macro-cal-lab {
  font-size: .75rem; font-weight: 700; letter-spacing: 0;
  text-transform: none; color: var(--text-dim);
}
.macro-cal-num { font-size: .8125rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
/* The intake is the figure being read; the target is context beside it. */
.macro-cal-num b {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
}

.macro-cal-track {
  position: relative;
  height: 10px;
  margin: 0.5rem 0 0.4rem;
  border-radius:0;
  background: var(--surface-3);
  overflow: hidden;
}
.macro-cal-track > span {
  display: block; height: 100%;
  border-radius:0;
  background: var(--accent);
  transition: width 0.35s var(--ease-out, ease);
}
@media (prefers-reduced-motion: reduce) { .macro-cal-track > span { transition: none; } }

.macro-cal-foot { font-size: .75rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* Over target: the bar is full and changes colour rather than overflowing,
   because a bar longer than its track has no meaning. The number above still
   states the real intake, so nothing is hidden. */
.macro-cal.over .macro-cal-track > span { width: 100% !important; background: var(--warning); }
.macro-cal.over .macro-cal-foot { color: var(--warning); }

/* No target: an empty track, matching what a ring with no target does. */
.macro-cal.no-target .macro-cal-track { opacity: 0.55; }
.macro-cal.no-target .macro-cal-foot { font-style: italic; }

/* Three across, at 375px inside the hub panel as well as the full page — the
   narrowest place these have to fit. Fixed 3 columns, not auto-fit: auto-fit
   would drop one macro onto its own row at a width where all three still fit,
   which breaks the comparison the row exists to make. */
.macro-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.macro-trio > * { min-width: 0; }
.macro-trio .macro-ring { padding: 0.5rem 0.3rem; gap: 0.35rem; }
.macro-trio .macro-ring-dial { width: 58px; height: 58px; }
.macro-trio .macro-ring-center { width: 44px; height: 44px; }
.macro-trio .macro-ring-pct { font-size: .8125rem; max-width: 40px; }
.macro-trio .macro-ring-lab { font-size: .75rem; letter-spacing: 0; }
.macro-trio .macro-ring-val { font-size: .75rem; }

/* ── The client's own package (v93), on its own page since 2026-10-02 ───
   Distinct from .trainer-pricing above, which is the coach's menu for
   everyone. This is one person's agreed arrangement, so the struck-through
   original is the point — a client on a discount should be able to see it.
   It leads its page, so it carries no seam of its own. */
.my-package{margin:0 0 1.5rem}
.my-package-top{display:flex;align-items:baseline;gap:0.5rem;flex-wrap:wrap}
.my-package-name{font-weight:700}
.my-package-price{font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}
.my-package-was{color:var(--text-dim);text-decoration:line-through;font-size:.8125rem;
  font-variant-numeric:tabular-nums}
.my-package-note{color:var(--text-dim);font-size:.8125rem;margin-top:0.3rem}
/* Sessions left is the headline: a display numeral, 900 upright (5b's rule for
   numerals), with its unit beside it in the running text size. */
.my-package-left{display:flex;align-items:baseline;gap:0.5rem;margin:0.25rem 0 0.5rem;
  font-size:.9rem;color:var(--text-dim)}
.my-package-left b{font-family:var(--font-display);font-weight:900;font-size:2.5rem;line-height:1;
  letter-spacing:-0.025em;color:var(--text);font-variant-numeric:tabular-nums}

/* What has been used and what is coming up, under the package. Plain rows in
   one grouped list (5d): what on the left, when on the right. */
.pkg-book{margin-bottom:1.5rem}
.pkg-list{margin-bottom:1.5rem}
.pkg-row{display:flex;align-items:baseline;justify-content:space-between;gap:0.75rem;
  padding:0.75rem 1rem;min-height:44px;box-sizing:border-box}
.pkg-row-what{font-weight:600;min-width:0}
.pkg-row-when{color:var(--text-dim);font-size:.8125rem;font-variant-numeric:tabular-nums;
  white-space:nowrap}

/* The coach page leads with the coach (5d): the public page's photo, or their
   initial in a circle, beside the name. */
.coach-head{display:flex;align-items:center;gap:1rem;margin-bottom:0.5rem}
.coach-head-t{min-width:0}
.coach-photo{width:72px;height:72px;border-radius:50%;object-fit:cover;flex:0 0 auto;
  border:2px solid var(--accent);background:var(--surface-2)}
.coach-initial{display:flex;align-items:center;justify-content:center;
  font-family:var(--font-display);font-size:1.75rem;font-weight:800;line-height:1;color:var(--text)}

/* ── NUTRITION PLAN (v99, client side) ──
   The plan header's two states, suggested meals as hairline sections, the
   drill-in sheet. Grammar: ghost cells on line borders, chosen/day tabs
   accent-outlined, one accent fill for the action, dashed reserved for
   add-buttons (none here). */
.np-top { display:flex; gap:8px; align-items:stretch; margin-bottom:0.75rem; }
.np-win-cell { flex:1; min-width:0; border:2px solid var(--accent); padding:8px 8px; }
.np-win-lab { display:block; font-size:.75rem; font-weight:800; letter-spacing:0;
  text-transform:none; color:var(--text-dim); }
.np-win-cell b { font-size:.8125rem; white-space:nowrap; }
.np-view-btn { flex:none; padding-left:16px; padding-right:16px; }
.macro-trio.has-water { grid-template-columns:repeat(4, 1fr); }
.macro-cal-track { position:relative; }
.macro-cal-band { position:absolute; top:0; bottom:0; background:color-mix(in srgb, var(--accent), transparent 78%);
  border-left:2px solid var(--accent); border-right:2px solid var(--accent); pointer-events:none; }
.np-log-row { display:flex; justify-content:space-between; gap:8px; padding:0.5rem 0;
  border-bottom:1px solid var(--border); font-size:.8125rem; }
.np-log-row:last-of-type { border-bottom:none; }
.np-log-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.np-log-kcal { color:var(--text-dim); flex:none; font-size:.75rem; }
.np-meal { border-top:1px solid var(--border); padding:0.75rem 0 0.75rem; }
.np-meal-head { display:flex; justify-content:space-between; align-items:baseline; gap:0.5rem; }
.np-meal-name { font-weight:800; font-size:.8125rem; text-transform:none; letter-spacing:0; }
.np-meal-time { font-size:.75rem; font-weight:700; color:var(--text-dim); flex:none; }
.np-meal-lines { margin:0.35rem 0 0; padding-left:1rem; font-size:.8125rem; }
.np-meal-lines li { margin:0.15rem 0; }
.np-meal-lines li::marker { color:var(--text-dim); }
.np-disclaimer { font-size:.75rem; color:var(--text-dim); text-align:center; margin-top:1rem; line-height:1.5; }
.np-sheet .section-label { margin-top:1rem; }
.np-rationale { font-size:.8125rem; line-height:1.6; color:var(--text-muted); margin:0; }
.np-tiles { display:flex; flex-wrap:wrap; gap:8px; }
.np-tile { flex:1 1 100px; text-align:center; padding:0.5rem 0.25rem; background:var(--surface-3); border:1px solid var(--border); }
.np-tile b { display:block; font-size:.8125rem; }
.np-tile span { font-size:.75rem; font-weight:800; letter-spacing:0; text-transform:none; color:var(--text-dim); }
.np-win-banner { border:2px solid var(--accent); padding:8px 12px; }
.np-foods { display:flex; gap:1rem; flex-wrap:wrap; }
.np-fcol { flex:1 1 100px; min-width:0; }
.np-fcol h5 { margin:0 0 0.25rem; font-size:.75rem; font-weight:800; letter-spacing:0;
  text-transform:none; color:var(--text-dim); }
.np-fcol ul { margin:0; padding-left:1rem; font-size:.8125rem; }
.np-fcol li { margin:0.1rem 0; }
.np-fcol li::marker { color:var(--text-dim); }
.np-supp-row { display:flex; justify-content:space-between; gap:0.5rem; padding:0.5rem 0;
  border-bottom:1px solid var(--border); font-size:.8125rem; }
.np-supp-row:last-of-type { border-bottom:none; }
.np-supp-dose { color:var(--text-dim); font-size:.75rem; flex:none; }
.np-day-tabs { display:flex; gap:6px; margin:0.35rem 0 0.5rem; flex-wrap:wrap; }
.np-day-tab { flex:1; min-width:40px; text-align:center; font-size:.75rem; font-weight:800;
  letter-spacing:0; text-transform:none; padding:8px 0; border:1px solid var(--border-strong);
  color:var(--text-dim); background:transparent; font-family:var(--font-family); cursor:pointer; }
.np-day-tab.on { border:2px solid var(--accent); color:var(--text); padding:8px 0; }

/* ═══════════════ BOOKING — client side (v105) ═══════════════
   Plain rows on hairlines, not tiles. The button above the calendar is the
   one primary action on that screen. */
.cbook-open { margin-bottom: var(--sp-4); }
.cbook-row {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 44px; padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.cbook-row:last-of-type { border-bottom: 0; }
.cbook-when { font-weight: 700; font-size: var(--ts-2); flex: 1; min-width: 0; }
.cbook-meta { font-size: var(--ts-1); color: var(--text-dim); flex: none; }
.cbook-empty { color: var(--text-dim); font-size: var(--ts-2); padding: var(--sp-4) 0; }
.cbook-row .rc-btn--sm { position: relative; }
.cbook-row .rc-btn--sm::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: 50%; height: 44px; transform: translateY(-50%);
}

/* ── THE PAGE BEFORE A WORKOUT: A PREVIEW AND ONE START (2026-11-15) ──────
   #routineContent[data-wk] is idle | tm | manual (ClientApp._setWkMode).
   Everything the manual log needs is still in the page; these rules decide
   what each state shows. "Log manually instead" lives in the ⋯ menu now, so
   its old button is never drawn. */
.rp-top { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; margin-bottom:4px; }
.rp-last { font-size:.9rem; color:var(--text-dim); }
.rp-more { flex:none; width:44px; height:44px; display:grid; place-items:center; padding:0; background:none; border:0;
  border-radius:50%; color:var(--text); cursor:pointer; }
.rp-more:hover { background:var(--surface-3); }
#routineContent #manualLogBtn { display:none; }
#routineContent .rp-still { display:none; }
#routineContent:is([data-wk="idle"], [data-wk="tm"]) .rp-still { display:block; flex:0 0 44px; }
#routineContent:is([data-wk="idle"], [data-wk="tm"]) :is(.ex-check, .ex-log, .ss-sets, .superset-box > .effort-group, .client-note-section, #completeBtn) { display:none; }
#routineContent[data-wk="idle"] :is(.workout-duration, #cancelWorkoutBtn) { display:none; }
#routineContent[data-wk="manual"] #beginWorkoutBtn { display:none; }

/* Offline, said plainly (2026-11-15): a workout whose demos are on this
   phone, and workouts still waiting to send. */
.rcc-off { display:inline-flex; align-items:center; gap:4px; margin-left:8px; font-size:.75rem; font-weight:700; color:var(--text-dim); white-space:nowrap; }
.rcc-off svg { flex:none; }
.off-wait { display:flex; align-items:flex-start; gap:10px; margin:0 0 12px; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-md);
  background:var(--surface-1); font-size:.9rem; line-height:1.4; }
.off-wait svg { flex:none; margin-top:2px; }


/* ── THE FOURTH TAB (2026-11-15): see ClientApp._tab4Want ─────────────────
   A page that is a TAB has no Back; the same page opened from More has one. */
html:not([data-tab4="messages"]):not([data-tab4="market"]) #cpage-calendar [data-cback] { display:none; }
html[data-tab4="messages"] #cBoardBack { display:none; }


/* ── ONE EXERCISE: How to, History, Records (2026-11-15) ─────────────────── */
.exd-tabs { margin:0 0 1rem; }
.exd-range { margin:0 0 .75rem; }
.exd-pane { min-width:0; }
.exd-chart { margin:0 0 1rem; padding:.75rem; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface); }
.exd-chart-l { font-size:.75rem; color:var(--text-dim); margin-bottom:.35rem; }
.exd-nochart { padding:1.25rem 0; text-align:center; font-size:.8125rem; color:var(--text-dim); }
.exd-list > .exd-sess, .exd-recs > .exd-rec { padding:.6rem .85rem; }
.exd-sess { display:flex; flex-direction:column; gap:2px; }
.exd-sess b { font-size:.8125rem; font-weight:800; }
.exd-sess span { font-size:.8125rem; color:var(--text-dim); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.exd-more { margin-top:.6rem; }
.exd-rec { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:.75rem; align-items:baseline; }
.exd-rec-l { font-size:.8125rem; color:var(--text-dim); }
.exd-rec-v { font-size:.9rem; font-weight:800; text-align:right; font-variant-numeric:tabular-nums; }
.exd-rec-d { grid-column:1 / -1; font-size:.75rem; color:var(--text-dim); }
.exd-note { margin-top:.6rem; }
/* A record opens its exercise. The row keeps .pr-row's own hairline under it. */
.pr-row--open { width:100%; background:none; border-top:0; border-left:0; border-right:0; color:inherit; font:inherit; text-align:left; cursor:pointer; min-height:44px; }

/* ── Progress: the four cards (UX review step 6, 2026-11-15). Each card
   redraws itself; nothing here is a media query, because a card sizes to its
   own width. ── */
.pg-what { margin-top:10px; font-size:.75rem; color:var(--text-dim); }
.pg-nav { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.pg-nav b { font-size:.9rem; font-weight:700; text-align:center; }
.pg-nav-b { flex:0 0 44px; width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; padding:0; background:none; border:1px solid var(--border); border-radius:50%; color:var(--text); cursor:pointer; }
.pg-nav-b[disabled] { opacity:.35; cursor:default; }
.pg-mus { display:grid; gap:10px; margin-top:12px; }
.pg-mus-row { display:grid; grid-template-columns:6.5rem minmax(0,1fr) 2rem; align-items:center; gap:10px; font-size:.8125rem; }
.pg-mus-l { min-width:0; overflow-wrap:anywhere; }
.pg-mus-row .pg-mus-bar { height:8px; margin-top:0; }
.pg-mus-row b { text-align:right; font-size:.8125rem; font-variant-numeric:tabular-nums; }
.pg-foot { margin-top:12px; font-size:.8125rem; color:var(--text-dim); }
/* A month is seven columns however wide the card is: uncapped, a laptop
   draws each day as a circle the size of a plate. */
.pg-month { max-width:22rem; margin:12px auto 0; gap:6px; }
.scd-day.later { background:none; opacity:.45; }
.pg-none-go { display:flex; align-items:center; gap:12px; }
.pg-none-go span { flex:1 1 0; min-width:0; }

/* ── Compare two progress photos (UX review step 6, 2026-11-15) ── */
.ppc { min-width:0; margin-top:12px; }
.ppc-open { margin-top:12px; }
.ppc-picks { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.ppc-picks .form-input { margin-top:6px; }
.ppc-stage { position:relative; margin-top:12px; aspect-ratio:3 / 4; overflow:hidden; border-radius:var(--radius-md); background:var(--surface-3); touch-action:pan-y; }
.ppc-stage:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.ppc-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.ppc-top { clip-path:inset(0 0 0 var(--ppc, 50%)); }
/* The divider is the slider's position, the one place a fill is not a button. */
.ppc-line { position:absolute; top:0; bottom:0; left:var(--ppc, 50%); width:2px; margin-left:-1px; background:var(--accent); pointer-events:none; }
.ppc-line::after { content:""; position:absolute; top:50%; left:50%; width:28px; height:28px; margin:-14px 0 0 -14px; border-radius:50%; background:var(--accent); }
/* The whole photo is the slider: drag anywhere on it. */
.ppc-range { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:ew-resize; }
.ppc-caps { display:flex; justify-content:space-between; gap:12px; margin-top:8px; font-size:.8125rem; color:var(--text-dim); }

/* ── Your coach (UX review step 6): when they reply, Message, and what you
   have with them. ── */
.coach-reply { margin:2px 0 10px; font-size:.8125rem; color:var(--text-dim); }
.coach-msg { margin:4px 0 12px; }
.coach-pkg { display:grid; gap:10px; }
.coach-pkg-link { justify-self:start; }

/* ── The Calendar's running list, month view and rows (UX review step 6) ── */
.cal-run { margin-top:2px; }
.cal-run-row { display:grid; grid-template-columns:6.6rem minmax(0, 1fr) auto; align-items:center; gap:10px; width:100%; min-height:56px; padding:8px 14px; background:none; border:0; border-bottom:1px solid var(--border); color:var(--text); font:inherit; text-align:left; cursor:pointer; }
.cal-run-row:last-child { border-bottom:0; }
.cal-run-when { font-size:.75rem; color:var(--text-dim); }
.cal-run-main { min-width:0; display:flex; flex-direction:column; }
.cal-run-main b { font-size:.9rem; overflow-wrap:anywhere; }
.cal-run-main small { margin-top:1px; font-size:.8125rem; color:var(--text-dim); }
.cal-run-none { padding:6px 0 2px; font-size:.8125rem; color:var(--text-dim); }
.cal-run-more { margin-top:4px; }
.cal-rows { margin-top:20px; }
.cal-month { margin-top:12px; }
.cal-month .pg-month { max-width:none; gap:2px; }
/* A day in the month view is a button: 44px to the finger, whatever the
   card's width leaves it. A dot under the number is something booked. */
.cal-mday { position:relative; aspect-ratio:auto; height:44px; padding:0; border:0; border-radius:50%; font:inherit; font-size:.8125rem; cursor:pointer; }
.cal-mday.ahead::after { content:""; position:absolute; left:50%; bottom:5px; width:5px; height:5px; margin-left:-2.5px; border-radius:50%; background:var(--accent); }
.cal-mday.on.ahead::after { background:var(--accent-contrast); }

/* Today (the UX review, 2026-11-16): a planned rest day says so, and the
   coach's new message is one line above the tabs. */
.cn-restday { margin:14px 0 10px; font-size:.9rem; color:var(--text); }
.cn-restday span { color:var(--text-dim); }
.cn-coachline { display:block; width:100%; min-height:44px; margin:0 0 10px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); color:var(--text); font:inherit; font-size:.8125rem; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; }
.cn-coachline span { color:var(--text-muted); }
/* An exercise in a logged workout opens its history (the UX review). */
.tl-ex-open { display:inline-flex; align-items:center; min-height:44px; padding:0; background:none; border:0; color:var(--text); font:inherit; font-size:.8125rem; font-weight:700; text-align:left; cursor:pointer; }

/* Client Settings is a menu (nav.8.1): in a section the page title names it,
   so the section's own first heading would say it twice. */
#settingsContent .cset-h { display:none; }
#settingsContent .cset-sec > .section-label:first-child { margin-top:0; }

/* ADD FOOD, FASTER (the UX review, tools.12.1 to 12.4). */
.fd-search-row { display:flex; gap:8px; align-items:stretch; }
.fd-search-row .form-input { flex:1 1 auto; min-width:0; }
.fd-scan { flex:0 0 auto; width:48px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; background:transparent; border:2px solid var(--border-strong); border-radius:var(--radius-md); color:var(--text); cursor:pointer; }
.fd-back { margin-bottom:10px; }
.fd-fav { display:inline-flex; align-items:center; min-height:44px; margin-top:6px; padding:0; background:none; border:0; color:var(--text); font:inherit; font-weight:600; cursor:pointer; }
.food-meal + .food-meal { margin-top:12px; }
.food-meal-h { display:flex; justify-content:space-between; align-items:baseline; gap:8px; padding:6px 0; border-bottom:1px solid var(--border); }
.food-meal-h span { color:var(--text-dim); }
.food-meal-empty { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:44px; color:var(--text-dim); }
.food-same { min-height:44px; padding:0 4px; background:none; border:0; color:var(--text); font:inherit; font-weight:600; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }

/* Download in one tap (workout.13.1). */
.off-dl { margin-top:1rem; gap:8px; }
.off-ready { display:flex; align-items:flex-start; gap:10px; margin:1rem 0 0; color:var(--text-dim); font-size:.8125rem; }
.off-ready svg { flex:0 0 auto; margin-top:2px; color:var(--text); }

/* The laptop rail's extra places (check.5): hidden on a phone, where More holds them. */
.bottom-nav .cnav-extra { display:none; }

/* Download for offline (js/video-cache.js): under a video's card or sheet. */
.od-item { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.od-item > .od-card { margin-bottom:0; }
.vd-row { display:flex; flex-direction:column; gap:4px; margin-top:8px; }
.vd-row:has(.vd-ok) { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; }
.vd-ok { font-size:.8125rem; color:var(--text-dim); }
.vd-msg { font-size:.8125rem; color:var(--text-dim); min-height:1em; }
.vd-get { display:inline-flex; align-items:center; gap:6px; align-self:flex-start; min-height:44px; }


/* ── THE PAGE BEFORE A WORKOUT, REDESIGNED (UX audit item 2, 2026-11-22) ──
   The Train card's stills as the header with Back over them, the name in the
   look's face, chips for the counts, each exercise with "4 × 5 · rest 2:30"
   and what they did last time, then Target muscles and Equipment needed
   (ClientApp._paintWkParts), with Start pinned to the bottom. */
.rp-hero { position:relative; }
.rp-hero.has-stills { margin:0 0 .75rem; }
.rp-strip { margin:0; height:150px; border-radius:var(--radius-md); }
.rp-hero.has-stills .routine-back-btn { position:absolute; left:10px; top:10px; z-index:1; margin:0; }
.rp-title { margin:0 0 .25rem; text-wrap:balance; }
.rp-chips { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.rp-chip { font-size:.8125rem; font-weight:700; line-height:1.3; padding:4px 10px; border-radius:var(--radius-sm);
  background:var(--surface-3); color:var(--text-dim); }
.rp-top .rp-last { font-size:.8125rem; }
.rp-sub { font-size:.9rem; color:var(--text-dim); margin-top:2px; }
.rp-sub .rp-sr { font-size:1.15rem; font-weight:800; color:var(--text); }
.rp-lastset { font-size:.8125rem; color:var(--text-dim); margin-top:1px; }
#routineContent:is([data-wk="idle"], [data-wk="tm"]) .rp-still { flex:0 0 56px; width:56px; height:56px; }
#routineContent:is([data-wk="idle"], [data-wk="tm"]) :is(.ex-spec, .ex-equip-chip) { display:none; }
#routineContent[data-wk="manual"] :is(.rp-sub, .rp-lastset) { display:none; }
.wk-parts .section-label { margin-top:1.5rem; }
/* Four sit two by two rather than three and one alone. */
.wkp-grid { display:grid; grid-template-columns:repeat(var(--n, 3), minmax(0, 1fr)); gap:8px; }
.wkp { display:flex; flex-direction:column; align-items:center; text-align:center; gap:2px; min-width:0; padding:8px;
  border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); }
.wkp-pic { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; background:#fff; border-radius:var(--radius-sm); }
.wkp b { font-size:.8125rem; line-height:1.25; margin-top:4px; overflow-wrap:break-word; hyphens:auto; }
.wkp span { font-size:.75rem; line-height:1.3; color:var(--text-dim); }
/* A Target muscles tile is a button: tap for the picture large and what it does. */
.wkp-btn { font:inherit; color:inherit; cursor:pointer; width:100%; }
.wkp-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.wkm { display:grid; gap:10px; }
.wkm-pic { display:block; width:min(100%, 320px); height:auto; aspect-ratio:1; object-fit:contain; background:#fff; border-radius:var(--radius-md); margin:0 auto; }
.wkm-role { font-size:.8125rem; color:var(--text-dim); text-align:center; }
.wkm-p { margin:0; font-size:.9rem; line-height:1.5; }
.wkm-uses { margin:0; padding-left:20px; font-size:.9rem; line-height:1.6; }
#routineContent:is([data-wk="idle"], [data-wk="tm"]) #beginWorkoutBtn { position:sticky; bottom:calc(var(--bottom-h) + 10px); z-index:2;
  margin-top:1.25rem; box-shadow:0 0 0 10px var(--bg); }


/* ── MEASUREMENTS, REDESIGNED (UX audit item 1, 2026-11-22) ───────────────
   Body weight as the hero, a card per measurement, photos after, a log
   sheet filled in with the last numbers. ClientApp._bodyTopHTML. */
.bm-hero { display:block; padding:16px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); cursor:pointer; }
.bm-hero--none { cursor:default; }
.bm-hero:focus-visible, .bm-card:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.bm-hero-top { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.bm-hero-top .section-label { margin:0; }
.bm-chip { font-size:.8125rem; font-weight:700; padding:3px 9px; border-radius:var(--radius-sm); background:var(--surface-3); color:var(--text); white-space:nowrap; }
.bm-hero-val { display:flex; align-items:baseline; gap:6px; margin-top:6px; }
.bm-hero-val b { font-size:2rem; line-height:1; }
.bm-unit { font-size:1.15rem; font-weight:800; }
.bm-when { margin-left:auto; font-size:.8125rem; color:var(--text-dim); }
.bm-hero .pc-line, .bm-hero svg { margin-top:6px; }
.bm-usual { display:flex; align-items:center; gap:6px; margin-top:8px; font-size:.8125rem; color:var(--text-dim); }
.bm-hint { margin:.5rem 0 0; font-size:.9rem; color:var(--text-dim); }
.bm-sec-h { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:1.5rem; }
.bm-sec-h .rc-btn { min-height:44px; gap:4px; }
/* Three sit in one row rather than two and one alone. */
.bm-grid { display:grid; grid-template-columns:repeat(var(--n, 2), minmax(0, 1fr)); gap:10px; }
.bm-card { display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; padding:12px; text-align:left;
  border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); color:var(--text); font:inherit; cursor:pointer; }
.bm-card-name { font-size:.8125rem; font-weight:700; color:var(--text-dim); }
.bm-card-val b { font-size:1.75rem; line-height:1.1; }
.bm-card-val span { font-size:.8125rem; color:var(--text-dim); }
.bm-card-chg { font-size:.75rem; color:var(--text-dim); }
.bm-spark { display:block; width:100%; height:24px; margin-top:6px; }
.bm-spark polyline { fill:none; stroke:var(--accent); stroke-width:2; vector-effect:non-scaling-stroke; }
.bm-reads-h { margin-top:1.25rem; }
.bm-reads { display:flex; flex-direction:column; }
.bm-read { display:grid; grid-template-columns:1fr auto 4rem; align-items:baseline; gap:4px 12px; padding:10px 0; border-bottom:1px solid var(--border); }
.bm-read-d { font-size:.9rem; }
.bm-read-v b { font-size:1.15rem; }
.bm-read-c { font-size:.8125rem; color:var(--text-dim); text-align:right; }
.bm-read-n { grid-column:1 / -1; font-size:.8125rem; color:var(--text-dim); }
.bml-sub { margin:0 0 .5rem; font-size:.9rem; color:var(--text-dim); }
.bml-list { display:flex; flex-direction:column; }
.bml-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); }
.bml-row[hidden] { display:none; }
.bml-name { display:flex; flex-direction:column; min-width:0; }
.bml-name b { font-size:.9rem; }
.bml-name span { font-size:.75rem; color:var(--text-dim); }
.bml-step { display:flex; align-items:center; gap:6px; flex:none; }
.bml-pm { width:44px; height:44px; border-radius:50%; border:1px solid var(--border); background:var(--surface-1); color:var(--text);
  font-size:1.15rem; font-weight:800; display:grid; place-items:center; cursor:pointer; padding:0; }
.bml-in { width:4.75rem; min-height:44px; text-align:center; font-size:max(16px, 1rem); font-weight:800; border:1px solid var(--border);
  border-radius:var(--radius-sm); background:transparent; color:var(--text); padding:0 4px; -moz-appearance:textfield; }
.bml-in::-webkit-outer-spin-button, .bml-in::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.bml-more { margin:10px 0 4px; }
.bml-notes { margin:8px 0 12px; }


/* ── TODAY'S LOWER HALF (UX audit item 3, 2026-11-22) ─────────────────────
   The Messages tab as the conversation, small: three bubbles, the
   conversation's one-line box, then the forms waiting. Badges as one card. */
.hm-h { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; }
.hm-h .section-label { margin:0; }
.hm-list { display:flex; flex-direction:column; gap:8px; margin:6px 0 10px; }
.hm-msg { display:flex; align-items:flex-end; gap:8px; max-width:88%; }
.hm-me { align-self:flex-end; justify-content:flex-end; }
.hm-av { flex:none; width:32px; height:32px; border-radius:50%; display:grid; place-items:center; background:var(--surface-3);
  border:1px solid var(--border); font-size:.75rem; font-weight:800; color:var(--text); }
.hm-bub { display:flex; flex-direction:column; gap:3px; padding:9px 12px; border:1px solid var(--border); background:var(--surface-1);
  border-radius:var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-sm); font-size:.9rem; line-height:1.4; white-space:pre-line; overflow-wrap:break-word; min-width:0; }
.hm-me .hm-bub { border-radius:var(--radius-md) var(--radius-md) var(--radius-sm) var(--radius-md); border-color:var(--accent); }
.hm-when { font-size:.75rem; color:var(--text-dim); white-space:nowrap; }
.hm-none { margin:6px 0 10px; font-size:.9rem; color:var(--text-dim); }
.hm-box .thread-composer-row { display:flex; align-items:flex-end; gap:8px; }
.hm-box .thread-input { flex:1 1 auto; min-width:0; }
.hm-box .hm-send { background:transparent; color:var(--text); border:2px solid var(--accent); }
.hm-forms-h { margin-top:1.25rem; justify-content:flex-start; }
.hm-forms { display:flex; flex-direction:column; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); padding:2px 12px; }
.hm-form { display:flex; align-items:center; gap:10px; padding:10px 0; }
.hm-form + .hm-form { border-top:1px solid var(--border); }
.hm-form-ic { flex:none; color:var(--text); }
.hm-form-main { display:flex; flex-direction:column; min-width:0; flex:1 1 auto; }
.hm-form-main b { font-size:.9rem; }
.hm-form-main span { font-size:.75rem; color:var(--text-dim); }
.hm-form .rc-btn { flex:none; min-height:44px; }
.cn-badge { display:flex; align-items:center; gap:12px; width:100%; margin-top:16px; padding:12px 14px; text-align:left; font:inherit; color:var(--text);
  border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); cursor:pointer; }
.cn-badge-pic { flex:none; display:grid; place-items:center; }
.cn-badge-main { display:flex; flex-direction:column; min-width:0; flex:1 1 auto; }
.cn-badge-main .section-label { margin:0 0 2px; }
.cn-badge-main b { font-size:.9rem; }
.cn-badge-main > span:last-child { font-size:.75rem; color:var(--text-dim); }
.cn-badge-n { flex:none; font-size:.8125rem; font-weight:700; }


/* ── NUTRITION ON TODAY (UX audit item 4, 2026-11-22) ──────────────────────
   Calories as the hero bar, then labelled bars, the day's food by meal, one
   add, one way into the full page. ClientApp._macroBarsHtml. */
.hn-top { display:flex; justify-content:flex-end; }
.hn-link { min-height:44px; }
.hn-macs { display:flex; flex-direction:column; gap:12px; margin:14px 0 4px; }
.hn-mac-h { display:flex; align-items:baseline; justify-content:space-between; gap:8px; font-size:.9rem; }
.hn-mac-h > span b { font-size:.9rem; }
.hn-of { font-size:.8125rem; color:var(--text-dim); }
.hn-mac { min-width:0; }
.hn-water .hn-mac-h { color:var(--text); }
.hn-bar { height:8px; margin-top:5px; border-radius:var(--radius-sm); background:var(--surface-3); overflow:hidden; }
.hn-bar i { display:block; height:100%; background:var(--accent); border-radius:inherit; }
#hubPanel .hn-food-h { margin-top:1.5rem; }
.hn-meals { display:flex; flex-direction:column; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); margin-bottom:10px; }
.hn-meal { display:flex; flex-direction:column; gap:4px; width:100%; padding:10px 12px; text-align:left; font:inherit; color:var(--text); background:none; border:0; cursor:pointer; }
.hn-meal + .hn-meal { border-top:1px solid var(--border); }
.hn-meal-h { display:flex; justify-content:space-between; gap:8px; font-size:.8125rem; font-weight:800; }
.hn-meal-n { color:var(--text-dim); }
.hn-meal .np-log-row { display:flex; justify-content:space-between; gap:8px; font-size:.9rem; padding:0; border:0; }
.hn-open { display:block; margin:10px auto 0; }

/* The Calendar's lists grouped under day headings (UX audit item 7). */
.cal-run-day { margin:12px 0 6px; font-size:.8125rem; font-weight:700; color:var(--text-dim); }
.cal-run-row { grid-template-columns:5.25rem minmax(0, 1fr) auto; }
.cal-run-when { font-size:.8125rem; font-weight:700; color:var(--text); white-space:nowrap; }

/* ── THE MARKETPLACE, IN THE APP (step 2, 2026-11-22; js/market-browse.js) ── */
#cpage-market[data-mbview="page"] .page-header, #cpage-market[data-mbview="page"] #mbTop { display:none; }
html[data-tab4="market"] #cpage-market .page-header [data-cback] { display:none; }
.mb-search { display:flex; align-items:center; gap:4px; min-height:48px; border:2px solid var(--border-strong, var(--border)); border-radius:var(--radius-md); padding:0 4px 0 14px; background:transparent; }
.mb-search:focus-within { border-color:var(--accent); }
.mb-search-ic { display:grid; place-items:center; color:var(--text-dim); }
.mb-search input { flex:1; min-width:0; min-height:44px; border:0; background:transparent; color:var(--text); font:inherit; font-size:max(16px, 1rem); outline:none; }
.mb-search input::-webkit-search-cancel-button { -webkit-appearance:none; }
.mb-filter-btn { position:relative; display:grid; place-items:center; width:44px; height:44px; border:0; border-radius:50%; background:transparent; color:var(--text); cursor:pointer; }
.mb-fn { position:absolute; top:4px; right:2px; min-width:18px; height:18px; padding:0 4px; border-radius:50%; background:var(--accent); color:var(--accent-contrast, #062a2e); font-size:.75rem; font-weight:800; display:grid; place-items:center; }
.mb-chips { display:flex; gap:8px; overflow-x:auto; margin:12px -1.25rem 0; padding:0 1.25rem 2px; scrollbar-width:none; }
.mb-chips::-webkit-scrollbar { display:none; }
.mb-chips.wrap { flex-wrap:wrap; overflow:visible; margin:6px 0 0; padding:0; }
.mb-chip { flex:none; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; border-radius:var(--radius-sm); border:1px solid var(--border-strong, var(--border)); background:transparent; color:var(--text); font:inherit; font-size:.8125rem; font-weight:700; white-space:nowrap; cursor:pointer; }
.mb-chip.on { border:2px solid var(--accent); padding:0 13px; }
.mb-h { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin:24px 0 10px; }
.mb-h b { font-size:1.15rem; }
.mb-link { border:0; background:transparent; color:var(--text-dim); font:inherit; font-size:.8125rem; font-weight:700; min-height:44px; padding:0 2px; cursor:pointer; }
.mb-why { margin:-6px 0 10px; font-size:.8125rem; color:var(--text-dim); }
.mb-shelf { display:grid; grid-auto-flow:column; grid-auto-columns:min(62%, 260px); gap:12px; overflow-x:auto; margin:0 -1.25rem; padding:0 1.25rem 4px; scroll-snap-type:x mandatory; scrollbar-width:none; scroll-padding-inline:1.25rem; }
.mb-shelf::-webkit-scrollbar { display:none; }
.mb-card { scroll-snap-align:start; display:flex; flex-direction:column; text-align:left; padding:0; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); color:var(--text); font:inherit; overflow:hidden; cursor:pointer; }
.mb-cov { position:relative; display:block; aspect-ratio:3 / 2; background:var(--surface-3); overflow:hidden; }
.mb-cov img, .mb-hero-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.mb-cover-name { position:absolute; inset:0; display:grid; place-items:center; padding:10px; color:#fff; font-weight:800; font-size:.9rem; text-align:center; }
.mb-price { position:absolute; left:8px; bottom:8px; background:var(--surface-1); color:var(--text); border-radius:var(--radius-sm); padding:3px 10px; font-size:.8125rem; font-weight:800; }
.mb-tag { position:absolute; left:8px; top:8px; background:rgba(0,0,0,.62); color:#fff; border-radius:var(--radius-sm); padding:3px 9px; font-size:.75rem; font-weight:700; }
.mb-body { display:grid; gap:4px; padding:10px 12px 12px; min-width:0; }
.mb-body b { font-size:.9rem; line-height:1.25; }
.mb-by { display:flex; align-items:center; gap:7px; min-width:0; font-size:.8125rem; color:var(--text-dim); }
.mb-by > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mb-av { width:22px; height:22px; border-radius:50%; object-fit:cover; flex:none; background:var(--surface-3); }
.mb-av--init { display:grid; place-items:center; font-size:.75rem; font-weight:800; color:var(--text); }
.mb-meta { font-size:.75rem; color:var(--text-dim); }
.mb-list { display:grid; gap:12px; margin-top:12px; }
.mb-row { display:grid; grid-template-columns:112px minmax(0, 1fr); text-align:left; padding:0; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); color:var(--text); font:inherit; overflow:hidden; cursor:pointer; }
.mb-row .mb-cov { aspect-ratio:auto; min-height:112px; height:100%; }
.mb-row .mb-body { align-content:center; }
.mb-eq { display:flex; gap:6px; margin-top:4px; }
.mb-eq img { width:28px; height:28px; border-radius:var(--radius-sm); background:#fff; object-fit:contain; border:1px solid var(--border); }
.mb-goals { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.mb-goal { display:flex; align-items:center; gap:10px; min-height:64px; padding:0 12px; text-align:left; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); color:var(--text); font:inherit; cursor:pointer; }
.mb-goal b { display:block; font-size:.8125rem; line-height:1.25; }
.mb-goal small { display:block; font-size:.75rem; color:var(--text-dim); }
.mb-goal-ic { width:40px; height:40px; flex:none; border-radius:var(--radius-sm); background:var(--surface-3); display:grid; place-items:center; }
.mb-coaches { display:grid; gap:8px; }
.mb-coach { display:grid; grid-template-columns:minmax(0, 1fr) auto auto; gap:10px; align-items:center; min-height:56px; padding:8px 14px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); color:var(--text); text-decoration:none; }
.mb-coach small { font-size:.75rem; color:var(--text-dim); }
.mb-coach--lg .mb-by { font-size:.9rem; color:var(--text); font-weight:700; }
.mb-coach--lg .mb-av { width:40px; height:40px; }
.mb-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; font-size:.8125rem; color:var(--text-dim); }
.mb-bar b { color:var(--text); }
.mb-sort { display:inline-flex; align-items:center; gap:4px; min-height:44px; border:0; background:transparent; color:var(--text); font:inherit; font-size:.8125rem; font-weight:700; cursor:pointer; }
.mb-none { text-align:center; padding:32px 12px; display:grid; gap:8px; justify-items:center; }
.mb-none b { font-size:1.15rem; }
.mb-none p { margin:0; color:var(--text-dim); font-size:.9rem; }
.mb-fh { font-size:.8125rem; font-weight:700; color:var(--text-dim); margin-top:16px; }
.mb-fh:first-child { margin-top:0; }
.mb-filters { margin-bottom:16px; }
.mb-hero { position:relative; margin:-1.25rem -1.25rem 0; aspect-ratio:16 / 11; max-height:60vh; display:flex; align-items:flex-end; background:var(--surface-3); overflow:hidden; }
.mb-hero::after { content:''; position:absolute; inset:0; background:rgba(0,0,0,.45); }
.mb-hero .mb-cover-name { display:none; }
.mb-hero-top { position:absolute; z-index:1; top:calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 12px); left:1.25rem; }
.mb-pill { min-height:44px; padding:0 14px; border:0; border-radius:var(--radius-md); background:rgba(0,0,0,.5); color:#fff; font:inherit; font-size:.8125rem; font-weight:700; cursor:pointer; }
.mb-hero-in { position:relative; z-index:1; padding:16px 1.25rem; color:#fff; width:100%; display:grid; gap:4px; }
.mb-hero-in small { font-size:.75rem; font-weight:800; letter-spacing:.02em; opacity:.9; }
.mb-title { margin:0; font-size:1.75rem; line-height:1.05; color:#fff; font-family:var(--font-brand, inherit); text-transform:var(--title-case, none); }
.mb-hero-in > span { font-size:.9rem; opacity:.92; }
.mb-facts { display:grid; grid-template-columns:repeat(var(--n, 4), minmax(0, 1fr)); gap:8px; margin-top:16px; }
.mb-fact { border:1px solid var(--border); border-radius:var(--radius-md); background:var(--surface-1); padding:12px 4px; text-align:center; }
.mb-fact b { display:block; font-size:1.15rem; line-height:1.1; }
.mb-fact small { font-size:.75rem; color:var(--text-dim); }
.mb-fact--word b { font-size:.8125rem; line-height:1.4; overflow-wrap:anywhere; }
.mb-price { text-transform:none; }
/* a sheet focuses its first control as it opens: that is not a choice */
.mb-chip:focus:not(:focus-visible) { outline:none; box-shadow:none; }
.mb-chip:not(.on):focus:not(:focus-visible) { border-color:var(--border-strong, var(--border)); }
.mb-p { margin:0; font-size:.9rem; line-height:1.5; white-space:pre-line; }
.mb-shots { display:grid; grid-auto-flow:column; grid-auto-columns:min(40%, 180px); gap:10px; overflow-x:auto; margin:0 -1.25rem; padding:0 1.25rem 4px; scrollbar-width:none; }
.mb-shots::-webkit-scrollbar { display:none; }
.mb-shot { padding:0; border:1px solid var(--border); border-radius:var(--radius-md); overflow:hidden; aspect-ratio:9 / 16; background:var(--surface-3); cursor:zoom-in; }
.mb-shot img { width:100%; height:100%; object-fit:cover; display:block; }
.mb-buy { position:sticky; bottom:calc(var(--bottom-h, 64px) + 10px); z-index:2; margin-top:22px; display:flex; align-items:center; gap:14px; padding:10px 10px 10px 16px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--surface-1); }
.mb-buy-p b { display:block; font-size:1.15rem; line-height:1.1; }
.mb-buy-p small { font-size:.75rem; color:var(--text-dim); }
.mb-buy .rc-btn { flex:1; }
.mb-fine { margin:12px 0 0; font-size:.75rem; line-height:1.45; color:var(--text-dim); }

/* ── The Marketplace, step 3 (v203): hearts, stars and reviews ──
   The heart sits BESIDE the card's button (a button inside a button is not
   allowed), over the top right of the picture. */
.mb-cardw { position:relative; display:flex; scroll-snap-align:start; min-width:0; }
.mb-cardw > .mb-card { flex:1 1 auto; min-width:0; }
.mb-roww { position:relative; display:grid; min-width:0; }
.mb-roww > .mb-row .mb-body { padding-right:48px; }
.mb-heart { position:absolute; z-index:1; top:6px; right:6px; width:44px; height:44px; display:grid; place-items:center; border:0; border-radius:50%; background:rgba(0,0,0,.5); color:#fff; cursor:pointer; padding:0; }
.mb-heart.on svg path { fill:currentColor; }
.mb-heart--row { top:4px; right:4px; background:none; color:var(--text-dim); }
.mb-heart--row.on { color:var(--text); }
.mb-hero-top { right:1.25rem; display:flex; justify-content:space-between; align-items:center; }
.mb-heart--hero { position:static; }
.mb-rate { display:inline-flex; align-items:baseline; gap:4px; margin-top:4px; font-size:.8125rem; font-weight:700; }
.mb-rate small { font-weight:600; color:var(--text-dim); }
.mb-rv-avg { display:inline-flex; align-items:center; gap:6px; font-size:.8125rem; font-weight:700; }
.mb-rvs { display:grid; }
.mb-rvs > .rv:first-child { border-top:0; padding-top:0; }
.mb-rv-all { justify-self:start; margin-top:4px; }
.mb-rate small { font-size:.75rem; }

/* Featured (v204): the banner at the top of the Marketplace home. One wide
   card a swipe; the next one peeks so it reads as more than one. */
.mb-feat { display:grid; grid-auto-flow:column; grid-auto-columns:88%; gap:12px; overflow-x:auto; margin:14px -1.25rem 4px; padding:0 1.25rem 4px; scroll-snap-type:x mandatory; scroll-padding-inline:1.25rem; scrollbar-width:none; }
.mb-feat::-webkit-scrollbar { display:none; }
.mb-feat:has(> .mb-featw:only-child) { grid-auto-columns:100%; }
.mb-featw { scroll-snap-align:start; min-width:0; }
.mb-featcard { position:relative; display:block; width:100%; aspect-ratio:16 / 9; padding:0; border:0; border-radius:var(--radius-md); overflow:hidden; background:var(--surface-3); color:#fff; font:inherit; text-align:left; cursor:pointer; }
.mb-featcard .mb-cover-name { display:none; }
.mb-feat-in { position:absolute; left:0; right:0; bottom:0; display:grid; gap:2px; padding:10px 14px 12px; background:rgba(0,0,0,.6); }
.mb-feat-in small { font-size:.75rem; font-weight:700; }
.mb-feat-in b { font-size:1.15rem; font-weight:800; overflow-wrap:anywhere; }
.mb-feat-in span { font-size:.8125rem; opacity:.9; }
