/* Layout idea: one phone-width column, a quiet ledger of meals under a single loud number (kcal left); game mechanics live in chunky, pressable controls. */
:root {
  --bg: #ecefea;
  --surface: #ffffff;
  --surface-2: #f4f6f2;
  --ink: #0f1f1a;
  --muted: #5e6d66;
  --line: #dce2db;
  --ember: #e4511b;
  /* ember where text sits on it, or where it is the text: dark enough for white on it and for it on paper (4.5:1) */
  --ember-ink: #bf3d0d;
  --on-ember: #fff;
  --ember-edge: #8f2c08;
  --ember-soft: #fce6dc;
  --primary: #0f3d2e;
  --primary-edge: #082519;
  --on-primary: #ffffff;
  --gold: #a87a1c;
  --gold-soft: #f6ecd3;
  --good: #1b7f56;
  --good-soft: #ddf1e7;
  --bad: #b93a22;
  --ice: #2f7fa8;
  --ice-soft: #dceef6;
  --m-p: #1f7a5a;
  --m-c: #c48a1c;
  --m-f: #4a6fa5;
  --shadow: 0 1px 0 rgba(15, 31, 26, 0.04), 0 8px 24px -12px rgba(15, 31, 26, 0.18);
  --display: 'Bricolage Grotesque', 'Avenir Next Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Figtree', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --r: 18px;
  --r-sm: 12px;
  --hero: #0f3d2e;
  --hero-ink: #f3f8f4;
  --hero-mute: rgba(243, 248, 244, 0.7);
  --hero-line: rgba(243, 248, 244, 0.16);
  --hero-fill: #ff8a57;
  --hero-good: #7fe3b4;
  --hero-bad: #ffb4a4;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0a1310;
    --surface: #121d19;
    --surface-2: #182621;
    --ink: #eaf0ec;
    --muted: #93a39b;
    --line: #25352f;
    --ember: #ff6b36;
    --ember-ink: #ff6b36;
    --on-ember: #1a0d06;
    --ember-edge: #a93710;
    --ember-soft: #3a1e13;
    --primary: #d5f0e2;
    --primary-edge: #8dbba5;
    --on-primary: #0a1310;
    --gold: #e2b552;
    --gold-soft: #33290f;
    --good: #4cc38f;
    --good-soft: #12302a;
    --bad: #f0765e;
    --ice: #6fbce2;
    --ice-soft: #12303e;
    --m-p: #4cc38f;
    --m-c: #e2b552;
    --m-f: #86a8dc;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
    --hero: #123a2d;
    --hero-line: rgba(243, 248, 244, 0.14);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0a1310;
  --surface: #121d19;
  --surface-2: #182621;
  --ink: #eaf0ec;
  --muted: #93a39b;
  --line: #25352f;
  --ember: #ff6b36;
  --ember-ink: #ff6b36;
  --on-ember: #1a0d06;
  --ember-edge: #a93710;
  --ember-soft: #3a1e13;
  --primary: #d5f0e2;
  --primary-edge: #8dbba5;
  --on-primary: #0a1310;
  --gold: #e2b552;
  --gold-soft: #33290f;
  --good: #4cc38f;
  --good-soft: #12302a;
  --bad: #f0765e;
  --ice: #6fbce2;
  --ice-soft: #12303e;
  --m-p: #4cc38f;
  --m-c: #e2b552;
  --m-f: #86a8dc;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
  --hero: #123a2d;
  --hero-line: rgba(243, 248, 244, 0.14);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  cursor: pointer;
}
svg.ic {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.22em;
}
svg.ic.fill {
  fill: currentColor;
  stroke: none;
}
.num {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tn {
  font-variant-numeric: tabular-nums;
}
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: 6px;
}
/* a sheet takes focus when it opens so the keyboard and screen readers start inside it; it shows no ring itself */
.sheet:focus-visible {
  outline: none;
  border-radius: 22px 22px 0 0;
}

#app {
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}
@media (min-width: 560px) {
  #app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

/* Top bar */
.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  flex: none;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* the Ember mark: an open ring with an ember at its end */
.brand .mark {
  width: 20px;
  height: 20px;
  color: var(--ink);
}
.brand .mark .dot {
  fill: var(--ember);
}
.top .sp {
  flex: 1;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
}
.chip.flame svg {
  color: var(--ember);
}
.chip.flame.off svg {
  color: var(--muted);
}
.chip.flame.off {
  color: var(--muted);
}
.chip.gem svg {
  color: var(--ice);
}
.sync {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}
.sync.saving {
  background: var(--gold);
  animation: pulse 1s infinite;
}
.sync.err {
  background: var(--bad);
}
.sync.offline {
  background: var(--gold);
}
.sync.local {
  background: var(--muted);
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: none;
}
main::-webkit-scrollbar {
  display: none;
}

/* Bottom nav */
nav.tabs {
  position: relative;
  z-index: 6;
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 6px 8px 14px;
}
nav.tabs button.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0;
  border-radius: 12px;
}
nav.tabs button.tab svg {
  width: 22px;
  height: 22px;
}
nav.tabs button.tab[aria-current='page'] {
  color: var(--ink);
}
nav.tabs button.tab[aria-current='page'] svg {
  color: var(--ember);
}
.fab {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: var(--ember-ink);
  color: var(--on-ember);
  display: grid;
  place-items: center;
  margin: -22px auto 0;
  border-bottom: 4px solid var(--ember-edge);
  box-shadow: 0 10px 20px -10px var(--ember);
}
.fab svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.6;
}
.fab:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  margin-bottom: 3px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.card.flat {
  box-shadow: none;
}
.card h2,
.sec-h {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom: 4px solid var(--primary-edge);
  width: 100%;
  transition: transform 0.06s;
}
.btn:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  margin-bottom: 3px;
}
.btn.ember {
  background: var(--ember-ink);
  color: var(--on-ember);
  border-bottom-color: var(--ember-edge);
}
.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--line);
}
.btn.sm {
  height: 38px;
  font-size: 14px;
  padding: 0 14px;
  width: auto;
  border-radius: 12px;
  border-bottom-width: 3px;
}
.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.icon-btn.solid {
  background: var(--surface-2);
  color: var(--ink);
}
.link {
  color: var(--ember-ink);
  font-weight: 700;
  font-size: 14px;
}

/* Date nav + week path */
.datenav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.datenav .d {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  position: relative;
}
.wk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 2px 0;
}
.wk .node {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--line);
  border-bottom-width: 4px;
}
.wk .node svg {
  width: 18px;
  height: 18px;
}
.wk.done .node {
  background: var(--ember-ink);
  border-color: var(--ember-edge);
  color: var(--on-ember);
}
.wk.frozen .node {
  background: var(--ice-soft);
  border-color: var(--ice);
  color: var(--ice);
}
.wk.missed .node {
  color: var(--muted);
  border-style: dashed;
  border-bottom-width: 2px;
}
.wk.today .node {
  border-color: var(--ember);
  color: var(--ember);
}
.wk.sel {
  color: var(--ink);
}
.wk.sel .node {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.wk.future {
  opacity: 0.5;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
}
.ring {
  position: relative;
  width: 150px;
  height: 150px;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring .trk {
  stroke: var(--surface-2);
  fill: none;
}
.ring .zone {
  stroke: var(--good-soft);
  fill: none;
}
.ring .val {
  stroke: var(--ember);
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ring.in .val {
  stroke: var(--good);
}
.ring.over .val {
  stroke: var(--bad);
}
.ring .mid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring .mid .num {
  font-size: 40px;
  line-height: 1;
}
.ring .mid span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 5px;
  font-size: 14px;
}
.kv b {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
}
.pill.good {
  background: var(--good-soft);
  color: var(--good);
}
.pill.bad {
  background: var(--ember-soft);
  color: var(--bad);
}
.pill.gold {
  background: var(--gold-soft);
  color: var(--gold);
}
.pill.ice {
  background: var(--ice-soft);
  color: var(--ice);
}
.macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.macro .lbl {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}
.macro .val {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 600;
}
.macro .val b {
  color: var(--ink);
  font-size: 14px;
}
.bar {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ink);
  transition: width 0.4s;
}
.bar.p i {
  background: var(--m-p);
}
.bar.c i {
  background: var(--m-c);
}
.bar.f i {
  background: var(--m-f);
}
.bar.ember i {
  background: var(--ember);
}
.bar.gold i {
  background: var(--gold);
}
.bar.ice i {
  background: var(--ice);
}
.bar.good i {
  background: var(--good);
}
.bar.lg {
  height: 12px;
}

/* Quests */
.quest {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}
.quest + .quest {
  border-top: 1px solid var(--line);
}
.quest .qi {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--gold-soft);
  color: var(--gold);
  display: grid;
  place-items: center;
}
.quest.done .qi {
  background: var(--good-soft);
  color: var(--good);
}
.quest .qt {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 5px;
}
.quest .qn {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Meals */
.meal-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meal-h h2 {
  flex: 1;
}
.meal-h .k {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
}
.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  width: 100%;
}
.entry:first-of-type {
  margin-top: 10px;
}
.entry .n {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry .k {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.entry .s {
  grid-column: 1/-1;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.entry .s span.ell {
  min-width: 0;
}
a.entry {
  color: inherit;
  text-decoration: none;
}
/* a workout or a night in figures: a grid of numbers, a bar of parts, and what each part is */
.xstats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 10px;
}
.xstats > div {
  min-width: 0;
}
.xstats b {
  display: block;
  font-size: 20px;
  line-height: 1.15;
}
.xstats b small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.xstats span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.zbar {
  display: flex;
  gap: 2px;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}
.zbar i {
  min-width: 3px;
}
.zleg > div {
  display: grid;
  grid-template-columns: 10px 1fr auto 40px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13.5px;
}
.zleg > div + div {
  border-top: 1px solid var(--line);
}
.zleg i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.zleg .muted {
  text-align: right;
}
.z0 {
  background: var(--line);
}
.z1 {
  background: var(--ice);
}
.z2 {
  background: var(--good);
}
.z3 {
  background: var(--gold);
}
.z4 {
  background: var(--ember);
}
.z5 {
  background: var(--bad);
}
.s-aw {
  background: var(--line);
}
.s-li {
  background: var(--ice);
}
.s-de {
  background: var(--primary);
}
.s-re {
  background: var(--good);
}
/* payments: one request or price to a row */
.pay-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 0;
}
.pay-row + .pay-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.pay-row b,
.pay-row small {
  display: block;
}
.pay-row small {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}
.pay-row .pay-st.good {
  color: var(--good);
  font-weight: 600;
}
.pay-row .pay-st.bad {
  color: var(--bad);
  font-weight: 600;
}
.pay-acts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}
.pay-acts .link {
  font-size: 13px;
  white-space: nowrap;
}
.pay-acts a.btn {
  text-decoration: none;
}
@media (max-width: 359px) {
  /* on the narrowest phones the words keep the full width and what can be done sits beneath */
  .pay-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pay-acts {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
}
.pay-sum {
  display: block;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.entry .s .sv-view {
  margin-left: auto;
  flex: none;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.empty {
  color: var(--muted);
  font-size: 13px;
  padding-top: 8px;
}
.addline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--ember);
  font-weight: 700;
  font-size: 14px;
  width: 100%;
}
.src {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}
.src.v {
  background: var(--good-soft);
  color: var(--good);
}
.src.l {
  background: var(--ice-soft);
  color: var(--ice);
}
.src.e {
  background: var(--gold-soft);
  color: var(--gold);
}
.src.m {
  background: var(--ember-soft);
  color: var(--ember);
}

.water-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.banner {
  background: var(--gold-soft);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.banner svg {
  color: var(--gold);
  margin-top: 1px;
}

/* Sheets */
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 13, 0.5);
  z-index: 20;
  display: flex;
  align-items: flex-end;
  animation: fade 0.15s;
}
.sheet {
  background: var(--bg);
  width: 100%;
  max-height: 94%;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  animation: up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.full {
  height: 94%;
}
.sheet-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 10px 16px;
  flex: none;
}
.sheet-h h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  text-wrap: balance;
}
.sheet-b {
  overflow-y: auto;
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.sheet-f {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  flex: none;
  display: flex;
  gap: 10px;
}
@keyframes up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* Forms */
label.f {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.inp,
select.inp,
textarea.inp {
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
textarea.inp {
  height: auto;
  min-height: 110px;
  padding: 12px;
  resize: none;
  line-height: 1.4;
  font-weight: 500;
}
.inp:focus {
  outline: none;
  border-color: var(--ink);
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.seg {
  display: flex;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 6px;
}
.seg button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  height: 50px;
}
.searchbar input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  min-width: 0;
  height: 100%;
}
.searchbar svg {
  color: var(--muted);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.tile svg {
  width: 24px;
  height: 24px;
  color: var(--ember);
}
.tile:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  margin-bottom: 3px;
}
.res {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
}
.res .n {
  font-weight: 600;
  line-height: 1.25;
}
.res .k {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.res .s {
  grid-column: 1/-1;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.grp {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}
.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0 14px;
}
.list > .res:first-child,
.list > .navrow:first-child {
  border-top: 0;
}
.navrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
  font-weight: 600;
}
.navrow .ni {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--ember);
}
.nut {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 8px;
  font-size: 14px;
}
.nut b {
  font-variant-numeric: tabular-nums;
}
.nut .sub {
  padding-left: 14px;
  color: var(--muted);
}
.bigk {
  font-size: 44px;
  line-height: 1;
}
.mic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ember-ink);
  color: var(--on-ember);
  display: grid;
  place-items: center;
  border-bottom: 4px solid var(--ember-edge);
  flex: none;
}
.mic svg {
  width: 28px;
  height: 28px;
}
.mic.on {
  animation: micp 1.2s infinite;
}
@keyframes micp {
  0% {
    box-shadow: 0 0 0 0 rgba(228, 81, 27, 0.5);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(228, 81, 27, 0);
  }
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--ember);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.busy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 0;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
.rev {
  display: grid;
  grid-template-columns: 1fr 84px 30px;
  gap: 4px 8px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.rev:first-child {
  border-top: 0;
}
.rev .inp {
  height: 40px;
  text-align: right;
  padding: 0 8px;
}

/* Rewards */
.lvl {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}
.lvl .badge {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  border-bottom: 4px solid var(--primary-edge);
}
.streak-big {
  display: flex;
  align-items: center;
  gap: 12px;
}
.streak-big .fl {
  width: 56px;
  height: 56px;
  color: var(--ember);
}
.streak-big .fl.off {
  color: var(--line);
}
.streak-big .num {
  font-size: 48px;
  line-height: 1;
}
.ladder {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 10px 0 12px;
}
.ladder i {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
}
.ladder i.on {
  background: var(--ember);
}
.ach {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ac {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.ac .md {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  border: 2px solid var(--line);
}
.ac.on .md {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold);
}
.ac span {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

/* Charts */
.chart {
  width: 100%;
  height: auto;
  display: block;
}
.chart text {
  font-family: var(--body);
  font-size: 10px;
  fill: var(--muted);
  font-weight: 600;
}
.stat4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stat {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 12px;
}
.stat .num {
  font-size: 24px;
  line-height: 1.1;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.cal i {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.cal i.on {
  background: var(--ember-ink);
  color: var(--on-ember);
}
.cal i.z {
  background: var(--ice-soft);
  color: var(--ice);
}
.cal i.zone {
  background: var(--good);
  color: #fff;
}
.cal i.t {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.cal i.x {
  visibility: hidden;
}
.split {
  display: flex;
  height: 14px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-2);
}
.split i {
  display: block;
  height: 100%;
}

/* Toast + celebrate */
.toasts {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 60;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 99px;
  display: flex;
  gap: 6px;
  align-items: center;
  animation: tin 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 90%;
}
.toast.xp {
  background: var(--gold);
  color: #1b1503;
}
.toast.out {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.3s;
}
@keyframes tin {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}
.cele {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(8, 16, 13, 0.6);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade 0.2s;
}
.cele .box {
  background: var(--surface);
  border-radius: 26px;
  padding: 28px 22px 20px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.cele .em {
  width: 84px;
  height: 84px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold);
}
.cele .em.ember {
  background: var(--ember-soft);
  color: var(--ember);
}
.cele .em.good {
  background: var(--good-soft);
  color: var(--good);
}
.cele .em.ice {
  background: var(--ice-soft);
  color: var(--ice);
}
.cele .em svg {
  width: 44px;
  height: 44px;
}
.cele h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
.cele .rw {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.cele ul {
  list-style: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
.cele li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.cele li.no {
  color: var(--muted);
}
@keyframes pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
}
#confetti {
  position: absolute;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
/* before sign-in, and while a question must be answered first, only the question is on screen */
body.gate nav.tabs,
body.gate header.top .chip,
body.gate #sync,
body.gate #asFab {
  display: none !important;
}
.boot {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
}
.menu {
  position: absolute;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 200px;
}
.menu button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
}
.menu button:hover {
  background: var(--surface-2);
}
.hide {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 360px) {
  .hero {
    grid-template-columns: 128px 1fr;
  }
  .ring {
    width: 128px;
    height: 128px;
  }
  .ring .mid .num {
    font-size: 34px;
  }
}

/* v2: weight, activity, coach, boss */
.fab {
  position: relative;
  z-index: 7;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.act {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  line-height: 1.2;
}
.act svg {
  width: 22px;
  height: 22px;
  color: var(--ember);
}
.act:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  margin-bottom: 3px;
}
.act small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
}
.ms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ms span {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.ms span.on {
  background: var(--good-soft);
  color: var(--good);
}
.ms span.next {
  outline: 2px solid var(--ember);
  color: var(--ink);
}
.ms svg {
  width: 13px;
  height: 13px;
}
.boss {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
}
.boss .bi {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
}
.boss .bi svg {
  width: 28px;
  height: 28px;
}
.coach h4 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 6px;
}
.coach ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coach li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
}
.coach li svg {
  margin-top: 1px;
  color: var(--good);
}
.coach li.w svg {
  color: var(--gold);
}
.coach li.n svg {
  color: var(--ember);
}
.answer {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.5;
}
.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.thumbs img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.idea {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prog {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.prog i {
  display: block;
  height: 100%;
  background: var(--ember);
  transition: width 0.2s;
}
a.link {
  text-decoration: none;
}

/* v3: training */
.chip.you {
  padding: 0;
  width: 34px;
  justify-content: center;
}
.wkn {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  text-align: left;
  letter-spacing: -0.01em;
}
.sets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 8px;
}
.setrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sethead {
  display: flex;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.sethead span {
  flex: 1;
}
.sethead .w22 {
  flex: none;
  width: 22px;
}
.sethead .w38 {
  flex: none;
  width: 38px;
}
.sethead .w44 {
  flex: none;
  width: 44px;
}
.setrow .sn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.setrow .inp {
  height: 42px;
  text-align: center;
  padding: 0 6px;
  flex: 1;
}
.setrow.on .inp {
  background: var(--good-soft);
  border-color: transparent;
}
.tick {
  width: 44px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  border-bottom-width: 4px;
  display: grid;
  place-items: center;
  color: var(--line);
  flex: none;
  background: var(--surface);
}
.setrow.on .tick {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}
.tick:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--ember);
  height: 28px;
}
.task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}
.task:first-of-type {
  margin-top: 8px;
}
.task .tb {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}
.task .tb svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}
.task.on .tb {
  background: var(--good);
  border-color: var(--good);
}
.task.on {
  color: var(--muted);
}
.rt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 0;
}
.rtn {
  font-size: 104px;
  line-height: 1;
}
#wkRest {
  gap: 10px;
  align-items: center;
}

/* v3: coach and community */
.chip.mode {
  padding: 0 9px;
  color: var(--ink);
}
.chip.mode svg {
  color: var(--ember);
}
.chip.you.on {
  border-color: var(--ink);
}
@media (max-width: 379px) {
  .brand .bn {
    display: none;
  }
}
.crow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
}
.crow:first-child {
  border-top: 0;
}
.av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex: none;
}
.av.sm {
  width: 34px;
  height: 34px;
  background: var(--surface-2);
  color: var(--ember);
}
.av.sm svg {
  width: 18px;
  height: 18px;
}
.av.lg {
  width: 52px;
  height: 52px;
  font-size: 18px;
}
.cr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}
.rk {
  width: 18px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  flex: none;
}
.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--line);
}
.stars svg {
  width: 15px;
  height: 15px;
}
.stars svg.on {
  color: var(--gold);
}

.ccard {
  display: block;
  width: 100%;
  text-align: left;
}
.ccard > span {
  display: flex;
}
.ccard .between {
  display: flex;
}

.wdot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.wdot.on {
  background: var(--good);
  border-color: var(--good);
}
.wdot svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

button.pill.cafp {
  background: var(--surface-2);
  color: var(--ink);
  padding: 7px 11px;
  font-size: 13px;
  border: 1px solid var(--line);
}
button.pill.cafp:active {
  transform: translateY(1px);
}
main > *,
.sheet-b > * {
  flex-shrink: 0;
}

/* ---- Today, second pass: one loud budget panel, then quiet rows ---- */
.hero2 {
  background: var(--hero);
  color: var(--hero-ink);
  border-radius: 22px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.h-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.h-n {
  font-size: 60px;
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.h-cap {
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-mute);
  margin-top: 6px;
}
.h-kv {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 14px;
  font-size: 13px;
  align-items: baseline;
  padding-bottom: 2px;
}
.h-kv span {
  color: var(--hero-mute);
  font-weight: 600;
}
.h-kv b {
  text-align: right;
  font-weight: 700;
}
.gauge {
  position: relative;
  height: 16px;
  border-radius: 99px;
  background: var(--hero-line);
  margin-top: 18px;
}
.gauge i {
  position: absolute;
  top: 0;
  bottom: 0;
  display: block;
}
.gauge .gz {
  background: rgba(127, 227, 180, 0.26);
  border-left: 2px solid var(--hero-good);
  border-right: 2px solid var(--hero-good);
}
.gauge .gf {
  left: 0;
  border-radius: 99px;
  background: var(--hero-fill);
  min-width: 0;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero2.in .gf {
  background: var(--hero-good);
}
.hero2.over .gf {
  background: var(--hero-bad);
}
.gauge .gt {
  width: 2px;
  top: -4px;
  bottom: -4px;
  background: var(--hero-ink);
  margin-left: -1px;
  border-radius: 2px;
}
.g-lab {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hero-mute);
  margin-top: 9px;
}
.hero2.in .g-lab span:first-child {
  color: var(--hero-good);
}
.hero2.over .g-lab span:first-child {
  color: var(--hero-bad);
}
.h-mac {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hero-line);
}
button.h-mac {
  width: 100%;
  text-align: left;
  color: inherit;
}
.icon-btn.fav[aria-pressed='true'] {
  color: var(--gold);
}
.nut b small {
  font-weight: 600;
  font-size: 12px;
}
.hm-l {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.hm-v {
  font-size: 12px;
  color: var(--hero-mute);
  margin-top: 6px;
  font-weight: 600;
}
.hm-v b {
  color: var(--hero-ink);
  font-size: 15px;
}
.bar.hb {
  height: 6px;
  background: var(--hero-line);
}
.bar.hb.p i {
  background: #7fe3b4;
}
.bar.hb.c i {
  background: #f2c866;
}
.bar.hb.f i {
  background: #a9c4ee;
}
@media (max-width: 360px) {
  .h-n {
    font-size: 50px;
  }
}

.next {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--ember-soft);
  border-radius: var(--r);
  padding: 14px 16px;
}
.next .nx-i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ember);
  display: grid;
  place-items: center;
  flex: none;
}
.next h2 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
}
.next p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.rail-w {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.rail-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.rail-h h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 4px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.rail::-webkit-scrollbar {
  display: none;
}
.chipf {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  max-width: 210px;
  padding: 9px 13px 9px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--line);
  text-align: left;
  scroll-snap-align: start;
}
.chipf > svg {
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 9px;
  background: var(--ember-soft);
  color: var(--ember);
  stroke-width: 2.6;
}
.chipf span {
  min-width: 0;
  display: block;
}
.chipf b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chipf small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chipf:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
  margin-bottom: 2px;
}
.chipf[disabled] {
  opacity: 0.5;
}

.card.meals {
  padding: 4px 16px;
}
.ml {
  padding: 8px 0;
}
.ml + .ml {
  border-top: 1px solid var(--line);
}
.ml-h {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ml-t {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 2px 0;
}
.ml-t h2 {
  font-size: 17px;
}
.ml-t small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 1px;
}
.ml-k {
  font-weight: 700;
  font-size: 15px;
  margin-right: 2px;
}
.ml-k small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.ml-add {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--ember-soft);
  color: var(--ember);
  display: grid;
  place-items: center;
  flex: none;
}
.ml-add svg {
  stroke-width: 2.6;
}
.ml-add:active {
  transform: scale(0.94);
}
.ml .entry:first-of-type {
  margin-top: 8px;
}

.trks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.trk {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.trk-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
}
.trk-h svg {
  width: 16px;
  height: 16px;
}
.trk-v {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin: 6px 0 8px;
  white-space: nowrap;
}
.trk-v .num {
  font-size: 26px;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.trk .bar {
  height: 6px;
}
.trk-s {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.3;
  min-height: 31px;
}
.trk-a {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.tkb {
  height: 36px;
  min-width: 36px;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  white-space: nowrap;
}
.tkb.w {
  flex: 1;
}
.tkb svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}
.tkb:active {
  transform: translateY(1px);
  background: var(--line);
}

.qs {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}
.qs-p {
  display: flex;
  gap: -4px;
}
.qs-p i {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-style: normal;
  margin-right: -6px;
  border: 2px solid var(--surface);
}
.qs-p i:last-child {
  margin-right: 0;
}
.qs-p i.on {
  background: var(--good-soft);
  color: var(--good);
}
.qs-p svg {
  width: 15px;
  height: 15px;
}
.qs b {
  display: block;
  font-size: 14px;
}
.qs small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.3;
}

/* ---- Add, second pass ---- */
.say {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 12px 12px 12px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom: 4px solid var(--primary-edge);
}
.say:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
  margin-bottom: 3px;
}
.say .say-i {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--ember-ink);
  color: var(--on-ember);
  display: grid;
  place-items: center;
  flex: none;
}
.say .say-i svg {
  width: 22px;
  height: 22px;
}
.say b {
  display: block;
  font-size: 15px;
}
.say small {
  display: block;
  font-size: 12.5px;
  opacity: 0.72;
  font-weight: 500;
  margin-top: 1px;
}
.say > svg {
  opacity: 0.6;
}
.say.slim {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--line);
  padding: 10px 12px;
  margin-bottom: 4px;
}
.say.slim .say-i {
  width: 36px;
  height: 36px;
  background: var(--ember-soft);
  color: var(--ember);
}
.tiles.t3 {
  grid-template-columns: repeat(3, 1fr);
}
.tiles.t3 .tile {
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  padding: 12px 6px;
  font-size: 13px;
}
.tiles.t3 .tile svg {
  width: 20px;
  height: 20px;
}
.also {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.also button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 34px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.also button svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.also button:active {
  background: var(--line);
}
.frow {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.list > .frow:first-child {
  border-top: 0;
}
.frow .res {
  border-top: 0;
  flex: 1;
  min-width: 0;
}
.res .k small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.res .s .ell {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qadd {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--ember-soft);
  color: var(--ember);
  display: grid;
  place-items: center;
  flex: none;
  transition:
    background 0.15s,
    color 0.15s;
}
.qadd svg {
  stroke-width: 2.6;
}
.qadd:active {
  transform: scale(0.92);
}
.qadd.ok {
  background: var(--good);
  color: #fff;
}
.yrow {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 12px 12px 14px;
}
.yrow b {
  display: block;
  font-size: 14px;
}
.yrow .grow small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.yrow > span {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.yrow > span small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
#addList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#addList .grp {
  margin-top: 4px;
}
#addFoot {
  align-items: center;
}
.toast button {
  pointer-events: auto;
  color: var(--ember);
  font-weight: 800;
  font-size: 14px;
  margin-left: 6px;
  padding: 2px 4px;
}
.toasts .toast {
  pointer-events: none;
}
.toasts .toast button {
  pointer-events: auto;
}
@media (max-width: 360px) {
  .rail-h .muted {
    display: none;
  }
}
.g-lab span:last-child {
  white-space: nowrap;
}

/* ---- drinks ---- */
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.opts button {
  height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.opts button[aria-pressed='true'] {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
label.dim {
  opacity: 0.4;
  pointer-events: none;
}
.qadd.alt {
  background: var(--surface-2);
  color: var(--muted);
}
.qadd.alt svg {
  stroke-width: 2;
  width: 18px;
  height: 18px;
}
.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 0;
}
.chk .tb {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}
.chk .tb svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}
.chk[aria-pressed='true'] .tb {
  background: var(--good);
  border-color: var(--good);
}
.card > .frow:first-of-type {
  border-top: 0;
}

/* ---- Train, second pass ---- */
.tweek-w {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tw {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 2px 0;
}
.tw .node {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--muted);
}
.tw .node svg {
  width: 18px;
  height: 18px;
}
.tw.train .node {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.tw.cond .node {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--gold);
}
.tw.rehab .node {
  background: var(--ice-soft);
  border-color: var(--ice-soft);
  color: var(--ice);
}
.tw.move .node {
  background: var(--surface-2);
  border-color: var(--surface-2);
  color: var(--ink);
}
.tw.now {
  color: var(--ink);
}
.tw.now .node {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}
.tw.future {
  opacity: 0.5;
}
.thero {
  background: var(--hero);
  color: var(--hero-ink);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.th-k {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hero-mute);
}
.th-t {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-top: 4px;
  text-wrap: balance;
}
.th-f {
  font-size: 14px;
  color: var(--hero-mute);
  margin-top: 6px;
  line-height: 1.35;
}
.th-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hero-good);
  margin-bottom: 10px;
}
.th-done svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}
.th-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.th-meta span {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--hero-line);
}
.th-list {
  border-top: 1px solid var(--hero-line);
}
.th-x {
  display: grid;
  grid-template-columns: 1fr auto 92px;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hero-line);
  font-size: 14px;
  align-items: baseline;
}
.th-x span:first-child {
  font-weight: 600;
}
.th-x span:nth-child(2) {
  color: var(--hero-mute);
  font-size: 13px;
}
.th-x b {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}
.th-x b.up {
  color: var(--hero-good);
}
.th-x b i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(127, 227, 180, 0.2);
  vertical-align: 1px;
}
.th-more {
  font-size: 12px;
  color: var(--hero-mute);
  padding-top: 8px;
}
.th-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: -2px;
}
.th-links button {
  color: var(--hero-ink);
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: var(--hero-mute);
  text-underline-offset: 3px;
}
.th-rd {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-top: 1px solid var(--hero-line);
  padding-top: 14px;
  width: 100%;
  color: inherit;
}
.th-rd .num {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.th-rd b {
  display: block;
  font-size: 14px;
}
.th-rd small {
  display: block;
  font-size: 12px;
  color: var(--hero-mute);
  line-height: 1.35;
  margin-top: 1px;
}
.th-rd .band.good {
  color: var(--hero-good);
}
.th-rd .band.gold {
  color: #f2c866;
}
.th-rd .band.bad {
  color: var(--hero-bad);
}
.th-rdi {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--hero-line);
  display: grid;
  place-items: center;
  flex: none;
}
.th-redo {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--hero-mute);
  flex: none;
}
.th-rd > svg {
  opacity: 0.6;
  flex: none;
}
.btn.onhero {
  background: var(--hero-line);
  color: var(--hero-ink);
  border-bottom-color: rgba(0, 0, 0, 0.28);
}
.rcard {
  flex: none;
  width: 168px;
  text-align: left;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-snap-align: start;
}
.rcard b {
  font-size: 14px;
  line-height: 1.2;
}
.rcard small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  flex: 1;
}
.rcard span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ember);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.rcard span svg {
  width: 14px;
  height: 14px;
}
.rcard:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
  margin-bottom: 2px;
}
.phs {
  display: flex;
  gap: 4px;
}
.phs i {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--surface-2);
}
.phs i.done {
  background: var(--good);
}
.phs i.on {
  background: var(--ember);
}
.stat4.row4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat4.row4 .stat {
  padding: 10px 8px;
}
.stat4.row4 .num {
  font-size: 20px;
}
.sheet-f .btn.ghost {
  white-space: nowrap;
  padding: 0 14px;
}

/* ---- Calendar ---- */
.datenav button.d {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 12px;
}
.datenav button.d svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.calhd {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  margin-bottom: 6px;
}
.calgrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.cd {
  position: relative;
  height: 50px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 0 6px;
}
.cd b {
  font-size: 14px;
  line-height: 1;
}
.cd.out {
  opacity: 0.36;
}
.cd.now b {
  color: var(--ember);
}
.cd.sel {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.cd.sel.now b {
  color: inherit;
}
.cm {
  display: flex;
  gap: 3px;
  height: 7px;
  align-items: center;
}
.cm i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  display: block;
  flex: none;
}
.cm i.train.done,
.cm i.act {
  background: var(--primary);
}
.cm i.rehab {
  border-color: var(--ice);
}
.cm i.rehab.done {
  background: var(--ice);
}
.cm i.ev {
  border-color: var(--gold);
}
.cm i.ev.done {
  background: var(--gold);
}
.cm i.miss {
  border-color: var(--bad);
  border-style: dotted;
}
.cm i.skip {
  opacity: 0.35;
}
.cd.sel .cm i {
  border-color: currentColor;
}
.cd.sel .cm i.done {
  background: currentColor;
}
.cd u,
u.lg {
  display: block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--ember);
}
.cd u {
  position: absolute;
  bottom: 4px;
}
.cd u.zn {
  background: var(--good);
}
.cd.sel u {
  background: currentColor;
}
.ag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.ag:first-child {
  border-top: 0;
}
.ag .tm {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  width: 38px;
  flex: none;
}
.ag-i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-2);
  color: var(--muted);
}
.ag-i svg {
  width: 18px;
  height: 18px;
}
.ag-i.train {
  background: var(--primary);
  color: var(--on-primary);
}
.ag-i.rehab {
  background: var(--ice-soft);
  color: var(--ice);
}
.ag-i.ev {
  background: var(--gold-soft);
  color: var(--gold);
}
.ag-i.miss {
  background: var(--ember-soft);
  color: var(--bad);
}
.ag.done .ag-i.train {
  background: var(--good);
  color: #fff;
}
.ag.done .ag-i.rehab {
  background: var(--good);
  color: #fff;
}
.ag b {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.ag small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.ag-t {
  text-align: left;
  min-width: 0;
}
.ag.done .ag-t b {
  color: var(--muted);
}
.tick.sm {
  width: 38px;
  height: 36px;
}
.tick[aria-pressed='true'] {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}
.wds {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.wds button {
  height: 42px;
  border-radius: 13px;
  background: var(--surface-2);
  font-weight: 800;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 3px solid var(--line);
}
.wds button[aria-pressed='true'] {
  background: var(--primary);
  color: var(--on-primary);
  border-bottom-color: var(--primary-edge);
}
.pstrip {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 14px;
}
.pstrip > svg:first-child {
  color: var(--ember);
  width: 22px;
  height: 22px;
}
.pstrip > svg:last-child {
  color: var(--muted);
}
.pstrip b {
  display: block;
  font-size: 14px;
}
.pstrip small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.3;
}
button.tw {
  cursor: pointer;
}
.tw.plan .node {
  border-style: dashed;
  border-color: var(--primary);
  color: var(--primary);
}
.tw.miss .node {
  border-style: dashed;
  border-color: var(--bad);
  color: var(--bad);
}

/* ---- messages ---- */
.sheet-b.chat {
  gap: 2px;
  padding-bottom: 10px;
}
.ch-d {
  align-self: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 0 2px;
}
.bub {
  position: relative;
  max-width: 82%;
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 12px;
  margin-top: 6px;
  -webkit-touch-callout: none;
}
/* messages one after another from the same person sit close; only the last of a run has the tail */
.bub.run {
  margin-top: 0;
}
.bub.tail {
  border-radius: 18px 18px 18px 6px;
}
.bub.me.tail {
  border-radius: 18px 18px 6px 18px;
}
.bub.has-rx {
  margin-top: 16px;
}
.bub p {
  font-size: 15px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bub span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
}
.bub.me {
  align-self: flex-end;
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.bub.me span {
  color: inherit;
  opacity: 0.7;
}
.chat-f {
  flex: none;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
}
.chat-f textarea {
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  flex: 1;
}
.chat-f .btn.sm {
  height: 44px;
  width: 48px;
  padding: 0;
}
.also.ch-q {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
.also.ch-q::-webkit-scrollbar {
  display: none;
}
.also.ch-q button {
  flex: none;
  padding: 0 12px;
}
.pstrip.hot {
  border-color: var(--ember);
  background: var(--ember-soft);
}
.pstrip small.ell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill svg {
  width: 13px;
  height: 13px;
}
/* ---- progress photos ---- */
.phg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pht {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface-2);
  display: block;
  width: 100%;
}
.pht img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pht span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
  line-height: 1.25;
}
.pht span b {
  display: block;
  font-size: 12px;
}
.pht.sm {
  flex: none;
  width: 84px;
}
.pht.sm.on {
  outline: 3px solid var(--ember);
  outline-offset: -3px;
}
/* the consent tick on the sign-in form */
.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.agree input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--ember);
}
/* live barcode scanner */
.scan {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 34vh;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.scan video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scan-line {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: var(--ember);
  opacity: 0.85;
}
.phprev {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--surface-2);
}
.phbig {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 16px;
  background: var(--surface-2);
}
.cmp {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 3/4;
}
.cmp img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cmp i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.cmp span {
  position: absolute;
  top: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 9px;
  border-radius: 99px;
}
.cmp .l {
  left: 10px;
}
.cmp .r {
  right: 10px;
}
#cmpBody input[type='range'] {
  width: 100%;
  accent-color: var(--ember);
}

/* ---- plan, week by week ---- */
.top {
  gap: 6px;
}
.chip {
  padding: 0 10px;
}
.chip.you {
  padding: 0;
  width: 34px;
  justify-content: center;
}
.pwk {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pwk h2 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pr {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.pr:first-child {
  border-top: 0;
}
.pd {
  width: 32px;
  flex: none;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.15;
}
.pd b {
  display: block;
}
.pd span {
  font-size: 16px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}
.pd.now b,
.pd.now span {
  color: var(--ember);
}
.pr-i {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--primary);
  color: var(--on-primary);
}
.pr-i svg {
  width: 17px;
  height: 17px;
}
.pr.rehab .pr-i {
  background: var(--ice-soft);
  color: var(--ice);
}
.pr.ev .pr-i {
  background: var(--gold-soft);
  color: var(--gold);
}
.pr.done .pr-i {
  background: var(--good);
  color: #fff;
}
.pr.miss .pr-i {
  background: var(--ember-soft);
  color: var(--bad);
}
.pr b {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.pr small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.pr > svg {
  color: var(--muted);
  width: 16px;
  height: 16px;
  flex: none;
}
.pr .ell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pr.rest {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
}
.pr.done b {
  color: var(--muted);
}

/* ---- assistant ---- */
.asfab {
  position: absolute;
  right: 14px;
  bottom: 96px;
  z-index: 5;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  border-bottom: 4px solid var(--primary-edge);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
}
.asfab svg {
  width: 24px;
  height: 24px;
}
.asfab:active {
  transform: translateY(3px);
  border-bottom-width: 1px;
}
/* the voice panel: opens from the talk button, over whatever screen is showing */
.vo {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 90px;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 6px 6px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.45);
  animation: voIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes voIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}
.vo-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 96px;
  max-height: 46vh;
  padding-bottom: 8px;
}
.vo-main #voOut {
  overflow-y: auto;
  min-height: 0;
}
.vo-st {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 16px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.vo-bars {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}
.vo-bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--ember);
  transform-origin: center;
  animation: voBar 0.9s ease-in-out infinite;
}
.vo-bars i:nth-child(2) {
  animation-delay: 0.15s;
}
.vo-bars i:nth-child(3) {
  animation-delay: 0.3s;
}
.vo-bars i:nth-child(4) {
  animation-delay: 0.45s;
}
@keyframes voBar {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}
.vo .vo-live {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 650;
  color: var(--ink);
  min-height: 25px;
  padding: 0;
  overflow-wrap: anywhere;
}
.vo .vo-live.ph {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
.vo-names {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.vo-heard {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.vo .as-dots {
  padding: 10px 0 2px;
}
.vo-say {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.vo-say.muted {
  color: var(--muted);
}
.vo-ok {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vo-ok .grow {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.vo-ok b {
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.vo-tick {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  display: grid;
  place-items: center;
  animation: voPop 0.32s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.vo-tick svg {
  width: 20px;
  height: 20px;
  stroke-width: 3;
  stroke-dasharray: 26;
  animation: voDraw 0.36s 0.12s ease-out backwards;
}
@keyframes voPop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
@keyframes voDraw {
  from {
    stroke-dashoffset: 26;
  }
}
.vo-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.vo-acts .btn.sm {
  width: auto;
  flex: none;
}
.vo-acts .vo-chat {
  margin-left: auto;
  min-height: 36px;
  padding: 0 4px;
  font-size: 13px;
}
.vo-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.vo-opts .vo-chip {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14.5px;
}
.vo-opts .vo-chip:active {
  background: var(--surface-2);
}
.vo-heard.small {
  font-size: 12.5px;
  margin-bottom: 4px;
}
.vo-chip {
  min-height: 36px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
}
.vo-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.vo-side .mic.as-mic {
  width: 52px;
  height: 52px;
}
.mic.as-mic {
  width: 48px;
  height: 48px;
  border-bottom-width: 3px;
}
.mic.as-mic svg {
  width: 22px;
  height: 22px;
}
.as-live {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  min-height: 20px;
  padding: 0 2px;
}
.as-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  align-self: center;
  max-width: 92%;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--good);
  background: var(--good-soft);
  border-radius: 12px;
  padding: 7px 11px;
  line-height: 1.35;
}
.as-note svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
  margin-top: 2px;
  flex: none;
}
.as-card {
  background: var(--surface);
  border: 1.5px solid var(--ember);
  border-radius: 18px;
  padding: 12px 14px;
  align-self: stretch;
}
.as-it {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.as-it .grow {
  min-width: 0;
}
.as-card .between + .as-it {
  margin-top: 8px;
}
.as-card .opts button {
  height: 32px;
  font-size: 12.5px;
  padding: 0 10px;
}
.as-dots {
  display: flex;
  gap: 5px;
  padding: 14px 14px;
}
.as-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1s infinite;
}
.as-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.as-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
main {
  padding-bottom: 84px;
}

/* ---- trackers and drink sheet: room to breathe on narrow phones ---- */
.trks .trk.wide {
  grid-column: 1/-1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.trk.wide .trk-l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.trk.wide .trk-a {
  margin-top: 0;
  flex: none;
  max-width: 56%;
}
.trk.wide .trk-s {
  min-height: 0;
}
.trk.wide .tkb.w {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0 12px;
}
.tkb .ell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tkb {
  height: 40px;
  min-width: 40px;
}
.trk .tkb.w {
  min-width: 0;
  overflow: hidden;
}
.dk-amt {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  align-items: end;
}
.dk-mac {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.dk-mac span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.dk-mac b {
  display: block;
  font-size: 16px;
  color: var(--ink);
  font-family: var(--display);
}
.opts button {
  flex: 1 0 auto;
}
@media (max-width: 350px) {
  .trk:not(.wide) .tkb:not(.w) {
    display: none;
  }
}

/* ---- meals: the meal name sits on a tinted band, the foods sit on white beneath it ---- */
.card.meals {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ml {
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.ml + .ml {
  border-top: 1px solid var(--line);
}
.ml-h {
  background: var(--surface-2);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  padding: 10px 10px 10px 16px;
  gap: 6px;
}
.ml-t h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.ml-t small {
  margin-top: 2px;
}
.ml-k {
  font-size: 17px;
  font-weight: 800;
  font-family: var(--display);
}
.ml-k small {
  font-family: var(--body, inherit);
}
.ml-add {
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}
.ml .entry {
  padding: 11px 16px;
  margin: 0;
}
.ml .entry:first-of-type {
  margin-top: 0;
  border-top: 0;
}
.ml .entry .n {
  font-size: 15px;
  font-weight: 500;
}
.ml .entry .k {
  font-size: 15px;
  font-weight: 600;
}

/* ---- gym ---- */
.wds button small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.75;
  line-height: 1.1;
}
.wds button {
  line-height: 1.15;
  height: 46px;
}
.slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.slots button {
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  font-weight: 700;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.slots button[disabled] {
  opacity: 0.32;
  text-decoration: line-through;
}
.slots button[aria-pressed='true'] {
  background: var(--ember-ink);
  color: var(--on-ember);
}
.gbars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 70px;
  margin-top: 12px;
}
.gbars i {
  flex: 1;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  opacity: 0.85;
}
small.bad {
  color: var(--bad);
}
.pr .pd b {
  font-size: 13px;
  color: var(--ink);
}
.ag .btn.sm {
  flex: none;
}
.ag .btn.sm svg {
  width: 14px;
  height: 14px;
}
[data-act='gSess'] .pd {
  width: 46px;
  text-align: left;
}

/* ---- targets: show what changed ---- */
.card.chg {
  border-color: var(--ember);
}
.tg-chg {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  background: var(--ember-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}
.tg-chg span {
  flex: 1;
  min-width: 150px;
}
.tg-chg .btn.sm {
  flex: none;
}
.tg-chg .btn.sm svg {
  width: 15px;
  height: 15px;
}
small.was {
  font-size: 11px;
  font-weight: 600;
  color: var(--ember);
  margin-left: 4px;
}

/* ---- chef ---- */
.cook {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.55;
  margin-top: 8px;
}
.card.idea .btn.sm svg {
  width: 15px;
  height: 15px;
}
.card.idea .between {
  align-items: flex-start;
  gap: 10px;
}
.card.idea .between .pill {
  white-space: nowrap;
  flex: none;
  margin-top: 2px;
}

.fit {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-weight: 600;
}
.fit svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
  margin-top: 3px;
  flex: none;
}
.fit.ok {
  color: var(--good);
}
.fit.no {
  color: var(--bad);
}

/* ---- body card ---- */
.card.body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  text-align: left;
}
.rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ring2 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ring2 svg {
  width: 86px;
  height: 86px;
}
.ring2 circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}
.ring2 .tr {
  stroke: var(--surface-2);
}
.ring2 b {
  position: absolute;
  top: 31px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ring2 span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.ring2.good .fg {
  stroke: var(--good);
}
.ring2.gold .fg {
  stroke: var(--gold);
}
.ring2.bad .fg {
  stroke: var(--bad);
}
.ring2.ice .fg {
  stroke: var(--ice);
}
.ring2.slp .fg {
  stroke: var(--primary);
}
.bstats {
  display: flex;
  gap: 6px 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.bstats b {
  color: var(--ink);
  font-size: 14px;
}
.gbars i.b-good {
  background: var(--good);
}
.gbars i.b-gold {
  background: var(--gold);
}
.gbars i.b-bad {
  background: var(--bad);
}
.gbars i.b-ice {
  background: var(--ice);
}
.gbars i.b-slp {
  background: var(--primary);
}
.banner.demo {
  background: var(--gold-soft);
  color: var(--ink);
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 4;
}
.banner.demo svg {
  color: var(--gold);
}
.banner.demo span {
  flex: 1;
  font-size: 13px;
  line-height: 1.35;
}
.banner.demo .btn.sm {
  flex: none;
}
/* ---- rest-day hero ---- */
.th-sug {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: inherit;
  padding: 11px 0;
  border-bottom: 1px solid var(--hero-line);
}
.th-sug > svg:first-child {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 11px;
  background: var(--hero-line);
  flex: none;
}
.th-sug > svg:last-child {
  opacity: 0.55;
  flex: none;
  width: 16px;
  height: 16px;
}
.th-sug b {
  display: block;
  font-size: 14.5px;
}
.th-sug small {
  display: block;
  font-size: 12.5px;
  color: var(--hero-mute);
  line-height: 1.35;
  margin-top: 1px;
}
.th-next {
  font-size: 13px;
  color: var(--hero-mute);
}
.th-next b {
  color: var(--hero-ink);
}
/* ---- top bar and You page ---- */
.top {
  padding: 12px 16px 10px;
}
.chip {
  height: 36px;
}
#chipYou {
  width: 38px;
  height: 38px;
  border: 0;
  padding: 3px;
  background: conic-gradient(var(--ember) calc(var(--p, 0) * 1%), var(--line) 0);
}
#chipYou span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
#chipYou.on span {
  background: var(--primary);
  color: var(--on-primary);
}
.phero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--hero);
  color: var(--hero-ink);
  border-radius: 22px;
  padding: 18px;
}
.phero h2 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.phero .small {
  color: var(--hero-mute);
  margin-top: 2px;
}
.pav {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--hero-line);
  color: var(--hero-ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--hero-line);
}
.pstats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.pstats div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
}
.pstats b {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}
.pstats span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.mgrp {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mgrp h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding-left: 4px;
}
.card.mlist {
  padding: 2px 14px;
}
.mlist .navrow {
  padding: 12px 0;
}
.mlist .navrow:first-child {
  border-top: 0;
}
.navrow b {
  display: block;
  font-weight: 700;
  font-size: 15px;
}
.navrow small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}
.navrow > svg {
  color: var(--muted);
  width: 16px;
  height: 16px;
  flex: none;
}

/* ---- amount and unit ---- */
.amt {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.amt div.f {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.amt div.f > label {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
.stp {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.stp button {
  width: 40px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface-2);
}
.stp button svg {
  width: 16px;
  height: 16px;
}
.stp button:active {
  background: var(--line);
}
.stp .inp {
  border: 0;
  border-radius: 0;
  text-align: center;
  min-width: 0;
  padding-left: 4px;
  padding-right: 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: transparent;
}
.amt + .amt {
  margin-top: -2px;
}
.tot {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  min-width: 0;
}
.tot b {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 4px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
#fdChips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: -4px;
}
.chipb {
  min-width: 40px;
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.chipb[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* Phone edges: stay clear of the notch and the home bar, when installed to a home screen or inside the phone app.
   In an ordinary browser tab these insets are zero and nothing changes. */
#app {
  padding-top: env(safe-area-inset-top);
}
/* A phone with a home bar: the tab bar gains only as much as it needs to keep its labels clear of the bar
   (12px on an iPhone), not the whole inset on top of its own padding. Everything that floats above the tab
   bar rises by the same amount, so the talk button is never cut off by it. */
:root {
  --nav-extra: max(0px, calc(env(safe-area-inset-bottom, 0px) - 22px));
}
nav.tabs {
  padding-bottom: calc(14px + var(--nav-extra));
}
.asfab {
  bottom: calc(96px + var(--nav-extra));
}
.vo {
  bottom: calc(90px + var(--nav-extra));
}
.toasts {
  bottom: calc(104px + var(--nav-extra));
}
.sheet {
  padding-bottom: env(safe-area-inset-bottom);
}
/* a chart bar opens its day */
svg .hit {
  cursor: pointer;
}
/* printing a review: only the page asked for, on white, without the app around it */
@media print {
  body * {
    visibility: hidden;
  }
  .printable,
  .printable * {
    visibility: visible;
  }
  .printable {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    overflow: visible !important;
    max-height: none !important;
    background: #fff;
    color: #000;
  }
  .sheet,
  .scrim {
    position: static !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }
  .noprint {
    display: none !important;
  }
}
/* ---- squads ---- */
.sqlist {
  display: flex;
  flex-direction: column;
}
.sqrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  min-width: 0;
}
.sqrow:first-child {
  border-top: 0;
  padding-top: 2px;
}
.sqrow .grow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sqrow b {
  font-size: 15.5px;
}
.sqrow small {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.sqrow > svg {
  color: var(--muted);
  flex: none;
}
.sq-ch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}
.sq-code {
  font-size: 30px;
  letter-spacing: 0.14em;
}
/* ---- meal plan ---- */
.mp-meal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.mp-meal:first-child {
  border-top: 0;
}
.mp-meal .grow {
  min-width: 0;
}
.mp-meal p {
  margin: 2px 0 4px;
}
.mp-shop {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
}
.pstrip.note small {
  line-height: 1.45;
}

/* ---------- what to build next ---------- */
.rm-list {
  padding: 2px 14px;
}
.rm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.rm-row:last-child {
  border-bottom: 0;
}
.rm-row b {
  font-weight: 650;
}
.rm-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.rm-row.done b {
  color: var(--muted);
}
.rm-vote {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
  min-height: 52px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  font-size: 14px;
}
.rm-vote .ic {
  width: 16px;
  height: 16px;
}
.rm-vote.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.rm-n {
  flex: none;
  min-width: 52px;
  text-align: center;
  color: var(--muted);
  font-weight: 650;
}

/* ---------- a question that must be answered first (health information, the age stop): one card, centred ---------- */
.gate-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  width: min(380px, 100%);
  margin: 0 auto;
  padding: 8px 0 24px;
}
.gate-card {
  text-align: left;
}

/* ---------- signed out: the sign-in screen ----------
   A full-width panel in the app's own deep green with the name, the promise and a small picture of a day
   being logged; the form sits over its lower edge. On a wide screen the panel takes the left half. */
body.gate-signin header.top {
  display: none;
}
body.gate-signin #app {
  max-width: none;
  border: 0;
  padding-top: 0;
}
body.gate-signin main {
  padding: 0;
  gap: 0;
}
.gate-wrap.si {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  width: auto;
  margin: 0;
  padding: 0;
}
.gate-hero {
  background: var(--hero);
  color: var(--hero-ink);
  padding: calc(18px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 58px
    max(20px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gate-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.gate-brand .mark {
  width: 22px;
  height: 22px;
}
.gate-brand .mark .dot {
  fill: var(--hero-fill);
}
.gate-hero h1 {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(28px, 8.6vw, 38px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 13em;
  min-height: 2.08em; /* two lines, so the picture below does not move when the headline changes */
}
.gate-wrap.si.is-back .gate-hero h1 {
  min-height: 0;
}
/* the picture: an example day */
.gd {
  border: 1px solid var(--hero-line);
  border-radius: 20px;
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, 0.04);
}
.gd-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hero-mute);
}
.gd-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.gd-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gd-streak .ic {
  width: 14px;
  height: 14px;
  color: var(--hero-fill);
  fill: var(--hero-fill);
}
.gd-streak b {
  color: var(--hero-ink);
}
.gd-num {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}
.gd-num .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.gd-num span {
  font-size: 13px;
  font-weight: 600;
  color: var(--hero-mute);
}
.gd-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--hero-line);
  margin-top: 10px;
  overflow: hidden;
}
.gd-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--hero-fill);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gd-say {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 600;
}
.gd-say .ic {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--hero-fill);
}
.gd-say #gdIcon {
  display: inline-flex;
}
.gd-say .typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--hero-ink);
  animation: pulse 0.9s infinite;
}
.gd-rows {
  margin-top: 4px;
}
.gd {
  min-height: 262px;
  display: flex;
  flex-direction: column;
}
.gd[data-k='log'] .gd-rows {
  min-height: 132px;
}
.gd-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gd-right .ic {
  width: 14px;
  height: 14px;
  color: var(--hero-fill);
  fill: var(--hero-fill);
}
.gd-right b {
  color: var(--hero-ink);
}
.gd-pill {
  flex: none;
  font-size: 11px;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--hero-ink);
}
.gd-pill.good {
  color: var(--hero-good);
}
.gd-pill.warn {
  color: #ffd27a;
}
.gd-pill.hot {
  color: var(--hero-fill);
}
.gd-foot {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12.5px;
  color: var(--hero-mute);
}
.gd-phase {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
}
.gd-phase b {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.gd-phase span {
  font-size: 13px;
  font-weight: 600;
  color: var(--hero-mute);
}
.gd-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 12px 0 6px;
}
.gd-week .gd-day {
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 6px 0 4px;
  border: 1px solid var(--hero-line);
  border-radius: 12px;
  min-height: 46px;
}
.gd-week .gd-day.on {
  background: rgba(255, 255, 255, 0.08);
}
.gd-week .gd-day .ic {
  width: 16px;
  height: 16px;
  color: var(--hero-fill);
  fill: var(--hero-fill);
}
.gd-week .gd-day small {
  font-size: 11px;
  font-weight: 700;
  color: var(--hero-mute);
}
.gd-sw {
  flex: none;
  width: 30px;
  height: 18px;
  border-radius: 99px;
  background: var(--hero-line);
  position: relative;
}
.gd-sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hero-mute);
}
.gd-sw.on {
  background: var(--hero-good);
}
.gd-sw.on::after {
  left: 14px;
  background: var(--hero);
}
.gate-show {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 440px;
}
.gate-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.gate-dots button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.gate-dots button::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--hero-line);
  transition:
    width 0.25s ease,
    background 0.25s ease;
}
.gate-dots button[aria-current='true']::after {
  width: 20px;
  background: var(--hero-ink);
}
.gate-roles {
  gap: 10px;
}
.gate-role {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
}
.gate-role:hover,
.gate-role:focus-visible {
  border-color: var(--ember);
}
.gate-role > .ic:first-child {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--ember-ink);
}
.gate-role > .ic:last-child {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
  margin-left: auto;
}
.gate-role span {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.gate-role b {
  font-size: 16px;
}
.gate-role small {
  font-size: 13px;
  color: var(--muted);
}
.gate-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  margin: -6px 0 -4px -6px;
}
.gate-back .ic {
  width: 16px;
  height: 16px;
}
.gd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--hero-line);
  font-size: 14px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.gd-row:last-child {
  border-bottom: 0;
}
.gd-row.in {
  opacity: 1;
  transform: none;
}
.gd-row .n {
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gd-row .k {
  margin-left: auto;
  flex: none;
  color: var(--hero-mute);
  font-weight: 600;
}
.gd-row .src {
  flex: none;
}
/* the form, lifted over the panel's lower edge */
.gate-form {
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  margin-top: -40px;
}
.si .gate-card {
  text-align: left;
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 20px 18px 14px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.si .gate-card h2 {
  font-size: 20px;
}
.gate-pitch {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 20px max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}
.gate-pitch ul {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 0;
}
.gate-pitch li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.4;
}
.gate-pitch li .ic {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--ember-ink);
}
.gate-free {
  color: var(--muted);
}
/* someone coming back on a phone gets to the form at once: the picture is left out */
@media (max-width: 899px) {
  .gate-wrap.si.is-back .gate-show {
    display: none;
  }
}
@media (max-width: 359px) {
  .gd-rows {
    min-height: 0;
  }
  .gd-num .num {
    font-size: 36px;
  }
}
/* a wide screen: the panel on the left at full height, the form on the right */
@media (min-width: 900px) {
  .gate-wrap.si {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(400px, 0.9fr);
    grid-template-rows: 1fr auto;
    min-height: 100%;
    background: var(--bg);
  }
  .gate-wrap.si::before {
    content: '';
    grid-column: 1;
    grid-row: 1 / -1;
    background: var(--hero);
  }
  .gate-hero {
    grid-column: 1;
    grid-row: 1;
    background: none;
    padding: 56px clamp(40px, 6vw, 96px) 12px;
    gap: 22px;
    justify-content: center;
  }
  .gate-hero h1 {
    font-size: clamp(40px, 4.2vw, 60px);
  }
  .gate-pitch {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    max-width: 560px;
    margin: 0;
    padding: 12px clamp(40px, 6vw, 96px) 56px;
    color: var(--hero-ink);
  }
  .gate-pitch li .ic {
    color: var(--hero-fill);
  }
  .gate-free {
    color: var(--hero-mute);
  }
  .gate-form {
    grid-column: 2;
    grid-row: 1 / -1;
    margin: 0;
    padding: 40px;
    display: grid;
    place-items: center;
  }
  .si .gate-card {
    padding: 28px 26px 20px;
  }
}

/* ---------- sign-in form: password box with its Show button, and the other ways in ---------- */
.pwrow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwrow .inp {
  flex: 1;
  min-width: 0;
}
.pwrow .link {
  flex: none;
  min-height: 44px;
  padding: 0 4px;
}
.si-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.si-links .link {
  min-height: 40px;
  padding: 0 8px;
  text-align: center;
}

/* ---------- coach and gym views on a wide screen: the list on the left, what is opened on the right ----------
   The same screens as on a phone, laid out for a desk. body.desk is set while one of those views is showing. */
@media (min-width: 1000px) {
  body.desk #app {
    max-width: 1240px;
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-inline: 1px solid var(--line);
  }
  body.desk header.top {
    grid-column: 1 / -1;
  }
  body.desk #main {
    grid-column: 1;
    grid-row: 2;
    border-right: 1px solid var(--line);
  }
  body.desk nav.tabs {
    grid-column: 1;
    grid-row: 3;
    border-right: 1px solid var(--line);
  }
  body.desk #app::after {
    content: 'Choose a client on the left to open them here.';
    grid-column: 2;
    grid-row: 2 / 4;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
  }
  body.desk .scrim {
    left: 431px;
    top: 57px;
    background: var(--bg);
    align-items: stretch;
    justify-content: center;
    animation: none;
  }
  body.desk .scrim .sheet {
    max-height: none;
    height: 100%;
    max-width: 760px;
    border-radius: 0;
    animation: none;
  }
  body.desk .asfab {
    right: auto;
    left: 356px;
  }
  body.desk .toasts {
    left: 0;
    right: auto;
    width: 430px;
  }
}

/* ---------- the coach's workspace on a computer (08p-codesk.js, body.cow) ----------
   A top bar, a side bar, and a page beside it. Dialogs open in the middle; a client is a page of its own. */
@media (min-width: 1000px) {
  body.cow #app {
    --sbw: 236px;
    max-width: none;
    display: grid;
    grid-template-columns: var(--sbw) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
  }
  body.cow header.top {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding-inline: 20px;
  }
  body.cow nav.tabs {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 12px 16px;
    border-top: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  body.cow #main {
    grid-column: 2;
    grid-row: 2;
    padding: 26px 32px 48px;
  }
  body.cow #main > * {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
  }
  .sb-g {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 14px 10px 6px;
  }
  .sb-g:first-child {
    padding-top: 2px;
  }
  .sb-i {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
  }
  .sb-i svg {
    width: 19px;
    height: 19px;
    flex: none;
    color: var(--muted);
  }
  .sb-i > span {
    flex: 1;
    min-width: 0;
  }
  .sb-i:hover {
    background: var(--bg);
  }
  .sb-i[aria-current='page'] {
    background: var(--primary);
    color: var(--on-primary, #fff);
  }
  .sb-i[aria-current='page'] svg {
    color: inherit;
  }
  .sb-n {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
  }
  .sb-n.hot {
    background: var(--ember);
    color: #fff;
  }
  .sb-i[aria-current='page'] .sb-n:not(.hot) {
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
  }
  .sb-sp {
    flex: 1;
    min-height: 16px;
  }
  .sb-add {
    margin: 0 0 6px;
  }
  /* a page's heading, with what can be done on it to the right */
  .pg-h {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
  }
  .pg-h h1 {
    font-family: var(--display, inherit);
    font-size: 28px;
    line-height: 1.1;
    margin: 0;
  }
  .pg-h p {
    margin: 4px 0 0;
    font-size: 14px;
  }
  .pg-a {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
  }
  .pg-a .inp {
    width: 260px;
    height: 40px;
  }
  .pg-a .seg {
    flex: none;
  }
  .dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
  }
  .dash-stats .stat {
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 16px 18px;
  }
  .dash-stats .stat:hover {
    border-color: var(--muted);
  }
  .dash-stats .stat .num {
    font-size: 30px;
  }
  .dash {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
  }
  body.cow #main .banner {
    margin-top: 6px;
  }
  /* the table of clients */
  .ctab-w {
    padding: 0;
    overflow: hidden;
    margin-bottom: 14px;
  }
  table.ctab {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  table.ctab th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  table.ctab th .th-b {
    font: inherit;
    color: inherit;
    white-space: nowrap;
  }
  table.ctab th .th-b:hover {
    color: var(--ink);
  }
  table.ctab th[aria-sort='ascending'],
  table.ctab th[aria-sort='descending'] {
    color: var(--ink);
  }
  table.ctab td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    max-width: 260px;
  }
  table.ctab tbody tr:last-child td {
    border-bottom: 0;
  }
  table.ctab tbody tr[data-act] {
    cursor: pointer;
  }
  table.ctab tbody tr[data-act]:hover,
  table.ctab tbody tr[data-act]:focus-visible {
    background: var(--bg);
    outline: none;
  }
  table.ctab .av.sm {
    flex: none;
  }
  /* programmes and activity: the phone's lists, given the room */
  .pg-lib,
  .pg-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .pg-lib > .between:first-child .sec-h,
  .pg-feed > .between:first-child .sec-h {
    font-size: 28px !important;
  }
  .pg-lib .list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
  }
  .pg-lib > .two,
  .pg-lib > .grp + .two {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pg-feed > .card {
    max-width: 760px;
  }
  /* a dialog, in the middle */
  body.cow .scrim {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  body.cow .scrim .sheet {
    max-width: 560px;
    max-height: 88%;
    border-radius: 20px;
    overflow: hidden;
    animation: fade 0.15s;
    box-shadow: 0 24px 60px rgba(8, 16, 13, 0.25);
  }
  body.cow .scrim .sheet.full {
    max-width: 760px;
    height: auto;
  }
  /* a client: a page of the workspace, beside the side bar */
  body.cow .scrim.pg {
    left: var(--sbw);
    top: 57px;
    padding: 0;
    background: var(--bg);
    align-items: stretch;
    animation: none;
  }
  body.cow .scrim.pg .sheet {
    max-width: none;
    max-height: none;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }
  body.cow .scrim.pg .sheet-h {
    justify-content: flex-start;
    gap: 16px;
    padding: 18px 32px 6px;
    max-width: 1244px;
    width: 100%;
    margin-inline: auto;
  }
  body.cow .scrim.pg .sheet-h h3 {
    font-size: 26px;
  }
  body.cow .scrim.pg #ccBody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    align-content: start;
    padding: 10px 32px 48px;
    max-width: 1244px;
    width: 100%;
    margin-inline: auto;
  }
  body.cow .scrim.pg #ccBody > * {
    margin: 0;
  }
  body.cow .scrim.pg #ccBody > :not(section):not(.card) {
    grid-column: 1 / -1;
  }
  body.cow .scrim.pg #ccBody > .seg {
    max-width: 560px;
  }
  body.cow .scrim.pg #ccBody > .stat4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.cow .scrim.pg #ccBody .stat {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 16px 18px;
  }
  body.cow .toasts {
    left: var(--sbw);
    right: 0;
    bottom: 28px;
  }
}

/* ---------- the first run: health information, the first log, a reminder time (08x-onboard.js) ---------- */
fieldset.dob {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  gap: 8px;
}
fieldset.dob legend {
  padding: 0;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 13px;
}
.si-terms {
  line-height: 1.45;
}
.tg-why {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.35;
}
.ob-links {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 14px;
}
.ob-links .btn {
  justify-self: stretch;
}
.ob-links .link {
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
/* six answers do not fit on one line of a phone: three to a row */
.seg[data-seg='tsGoal'] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.seg[data-seg='tsGoal'] button {
  white-space: normal;
  min-height: 44px;
  line-height: 1.2;
}
/* a small table of figures: a client's last weeks, measurements */
table.mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
table.mini th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 10px 6px 0;
  white-space: nowrap;
}
table.mini td {
  padding: 7px 10px 7px 0;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
#brandTag[data-act] {
  cursor: pointer;
}
/* a 1 to 10 or 1 to 5 scale: even boxes, five to a row */
.opts.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.opts.scale button {
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}
/* the coach's name in the header stays on one line */
#brandTag[data-act] {
  display: inline-block;
  white-space: nowrap;
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}
/* on a phone the coach's name takes the place of the wordmark: there is not room for both */
@media (max-width: 430px) {
  .brand:has(+ #brandTag[data-act]) .bn {
    display: none;
  }
}

/* ---------- the Add sheet's ways to log: three clear levels, each easy to hit ----------
   Say or type (the main one), then photo, barcode and quick add as large tiles, then the things that are
   not food as a quiet row of icons. Same buttons and words as before; more room and bigger targets. */
#addTiles {
  gap: 12px;
  margin-top: 2px;
}
#addTiles .say {
  min-height: 74px;
  padding: 14px;
  border-radius: 18px;
}
#addTiles .say .say-i {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
#addTiles .say b {
  font-size: 16px;
}
#addTiles .tiles.t3 {
  gap: 10px;
}
#addTiles .tiles.t3 .tile {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 82px;
  padding: 14px 6px 12px;
  border-radius: 18px;
  font-size: 14px;
}
#addTiles .tiles.t3 .tile svg {
  width: 26px;
  height: 26px;
}
#addTiles .also {
  gap: 4px;
  padding-top: 2px;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
/* a row of choices that wraps: the drinks sheet */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-b {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
}
#addTiles .also button {
  flex-direction: column;
  gap: 5px;
  height: 58px;
  border-radius: 14px;
  background: none;
  font-size: 12.5px;
  color: var(--muted);
}
#addTiles .also button svg {
  width: 21px;
  height: 21px;
  color: var(--ink);
}
#addTiles .also button:active {
  background: var(--surface-2);
}

/* ---------- a client's page: its sections (08q-clientpage.js) ---------- */
.ctabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  margin-inline: -4px;
  padding-inline: 4px;
}
.ctabs::-webkit-scrollbar {
  display: none;
}
.ctabs button {
  flex: none;
  padding: 10px 12px 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.ctabs button:hover {
  color: var(--text);
}
.ctabs button[aria-selected='true'] {
  color: var(--text);
  border-bottom-color: var(--ember);
}
.cv-qa {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cv-qa .btn svg {
  width: 16px;
  height: 16px;
}
.cv-wk .stat .num small {
  font-size: 13px;
  font-weight: 600;
}
table.mini.wkt small.dl {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.goal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.goal:first-of-type {
  border-top: 0;
}
.goal small {
  display: block;
  font-size: 12px;
}
.goal.done b {
  color: var(--muted);
}
/* the fortnight of the diary: a day each, with its calories */
.dstrip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.dstrip::-webkit-scrollbar {
  display: none;
}
.dchip {
  flex: none;
  min-width: 54px;
  padding: 7px 6px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border-bottom-width: 3px;
}
.dchip small {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.dchip b {
  font-size: 15px;
  line-height: 1.1;
}
.dchip span {
  font-size: 11px;
  color: var(--muted);
}
.dchip.in {
  border-bottom-color: var(--good);
}
.dchip.under {
  border-bottom-color: var(--ice);
}
.dchip.over {
  border-bottom-color: var(--gold);
}
.dchip[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.dchip[aria-pressed='true'] small,
.dchip[aria-pressed='true'] span {
  color: inherit;
  opacity: 0.8;
}
/* eight weeks of days against target */
.agrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.agrid i,
i.ag-k {
  display: block;
  height: 18px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
i.ag-k {
  width: 14px;
  height: 14px;
  flex: none;
}
.agrid i.in,
i.ag-k.in {
  background: var(--good);
  border-color: var(--good);
}
.agrid i.under,
i.ag-k.under {
  background: var(--ice);
  border-color: var(--ice);
}
.agrid i.over,
i.ag-k.over {
  background: var(--gold);
  border-color: var(--gold);
}
.agrid i.fut {
  opacity: 0.35;
  border-style: dashed;
}
.cm i.ck {
  border-color: var(--ember);
  border-radius: 2px;
}
.cm i.ck.done {
  background: var(--ember);
}
.cv-cal {
  display: grid;
  gap: 16px;
}
.cv-cal .ag {
  background: none;
}
@media (min-width: 1000px) {
  body.cow .scrim.pg #ccBody {
    grid-auto-rows: max-content; /* a card that scrolls sideways must not be squeezed to nothing */
  }
  body.cow .scrim.pg #ccBody > .wide {
    grid-column: 1 / -1;
  }
  body.cow .scrim.pg #ccBody > .ctabs {
    position: sticky;
    top: -10px;
    z-index: 2;
    background: var(--bg);
    padding-top: 4px;
  }
  body.cow .scrim.pg #ccBody > .cv-wk {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.cow .scrim.pg .cv-cal {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
  }
  body.cow .scrim.pg .cv-cal .cd {
    height: 62px;
  }
  body.cow .scrim.pg .agrid i {
    height: 22px;
  }
}

/* ---------- the coach's desk: the queue, tags, bulk actions, the board, the inbox, the command bar (08r-desk.js) ---------- */
.pill.tag {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}
button.pill.tag.add {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  border-style: dashed;
  background: none;
}
button.pill.tag.add svg {
  width: 11px;
  height: 11px;
}
.q-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.q-row:first-of-type {
  border-top: 0;
}
.q-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.q-act {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.q-act .icon-btn {
  width: 34px;
  height: 34px;
}
.q-act .icon-btn svg {
  width: 16px;
  height: 16px;
}
.q-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.q-dot.bad {
  background: var(--bad);
}
.q-dot.gold {
  background: var(--gold);
}
.q-dot.ice {
  background: var(--ice);
}
@media (max-width: 420px) {
  .q-act .btn.ghost.opt {
    display: none;
  }
}
kbd {
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}
table.mini.keys td:first-child {
  width: 1%;
  padding-right: 18px;
}
table.mini.keys td {
  white-space: normal;
}
/* the command bar */
.cmdk {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 16, 13, 0.4);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
}
.cmdk-b {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(8, 16, 13, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.cmdk-q {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
}
.cmdk-q svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: none;
}
.cmdk-q .inp {
  border: 0;
  background: none;
  box-shadow: none;
  padding-inline: 0;
  font-size: 16px;
}
.cmdk-q .inp:focus {
  outline: 0;
  box-shadow: none;
}
.cmdk-l {
  overflow-y: auto;
  padding: 6px;
}
.ck-i {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  font-weight: 500;
}
.ck-i svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: none;
}
.ck-i[aria-selected='true'],
.ck-i:hover {
  background: var(--surface-2);
}
.cmdk-f {
  display: flex;
  gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
}
.cmdk-f kbd {
  margin-right: 3px;
}
@media (min-width: 1000px) {
  .sb-find {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    text-align: left;
  }
  .sb-find svg {
    width: 15px;
    height: 15px;
    flex: none;
  }
  .sb-find span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sb-find:hover {
    border-color: var(--muted);
  }
  .cd-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 34px;
  }
  .cd-bar .chip-b {
    padding: 5px 11px;
    font-size: 13px;
  }
  .bulk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--primary);
    color: var(--on-primary);
  }
  .bulk .btn.ghost {
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    border-color: transparent;
    box-shadow: none;
  }
  .bulk .link {
    color: inherit;
    margin-left: auto;
  }
  table.ctab th.pick,
  table.ctab td.pick {
    width: 36px;
    padding-right: 0;
  }
  table.ctab td.pick input,
  table.ctab th.pick input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
  }
  .board {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
  .b-col {
    background: var(--surface-2);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
  }
  .b-h {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 2px 4px 4px;
  }
  .b-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 10px 11px;
    min-width: 0;
  }
  button.b-card:hover {
    border-color: var(--muted);
  }
  /* the inbox: threads, the conversation, the client's week */
  .mx {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr) 300px;
    gap: 16px;
    height: calc(100vh - 190px);
    min-height: 420px;
  }
  .mx > * {
    min-height: 0;
  }
  .mx-l {
    overflow-y: auto;
    padding: 6px;
  }
  .mx-t {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 11px;
    text-align: left;
  }
  .mx-t[aria-current='true'] {
    background: var(--surface-2);
  }
  .mx-t:hover {
    background: var(--surface-2);
  }
  .mx-c {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }
  .mx-c .sheet-b {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  .mx-s {
    overflow-y: auto;
  }
  .mx-s .stat4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .mx-s .stat {
    background: var(--surface);
    border: 1px solid var(--line);
  }
  .dash-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
@media (min-width: 1000px) and (max-width: 1240px) {
  .mx {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .mx-s {
    display: none;
  }
}

/* ---------- check-ins in review, comments, the conversation's extras, the daily pulse (08s-review.js) ---------- */
.cmt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
  padding: 7px 10px;
  margin: 2px 0 6px;
  border-radius: 10px;
  background: var(--ember-soft);
}
.cmt svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 2px;
  color: var(--ember);
}
.cmt b {
  font-weight: 700;
}
.cmt-b {
  font-size: 12px;
  margin: 0 0 6px;
}
.bub-ref {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 3px;
}
.bub.later {
  opacity: 0.7;
  border: 1px dashed currentColor;
}
.bub.later .link {
  color: inherit;
  text-decoration: underline;
  font-size: inherit;
}
.ch-seen {
  align-self: flex-end;
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}
.ch-x {
  display: flex;
  gap: 16px;
  padding: 0 2px 6px;
}
.ch-x .link {
  font-size: 13px;
}
.pbars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 34px;
  margin-top: 4px;
}
.pbars i {
  flex: 1;
  min-height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.pbars i.none {
  background: var(--line);
}
svg.spark {
  vertical-align: middle;
  color: var(--muted);
}
/* a check-in in review: answers, their week, the reply */
.rv {
  gap: 18px;
}
.rv-h {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.rv-a,
.rv-w,
.rv-r {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.rv-q {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.rv-q:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.rv-q p {
  margin-top: 3px;
}
.rv-tr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  font-size: 12px;
  color: var(--muted);
}
.rv-tr.big {
  color: var(--ember);
  font-weight: 700;
}
.rv-tr.big svg.spark {
  color: var(--ember);
}
.rv-p {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rv-p:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.rv-p h3 {
  font-size: 14px;
}
.rv-fig summary {
  cursor: pointer;
  color: var(--muted);
  padding: 6px 0;
}
.rv-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.rv-nav .icon-btn {
  width: 34px;
  height: 34px;
}
.sheet-h .rv-nav + .icon-btn {
  margin-left: 6px;
}
@media (min-width: 1000px) {
  body.cow .scrim.rvw .sheet.full {
    max-width: 1280px;
    width: 100%;
    height: 92%;
    max-height: 92%;
  }
  body.cow .scrim.rvw .rv {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    overflow: hidden;
    padding-bottom: 0;
  }
  body.cow .scrim.rvw .rv > div {
    overflow-y: auto;
    max-height: 100%;
    padding-bottom: 24px;
    padding-right: 4px;
  }
  body.cow .scrim.rvw .rv:not(:has(.rv-w)) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.fq-if[hidden],
#rvTg[hidden] {
  display: none;
}

/* ---------- coaching depth: patterns, the training review (08t-depth.js) ---------- */
.mbar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface-2);
}
.mbar i {
  display: block;
  height: 100%;
}
.mbar i.m0,
i.ag-k.m0 {
  background: var(--primary);
  border-color: var(--primary);
}
.mbar i.m1,
i.ag-k.m1 {
  background: var(--ember);
  border-color: var(--ember);
}
.mbar i.m2,
i.ag-k.m2 {
  background: var(--gold);
  border-color: var(--gold);
}
.mbar i.m3,
i.ag-k.m3 {
  background: var(--ice);
  border-color: var(--ice);
}
.tr-wk {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  align-items: end;
}
.tr-wk > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.tr-b {
  display: flex;
  align-items: flex-end;
  width: 100%;
  max-width: 34px;
  height: 56px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow: hidden;
}
.tr-b i {
  display: block;
  width: 100%;
  background: var(--primary);
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}
.tr-wk b {
  font-size: 13px;
}
.tr-wk small {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.entry.lesson.wait b,
.entry.lesson.wait small {
  color: var(--muted);
}

.dict-b.on {
  background: var(--ember);
  color: #fff;
}

/* ---------- your own insights (08w-mine.js): the coach's cards at a phone's width ---------- */
#cvWeeks > .between,
#cvGrid > .between,
#cvTrainReview > .between,
#cvRecovery > .between,
#cvPatterns > .between {
  flex-wrap: wrap;
  row-gap: 2px;
}
#cvWeeks > .between h2,
#cvGrid > .between h2,
#cvTrainReview > .between h2,
#cvRecovery > .between h2 {
  white-space: nowrap;
}
.mg-row {
  display: grid;
  grid-template-columns: 92px 1fr 34px 40px;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  font-size: 14px;
}
.mg-row b,
.mg-row small {
  text-align: right;
}

/* ---------- the everyday app on a computer (08w-mine.js, body.mew) ----------
   The sections down the side, the cards in columns at the width they were drawn for, dialogs in the middle. */
@media (min-width: 1000px) {
  body.mew #app {
    --sbw: 236px;
    max-width: none;
    display: grid;
    grid-template-columns: var(--sbw) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
  }
  body.mew header.top {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding-inline: 20px;
  }
  body.mew nav.tabs {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px 12px;
    border-top: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  body.mew .sb-log {
    width: 100%;
    margin-bottom: 10px;
  }
  body.mew #main {
    grid-column: 2;
    grid-row: 2;
    display: block;
    padding: 24px 32px 56px;
  }
  body.mew .mw {
    max-width: 1080px;
    margin-inline: auto;
    column-count: 2;
    column-gap: 22px;
  }
  body.mew .mw > * {
    break-inside: avoid;
    margin-bottom: 14px;
  }
  body.mew .mw > .datenav,
  body.mew .mw > .week,
  body.mew .mw > .seg,
  body.mew .mw > .banner,
  body.mew .mw > .between:first-child {
    column-span: all;
    max-width: 529px;
  }
  body.mew .asfab {
    right: 28px;
    bottom: 28px;
  }
  /* a row that scrolls sideways bleeds to the screen's edge on a phone; in a column it stays inside it */
  body.mew .mw .rail {
    margin-inline: 0;
    padding-inline: 0;
  }
  body.mew .scrim {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  body.mew .scrim .sheet {
    max-width: 560px;
    max-height: 88%;
    border-radius: 20px;
    overflow: hidden;
    animation: fade 0.15s;
    box-shadow: 0 24px 60px rgba(8, 16, 13, 0.25);
  }
  body.mew .scrim .sheet.full {
    max-width: 760px;
    height: auto;
  }
  body.mew .toasts {
    left: var(--sbw);
    right: 0;
    bottom: 28px;
  }
}
@media (min-width: 1760px) {
  body.mew .mw {
    max-width: 1640px;
    column-count: 3;
  }
}

/* ---------- the fortnight: every client, a square a day (cdHeat) ---------- */
table.ctab.heat th.hd {
  text-align: center;
  padding-inline: 2px;
  font-size: 11px;
  line-height: 1.2;
  min-width: 26px;
}
table.ctab.heat th.hd small {
  display: block;
  font-weight: 500;
  color: var(--muted);
}
table.ctab.heat td.hc {
  padding: 8px 2px;
}
table.ctab.heat .mon {
  border-left: 1px solid var(--line);
}
table.ctab.heat td.hc i,
i.ag-k.tr {
  display: block;
  position: relative;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
i.ag-k.tr {
  width: 14px;
  height: 14px;
  margin: 0;
}
table.ctab.heat td.hc i.in {
  background: var(--good);
  border-color: var(--good);
}
table.ctab.heat td.hc i.under {
  background: var(--ice);
  border-color: var(--ice);
}
table.ctab.heat td.hc i.over {
  background: var(--gold);
  border-color: var(--gold);
}
table.ctab.heat td.hc i.ns {
  background: transparent;
  border-style: dashed;
}
table.ctab.heat td.hc i.tr::after,
i.ag-k.tr::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--surface);
}
i.ag-k.tr::after {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

/* ---------- the conversation as a phone's messages (08e-chat.js) ---------- */
.scrim.chat-pg .sheet {
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  padding-top: env(safe-area-inset-top);
  animation: fade 0.15s;
}
.sheet-h.ch-h {
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-h.ch-h h3 {
  font-size: 17px;
}
@media (pointer: coarse) {
  .bub {
    -webkit-user-select: none;
    user-select: none;
  }
}
.bub .bub-q {
  display: block;
  max-width: 100%;
  margin-bottom: 4px;
  padding-left: 8px;
  border-left: 2px solid currentColor;
  font-size: 12px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bub .rx {
  position: absolute;
  top: -13px;
  right: -6px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ember);
  font-style: normal;
  font-size: 12px;
  line-height: 1;
}
.bub.me .rx {
  right: auto;
  left: -6px;
}
.bub .rx svg {
  width: 13px;
  height: 13px;
}
.rx-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 40px);
  gap: 2px;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  animation: fade 0.12s;
}
.bub.me .rx-menu {
  left: auto;
  right: 0;
}
.rx-menu.below {
  bottom: auto;
  top: calc(100% + 6px);
}
.rx-menu > button {
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: var(--ink);
}
.rx-menu > button svg {
  width: 20px;
  height: 20px;
}
.rx-menu > button:hover {
  background: var(--bg);
}
.rx-menu > button[aria-pressed='true'] {
  background: var(--ember-soft);
  color: var(--ember);
}
.rx-acts {
  grid-column: 1 / -1;
  display: flex;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.rx-acts button {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.rx-acts button:hover {
  background: var(--bg);
}
.ch-st {
  align-self: flex-end;
  font-size: 11px;
  color: var(--muted);
  padding-top: 2px;
}
.ch-tip {
  align-self: center;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 10px;
  text-align: center;
}
.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  margin-top: 6px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: none;
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .typing i {
    animation: none;
    opacity: 0.6;
  }
}
.ch-rp {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 10px;
  border-left: 3px solid var(--ember);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}
.ch-rp b {
  font-weight: 700;
  margin-right: 4px;
}
/* the chat button above the microphone, for someone with a coach */
.asfab.msg {
  right: 18px;
  bottom: calc(160px + var(--nav-extra));
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--line);
}
.asfab.msg.solo {
  bottom: calc(100px + var(--nav-extra));
}
.asfab.msg svg {
  width: 21px;
  height: 21px;
}
.asfab.msg:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
}
.asfab.msg b,
.tab-n {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--ember-ink);
  color: var(--on-ember);
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}
nav.tabs button.tab {
  position: relative;
}
nav.tabs .tab .tab-n {
  top: 2px;
  right: calc(50% - 22px);
}
/* room at the end of a page so its last card can be scrolled clear of the two buttons */
body.has-msgfab main {
  padding-bottom: 84px;
}
@media (min-width: 1000px) {
  body.cow .scrim.chat-pg .sheet.full,
  body.mew .scrim.chat-pg .sheet.full {
    height: 88%;
    max-width: 560px;
    border-radius: 20px;
    padding-top: 0;
  }
  body.mew .asfab.msg,
  body.mew .asfab.msg.solo {
    right: 32px;
    bottom: 92px;
  }
  body.mew .asfab.msg.solo {
    bottom: 28px;
  }
  body.mew.has-msgfab main {
    padding-bottom: 56px;
  }
}

/* the chat button gives way while a page is read downwards (msgFab) */
.asfab.msg {
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.asfab.msg.tuck {
  transform: translateX(84px);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .asfab.msg {
    transition: none;
  }
}
.ch-bell[aria-pressed='true'] {
  color: var(--ember);
}

/* a coach's photo: on their page, at the top of the conversation and on the client's chat button */
img.av.ph {
  object-fit: cover;
  padding: 0;
  border: 1px solid var(--line);
  flex: none;
}
.av.lg {
  width: 64px;
  height: 64px;
  font-size: 20px;
  flex: none;
}
.av.xl {
  width: 96px;
  height: 96px;
}
.pg-ph {
  display: flex;
  align-items: center;
  gap: 14px;
}
.asfab.msg.face {
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: 50%;
  overflow: visible;
}
.asfab.msg.face svg {
  display: none;
}
.asfab.msg img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.asfab.msg img.hide {
  display: none;
}

/* ---------- the Library: the vault and broadcasts (08vb-library.js) ---------- */
.lib-l {
  padding: 4px 14px;
}
.lib-i {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  text-align: left;
  border-top: 1px solid var(--line);
}
.lib-i:first-child {
  border-top: 0;
}
.lib-m {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: none;
}
.lib-ed {
  display: grid;
  gap: 18px;
}
.lib-pv {
  min-width: 0;
}
.phone {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  overflow: hidden;
  max-width: 340px;
}
.phone .ph-h {
  padding: 14px 16px 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.phone .ph-b {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}
.guide {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.guide h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  margin-top: 6px;
}
.guide ul {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cast-pv {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg);
}
.cast-who {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
}
.bub .bub-card {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.bub .bub-card span {
  display: block;
  margin: 0;
  font-size: inherit;
  color: inherit;
  text-align: left;
  opacity: 1;
}
.bub .bub-card svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--ember);
}
.bub .bub-g {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  opacity: 0.7;
}
@media (min-width: 1000px) {
  body.cow .scrim.lib-dlg .sheet.full {
    max-width: 980px;
  }
  body.cow .lib-ed {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
  body.cow .lib-pv {
    position: sticky;
    top: 0;
  }
}
@media (min-width: 1000px) {
  body.cow #castNew,
  body.cow #castLog {
    max-width: 760px;
  }
}

/* ---------- a client's nutrition in depth (08vc-nutrition.js) ---------- */
.nu-st .stat .num {
  font-size: 22px;
}
.nu-st .stat span {
  display: block;
  margin-top: 2px;
  line-height: 1.3;
}
.nu-tw {
  overflow-x: auto;
  margin-top: 8px;
}
table.mini.nud th:not(:first-child):not(:last-child),
table.mini.nud td.tn {
  text-align: right;
}
table.mini.nud tr[data-act] {
  cursor: pointer;
}
table.mini.nud tr[data-act]:hover td,
table.mini.nud tr.on td {
  background: var(--surface-2);
}
table.mini.nud tr.on td:first-child {
  font-weight: 700;
}
table.mini.nud tr.avg td {
  font-weight: 600;
  border-top-color: var(--muted);
}
table.mini.nud tr.avg + tr.avg td {
  border-top-color: var(--line);
  font-weight: 500;
}
table.mini.nud td.ok {
  color: var(--good);
  font-weight: 600;
}
.nu-k {
  display: inline-block;
  padding: 1px 0 1px 8px;
  border-left: 3px solid var(--good);
  font-weight: 600;
}
.nu-k.under {
  border-left-color: var(--ice);
}
.nu-k.over {
  border-left-color: var(--gold);
}
.nu-m {
  letter-spacing: 3px;
  font-size: 12px;
}
.nu-m b {
  font-weight: 700;
}
.nu-m i {
  font-style: normal;
  color: var(--muted);
  opacity: 0.45;
}
section[id^='nu'] > .between,
#cvDiary > .between {
  flex-wrap: wrap;
  gap: 2px 12px;
}
.nu-day,
.nu-vit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 16px;
  margin-top: 10px;
}
.nu-day .between > span:last-child,
.nu-vit .between > span:last-child {
  white-space: nowrap;
}
.nu-day .bar,
.nu-vit .bar,
.nu-mi .bar {
  margin-top: 4px;
}
.nu-vit {
  margin-top: 0;
}
.nu-meal {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.nu-meal:first-of-type {
  margin-top: 6px;
}
.nu-meal small {
  display: block;
  font-size: 11px;
}
.nu-meal > span:last-child {
  text-align: right;
  line-height: 1.35;
}
.nu-bars {
  display: grid;
  gap: 4px;
}
.nu-food {
  display: grid;
  gap: 4px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.nu-food:first-child {
  border-top: 0;
}
.nu-food .between > .ell {
  min-width: 0;
}
.nu-food b {
  flex: none;
}
.mg-row.nu-src {
  grid-template-columns: minmax(110px, 1.1fr) 1fr 40px;
}
.mg-row.nu-part {
  grid-template-columns: 92px 1fr 76px;
}
/* eight weekly bars with the target drawn across them */
.nu-wkb {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  height: 120px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}
.nu-wkb > span:not(.nu-tg) {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}
.nu-wkb i {
  display: block;
  width: 100%;
  max-width: 44px;
  min-height: 2px;
  border-radius: 6px 6px 0 0;
  background: var(--surface-2);
}
.nu-wkb i.in {
  background: var(--good);
}
.nu-wkb i.under {
  background: var(--ice);
}
.nu-wkb i.over {
  background: var(--gold);
}
.nu-tg {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--muted);
  pointer-events: none;
}
.nu-tg small {
  position: absolute;
  right: 0;
  bottom: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  padding: 0 4px;
  border-radius: 4px;
}
.nu-wkl {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 6px;
  text-align: center;
}
.nu-wkl > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.nu-wkl b {
  font-size: 13px;
}
.nu-wkl small {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.nu-wkl small.hit {
  color: var(--good);
  font-weight: 700;
}
@media (min-width: 1000px) {
  body.cow .nu-st {
    grid-template-columns: repeat(4, 1fr);
  }
  body.cow .nu-day {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* the same eight weeks as rows, where there is not the width for columns */
.nu-wr {
  display: none;
}
.nu-wr > div {
  display: grid;
  grid-template-columns: 50px 1fr 46px 42px 42px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
.nu-wr b,
.nu-wr small {
  text-align: right;
}
.nu-wr small {
  font-size: 11px;
  color: var(--muted);
}
.nu-wr small.hit {
  color: var(--good);
  font-weight: 700;
}
@media (max-width: 699px) {
  .nu-wk {
    display: none;
  }
  .nu-wr {
    display: block;
  }
}

/* every target set for a client, as a grid of figures */
.tg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px 12px;
}
.tg-grid > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tg-grid b {
  font-size: 18px;
  line-height: 1.2;
}
.tg-grid span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.tg-grid small {
  font-size: 11px;
  color: var(--muted);
}
.tg-g {
  align-items: end;
}

/* ---------- recipes, books, menus and files (08vd-recipes.js) ---------- */
.kt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.kt-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  min-width: 0;
}
.kt-card .kt-pic {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}
.kt-c {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.kt-c b {
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.kt-pic {
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--surface-2) center / cover no-repeat;
  color: var(--muted);
  border-radius: var(--r-sm);
  flex: none;
}
.kt-pic .ic {
  width: 26px;
  height: 26px;
  opacity: 0.55;
}
.kt-pic.on .ic {
  display: none;
}
.kt-pic.sq {
  width: 72px;
  height: 72px;
}
.kt-pic.big {
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
}
.kt-per .grid4,
.kt-fig {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0;
}
.kt-per .grid4 span,
.kt-fig span {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.kt-per .grid4 b,
.kt-fig b {
  font-size: 18px;
  color: var(--ink);
}
.kt-hand {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: end;
}
.kt-ing {
  padding: 7px 0;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.kt-ing span:last-child {
  flex: none;
}
.kt-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.45;
}
.kt-ingr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.kt-ingr:first-child {
  border-top: 0;
}
.kt-ingr small {
  font-size: 12px;
}
.kt-meal {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.kt-slot {
  padding: 3px 0;
  gap: 8px;
}
.kt-slot .ell {
  min-width: 0;
}
.kt-mday {
  padding: 10px 14px 4px;
}
@media (max-width: 420px) {
  .kt-hand {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  body.cow .pg-kt .kt-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
  }
  body.cow .pg-kt .seg {
    max-width: 560px;
  }
}
.kt-acts {
  gap: 8px;
  flex-wrap: wrap;
}
.kt-acts .btn {
  flex: 1 1 140px;
  width: auto;
}
/* workouts from a device that were taken off a day, and the way to ask for them again */
.x-gone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
}

/* ---------- a coach's settings (08vf-settings.js) ---------- */
.set-grid {
  display: grid;
  gap: 14px;
}
.set-r {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.set-r:first-child {
  border-top: 0;
}
.set-v {
  text-align: right;
  min-width: 0;
}
.set-b {
  gap: 8px;
  flex-wrap: wrap;
}
.set-b .btn {
  width: auto;
}
.set-me {
  gap: 14px;
  align-items: center;
}
.set-sw {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  vertical-align: middle;
}
@media (min-width: 1000px) {
  body.cow .set-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
  }
}
@media (min-width: 1500px) {
  body.cow .set-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- small charts (08vg-charts.js) and a client's wellness (08vh-wellness.js) ---------- */
.ch-box {
  position: relative;
  margin-top: 6px;
}
svg.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.ch-g {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
.ch-band {
  fill: var(--good);
  opacity: 0.1;
}
.ch-gl {
  position: absolute;
  right: 0;
  transform: translateY(-2px);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  padding: 0 4px;
  border-radius: 4px;
}
.ch-x {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.wl-h {
  flex-wrap: wrap;
  gap: 2px 12px;
}
.wl-st .stat .num {
  font-size: 22px;
}
.wl-st .stat .num small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.wl-st .stat > span,
.wl-st .stat > small {
  display: block;
  line-height: 1.3;
}
.wl-st .stat > small {
  font-size: 11px;
  margin-top: 2px;
}
@media (min-width: 1000px) {
  body.cow .wl-st {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- a client's Overview (08vi-overview.js) ---------- */
.ov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.ov-a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  min-width: 0;
  padding-bottom: 12px;
}
.ov-a:hover {
  border-color: var(--muted);
}
.ov-a .between {
  gap: 8px;
}
.ov-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
}
.ov-big small {
  font-family: var(--body, inherit);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.ov-ch {
  display: block;
  margin-top: 2px;
  min-height: 44px;
}
.ov-f {
  padding-right: 18px;
  line-height: 1.35;
}
.ov-go {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: var(--muted);
}
.ov-go .ic {
  width: 16px;
  height: 16px;
}
.ov-n {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.ov-n:first-child {
  border-top: 0;
}
.ov-n .btn {
  width: auto;
  flex: none;
}
.ov-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.ov-dot.gold {
  background: var(--gold);
}
.ov-dot.bad {
  background: var(--bad);
}
@media (min-width: 1000px) {
  body.cow .ov-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) and (max-width: 1340px) {
  body.cow .ov-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.ov-ch svg.chart {
  height: 56px;
}

/* ---------- a client's calendar for the coach (08vj-calendar.js) ---------- */
.cal-h {
  flex-wrap: wrap;
  gap: 8px 12px;
}
.cal-st .stat .num {
  font-size: 22px;
}
.cal-st .stat .num small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.cal-g {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-c {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 52px;
  padding: 5px 5px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  min-width: 0;
}
.cal-c b {
  font-size: 12px;
}
.cal-c.out {
  opacity: 0.4;
}
.cal-c.now b {
  color: var(--ember);
}
.cal-c.sel {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.cal-chs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 0;
}
/* a mark for something on a day: a dot on a phone, a dot with its name where there is room */
.cal-ch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
}
.cal-ch i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  flex: none;
}
.cal-ch.done i {
  background: var(--primary);
}
.cal-ch.rehab i {
  border-color: var(--ice);
}
.cal-ch.rehab.done i {
  background: var(--ice);
}
.cal-ch.ev i {
  border-color: var(--gold);
  border-radius: 2px;
}
.cal-ch.ev.done i {
  background: var(--gold);
}
.cal-ch.ck i {
  border-color: var(--ember);
  border-radius: 2px;
}
.cal-ch.ck.done i {
  background: var(--ember);
}
.cal-ch.miss i {
  border-color: var(--bad);
  border-style: dashed;
}
.cal-c .cal-ch .ell {
  display: none;
}
u.cal-fd {
  display: inline-block;
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: var(--good);
  text-decoration: none;
  flex: none;
}
u.cal-fd.under {
  background: var(--ice);
}
u.cal-fd.over {
  background: var(--gold);
}
.cal-lg {
  gap: 6px 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cal-m {
  display: grid;
  gap: 16px;
}
.cal-it {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.cal-it:first-child {
  border-top: 0;
}
.cal-it b {
  font-size: 14px;
}
.cal-it small {
  font-size: 12px;
}
.cal-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  flex: none;
}
.cal-ic .ic {
  width: 16px;
  height: 16px;
}
.cal-it.done .cal-ic {
  background: var(--primary);
  color: var(--on-primary);
}
.cal-it.rehab.done .cal-ic {
  background: var(--ice);
}
.cal-it.ev.done .cal-ic {
  background: var(--gold);
}
.cal-it.ck .cal-ic {
  color: var(--ember);
}
.cal-it.ck.done .cal-ic {
  background: var(--ember);
  color: #fff;
}
.cal-it.miss .cal-ic {
  color: var(--bad);
}
.cal-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.cal-f {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.cal-f .ic {
  width: 13px;
  height: 13px;
}
/* a week, day by day: a list on a phone, seven columns on a computer */
.cal-wk {
  display: grid;
  gap: 8px;
}
.cal-wd {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.cal-wd:first-child {
  border-top: 0;
}
.cal-wh {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  padding: 6px 0;
  border-radius: 10px;
  align-self: start;
}
.cal-wh small {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.cal-wh b {
  font-size: 18px;
}
.cal-wd.now .cal-wh {
  background: var(--primary);
  color: var(--on-primary);
}
.cal-wd.now .cal-wh small {
  color: inherit;
  opacity: 0.8;
}
.cal-wb {
  min-width: 0;
}
.cal-ad {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.cal-ad:first-child {
  border-top: 0;
}
.cal-an {
  width: 84px;
  flex: none;
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}
.cal-an small {
  font-size: 12px;
}
@media (min-width: 1000px) {
  body.cow .cal-st {
    grid-template-columns: repeat(4, 1fr);
  }
  body.cow .cal-m {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    align-items: start;
  }
  body.cow .cal-c {
    min-height: 96px;
    padding: 8px;
  }
  body.cow .cal-c b {
    font-size: 13px;
  }
  body.cow .cal-chs {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 3px;
  }
  body.cow .cal-c .cal-ch .ell {
    display: block;
  }
  body.cow .cal-wk {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
  }
  body.cow .cal-wd {
    grid-template-columns: 1fr;
    border-top: 0;
    padding: 0;
    gap: 6px;
  }
  body.cow .cal-wh {
    flex-direction: row;
    gap: 6px;
    align-items: baseline;
    justify-content: flex-start;
    padding: 6px 10px;
  }
  body.cow .cal-wb {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px 10px 8px;
    min-height: 150px;
  }
  body.cow .cal-wb .cal-ic {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }
  body.cow .cal-wb .cal-it b {
    font-size: 13px;
  }
}

/* ---------- nutrition: the fortnight in charts, and the strip that jumps to each part ---------- */
.nu-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.nu-nav::-webkit-scrollbar {
  display: none;
}
.nu-nav .chip-b {
  flex: none;
}
.nu-ch2 {
  display: grid;
  gap: 16px;
}
.nu-ch2 .between,
#nuCharts > div > .between {
  flex-wrap: wrap;
  gap: 2px 10px;
}
.nu-spl {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  height: 84px;
  margin-top: 6px;
}
.nu-sp {
  display: flex;
  flex-direction: column-reverse;
  border-radius: 5px;
  overflow: hidden;
  min-width: 0;
  background: var(--surface-2);
}
.nu-sp.none {
  opacity: 0.6;
}
.nu-sp i {
  display: block;
}
.nu-sp i.m0 {
  background: var(--primary);
}
.nu-sp i.m1 {
  background: var(--ember);
}
.nu-sp i.m2 {
  background: var(--gold);
}
@media (min-width: 1000px) {
  body.cow .nu-ch2 {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ---------- training for coaches: the quick builder and the exercise library (08vk-training.js) ---------- */
.pb-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}
.pb-pv {
  padding: 10px 14px 4px;
}
.pb-it {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.pb-it .btn {
  width: auto;
  flex: none;
}
.pb-it b {
  font-size: 14px;
}
.pb-it small {
  font-size: 12px;
}
.xl-ch {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.xl-ch::-webkit-scrollbar {
  display: none;
}
.xl-ch .chip-b {
  flex: none;
}
/* the Overview's area cards keep their own columns where they also carry the class the older tiles had */
.ov-grid.stat4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
@media (min-width: 1000px) {
  body.cow .scrim.pg #ccBody > .ov-grid.stat4 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) and (max-width: 1340px) {
  body.cow .scrim.pg #ccBody > .ov-grid.stat4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- supersets, a coach's video, and dragging a planned session (08vk-training.js, 08vj-calendar.js) ---------- */
.ss-t {
  display: inline-block;
  min-width: 22px;
  margin-right: 6px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  vertical-align: 1px;
}
video.ex-vid {
  display: block;
  width: 100%;
  max-height: 60vh;
  border-radius: var(--r-sm);
  background: #000;
}
[data-drag] {
  cursor: grab;
}
.cal-over {
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
}

/* ---------- Progress: body, measurements, photos, strength and sleep (08vp-progress.js) ---------- */
.pg-top .seg {
  margin: 0;
}
.pg-strip {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.pg-t .num {
  font-size: 22px;
  margin-top: 2px;
}
.pg-t .num small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.pg-t > span,
.pg-t > small {
  display: block;
  line-height: 1.3;
}
.pg-t > small {
  font-size: 11px;
  margin-top: 2px;
}
.pg-t .spark {
  display: block;
  margin-top: 6px;
  color: var(--primary);
}
.pg-ms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 16px;
}
.pg-m {
  padding: 8px 0 2px;
  border-top: 1px solid var(--line);
}
.pg-m .between {
  gap: 8px;
  flex-wrap: wrap;
}
.pg-up {
  color: var(--good);
}
.pg-cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pg-cmp > * {
  min-width: 0;
}
.pg-figs span {
  color: var(--muted);
}
.pg-pose {
  margin-top: 4px;
}
.pg-none {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}
.pg-tl {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pg-tld .between {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.pg-pr {
  padding: 6px 0;
  border-top: 1px solid var(--line);
  gap: 8px;
}
@media (min-width: 1000px) {
  body.cow .scrim.pg #ccBody > .pg-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* ---- the coach's bell (08vm-bell.js) ---- */
.chip.bell {
  position: relative;
  padding: 0;
  width: 36px;
  justify-content: center;
}
.chip.bell .tab-n {
  top: -5px;
  right: -7px;
}
.chip.bell[aria-expanded='true'] {
  border-color: var(--ink);
}
.bellp {
  position: absolute;
  z-index: 30;
  width: 400px;
  max-width: calc(100vw - 24px);
  max-height: min(620px, calc(100vh - 90px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  outline: none;
}
.bell-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.bell-h h3 {
  font-size: 16px;
}
.bell-b {
  overflow-y: auto;
  padding: 4px 8px 8px;
}
.bell-top {
  margin-bottom: 4px;
}
.bell-g {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 12px 8px 4px;
}
.bell-r {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 10px 8px;
  border-radius: 10px;
  text-align: left;
}
.bell-r:hover {
  background: var(--surface-2);
}
.bell-r .grow {
  min-width: 0;
}
.bell-w {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bell-t {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding-top: 2px;
}
.bell-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
}
.bell-f {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--line);
  margin: 0;
}
.sheet-b .bell-f {
  padding: 12px 8px 0;
  border-top: 0;
}

/* moving to Ember: the client list to check (08vl-migrate.js) */
.mv-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}
.mv-list {
  padding: 2px 14px;
}
.mv-r {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.mv-r:first-child {
  border-top: 0;
}
.mv-r input {
  margin-top: 3px;
}
.mv-r.have {
  opacity: 0.6;
  cursor: default;
}
.mv-c {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mv-warn {
  color: var(--gold);
}
.mv-cmp {
  display: grid;
  gap: 12px;
}
@media (min-width: 900px) {
  .mv-cmp {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .mv-orig {
    position: sticky;
    top: 0;
  }
}
.mv-pdf {
  width: 100%;
  height: 60vh;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.mv-img {
  width: 100%;
  border-radius: 10px;
  margin-top: 8px;
}
.mv-txt {
  white-space: pre-wrap;
  font: inherit;
  font-size: 13px;
  margin: 0;
  max-height: 60vh;
  overflow: auto;
}
.mv-day {
  display: grid;
  gap: 0;
  padding-top: 8px;
}
.mv-it {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.mv-it.need {
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}
.mv-fix {
  gap: 10px;
}
.mv-fix .f {
  margin: 4px 0 0;
  flex: 1;
  min-width: 0;
}
.mv-missed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.mv-orig summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}
.mv-orig summary::-webkit-details-marker {
  display: none;
}
.mv-orig[open] .mv-show {
  display: none;
}
.mv-orig[open] summary {
  margin-bottom: 8px;
}
.mv-orig .link {
  display: inline-block;
  margin-top: 8px;
}
.mv-tg {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.mv-tg:first-child {
  border-top: 0;
}
.mv-tgi {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 6px;
}
.mv-tgi .f {
  margin: 0;
  min-width: 0;
  font-size: 11px;
}
.mv-tgi .inp {
  padding-left: 8px;
  padding-right: 6px;
  min-width: 0;
}
.mv-tgc {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mv-pick {
  gap: 6px;
  flex-wrap: wrap;
}
.mv-h {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.mv-h:first-of-type {
  border-top: 0;
}

/* ---- To do today: one list, habits first (08wh-habits.js) ---- */
#todo .todo-r {
  width: 100%;
  min-height: 44px;
}
#todo .todo-r small {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  margin-top: 1px;
}
#todo .todo-r > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: none;
}
#todo .todo-done > summary {
  cursor: pointer;
  padding: 4px 0;
  list-style: none;
}
#todo .todo-done > summary::-webkit-details-marker {
  display: none;
}
#todo .todo-done[open] > summary {
  margin-bottom: 4px;
}
#todo .todo-done .todo-r .grow {
  color: var(--muted);
}
#todo .todo-fin {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.cv-hab {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.cv-hab:first-of-type {
  border-top: 0;
}
#hbBody .chip-b[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
#hbBody .chip-b {
  min-width: 52px;
}

/* ---------- packages: a phase of coaching laid out by day (08vl-packages.js) ---------- */
.cm i.pkg,
.cal-ch.pkg i {
  border-color: var(--good);
  border-radius: 1px;
  transform: rotate(45deg) scale(0.85);
}
.cm i.pkg.done,
.cal-ch.pkg.done i {
  background: var(--good);
}
.cal-it.pkg .cal-ic {
  color: var(--good);
}
.cal-it.pkg.done .cal-ic {
  background: var(--good);
  color: #fff;
}
.ag-i.pkg {
  background: var(--surface-2);
  color: var(--good);
}
.ag.done .ag-i.pkg {
  background: var(--good);
  color: #fff;
}
.pk-tl {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}
.pk-wk {
  display: grid;
  gap: 4px;
}
.pk-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.pk-d {
  position: relative;
  min-height: 40px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 4px 5px 8px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 3px;
}
.pk-d b {
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.pk-d.out {
  opacity: 0.4;
}
.pk-d.hab::after {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  height: 2px;
  border-radius: 1px;
  background: var(--gold);
}
.pk-d i,
.pk-lg i {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: none;
  border-radius: 2px;
  background: var(--good);
}
.pk-d i.form,
.pk-lg i.form {
  background: var(--ember);
}
.pk-d i.note,
.pk-lg i.note {
  background: var(--ice);
  border-radius: 50%;
}
.pk-d i.habit {
  display: none;
}
.pk-lg {
  gap: 6px 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pk-lg span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pk-lg u {
  display: inline-block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--gold);
}
.pk-s {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.pk-s:first-child {
  border-top: 0;
}
.pk-day {
  display: grid;
  gap: 2px;
  width: 58px;
  flex: none;
}
.pk-day .inp {
  padding: 6px 8px;
  text-align: center;
}
.pk-add {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pk-who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.pk-run {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.pk-run:first-of-type {
  border-top: 0;
}
.pk-step.wait b {
  color: var(--muted);
  font-weight: 600;
}
video.vid {
  width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  background: #000;
}
@media (min-width: 700px) {
  .pk-add {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- packages, 10x: covers, the board, the journey (08vl-packages.js) ---------- */
.pk-cv {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  min-height: 96px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #fff;
  background: #0f3d2e;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.pk-cv.c-forest {
  background-color: #0f3d2e;
}
.pk-cv.c-ember {
  background-color: #a63c16;
}
.pk-cv.c-slate {
  background-color: #2b3a42;
}
.pk-cv.c-sand {
  background-color: #7a5c30;
}
.pk-cv.c-plum {
  background-color: #4e2f4a;
}
.pk-cv.c-sea {
  background-color: #1d5a6e;
}
.pk-cv.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}
.pk-cv > * {
  position: relative;
}
.pk-cv-t {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.pk-cv-s {
  font-size: 12.5px;
  opacity: 0.85;
}
.pk-cv.hero {
  min-height: 150px;
  padding: 18px 20px;
}
.pk-cv.hero .pk-cv-t {
  font-size: 22px;
}
.pk-cv.sm {
  min-height: 72px;
  padding: 10px 12px;
}
.pk-cv.sm .pk-cv-t {
  font-size: 15px;
}
.pk-cv.xs {
  min-height: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  flex: none;
}
.pk-cv.sw {
  min-height: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  border: 2px solid transparent;
}
.pk-cv.sw[aria-pressed='true'] {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--ink);
}
.pk-sw {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  align-items: center;
}
.pk-sw-up {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.pk-sw-up.on {
  border-style: solid;
  border-color: var(--ink);
  color: var(--ink);
}
.pk-sw-up .ic {
  width: 15px;
  height: 15px;
}
/* the gallery */
.pk-gal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.pk-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  padding: 0;
}
.pk-card .pk-cv {
  border-radius: 0;
  min-height: 110px;
}
.pk-card-b {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
  min-width: 0;
}
.pk-card-a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pk-card:hover {
  border-color: var(--muted);
}
.pk-empty .pk-cv {
  max-width: 320px;
}
/* a package's own page */
.pk-view-g {
  display: grid;
  gap: 12px;
}
.pk-tbl td {
  vertical-align: middle;
  padding-right: 10px;
}
.pk-fun {
  display: grid;
  gap: 2px;
}
.pk-fun-r {
  display: grid;
  grid-template-columns: 64px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.pk-fun-r:first-child {
  border-top: 0;
}
.pk-fun-d {
  font-size: 12px;
  color: var(--muted);
}
.pk-fun-bar {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  margin-top: 4px;
  overflow: hidden;
}
.pk-fun-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}
.pk-fun-bar i.r {
  background: var(--line);
}
.pk-fun-bar i.d {
  background: var(--good);
}
.pk-fun-n {
  white-space: nowrap;
}
.pk-lg u.d {
  background: var(--good);
}
.pk-lg u.r {
  background: var(--line);
}
.pk-tbl .bar {
  display: block;
  margin-bottom: 4px;
}
.pk-refl {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.pk-refl:first-of-type {
  border-top: 0;
}
@media (min-width: 1000px) {
  .pk-view-g {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
  }
}
/* the builder */
@media (min-width: 1000px) {
  body.cow .scrim.pk-dlg .sheet.full {
    max-width: 1200px;
  }
}
.pk-ed {
  display: grid;
  gap: 16px;
}
.pk-kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.pk-kind {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}
.pk-kind .ic {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--muted);
}
.pk-kind span {
  min-width: 0;
}
.pk-kind small {
  display: block;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--muted);
}
.pk-kind:hover {
  border-color: var(--muted);
}
.pk-more summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
}
.pk-board {
  display: grid;
  gap: 12px;
}
.pk-wh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pk-stage {
  color: var(--ember);
  font-weight: 600;
}
.pk-cell {
  position: relative;
  min-height: 64px;
  min-width: 0;
  border-radius: 9px;
  background: var(--surface-2);
  padding: 4px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid transparent;
}
.pk-cell.out {
  opacity: 0.45;
}
.pk-cell.sel {
  border-color: var(--ember);
}
.pk-cell.over {
  border-color: var(--ember);
  border-style: dashed;
}
.pk-cell.hab::after {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  height: 2px;
  border-radius: 1px;
  background: var(--gold);
}
.pk-dn {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 1px 4px;
  border-radius: 5px;
}
.pk-dn:hover {
  background: var(--surface);
  color: var(--ink);
}
.pk-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 3px 5px;
  border-radius: 6px;
  background: var(--surface);
  border-left: 3px solid var(--good);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.pk-chip .ic {
  width: 12px;
  height: 12px;
  flex: none;
}
.pk-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pk-chip.drag {
  opacity: 0.4;
}
.pk-chip.k-lesson,
.pk-lg i.k-lesson {
  border-color: var(--good);
  background-color: var(--good);
}
.pk-chip.k-workout,
.pk-chip.k-cardio,
.pk-lg i.k-workout {
  border-color: var(--ember);
}
.pk-lg i.k-workout {
  background: var(--ember);
}
.pk-chip.k-form,
.pk-chip.k-stat,
.pk-chip.k-photo,
.pk-lg i.k-form {
  border-color: var(--gold);
}
.pk-lg i.k-form {
  background: var(--gold);
}
.pk-chip.k-note,
.pk-chip.k-message,
.pk-chip.k-menu,
.pk-lg i.k-note {
  border-color: var(--ice);
}
.pk-lg i.k-note {
  background: var(--ice);
}
.pk-chip.k-habit {
  border-color: var(--gold);
  border-left-style: dotted;
}
.pk-chip.k-lesson {
  background-color: var(--surface);
}
@media (max-width: 699px) {
  .pk-chip span {
    display: none;
  }
  .pk-chip {
    justify-content: center;
    padding: 3px 0;
  }
  .pk-cell {
    min-height: 54px;
    padding: 3px 2px 8px;
  }
}
@media (min-width: 700px) {
  .pk-kinds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  body.cow .pk-ed {
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
  }
  body.cow .pk-ed-side {
    position: sticky;
    top: 0;
  }
  body.cow .pk-kinds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* the client: the ring, their packages, today, the journey */
.pk-ring {
  flex: none;
}
.pk-ring circle {
  fill: none;
  stroke-width: 5;
}
.pk-ring .bg {
  stroke: var(--surface-2);
}
.pk-ring .fg {
  stroke: var(--good);
  stroke-linecap: round;
}
.pk-ring text {
  font-size: 12px;
  font-weight: 700;
  fill: currentColor;
}
.pk-cv .pk-ring .bg {
  stroke: rgba(255, 255, 255, 0.25);
}
.pk-cv .pk-ring .fg {
  stroke: #fff;
}
.pk-mine {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
}
.pk-mine .pk-cv {
  border-radius: 0;
}
.pk-mine-b {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
}
.pk-today.sm {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
}
.pk-today-h {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
}
.pk-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.pk-hero.done {
  opacity: 0.75;
}
.pk-catch {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  font-size: 13px;
  padding: 8px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.pk-catch .ic {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.pk-jr-h {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pk-jr-st {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ember);
  margin-top: 10px;
}
.pk-notes {
  font-size: 14.5px;
  line-height: 1.55;
}
.pk-key {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-left: 3px solid var(--ember);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
  margin: 10px 0;
}
.pk-q textarea {
  resize: vertical;
}
.pk-fin {
  border: 1px solid var(--good);
}
.pk-run-cv {
  flex: none;
  display: inline-flex;
}
.cal-ic.sm {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}
.cal-ic.sm .ic {
  width: 13px;
  height: 13px;
}

/* ---------- groups and journey challenges (08vl-groups.js) ---------- */
.gr-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.gr-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border-left: 4px solid var(--gc, var(--ember));
}
.gr-card > svg:last-child {
  color: var(--muted);
  flex: none;
}
.c-ember {
  --gc: var(--ember);
}
.c-gold {
  --gc: var(--gold);
}
.c-good {
  --gc: var(--good);
}
.c-ice {
  --gc: var(--ice);
}
.c-primary {
  --gc: var(--primary);
}
.gr-cols {
  gap: 10px;
}
.gr-col {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gc);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.gr-col[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--ink);
}
.gr-pick .chk .pill {
  margin-left: 6px;
}
.gr-post {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gr-post.pin {
  border-color: var(--gold);
}
.gr-post .tiny svg {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
}
.gr-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gr-ref {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.gr-ref > svg:first-child {
  color: var(--ember);
  width: 20px;
  height: 20px;
  flex: none;
}
.gr-ref > svg:last-child {
  color: var(--muted);
  flex: none;
}
.gr-ref b {
  display: block;
  font-size: 14px;
}
.gr-ref small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.gr-ref .grow {
  min-width: 0;
}
.gr-rxs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.gr-rx {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.gr-rx svg {
  width: 15px;
  height: 15px;
}
.gr-rx.on {
  border-color: var(--ember);
  color: var(--ember-ink);
  background: var(--ember-soft);
}
span.gr-rx {
  min-height: 26px;
  padding: 0 8px;
}
.gr-shares {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gr-stats {
  grid-template-columns: repeat(3, 1fr);
}
.gr-link {
  align-items: end;
}
.gr-m .grow {
  min-width: 0;
}
.gr-how summary {
  cursor: pointer;
  color: var(--muted);
}
.gr-how[open] summary {
  margin-bottom: 8px;
}
svg.way {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--ember);
  vertical-align: -4px;
}
.jmap {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.jm-road {
  fill: none;
  stroke: var(--line);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jm-done {
  fill: none;
  stroke: var(--ember);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jm-mark path {
  stroke: var(--line);
  stroke-width: 1.5;
}
.jm-mark circle {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 2;
}
.jm-mark text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.jm-p > circle {
  fill: var(--surface);
  stroke: var(--muted);
  stroke-width: 1.5;
}
.jm-p g {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jm-p .dot {
  fill: var(--muted);
  stroke: none;
}
.jm-p.me > circle {
  fill: var(--ember);
  stroke: var(--ember);
}
.jm-p.me g {
  stroke: var(--on-ember);
}
.jm-p.me .dot {
  fill: var(--on-ember);
}
.jm-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 14px;
}
.jm-legend span {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 8px;
  align-items: start;
  font-size: 13px;
}
.jm-legend svg {
  grid-row: span 2;
  margin-top: 1px;
}
.jm-legend small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.jm-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jm-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.jm-names,
.jm-today {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.jm-n {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 7px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
}
.jm-n.me {
  border-color: var(--ember);
}
.jm-n svg.way {
  width: 16px;
  height: 16px;
}
.gr-today > svg:first-child {
  color: var(--ember);
}
@media (max-width: 360px) {
  .gr-link {
    grid-template-columns: 1fr;
  }
  .jm-mark text {
    font-size: 15px;
  }
}

/* ---------- what a coach puts on a client's days (08vl-calitems.js) ---------- */
.cal-ch.co i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--primary);
}
.cal-ch.co i .ic {
  width: 10px;
  height: 10px;
}
.cal-ch.co.done i {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.cal-ch.co.missed i,
.cal-ch.co.no i {
  color: var(--bad);
  border-style: dashed;
  border-color: var(--bad);
}
.cal-ch.co.missed .ell,
.cal-ch.co.no .ell {
  text-decoration: line-through;
  color: var(--muted);
}
.cal-ch.co[draggable='true'] {
  cursor: grab;
}
.cal-it.co .cal-ic {
  color: var(--primary);
}
.cal-it.co.done .cal-ic {
  background: var(--primary);
  color: var(--on-primary);
}
.cal-it.co.missed .cal-ic,
.cal-it.co.no .cal-ic {
  color: var(--bad);
}
.cal-it.co.missed b,
.cal-it.co.no b {
  text-decoration: line-through;
  color: var(--muted);
}
.cal-it[role='button'] {
  cursor: pointer;
}
.cal-it[draggable='true'] {
  cursor: grab;
}
.cal-c {
  cursor: pointer;
  position: relative;
}
.cal-c:focus-visible,
.cal-it[role='button']:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.cal-plus,
.cal-add {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.cal-plus .ic,
.cal-add .ic {
  width: 14px;
  height: 14px;
}
.cal-plus:hover,
.cal-add:hover {
  background: var(--surface-2);
  color: var(--text);
}
/* on a phone the tile is small: the day panel below has the button */
.cal-plus {
  display: none;
}
.cal-add {
  float: right;
  margin: 0 0 4px 6px;
}
.cal-c.drop-on,
.cal-wd.drop-on {
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.dragging {
  opacity: 0.45;
}
.cal-kinds {
  display: grid;
  gap: 8px;
}
.cal-kind {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  width: 100%;
}
.cal-kind:hover {
  border-color: var(--primary);
}
.cal-kind b {
  display: block;
  font-size: 14px;
}
.cal-kind small {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}
.cal-kind .cal-ic {
  color: var(--primary);
}
#calToday .cal-it > .ic {
  color: var(--muted);
  width: 16px;
  height: 16px;
}
.ag-i.coach {
  background: var(--surface-2);
  color: var(--primary);
}
.ag.done .ag-i.coach {
  background: var(--good);
  color: #fff;
}
.ag-i.coach.miss {
  color: var(--bad);
}
.cm i.coach {
  border-radius: 2px;
}
.cm i.coach.done {
  background: var(--primary);
}
.cm i.coach.miss {
  border-color: var(--bad);
  border-style: dotted;
}
.pr-i .ic {
  flex: none;
}
@media (min-width: 560px) {
  .cal-kinds {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1000px) {
  body.cow .cal-plus {
    display: grid;
    opacity: 0;
  }
  body.cow .cal-c:hover .cal-plus,
  body.cow .cal-c:focus-within .cal-plus {
    opacity: 1;
  }
  body.cow .cal-ch.co .ell {
    display: block;
  }
}
@media (min-width: 1000px) {
  body.cow .cal-st {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* the calendar's figures on a client's page: five across when there are five (what the coach set is the fifth) */
@media (min-width: 1000px) {
  body.cow .scrim.pg #ccBody > .stat4.cal-st {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* ---- a group's chat and files ---- */
.pill.ember {
  background: var(--ember);
  color: #fff;
}
.gc-tabs {
  flex: none;
}
.gc-tabs .gc-n {
  font-weight: 700;
  color: var(--muted);
}
.gc {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: min(72dvh, 760px);
  min-height: 420px;
}
.gc-desk .gc {
  height: calc(100dvh - 190px);
  position: sticky;
  top: 12px;
}
.gc-b {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 12px;
  gap: 2px;
}
.gc .chat-f {
  border-radius: 0;
}
.gc .gc-reps {
  margin: 10px 12px 0;
  text-align: left;
  width: auto;
}
.gc-pin {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  text-align: left;
}
.gc-pin svg {
  width: 15px;
  height: 15px;
  color: var(--ember);
  flex: none;
}
.gc-who {
  align-self: flex-start;
  margin: 10px 0 -2px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.gc-who .muted {
  font-weight: 500;
}
.gc-who .pill {
  font-size: 10.5px;
  padding: 1px 7px;
}
.bub.gc-m a {
  color: inherit;
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.bub .gc-flag {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.8;
}
.bub .gc-flag svg {
  width: 11px;
  height: 11px;
  vertical-align: -1px;
}
.gc-rep {
  color: var(--bad);
}
.bub.me .gc-rep {
  color: inherit;
}
.bub .gc-ref.gr-ref {
  margin-top: 6px;
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}
.bub .gc-rx span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.bub .gc-rx span.on {
  color: var(--ink);
}
.bub .gc-rx b {
  font-size: 11px;
}
.gc-ph {
  display: block;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.bub .gc-ph {
  margin: -2px -6px 4px;
}
.gc-ph img {
  display: block;
  width: 100%;
  max-width: 260px;
  max-height: 320px;
  min-height: 80px;
  min-width: 120px;
  object-fit: cover;
}
.gc-full {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.bub.gc-hi {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}
.gc-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.gc-typing small {
  font-size: 12px;
}
.gc-up {
  cursor: pointer;
  flex: none;
  height: 44px;
  width: 44px;
}
.gc-prev:empty,
#gcPrev:empty,
#gcRp:empty {
  display: none;
}
#gcPrev {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gc-prev {
  position: relative;
  align-self: flex-start;
}
.gc-prev img {
  display: block;
  height: 88px;
  border-radius: 10px;
}
.gc-prev .icon-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--surface);
}
.gc-opts {
  flex-wrap: wrap;
}
.gc-opts .link[aria-pressed='true'] {
  color: var(--ember);
}
.gc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px;
}
.gc-grid .gc-ph img {
  width: 100%;
  min-width: 0;
  height: 84px;
  min-height: 0;
}
.gc-file .link-row {
  text-align: left;
  min-width: 0;
}
.scrim.gc-client .sheet-b.gc-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 0;
}
.scrim.gc-client .gc-page .gc {
  flex: 1;
  height: auto;
  min-height: 0;
  margin: 0 -16px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
}
/* ---------- Forms, a page of its own (08vn-forms.js) ---------- */
.pg-fm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pg-fm #fmTabs {
  max-width: 520px;
}
.pg-fm .seg button[disabled] {
  opacity: 0.45;
}
.fm-who .chk {
  flex: none;
}
.pg-fm details.card summary {
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}
.pg-fm details.card summary::-webkit-details-marker {
  display: none;
}
.pg-fm details[open] summary {
  margin-bottom: 6px;
}
.pg-fm table.ctab td {
  vertical-align: top;
}
@media (min-width: 1000px) {
  body.cow .pg-fm {
    max-width: 1180px;
  }
  body.cow .pg-fm .lib-ed {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
  body.cow .pg-fm .lib-pv {
    position: sticky;
    top: 0;
  }
  body.cow .pg-fm .phone .ph-b {
    max-height: 560px;
  }
}

/* ---------- a client's Check-ins (08vo-ckpage.js) ---------- */
.ckp-cs {
  display: flex;
  flex-direction: column;
}
.ckp-c,
.ckp-s {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.ckp-c:first-child,
.ckp-s:first-of-type {
  border-top: 0;
}
.ckp-c .grow {
  min-width: 0;
}
.ckp-g {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px 18px;
}
.ckp-ch .ch-x {
  display: flex;
  justify-content: space-between;
}
.ckp-yn {
  display: flex;
  gap: 3px;
  flex: none;
}
.ckp-yn i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.ckp-yn i.y {
  background: var(--gold);
  border-color: var(--gold);
}
.ckp-yn i.n {
  background: var(--line);
}
table.mini.ckp-t td {
  vertical-align: top;
  min-width: 90px;
  white-space: normal;
  overflow-wrap: anywhere;
}
table.mini.ckp-t td:first-child {
  min-width: 140px;
  max-width: 220px;
}
table.mini.ckp-cmp tr.df td {
  font-weight: 700;
}
table.mini.ckp-cmp td:first-child {
  padding-left: 10px;
}
table.mini.ckp-cmp tr.df td:first-child {
  box-shadow: inset 3px 0 0 var(--ember);
}
.pg-fm table.ctab td.tn,
.pg-fm table.ctab .pill {
  white-space: nowrap;
}
@media (max-width: 420px) {
  .ckp-yn {
    display: none;
  }
  .ckp-c {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .ckp-c .grow {
    flex-basis: 100%;
  }
  table.mini.ckp-t td:first-child {
    min-width: 120px;
  }
  #ckCmp .two {
    grid-template-columns: 1fr;
  }
}

/* ---------- messages in a client's area (08vn-msgpanel.js) ---------- */
/* on a computer: the conversation down the right of a client's page */
.cc-row {
  display: flex;
  flex: 1;
  min-height: 0;
}
.cc-row > #ccBody {
  min-width: 0;
}
.cc-pn {
  display: none;
}
.cc-row.cp-on .cc-pn,
.cc-row.cp-fold .cc-pn {
  display: flex;
  flex-direction: column;
  flex: none;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: var(--bg);
}
.cc-row.cp-on .cc-pn {
  width: 380px;
}
.cc-row.cp-fold .cc-pn {
  width: 56px;
}
.cc-pn .sheet-h {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.cc-pn .sheet-h h3 {
  font-size: 17px;
}
.cc-pn .sheet-b.chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 8px;
}
.cc-pn .chat-f {
  padding: 10px 14px 14px;
}
.cp-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 20px 0;
  color: var(--muted);
}
.cp-bar:hover {
  color: var(--text);
  background: var(--surface-2);
}
.cp-bar span {
  writing-mode: vertical-rl;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (max-width: 1279px) {
  .cc-row.cp-on .cc-pn {
    width: 330px;
  }
}
/* the line above a message that is about something, when it opens that thing */
button.bub-ref.go {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  color: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
button.bub-ref.go svg {
  width: 12px;
  height: 12px;
}
.bub-who {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 8px 0 0 12px;
}
/* in the clients table */
.cd-msg {
  align-items: center;
  min-width: 0;
  max-width: 240px;
}
.cd-msg .icon-btn {
  flex: none;
}
/* on a phone: the last few messages on a client's Overview */
.ov-msg-th {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}
.ov-msg-th .bub {
  max-width: 88%;
}
.ov-msg-th .bub p {
  font-size: 14px;
}
.ov-msg textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
}
.ov-msg .btn.sm {
  height: 44px;
  width: 48px;
  padding: 0;
}
.ctab .cd-mb {
  position: relative;
  flex: none;
  margin-left: auto;
}

/* ---------- the Library (08vn-library.js): one place, three areas, tables and pages ---------- */
.lb-areas {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.lb-a {
  padding: 8px 12px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.lb-a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ember);
}
.lb-kinds {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lb-k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
}
.lb-k[aria-selected='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.lb-n {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}
.lb-q {
  min-width: 0;
  width: 240px;
  max-width: 100%;
  height: 38px;
}
.lb-acts {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lb-acts .lb-q {
  flex: 1 1 100%;
  width: auto;
}
.lb-acts .btn {
  width: auto;
}
.lb-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.lb-filters .chips {
  flex: 1;
  min-width: 0;
}
.lb-filters .chip-b {
  height: 32px;
  padding: 0 11px;
  font-size: 13px;
}
.lb-cards {
  display: grid;
  gap: 14px;
}
.lb-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lb-ch {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
}
.lb-ch b {
  font-size: 17px;
}
.lb-ch > svg {
  color: var(--muted);
}
.lb-ca {
  gap: 8px;
  flex-wrap: wrap;
}
.lb-ca .btn,
.lb-empty .btn {
  width: auto;
}
.lb-reach {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.lb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.lb-pc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  min-width: 0;
}
.lb-pc b {
  font-size: 15.5px;
}
.lb-pc:hover,
.lb-ch:hover b {
  border-color: var(--muted);
}
.lb-st .lb-stb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}
.lb-xc b {
  min-width: 0;
}
.lb-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lb-about {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
}
.lb-weeks {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 699px) {
  .lb-weeks {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 2px 16px;
  }
  .lb-wk {
    flex: none;
  }
}
.lb-wk {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
}
.lb-wk small {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}
.lb-wk.light {
  border-style: dashed;
}
.lb-wk[aria-selected='true'] {
  border-color: var(--ember);
  box-shadow: inset 0 0 0 1px var(--ember);
}
.lb-page {
  display: grid;
  gap: 14px;
}
.lb-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  align-items: start;
}
.lb-day {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.lb-dh {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.lb-ex {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.lb-ex:first-of-type {
  border-top: 0;
}
.lb-ex.ss {
  box-shadow: inset 3px 0 0 var(--ember);
}
.lb-en {
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
}
.lb-day > .tiny {
  padding: 0 14px 10px;
}
.lb-side h2 {
  font-size: 16px;
}
.lb-who .entry {
  padding-left: 0;
  padding-right: 0;
}
.lb-mini {
  display: grid;
  gap: 8px;
}
.lb-mini > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
}
.lb-pv {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
}
.lb-pv h2 {
  font-size: 17px;
  min-width: 0;
}
.lb-pv .btn {
  width: 100%;
}
.lb-gc {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.lb-gc .pill {
  vertical-align: 1px;
}
.lb-in-area > :first-child {
  margin-top: 4px;
}
/* the builder */
.lb-bh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lb-bh .btn {
  width: auto;
}
.lb-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lb-name {
  font-family: var(--display, inherit);
  font-size: 22px;
  font-weight: 700;
  height: 50px;
}
.lb-mrow {
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.lb-weeksin {
  width: 110px;
  margin: 0;
}
.lb-weeksin .inp,
.lb-df,
.lb-meta > .inp:not(.lb-name),
.lb-panel .inp {
  height: 40px;
  min-height: 0;
  font-size: 16px;
}
.lb-tags {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.lb-ph {
  margin: 4px 0 12px;
}
.lb-ph .sec-h {
  font-size: 22px;
  margin: 0;
  line-height: 1.2;
}
.lb-ph p {
  margin: 4px 0 0;
}
.lb-tags .chip-b {
  height: 34px;
  padding: 0 11px;
  font-size: 13px;
}
.lb-bwrap {
  display: grid;
  gap: 14px;
}
.lb-bdays {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
  align-items: start;
}
.lb-bday {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: default;
  transition: border-color 0.12s;
}
.lb-bday.on {
  border-color: var(--ember);
}
.lb-bday.lb-over {
  border-color: var(--ember);
  background: var(--ember-soft);
}
.lb-bdh {
  display: flex;
  gap: 6px;
  align-items: center;
}
.lb-dn {
  font-weight: 700;
  height: 40px;
  min-height: 0;
}
.lb-df {
  height: 36px;
  font-size: 16px;
  font-weight: 500;
}
.lb-rows {
  display: flex;
  flex-direction: column;
}
.lb-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 44px 60px 50px auto;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.lb-rh {
  padding: 2px 0;
  border-top: 0;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}
.lb-rh span:nth-child(n + 3) {
  text-align: center;
}
.lb-row.ss {
  box-shadow: inset 3px 0 0 var(--ember);
  padding-left: 6px;
}
.lb-row.lb-before {
  box-shadow: inset 0 2px 0 var(--ember);
}
.lb-row.dragging {
  opacity: 0.4;
}
.lb-grip {
  align-self: center;
  width: 10px;
  height: 18px;
  cursor: grab;
  background-image: radial-gradient(var(--muted) 1.2px, transparent 1.3px);
  background-size: 5px 6px;
  opacity: 0.6;
}
.lb-rn {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}
.lb-rn:hover .ell {
  text-decoration: underline;
}
.lb-in {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.lb-in .inp {
  height: 36px;
  min-height: 0;
  padding: 0 4px;
  border-radius: 9px;
  font-size: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.lb-ra {
  display: flex;
  align-items: center;
  height: 36px;
}
.lb-ra .icon-btn {
  width: 30px;
  height: 30px;
}
.lb-pair[aria-pressed='true'] {
  color: var(--ember);
}
.lb-drop {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
}
.lb-addday {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  border-style: dashed;
  font-weight: 600;
  color: var(--muted);
}
.lb-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
}
.lb-xl {
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow-y: auto;
}
.lb-x {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  cursor: grab;
}
.lb-x .grow {
  min-width: 0;
}
.lb-x .icon-btn {
  width: 32px;
  height: 32px;
}
/* a narrow phone: rest goes under the name so the row fits */
@media (max-width: 380px) {
  .lb-row {
    grid-template-columns: 10px minmax(0, 1fr) 42px 56px auto;
  }
  .lb-row .lb-rest {
    display: none;
  }
}
@media (min-width: 700px) {
  .lb-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lb-reach {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* on a computer: the table with its preview, the page with its side panel, the builder with its library */
@media (min-width: 1000px) {
  body.cow .pg-lb > .pg-h,
  body.cow .pg-lb > #lbBuild > .pg-h {
    margin-bottom: 0;
  }
  body.cow .lb-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
  }
  body.cow .lb-pv {
    position: sticky;
    top: 0;
  }
  body.cow .lb-pv0 {
    min-height: 160px;
    justify-content: center;
    text-align: center;
  }
  table.lb-tab th.num,
  table.lb-tab td.num {
    text-align: right;
    white-space: nowrap;
  }
  table.lb-tab th.num .th-b {
    margin-left: auto;
  }
  table.lb-tab td:first-child {
    max-width: 360px;
  }
  table.lb-tab tr[aria-selected='true'] td {
    background: var(--ember-soft);
  }
  body.cow .lb-page {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
  body.cow .lb-side {
    position: sticky;
    top: 0;
  }
  body.cow .lb-bwrap {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
  body.cow .lb-panel {
    position: sticky;
    top: 0;
  }
  body.cow .lb-xl {
    max-height: calc(100vh - 300px);
  }
  body.cow .sb-sub {
    padding: 6px 10px 6px 39px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
  }
  body.cow .sb-sub[aria-current='true'] {
    color: var(--ink);
    background: var(--bg);
  }
}

/* ---------- a client's Training section (08vo-trainsec.js) ---------- */
.trs-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  margin-top: 10px;
}
.trs-strip > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.trs-strip b {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.1;
}
.trs-strip span {
  font-size: 13px;
  font-weight: 600;
}
.trs-strip small {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trs-grid {
  display: grid;
  gap: 4px;
}
.trs-row {
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}
.trs-h span {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.trs-c {
  display: block;
  height: 18px;
  border-radius: 5px;
  background: var(--line);
  opacity: 0.45;
}
.trs-leg .trs-c {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  vertical-align: -2px;
}
.trs-c.done {
  background: var(--good);
  opacity: 1;
}
.trs-c.late {
  background: var(--good);
  opacity: 0.55;
}
.trs-c.missed {
  background: var(--bad);
  opacity: 0.8;
}
.trs-c.extra {
  background: var(--ember);
  opacity: 0.8;
}
.trs-c.today,
.trs-c.ahead {
  background: transparent;
  border: 1.5px dashed var(--muted);
  opacity: 0.7;
}
.trs-leg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.trs-days {
  display: grid;
  gap: 10px;
}
.trs-days .lb-day {
  box-shadow: none;
  border: 1px solid var(--line);
}
.trs-list {
  display: flex;
  flex-direction: column;
}
.trs-s {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  width: 100%;
  min-height: 52px;
}
.trs-s:first-child {
  border-top: 0;
}
.trs-sd {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.trs-sd small {
  font-size: 12.5px;
}
.trs-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.trs-sm svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.trs-p {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--line);
}
.trs-p.good {
  color: var(--good);
}
.trs-p.low {
  color: var(--bad);
}
.trs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
}
.trs-pv {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.trs-pvh,
.trs-pvr {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 64px minmax(0, 1.4fr);
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.trs-pvh {
  border-top: 0;
  padding-top: 0;
}
.trs-pvr.short > span:last-child {
  color: var(--bad);
}
.trs-pvr.add > span:first-child {
  font-style: italic;
}
.trs-tw {
  overflow-x: auto;
  margin: 0 -4px;
}
.trs-t {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.trs-t th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 4px;
}
.trs-t td {
  padding: 8px 4px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.trs-t .n {
  text-align: right;
  white-space: nowrap;
}
.trs-t .up {
  color: var(--good);
}
.trs-t .down {
  color: var(--bad);
}
.trs-up {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  cursor: pointer;
}
.trs-up input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ember);
}
.trs-up.done {
  color: var(--muted);
  cursor: default;
}
.trs-vol {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trs-vr {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  font-size: 13.5px;
}
.trs-vr b {
  text-align: right;
}
.trs-vb {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--line) 50%, transparent);
  overflow: hidden;
}
.trs-vb i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 5px;
  background: var(--ember);
  z-index: 1;
}
.trs-vb i.under {
  opacity: 0.55;
}
.trs-vb em {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--good) 22%, transparent);
}
@media (max-width: 520px) {
  .trs-t .hide-s {
    display: none;
  }
}
@media (min-width: 700px) {
  .trs-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .trs-days {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
#trsProg > .between {
  flex-wrap: wrap;
  gap: 10px;
}
