/* ZYM — signal. Charcoal instrument panels with a signal red-orange, condensed bold numerals
   (Barlow Condensed), mono labels and tables (JetBrains Mono), dense tiles sized to their content,
   filled pictogram art, organic category cells and petal wheels. Follows Vercel's Web Interface Guidelines. */

:root {
  /* Dark (default): charcoal ground, dark tiles, signal red-orange for labels, art and the hero panel */
  --bg: #121212; --frame: #0D0D0D; --card: #1C1C1C; --card-2: #262626; --tile: #1C1C1C; --tile-2: #262626;
  --line: #2B2B2B; --line-2: #3A3A3A; --rule: #3A3A3A;
  --text: #F2EFEA; --muted: #A8A39C; --faint: #96918A; --muted-on-bg: #A8A39C;
  --sig: #F0563C; --sig-ground: #E85438; --on-sig: #141414; --sig-tile: #1B1918;
  --slate: #E85438; --on-slate: #141414; --grey: #F2EFEA; --on-grey: #141414; --cream: #F2EFEA;
  --brand: #E85438; --brand-hover: #EE6145; --brand-ink: #F0563C; --ink-on-brand: #141414;
  --brand-soft: color-mix(in srgb, #E0452D 18%, transparent); --brand-glow: none;
  --support: #F0563C;
  --data: #F2EFEA; --data-ink: #F0563C; --data-soft: color-mix(in srgb, #F0563C 16%, transparent); --on-data: #141414;
  --accent: #FFFFFF;
  --good: #F2EFEA; --warn: #E8B04B; --bad: #FF6B57; --info: #F0563C;
  --petal-out: #4A4744; --petal-in: #E9E5DF; --cell: #F2EFEA; --cell-ink: #141414;
  --shadow: none;
  color-scheme: dark;
  --radius: 10px;
  --sans: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --disp: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
  /* Light: warm paper ground, white tiles, the same signal red (darkened for text) */
  --bg: #EDEBE6; --frame: #E3E0DA; --card: #FFFFFF; --card-2: #F2F0EB; --tile: #FFFFFF; --tile-2: #F2F0EB;
  --line: #DFDCD5; --line-2: #CBC7BF; --rule: #CBC7BF;
  --text: #161616; --muted: #5C5852; --faint: #67635C; --muted-on-bg: #57534D;
  --sig: #C23A22; --sig-ground: #E85438; --on-sig: #141414; --sig-tile: #1B1918;
  --slate: #E85438; --on-slate: #141414; --grey: #161616; --on-grey: #FFFFFF; --cream: #161616;
  --brand: #161616; --brand-hover: #333; --brand-ink: #C23A22; --ink-on-brand: #FFFFFF;
  --brand-soft: color-mix(in srgb, #E0452D 14%, transparent); --brand-glow: none;
  --support: #C23A22;
  --data: #161616; --data-ink: #C23A22; --data-soft: color-mix(in srgb, #E0452D 12%, transparent); --on-data: #FFFFFF;
  --accent: #FFFFFF;
  --good: #161616; --warn: #8A5D00; --bad: #B42F1A; --info: #C23A22;
  --petal-out: #CFCBC4; --petal-in: #2A2826; --cell: #FFFFFF; --cell-ink: #141414;
  --shadow: none;
  color-scheme: light;
  }
}
:root[data-theme="light"] {
  /* Light: warm paper ground, white tiles, the same signal red (darkened for text) */
  --bg: #EDEBE6; --frame: #E3E0DA; --card: #FFFFFF; --card-2: #F2F0EB; --tile: #FFFFFF; --tile-2: #F2F0EB;
  --line: #DFDCD5; --line-2: #CBC7BF; --rule: #CBC7BF;
  --text: #161616; --muted: #5C5852; --faint: #67635C; --muted-on-bg: #57534D;
  --sig: #C23A22; --sig-ground: #E85438; --on-sig: #141414; --sig-tile: #1B1918;
  --slate: #E85438; --on-slate: #141414; --grey: #161616; --on-grey: #FFFFFF; --cream: #161616;
  --brand: #161616; --brand-hover: #333; --brand-ink: #C23A22; --ink-on-brand: #FFFFFF;
  --brand-soft: color-mix(in srgb, #E0452D 14%, transparent); --brand-glow: none;
  --support: #C23A22;
  --data: #161616; --data-ink: #C23A22; --data-soft: color-mix(in srgb, #E0452D 12%, transparent); --on-data: #FFFFFF;
  --accent: #FFFFFF;
  --good: #161616; --warn: #8A5D00; --bad: #B42F1A; --info: #C23A22;
  --petal-out: #CFCBC4; --petal-in: #2A2826; --cell: #FFFFFF; --cell-ink: #141414;
  --shadow: none;
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* Dark (default): charcoal ground, dark tiles, signal red-orange for labels, art and the hero panel */
  --bg: #121212; --frame: #0D0D0D; --card: #1C1C1C; --card-2: #262626; --tile: #1C1C1C; --tile-2: #262626;
  --line: #2B2B2B; --line-2: #3A3A3A; --rule: #3A3A3A;
  --text: #F2EFEA; --muted: #A8A39C; --faint: #96918A; --muted-on-bg: #A8A39C;
  --sig: #F0563C; --sig-ground: #E85438; --on-sig: #141414; --sig-tile: #1B1918;
  --slate: #E85438; --on-slate: #141414; --grey: #F2EFEA; --on-grey: #141414; --cream: #F2EFEA;
  --brand: #E85438; --brand-hover: #EE6145; --brand-ink: #F0563C; --ink-on-brand: #141414;
  --brand-soft: color-mix(in srgb, #E0452D 18%, transparent); --brand-glow: none;
  --support: #F0563C;
  --data: #F2EFEA; --data-ink: #F0563C; --data-soft: color-mix(in srgb, #F0563C 16%, transparent); --on-data: #141414;
  --accent: #FFFFFF;
  --good: #F2EFEA; --warn: #E8B04B; --bad: #FF6B57; --info: #F0563C;
  --petal-out: #4A4744; --petal-in: #E9E5DF; --cell: #F2EFEA; --cell-ink: #141414;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--data) 10%, transparent), transparent 60%),
              radial-gradient(800px 480px at -10% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 60%), var(--bg);
  background-attachment: fixed; color: var(--text);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, label { touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; line-height: 1.15; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
code { font: 12.5px var(--mono); background: var(--card-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.label { font-size: 12px; font-weight: 600; color: var(--muted); }
.label .gr { display: none; } /* legacy Greek subtitles from the Stoa theme */
.ic { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--data-ink); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--card); padding: 10px 14px; border-radius: 2px; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- top nav */
.topbar {
  position: sticky; top: 0; z-index: 40; height: 56px;
  display: flex; align-items: center; gap: 22px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand span { font: 600 25px/1 var(--sans); letter-spacing: -.04em; color: var(--brand); text-shadow: none; }
.nav { display: flex; gap: 2px; height: 100%; flex: 1; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; height: 100%;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
  border-bottom: 3px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--text); background: var(--card-2); }
.nav a.on { border-bottom-color: var(--brand); }
.topbar .record-btn { margin-left: auto; }
.status-dots { display: flex; gap: 12px; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.dot.ok::before { background: var(--good); }
.dot.warn::before { background: var(--warn); }
.member-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px; border: 0; background: none; cursor: pointer;
  border-radius: 2px; font-weight: 600; font-size: 14px;
}
.member-chip:hover { background: var(--card-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--support)); color: var(--ink-on-brand); font-weight: 700; font-size: 13px;
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.xl { width: 84px; height: 84px; font-size: 30px; }

main { max-width: 1200px; margin: 0 auto; padding: 22px 20px 80px; }

/* bottom tab bar (phones) with the centre Record button */
.tabbar { display: none; }

/* ---------------------------------------------------------------- layout */
.dash { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.dash > aside { display: grid; gap: 16px; position: sticky; top: 76px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--card-2); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h a { font-size: 13px; font-weight: 600; color: var(--data-ink); text-decoration: none; }
.card-h a:hover { text-decoration: underline; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.list-row:first-child { border-top: 0; }
.list-row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Strava stat: small label on top, bold value below */
.stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stat { display: grid; gap: 2px; min-width: 0; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat.lg .v { font-size: 30px; }
.stat.xl .v { font-size: clamp(34px, 4vw, 44px); }
.stat .sub { font-size: 12px; color: var(--muted); }
.stats.split > .stat { padding-left: 22px; border-left: 1px solid var(--line); }
.stats.split > .stat:first-child { padding-left: 0; border-left: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 2px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; user-select: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .06s;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); font-weight: 700; box-shadow: var(--brand-glow); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.outline-o { border-color: var(--brand); color: var(--brand); }
.btn.outline-o:hover { background: var(--brand-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--card-2); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn.big { min-height: 52px; font-size: 16px; padding: 0 26px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 40px; }
.btn.round { border-radius: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 2px;
  font-size: 12px; font-weight: 600; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.pill.accent { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill.good { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); border-color: transparent; }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: transparent; }
.pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: transparent; }
.pill.info { color: var(--data-ink); background: var(--data-soft); border-color: transparent; }
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--line-2); color: var(--text); }
.pill:empty { display: none; }

.pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.pips i.on { background: var(--brand); }

.bar { height: 6px; background: var(--card-2); border-radius: 2px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--data), var(--data-ink)); border-radius: 2px; transition: width .3s; }

/* sport-style icon tile for exercises */
.xi {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.xi .ic { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; }
input[type=text], input[type=number], input[type=password], input[type=tel], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 2px;
  background-color: var(--card); color: var(--text); border: 1px solid var(--line-2);
}
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--data-ink); outline-offset: 0; border-color: var(--data); }
input[type=range] { accent-color: var(--brand); width: 100%; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 2px;
  border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--text); background: var(--card);
  transition: background-color .15s, border-color .15s, color .15s;
}
.choice:hover span { border-color: var(--data-ink); }
.choice input:checked + span { background: var(--data); border-color: var(--data); color: var(--on-data); }
.choice input:focus-visible + span { outline: 2px solid var(--data-ink); outline-offset: 2px; }

/* ---------------------------------------------------------------- profile card (left rail) */
.profile-card { text-align: center; padding: 0; overflow: hidden; }
.profile-card .cover { height: 64px; background: radial-gradient(120% 140% at 0% 0%, var(--brand), transparent 62%), radial-gradient(120% 140% at 100% 100%, var(--support), transparent 60%), var(--card-2); }
.profile-card .avatar { margin: -42px auto 8px; border: 4px solid var(--card); }
.profile-card h2 { font-size: 20px; }
.profile-card .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.profile-card .stats { justify-content: center; padding: 14px 16px; border-top: 1px solid var(--line); margin-top: 14px; gap: 0; }
.profile-card .stats .stat { flex: 1; padding: 0 6px; border-left: 1px solid var(--line); }
.profile-card .stats .stat:first-child { border-left: 0; }
.profile-card .stats .v { font-size: 20px; }
.profile-card .latest { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.profile-card .latest a { color: var(--text); font-weight: 600; text-decoration: none; }

/* weekly bar chart */
.weekbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 70px; margin-top: 10px; }
.weekbars i { display: block; background: var(--data); opacity: .55; border-radius: 2px 2px 0 0; min-height: 2px; }
.weekbars i.now { background: var(--brand); opacity: 1; box-shadow: 0 0 12px color-mix(in srgb, var(--brand) 55%, transparent); }
.weekbars + .spread { font-size: 11px; color: var(--faint); margin-top: 4px; }
.goal-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--brand) 0, var(--data) calc(var(--p) * 1%), var(--card-2) 0); }
.goal-ring > span { width: 60px; height: 60px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 600; font-size: 18px; }

/* ---------------------------------------------------------------- activity card */
.activity { padding: 0; overflow: hidden; }
.activity .a-head { display: flex; gap: 12px; padding: 16px 18px 0; align-items: center; }
.activity .a-who { min-width: 0; }
.activity .a-who strong { display: block; font-size: 14px; }
.activity .a-who span { font-size: 12px; color: var(--muted); }
.activity .a-body { padding: 10px 18px 14px; display: grid; gap: 12px; }
.activity .a-title { font-size: 20px; font-weight: 600; line-height: 1.2; text-wrap: balance; }
.activity .efforts { border-top: 1px solid var(--line); }
.activity .effort { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.activity .effort .xi { width: 32px; height: 32px; }
.activity .effort .xi .ic { width: 16px; height: 16px; }
.activity .effort .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.activity .effort .rx { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.activity .more { padding: 8px 18px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.activity .achv { display: flex; gap: 8px; flex-wrap: wrap; }
.activity .a-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 18px; gap: 10px; }
.activity .kudos-count { font-size: 13px; color: var(--muted); }
.kudos-btn { display: inline-flex; align-items: center; gap: 6px; }
.kudos-btn.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.kudos-btn.on .ic { fill: currentColor; }
.summary-text { font-size: 14px; color: var(--muted); }

/* hero card for today's workout */
.workout-card { padding: 0; overflow: hidden; }
.workout-card .w-top { padding: 22px; background: radial-gradient(80% 140% at 0% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%), radial-gradient(70% 120% at 100% 100%, color-mix(in srgb, var(--data) 22%, transparent), transparent 60%), var(--card); border-bottom: 1px solid var(--line); }
.workout-card .w-top .label { color: var(--brand-ink); }
.workout-card .w-top h1 { margin: 4px 0 14px; }
.workout-card .w-body { padding: 6px 20px 18px; }

/* exercise rows in the plan */
.ex-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ex-row:first-child { border-top: 0; }
.ex-row .name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ex-row .why { font-size: 13px; color: var(--muted); }
.ex-row .prev { font-size: 12px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ex-row .rx { text-align: right; font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-row .rx small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 2px; }
.section-label:first-child { margin-top: 0; }

/* members picker */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.member-tile {
  display: grid; justify-items: center; gap: 10px; padding: 22px 14px; text-align: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .1s;
}
.member-tile:hover { border-color: var(--data); transform: translateY(-1px); box-shadow: 0 0 24px color-mix(in srgb, var(--data) 25%, transparent); }
.member-tile strong { font-size: 16px; }
.member-tile span.muted { font-size: 13px; }
.member-tile.add { border-style: dashed; color: var(--brand); font-weight: 700; }
.member-tile.add .avatar { background: var(--brand-soft); color: var(--brand); }


/* ---------------------------------------------------------------- live session (Record screen) */
.record { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; height: calc(100vh - 100px); min-height: 560px; }
.record > aside { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.stage { position: relative; background: #0b0b0d; border-radius: var(--radius); overflow: hidden; min-height: 320px; }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.stage .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #c9c9d2; padding: 24px; z-index: 1; }
.stage .placeholder h2 { color: #fff; }
.hud { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 2; }
.hud .pill { background: rgba(0,0,0,.6); color: #fff; border-color: transparent; }
.counter-ov { position: absolute; left: 18px; bottom: 12px; z-index: 2; font-size: clamp(90px, 13vw, 170px); font-weight: 600; line-height: .9; color: #fff; text-shadow: none; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.counter-ov small { font-size: .24em; font-weight: 600; opacity: .8; margin-left: 6px; letter-spacing: 0; }
.cue-banner {
  position: absolute; right: 16px; bottom: 22px; z-index: 3; max-width: min(480px, calc(100% - 32px));
  padding: 12px 16px; border-radius: 2px; background: rgba(20,20,24,.92); color: #fff;
  font-size: clamp(17px, 2vw, 22px); font-weight: 700; border-left: 4px solid var(--warn);
}
.cue-banner.good { border-left-color: var(--good); }
.live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.live-stats .stat { padding: 0 12px; border-left: 1px solid var(--line); text-align: center; }
.live-stats .stat:first-child { border-left: 0; }
.live-stats .stat .v { font-size: 26px; }
.ex-head { display: flex; gap: 12px; align-items: center; }
.ex-head h2 { font-size: 20px; }
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.queue li.now { color: var(--text); font-weight: 700; }
.queue li.done { opacity: .5; text-decoration: line-through; }

/* set log (Hevy pattern, Strava skin) */
.setlog { width: 100%; border-collapse: collapse; }
.setlog th { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: center; padding: 6px 4px; }
.setlog th:nth-child(2) { text-align: left; }
.setlog td { padding: 4px; text-align: center; }
.setlog td.prev { text-align: left; font-size: 13px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.setlog .sn { width: 32px; height: 32px; border-radius: 2px; border: 0; cursor: pointer; background: var(--card-2); font-weight: 700; font-size: 13px; color: var(--text); }
.setlog .sn.w { color: var(--warn); } .setlog .sn.f { color: var(--bad); } .setlog .sn.d { color: var(--info); }
.setlog input { min-height: 36px; padding: 4px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.setlog .ck { width: 38px; height: 36px; border-radius: 2px; border: 1px solid var(--line-2); cursor: pointer; background: var(--card); color: var(--muted); display: inline-grid; place-items: center; }
.setlog tr.now td { background: var(--brand-soft); }
.setlog tr.now .ck { background: var(--brand); border-color: var(--brand); color: var(--ink-on-brand); box-shadow: var(--brand-glow); }
.setlog tr.done .ck { background: var(--good); border-color: var(--good); color: var(--card); }
.setlog tr.todo { opacity: .55; }
.setlog tr td:first-child { border-radius: 2px 0 0 6px; } .setlog tr td:last-child { border-radius: 0 6px 6px 0; }

/* overlays (rest timer, RPE, summary) */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 10, 14, .55); backdrop-filter: blur(4px); overscroll-behavior: contain;
}
.overlay .sheet {
  width: min(560px, 100%); max-height: 92vh; overflow: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 2px; padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.rest-clock { font-size: clamp(90px, 18vw, 150px); font-weight: 600; text-align: center; color: var(--brand); text-shadow: none; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.rest-track { height: 6px; background: var(--card-2); border-radius: 2px; overflow: hidden; margin: 14px 0 18px; }
.rest-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--data)); transition: width .2s linear; }
.rpe-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rpe-grid .btn { min-height: 84px; flex-direction: column; gap: 2px; white-space: normal; }
.rpe-grid .btn .n { font-size: 28px; font-weight: 600; }
.rpe-grid .btn small { font-size: 11px; color: var(--muted); font-weight: 500; }
.honour { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.honour .xi { background: var(--brand-soft); color: var(--brand); }

/* ---------------------------------------------------------------- coach */
.chat { display: flex; flex-direction: column; height: clamp(480px, calc(100vh - 170px), 860px); padding: 0; }
.chat .card-h { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--data); color: var(--on-data); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .src { display: block; margin-top: 6px; font-size: 11px; opacity: .7; }
.composer { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.composer input { flex: 1; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; }

/* body, findings, sparks */
.finding { padding: 12px 0; border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; padding-top: 0; }
.spark { width: 100%; height: 80px; display: block; }
.spark path.line { fill: none; stroke: var(--data-ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark path.area { fill: var(--data-soft); }

/* voice studio */
.vlist { display: grid; gap: 6px; }
.vline {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) 56px auto; gap: 14px; align-items: center;
  padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.vline.sel { border-color: var(--data); box-shadow: inset 3px 0 0 var(--data); }
.vline.rec { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.vstat { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); }
.vline.has .vstat { background: var(--good); border-color: var(--good); }
.vtext { font-weight: 600; overflow-wrap: anywhere; }
.vmeta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vmeta code { font-size: 11px; }
.vdur { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
.vact { display: flex; gap: 6px; }
.vact .btn { min-height: 36px; }
.vact .btn.icon { width: 36px; }
.rec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 5px; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.row.compact { gap: 6px; }
.row.compact .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 2px; background: var(--card-2); color: var(--text); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .dash { grid-template-columns: 260px minmax(0, 1fr); }
  .dash > aside.right { grid-column: 1 / -1; position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .topbar { padding: 0 14px; gap: 12px; }
  .topbar .nav, .status-dots, .topbar .record-btn { display: none; }
  .topbar .member-chip { margin-left: auto; }
  main { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); }
  .dash { grid-template-columns: 1fr; }
  .dash > aside { position: static; }
  .dash > aside.left { order: 2; } .dash > section { order: 1; } .dash > aside.right { order: 3; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 4px 0; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on .ic { color: var(--brand); }
  .tabbar a.rec { color: var(--text); }
  .tabbar a.rec b { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: var(--ink-on-brand); display: grid; place-items: center; margin-top: -22px; box-shadow: 0 0 0 4px var(--bg), 0 0 22px color-mix(in srgb, var(--brand) 60%, transparent); }
  .tabbar a.rec b .ic { width: 26px; height: 26px; }
  .record { grid-template-columns: 1fr; height: auto; }
  .stage { height: 58vh; }
  .ex-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .ex-row .swap { grid-column: 3; grid-row: 1; }
  .ex-row .rx { grid-column: 2; text-align: left; }
  .ex-row .rx small { display: inline; margin-left: 6px; }
  .msg { max-width: 90%; }
  .rpe-grid { grid-template-columns: repeat(3, 1fr); }
  .vline { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .vact { grid-column: 1 / -1; flex-wrap: wrap; }
  .vact .btn:first-child { flex: 1; }
  .stats { gap: 16px; }
  .stats.split > .stat { padding-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
kbd { font: 600 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--card-2); }
.stats.tight { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.stats.tight > .stat { padding: 0 10px; }
.stats.tight > .stat:first-child { padding-left: 0; }
.stats.tight .v { font-size: 19px; }

/* ================================================================== visual components */
.stat .v, .stat.lg .v, .stat.xl .v { font-variant-numeric: normal; } /* hero figures stay proportional */
.live-stats .stat .v, .counter-ov, .rest-clock { font-variant-numeric: tabular-nums; } /* live, ticking numbers */
.empty { color: var(--faint); font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.kpi { background: var(--card-2); border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px; display: grid; gap: 4px; }
.kpi .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .k .ic { width: 14px; height: 14px; color: var(--data-ink); }
.kpi .v { font-size: 24px; font-weight: 600; line-height: 1.1; }
.kpi .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }

/* tooltip */
.tip { position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; opacity: 0; transition: opacity .12s;
  padding: 6px 10px; border-radius: 2px; background: var(--text); color: var(--card); font-size: 12.5px; font-weight: 600; max-width: 260px; }
.tip.on { opacity: 1; }
[data-tip] { cursor: default; outline-offset: 2px; }

/* charts */
.chart { display: block; width: 100%; overflow: visible; }
.chart .axis, .chart .grid { stroke: var(--line-2); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.cols { height: 84px; }
.cols .col path { fill: var(--data); opacity: .7; transition: opacity .15s; }
.cols .col.hi path { fill: var(--brand); opacity: 1; }
.cols .col:hover path, .cols .col:focus path { opacity: 1; }
.cols-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 4px; }

.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring .track { fill: none; stroke: var(--card-2); stroke-width: 8; }
.ring .val { fill: none; stroke: var(--brand); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand) 50%, transparent)); }
.ring > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring b { font-size: 22px; font-weight: 600; }
.ring small { font-size: 12px; color: var(--muted); }
.ring em { display: block; font-style: normal; font-size: 10px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .06em; }



.hbars { display: grid; gap: 10px; }
.hb { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: center; gap: 10px; font-size: 13px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hb-t { height: 8px; background: var(--card-2); border-radius: 4px; overflow: hidden; }
.hb-t i { display: block; height: 100%; background: var(--data); border-radius: 0 4px 4px 0; }
.hb.hi .hb-t i { background: var(--brand); }
.hb-v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-v small { font-weight: 500; color: var(--muted); margin-left: 2px; }

.gauge { display: grid; gap: 6px; }
.g-track { position: relative; height: 10px; }
.g-track .band { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.g-track .b0 { background: color-mix(in srgb, var(--text) 10%, var(--card)); } .g-track .b1 { background: color-mix(in srgb, var(--text) 18%, var(--card)); } .g-track .b2 { background: color-mix(in srgb, var(--text) 27%, var(--card)); } .g-track .b3 { background: color-mix(in srgb, var(--text) 36%, var(--card)); }
.g-mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 0 2px var(--card), 0 0 10px color-mix(in srgb, var(--brand) 60%, transparent); }
.g-labels { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; color: var(--faint); }
.g-labels .on { color: var(--text); font-weight: 700; }

.segs { display: grid; gap: 8px; }
.segs-bar { display: flex; gap: 2px; height: 10px; }
.segs-bar .seg { border-radius: 3px; background: var(--line-2); min-width: 4px; }
.segs-bar .seg.main { background: var(--brand); }
.segs-bar .seg.z1 { background: color-mix(in srgb, var(--data) 30%, transparent); } .segs-bar .seg.z2 { background: color-mix(in srgb, var(--data) 50%, transparent); }
.segs-bar .seg.z3 { background: color-mix(in srgb, var(--data) 75%, transparent); } .segs-bar .seg.z4 { background: color-mix(in srgb, var(--data) 90%, transparent); } .segs-bar .seg.z5 { background: var(--brand); }
.segs-key { display: flex; gap: 2px; font-size: 11px; color: var(--muted); }
.segs-key span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segs-key b { color: var(--text); }


.trend { height: 80px; }
.trend .line { fill: none; stroke: var(--data-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trend .area { fill: var(--data-soft); opacity: .6; }
.trend .end { fill: var(--brand); stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; }

.bodymap { width: 120px; height: 200px; flex: none; }
.bodymap .bones line { stroke: var(--line-2); stroke-width: 3; stroke-linecap: round; }
.bodymap circle.ok { fill: var(--card); stroke: var(--data-ink); stroke-width: 2; }
.bodymap circle.flag { fill: var(--brand); stroke: var(--card); stroke-width: 2; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand) 70%, transparent)); }
.bodymap circle.flag.mild { fill: var(--warn); filter: none; }

.astack { display: inline-flex; align-items: center; }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; border: 2px solid var(--card); }
.astack .avatar.xs + .avatar.xs { margin-left: -8px; }
.avatar.xs.more { background: var(--card-2); color: var(--muted); }

.icon-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 2px; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.icon-chip .ic { width: 15px; height: 15px; }
.icon-chip.ok .ic { color: var(--good); }
.icon-chip.off .ic { color: var(--faint); }

/* ================================================================== loading screen (quotes live here) */
.splash { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 32px; text-align: center;
  background: radial-gradient(700px 400px at 50% 40%, color-mix(in srgb, var(--data) 16%, transparent), transparent 70%), var(--bg); transition: opacity .35s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-in { display: grid; gap: 22px; justify-items: center; max-width: 560px; }
.splash .logo { font: 600 52px/1 var(--sans); letter-spacing: -.05em; color: var(--brand); text-shadow: none; }
.splash blockquote { margin: 0; min-height: 4.5em; }
.splash blockquote p { font-size: clamp(17px, 2.4vw, 22px); font-style: italic; line-height: 1.45; color: var(--text); }
.splash blockquote cite, .view-loading blockquote cite { display: block; margin-top: 10px; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--data-ink); }
.loadbar { width: 160px; height: 3px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.loadbar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--data)); animation: load 1.1s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.view-loading { display: grid; place-items: center; align-content: center; min-height: 50vh; text-align: center; gap: 18px; }
.view-loading blockquote { margin: 0; max-width: 520px; }
.view-loading blockquote p { font-size: 17px; font-style: italic; }
.view-loading.wait { visibility: hidden; } /* shown only if loading takes longer than a blink */

.activity .a-foot { justify-content: flex-start; min-height: 52px; }
.activity .a-foot .kudos-count { font-weight: 700; color: var(--text); }
.activity .a-foot .kudos-btn { margin-left: auto; width: 40px; padding: 0; }
.activity .achv { margin-left: auto; }

.ring-v { display: flex; align-items: baseline; justify-content: center; gap: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--text); font-weight: 700; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--line-2); }
.legend .sw.main { background: var(--brand); }
.legend .sw.data { background: var(--data); }

/* ================================================================== simplification pass */
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.back .ic { transform: scaleX(-1); width: 18px; height: 18px; }
.back:hover { color: var(--text); }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }

/* workout detail: exercise blocks with set tables */
.exblock { padding: 0; overflow: hidden; }
.exblock-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.exblock-name { font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.exblock-name:hover { color: var(--data-ink); }
.settable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.settable th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; text-align: left; padding: 8px 16px; }
.settable td { padding: 9px 16px; border-top: 1px solid var(--line); font-weight: 600; }
.settable td:first-child, .settable th:first-child { width: 64px; color: var(--muted); }
.settype { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--card-2); }
.settype.w { color: var(--warn); } .settype.f { color: var(--bad); } .settype.d { color: var(--data-ink); }

/* plan: exercise rows with chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 2px; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip.hi { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.chip.info { color: var(--data-ink); }
.chip .ic { width: 13px; height: 13px; }
.ex-row a.name { color: var(--text); text-decoration: none; }
.ex-row a.name:hover { color: var(--data-ink); }
.ex-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 2px; background: var(--data-soft); margin: 14px 0; font-size: 14px; }
.note .ic { color: var(--data-ink); margin-top: 1px; }
.extras { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.extras summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); padding: 4px 0; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--faint); font-weight: 700; padding-bottom: 4px; }
.cal-day {
  aspect-ratio: 1 / 1.05; border-radius: 2px; display: grid; align-content: start; justify-items: center; gap: 2px; padding-top: 6px;
  background: var(--card-2); border: 1px solid transparent; color: var(--muted); text-decoration: none; min-width: 0; overflow: hidden;
}
.cal-day.blank { background: transparent; }
.cal-day b { font-size: 13px; font-weight: 700; }
.cal-day em { font-style: normal; font-size: 9.5px; font-weight: 700; max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-day.done { background: var(--brand); color: var(--ink-on-brand); box-shadow: 0 0 12px color-mix(in srgb, var(--brand) 35%, transparent); }
.cal-day.done:hover { filter: brightness(1.1); }
.cal-day.planned { border-color: var(--data); color: var(--data-ink); background: var(--data-soft); }
.cal-day.today { outline: 2px solid var(--text); outline-offset: 1px; color: var(--text); }
.legend .sw.planned { background: var(--data-soft); box-shadow: inset 0 0 0 1px var(--data); }
.legend .sw.today { background: transparent; box-shadow: inset 0 0 0 2px var(--text); }

/* exercise library */
.exlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.exitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .15s, background-color .15s; }
.exitem:hover { border-color: var(--data); background: var(--card-2); }
.exitem-t { display: grid; flex: 1; min-width: 0; }
.exitem-t strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exitem-t span { font-size: 12px; color: var(--muted); }
.exvideo { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 0; }
.exvideo iframe { width: 100%; height: 100%; border: 0; display: block; }
.empty-video { display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700;
  background: radial-gradient(60% 80% at 50% 40%, color-mix(in srgb, var(--brand) 25%, transparent), transparent 70%), #0c0a0d; }
.empty-video .ic { width: 54px; height: 54px; padding: 14px; border-radius: 50%; background: var(--brand); color: var(--ink-on-brand); box-shadow: var(--brand-glow); }
.howto { font-size: 17px; line-height: 1.55; }

/* admin: assigned exercises (sets / reps / kg) */
.assign-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px 72px 40px; gap: 8px; align-items: end; }
.mini-field { display: grid; gap: 4px; }
.mini-field span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mini-field input { text-align: center; padding: 8px 4px; font-weight: 700; }

/* recording: the page scrolls normally; the camera stays pinned in view (no nested scroll trap) */
.record { height: auto; min-height: 0; align-items: start; }
.record > .stage { position: sticky; top: 72px; height: calc(100vh - 96px); min-height: 420px; }
.record > aside { overflow: visible; overscroll-behavior: auto; min-height: 0; }
.stage.unmirror video, .stage.unmirror canvas { transform: none; }
@media (max-width: 820px) {
  .record > .stage { position: relative; top: auto; height: 58vh; min-height: 300px; }
  .assign-row { grid-template-columns: 1fr 1fr 1fr 40px; }
  .assign-row select { grid-column: 1 / -1; }
  .wgrid { grid-template-columns: 1fr; }
}

.extras-card summary { cursor: pointer; font-weight: 700; }
.extras-card[open] summary { margin-bottom: 8px; }

/* ================================================================== compact plan, membership, staff tabs */
.wcard { padding: 0; overflow: hidden; border-left: 3px solid var(--brand); }
.wcard-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 14px; }
.wcard-h { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--text); }
.wcard-t { display: grid; gap: 2px; min-width: 0; }
.wcard-t strong { font-size: 20px; font-weight: 600; }
.wcard-t .muted { font-size: 13px; }
.wcard-date { flex: none; min-width: 64px; text-align: center; padding: 6px 8px; border-radius: 2px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 600; }
.wcard-chev { margin-left: auto; color: var(--muted); transition: transform .2s; display: grid; }
.wcard.open .wcard-chev { transform: rotate(90deg); }
.wcard-body { padding: 0 16px 14px; border-top: 1px solid var(--line); }
.uprow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.uprow:first-of-type { border-top: 0; }
.uprow .wcard-date { background: var(--data-soft); color: var(--data-ink); }
.cal-day.renew { position: relative; }
.cal-day.renew::after { content: ""; position: absolute; right: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.legend .sw.renew { border-radius: 50%; background: var(--warn); }
.seg { display: inline-flex; padding: 3px; border-radius: 2px; background: var(--card-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 2px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--data); color: var(--on-data); }
.mtable tbody tr { cursor: pointer; }
.mtable tbody tr:hover td, .mtable tbody tr:focus td { background: var(--card-2); }
.mtable td:first-child, .mtable th:first-child { width: auto; color: var(--text); }
.btn.icon.danger { color: var(--bad); }
@media (max-width: 820px) { .wcard-t strong { font-size: 17px; } .mtable th:nth-child(2), .mtable td:nth-child(2) { display: none; } }

/* ================================================================== design pass: type, hierarchy, micro-interactions
   One family (Archivo) in two widths: expanded + heavy for headings (team-jersey lettering),
   condensed for numbers (gym scoreboard). Radius follows hierarchy instead of one value everywhere. */
:root {
  --sans: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --spring: cubic-bezier(.2, .7, .3, 1); /* plain ease-out, no overshoot */
  --r-hero: 0; --r-card: 0; --r-inner: 0;
}
body { font-family: var(--sans); font-stretch: 100%; }
h1, h2, .wcard-t strong, .a-title, .exblock-name, .profile-card h2 { font-stretch: 112%; font-weight: 600; letter-spacing: -.015em; }
h1 { font-weight: 600; }
.stat .v, .kpi .v, .counter-ov, .rest-clock, .ring b, .ex-row .rx, .hb-v, .live-stats .stat .v, .cal-day b {
  font-stretch: 72%; font-weight: 600; letter-spacing: 0;
}
.stat .v { font-size: 26px; }
.stat.lg .v, .kpi .v { font-size: 30px; }
.card { border-radius: var(--r-card); }
.workout-card, .wcard, .profile-card, .pw, .chat, .record > .stage { border-radius: var(--r-hero); }
.kpi, .chip, .exitem, .note, .cal-day { border-radius: var(--r-inner); }
/* no shouty labels */
.section-label, .settable th, .mini-field span, .ring em, .setlog th { text-transform: none; letter-spacing: 0; font-size: 12px; }

/* ---------------------------------------------------------------- buttons: squish on press */
.btn { transition: background-color .15s, border-color .15s, color .15s, transform .35s var(--spring), box-shadow .2s; }
.btn:active { transform: scale(.95); transition-duration: .08s; }
.btn.primary:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 60%, transparent), 0 8px 28px color-mix(in srgb, var(--brand) 45%, transparent); }

/* the one signature element: Start as a weight plate with a knurled rim */
.plate {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--support) 55%, var(--brand)) 0 34%, var(--brand) 35% 100%); color: var(--ink-on-brand);
  border: 0; cursor: pointer; text-decoration: none; box-shadow: 0 0 0 4px var(--bg), 0 0 26px color-mix(in srgb, var(--brand) 55%, transparent);
  transition: transform .4s var(--spring);
}
.plate::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--brand) 70%, transparent);
  animation: knurl 14s linear infinite; }
.plate::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 3px rgba(0,0,0,.35); }
.plate .ic { position: relative; z-index: 1; width: 26px; height: 26px; margin-left: 3px; display: none; }
.plate:hover::before { animation-duration: 3s; }
.plate:active { transform: scale(.88) rotate(-8deg); transition-duration: .1s; }
@keyframes knurl { to { transform: rotate(360deg); } }
.hero-start { display: flex; align-items: center; gap: 16px; }
.hero-start .plate { width: 84px; height: 84px; }
.hero-start .plate::after { display: none; }
.hero-start .plate .ic { display: block; width: 30px; height: 30px; }
.hero-start strong { display: block; font-size: 18px; font-stretch: 112%; font-weight: 600; }
.hero-start span { color: var(--muted); font-size: 13px; }
.tabbar a.rec b.plate { width: 58px; height: 58px; margin-top: -26px; }
.tabbar a.rec b.plate::after { display: none; }
.tabbar a.rec b.plate .ic { display: block; width: 24px; height: 24px; }

/* ---------------------------------------------------------------- gliding nav indicator */
.nav { position: relative; }
.nav a { border-bottom: 0; position: relative; z-index: 1; }
.nav a.on { color: var(--text); }
.tabbar { position: fixed; }

/* ---------------------------------------------------------------- rubber segmented control */
.rseg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 2px; background: var(--card-2); border: 1px solid var(--line); }
.rseg button { position: relative; z-index: 1; border: 0; background: none; color: var(--muted); font: 700 14px var(--sans); padding: 8px 16px; border-radius: 2px; cursor: pointer; transition: color .2s; white-space: nowrap; }
.rseg button[aria-selected="true"] { color: var(--on-data); }

/* ---------------------------------------------------------------- jelly chips: chosen swells, pushes neighbours */
.choice span { transition: background-color .2s, border-color .2s, color .2s, padding .45s var(--spring), transform .45s var(--spring); }
.choice input:checked + span { padding: 0 20px; transform: scale(1.04); }
.choice:active span { transform: scale(.94); }

/* ---------------------------------------------------------------- squish switch */
.sswitch { position: relative; width: 52px; height: 30px; border-radius: 2px; border: 0; padding: 0; cursor: pointer; background: var(--line-2); transition: background-color .25s; flex: none; }
.sswitch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 2px; background: var(--card); transition: left .45s var(--spring), width .2s; }
.sswitch[aria-checked="true"] { background: var(--data); }
.sswitch[aria-checked="true"] i { left: 25px; }
.hud .sswitch { background: rgba(255,255,255,.25); }
.hud .sswitch[aria-checked="true"] { background: var(--data); }
.sound-ctl { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; border-radius: 2px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; }

/* ---------------------------------------------------------------- slide to commit */
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--bg) 30%, transparent); border-top-color: var(--ink-on-brand); animation: knurl .7s linear infinite; }

/* ---------------------------------------------------------------- spring check (set done) */
.setlog .ck svg { width: 16px; height: 16px; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- rolling digits */
.rd { display: inline-block; height: 1em; overflow: hidden; }

/* ---------------------------------------------------------------- swipe toast with fuse */
.toast { padding: 0; overflow: hidden; touch-action: none; cursor: grab; transition: transform .35s var(--spring), opacity .25s; }
.toast .toast-t { display: block; padding: 12px 18px 14px; }
.toast .fuse { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--data), var(--brand)); transform-origin: left; animation: fuse var(--d, 2.6s) linear forwards; }
.toast .fuse::after { content: ""; position: absolute; right: -3px; top: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--support); box-shadow: 0 0 8px var(--brand); }
@keyframes fuse { to { transform: scaleX(0); } }
.toast.out { opacity: 0; transform: translate(-50%, 40px); }

/* ---------------------------------------------------------------- pricing widget */
.pw { display: grid; gap: 12px; }
.pw-list { position: relative; display: grid; gap: 10px; }
.pw-plan { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; padding: 12px 16px;
  border-radius: 2px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--text); text-align: left; cursor: pointer;
  transition: transform .35s var(--spring), border-color .2s; }
.pw-plan:active { transform: scale(.98); }
.pw-main { display: grid; gap: 4px; min-width: 0; }
.pw-name { font-size: 17px; font-weight: 600; font-stretch: 112%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pw-badge { font-size: 12px; font-weight: 600; font-stretch: 100%; padding: 2px 9px; border-radius: 2px; background: var(--support); color: var(--text); }
.pw-cur { font-size: 12px; font-weight: 700; font-stretch: 100%; padding: 2px 9px; border-radius: 2px; background: var(--data-soft); color: var(--data-ink); }
.pw-price { display: flex; align-items: baseline; gap: 6px; font-size: 17px; font-weight: 600; }
.pw-per { font-size: 13px; font-weight: 600; color: var(--muted); }
.pw-cta { border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  .plate::before { animation: none; }
}
.wmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.wmeta span { display: inline-flex; align-items: center; gap: 5px; }
.wmeta .ic { width: 14px; height: 14px; color: var(--data-ink); }
.hero-start { text-decoration: none; color: var(--text); }
.hero-start .plate { background: var(--brand); box-shadow: 0 0 0 4px var(--card), inset 0 0 0 6px color-mix(in srgb, var(--bg) 18%, transparent), 0 0 26px color-mix(in srgb, var(--brand) 55%, transparent); }
.hero-start .plate .ic { color: var(--ink-on-brand); fill: var(--ink-on-brand); }
.hero-start:hover .plate::before { animation-duration: 3s; }
.hero-start:active .plate { transform: scale(.9) rotate(-8deg); }
.tabbar a.rec b.plate .ic { fill: currentColor; }

/* ================================================================== staff members dashboard (Bionis port) */
.bdash { display: grid; gap: 22px; }
.bd-greet { font-size: clamp(22px, 2.6vw, 28px); }
.pmenu { position: relative; }
.pmenu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; margin: 0; padding: 6px; list-style: none;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 2px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
  transform-origin: top right; animation: popin .22s var(--spring); }
@keyframes popin { from { opacity: 0; transform: scale(.92) translateY(-4px); } }
.pmenu-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 2px; cursor: pointer; color: var(--muted); font-size: 14px; }
.pmenu-list li[aria-selected="true"] { color: var(--text); font-weight: 700; }
.pmenu-list li:hover, .pmenu-list li:focus { background: var(--data-soft); color: var(--text); outline: none; }
.pmenu-list li:focus-visible { outline: 2px solid var(--data-ink); }
.pmenu-list .ic { width: 16px; height: 16px; color: var(--data-ink); }

.bd-overall { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; border-radius: var(--r-hero);
  background: radial-gradient(60% 120% at 100% 50%, color-mix(in srgb, var(--data) 16%, transparent), transparent 70%), var(--card); }
.bd-overall .hl { color: var(--text); font-weight: 700; }
.sdonut { position: relative; width: 168px; height: 168px; flex: none; }
.sdonut svg { width: 100%; height: 100%; }
.sd-outer { fill: none; stroke: var(--line); stroke-width: 2; }
.sd-track { fill: none; stroke: var(--card-2); stroke-width: 12; }
.sd-val { fill: none; stroke: var(--brand); stroke-width: 12; stroke-linecap: round; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--brand) 55%, transparent));
  animation: sdgrow 1.1s var(--spring); }
@keyframes sdgrow { from { stroke-dasharray: 0 999; } }
.sd-num { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; align-content: center; flex-wrap: wrap; padding-top: 58px; }
.sd-num small { font-size: 14px; color: var(--muted); margin-left: 2px; }

.kmc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kmc { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
.kmc-h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.kmc-ic { width: 28px; height: 28px; border-radius: 2px; display: grid; place-items: center; background: var(--data-soft); color: var(--data-ink); }
.kmc-ic .ic { width: 16px; height: 16px; }
.kmc-v { font-size: 34px; font-weight: 600; font-stretch: 72%; line-height: 1; }
.kmc-v small { font-size: 14px; color: var(--muted); font-weight: 600; font-stretch: 100%; margin-left: 3px; }
.kmc-t { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin: 0; }
.kmc-t b { color: var(--text); }
.kmc-t.good b { color: var(--good); } .kmc-t.bad b { color: var(--bad); }
.kmc-arrow { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--card-2); }
.kmc-arrow .ic { width: 12px; height: 12px; }
.kmc-arrow.down .ic { transform: rotate(180deg); }
.kmc-t.good .kmc-arrow { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.kmc-t.bad .kmc-arrow { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }

.bd-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.dc { width: 100%; height: 180px; display: block; overflow: visible; }
.dc-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dc-axis { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dc-avg { stroke: var(--text); stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.dc-bar path { fill: var(--data); opacity: .75; transition: opacity .15s; }
.dc-bar.now path { fill: var(--brand); opacity: 1; }
.dc-bar:hover path, .dc-bar:focus path { opacity: 1; }
.dc-zero { fill: var(--line-2); }
.dc-line { fill: none; stroke: var(--data-ink); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dc-end { fill: var(--brand); stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; }
.dc-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin: 6px 0 10px; }
.dc-x span { flex: 1; text-align: center; white-space: nowrap; }
.legend .sw.avgsw { height: 0; border-top: 2px dashed var(--muted); border-radius: 0; background: none; width: 14px; }

.bd-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.bd-ins { display: grid; align-content: start; gap: 10px; border-radius: var(--r-card); }
.ins-watch { background: linear-gradient(180deg, color-mix(in srgb, var(--data) 12%, transparent), transparent 45%), var(--card); }
.ins-vitals { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 45%), var(--card); }
.ins-actions { background: linear-gradient(180deg, color-mix(in srgb, var(--good) 9%, transparent), transparent 45%), var(--card); }
.ins-ic { width: 28px; height: 28px; border-radius: 2px; display: grid; place-items: center; color: var(--on-data); }
.ins-ic .ic { width: 16px; height: 16px; }
.ins-watch .ins-ic { background: var(--data); } .ins-vitals .ins-ic { background: var(--brand); color: var(--ink-on-brand); } .ins-actions .ins-ic { background: var(--good); color: var(--card); }
.ins-badge { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 2px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.ins-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 2px; background: var(--card-2); }
.ins-row .tone { flex: none; width: 22px; height: 22px; display: grid; place-items: center; color: var(--text); }
.ins-row .tone .ic { width: 18px; height: 18px; }
.tone.good { color: var(--good); } .tone.warn { color: var(--warn); } .tone.bad { color: var(--bad); }
.ins-t { font-weight: 700; font-size: 14px; }
.ins-d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ins-list { display: grid; gap: 4px; padding: 6px 12px; border-radius: 2px; background: var(--card-2); }
.ins-list .spread { padding: 7px 0; }
.ins-list b.good { color: var(--good); } .ins-list b.warn { color: var(--warn); } .ins-list b.bad { color: var(--bad); }

.bd-table td { vertical-align: middle; }
.bd-table td.late { color: var(--warn); font-weight: 700; }
.mini-meter { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.mini-meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--data), var(--data-ink)); }
@media (max-width: 820px) {
  .bd-overall { flex-direction: column; align-items: flex-start; }
  .sdonut { align-self: center; }
  .bd-table th:nth-child(5), .bd-table td:nth-child(5), .bd-table th:nth-child(3), .bd-table td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sd-val, .pmenu-list { animation: none; } }
.sd-num { display: flex; align-items: center; justify-content: center; padding: 0; }
@media (max-width: 820px) {
  .page-head .row { max-width: 100%; }
  .page-head .rseg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .page-head .rseg button { padding: 8px 12px; }
}

.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.theme-row .rseg button { padding: 6px 12px; font-size: 13px; }

/* secondary text that sits directly on the canvas (not inside a card) */
.page-head p, .page-head .muted, .back, .tabbar a, .status-dots .dot, .main-sub, main > .muted { color: var(--muted-on-bg); }
.tabbar a.on { color: var(--text); }
/* Light: the wordmark sits on Buff, where orange is too faint; Dark Brown carries it, the orange stays in dark mode. */
:root { --logo: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo: var(--brand); } }
:root[data-theme="dark"] { --logo: var(--brand); }
.brand span, .splash .logo { color: var(--logo); text-shadow: none; }

/* Staff: renewal request inbox (accept = slide, decline = hold) and linked dashboard actions */
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.req-who { display: grid; gap: 3px; min-width: 0; }
.req-who .muted { font-size: 13px; }
.req-who select { margin-top: 6px; max-width: 280px; }
.req-act { display: flex; gap: 8px; align-items: center; }
.req-accept { width: 260px; }
@media (max-width: 640px) { .req-row { grid-template-columns: 1fr; } .req-accept { flex: 1; width: auto; } }
button.ins-row.ins-link { width: 100%; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background .15s; }
button.ins-row.ins-link:hover { background: color-mix(in srgb, var(--brand) 14%, var(--card-2)); }
button.ins-row.ins-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ins-go { margin-left: auto; align-self: center; color: var(--muted); }
.ins-go .ic { width: 16px; height: 16px; }
.pw-alt { margin-top: 8px; }

/* Direct UPI payment sheet: app link on phones, QR on desktop / kiosk, then the UPI reference */
.upi-sheet { width: min(440px, 100%); display: grid; gap: 12px; }
.upi-amt { font-size: clamp(40px, 9vw, 54px); font-weight: 600; letter-spacing: -.03em; margin: 0; line-height: 1; }
.upi-to { margin: 0; font-size: 14px; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--brand-ink); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.upi-pay { display: grid; gap: 10px; }
.upi-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.upi-qr { margin: 4px 0 0; display: grid; justify-items: center; gap: 6px; }
.upi-qr img { width: 220px; height: 220px; padding: 10px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.upi-qr figcaption { font-size: 12px; color: var(--muted); }
.upi-pay:not(.desk) .upi-qr { display: none; }      /* phones open the app instead of scanning their own screen */
.upi-pay.desk { grid-template-columns: 1fr; }
.upi-pay.desk > a, .upi-pay.desk .upi-apps { display: none; } /* no UPI apps on a desktop or kiosk */
.upi-tip { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 2px; background: var(--brand-soft); font-size: 13px; }
.upi-tip .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.utr-row { display: flex; gap: 8px; }
.utr-row input { flex: 1; min-width: 0; }
.req-upi { font-size: 13px; }

/* ================================================================ plain controls + layout rules
   Buttons: page forms end with their actions left-aligned under the fields (primary first); rows and
   dialogs put the secondary action first and the primary last (rightmost). On phones action groups stack
   full width with the primary on top. Destructive actions live in their own section and confirm in place. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actions.split { justify-content: space-between; }
.actions.end { justify-content: flex-end; }
.actions.split > p { flex: 1 1 240px; margin: 0; font-size: 13px; }
.danger-zone { border-top-color: var(--bad) !important; }
.danger-zone h3 { color: var(--bad); }
.btn.armed { background: var(--bad) !important; border-color: var(--bad) !important; color: #fff !important; }
.btn.icon.armed { width: auto; padding: 0 12px; font-size: 11.5px; }
.pin-input { font-size: 28px !important; letter-spacing: .5em; text-align: center; min-height: 56px; }

/* segmented control: no sliding thumb, the selected option is filled */
.rseg { gap: 0; padding: 0; }
.rseg button { padding: 9px 16px; border-radius: 0; }
.rseg button + button { border-left: 1px solid var(--line-2); }
.rseg button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.rseg button:focus-visible { outline-offset: -3px; }

/* switch: static track and knob */
.sswitch { position: relative; width: 44px; height: 24px; border: 1px solid currentColor; border-radius: 0; padding: 0; cursor: pointer; background: transparent; }
.sswitch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: currentColor; opacity: .45; transition: left .12s ease-out; }
.sswitch[aria-checked="true"] i { left: 23px; opacity: 1; }

/* rep counter: plain figure */
.counter-ov .n { font-variant-numeric: tabular-nums; }

/* plan picker: native radios in ruled rows, price aligned right, actions below */
.pw { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.pw-list { display: grid; }
.pw-plan { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.pw-plan:last-child { border-bottom: 1px solid var(--line-2); }
.pw-plan input { width: 18px; height: 18px; margin: 0; accent-color: var(--text); }
.pw-plan:has(input:checked) .pw-name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.pw-main { display: grid; gap: 2px; min-width: 0; }
.pw-name { font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pw-per { font-size: 12px; color: var(--muted); }
.pw-price { font-size: 20px; font-weight: 500; }
.pw-badge, .pw-cur { font-size: 10px; letter-spacing: .06em; padding: 1px 6px; border: 1px solid var(--rule); margin-left: 6px; vertical-align: 2px; text-decoration: none; display: inline-block; }
.pw-actions { display: grid; gap: 8px; }

/* request rows: decline then accept, right-aligned on the row */
.req-act { justify-content: flex-end; }
.req-accept { min-width: 200px; }

@media (max-width: 640px) {
  .actions:not(.split) > .btn, .req-act > .btn { flex: 1 1 100%; }
  .req-act { flex-direction: column-reverse; align-items: stretch; } /* primary on top */
  .actions.split > .btn { flex: 1 1 100%; }
}

/* weekly volume: thin ink marks on a hatched target band */
.vol { width: 100%; border-collapse: collapse; }
.vol th { text-align: left; font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 7px 12px 7px 0; white-space: nowrap; width: 1%; }
.vol td { padding: 7px 0; border-top: 1px solid var(--line); }
.vol tr:first-child td, .vol tr:first-child th { border-top: 0; }
.vol th { border-top: 1px solid var(--line); }
.vol td.num { text-align: right; white-space: nowrap; padding-left: 12px; width: 1%; font-size: 13px; color: var(--muted); }
.vol td.num b { color: var(--text); font-weight: 600; }
.vol-bar { position: relative; display: block; height: 12px; }
.vol-band { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 5px); }
.vol-plan { position: absolute; left: 0; top: 0; bottom: 0; border: 1px solid var(--text); }
.vol-done { position: absolute; left: 0; top: 4px; height: 4px; background: var(--text); }
.legend .sw.vol-sw-done { height: 4px; background: var(--text); border-radius: 0; }
.legend .sw.vol-sw-plan { background: transparent; border: 1px solid var(--text); border-radius: 0; }
.legend .sw.vol-sw-band { background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 4px); border-radius: 0; }
.setlog tr.ramp .sn { font-size: 11px; letter-spacing: .04em; }
.setlog tr.ramp .prev { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
/* camera HUD: status left, controls right, one line; the status truncates instead of wrapping */
.hud { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.hud > .row { flex-wrap: nowrap; gap: 6px; flex: none; }
.hud #st { min-width: 0; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .hud #fps { display: none; } }
.chips:empty { display: none; }

/* Start: a dumbbell, no circle. Tab bar Start is a solid ink tile; the dashboard start is a square tile. */
.tabbar a.rec { background: var(--text); color: var(--bg) !important; margin: 6px 4px; }
.tabbar a.rec .ic { width: 24px; height: 24px; }
.tabbar a.rec.on { outline: 2px solid var(--text); outline-offset: 2px; }
.hero-start .start-tile { width: 64px; height: 64px; display: grid; place-items: center; background: var(--text); color: var(--bg); flex: none; }
.hero-start .start-tile .ic { width: 34px; height: 34px; stroke-width: 2.2; }
.hero-start:hover .start-tile { background: var(--brand-hover); }
.record-btn .ic { width: 18px; height: 18px; }

/* session: how-to sheet over the camera or the rest screen; clocks pause while it is open */
.info-ov { z-index: 70; }
.info-sheet { display: grid; gap: 14px; width: min(560px, 100%); }
.info-sheet .exvideo { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); background: #000; }
.info-sheet .exvideo iframe { width: 100%; height: 100%; border: 0; display: block; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.info-grid > div { display: grid; gap: 2px; }
.info-grid b { font-weight: 500; }
.ex-head { display: flex; align-items: center; gap: 12px; }
.ex-head #info { flex: none; }
.rest-actions { justify-content: center; }
.rest-actions #go { margin-left: auto; }
@media (max-width: 640px) { .rest-actions > .btn { flex: 1 1 40%; } .rest-actions #go { flex-basis: 100%; order: -1; margin: 0 0 4px; } }

/* clean-rep combo on the camera feed */
.combo-ov { position: absolute; right: 16px; bottom: 18px; display: grid; justify-items: end; gap: 0; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45); pointer-events: none; }
.combo-ov b { font-size: clamp(40px, 8vw, 72px); font-weight: 500; line-height: .9; letter-spacing: -.03em; }
.combo-ov span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.combo-ov.broke { opacity: .35; transition: opacity .4s; }
.tabbar a.rec .ic, .tabbar a.rec.on .ic { color: inherit !important; }
.live-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.live-stats .stat { padding: 0 8px; }
@media (max-width: 640px) { .live-stats .stat .v { font-size: 22px; } .live-stats .stat .k { font-size: 10px; } }


/* ================================================================ signal layer
   Density rules: a unit sits against its number; a label sits on top of (or right beside) its value; tiles
   are sized by content, not by a fixed grid row; gutters are 8px; nothing is centred in an empty box. */
body { background: var(--bg); font: 13px/1.5 var(--sans); letter-spacing: 0; }
::selection { background: var(--sig-ground); color: var(--on-sig); }
:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; }
h1, h2, .wcard-t strong, .a-title, .exblock-name, .profile-card h2 { font-family: var(--disp); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: .95; }
h2 { font-size: 22px; line-height: 1; }
h3, .card-h h3 { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--sig); }
.label, .stat .k, .kpi .k, th, .legend, .field > span, .mini-field > span, legend, .wmeta, .k { font-family: var(--sans); text-transform: uppercase; letter-spacing: .07em; font-size: 10.5px; font-weight: 500; }
.stat .v, .kpi .v, .num, .pw-price, .ring b, .counter-ov, .rest-clock, .sd-num, .cal-day b { font-family: var(--disp); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .v { font-size: 26px; line-height: 1; } .kpi .v { font-size: 30px; line-height: 1; }
.stat .v small, .kpi .v small { font-family: var(--disp); font-weight: 600; font-size: 14px; color: var(--muted); margin-left: 3px; }
.muted, .page-head p { color: var(--muted); }

/* ---------------------------------------------------------------- shell: grid launcher, wordmark, scrolling ticker */
.topbar { height: 52px; gap: 10px; padding: 0 10px 0 0; background: var(--frame); border-bottom: 1px solid var(--line); backdrop-filter: none; }
.launcher { width: 52px; height: 52px; display: grid; place-items: center; border: 0; background: var(--sig-ground); color: var(--on-sig); cursor: pointer; flex: none; }
.launcher svg { width: 18px; height: 18px; transition: transform .25s cubic-bezier(.2,.7,.3,1); }
.launcher:hover { background: var(--brand-hover); }
.launcher[aria-expanded="true"] svg { transform: rotate(45deg); }
.brand { font: 700 22px/1 var(--disp); letter-spacing: .02em; color: var(--text); text-decoration: none; flex: none; }
.marquee { flex: 1; min-width: 0; overflow: hidden; height: 100%; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.mq-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .mq-track, .marquee:focus-within .mq-track { animation-play-state: paused; }
.mq-set { display: flex; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: baseline; gap: 7px; padding: 0 16px; white-space: nowrap; border-right: 1px solid var(--line-2); }
.tk .k { color: var(--sig); font-size: 10px; }
.tk .v { font: 700 16px/1 var(--disp); color: var(--text); letter-spacing: .02em; text-transform: uppercase; }
.member-chip { border-radius: 999px; padding: 4px 10px 4px 4px; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; flex: none; }
.member-chip:hover { background: var(--tile); }
.avatar { background: var(--sig-ground); color: var(--on-sig); border-radius: 50%; font: 700 13px/1 var(--disp); letter-spacing: .02em; }
main { max-width: 1240px; padding: 10px 10px 40px; }
.tabbar { display: none !important; }

/* launcher menu: art tiles under the grid button */
.menu { position: fixed; top: 52px; left: 0; z-index: 45; width: min(420px, 100vw); padding: 8px; background: var(--frame); border: 1px solid var(--line); border-top: 0; animation: menuIn .2s cubic-bezier(.2,.7,.3,1); }
.menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-grid a { display: flex; justify-content: space-between; align-items: flex-end; min-height: 64px; padding: 10px 12px; background: var(--tile); color: var(--text); text-decoration: none; border-radius: var(--radius); transition: background-color .15s; }
.menu-grid a .k { color: var(--muted); }
.menu-grid a b { font: 700 20px/1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.menu-grid a:hover, .menu-grid a:focus-visible { background: var(--tile-2); }
.menu-grid a.on { box-shadow: inset 0 0 0 1px var(--sig); }
.menu-grid a.menu-start { grid-column: 1 / -1; background: var(--sig-ground); color: var(--on-sig); }
.menu-grid a.menu-start .k { color: var(--on-sig); }

/* ---------------------------------------------------------------- tiles and controls everywhere */
.card { background: var(--tile); border: 0 !important; border-radius: var(--radius); box-shadow: none; padding: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.soft, .kpi { background: var(--tile-2); }
.dash, .two, .grid, .stack { gap: 8px; }
.page-head { margin: 6px 0 10px; align-items: baseline; }
.page-head .k { color: var(--muted); }
.card-h { margin-bottom: 10px; }
.list-row { padding: 8px 0; border-top-color: var(--line); }
.kpi { border: 0; border-radius: calc(var(--radius) - 2px); padding: 10px 12px; }
.stats.split > .stat { border-left-color: var(--line-2); }
.exitem, .kmc, .pw-plan, .member-tile, .feed-card { background: var(--tile) !important; border: 0 !important; border-radius: var(--radius) !important; box-shadow: none !important; }
.exitem:hover, .member-tile:hover { background: var(--tile-2) !important; transform: none; }
.wgrid { gap: 8px !important; }
.ins-row, .ins-list { background: var(--tile-2) !important; border-radius: calc(var(--radius) - 2px) !important; }
.ins-watch, .ins-vitals, .ins-actions, .bd-overall { background: var(--tile) !important; }
.kmc-ic, .ins-ic { border-radius: 6px !important; background: var(--tile-2) !important; color: var(--sig) !important; }
.note { background: var(--tile-2); border: 0; border-radius: calc(var(--radius) - 2px); }
.cal-day { border-radius: 6px !important; }
.cal-day.done { background: var(--sig-ground) !important; color: var(--on-sig) !important; border-color: var(--sig-ground) !important; }
.danger-zone { box-shadow: inset 0 0 0 1px var(--bad); }
.toast { border-radius: var(--radius) !important; box-shadow: none !important; background: var(--text) !important; color: var(--bg) !important; }
.overlay { background: color-mix(in srgb, var(--frame) 80%, transparent); backdrop-filter: none; }
.overlay .sheet { background: var(--tile); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: none; }
.btn { border-radius: 999px; font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; font-weight: 500; min-height: 38px; padding: 0 16px;
  background: var(--tile-2); border: 0; color: var(--text); transition: background-color .15s, transform .1s; }
.btn:hover { background: var(--line-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--sig-ground); color: var(--on-sig); font-weight: 700; box-shadow: none; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; box-shadow: inset 0 0 0 1px var(--bad); color: var(--bad); }
.btn.big { font-size: 12.5px; min-height: 48px; }
.btn.icon { width: 38px; padding: 0; }
.btn.armed { background: var(--bad) !important; color: #fff !important; box-shadow: none !important; }
input, select, textarea { border-radius: 8px !important; background: var(--tile-2) !important; border: 1px solid transparent !important; color: var(--text); box-shadow: none !important; font-family: var(--sans); font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--sig) !important; outline: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.pill, .chip { border-radius: 999px; background: var(--tile-2); border: 0; color: var(--text); font-family: var(--sans); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; }
.chip.hi, .pill.good { background: var(--sig-ground); color: var(--on-sig); }
.pill.warn, .pill.accent { background: var(--text); color: var(--bg); }
.choice span { border-radius: 999px !important; background: var(--tile-2); border-color: transparent !important; text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.choice input:checked + span { background: var(--sig-ground) !important; color: var(--on-sig) !important; }
.rseg { background: var(--tile-2); border: 0; padding: 3px; gap: 2px; border-radius: 999px; }
.rseg button { color: var(--muted); font: 500 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border: 0 !important; border-radius: 999px; background: none; }
.rseg button + button { border-left: 0 !important; }
.rseg button:hover { color: var(--text); }
.rseg button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.pin-input { letter-spacing: .5em; font: 700 28px var(--disp) !important; }
.ring .track, .sd-track { stroke: var(--line-2); stroke-width: 3; }
.ring .val, .sd-val { stroke: var(--sig-ground); stroke-width: 3; stroke-linecap: round; filter: none !important; }
.sd-outer { stroke: none; }
.pw-plan { min-height: 0 !important; padding: 10px 12px !important; margin-bottom: 6px; }
.pw-price { font-size: 20px; }
.lw span, .t-cap { color: var(--muted); }

/* ---------------------------------------------------------------- dashboard: dense instrument panel */
.dash2 { display: grid; gap: 8px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .95fr);
  grid-template-areas: "hero dt wheel" "tiles tiles tiles" "bars feed feed"; align-items: start; }
.hero2 { grid-area: hero; } .dash2 > .dt { grid-area: dt; } .wheel-panel { grid-area: wheel; } .art-tiles { grid-area: tiles; } .bars2 { grid-area: bars; } .feed2 { grid-area: feed; }
.hero2, .dt, .panel, .art-tile { animation: tileIn .45s cubic-bezier(.2,.7,.3,1) both; }
.dt { animation-delay: .05s; } .wheel-panel { animation-delay: .1s; } .art-tiles { animation-delay: .15s; } .bars2, .feed2 { animation-delay: .2s; }
@keyframes tileIn { from { opacity: 0; transform: translateY(6px); } }

/* hero: the cycling-computer panel */
.hero2 { background: var(--sig-ground); color: var(--on-sig); border-radius: 16px; padding: 12px; display: grid; gap: 8px; }
.hero2-top { display: flex; align-items: flex-start; gap: 10px; padding: 2px 4px 0; }
.hero2-num { flex: 1; display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 6px; }
.hero2-num .k { grid-column: 1 / -1; color: var(--on-sig); }
.hero2-num b { font: 700 clamp(72px, 9vw, 104px)/.85 var(--disp); letter-spacing: -.02em; }
.hero2-num small { font: 700 20px/1 var(--disp); padding-bottom: 6px; }
.hero2-go { width: 52px; height: 52px; display: grid; place-items: center; background: var(--sig-tile); color: var(--sig); border-radius: 10px; flex: none; transition: transform .15s; }
.hero2-go .art { width: 34px; height: 34px; }
.hero2-go:hover { transform: scale(1.05); }
.stat2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat2 { display: grid; justify-items: end; gap: 0; padding: 8px 10px 9px; background: var(--sig-tile); border-radius: 8px; color: #F2EFEA; text-decoration: none; transition: background-color .15s; }
a.stat2:hover { background: #262321; }
.stat2 .k { color: #F0563C; font-size: 9.5px; }
.stat2 .v { font: 700 30px/1 var(--disp); letter-spacing: .01em; }
.stat2 .v small { font: 600 15px var(--disp); margin-left: 4px; color: #F0563C; }
.hero2-ctl { display: flex; gap: 6px; }
.ctl-round { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sig-tile); color: #F0563C; }
.ctl-pill { flex: 1; height: 46px; display: flex; align-items: center; gap: 12px; padding: 4px; border-radius: 999px; background: var(--sig-tile); color: #F0563C; text-decoration: none;
  font: 700 17px/1 var(--disp); letter-spacing: .06em; text-transform: uppercase; transition: background-color .15s; }
.ctl-pill > span:last-child { flex: 1; text-align: center; padding-right: 42px; }
.ctl-chev { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 2px #F0563C; font-size: 22px; transition: transform .25s cubic-bezier(.2,.7,.3,1); }
.ctl-pill:hover { background: #262321; } .ctl-pill:hover .ctl-chev { transform: translateX(4px); }

/* data table: the order-tracking panel */
.dt { background: var(--tile); border-radius: 16px; overflow: hidden; }
.dt-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px 10px; border-bottom: 1px solid var(--line-2); }
.dt-head span { font: 500 10.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--sig); }
.dt-head b { font: 700 22px/1 var(--disp); color: var(--sig); text-transform: uppercase; letter-spacing: .02em; }
.dt-r { display: grid; grid-template-columns: 42% 1fr; border-bottom: 1px solid var(--line-2); }
.dt-k { padding: 8px 10px 8px 14px; border-right: 1px solid var(--line-2); color: var(--sig); font: 500 10.5px/1.45 var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.dt-v { padding: 8px 14px 8px 10px; font-size: 12px; line-height: 1.45; text-transform: uppercase; letter-spacing: .02em; }
.dt-stage { display: grid; grid-template-columns: 42% 1fr; }
.dt-big { display: grid; justify-items: center; align-content: center; padding: 8px; border-right: 1px solid var(--line-2); }
.dt-big .dt-k { border: 0; padding: 0; }
.dt-big b { font: 500 74px/.9 var(--disp); color: var(--sig); }
.dt-note { padding: 10px 14px 12px 10px; }
.dt-note .dt-k { border: 0; padding: 0; display: block; margin-bottom: 4px; }
.dt-note p { font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.45; }
.dt.mini { border-radius: 10px; }
.dt.mini .dt-r { grid-template-columns: 46% 1fr; }
.dt.mini .dt-r:last-child { border-bottom: 0; }

/* generic dense panel */
.panel { background: var(--tile); border-radius: 16px; padding: 12px 14px; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.panel-h .k { color: var(--sig); }
.panel-h .v { font: 700 20px/1 var(--disp); }
.panel-h .link { color: var(--muted); text-decoration: none; } .panel-h .link:hover { color: var(--text); }
.wheel-panel .petals { display: block; width: min(100%, 320px); margin: 0 auto; }

/* art tiles: the catalogue grid */
.art-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.art-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1.15; padding: 10px 12px 12px; background: var(--tile); border-radius: 16px; color: var(--sig); text-decoration: none; transition: background-color .15s, transform .15s; }
.art-tile .k { font-size: 11px; }
.art-tile .art { width: 46%; height: auto; max-width: 64px; transition: transform .25s cubic-bezier(.2,.7,.3,1); }
.art-tile:hover { background: var(--tile-2); } .art-tile:hover .art { transform: translateY(-2px) rotate(-4deg); }

/* compact bars */
.wkbars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; height: 118px; align-items: end; }
.wkbar { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 4px; align-items: end; outline-offset: 2px; }
.wkbar i { display: block; background: var(--line-2); border-radius: 4px 4px 0 0; transition: background-color .15s, height .6s cubic-bezier(.2,.7,.3,1); animation: barUp .6s cubic-bezier(.2,.7,.3,1) both; }
@keyframes barUp { from { height: 4px; } }
.wkbar.on i, .wkbar:hover i { background: var(--sig-ground); }
.wkbar em { font: normal 9.5px var(--sans); color: var(--muted); text-transform: uppercase; text-align: center; letter-spacing: .04em; }

/* latest workouts: dense rows */
.f2 { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.f2:first-of-type { border-top: 0; }
.f2-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--tile-2); font: 700 13px var(--disp); }
.f2-t { display: grid; min-width: 0; } .f2-t b { font: 700 16px/1.1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.f2-t span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f2-n { font: 700 22px/1 var(--disp); } .f2-n small { font: 600 12px var(--disp); color: var(--muted); margin-left: 3px; }
.f2:hover .f2-t b { color: var(--sig); }

/* ---------------------------------------------------------------- petal wheel */
.petals .p-out { fill: var(--petal-out); stroke: var(--petal-out); stroke-linejoin: round; }
.petals .p-in { fill: var(--petal-in); stroke: var(--petal-in); stroke-linejoin: round; animation: petalIn .7s cubic-bezier(.2,.7,.3,1) both; transform-origin: center; transform-box: view-box; }
@keyframes petalIn { from { opacity: 0; transform: scale(.6); } }
.petals text { font-family: var(--disp); text-anchor: middle; fill: var(--text); }
.petals text.on-lit { fill: #141414; }
:root[data-theme="light"] .petals text.on-lit { fill: #FFFFFF; }
.petals .pv { font-size: 22px; font-weight: 700; }
.petals .pl { font-family: var(--sans); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; }
.petals .petal { cursor: default; outline: none; transition: opacity .15s; }
.petals:hover .petal { opacity: .55; } .petals .petal:hover, .petals .petal:focus-visible { opacity: 1; }
.wheel-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px; align-items: center; }
.wheel-row .petals { width: 100%; }

/* ---------------------------------------------------------------- exercises: organic category cells */
.cells-wrap { background: #000; border-radius: 22px; padding: 6px; }
:root[data-theme="light"] .cells-wrap { background: #161616; }
.vor { display: block; width: 100%; height: auto; }
.vcell { cursor: pointer; outline: none; }
.vcell path { fill: var(--cell); stroke: #000; stroke-width: 1.5; transition: fill .2s; }
.vcell text { font-family: var(--disp); font-weight: 700; text-anchor: middle; fill: var(--cell-ink); text-transform: uppercase; letter-spacing: .02em; pointer-events: none; }
.vcell .vn { font-family: var(--sans); font-weight: 500; fill: #6B6762; }
.vcell:hover path { fill: #FFFFFF; }
.vcell.on path { fill: var(--sig-ground); } .vcell.on text { fill: #141414; } .vcell.on .vn { fill: #3A1B14; }
.vcell:focus-visible path { stroke: var(--sig); stroke-width: 6; }
.ex-tools { display: flex; gap: 8px; margin: 8px 0; }
.ex-tools input { flex: 1; }
.ex-tools .btn[aria-pressed="true"] { background: var(--sig-ground); color: var(--on-sig); }
.exlist2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.exrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; background: var(--tile); border-radius: 10px; color: var(--text); text-decoration: none; transition: background-color .15s; }
.exrow:hover { background: var(--tile-2); }
.exrow .art.sm { width: 30px; height: 30px; color: var(--sig); }
.exrow-t { display: grid; min-width: 0; }
.exrow-t b { font: 700 16px/1.1 var(--disp); text-transform: uppercase; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exrow-t span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exrow-m { display: flex; gap: 6px; align-items: center; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .dash2 { grid-template-columns: 1fr 1fr; grid-template-areas: "hero dt" "wheel bars" "tiles tiles" "feed feed"; }
  .art-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .dash2 { grid-template-columns: 1fr; grid-template-areas: "hero" "dt" "tiles" "wheel" "bars" "feed"; }
  .art-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-tile { aspect-ratio: 1.5; }
  .wheel-row { grid-template-columns: 1fr; }
  .brand { display: none; }
  .member-chip span { display: none; }
  .menu { width: 100vw; }
  main { padding: 8px 8px 32px; }
  .exlist2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero2, .dt, .panel, .art-tile, .wkbar i, .petals .p-in, .menu { animation: none !important; }
  .mq-track { animation: none; } .marquee { overflow-x: auto; }
}

/* --- density pass 2 */
.wheel-row .dt { grid-area: auto; animation: none; }
.art-tile { aspect-ratio: auto; min-height: 96px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: end; gap: 2px 8px; }
.art-tile .k { grid-column: 1 / -1; align-self: start; }
.art-tile b { font: 700 28px/1 var(--disp); color: var(--text); white-space: nowrap; }
.art-tile b small { font: 600 14px var(--disp); color: var(--muted); margin-left: 2px; }
.art-tile .art { width: 40px; max-width: none; justify-self: end; }
.pw-plan { padding: 8px 12px !important; margin-bottom: 4px; }
.pw-main { gap: 0 !important; line-height: 1.25; }
.pw-list { gap: 0 !important; }
.ring em { font-size: 7.5px; letter-spacing: .02em; margin-top: 2px; }
.cols { max-height: 96px; }
@media (max-width: 680px) { .art-tile { min-height: 84px; } .art-tile b { font-size: 24px; } .art-tile .art { width: 34px; } }

/* ================================================================ member home + thumb-reach navigation */
.topbar { padding-left: 14px; }
.brand { display: block !important; }
main { padding-bottom: 104px; }
/* the grid button sits bottom-centre, where a thumb reaches it; the menu opens above it as a sheet */
.launcher.fab { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  width: 60px; height: 60px; border-radius: 18px; background: var(--sig-ground); color: var(--on-sig);
  box-shadow: 0 0 0 6px var(--bg), 0 8px 24px rgba(0, 0, 0, .35); transition: transform .2s cubic-bezier(.2,.7,.3,1), background-color .15s; }
.launcher.fab:hover { background: var(--brand-hover); }
.launcher.fab:active { transform: translateX(-50%) scale(.94); }
.launcher.fab svg { width: 20px; height: 20px; }
.menu { top: auto; left: 50%; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 76px); transform: translateX(-50%);
  width: min(440px, calc(100vw - 16px)); border: 1px solid var(--line-2); border-radius: 20px; padding: 8px; animation: sheetUp .22s cubic-bezier(.2,.7,.3,1); }
@keyframes sheetUp { from { opacity: 0; transform: translate(-50%, 10px); } }
.menu-grid a { min-height: 58px; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.menu-grid a .k { order: 2; }
body.menu-open main { filter: brightness(.55); transition: filter .2s; }

/* home: today first, the gym beside it, exercise cells below */
.home { display: grid; gap: 8px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "today gym" "cats cats"; align-items: start; }
.home-today { grid-area: today; } .home-gym { grid-area: gym; } .home-cats { grid-area: cats; }
.home-today { background: var(--sig-ground); color: var(--on-sig); border-radius: 18px; padding: 14px; display: grid; gap: 12px; animation: tileIn .45s cubic-bezier(.2,.7,.3,1) both; }
.today-h .k { color: var(--on-sig); }
.today-h h1 { font-size: clamp(40px, 6vw, 64px); line-height: .9; margin: 4px 0 8px; color: var(--on-sig); }
.today-meta { display: flex; gap: 16px; flex-wrap: wrap; font: 600 14px var(--disp); text-transform: uppercase; letter-spacing: .04em; }
.today-meta b { font: 700 32px/1 var(--disp); margin-right: 4px; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.today-list a { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; background: var(--sig-tile); border-radius: 10px; color: #F2EFEA; text-decoration: none; transition: background-color .15s; }
.today-list a:hover { background: #262321; }
.today-list .art { width: 24px; height: 24px; color: #F0563C; }
.today-list span { font: 700 16px/1.1 var(--disp); text-transform: uppercase; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-list b { font: 600 15px var(--disp); color: #F0563C; white-space: nowrap; }
.today-x { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

/* slide to start */
.slide { position: relative; height: 56px; border-radius: 999px; background: var(--sig-tile); overflow: hidden; display: flex; align-items: center; user-select: none; -webkit-user-select: none; }
.slide-fill { position: absolute; left: 4px; top: 4px; bottom: 4px; width: 48px; border-radius: 999px; background: color-mix(in srgb, #F0563C 28%, transparent); }
.slide-label { flex: 1; text-align: center; padding-left: 40px; color: #F0563C; font: 700 17px/1 var(--disp); letter-spacing: .06em; text-transform: uppercase; opacity: calc(1 - var(--p, 0) * 1.3); pointer-events: none; }
.slide-knob { position: absolute; left: 4px; top: 4px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #F0563C; color: #141414;
  font: 700 24px/1 var(--disp); cursor: grab; touch-action: none; display: grid; place-items: center; transition: transform .35s cubic-bezier(.2,.7,.3,1.2); }
.slide:not(.dragging):not(.done) .slide-fill { transition: width .35s cubic-bezier(.2,.7,.3,1.2); }
.slide.dragging .slide-knob { transition: none; cursor: grabbing; }
.slide-knob:focus-visible { outline: 2px solid #F2EFEA; outline-offset: 2px; }
.slide.armed .slide-label { opacity: 1; }
.slide.done .slide-fill { background: #F0563C; }
.slide.done .slide-label { color: #141414; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slide-knob, .slide-fill { transition: none !important; } }

/* in the gym: leaderboard + records + recent */
.home-gym { animation-delay: .06s; }
.lead { display: grid; gap: 2px; margin-bottom: 4px; }
.lead-r { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.lead-r:first-child { border-top: 0; }
.lead-n { font: 700 18px var(--disp); color: var(--sig); }
.lead-t { display: grid; min-width: 0; } .lead-t b { font: 700 16px/1.1 var(--disp); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-t span { font-size: 10.5px; color: var(--muted); }
.lead-v { font: 700 24px/1 var(--disp); white-space: nowrap; } .lead-v small { font: 600 12px var(--disp); color: var(--muted); margin-left: 3px; }
.sub-h { color: var(--sig); margin: 10px 0 2px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.home-cats .cells-wrap { padding: 5px; border-radius: 18px; }
.home-cats .vcell { cursor: pointer; }

/* slim weekly volume (Plan) */
.vol-card .petals { display: block; width: min(100%, 280px); margin: 0 auto; }
.vol-note { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 8px; }

@media (max-width: 760px) {
  .home { grid-template-columns: 1fr; grid-template-areas: "today" "gym" "cats"; }
}

/* staff: simulated review panel */
.rev { display: grid; gap: 8px; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.rev legend { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; color: var(--muted); }
.rev-run { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.rev-run.on, .rev-run:hover { color: var(--sig); }
.rev-progress { display: grid; gap: 8px; }
.rev-sum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; }
.rev-score { display: grid; gap: 2px; } .rev-score b { font: 700 56px/.9 var(--disp); } .rev-score span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rev-dist { display: grid; gap: 4px; }
.rd { display: grid; grid-template-columns: 28px minmax(0, 1fr) 24px; gap: 8px; align-items: center; font-size: 11px; }
.rd i { height: 6px; background: linear-gradient(90deg, var(--sig-ground) var(--w), var(--line-2) var(--w)); border-radius: 3px; }
.rd b { font: 700 15px var(--disp); text-align: right; }
.rev-rec { display: grid; justify-items: end; } .rev-rec b { font: 700 40px/1 var(--disp); } .rev-rec span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.rev-head { grid-column: 1 / -1; font-size: 13px; }
.rev-sum #revmd { grid-column: 1 / -1; justify-self: start; }
.rev-theme { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rev-theme:first-of-type { border-top: 0; }
.rev-theme b { font: 700 17px/1.1 var(--disp); text-transform: uppercase; } .rev-theme p { font-size: 12px; margin-top: 2px; }
.rev-theme .pill { justify-self: start; align-self: start; }
.sev { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 999px; background: var(--tile-2); }
.sev.high { background: var(--sig-ground); color: var(--on-sig); }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.rev-card { display: grid; gap: 8px; align-content: start; }
.rev-who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rev-who b { font: 700 17px/1.1 var(--disp); text-transform: uppercase; } .rev-who div span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.rev-card h4 { margin: 0; font: 700 18px/1.15 var(--disp); text-transform: uppercase; }
.rev-card p { font-size: 12.5px; line-height: 1.55; }
.rev-fix { padding-top: 8px; border-top: 1px solid var(--line); } .rev-fix .k { color: var(--sig); margin-right: 6px; }
.stars { color: var(--sig); letter-spacing: 1px; font-size: 14px; white-space: nowrap; } .stars i { font-style: normal; color: var(--line-2); }
@media (max-width: 900px) { .rev { grid-template-columns: 1fr; } .rev-sum { grid-template-columns: 1fr 1fr; } .rev-dist { grid-column: 1 / -1; } }

/* --- review-panel fixes: in-app text size, calm camera mode, renewal note */
:root { --ui-scale: 1; }
body { zoom: var(--ui-scale); }           /* whole UI scales together, layout stays proportional */
.stage.no-lines canvas { opacity: 0; }
.pw-note { font-size: 11px; color: var(--muted); margin: 0; }
.theme-row + .theme-row { margin-top: 8px; }

/* --- review-panel fixes, round 2 */
.fab-label { position: absolute; left: 50%; top: calc(100% + 2px); transform: translateX(-50%); font: 600 10px/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; color: var(--text); white-space: nowrap; pointer-events: none; }
.launcher.fab { bottom: max(26px, calc(env(safe-area-inset-bottom) + 10px)); }
.menu-size { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 12px; background: var(--tile); border-radius: var(--radius); }
.menu-size .k { color: var(--muted); }
/* smallest labels were 9.5-10.5px; nothing below 11px now */
.k, .label, .stat .k, .kpi .k, th, .legend, .field > span, .mini-field > span, legend, .wmeta, .pill, .chip, .tk .k, .stat2 .k,
.dt-k, .dt-head span, .f2-t span, .lead-t span, .exrow-t span, .wkbar em, .today-x, .sev, .pw-per { font-size: 11px; }
.petals .pl { font-size: 10.5px; }
.hidden-board { padding: 10px 14px; font-size: 12px; } .hidden-board a { color: var(--sig); }
/* the page is zoomed by the text-size setting, so viewport units must be divided back out */
.menu { width: min(440px, calc((100vw - 16px) / var(--ui-scale))); }
.fab-label { background: var(--bg); padding: 2px 6px; border-radius: 999px; }

/* brand: the mountain-Y wordmark is an alpha mask, so it takes the theme's text colour */
.brand-mark { display: block; aspect-ratio: 352 / 156; background: currentColor;
  -webkit-mask: url(/brand/wordmark.png) center / contain no-repeat; mask: url(/brand/wordmark.png) center / contain no-repeat; }
.brand { color: var(--text); font-size: 0; }
.brand .brand-mark { height: 24px; }
.splash .logo.brand-mark { height: 64px; margin: 0 auto; color: var(--text); }
@media (forced-colors: active) { .brand-mark { background: CanvasText; } }

/* ================================================================ round 3: membership card + plan sheet, muscle map,
   smooth levels chart, square workout tiles, resume workout, folding gym board */
/* anatomy figures (js/figure.js): line art on a light grey tile in every theme, trained muscles in blue.
   The fills are set on the paths; these swatches match them for the legend. */
:root { --anat-tile: #D9D9D9; --m1: #B9D4F4; --m2: #62A1E9; --m3: #1F72D6; }

/* muscle map: one tile per view */
.mmap { display: flex; justify-content: center; gap: 10px; }
.mmap figure { margin: 0; flex: 1; max-width: 168px; text-align: center; }
.mm-fig { display: block; width: 100%; height: auto; padding: 10px 6px; border-radius: 10px; background: var(--anat-tile); box-sizing: border-box; }
.an-p { transition: fill .3s; }
.an-p[data-tip] { cursor: help; } .an-p[data-tip]:hover { filter: brightness(1.1) saturate(1.15); }
.mmap figcaption { margin-top: 4px; font: 500 11px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mm-legend { display: flex; align-items: center; gap: 4px; font: 500 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mm-legend i { display: block; width: 18px; height: 8px; border-radius: 2px; }
.mm-legend i.m1 { background: var(--m1); } .mm-legend i.m2 { background: var(--m2); } .mm-legend i.m3 { background: var(--m3); }
.mm-legend span:first-child { margin-right: 2px; } .mm-legend span:last-child { margin-left: 2px; }
.mm-top { list-style: none; margin: 0; padding: 0; }
.mm-top li { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.mm-top li:first-child { border-top: 0; }
.mm-top b { font-size: 18px; } .mm-top small { font: 500 11px var(--sans); color: var(--muted); margin-left: 3px; }
.mm-wrap { display: flex; gap: 18px; align-items: center; }
#mmfig { flex: 1.3; min-width: 0; } .mm-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.mm-card .card-h { align-items: center; }
.rseg.sm button { padding: 5px 10px; }
@media (max-width: 560px) { .mm-wrap { flex-direction: column; align-items: stretch; } }
.finish-mm { margin: 0 0 16px; } .finish-mm .mmap { max-width: 300px; margin: 8px auto 0; }

/* smooth levels chart */
.sradar { display: block; width: 100%; max-width: 380px; margin: 0 auto; height: auto; }
.sr-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.sr-g0 { stop-color: var(--sig); stop-opacity: .12; } .sr-g1 { stop-color: var(--sig); stop-opacity: .5; }
.sr-area { stroke: var(--sig); stroke-width: 2.5; stroke-linejoin: round; }
.sr-dot { fill: var(--sig); stroke: var(--tile); stroke-width: 2; }
.sr-l { font: 500 11px var(--sans); fill: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.sr-v { font: 700 15px var(--disp); fill: var(--text); }
.sr-shape { animation: srGrow .9s cubic-bezier(.2, .9, .25, 1.12) both; }
@keyframes srGrow { from { transform: scale(.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sr-shape { animation: none; } }

/* membership card */
.mcard { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; background: var(--sig-ground); color: var(--on-sig); }
.mcard.none { background: var(--tile); color: var(--text); }
.mcard .k { color: inherit; opacity: .78; }
.mring { position: relative; flex: none; width: 116px; height: 116px; }
.mring svg { width: 100%; height: 100%; display: block; }
.mr-track { fill: none; stroke: color-mix(in srgb, currentColor 18%, transparent); stroke-width: 8; }
.mr-val { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; }
.mr-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.mr-c b { font-size: 36px; } .mr-c small { font-size: 13px; opacity: .72; margin-top: 1px; }
.mr-c em { font: 500 10px var(--sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase; opacity: .78; margin-top: 4px; }
.mcard-i { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.mcard-i strong { font: 700 28px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.mcard-d { font-size: 13px; }
.mcard.expiring .mcard-d, .mcard.expired .mcard-d { font-weight: 700; }
.mcard-btn { align-self: flex-start; margin-top: 10px; min-height: 44px; padding: 0 24px; border: 0 !important; border-radius: 999px !important;
  background: #141414 !important; color: #F2EFEA !important; font: 700 17px/1 var(--disp); letter-spacing: .05em; text-transform: uppercase; }
.mcard-btn:hover { background: #000 !important; }
.mcard.none .mcard-btn { background: var(--sig-ground) !important; color: var(--on-sig) !important; }
.mcard-pend { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 12px; font-weight: 600; }
.mcard-pend svg { width: 14px; height: 14px; }
@media (max-width: 380px) { .mring { width: 96px; height: 96px; } .mr-c b { font-size: 30px; } .mcard-i strong { font-size: 24px; } }

/* plan sheet: type tabs, then big duration tiles */
.plan-sheet { width: min(560px, 100%); }
.pk { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.pk-kinds { display: grid; width: 100%; } .pk-kinds button { padding: 9px 12px; font-size: 12px; }
.pk-note { margin: -2px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.pk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; padding-top: 10px; }
.pk-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 156px; padding: 22px 6px 14px;
  border: 0; border-radius: 20px; background: var(--tile-2); color: var(--text); font: inherit; cursor: pointer; transition: background-color .15s, transform .15s; }
.pk-tile:hover { transform: translateY(-1px); }
.pk-tile[aria-checked="true"] { background: var(--sig-ground); color: var(--on-sig); }
.pk-n { font-size: 46px; line-height: .9; }
.pk-u { font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.pk-price { margin-top: 10px; font-size: 21px; line-height: 1; }
.pk-per { font-size: 11px; opacity: .75; }
.pk-off, .pk-badge { padding: 3px 8px; border-radius: 8px; background: #141414; color: #F2EFEA; }
.pk-off { margin-top: 6px; font-size: 14px; line-height: 1.1; }
.pk-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font: 500 10px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.pk .pw-note { text-align: center; }
@media (prefers-reduced-motion: reduce) { .pk-tile { transition: none; } .pk-tile:hover { transform: none; } }

/* resume a workout left mid-way (inside the signal hero) */
.resume { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .14); }
.resume-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--on-sig); animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .resume-dot { animation: none; } }
.resume-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.resume-t b { font: 700 17px/1.1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.resume-t span { font-size: 11px; opacity: .8; }
.resume .btn { color: var(--on-sig); border: 1px solid color-mix(in srgb, var(--on-sig) 40%, transparent) !important; background: none; min-height: 40px; }
.resume .btn:hover { background: rgba(0, 0, 0, .1); }

/* the gym board folds from its own header (remembered on this device) */
.panel-h.fold { width: 100%; align-items: center; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 32px; }
.panel-h.fold .k:first-child { flex: 1; }
.panel-h.fold svg { width: 14px; height: 14px; color: var(--muted); transform: rotate(90deg); transition: transform .2s; }
.home-gym.folded .panel-h.fold { margin-bottom: 0; }
.home-gym.folded .panel-h.fold svg { transform: none; }
@media (prefers-reduced-motion: reduce) { .panel-h.fold svg { transition: none; } }

/* your workouts: square tiles with the muscles each one trained */
.wt-h { margin: 8px 2px 0; display: flex; justify-content: space-between; align-items: baseline; }
.wtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wtile { aspect-ratio: 1; min-width: 0; display: flex; flex-direction: column; padding: 10px 12px 12px; border-radius: 16px; background: var(--tile); color: var(--text); text-decoration: none; transition: background-color .15s; }
.wtile:hover { background: var(--tile-2); }
.wt-top { display: flex; justify-content: space-between; align-items: center; } .wt-top .k { color: var(--muted); }
.wt-pr { display: inline-flex; align-items: center; gap: 3px; color: var(--sig); font: 700 14px/1 var(--disp); } .wt-pr svg { width: 13px; height: 13px; }
.wtile .mmap.mini { flex: 1; min-height: 0; gap: 2px; margin: 6px 0; }
.wtile .mmap.mini figure { height: 100%; max-width: none; display: flex; justify-content: center; }
.wtile .mmap.mini .mm-fig { width: auto; height: 100%; padding: 4px 3px; border-radius: 8px; }
.wt-b { display: flex; flex-direction: column; gap: 3px; }
.wt-title { font: 700 19px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-stats { display: flex; gap: 10px; font-size: 15px; }
.wt-stats small { margin-left: 2px; font: 500 10.5px var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 520px) { .wtiles { grid-template-columns: 1fr 1fr; } }
/* round 3 fixes: the muscle map stays a glanceable size on any screen */
#mmfig .mmap { max-width: 300px; margin: 0 auto; }
@media (max-width: 560px) { #mmfig .mmap { max-width: 250px; } }
/* plan sheet as rows: Strength / Cardio / Cardio + Strength, each a strip of duration tiles */
.plan-sheet { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.pk-rows { display: flex; flex-direction: column; gap: 14px; }
.pk-row-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px; }
.pk-row-h b { font: 700 18px/1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.pk-row-h span { font-size: 11px; color: var(--muted); text-align: right; }
.pk-row .pk-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); grid-template-columns: none; gap: 8px;
  padding: 12px 2px 2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pk-row .pk-tiles::-webkit-scrollbar { display: none; }
.pk-row .pk-tile { min-height: 0; padding: 16px 6px 12px; border-radius: 18px; scroll-snap-align: start; }
.pk-span { display: flex; flex-direction: column; align-items: center; }
.pk-row .pk-n { font-size: 38px; }
.pk-row .pk-price { margin-top: 8px; font-size: 19px; }
.pk-row .pk-off { margin-top: 5px; font-size: 13px; }

/* exercise search picker (staff: assign exercises) */
.xp-sheet { width: min(620px, 100%); height: min(720px, calc(100dvh - 24px)); display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.xp-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 44px; border-radius: 12px; background: var(--tile-2); color: var(--muted); }
.xp-search:focus-within { box-shadow: inset 0 0 0 2px var(--sig); }
.xp-search svg { width: 18px; height: 18px; flex: none; }
.xp-search input { flex: 1; min-width: 0; border: 0 !important; background: none !important; color: var(--text); font: 500 15px var(--sans); padding: 10px 0; outline: none; box-shadow: none !important; }
.xp-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex: none; }
.xp-chips::-webkit-scrollbar { display: none; }
.xp-chip { flex: none; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--tile-2); color: var(--muted); font: 500 11px var(--sans); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.xp-chip:hover { color: var(--text); }
.xp-chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.xp-count { margin: 0; font-size: 11px; color: var(--muted); flex: none; }
.xp-list { list-style: none; margin: 0 -6px; padding: 0 6px; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.xp-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.xp-opt:hover, .xp-opt[aria-selected="true"] { background: var(--tile-2); }
.xp-opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--sig); }
.xp-opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.xp-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.xp-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-t span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-tags { display: flex; align-items: center; gap: 8px; flex: none; }
.xp-tag { font: 500 10px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.xp-tag.cam { color: var(--sig); display: grid; } .xp-tag.cam svg { width: 15px; height: 15px; }
.xp-lv { font-size: 7px; letter-spacing: 1px; color: var(--sig); } .xp-lv i { font-style: normal; color: var(--line-2); }
/* an assigned exercise is a button that reopens the picker */
.pin-ex { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 12px;
  background: var(--tile-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pin-ex:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.pin-ex-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.pin-ex-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-ex-t span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-ex > svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.assign-row { align-items: end; }
@media (max-width: 820px) { .assign-row .pin-ex { grid-column: 1 / -1; } }

/* ================================================================ round 4: staff memberships layout, routine templates */
/* memberships: KPIs, requests and members on top; full-width price grid below (same rows members see) */
.ms-page { display: flex; flex-direction: column; gap: 8px; }
.ms-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 8px; align-items: start; }
@media (max-width: 980px) { .ms-main { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ms-kpis { grid-template-columns: 1fr 1fr; } }
.pgrid-wrap { overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
.pgrid { display: grid; gap: 8px; min-width: calc(190px + var(--cols) * 150px); }
.pg-row { display: grid; grid-template-columns: 190px repeat(var(--cols), minmax(140px, 1fr)); gap: 8px; }
.pg-head span { font: 500 11px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.pg-k { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 4px; }
.pg-k b { font: 700 20px/1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.pg-k span { font-size: 11px; color: var(--muted); }
.pg-c { display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.pg-plan { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 36px 10px 12px; border-radius: 14px; background: var(--tile-2); }
.pg-name { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-price { font-size: 24px; line-height: 1; }
.pg-per { font-size: 11px; color: var(--muted); }
.pg-plan .retire { position: absolute; top: 4px; right: 4px; }
.pg-add { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 92px; border: 1px dashed var(--line-2); border-radius: 14px;
  background: none; color: var(--muted); font: 500 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.pg-add:hover, .pg-add:focus-visible { color: var(--text); border-color: var(--sig); }
.pg-add svg { width: 14px; height: 14px; }
.pg-new { display: grid; grid-template-columns: auto minmax(150px, 2fr) minmax(130px, 1.4fr) 90px 110px 80px auto; gap: 8px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pg-new > .k { align-self: center; color: var(--sig); padding-top: 18px; }
@media (max-width: 980px) { .pg-new { grid-template-columns: 1fr 1fr; } .pg-new > .k, .pg-new .btn { grid-column: 1 / -1; } }

/* member tab: routine picker + next-session preview */
.ra-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ra-opt { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 14px; background: var(--tile-2); cursor: pointer; }
.ra-opt input { margin: 2px 0 0; accent-color: var(--sig); width: 18px; height: 18px; flex: none; }
.ra-opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--sig); }
.ra-opt:has(input:focus-visible) { outline: 2px solid var(--sig); outline-offset: 2px; }
.ra-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ra-t b { font: 700 17px/1.1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.ra-t span { font-size: 11px; color: var(--muted); }
.ra-opt > .k { position: absolute; right: 10px; bottom: 8px; font-size: 10px; }
.ra-next { padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.ra-next .k { color: var(--sig); }
.ra-title { font: 700 18px/1 var(--disp); text-transform: uppercase; }
.ra-next ol { list-style: none; margin: 8px 0 0; padding: 0; }
.ra-next li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ra-next li .k { font-size: 10px; }
.ra-next li b { font-size: 15px; }

/* routines tab: template cards */
.rt-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.rt-intro p { margin: 0; max-width: 640px; font-size: 13px; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.rt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--tile); }
.rt-top { display: flex; flex-direction: column; gap: 4px; }
.rt-top h2 { font-size: 26px; }
.rt-notes { margin: 0; font-size: 12px; color: var(--muted); }
.rt-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rt-days li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--tile-2); }
.rt-dn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sig-ground); color: var(--on-sig); font-size: 15px; }
.rt-dt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rt-dt b { font: 700 16px/1.1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.rt-dt span { font-size: 11px; color: var(--muted); }
.rt-dt i { font-style: normal; color: var(--sig); }
.rt-ds { font-size: 20px; } .rt-ds small { font: 500 10px var(--sans); color: var(--muted); margin-left: 2px; text-transform: uppercase; }
.rt-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 12px; }
.rt-act { margin-left: auto; display: flex; gap: 6px; }
@media (max-width: 560px) { .rt-intro { flex-direction: column; align-items: stretch; } .rt-grid { grid-template-columns: 1fr; } }

/* routine editor: one column per day on desktop, stacked on phones */
.rt-edit { display: flex; flex-direction: column; gap: 8px; }
.rt-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rt-bar-act { display: flex; gap: 8px; }
.rt-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
@media (max-width: 720px) { .rt-meta { grid-template-columns: 1fr; } }
.rt-hint { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rt-hint svg { width: 16px; height: 16px; flex: none; color: var(--sig); margin-top: 1px; }
.rt-hint b { color: var(--text); }
.rt-days-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; align-items: start; }
.rt-day { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: var(--tile); }
.rt-day-h { display: flex; align-items: center; gap: 8px; }
.rt-dname { flex: 1; min-width: 0; border: 0 !important; background: none !important; box-shadow: none !important; padding: 4px 2px !important;
  font: 700 22px/1 var(--disp) !important; text-transform: uppercase; letter-spacing: .02em; color: var(--text); border-bottom: 1px dashed transparent !important; }
.rt-dname:hover, .rt-dname:focus { border-bottom-color: var(--line-2) !important; outline: none; }
.rt-slots { display: flex; flex-direction: column; gap: 6px; }
.rt-slot { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--tile-2); }
.rt-slot.bad { box-shadow: inset 0 0 0 1px var(--sig); }
.rt-slot-h { display: flex; align-items: center; gap: 6px; }
.rt-label { flex: 1; min-width: 0; font-weight: 600 !important; padding: 6px 8px !important; }
.rt-num { display: flex; align-items: center; gap: 3px; flex: none; }
.rt-num input { width: 44px; padding: 6px 2px !important; text-align: center; font-weight: 700; }
.rt-num span { font: 500 10px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rt-tools { display: flex; flex: none; }
.rt-tools .btn.icon { width: 30px; height: 30px; min-height: 30px; }
.rt-tools svg { width: 14px; height: 14px; }
.rt-vars { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rt-var { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 4px; border-radius: 999px; background: var(--tile); font-size: 12px; }
.rt-var + li::before { content: "→"; color: var(--muted); margin-right: 6px; font-size: 11px; }
.rt-vn { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); font-size: 12px; }
.rt-var:first-child .rt-vn { background: var(--sig-ground); color: var(--on-sig); }
.rt-vt { white-space: nowrap; }
.rt-vrm { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.rt-vrm:hover, .rt-vrm:focus-visible { color: var(--text); background: var(--line-2); }
.rt-vrm svg { width: 12px; height: 12px; }
.rt-addvar { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: 999px; background: none; color: var(--muted);
  font: 500 11px var(--sans); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.rt-addvar:hover, .rt-addvar:focus-visible { color: var(--text); border-color: var(--sig); }
.rt-addvar svg { width: 12px; height: 12px; }
.rt-one { margin: 0; font-size: 11px; color: var(--muted); }
.rt-sum { margin: 0; text-align: right; font-size: 11px; color: var(--muted); }
.rt-addday { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 160px; border: 1px dashed var(--line-2); border-radius: 18px;
  background: none; color: var(--muted); cursor: pointer; font: inherit; }
.rt-addday:hover, .rt-addday:focus-visible { color: var(--text); border-color: var(--sig); }
.rt-addday b { font: 700 18px var(--disp); text-transform: uppercase; } .rt-addday span { font-size: 11px; }
.rt-addday svg { width: 20px; height: 20px; }
/* routine editor refinements: full slot names, variations as a numbered rotation list, phone action bar */
.rt-slot-h { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "label label label tools" "sets reps . ."; gap: 6px 10px; align-items: center; }
.rt-slot-h > .rt-label { grid-area: label; }
.rt-slot-h > :nth-child(2) { grid-area: sets; }
.rt-slot-h > :nth-child(3) { grid-area: reps; }
.rt-slot-h > .rt-tools { grid-area: tools; }
.rt-vars { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; }
.rt-var { display: flex; border-radius: 10px; padding: 3px 3px 3px 4px; }
.rt-var + li::before { content: none; }
.rt-vt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rt-vars li:last-child:not(.rt-var) { margin-top: 4px; }
@media (max-width: 640px) {
  .rt-bar { flex-wrap: wrap; }
  .rt-bar-act { width: 100%; }
  .rt-bar-act #rtsave { flex: 1; }
  .rt-days-edit { grid-template-columns: 1fr; }
  .rt-addday { min-height: 96px; }
}
.pg-cd { display: none; }
@media (max-width: 640px) {
  .pgrid { min-width: 0; gap: 14px; }
  .pg-head { display: none; }
  .pg-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(128px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
  .pg-row::-webkit-scrollbar { display: none; }
  .pg-k { grid-row: 1; grid-column: 1 / span var(--cols); flex-direction: row; align-items: baseline; justify-content: space-between; position: sticky; left: 0; }
  .pg-c { grid-row: 2; scroll-snap-align: start; min-height: 0; }
  .pg-cd { display: block; font: 500 10px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  .pg-add, .pg-plan { min-height: 84px; }
}
@media (max-width: 640px) { .pg-k span { display: none; } }

/* ================================================================ round 5: Satoshi everywhere, one spacing scale,
   floating dock + Start button, announcement banner */
:root, :root[data-theme] {
  --sans: "Satoshi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: var(--sans); --disp: var(--sans);
  /* spacing scale: every gap and padding comes from these */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --gap: var(--sp-3); --pad: var(--sp-4);
}
body { font: 500 14px/1.5 var(--sans); font-feature-settings: "tnum" 1; }
input, select, textarea, button { font-family: var(--sans); }
/* Satoshi reads best in normal case at display sizes: headings and big titles drop the forced capitals */
h1, h2, .wcard-t strong, .a-title, .exblock-name, .profile-card h2, .tk .v, .menu-grid a b, .ctl-pill, .dt-head b,
.f2-t b, .vcell text, .exrow-t b, .today-meta, .today-list span, .slide-label, .lead-t b, .rev-theme b, .rev-who b, .rev-card h4,
.mcard-i strong, .mcard-btn, .resume-t b, .wt-title, .pk-row-h b, .pg-k b, .ra-t b, .ra-title, .rt-dt b, .rt-dname, .rt-addday b {
  text-transform: none; letter-spacing: -.015em; font-weight: 700;
}
h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.05; letter-spacing: -.025em; font-weight: 900; }
h2 { font-size: 21px; line-height: 1.15; letter-spacing: -.02em; }
.stat .v, .kpi .v, .num, .pw-price, .ring b, .counter-ov, .rest-clock, .sd-num, .cal-day b { font-weight: 700; letter-spacing: -.02em; }
.label, .stat .k, .kpi .k, th, .legend, .field > span, .mini-field > span, legend, .wmeta, .k { font-weight: 700; letter-spacing: .06em; }
.today-list span { font-weight: 600; }

/* even spacing: one gutter (12), one card padding (16), one header gap (12) */
main { padding: var(--sp-4) var(--sp-4) 112px; }
.dash, .two, .grid, .stack, .home, .ms-page, .ms-main, .kpis, .wtiles, .rt-grid, .rt-days-edit, .rt-edit, .member-grid, .pk-rows { gap: var(--gap); }
.card, .panel, .rt-card, .rt-day, .mcard, .home-today { padding: var(--pad); }
.card-h, .panel-h { margin-bottom: var(--sp-3); }
.page-head { margin: var(--sp-1) 0 var(--sp-4); }
.list-row { padding: 10px 0; }
@media (max-width: 560px) { main { padding: var(--sp-3) var(--sp-3) 112px; } }

/* top bar: wordmark and member only (the scrolling ticker is gone) */
.topbar { padding: 0 var(--sp-3) 0 var(--sp-4); }
.topbar-fill { flex: 1; }

/* announcement banner: only while staff have one running */
.announce { display: flex; align-items: center; gap: var(--sp-3); width: min(1240px - 32px, calc(100% - 32px)); margin: var(--sp-3) auto 0;
  padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--sig-ground); color: var(--on-sig); animation: annIn .3s cubic-bezier(.2, .8, .2, 1); }
.announce[hidden] { display: none; }
@keyframes annIn { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .announce { animation: none; } }
.announce .an-ic, .ann-preview .an-ic { display: grid; flex: none; }
.announce .an-ic svg, .ann-preview .an-ic svg { width: 20px; height: 20px; }
.announce p { flex: 1; min-width: 0; margin: 0; font-weight: 700; font-size: 14px; line-height: 1.35; }
.an-t { flex: none; font-size: 11px; font-weight: 700; opacity: .75; white-space: nowrap; }
.an-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .12); color: inherit; cursor: pointer; }
.an-x:hover { background: rgba(0, 0, 0, .2); }
.an-x svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .announce { width: calc(100% - 24px); } .an-t { display: none; } }

/* staff: announcement sheet */
.ann-sheet { width: min(520px, 100%); display: flex; flex-direction: column; gap: var(--sp-3); }
.ann-sheet textarea { min-height: 84px; resize: vertical; }
.ann-count { margin: -8px 0 0; text-align: right; font-size: 11px; }
.ann-for { display: grid; width: 100%; }
.ann-for button { padding: 8px 6px; }
.ann-end { margin: 0; font-size: 12px; }
.ann-cur { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border-radius: 12px; border: 1px solid var(--line-2); }
.ann-cur .k { color: var(--sig); } .ann-cur p { margin: 0; font-weight: 700; } .ann-cur .btn { align-self: flex-start; }
.ann-preview { display: flex; align-items: center; gap: var(--sp-3); padding: 10px 14px; border-radius: 14px; background: var(--sig-ground); color: var(--on-sig); }
.ann-preview p { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* floating dock: a dark pill of tabs (the active one names itself) + the separate round Start Workout button */
.launcher, .menu, .fab-label { display: none !important; }
.dock { position: fixed; z-index: 40; left: 50%; bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px)); transform: translateX(-50%);
  width: min(440px, calc(100vw / var(--ui-scale, 1) - 32px)); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); pointer-events: none; }
.dock > * { pointer-events: auto; }
.dock-nav { display: flex; align-items: center; gap: var(--sp-1); padding: 6px; border-radius: 999px; background: #161616;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .07); }
.dock-nav a { display: flex; align-items: center; gap: var(--sp-2); height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px; color: #A29E98; text-decoration: none;
  transition: background-color .25s, color .25s, padding .3s cubic-bezier(.2, .8, .2, 1); }
.dock-nav a svg { width: 20px; height: 20px; flex: none; }
.dock-nav a span { max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; font-size: 13px; font-weight: 700; transition: max-width .3s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.dock-nav a:hover { color: #F2EFEA; }
.dock-nav a.on { background: #34312E; color: #F2EFEA; padding: 0 16px 0 12px; }
.dock-nav a.on span { max-width: 96px; opacity: 1; }
.dock-nav a:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; }
.dock-start { position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sig-ground); color: var(--on-sig);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--sig-ground) 45%, transparent); transition: transform .15s; }
.dock-start:hover { transform: scale(1.04); }
.dock-start:active { transform: scale(.96); }
.dock-start svg { width: 24px; height: 24px; stroke-width: 2.4; }
.dock-live { position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%; background: #F2EFEA; border: 2px solid var(--sig-ground); }
.dock-live[hidden] { display: none; }
body[data-route="session"] .dock { display: none; }
/* Home has its own slide to start (and Slide to resume), so the dock's play button would be a second one */
body[data-route="home"] .dock-start { display: none; }
body[data-route="home"] .dock { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .dock-nav a, .dock-nav a span, .dock-start { transition: none; } }
.an-body { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--sp-3); }
@media (max-width: 560px) { .an-body { flex-direction: column; gap: 2px; } .an-t { display: block; } }

/* ================================================================ round 6: no glows; play icon on Start; centred slide arrow */
.btn.primary, .btn.primary:hover, .setlog tr.now .ck, .empty-video .ic, .member-tile:hover, .plate,
.cal-day.done, .cal-day.renew::after, .weekbars i.now, .toast .fuse::after { box-shadow: none; }
.g-mark { box-shadow: 0 0 0 2px var(--card); }
.ring .val, .bodymap circle.flag, .sd-val { filter: none; }
/* floating dock: a neutral lift only, no coloured halo */
.dock-start { box-shadow: 0 4px 14px rgba(0, 0, 0, .28); }
.dock-nav { box-shadow: 0 4px 14px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .07); }
.dock-start svg { width: 22px; height: 22px; margin-left: 3px; } /* optical centre of the triangle */
.dock-start svg path { fill: currentColor; stroke-linejoin: round; }
/* slide knob: an SVG double chevron, centred (the » glyph sat off-centre) */
.slide-knob { padding: 0; line-height: 0; }
.slide-knob svg { width: 26px; height: 26px; stroke-width: 2.6; display: block; }

/* ================================================================ round 7: simpler member navigation
   Three labelled tabs (Home, Exercises, You) + Start. Every tab shows its name: icon-only tabs confused less
   app-confident members. The week view is reached from Home's "Next" row. */
.dock-nav { gap: 2px; padding: 5px; }
.dock-nav a { flex-direction: column; justify-content: center; gap: 2px; height: 52px; min-width: 72px; padding: 0 10px; border-radius: 26px; }
.dock-nav a svg { width: 20px; height: 20px; }
.dock-nav a span { max-width: none; opacity: 1; font-size: 11px; font-weight: 700; letter-spacing: .01em; line-height: 1; }
.dock-nav a.on { padding: 0 10px; }
.dock-start { width: 60px; height: 60px; }
/* Home: the next sessions, one tap to the full week */
.home-next { display: flex; align-items: center; gap: var(--sp-3); padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .14); color: inherit; text-decoration: none; }
.home-next:hover { background: rgba(0, 0, 0, .2); }
.home-next .k { flex: none; opacity: .75; }
.home-next-t { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-next-t i { font-style: normal; margin: 0 6px; opacity: .6; }
.home-next-go { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; }
.home-next-go svg { width: 14px; height: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: var(--sp-2); }
.back svg { transform: scaleX(-1); }
.home-today { grid-template-columns: minmax(0, 1fr); min-width: 0; } /* the one-line Next row must not widen the card */
.home > * { min-width: 0; }
/* You: profile + membership on top, then Progress / Workouts / Settings */
.you { display: flex; flex-direction: column; gap: var(--gap); }
.you-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.you-top #membership, .you-top #membership > .stack, .you-top .mcard { height: 100%; }
.you-tabs { display: grid; width: min(520px, 100%); }
.you-tabs button { padding: 10px 12px; font-size: 12px; }
.you-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.you-settings { max-width: 560px; }
@media (max-width: 900px) { .you-top, .you-grid { grid-template-columns: 1fr; } .you-top #membership, .you-top .mcard { height: auto; } }

/* ================================================================ round 8: ZYM chevron logo, ticker-board announcements,
   two-frame startup flash */
:root { --brand-z: url(/brand/zym-bar-dark.png); }
:root[data-theme="light"] { --brand-z: url(/brand/zym-bar-light.png); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --brand-z: url(/brand/zym-bar-light.png); } }
.brand { display: flex; align-items: center; height: 100%; }
.brand-z { display: block; height: 30px; aspect-ratio: 1000 / 339; background: var(--brand-z) left center / contain no-repeat; }
@media (forced-colors: active) { .brand-z { forced-color-adjust: none; } }

/* announcement ticker: runs straight on from the logo's chevrons across the top bar */
.ticker { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: var(--sp-2); margin-left: var(--sp-2); }
.ticker[hidden] { display: none; }
body.has-announce .topbar-fill { display: none; }
.tk-view { flex: 1; min-width: 0; overflow: hidden; height: 100%; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 94%, transparent); }
.tk-track { display: flex; width: max-content; animation: marquee 20s linear infinite; }
.ticker:hover .tk-track, .ticker:focus-within .tk-track { animation-play-state: paused; }
.tk-half { display: flex; flex: none; }
.tk-item { display: inline-flex; align-items: center; gap: 14px; padding-right: 14px; white-space: nowrap; }
.tk-item b { font-size: 15px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.tk-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tk-sep { display: grid; color: var(--sig); } .tk-sep svg { width: 18px; height: 18px; stroke-width: 3; }
.tk-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--tile); color: var(--muted); cursor: pointer; }
.tk-x:hover { color: var(--text); background: var(--tile-2); }
.tk-x svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) {
  .tk-track { animation: none; }
  .tk-half + .tk-half, .tk-half .tk-item + .tk-item { display: none; } /* one static copy, cut with an ellipsis */
  .tk-item b { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 560px) { .brand-z { height: 24px; } .tk-item b { font-size: 13px; } .member-chip span { display: none; } }

.splash { padding: 0; display: block; }
.splash-msg { position: absolute; left: 50%; bottom: max(32px, env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; width: min(420px, calc(100% - 32px));
  padding: 14px 18px; border-radius: 14px; background: #141414; color: #F2EFEA; text-align: center; }
.splash-msg[hidden] { display: none; }
.splash-msg p { margin: 0; font-weight: 700; } .splash-msg cite { display: block; margin-top: 4px; font-style: normal; font-size: 12px; opacity: .7; }
.topbar .brand { display: flex !important; align-items: center; height: 100%; } /* an older rule forced display:block */
.ann-preview { background: var(--frame); color: var(--text); border: 1px solid var(--line-2); }
.ann-preview p { text-transform: uppercase; letter-spacing: .04em; font-weight: 900; }
/* startup video: square animation centred, the rest of the screen in the video's own background colour */
.splash { background: #000; }
.splash[data-tone="light"] { background: #D4D4D4; }
/* a video Safari won't autoplay gets its own play button on top: the startup has no controls, only the logo still */
.splash-video::-webkit-media-controls, .splash-video::-webkit-media-controls-start-playback-button,
.splash-video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
.splash-video { position: absolute; inset: 0; margin: auto; width: min(100vw, 100vh, 900px); height: min(100vw, 100vh, 900px); object-fit: contain; background: transparent; }
/* banner logo: ZYM with the red star (design/Z/banner_d.png, banner_l.png) */
.brand-z { aspect-ratio: 846 / 232; height: 28px; }
@media (max-width: 560px) { .brand-z { height: 22px; } }

/* ================================================================ round 9: sign-in (Silk panel + form), account settings */
.silk-container { position: relative; overflow: hidden; }
.silk-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.silk-fallback { background: radial-gradient(120% 90% at 20% 15%, #F47A60 0%, #E85438 35%, #8E2414 75%, #3A0E07 100%); }

body[data-route="login"] .topbar, body[data-route="login"] .dock { display: none; }
body[data-route="login"] main { padding-bottom: var(--sp-4); }
.auth { min-height: calc(100dvh - 32px); display: grid; place-items: center; }
.auth-card { width: min(1000px, 100%); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 10px; padding: 10px;
  border-radius: 24px; background: var(--tile); }
.auth-art { position: relative; min-height: 560px; border-radius: 16px; background: #3A0E07; }
.auth-art-logo { display: none; }
.auth-side { display: flex; flex-direction: column; gap: var(--sp-3); padding: 36px 30px 28px; min-width: 0; }
.auth-logo { height: 26px; margin-bottom: var(--sp-4); }
.auth-side h1 { font-size: clamp(34px, 4.4vw, 46px); line-height: 1; letter-spacing: -.03em; font-weight: 900; margin: 0; }
.auth-sub { margin: 0 0 var(--sp-3); color: var(--muted); font-size: 14px; max-width: 34ch; }
.auth-form { display: flex; flex-direction: column; gap: var(--sp-2); }
.auth-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.auth-field { display: flex; align-items: center; gap: 6px; height: 54px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--tile-2); }
.auth-field:focus-within, .auth-pinin:focus { box-shadow: inset 0 0 0 2px var(--sig); }
.auth-field input { flex: 1; min-width: 0; height: 100%; border: 0 !important; background: none !important; box-shadow: none !important; outline: none;
  color: var(--text); font: 600 15px var(--sans); padding: 0 !important; }
.auth-go { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--sig-ground); color: var(--on-sig); cursor: pointer; }
.auth-go svg { width: 18px; height: 18px; }
.auth-pin { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
.auth-pin[hidden] { display: none; }
.auth-pinin { height: 58px; border: 0 !important; border-radius: 14px; background: var(--tile-2) !important; color: var(--text); outline: none;
  text-align: center; font: 900 26px var(--sans); letter-spacing: .7em; padding-left: .7em !important; }
.auth-err { margin: 2px 0 0; color: var(--sig); font-size: 13px; font-weight: 700; }
.auth-err[hidden] { display: none; }
.auth-or { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-1); color: var(--muted); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-row { display: flex; align-items: center; gap: var(--sp-3); padding: 12px 14px; border-radius: 14px; background: var(--tile-2); color: var(--text); text-decoration: none; }
.auth-row:hover, .auth-row:focus-visible { box-shadow: inset 0 0 0 1px var(--line-2); }
.auth-row > svg { width: 16px; height: 16px; color: var(--muted); margin-left: auto; flex: none; }
.auth-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sig-ground); color: var(--on-sig); flex: none; }
.auth-ic svg { width: 17px; height: 17px; }
.auth-rt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.auth-rt b { font-size: 14px; } .auth-rt small { font-size: 12px; color: var(--muted); }
.auth-help { margin: auto 0 0; padding-top: var(--sp-4); font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .auth { min-height: 0; place-items: start stretch; }
  .auth-card { grid-template-columns: 1fr; border-radius: 22px; }
  .auth-art { min-height: 200px; }
  .auth-side { padding: 22px 16px 18px; }
  .auth-logo { margin-bottom: var(--sp-2); }
}

/* You → Settings: account line, Change PIN row */
.acct-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: 10px 0; font-size: 13px; }
.acct-row .k { color: var(--sig); }
.list-row.linkrow { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pin-sheet { width: min(420px, 100%); display: flex; flex-direction: column; gap: var(--sp-3); }
.join-account { border: 1px solid color-mix(in srgb, var(--sig) 35%, transparent) !important; }

/* ================================================================ round 10: Home calendar, import sheet, activation */
.home { grid-template-areas: "today cal" "today gym"; }
.home-cal { grid-area: cal; }
@media (max-width: 900px) { .home { grid-template-areas: "today" "cal" "gym"; } }
.home-cal .panel-h { align-items: center; }
.home-cal .panel-h .k { color: var(--text); font-size: 13px; letter-spacing: .04em; }
.home-cal .cal-day { min-height: 52px; }
.home-cal .legend { flex-wrap: wrap; gap: 6px 12px; }

.ms-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 10px 14px; border-radius: var(--radius); background: var(--tile); }
.ms-bar p { margin: 0; font-size: 13px; }
@media (max-width: 560px) { .ms-bar { flex-direction: column; align-items: stretch; } }
.imp-sheet { width: min(860px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
#impbody { display: flex; flex-direction: column; gap: var(--sp-3); }
.imp-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.imp-steps b, .imp-steps i { color: var(--text); font-style: normal; }
.imp-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 1px dashed var(--line-2); border-radius: 16px; cursor: pointer; text-align: center; }
.imp-drop:hover, .imp-drop.over, .imp-drop:focus-within { border-color: var(--sig); }
.imp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.imp-drop svg { width: 22px; height: 22px; color: var(--sig); }
.imp-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.imp-sum b { font-size: 20px; margin-right: 4px; }
.imp-table { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.imp-table table { width: 100%; }
.imp-table tr.exists td { opacity: .6; }
.imp-issues summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.imp-issues p { margin: 4px 0; font-size: 12px; color: var(--muted); }
.imp-done { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 8px 0; }
.imp-big { font-size: 56px; line-height: 1; font-weight: 900; color: var(--sig); }
.cr-code { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--tile-2); font-size: 13px; }
.cr-code[hidden] { display: none; }
.cr-code b { font-size: 20px; letter-spacing: .12em; color: var(--sig); }
.auth-form .btn.big { margin-top: var(--sp-2); }
.imp-table th, .imp-table td { white-space: nowrap; padding: 8px 10px !important; font-size: 13px; }
.imp-table thead th { position: sticky; top: 0; background: var(--tile); z-index: 1; }

/* ================================================================ round 11: trainer-on-leave tools */
.tlog { gap: 6px !important; }
.tl-row { border-top: 1px solid var(--line); }
.tl-row summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.tl-row summary::-webkit-details-marker { display: none; }
.tl-row summary::before { content: "\203A"; color: var(--muted); transition: transform .15s; display: inline-block; }
.tl-row[open] summary::before { transform: rotate(90deg); }
.tl-row.flag summary b { color: var(--sig); }
.tl-date { font-size: 12px; color: var(--muted); min-width: 92px; }
.tl-meta { font-size: 12px; color: var(--muted); }
.tl-table { margin: 0 0 10px; width: 100%; }
.tl-table th, .tl-table td { padding: 6px 8px !important; font-size: 12.5px; }
.tl-table tr.pain td { background: color-mix(in srgb, var(--sig) 10%, transparent); }
.tl-table tr.skip td { opacity: .6; }
.pill.bad { background: var(--sig-ground); color: var(--on-sig); }
.home-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .14); font-size: 13px; line-height: 1.35; }
.home-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.home-note b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.asg-sheet { width: min(520px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; gap: var(--sp-3); }
.asg-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 0; max-height: 50vh; }
.asg-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--tile-2); cursor: pointer; }
.asg-row[hidden] { display: none; }
.asg-row input { width: 18px; height: 18px; accent-color: var(--sig); flex: none; }
.asg-row:has(input:checked) { box-shadow: inset 0 0 0 2px var(--sig); }
.asg-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.asg-t small { color: var(--muted); font-size: 12px; }

/* inline text button (e.g. "Change gym" under the sign-in form) */
.linkbtn { background: none; border: 0; padding: 4px 2px; margin: -4px -2px; font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 2px; border-radius: 4px; }

/* iPhone Safari zooms into any field with text under 16px and leaves the page zoomed: touch screens get 16px fields */
@media (pointer: coarse) {
  input, select, textarea, .xp-search input, .auth-field input { font-size: 16px; }
}

/* join: privacy consent */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--brand); }
.consent a { color: inherit; text-decoration: underline; }

/* ================================================================ round 12: one corner scale, aligned columns, even gaps
   Corners: 16 for anything that holds content (cards, panels, the Home hero, tiles), 10 for what sits inside them
   (stat tiles, rows, notes, inputs), 6 for small marks (calendar days, date tags), a full pill for buttons, chips,
   segmented controls and the dock. An inner corner is always smaller than the corner of the surface it sits on. */
:root, :root[data-theme] { --r-lg: 16px; --r-md: 10px; --r-sm: 6px; --r-pill: 999px; --radius: var(--r-lg); }
.card, .panel, .home-today, .mcard, .wtile, .cells-wrap, .home-cats .cells-wrap, .rt-card, .rt-day, .ms-bar, .imp-drop { border-radius: var(--r-lg); }
.exitem, .kmc, .pw-plan, .member-tile, .feed-card { border-radius: var(--r-lg) !important; }
.kpi, .note, .exrow, .today-list a, .home-next, .home-note, .asg-row, .cr-code, .imp-table, .ann-cur { border-radius: var(--r-md); }
input, select, textarea { border-radius: var(--r-md) !important; }
input[type="checkbox"], input[type="radio"] { border-radius: 50% !important; }
.wcard-date { border-radius: var(--r-sm); }
.icon-chip { border-radius: var(--r-pill); border: 0; background: var(--tile-2); padding: 6px 12px; }
.dock-nav a { border-radius: var(--r-pill); }

/* This Week: the workout card carried the card padding and its own, so its content sat 14px inside every other card */
.wcard { padding: 0; }
.wcard-top { padding: var(--pad); }
.wcard-body { padding: 0 var(--pad) var(--pad); }

/* stat tiles: the label stays on the top line whatever the value's height, so labels line up across a row */
.kpi { grid-template-rows: auto 1fr; align-items: center; }
.kpi .k { min-height: 16px; line-height: 16px; }
.kpi .k svg { flex: none; width: 14px; height: 14px; }

/* a control in a card header (7D / 30D / 90D) no longer makes that header taller than its neighbours' */
.card-h .rseg, .panel-h .rseg, .card-h .btn.icon, .panel-h .btn.icon { margin-block: -8px; }
.card-h, .panel-h { align-items: center; }

/* a note that ends a card adds no gap of its own under it */
.note { margin: var(--sp-3) 0; }
.card > .note:last-child, .stack > .note:last-child { margin-bottom: 0; }
.card > .note:first-child { margin-top: 0; }

/* lists of rows share one gap */
.exlist2 { gap: var(--sp-2); }
.ex-tools { margin: var(--sp-3) 0; gap: var(--sp-2); }
.today-list { gap: 6px; }

/* You: the top row and the grid under it split at the same line */
.you-top, .you-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
/* side column of two-column pages: wide enough for the calendar's day labels */
@media (min-width: 1101px) { .two { grid-template-columns: minmax(0, 1fr) 380px; } }
.cal-day { min-height: 48px; }
/* Home on a wide screen: today's workout with the gym board under it, the calendar beside them (no empty corner) */
.home { grid-template-areas: "today cal" "gym cal"; grid-template-rows: auto 1fr; }
@media (max-width: 900px) {
  .you-top, .you-grid { grid-template-columns: 1fr; }
  .home { grid-template-areas: "today" "cal" "gym"; grid-template-rows: none; }
}

/* switches and the camera's control chips follow the same curves as every other control */
.sswitch { width: 44px; height: 26px; border: 0; border-radius: var(--r-pill); background: var(--line-2); transition: background-color .15s ease-out; }
.sswitch i { top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #F2EFEA; opacity: 1; }
.sswitch[aria-checked="true"] { background: var(--sig-ground); }
.sswitch[aria-checked="true"] i { left: 21px; }
.hud .sswitch { background: rgba(255, 255, 255, .28); }
.hud .sswitch[aria-checked="true"] { background: var(--sig-ground); }
.sound-ctl { border-radius: var(--r-pill); padding: 4px 5px 4px 12px; }
/* camera controls wrap under the status on a narrow phone, so "Get Ready" is never cut off */
.hud { flex-wrap: wrap; gap: var(--sp-2); }
.hud > .pill { flex: none; white-space: nowrap; }
.hud .row { flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .sswitch, .sswitch i { transition: none; } }
.stage, .record > .stage { border-radius: var(--r-lg); overflow: hidden; }
.setlog .sn, .setlog .ck { border-radius: var(--r-sm); }
.setlog tr td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); } .setlog tr td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
/* an icon and its label sit on one line inside a segmented button */
.rseg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
/* the calendar legend's Done swatch is the colour of a done day in both themes */
.legend .sw.main { background: var(--sig-ground); border-color: var(--sig-ground); }

/* ================================================================ round 13: one motion grammar for everything pressable
   Hover fades the colour in (160 ms). Pressing sinks the control quickly (90 ms); letting go eases it back (260 ms).
   Small controls sink further than wide rows, so the movement looks the same size on both. Only colour, opacity and
   transform animate, never layout. With reduced motion the colour still fades but nothing moves. */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --t-hover: .16s; --t-press: .09s; --t-release: .26s; }

/* buttons and button-like controls */
.btn, button.pill, .pill[role="button"], .rseg button, .choice span, .dock-nav a, .dock-start, .auth-go, .tk-x, .an-x, .linkbtn,
.setlog .sn, .setlog .ck, .cal-nav button, .member-chip, .mcard-btn, .slide-knob, .back, .home-next, .icon-chip[href] {
  transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out, border-color var(--t-hover) ease-out,
    box-shadow var(--t-hover) ease-out, opacity var(--t-hover) ease-out, filter var(--t-hover) ease-out, transform var(--t-release) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active, button.pill:active, .rseg button:active, .dock-nav a:active, .auth-go:active, .tk-x:active, .an-x:active,
.setlog .sn:active, .setlog .ck:active, .cal-nav button:active, .member-chip:active, .mcard-btn:active, .back:active, .home-next:active {
  transform: scale(.96); transition-duration: var(--t-hover), var(--t-hover), var(--t-hover), var(--t-hover), var(--t-hover), var(--t-hover), var(--t-press);
}
.btn.icon:active, .dock-start:active, .auth-go:active, .tk-x:active, .an-x:active { transform: scale(.9); }
.btn.block:active, .btn.big:active { transform: scale(.98); }
.btn:disabled:active, .btn[aria-disabled="true"]:active { transform: none; }
.btn.primary:hover, .mcard-btn:hover, .dock-start:hover, .auth-go:hover { filter: brightness(1.07); }
.choice span { transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out, transform var(--t-release) var(--ease-out); }
.choice input:checked + span { padding: 0 14px; transform: none; } /* choosing recolours the chip; it no longer changes width */
.choice:active span { transform: scale(.95); transition-duration: var(--t-hover), var(--t-hover), var(--t-press); }

/* rows and tiles that open something */
.exrow, .today-list a, .f2, .auth-row, .member-tile, .wtile, .list-row.linkrow, .uprow, a.cal-day, .asg-row, .wcard-h {
  transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out, transform var(--t-release) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.exrow:active, .today-list a:active, .auth-row:active, .asg-row:active { transform: scale(.985); transition-duration: var(--t-hover), var(--t-hover), var(--t-press); }
.member-tile:active, .wtile:active, a.cal-day:active { transform: scale(.97); transition-duration: var(--t-hover), var(--t-hover), var(--t-press); }
.wtile:hover, .auth-row:hover, .exrow:hover { background-color: var(--tile-2); }
.auth-row:hover { background-color: var(--line-2); }
.list-row.linkrow:hover, .f2:hover { background-color: color-mix(in srgb, var(--text) 4%, transparent); }
/* the arrow at the end of a row leans toward where it leads */
.list-row.linkrow > svg:last-child, .auth-row > svg:last-child, .home-next-go svg, .wcard-chev svg { transition: transform var(--t-release) var(--ease-out); }
.list-row.linkrow:hover > svg:last-child, .auth-row:hover > svg:last-child, .home-next:hover .home-next-go svg { transform: translateX(3px); }
.back svg { transition: transform var(--t-release) var(--ease-out); }
.back:hover svg { transform: translateX(-3px); }

@media (prefers-reduced-motion: reduce) {
  .btn, button.pill, .rseg button, .choice span, .dock-nav a, .dock-start, .auth-go, .tk-x, .an-x, .setlog .sn, .setlog .ck, .cal-nav button,
  .member-chip, .mcard-btn, .back, .home-next, .exrow, .today-list a, .f2, .auth-row, .member-tile, .wtile, .list-row.linkrow, a.cal-day, .asg-row,
  .list-row.linkrow > svg:last-child, .auth-row > svg:last-child, .home-next-go svg, .back svg { transform: none !important; }
}
/* the fold header on Home's gym board, and the category cells on Exercises */
.panel-h.fold { transition: opacity var(--t-hover) ease-out; -webkit-tap-highlight-color: transparent; }
.panel-h.fold:hover { opacity: .85; } .panel-h.fold:active { opacity: .6; }
.vcell { transition: opacity var(--t-press) ease-out; }
.vcell path { transition: fill var(--t-hover) ease-out; }
.vcell text { transition: fill var(--t-hover) ease-out; }
.vcell:active { opacity: .82; }

/* ================================================================ round 14: a living dock
   The Start button is part of the bar on Home (Home has its own slide to start). On every other page it buds off:
   it slides out of the bar's right end while a liquid neck stretches between them and snaps, then it turns red.
   Going back to Home it is drawn back in. The bar and the button are painted on .dock-goo (see index.html); the
   real tabs and link sit on top with no background, so text and icons stay sharp. */
.dock { width: max-content; max-width: calc(100vw / var(--ui-scale, 1) - 24px); justify-content: center; gap: 0;
  --dock-t: .9s; --dock-ease: cubic-bezier(.5, .1, .25, 1.28); --bud: 64px; --bud-gap: 16px; --dock-bg: #242322; }
.dock-goo { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; pointer-events: none; }
.goo-pill { flex: 1 1 auto; align-self: stretch; border-radius: 999px; background: var(--dock-bg); }
.goo-bud { flex: none; width: var(--bud); height: var(--bud); margin-left: var(--bud-gap); border-radius: 50%; background: var(--sig-ground);
  transition: margin-left var(--dock-t) var(--dock-ease), transform var(--dock-t) var(--dock-ease), background-color .3s ease-out .5s, filter .16s ease-out; }
.dock-nav { position: relative; z-index: 1; flex: 0 1 auto; min-width: 0; gap: 2px; padding: 6px; background: none; box-shadow: none; }
.dock-start { z-index: 1; display: grid; width: var(--bud); height: var(--bud); margin-left: var(--bud-gap); background: none; box-shadow: none;
  transition: margin-left var(--dock-t) var(--dock-ease), opacity .25s ease-out .55s, transform .26s var(--ease-out), visibility 0s; }
.dock-start:hover { transform: none; filter: none; }
.dock:has(.dock-start:hover) .goo-bud { filter: brightness(1.08); }
.dock:has(.dock-start:active) .goo-bud { transform: scale(.9); transition-duration: .09s; }
.dock-start:focus-visible { outline: 2px solid #F2EFEA; outline-offset: 3px; }

/* Home: the button is inside the bar's right end, the bar's colour, and can't be pressed or focused */
body[data-route="home"] .goo-bud, body[data-route="home"] .dock-start { margin-left: calc(var(--bud) * -1); }
body[data-route="home"] .goo-bud { background: var(--dock-bg); transform: scale(.7); transition: margin-left var(--dock-t) cubic-bezier(.5, 0, .3, 1), transform var(--dock-t) cubic-bezier(.5, 0, .3, 1), background-color .16s ease-out; }
body[data-route="home"] .dock-start { display: grid; opacity: 0; visibility: hidden; pointer-events: none;
  transition: margin-left var(--dock-t) cubic-bezier(.5, 0, .3, 1), opacity .12s ease-out, visibility 0s var(--dock-t); }

/* bigger thumb targets: each tab is at least 80 x 56 (was 72 x 52); they share the bar equally */
.dock-nav a { flex: 1 1 0; height: 56px; min-width: min(80px, 21vw); padding: 0 8px; gap: 3px; background: none; }
.dock-nav a svg { width: 22px; height: 22px; }
.dock-nav a span { font-size: 11.5px; }
.dock-nav a.on { background: none; padding: 0 8px; }
.dock-start svg { width: 24px; height: 24px; }
/* one highlight that glides to the open tab, stretching a little on the way */
.dock-ind { position: absolute; z-index: -1; left: 6px; top: 6px; bottom: 6px; width: calc((100% - 16px) / 3); border-radius: 999px; background: #3D3A37;
  transform: translateX(calc(var(--tab, 0) * (100% + 2px))); transition: transform .5s cubic-bezier(.3, 1.3, .5, 1), opacity .2s ease-out; }
.dock-nav.no-ind .dock-ind { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .goo-bud, .dock-start, body[data-route="home"] .goo-bud, body[data-route="home"] .dock-start, .dock-ind { transition: none !important; }
}

/* ================================================================ round 15: smooth on Android too
   Things Android phones paint slowly are removed from scrolling and from the dock at rest: a fixed page background
   (repainted on every scroll frame), an SVG filter that was always on, and a dock animation that moved layout.
   Animation here uses transform and opacity only, which the phone's graphics chip handles without the page. */
body { background-attachment: scroll; }
/* off-screen rows of long lists aren't laid out or painted until they come near the screen */
.exrow { content-visibility: auto; contain-intrinsic-size: auto 52px; }
/* a touch screen has no hover: a tapped button must not stay "hovered" (and repainted) after the finger lifts */
@media (hover: none) {
  .btn.primary:hover, .mcard-btn:hover, .dock-start:hover, .auth-go:hover, .dock:has(.dock-start:hover) .goo-bud { filter: none; }
  .list-row.linkrow:hover > svg:last-child, .auth-row:hover > svg:last-child, .home-next:hover .home-next-go svg, .back:hover svg { transform: none; }
}

/* dock: the bar and the button keep one layout; on Home they are slid together, elsewhere apart (transform only).
   .dock-goo's two elements only carry the layout and the transitions and are never painted: the SVG shapes in
   .dock-gfx copy them every frame while they move (app.js dockGfx), with the liquid filter on only then. */
.dock-goo { visibility: hidden; filter: none; }
.dock-gfx { position: absolute; left: -24px; top: -24px; width: calc(100% + 48px); height: calc(100% + 48px); z-index: 0;
  overflow: visible; pointer-events: none; }
.dock { --dock-shift: calc((var(--bud) + var(--bud-gap)) / 2); }
.goo-pill, .dock-nav { transition: transform var(--dock-t) var(--dock-ease); }
.goo-bud { margin-left: var(--bud-gap); transition: transform var(--dock-t) var(--dock-ease), background-color .3s ease-out .5s; }
.dock-start { margin-left: var(--bud-gap); transition: transform var(--dock-t) var(--dock-ease), opacity .25s ease-out .55s, visibility 0s; }
body[data-route="home"] .goo-pill, body[data-route="home"] .dock-nav { transform: translateX(var(--dock-shift)); transition-timing-function: cubic-bezier(.5, 0, .3, 1); }
body[data-route="home"] .goo-bud, body[data-route="home"] .dock-start { margin-left: var(--bud-gap); }
body[data-route="home"] .goo-bud { transform: translateX(calc(var(--dock-shift) * -1)) scale(.7);
  transition: transform var(--dock-t) cubic-bezier(.5, 0, .3, 1), background-color .16s ease-out; }
body[data-route="home"] .dock-start { transform: translateX(calc(var(--dock-shift) * -1));
  transition: transform var(--dock-t) cubic-bezier(.5, 0, .3, 1), opacity .12s ease-out, visibility 0s var(--dock-t); }
.dock:has(.dock-start:active) .goo-bud { transform: scale(.9); transition-duration: .09s; }
@media (prefers-reduced-motion: reduce) {
  .goo-pill, .dock-nav, .goo-bud, .dock-start, body[data-route="home"] .goo-pill, body[data-route="home"] .dock-nav,
  body[data-route="home"] .goo-bud, body[data-route="home"] .dock-start { transition: none !important; }
  body[data-route="home"] .dock-nav { transform: translateX(var(--dock-shift)) !important; }
}

/* camera alert: the camera's first message, on a dimmed screen */
.cam-alert { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--sp-5);
  background: rgba(0, 0, 0, .74); overscroll-behavior: contain; touch-action: none; animation: camDim .2s ease-out both; }
.cam-alert.hidden { display: none; }
.cam-alert-card { display: grid; gap: var(--sp-3); justify-items: center; width: min(360px, 100%); padding: var(--sp-5); border-radius: var(--r-lg);
  background: var(--tile); color: var(--text); text-align: center; box-shadow: 0 18px 48px rgba(0, 0, 0, .5); touch-action: manipulation;
  animation: camCard .26s var(--ease-out) both; }
.cam-alert-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sig-ground); color: var(--on-sig); }
.cam-alert-ic svg { width: 26px; height: 26px; }
.cam-alert-card h2 { margin: var(--sp-1) 0 0; font-size: 22px; text-wrap: balance; }
.cam-alert-card p { margin: 0 0 var(--sp-2); color: var(--muted); font-size: 15px; line-height: 1.45; text-wrap: pretty; }
.cam-alert-card .btn { width: 100%; }
@keyframes camDim { from { opacity: 0; } }
@keyframes camCard { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .cam-alert, .cam-alert-card { animation: none; } }
/* the note left in the camera frame is short, and clear of the controls above and the counter below */
.stage .placeholder { padding: 64px var(--sp-4) 96px; }
.stage .placeholder .stack { gap: var(--sp-2); justify-items: center; max-width: 300px; }
.stage .placeholder h2 { font-size: 19px; margin: 0; }
.stage .placeholder p { margin: 0; font-size: 14px; line-height: 1.4; }

/* ================================================================ round 16: exercise board → muscle plate (the drum)
   The Exercises page opens on a fluid board of twelve cells sized by exercise count. Swiping up (or tapping the
   selected cell) morphs it into an accent glyph on a card with that pattern's body part as an outlined cutout. The
   pattern's exercises sit on a drum inside the card; the slot the drum rests in is the button that opens the
   exercise. Geometry and timing live in board.js; this is colour, type and layout only, on the app's own tokens. */
.xex { display: grid; gap: var(--sp-4); justify-items: center; }
.xstage { position: relative; width: 100%; max-width: 440px; }
.xstage > .page-head { position: absolute; inset: 0 0 auto 0; margin: 0; padding-top: 14px; z-index: 1; pointer-events: none; align-items: flex-end; }
/* in a body region: "‹ Exercises" sits over the region's name and goes back to the regions */
.xhead-t { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.xb-crumb { pointer-events: auto; border: 0; background: none; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer;
  padding: 12px 10px 12px 0; margin: -12px 0 -10px; min-height: 44px; }
.xb-crumb[hidden] { display: none; }
.xb-crumb:hover { color: var(--text); }
.xb-crumb:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; border-radius: var(--r-sm); }
.xb-crumb .ic, .xb-crumb svg { width: 16px; height: 16px; }
#xb-cells { transition: opacity .15s ease-out, transform .15s ease-out; transform-origin: 195px 350px; }
#xb-cells.swap { opacity: 0; transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { #xb-cells { transition: none; } }
#board { position: relative; --open: 0; --k: 1; margin-bottom: calc((1 - var(--open)) * -36%); touch-action: none; user-select: none; -webkit-user-select: none; }
.xlist { width: 100%; max-width: 720px; }
.xlist .ex-tools { margin-top: 0; }
/* plate colours: rules and the skin outline are muted on dark and text-coloured on light */
#board, .xplate { --xrule: var(--muted); --xskin: var(--card-2); --xout: var(--card); }
:root[data-theme="light"] #board, :root[data-theme="light"] .xplate { --xrule: var(--text); --xskin: var(--card); --xout: var(--text); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #board, :root:not([data-theme="dark"]) .xplate { --xrule: var(--text); --xskin: var(--card); --xout: var(--text); }
}
.xboard { display: block; width: 100%; height: auto; overflow: visible; outline: none; }
.xb-card { fill: var(--card); }
.xboard .xb-card { opacity: 0; }
.xb-cell { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.xb-cell path { fill: var(--cell); transition: fill var(--t-hover) ease-out; }
.xb-cell.on path, .xb-glyph { fill: var(--sig-ground); }
.xb-cell:focus-visible path { stroke: var(--sig); stroke-width: 3; }
.xb-cell text { fill: var(--cell-ink); pointer-events: none; font-family: var(--disp); text-anchor: middle; }
.xb-l { font-weight: 700; letter-spacing: -.01em; }
.xb-n { font-size: 11px; font-weight: 600; letter-spacing: .06em; }
/* group indicator */
.xb-gi { font: 600 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); pointer-events: none; }
.xb-gi.mid { text-anchor: middle; fill: var(--text); } .xb-gi.end { text-anchor: end; }
.xb-seg { cursor: pointer; }
.xb-seg .hit { fill: transparent; }
.xb-seg .bar { fill: var(--line-2); transition: fill .25s; }
.xb-seg:hover .bar { fill: var(--muted); }
.xb-seg.on .bar, .xb-seg.on:hover .bar { fill: var(--sig-ground); }
/* card text */
.xb-k { font: 600 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; fill: var(--text); }
.xb-k.end, .xb-peek.end { text-anchor: end; }
.xb-peek { font: 700 13px var(--disp); fill: var(--text); pointer-events: none; }
.xb-rule { stroke: var(--xrule); stroke-width: 2; }
.xb-hint { font: 600 9.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); pointer-events: none; }
/* the HTML controls over the card, laid out in the design's pixels and scaled with the stage */
.xb-ov { position: absolute; left: 0; top: 0; width: 342px; height: 648px; transform-origin: 0 0; transform: scale(var(--k)); pointer-events: none; }
.xb-slot, .xb-listbtn, .xb-panel { opacity: 0; pointer-events: none; }
#board.is-open .xb-slot, #board.is-open .xb-listbtn { opacity: 1; pointer-events: auto; }
/* the slot between the two rules: card colour while the drum spins, accent when it rests on an exercise */
.xb-slot { position: absolute; left: 14px; top: 395px; width: 314px; height: 42px; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--on-sig);
  -webkit-tap-highlight-color: transparent; transition: opacity .2s ease-out; }
.xb-slot-fill { position: absolute; inset: 1px 0; background: var(--sig-ground); opacity: 0; transition: opacity .28s ease-out, background-color var(--t-press) ease-out; }
.xb-slot.pressed .xb-slot-fill { background: #C23A22; }
.xb-slot-arrow { position: absolute; right: 12px; top: 11px; width: 20px; height: 20px; opacity: 0; transition: opacity .28s ease-out, transform .28s var(--ease-out); }
.xb-slot:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* drum rows */
.xb-drum, .xb-info { opacity: 0; }
.xb-drow { position: absolute; left: 22px; right: 56px; height: 34px; display: flex; align-items: center; gap: 12px; cursor: pointer; pointer-events: none; will-change: transform, opacity; }
.xb-drow .n { width: 22px; flex: none; font: 700 11px/1 var(--sans); color: var(--muted); }
.xb-drow.on .n { color: var(--sig); }
.xb-drow .t { font-family: var(--disp); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xb-drow.near .t { font-weight: 800; color: var(--text); }
.xb-drow.inv .n, .xb-drow.inv .t { color: var(--on-sig); }
.xb-info { position: absolute; left: 14px; right: 14px; top: 506px; display: flex; align-items: center; gap: 10px; font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* difficulty as a halftone ramp */
.xb-ht { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.xb-ht i { width: 9px; height: 9px; flex: none; display: grid; place-items: center; }
.xb-ht b { width: 2px; height: 2px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 50%, transparent); }
.xb-ht b.f { background: var(--sig-ground); }
.xb-prow .xb-ht { gap: 2px; } .xb-prow .xb-ht i { width: 8px; height: 8px; }
/* list button and panel */
.xb-listbtn { position: absolute; left: 296px; top: 48px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-md);
  background: transparent; color: var(--text); cursor: pointer; z-index: 3; transition: opacity .2s ease-out, background-color var(--t-hover) ease-out, transform var(--t-release) var(--ease-out); }
.xb-listbtn svg { width: 16px; height: 16px; }
.xb-listbtn:hover, .xb-listbtn:focus-visible { background: var(--card-2); }
.xb-listbtn:active { transform: scale(.92); transition-duration: var(--t-press); }
.xb-panel { position: absolute; left: 0; top: 92px; width: 342px; height: 508px; overflow-y: auto; scrollbar-width: none; background: var(--card); border-top: 2px solid var(--xrule);
  border-radius: var(--r-md); transform: translateY(24px); visibility: hidden; z-index: 2; touch-action: pan-y; transition: opacity .28s ease-out, transform .28s var(--ease-out), visibility 0s .28s; }
.xb-panel.open { opacity: 1; pointer-events: auto; transform: none; visibility: visible; transition-delay: 0s; }
.xb-prow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: background-color var(--t-hover) ease-out; }
.xb-prow:hover, .xb-prow.on { background: var(--card-2); }
.xb-prow .num { width: 22px; flex: none; font: 700 11px var(--sans); color: var(--muted); }
.xb-prow.on .num { color: var(--sig); }
.xb-prow .t { flex: 1; min-width: 0; display: grid; }
.xb-prow .t b { font: 600 15px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xb-prow .t span { font: 400 12px/1.3 var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the figure: an outlined cutout; neighbouring muscles faint, the pattern's in the text colour, targets in accent */
.xfig { pointer-events: none; }
.xf-so { fill: var(--xrule); stroke: var(--xrule); stroke-linejoin: round; }
.xf-si { fill: var(--xskin); stroke: var(--xskin); stroke-linejoin: round; }
.xf-ctx { fill: var(--muted); fill-opacity: .35; stroke: var(--xout); stroke-opacity: .6; stroke-width: 1.2; stroke-linejoin: round; }
.xf-m { --fo: 1; --od: 0; --fd: 0; }
.xf-fill { fill: var(--text); stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; fill-opacity: var(--fo); stroke-opacity: var(--fo); transition: fill .25s, stroke .25s; }
.xf-m.hl .xf-fill { fill: var(--sig-ground); stroke: var(--sig-ground); }
.xf-fib { fill: none; stroke: var(--card); stroke-opacity: var(--o); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: var(--fd); }
.xf-out { fill: none; stroke: var(--xout); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: var(--od); }
.xf-call { pointer-events: none; animation: xcall .18s var(--ease-out) both; }
.xf-call line { stroke: var(--text); stroke-width: 1.5; }
.xf-call circle { fill: var(--card); stroke: var(--text); stroke-width: 1.5; }
.xf-call rect { fill: var(--text); }
.xf-call text { font: 600 9px var(--sans); letter-spacing: .08em; text-transform: uppercase; text-anchor: middle; fill: var(--card); }
@keyframes xcall { from { opacity: 0; } }
/* the plate on an exercise's own page takes the card colour of the theme */
.xplate-card { overflow: hidden; }
.xplate { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) {
  .xf-call { animation: none; }
  .xf-fill, .xb-panel, .xb-listbtn, .xb-slot, .xb-slot-fill, .xb-slot-arrow { transition: none; }
}

/* ================================================================ You tab (option 2a): four blocks, pop-out cards.
   Built on the app's tokens; --yp-* only name the roles from the design brief. */
:root {
  --yp-frame: var(--cream); --yp-tile: var(--tile); --yp-raised: var(--tile-2); --yp-text: var(--text); --yp-muted: var(--muted);
  --yp-acc: var(--sig-ground); --yp-on-acc: var(--on-sig); --yp-plate: #F2EFEA; --yp-off: #4A4744;
  --yp-bar-on: var(--muted); --yp-bar-off: #3A3A3A; --yp-trained: #AE1800;
  --yp-pet-out: #5B5958; --yp-pet-in: #EBE8EE; --yp-pet-in-ink: #201E1D; --yp-pet-in-name: #4A4747;
  --yp-pet-out-ink: #F3F2F2; --yp-pet-out-name: #D7D3D3;
  --yp-glass: rgba(58, 55, 55, .62); --yp-glass-line: rgba(255, 255, 255, .09);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --yp-off: #CBC7BF; --yp-bar-off: #DFDCD5; --yp-trained: #C23A22;
    --yp-pet-out: #CFCBC4; --yp-pet-in: #2A2826; --yp-pet-in-ink: #FFFFFF; --yp-pet-in-name: #D7D3D3;
    --yp-pet-out-ink: #161616; --yp-pet-out-name: #4A4747;
    --yp-glass: rgba(255, 255, 255, .72); --yp-glass-line: rgba(0, 0, 0, .08);
  }
}
:root[data-theme="light"] {
  --yp-off: #CBC7BF; --yp-bar-off: #DFDCD5; --yp-trained: #C23A22;
  --yp-pet-out: #CFCBC4; --yp-pet-in: #2A2826; --yp-pet-in-ink: #FFFFFF; --yp-pet-in-name: #D7D3D3;
  --yp-pet-out-ink: #161616; --yp-pet-out-name: #4A4747;
  --yp-glass: rgba(255, 255, 255, .72); --yp-glass-line: rgba(0, 0, 0, .08);
}

body[data-route="progress"] .member-chip { display: none !important; }
.yp-gear { margin-left: auto; width: 44px; height: 44px; flex: none; border-radius: 999px; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text);
  background: var(--yp-glass); border: 1px solid var(--yp-glass-line);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); }
.yp-gear .ic { width: 20px; height: 20px; }

.pr { transition: transform .28s cubic-bezier(.2, .8, .2, 1), background-color .16s ease-out, color .16s ease-out;
  transform-origin: center; -webkit-tap-highlight-color: transparent; }
.pr:active { transform: scale(.97); transition: transform .12s cubic-bezier(.2, .8, .2, 1); }
.yp :focus-visible, .yp-card :focus-visible, .yp-gear:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.yp-scroll { scrollbar-width: none; }
.yp-scroll::-webkit-scrollbar { display: none; }
html.yp-locked { overflow: hidden; }

.yp { display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin: 0 auto; color: var(--yp-text); }
.yp-enter .yp-blk { animation: yp-rise .65s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes yp-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes yp-fade { from { opacity: 0; } }
@keyframes yp-pop { from { transform: scale(0); } }
@keyframes yp-grow { from { transform: scaleY(0); } }

/* 1. you: a light frame holding dark cards */
.yp-frame { background: var(--yp-frame); border-radius: 32px; padding: 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.yp-c { background: var(--yp-raised); color: var(--yp-text); border: 0; border-radius: 28px; text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.yp-greet { grid-column: span 3; padding: 20px; display: flex; flex-direction: column; gap: 16px; cursor: default; }
.yp-greet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.yp-hello { margin: 0; font: 900 30px/1.05 var(--sans); letter-spacing: -.02em; color: var(--yp-text); text-transform: none; }
.yp-hello span { font-weight: 500; color: var(--yp-muted); }
.yp-avatar { width: 52px; height: 52px; flex: none; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--yp-acc); color: var(--yp-on-acc); font: 900 18px/1 var(--sans); }
.yp-streak { align-self: flex-start; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 6px;
  border: 0; border-radius: 999px; background: var(--yp-tile); color: var(--yp-text); cursor: pointer; }
.yp-streak b { font: 900 20px/1 var(--sans); }
.yp-streak > span { font: 700 13px/1 var(--sans); color: var(--yp-muted); }
.yp-led circle.on { fill: var(--yp-acc); }
.yp-led circle.off { fill: var(--yp-off); }
.yp-enter .yp-led-in circle { animation: yp-pop .6s var(--d) both cubic-bezier(.2, .7, .3, 1); transform-box: fill-box; transform-origin: center; }
.yp-stat { height: 92px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.yp-k { font: 700 12px/1 var(--sans); color: var(--yp-muted); }
.yp-v { display: flex; align-items: baseline; gap: 3px; min-width: 0; }
.yp-v b { font: 900 28px/.9 var(--sans); letter-spacing: -.03em; white-space: nowrap; }
.yp-v small { font: 700 12px/1 var(--sans); color: var(--yp-muted); }
.yp-v.sm b { font-size: 18px; letter-spacing: -.01em; }
.yp-mem { grid-column: span 3; min-height: 60px; padding: 0 8px 0 20px; display: flex; align-items: center; gap: 12px; }
.yp-mem-n { flex: 1; min-width: 0; font: 700 14px/1.2 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yp-mem-d { font: 700 12px/1 var(--sans); color: var(--yp-muted); white-space: nowrap; }
.yp-pill { height: 44px; padding: 0 16px; border-radius: 999px; background: var(--grey); color: var(--on-grey); font: 700 13px/44px var(--sans); white-space: nowrap; }

/* 2. progress */
.yp-tile { background: var(--yp-tile); border-radius: 32px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.yp-tile-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.yp-tile-h h2 { margin: 0; font: 900 20px/1 var(--sans); letter-spacing: -.02em; }
.yp-seg { display: flex; gap: 2px; background: var(--yp-raised); border-radius: 999px; padding: 3px; }
.yp-seg button { height: 44px; margin: -6px 0; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; color: var(--yp-text); }
.yp-seg span { height: 32px; padding: 0 12px; border-radius: 999px; font: 700 11px/32px var(--sans); transition: background-color .16s ease-out, color .16s ease-out; }
.yp-seg [aria-pressed="true"] span { background: var(--grey); color: var(--on-grey); }
.yp-car { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 24px; overscroll-behavior-x: contain; }
.yp-page { flex: 0 0 calc(100% - 20px); scroll-snap-align: start; border-radius: 24px; overflow: hidden; }
.yp-plate { background: var(--yp-plate); padding: 14px 8px 8px; }
.yp-hm { position: relative; }
.yp-hm svg { display: block; width: 100%; height: auto; overflow: visible; }
.yp-hm-cap { position: absolute; bottom: 2px; transform: translateX(-50%); font: 700 11px/1 var(--sans); color: #605D5D; }
.yp-plate:has(.yp-hm) { background: var(--anat-tile); }
.yp-hm .an-p { transition: fill .35s ease-out; }
.yp-enter .an-sk { animation: yp-fade .6s 250ms both; }
.yp-enter .an-m { animation: yp-fade .7s var(--d) both; }
.yp-petpage { background: var(--yp-raised); padding: 8px; display: flex; align-items: center; justify-content: center; }
.yp-pet { position: relative; width: 100%; max-width: 306px; aspect-ratio: 1; }
.yp-pet svg { display: block; width: 100%; height: 100%; }
.yp-pet-o { fill: var(--yp-pet-out); stroke: var(--yp-pet-out); }
.yp-pet-i { fill: var(--yp-pet-in); stroke: var(--yp-pet-in); }
.yp-pet-l { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; white-space: nowrap; }
.yp-pet-l b { font: 700 19px/1 var(--sans); color: var(--yp-pet-out-ink); }
.yp-pet-l span { font: 700 10px/1 var(--sans); color: var(--yp-pet-out-name); }
.yp-pet-l.on b { color: var(--yp-pet-in-ink); }
.yp-pet-l.on span { color: var(--yp-pet-in-name); }
.yp-dots { display: flex; justify-content: center; gap: 2px; }
.yp-dots button { width: 44px; height: 44px; margin: -8px 0; border: 0; padding: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.yp-dots span { height: 6px; width: 6px; border-radius: 999px; background: var(--yp-off); transition: width .3s ease-out, background-color .3s ease-out; }
.yp-dots [aria-current="true"] span { width: 18px; background: var(--yp-text); }
.yp-weeks { width: 100%; background: var(--yp-raised); border: 0; border-radius: 24px; padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; color: var(--yp-text); text-align: left; }
.yp-weeks-h { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
.yp-weeks svg { display: block; width: 100%; height: 52px; }
.yp-bar.now { fill: var(--yp-acc); }
.yp-bar.on { fill: var(--yp-bar-on); }
.yp-bar.off { fill: var(--yp-bar-off); }
.yp-enter .yp-weeks .yp-bar { animation: yp-grow .7s var(--d) both cubic-bezier(.2, .7, .3, 1); transform-box: fill-box; transform-origin: bottom; }

/* 3. body */
.yp-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; }
.yp-body .yp-stat { height: 96px; }
.yp-k-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.yp-plus { width: 22px; height: 22px; border-radius: 999px; background: var(--yp-tile); display: flex; align-items: center; justify-content: center; }
.yp-plus .ic { width: 11px; height: 11px; stroke-width: 3; }

/* 4. posture scan */
.yp-posture { width: 100%; height: 60px; border: 0; border-radius: 999px; background: var(--yp-tile); color: var(--yp-text); display: flex; align-items: center; gap: 12px;
  padding: 0 8px 0 22px; cursor: pointer; font: 700 16px/1 var(--sans); text-align: left; }
.yp-posture > span:first-child { flex: 1; }
.yp-go { width: 44px; height: 44px; border-radius: 999px; background: var(--yp-acc); color: var(--yp-on-acc); display: flex; align-items: center; justify-content: center; }
.yp-go .ic { width: 18px; height: 18px; stroke-width: 2.5; }

/* pop-out cards */
.yp-scrim { position: fixed; inset: 0; z-index: 160; background: rgba(10, 9, 9, .6); opacity: 0; }
.yp-card { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 161; max-width: 520px; margin: 0 auto;
  background: var(--yp-tile); color: var(--yp-text); border-radius: 36px; transform-origin: 0 0; box-shadow: 0 30px 70px rgba(0, 0, 0, .5); overflow: hidden; }
.yp-card-in { padding: 20px; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; overscroll-behavior: contain; }
.yp-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yp-card-ht { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.yp-card-h h2 { margin: 0; font: 900 24px/1.05 var(--sans); letter-spacing: -.02em; text-transform: none; color: var(--yp-text); overflow-wrap: anywhere; }
.yp-card-sub { margin: 0; font: 400 13px/1.3 var(--sans); color: var(--yp-muted); }
.yp-card-sub:empty { display: none; }
.yp-card-b { display: flex; flex-direction: column; gap: 16px; }
.yp-x, .yp-round { width: 44px; height: 44px; flex: none; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--yp-raised); color: var(--yp-text); display: flex; align-items: center; justify-content: center; }
.yp-x .ic, .yp-round .ic { width: 16px; height: 16px; stroke-width: 2.5; }
.yp-round:disabled { opacity: .35; cursor: default; }
.yp-round.lg { width: 56px; height: 56px; background: var(--yp-tile); }
.yp-round.lg .ic { width: 20px; height: 20px; }
.yp-in { background: var(--yp-raised); border-radius: 24px; padding: 14px 16px; }
.yp-note { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--yp-muted); }
.yp-note.center { text-align: center; }
.yp-big { margin: 0; display: flex; align-items: baseline; gap: 4px; font: 700 13px/1 var(--sans); color: var(--yp-text); }
.yp-big b { font: 900 30px/1 var(--sans); letter-spacing: -.02em; }
.yp-big.xl { font-size: 15px; }
.yp-big.xl b { font-size: 48px; letter-spacing: -.03em; }
.yp-streak-big { display: flex; align-items: center; gap: 16px; }
.yp-streak-big > div { display: flex; flex-direction: column; gap: 6px; }
.yp-streak-big .yp-note { font-size: 12px; line-height: 1.35; }
.yp-cal-nav { display: flex; align-items: center; justify-content: space-between; }
.yp-cal-t { font: 700 15px/1 var(--sans); }
.yp-cal-grid { display: flex; flex-direction: column; gap: 4px; min-height: 268px; }
.yp-cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 999px; transition: background-color .3s ease-out; }
.yp-cal-row.stk { background: color-mix(in srgb, var(--yp-acc) 16%, transparent); }
.yp-cal-row [role="columnheader"] { text-align: center; font: 700 11px/24px var(--sans); color: var(--yp-muted); }
.yp-cal-row [role="gridcell"] { height: 44px; display: flex; align-items: center; justify-content: center; }
.yp-cal-row [role="gridcell"] span { width: 36px; height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font: 500 13px/1 var(--sans); }
.yp-cal-row span.tr { background: var(--yp-trained); color: #fff; font-weight: 700; }
.yp-cal-row span.td { box-shadow: inset 0 0 0 2px var(--yp-text); font-weight: 700; }
.yp-cal-row span.fut { color: var(--yp-muted); }
.yp-legend { display: flex; gap: 14px; flex-wrap: wrap; font: 400 12px/1 var(--sans); color: var(--yp-muted); }
.yp-legend span { display: flex; align-items: center; gap: 6px; }
.yp-legend i { width: 12px; height: 12px; border-radius: 999px; }
.yp-legend i.tr { background: var(--yp-trained); }
.yp-legend i.stk { width: 18px; background: color-mix(in srgb, var(--yp-acc) 16%, transparent); }
.yp-legend i.td { box-shadow: inset 0 0 0 2px var(--yp-text); }
.yp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.yp-li { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; background: var(--yp-raised); color: var(--yp-text); text-decoration: none; }
.yp-li i { width: 8px; height: 8px; border-radius: 999px; background: var(--yp-acc); flex: none; }
.yp-li-t { flex: 1; font: 700 14px/1 var(--sans); }
.yp-li-s { font: 400 12px/1 var(--sans); color: var(--yp-muted); }
.yp-btn { height: 52px; flex: none; border: 0; border-radius: 999px; background: var(--yp-raised); color: var(--yp-text); font: 700 15px/1 var(--sans); cursor: pointer; }
.yp-btn.light { background: var(--grey); color: var(--on-grey); }
.yp-btn.accent { background: var(--yp-acc); color: var(--yp-on-acc); }
.yp-btn.danger { color: var(--bad); }
.yp-btn.ghost { background: transparent; color: var(--yp-muted); }
.yp-btn:disabled { opacity: .5; cursor: default; }
.yp-tbars { position: relative; padding: 16px; }
.yp-tbars svg { display: block; width: 100%; height: auto; }
.yp-tlabs { position: absolute; inset: 16px; pointer-events: none; }
.yp-tlabs span { position: absolute; transform: translate(-50%, -100%); font: 700 11px/1 var(--sans); color: var(--yp-text); }
.yp-vol { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.yp-ring { align-self: center; position: relative; width: 180px; height: 180px; flex: none; }
.yp-ring svg { position: absolute; inset: 0; }
.yp-ring circle.on { fill: var(--yp-acc); }
.yp-ring circle.off { fill: var(--yp-off); }
.yp-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.yp-ring b { font: 900 48px/1 var(--sans); }
.yp-ring span { font: 700 12px/1 var(--sans); color: var(--yp-muted); }
.yp-log { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 20px 12px; border-radius: 28px; }
.yp-fs { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.yp-fs legend { font: 700 12px/1 var(--sans); color: var(--yp-muted); padding: 0; margin-bottom: 10px; letter-spacing: 0; text-transform: none; }
.yp-radios { display: flex; gap: 6px; }
.yp-radios.wrap { flex-wrap: wrap; }
.yp-radios button { position: relative; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--yp-raised); color: var(--yp-text); font: 700 13px/1 var(--sans); cursor: pointer; }
.yp-radios button::after { content: ""; position: absolute; inset: -2px 0; }
.yp-radios [aria-checked="true"] { background: var(--grey); color: var(--on-grey); }
.yp-radios.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; background: var(--yp-raised); border-radius: 999px; padding: 4px; }
.yp-radios.seg button { background: transparent; padding: 0 10px; font-size: 12px; }
.yp-radios.seg [aria-checked="true"] { background: var(--grey); color: var(--on-grey); }
.yp-radios.sm { background: var(--yp-tile); padding: 3px; gap: 2px; }
.yp-radios.sm button { height: 32px; padding: 0 12px; }
.yp-radios.sm button::after { inset: -6px 0; }
.yp-group { display: flex; flex-direction: column; gap: 4px; }
.yp-set { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 12px 0 16px; background: var(--yp-raised); font: 700 14px/1.2 var(--sans); }
.yp-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; background: var(--yp-raised);
  color: var(--yp-text); text-decoration: none; font: 700 14px/1.2 var(--sans); text-align: left; cursor: pointer; }
.yp-row > span { flex: 1; }
.yp-row small { color: var(--yp-muted); font-weight: 500; }
.yp-row .ic { width: 18px; height: 18px; flex: none; color: var(--yp-muted); }
.yp-sw { position: relative; width: 52px; height: 32px; flex: none; border-radius: 999px; border: 0; padding: 0; cursor: pointer; transition: background-color .2s ease-out; }
.yp-sw::after { content: ""; position: absolute; inset: -6px -4px; }
.yp-sw span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px; background: #F3F2F2; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.yp-sw[aria-checked="true"] { background: var(--yp-acc); }
.yp-sw[aria-checked="true"] span { transform: translateX(20px); }
.yp-sw[aria-checked="false"] { background: var(--yp-off); }
.yp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.yp-steps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--yp-raised); }
.yp-steps b { width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--yp-tile); font: 900 13px/28px var(--sans); text-align: center; }
.yp-steps span { font: 500 14px/1.35 var(--sans); }

@media (prefers-reduced-motion: reduce) {
  .yp *, .yp-card *, .yp-enter .yp-blk, .pr, .pr:active { animation: none !important; transition: none !important; }
  .pr:active { transform: none; }
}

/* Settings → Body model: a two-line label beside the Male / Female pills */
.yp-set.tall { min-height: 68px; }
.yp-set-t { display: flex; flex-direction: column; gap: 4px; }
.yp-set-t small { font: 400 12px/1.2 var(--sans); color: var(--yp-muted); }
.yp-set.tall .yp-radios.sm button { height: 38px; padding: 0 14px; }
.yp-set.tall .yp-radios.sm button::after { inset: -3px 0; }
/* the card's grow/shrink runs on its own compositor layer */
.yp-card { will-change: transform; contain: layout paint; }
.yp-scrim { will-change: opacity; }

/* ================================================================ Onboarding (#/onboarding, design 1a): seven question
   cards that fold into a storyboard. Full screen: no top bar, no dock until it's finished. */
body[data-route="onboarding"] .topbar, body[data-route="onboarding"] .dock { display: none !important; }
body[data-route="onboarding"] main { padding-top: 0; padding-bottom: 32px; }
.ob { max-width: 480px; margin: 0 auto; color: var(--text); --ob-acc: var(--sig-ground); --ob-acc-ink: var(--sig); --ob-on-acc: var(--on-sig);
  --ob-card: var(--tile); --ob-field: var(--tile-2); --ob-frame: var(--cream); --ob-row: var(--bg); --ob-line: #444141; --ob-mask: #7D7979; }
.ob :focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.ob-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header: wordmark, step label, 7-segment progress; fixed, fading into the page */
.ob-head { position: fixed; z-index: 30; top: 0; left: 0; right: 0; padding: calc(18px + env(safe-area-inset-top)) 20px 14px 24px;
  display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin: 0 auto; background: linear-gradient(var(--bg) 78%, transparent); }
.ob-head-r { display: flex; align-items: center; justify-content: space-between; }
.ob-brand { height: 22px; }
.ob-step { font: 600 12px/1 var(--sans); color: var(--muted); }
.ob-prog { display: flex; gap: 3px; height: 6px; }
.ob-prog i { flex: 1; border-radius: 999px; background: var(--ob-line); overflow: hidden; }
.ob-prog b { display: block; height: 100%; background: var(--ob-acc); border-radius: 999px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.ob-body { padding-top: calc(84px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 12px; }

/* storyboard */
.ob-sb { background: var(--ob-frame); border-radius: 32px; padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.ob-sb-row { display: flex; align-items: stretch; gap: 4px; }
.ob-sb-b { flex: 1; min-width: 0; min-height: 48px; border: 0; background: var(--ob-row); color: var(--text); display: flex; align-items: center; gap: 12px;
  padding: 0 16px; cursor: pointer; text-align: left; font: inherit; }
.ob-sb-n { font: 700 11px/1 var(--sans); color: var(--ob-mask); width: 18px; flex: none; }
.ob-sb-k { font: 600 12px/1 var(--sans); color: var(--muted); width: 70px; flex: none; }
.ob-sb-v { flex: 1; min-width: 0; font: 700 14px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-sb-v.masked { color: var(--ob-mask); letter-spacing: .04em; }
.ob-lock { flex: none; color: var(--muted); }
.ob-eye { width: 48px; min-height: 48px; flex: none; border: 0; padding: 0; background: var(--ob-row); color: var(--muted); display: flex; align-items: center;
  justify-content: center; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ob-eye[aria-pressed="true"] { color: var(--ob-acc-ink); }

/* question card */
.ob-card { background: var(--ob-card); border-radius: 32px; padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 16px; transform-origin: top center; }
.ob-q-h { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.ob-q-n { display: flex; align-items: center; gap: 8px; font: 700 11px/1 var(--sans); color: var(--ob-acc-ink); letter-spacing: .06em; }
.ob-priv { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--ob-field);
  color: var(--text); font: 600 11px/22px var(--sans); letter-spacing: 0; }
.ob-priv .ob-lock { width: 11px; height: 11px; color: currentColor; }
.ob-q-h h2 { margin: 0; font: 900 28px/1.08 var(--sans); letter-spacing: -.02em; text-transform: none; color: var(--text); outline: none; }
.ob-q-h p { margin: 0; font: 400 14px/1.4 var(--sans); color: var(--muted); }
.ob-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ob-field label, .ob-slide-h label { font: 600 12px/1 var(--sans); color: var(--muted); padding: 0 4px; letter-spacing: 0; text-transform: none; }
.ob-in { width: 100%; height: 52px; box-sizing: border-box; border: 2px solid transparent; border-radius: 16px; background: var(--ob-field); color: var(--text);
  padding: 0 16px; font: 700 17px/1 var(--sans); outline: none; transition: border-color .2s ease-out; }
.ob-in:focus { border-color: var(--text); }
.ob-in::placeholder { color: var(--ob-mask); font-weight: 500; }
.ob-sel { appearance: none; -webkit-appearance: none; padding-right: 32px; background-repeat: no-repeat; background-size: 5px 5px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 23px, calc(100% - 15px) 23px; }
.ob-col { display: flex; flex-direction: column; gap: 12px; }
.ob-col[role="radiogroup"] { gap: 8px; }
.ob-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ob-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* option cards */
.ob-opt { border: 0; border-radius: 24px; background: var(--ob-field); color: var(--text); padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; text-align: left; font: inherit; --art: var(--ob-card); --ink: var(--ob-mask); min-width: 0; }
.ob-opt[aria-checked="true"], .ob-opt[aria-pressed="true"] { background: var(--ob-acc); color: var(--ob-on-acc); --art: var(--ob-acc-ink); --ink: var(--ob-on-acc); }
.ob-opt-top { display: flex; justify-content: space-between; align-items: center; width: 100%; font: 600 10px/1 var(--sans); opacity: .75; }
.ob-opt-t { font: 900 17px/1.1 var(--sans); letter-spacing: -.01em; }
.ob-opt-t.sm { font-size: 15px; }
.ob-art { display: block; width: 100%; border-radius: 14px; overflow: hidden; background: var(--art); color: var(--ink); }
.ob-art.wide { aspect-ratio: 150 / 104; }
.ob-art.sq { aspect-ratio: 1; }
.ob-art svg { display: block; width: 100%; height: 100%; }
.ob-dots circle { fill: currentColor; }
.ob-level { flex-direction: row; align-items: center; gap: 14px; padding: 10px; }
.ob-art.lv { width: 92px; height: 76px; flex: none; border-radius: 16px; }
.ob-lv-t { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ob-lv-t b { font: 900 18px/1.1 var(--sans); }
.ob-lv-t span { font: 400 13px/1.35 var(--sans); opacity: .8; }
.ob-lv-n { font: 600 10px/1 var(--sans); opacity: .65; align-self: flex-start; padding-top: 4px; }
.ob-equip { padding: 10px 10px 12px; }
.ob-tick { width: 16px; height: 16px; border-radius: 999px; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.ob-tick .ic { width: 9px; height: 9px; stroke-width: 4; opacity: 0; }
.ob-opt[aria-pressed="true"] .ob-tick { background: var(--ob-on-acc); }
.ob-opt[aria-pressed="true"] .ob-tick .ic { opacity: 1; color: var(--ob-acc); }

/* date of birth, size, days */
.ob-dob { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ob-dob-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 100px; gap: 8px; }
.ob-panel { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 0 16px; border-radius: 24px; background: var(--ob-field); }
.ob-panel > b { font: 900 40px/1 var(--sans); letter-spacing: -.03em; }
.ob-panel > b.dim { color: var(--ob-mask); }
.ob-panel > b.bad { color: var(--ob-acc-ink); }
.ob-panel > span { font: 400 13px/1.35 var(--sans); color: var(--muted); }
.ob-panel-t { display: flex; flex-direction: column; gap: 4px; }
.ob-panel-t b { font: 900 20px/1 var(--sans); }
.ob-panel-t span { font: 400 13px/1.3 var(--sans); color: var(--muted); }
.ob-panel .yp-led circle { transition: fill .25s ease-out; }
.ob-units { align-self: flex-start; display: flex; gap: 2px; background: var(--ob-field); border-radius: 999px; padding: 3px; }
.ob-units button { position: relative; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 700 12px/1 var(--sans); cursor: pointer; }
.ob-units button::after { content: ""; position: absolute; inset: -3px 0; }
.ob-units [aria-checked="true"] { background: var(--grey); color: var(--on-grey); }
.ob-slide { background: var(--ob-field); border-radius: 24px; padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 4px; }
.ob-slide-h { display: flex; justify-content: space-between; align-items: baseline; }
.ob-slide-h label { padding: 0; }
.ob-val { display: flex; align-items: baseline; gap: 4px; }
.ob-val b { font: 900 30px/1 var(--sans); }
.ob-val small { font: 700 13px/1 var(--sans); color: var(--muted); }
.ob-rg { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; --p: 50%; }
.ob-rg::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ob-acc) var(--p), var(--ob-line) var(--p)); }
.ob-rg::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ob-acc) var(--p), var(--ob-line) var(--p)); }
.ob-rg::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 999px; background: #F3F2F2; margin-top: -10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.ob-rg::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 999px; background: #F3F2F2; }
.ob-rg:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 999px; }
.ob-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ob-days button { height: 56px; border: 0; border-radius: 16px; background: var(--ob-field); color: var(--text); font: 900 15px/1 var(--sans); cursor: pointer; }
.ob-days [aria-pressed="true"] { background: var(--ob-acc); color: var(--ob-on-acc); }

/* last card */
.ob-banner { border-radius: 24px; overflow: hidden; background: var(--ob-field); color: var(--ob-acc); }
.ob-banner svg { display: block; width: 100%; height: auto; }
.ob-privacy { display: flex; gap: 12px; align-items: flex-start; padding: 4px 4px 0; }
.ob-privacy .ob-lock { width: 18px; height: 18px; margin-top: 1px; }
.ob-privacy p { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--muted); }

/* buttons */
.ob-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ob-cancel { height: 44px; padding: 0 18px; border: 2px solid var(--ob-line); border-radius: 999px; background: transparent; color: var(--text); font: 700 13px/1 var(--sans); cursor: pointer; }
.ob-next { height: 44px; border: 0; border-radius: 999px; background: var(--grey); color: var(--on-grey); display: flex; align-items: center; gap: 10px;
  padding: 0 6px 0 18px; cursor: pointer; font: 700 14px/1 var(--sans); }
.ob-next-dot { width: 32px; height: 32px; border-radius: 999px; background: var(--ob-acc); color: var(--ob-on-acc); display: flex; align-items: center; justify-content: center; }
.ob-next-dot .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.ob-next[aria-disabled="true"] { background: #3A3737; color: var(--muted); }
.ob-next[aria-disabled="true"] .ob-next-dot { background: var(--ob-card); color: var(--ob-mask); }
.ob-next.go { background: var(--ob-acc); color: var(--ob-on-acc); }
.ob-next.go .ob-next-dot { background: var(--ob-on-acc); color: var(--ob-acc); }
.ob-leave { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--ob-field); border-radius: 24px; padding: 8px 8px 8px 16px; }
.ob-leave > span { flex: 1; font: 600 13px/1.3 var(--sans); }
.ob-pill { height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ob-card); color: var(--text); font: 700 13px/1 var(--sans); cursor: pointer; }
.ob-pill.accent { background: var(--ob-acc); color: var(--ob-on-acc); }
.ob-hint { margin: -6px 0 0; text-align: center; font: 400 12px/1.3 var(--sans); color: var(--muted); }

/* motion: the card rises 28px and scales from .98 (650 ms), options stagger 70 ms, the newest storyboard row
   slides in from 8px above (500 ms); a 'done' banner's dots grow left to right */
@keyframes ob-card { from { opacity: 0; transform: translateY(28px) scale(.98); } }
@keyframes ob-opt { from { opacity: 0; transform: translateY(14px); } }
@keyframes ob-row { from { opacity: 0; transform: translateY(-8px); } }
@keyframes ob-dot { from { transform: scale(0); } }
.ob-anim .ob-card { animation: ob-card .65s cubic-bezier(.2, .8, .2, 1) both; }
.ob-anim .ob-opt, .ob-anim .ob-days button { animation: ob-opt .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(120ms + var(--i) * 70ms); }
.ob-anim .ob-in-row { animation: ob-row .5s cubic-bezier(.2, .8, .2, 1) both; }
.ob-anim .ob-dots.done circle { animation: ob-dot .6s cubic-bezier(.2, .8, .2, 1) both; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  .ob *, .ob-prog b { animation: none !important; transition: none !important; }
}

/* ================================================================ Home after today's workout */
.home-done { display: flex; align-items: center; gap: 12px; padding: var(--pad); border-radius: 24px; background: var(--tile); }
.home-done-ic { width: 44px; height: 44px; flex: none; border-radius: 999px; background: var(--sig-ground); color: var(--on-sig); display: flex; align-items: center; justify-content: center; }
.home-done-ic .ic { width: 22px; height: 22px; stroke-width: 3; }
.home-done-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-done-t h2 { margin: 0; font-size: 18px; }
.home-done-t .muted { font-size: 13px; }
.home-today.is-next { opacity: .96; }

/* ================================================================ Pay to unlock */
body[data-route="pay"] .dock { display: none; }
.paywall { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--gap); }
.paywall .page-head { margin-bottom: 0; }
.paywall-sub { margin: 0; font-size: 14px; }

/* ================================================================ Running workout (#/session, web/js/workout/)
   One exercise at a time on a light screen that matches Home, in every theme. Covers the viewport while it runs. */
:root {
  --wk-page: #ebe8e3; --wk-card: #fbfaf8; --wk-inset: #efece7; --wk-inset-2: #f3f0ec; --wk-ink: #141414; --wk-mute: #66615b;
  --wk-red: #E85438; --wk-red-text: #c2361c; --wk-tint: #fbe3dd; --wk-green: #2e9e5b; --wk-todo: #dcd7d0; --wk-skip: #d4cfc8;
}
.wk { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--wk-page); color: var(--wk-ink);
  color-scheme: light; font-family: var(--sans); padding-top: env(safe-area-inset-top); }
.wk .num { font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.wk button { font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.wk button:focus-visible, .lg-pick-ov button:focus-visible { outline: 3px solid var(--wk-red); outline-offset: 2px; }
.wk .pr { transition: transform .26s cubic-bezier(.2, .8, .2, 1), background-color .16s ease-out; }
.wk .pr:active:not(:disabled) { transform: scale(.96); transition-duration: .1s; }
.wk button:disabled { cursor: default; opacity: .45; }

.wk-head, .wk-body { width: 100%; max-width: 480px; margin: 0 auto; }
.wk-head { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 12px; background: var(--wk-page); }
.wk-top { display: flex; align-items: center; gap: 12px; }
.wk-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wk-title { font: 800 17px/1.1 var(--sans); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-sub { font: 600 12.5px/1 var(--sans); color: var(--wk-mute); }
.wk-sub b { color: var(--wk-ink); font-weight: 800; }
.wk-finish { flex: none; height: 42px; min-width: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--wk-ink); color: var(--wk-card) !important; font: 800 14px/1 var(--sans); cursor: pointer; }
.wk-rail { display: flex; gap: 4px; height: 6px; }
.wk-rail span { flex: 1; min-width: 2px; border-radius: 999px; background: var(--wk-todo); transition: background-color .3s ease-out; }
.wk-rail .done { background: var(--wk-green); } .wk-rail .cur { background: var(--wk-red); } .wk-rail .skip { background: var(--wk-skip); }

.wk-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.wk-scroll::-webkit-scrollbar { display: none; }
.wk-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 12px calc(28px + env(safe-area-inset-bottom)); }
.wk-card { background: var(--wk-card); border-radius: 28px; }

/* the current exercise */
.wk-focus { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 22px 18px 18px; }
.wk-fh { display: flex; align-items: flex-start; gap: 10px; }
.wk-ft { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wk-kind { font: 600 12.5px/1 var(--sans); color: var(--wk-mute); }
.wk-kind.main { color: var(--wk-red-text); }
.wk-name { margin: 0; font: 900 30px/1 var(--sans); letter-spacing: -.035em; color: var(--wk-ink); text-transform: none; overflow-wrap: anywhere; }
.wk-round { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--wk-inset); cursor: pointer; }
.wk-round:hover, .wk-step:hover { background: #e6e2dc; }
.wk-menu { position: absolute; right: 18px; top: 72px; z-index: 4; width: 200px; padding: 6px; border-radius: 22px; background: var(--wk-ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25); animation: wkPop .16s ease-out; }
.wk-menu button { display: block; width: 100%; height: 46px; padding: 0 12px; border: 0; border-radius: 16px; background: transparent; color: var(--wk-card) !important;
  font: 700 14px/1 var(--sans); text-align: left; cursor: pointer; }
.wk-menu button:hover, .wk-menu button:focus-visible { background: rgba(255, 255, 255, .1); }
.wk-menu button:focus-visible { outline-offset: -3px; }
@keyframes wkPop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* set squares (card) and mini squares (list): done = green inset border + check badge, never colour alone */
.wk-sq { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-sq > span { display: contents; }
.wk-s { position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 14px; background: var(--wk-inset); font: 800 15px/44px var(--sans); cursor: pointer;
  transition: background-color .25s ease-out, box-shadow .25s ease-out; }
.wk-s:not(.done) { cursor: default; }
.wk-s.cur { background: var(--wk-red); }
.wk-s.done, .wk-mq.done { box-shadow: inset 0 0 0 2px var(--wk-green); }
.wk-ck { position: absolute; right: -5px; top: -5px; display: none; place-items: center; width: 16px; height: 16px; border-radius: 999px;
  background: var(--wk-green); color: #fff; box-shadow: 0 0 0 2px var(--wk-card); }
.done > .wk-ck { display: grid; }

.wk-set, .wk-rest { display: flex; flex-direction: column; gap: 14px; }
.wk-reps { display: flex; align-items: center; justify-content: space-between; }
.wk-step { display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 999px; background: var(--wk-inset); cursor: pointer; }
.wk-count { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wk-count .num { font: 900 104px/.9 var(--sans); letter-spacing: -.04em; }
.wk-unit { font: 700 14px/1 var(--sans); color: var(--wk-mute); }
.wk-kg { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 6px; border-radius: 999px; background: var(--wk-inset-2); }
.wk-kstep { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--wk-card); cursor: pointer; }
.wk-kv { display: flex; align-items: baseline; gap: 6px; }
.wk-kv .num { font: 900 26px/1 var(--sans); }
.wk-kv .num.none { color: var(--wk-mute); }
.wk-kv .wk-unit { font-size: 13px; }
.wk-log { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 6px 0 24px; border: 0; border-radius: 999px;
  background: var(--wk-ink); color: var(--wk-card) !important; font: 800 17px/1 var(--sans); cursor: pointer; }
.wk-logck { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--wk-red); color: var(--wk-ink); }
.wk-hint { font: 600 12.5px/1.3 var(--sans); color: var(--wk-mute); text-align: center; }

/* rest replaces the set controls in the same card */
.wk-rest { gap: 16px; }
.wk-rt { display: flex; align-items: baseline; justify-content: space-between; }
.wk-rl { font: 800 18px/1 var(--sans); }
.wk-clock { font: 900 72px/.9 var(--sans); }
.wk-track { height: 14px; border-radius: 999px; background: var(--wk-inset-2); overflow: hidden; }
.wk-track i { display: block; height: 100%; border-radius: 999px; background: var(--wk-red); }
.wk-next { font: 600 14px/1.3 var(--sans); color: var(--wk-mute); }
.wk-next b { color: var(--wk-ink); font-weight: 800; }
.wk-rb, .wk-fb { display: flex; gap: 8px; }
.wk-btn1, .wk-btn2, .wk-btnr { height: 52px; border: 0; border-radius: 999px; font: 800 15px/1 var(--sans); cursor: pointer; }
.wk-btn1.big, .wk-btn2.big, .wk-btnr.big { height: 56px; }
.wk-btn1 { background: var(--wk-ink); color: var(--wk-card) !important; }
.wk-btn2 { background: var(--wk-inset); color: var(--wk-ink); }
.wk-btnr { background: var(--wk-red); color: var(--wk-ink); }
.wk-rb .wk-btn2 { flex: 1; } .wk-rb .wk-btn1 { flex: 2; } .wk-fb > * { flex: 1; }

/* up next */
.wk-group { padding: 16px 8px 8px; }
.wk-gh { display: flex; justify-content: space-between; align-items: baseline; padding: 0 10px 8px; font: 800 14px/1 var(--sans); }
.wk-gsub { font: 600 12.5px/1 var(--sans); color: var(--wk-mute); }
.wk-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 10px; border: 0; border-radius: 18px; background: transparent;
  text-align: left; cursor: pointer; transition: background-color .16s ease-out; }
.wk-row:hover { background: var(--wk-inset-2); }
.wk-row.cur { background: var(--wk-tint); cursor: default; }
.wk-row.skip { opacity: .5; }
.wk-row.skip .wk-rname { text-decoration: line-through; }
.wk-rn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wk-rname { font: 700 15px/1.15 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-row.cur .wk-rname { font-weight: 800; }
.wk-minis { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding-top: 3px; }
.wk-mq { position: relative; width: 22px; height: 22px; border-radius: 7px; background: var(--wk-inset); font: 800 11px/22px var(--sans); text-align: center; }
.wk-mq.done { box-shadow: inset 0 0 0 1.5px var(--wk-green); }
.wk-mq.cur { background: var(--wk-card); }
.wk-mq .wk-ck { width: 12px; height: 12px; }
.wk-now { flex: none; font: 800 15px/1 var(--sans); color: var(--wk-red-text); }

/* finish sheet */
.wk-scrim { position: fixed; inset: 0; z-index: 8; background: rgba(20, 20, 20, .45); animation: wkFade .2s ease-out; }
.wk-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 32px 32px 0 0; background: var(--wk-card); animation: wkUp .42s cubic-bezier(.2, .8, .2, 1); }
.wk-grab { align-self: center; width: 40px; height: 5px; margin-top: -8px; border-radius: 999px; background: #ddd8d1; }
.wk-sheet h2 { margin: 0; font: 900 28px/1 var(--sans); letter-spacing: -.03em; color: var(--wk-ink); }
.wk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wk-stats > div { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; border-radius: 20px; background: var(--wk-inset-2); min-width: 0; }
.wk-stats .num { font: 900 26px/1 var(--sans); overflow-wrap: anywhere; }
.wk-stats span:last-child { font: 600 12px/1 var(--sans); color: var(--wk-mute); }
.wk-left { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 14px/1.4 var(--sans); color: var(--wk-ink); }
.wk-left i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--wk-red); }
.wk-left.plain { color: var(--wk-mute); }
@keyframes wkFade { from { opacity: 0; } }
@keyframes wkUp { from { transform: translateY(100%); } }

/* the swap picker (an overlay above the workout) */
.lg-pick { max-height: min(80vh, 640px); display: flex; flex-direction: column; gap: 10px; }
.lg-pick-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.lg-pick-list button { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 0; border-radius: 14px; background: var(--card-2); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.lg-pick-list button > span { flex: 1; display: flex; flex-direction: column; }
.lg-pick-list small { color: var(--muted); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .wk .pr, .wk .pr:active:not(:disabled) { transition: none; transform: none; }
  .wk-menu, .wk-scrim, .wk-sheet { animation: none; }
  .wk-s, .wk-rail span, .wk-row { transition: none; }
}

/* onboarding: the done banner grows in from left to right; day dots fade as each ring lights */
.ob-anim .ob-dots.done circle { animation-delay: var(--d, 0ms); }
.ob-panel .yp-led circle { transition: fill .25s ease-out, r .25s ease-out; }
/* ---------------------------------------------------------------- Fuel & Coach (#/fuel, web/js/fuel.js) and the Home strip */
.home-fuel { display: grid; gap: 8px; margin-bottom: 8px; }
.fz-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--tile); border-radius: 16px; padding: 10px 14px; color: var(--text); text-decoration: none; }
.fz-strip-i { display: inline-flex; align-items: baseline; gap: 4px; min-width: 0; }
.fz-strip-i .ic, .fz-strip-i svg { width: 15px; height: 15px; color: var(--sig); align-self: center; }
.fz-strip-i b { font: 700 20px/1 var(--disp); }
.fz-strip-i small { color: var(--muted); font-size: 12px; }
.fz-strip-go { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; }
.fz-strip-go svg { width: 14px; height: 14px; }
.fz-strip:hover .fz-strip-go { color: var(--text); }

.offer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: start; border-radius: 16px; padding: 12px 14px;
  background: var(--tile); border: 1px solid var(--line-2); animation: tileIn .45s cubic-bezier(.2,.7,.3,1) both; }
.offer-up { background: var(--sig-ground); color: var(--on-sig); border-color: transparent; }
.offer-care { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.offer-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.offer-ic svg { width: 18px; height: 18px; }
.offer-t { display: grid; gap: 3px; min-width: 0; }
.offer-t b { font: 700 20px/1.1 var(--disp); }
.offer-t span { font-size: 13px; line-height: 1.45; }
.offer-next { opacity: .8; font-size: 12px !important; }
.offer-a { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.offer-up .btn.primary { background: var(--on-sig); border-color: var(--on-sig); color: var(--sig-ground); }
.offer-up .btn.ghost { color: var(--on-sig); }
.offer-up .btn.ghost:hover { background: color-mix(in srgb, var(--on-sig) 12%, transparent); }

.fuel { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); max-width: 760px; }
#fz-offers { display: grid; gap: 8px; }
#fz-offers:empty { display: none; }
.fuel .panel-h .k { display: inline-flex; align-items: center; gap: 6px; }
.fuel .panel-h .k svg { width: 15px; height: 15px; }
.fuel .panel-h a.k { text-decoration: none; }
.fz-note { font-size: 12px; margin-top: 6px; }
.fz-water-b { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.fz-ring { --p: 0; width: 116px; height: 116px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
  background: radial-gradient(closest-side, var(--tile) 78%, transparent 79% 100%), conic-gradient(var(--sig) calc(var(--p) * 1%), var(--card-2) 0); }
.fz-ring b { font: 700 28px/1 var(--disp); }
.fz-ring small { color: var(--muted); font-size: 11px; }
.fz-water-a { display: grid; gap: 6px; min-width: 0; flex: 1; }
.fz-diet select, .fz-add select, .fz-rform select, .fz-rform input[type="time"] { background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 2px; padding: 4px 6px; font: inherit; font-size: 13px; }
.fz-kcal { display: flex; align-items: baseline; gap: 6px; }
.fz-kcal b { font: 700 32px/1 var(--disp); }
.fz-kcal small { color: var(--muted); }
.fz-kcal .muted { margin-left: auto; font-size: 13px; }
.fz-kbar { margin: 6px 0 10px; height: 8px; }
.fz-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fz-macro { display: grid; gap: 4px; min-width: 0; }
.fz-macro-v { font: 700 18px/1 var(--disp); }
.fz-macro-v small { font: 400 11px var(--sans); color: var(--muted); }
.fz-meal { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.fz-meal > .k { color: var(--sig); }
.fz-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; align-items: center; gap: 8px; font-size: 14px; min-height: 40px; }
.fz-item small { font-size: 11px; color: var(--muted); }
.fz-add { margin-top: 10px; }
.fz-add > summary { list-style: none; }
.fz-add > summary::-webkit-details-marker { display: none; }
.fz-add[open] > summary { margin-bottom: 8px; }
.fz-add-b { display: grid; gap: 8px; }
.fz-res { display: grid; gap: 2px; max-height: 360px; overflow-y: auto; }
.fz-ri { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fz-ri small { font-size: 11px; }
.fz-step { display: inline-flex; align-items: center; gap: 2px; }
.fz-step b { min-width: 2.2em; text-align: center; }
.fz-step .btn.icon { width: 32px; min-height: 32px; }
.fz-custom summary { cursor: pointer; font-size: 13px; padding: 6px 0; }
.fz-cform { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; align-items: end; }
.fz-pmeal { padding: 8px 0; border-top: 1px solid var(--line-2); }
.fz-pmeal:first-of-type { border-top: 0; }
.fz-pmeal-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fz-pmeal-h .num { font-size: 12px; }
.fz-pmeal-h .btn, .fz-pmeal-h .chip { margin-left: auto; }
.fz-pmeal p { font-size: 13px; line-height: 1.5; margin-top: 4px; }
.fz-pmeal.done p { opacity: .6; }
.fz-pm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fz-pm .muted { grid-column: 1 / -1; font-size: 11px; }
.fz-pm.off > span:first-child::after { content: " ·"; color: var(--warn); font-weight: 700; }
.fz-pm small { font-size: 11px; color: var(--muted); }
.tr { font-size: 11px; color: var(--muted); }
.tr.up { color: var(--sig); }
.tr.down { color: var(--warn); }
.fz-corr { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; }
.fz-corr .muted { font-size: 12px; }
.fz-rform { display: grid; gap: 10px; }
.fz-r { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 14px; line-height: 2.1; }
.fz-r input[type="checkbox"] { width: 20px; height: 20px; margin-top: 6px; accent-color: var(--sig); }
.fz-rt { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; white-space: nowrap; }
.fz-log { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px 0 8px; }
.fz-msg { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.fz-msg p { white-space: pre-wrap; }
.fz-msg small { display: block; font-size: 10px; margin-top: 2px; }
.fz-msg.me { justify-self: end; background: var(--sig-ground); color: var(--on-sig); border-bottom-right-radius: 4px; }
.fz-msg.coach { justify-self: start; background: var(--card-2); border-bottom-left-radius: 4px; }
.fz-cf { display: flex; gap: 6px; align-items: end; }
.fz-cf input { width: 100%; }
@media (max-width: 420px) {
  .fz-macros { grid-template-columns: minmax(0, 1fr); }
  .fz-strip { gap: 10px; }
  .fz-strip-go { display: none; }
}
@media (prefers-reduced-motion: reduce) { .offer { animation: none; } }

/* ================================================================ Sign-in and onboarding (#/login, #/onboarding)
   One dark screen on a Pixel Blast field (web/js/signin/, web/js/onboarding/): frosted glass panels, translucent
   fields, red for anything selected, no lines. Home's Bauhaus pass follows below.
   Outfit (SIL OFL) is self-hosted in web/fonts/; until the file is there these screens fall back to Satoshi. */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2"); }
:root {
  --outfit: "Outfit", "Satoshi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --code-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --si-ink: #141414;
  --gt-bg: #121212; --gt-text: #f2efea; --gt-mute: #a8a39c; --gt-red: #E85438; --gt-err: #ff7a5c;
  --gt-glass: rgba(18, 18, 18, .82); --gt-edge: inset 0 0 0 1px rgba(242, 239, 234, .07);
  --gt-field: rgba(242, 239, 234, .08); --gt-field-edge: inset 0 0 0 1px rgba(242, 239, 234, .1);
  --gt-opt: rgba(242, 239, 234, .07); --gt-opt-edge: inset 0 0 0 1px rgba(242, 239, 234, .08);
  --gt-ease: cubic-bezier(.2, .8, .2, 1);
}
body[data-route="login"] main, body[data-route="onboarding"] main { padding: 0; }
.gt { position: fixed; inset: 0; z-index: 50; overflow: hidden; background: var(--gt-bg); color: var(--gt-text); color-scheme: dark; font-family: var(--outfit); }
.gt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gt-col { position: relative; z-index: 1; width: 100%; max-width: 480px; height: 100%; margin: 0 auto; }
.gt-top { position: absolute; left: 20px; right: 20px; top: calc(20px + env(safe-area-inset-top)); z-index: 3; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.gt-mark { display: flex; align-items: flex-start; gap: 2px; font: 800 22px/1 var(--outfit); letter-spacing: -.03em; }
.gt-mark span { color: var(--gt-red); font-size: 13px; }
.gt-step { font: 700 12px/1 var(--outfit); color: var(--gt-mute); }
.gt-prog { position: absolute; left: 20px; right: 20px; top: calc(52px + env(safe-area-inset-top)); z-index: 3; display: flex; gap: 4px; height: 6px; }
.gt-prog[hidden] { display: none; }
.gt-prog i { flex: 1; border-radius: 999px; background: rgba(242, 239, 234, .14); overflow: hidden; }
.gt-prog b { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--gt-red); transition: width .5s var(--gt-ease); }
.gt-main { position: absolute; inset: 0; }
.gt-glass { background: var(--gt-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--gt-edge); }

/* controls shared by both parts (!important where the app's base input rule uses it) */
.gt .gt-inp { width: 100%; height: 58px; border: 0 !important; border-radius: 18px !important; padding: 0 18px; outline: none; color: var(--gt-text);
  background: var(--gt-field) !important; box-shadow: var(--gt-field-edge) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 700 21px/1 var(--outfit); letter-spacing: -.01em; transition: box-shadow .18s ease-out; }
.gt .gt-inp:focus, .gt .gt-inp[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--gt-red) !important; }
.gt .gt-sel { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gt-mute) 50%), linear-gradient(135deg, var(--gt-mute) 50%, transparent 50%) !important;
  background-position: calc(100% - 20px) 26px, calc(100% - 15px) 26px !important; background-size: 5px 5px !important; background-repeat: no-repeat !important;
  background-color: rgba(242, 239, 234, .08) !important; font-size: 17px; }
.gt .gt-sel option { color: var(--si-ink); }
.gt-mono { font-family: var(--code-mono); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.gt-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.gt-lbl { display: flex; gap: 10px; font: 700 11px/1 var(--outfit); letter-spacing: .08em; text-transform: uppercase; }
.gt-lbl b { color: var(--gt-red); font-weight: 700; }
.gt-go { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; padding: 0 6px 0 20px; border: 0; border-radius: 18px;
  background: var(--gt-text); color: var(--si-ink); font: 800 17px/1 var(--outfit); cursor: pointer; transition: transform .26s var(--gt-ease), opacity .2s ease-out; }
.gt-go.wide { width: 100%; }
.gt-go[aria-disabled="true"] { opacity: .45; }
.gt-go[aria-busy="true"] { cursor: progress; }
.gt-go-c { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; background: var(--gt-red); color: var(--si-ink); }
.gt-ghost { height: 56px; padding: 0 20px; border: 0; border-radius: 18px; background: rgba(242, 239, 234, .08); box-shadow: inset 0 0 0 1px rgba(242, 239, 234, .12);
  color: var(--gt-text); font: 700 15px/1 var(--outfit); cursor: pointer; transition: transform .26s var(--gt-ease); }
.gt-red { height: 48px; border: 0; border-radius: 18px; background: var(--gt-red); color: var(--si-ink); font: 800 15px/1 var(--outfit); cursor: pointer; transition: transform .26s var(--gt-ease); }
.gt-go:active, .gt-ghost:active, .gt-red:active, .gt-opt:active, .gt-sb-b:active { transform: scale(.97); transition-duration: .12s; }
.gt :focus-visible { outline: 3px solid var(--gt-red); outline-offset: 2px; }
.gt-err, .gt-hint { display: flex; align-items: center; gap: 8px; min-height: 16px; margin: -8px 0 0; font: 700 13px/1.2 var(--outfit); color: var(--gt-err); }
.gt-err i { flex: none; width: 8px; height: 8px; background: var(--gt-red); }
.gt-hint { min-height: 14px; margin-top: -6px; }
.gt-hint:empty { min-height: 0; margin: -10px 0 0; }

/* ---------------------------------------------------------------- sign-in */
.gt-sign { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; transition: opacity .32s ease-out, transform .32s ease-out; }
.gt-sign.leaving { opacity: 0; transform: translateY(12px); }
.gt-hero { flex: 1 1 auto; min-height: 120px; display: flex; align-items: flex-end; padding: 0 12px 22px 20px; pointer-events: none; }
.gt-word { margin: 0; color: var(--gt-text); text-transform: none; font: 800 100px/.9 var(--outfit); letter-spacing: -.045em; text-wrap: nowrap; }
.gt-sign[data-step="code"] .gt-word { font-size: 128px; }
.gt-w { display: block; }
.gt-panel { flex: none; border-radius: 28px 28px 0 0; padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); overflow: hidden; transition: height .45s var(--gt-ease); }
.gt-form { display: flex; flex-direction: column; gap: 18px; }
.gt-lead { margin: 0; font: 600 15px/1.35 var(--outfit); color: var(--gt-mute); }
.gt-lead b { color: var(--gt-text); font-weight: 800; }
.gt-link { padding: 0; border: 0; background: transparent; font: inherit; font-weight: 800; color: var(--gt-err); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gt-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 600 12px/1.35 var(--outfit); color: var(--gt-mute); }
.gt-foot a { display: flex; align-items: center; min-height: 44px; color: var(--gt-text); font-weight: 800; text-decoration: none; }
.gt-more { margin: -14px 0 0; font: 600 12px/1.5 var(--outfit); color: var(--gt-mute); }
.gt-more a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.gt-boxes { position: relative; display: block; height: 58px; }
.gt-bx { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; border-radius: 16px; }
.gt-bx span { display: grid; place-items: center; border-radius: 16px; background: var(--gt-field); box-shadow: var(--gt-field-edge); font: 600 26px/1 var(--code-mono); transition: box-shadow .15s ease-out; }
.gt-bx span.next { box-shadow: inset 0 0 0 2px var(--gt-red); }
.gt .gt-boxes input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0 !important; opacity: 0; font-size: 16px; color: transparent;
  caret-color: transparent; background: transparent !important; box-shadow: none !important; cursor: text; }
.gt-boxes:has(input:focus-visible) .gt-bx { outline: 3px solid var(--gt-red); outline-offset: 2px; }
.gt-note { margin: 0; font: 600 13px/1.35 var(--outfit); color: var(--gt-mute); }
.gt-resend { align-self: flex-start; min-height: 44px; margin-top: -6px; padding: 0; border: 0; background: transparent; font: 700 13px/1 var(--outfit); color: var(--gt-text); cursor: pointer; }
.gt-resend:disabled { color: var(--gt-mute); cursor: default; }
.gt-hello { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; min-height: 102px; }
.gt-hello b { font: 800 20px/1.2 var(--outfit); }
.gt-hello span { font: 600 14px/1.35 var(--outfit); color: var(--gt-mute); }

/* ---------------------------------------------------------------- onboarding */
.gt-ob { position: absolute; left: 0; right: 0; top: calc(66px + env(safe-area-inset-top)); bottom: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.gt-ob::-webkit-scrollbar { display: none; }
.gt-ob-in { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); }
.gt-sb { display: flex; flex-direction: column; gap: 3px; padding: 4px; border-radius: 26px; }
.gt-sb-row { display: flex; align-items: center; gap: 4px; }
.gt-sb-b { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: rgba(242, 239, 234, .05);
  color: var(--gt-text); text-align: left; cursor: pointer; transition: background-color .2s ease-out, transform .26s var(--gt-ease); }
.gt-sb-b.editing { background: rgba(232, 84, 56, .22); }
.gt-sb-n { font: 600 11px/1 var(--code-mono); color: var(--gt-red); }
.gt-sb-k { flex: none; width: 68px; font: 600 13px/1 var(--outfit); color: var(--gt-mute); }
.gt-sb-v { flex: 1; min-width: 0; font: 700 14px/1 var(--outfit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-sb-v.masked { font-family: var(--code-mono); color: #d8d2cb; letter-spacing: .02em; }
.gt-lock { flex: none; color: var(--gt-mute); }
.gt-eye { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: rgba(242, 239, 234, .06); color: var(--gt-text); cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }
.gt-eye[aria-pressed="true"] { background: rgba(232, 84, 56, .3); }
.gt-card { display: flex; flex-direction: column; gap: 16px; padding: 20px 18px 18px; border-radius: 28px; }
.gt-q-top { display: flex; align-items: center; justify-content: space-between; min-height: 26px; }
.gt-q-n { font: 600 12px/1 var(--code-mono); color: var(--gt-red); }
.gt-priv { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(242, 239, 234, .08); font: 700 11.5px/1 var(--outfit); }
.gt-priv .gt-lock { color: currentColor; width: 11px; height: 11px; }
.gt-q-h { display: flex; flex-direction: column; gap: 8px; }
.gt-q-h h2 { margin: 0; color: var(--gt-text); text-transform: none; font: 800 30px/1.02 var(--outfit); letter-spacing: -.03em; outline: none; }
.gt .gt-q-h h2:focus, .gt .gt-q-h h2:focus-visible { outline: none; } /* focus lands here after Continue; it's not a control */
.gt-q-h p { margin: 0; font: 500 14px/1.4 var(--outfit); color: var(--gt-mute); }
.gt-col { display: flex; flex-direction: column; gap: 8px; }
.gt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gt-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gt-opt { border: 0; cursor: pointer; color: var(--gt-text); background: var(--gt-opt); box-shadow: var(--gt-opt-edge); text-align: left; font-family: var(--outfit);
  transition: background-color .22s ease-out, color .22s ease-out, transform .26s var(--gt-ease); }
.gt-opt[aria-checked="true"], .gt-opt[aria-pressed="true"] { background: var(--gt-red); color: var(--si-ink); box-shadow: none; }
.gt-opt-t { display: flex; flex-direction: column; gap: 4px; }
.gt-opt-t b { font: 800 16px/1.05 var(--outfit); }
.gt-opt-t small { font: 600 12px/1.3 var(--outfit); opacity: .75; }
.gt-goal { display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 12px; border-radius: 22px; }
.gt-goal .gt-opt-t { padding: 0 6px; }
.gt-art { display: block; width: 100%; aspect-ratio: 150 / 104; border-radius: 15px; overflow: hidden; background: rgba(242, 239, 234, .05); }
.gt-goal[aria-checked="true"] .gt-art { background: rgba(20, 20, 20, .1); }
.gt-dots { display: block; width: 100%; height: 100%; fill: #cfc9c2; }
.gt-goal[aria-checked="true"] .gt-dots { fill: var(--si-ink); }
.gt-level { display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 12px 16px; border-radius: 20px; }
.gt-bars { display: flex; align-items: flex-end; gap: 3px; height: 22px; flex: none; }
.gt-bars i { width: 5px; border-radius: 2px; background: currentColor; }
.gt-dob { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gt-dob-row { display: grid; grid-template-columns: .9fr 1.5fr 1.1fr; gap: 8px; }
.gt-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 8px 18px; border-radius: 18px; background: rgba(242, 239, 234, .06); }
.gt-info > span { font: 600 13px/1.3 var(--outfit); color: var(--gt-mute); }
.gt-info > b { font: 800 20px/1 var(--outfit); text-align: right; }
.gt-info > b.bad { color: var(--gt-err); font-size: 16px; }
#gt-dsum > b { font-size: 18px; text-align: left; white-space: nowrap; }
#gt-dsum > span { font-size: 12.5px; text-align: right; max-width: 170px; }
.gt-body { gap: 14px; }
.gt-units { display: flex; gap: 4px; width: max-content; padding: 4px; border-radius: 999px; background: rgba(242, 239, 234, .07); }
.gt-units button { height: 36px; min-width: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--gt-text); font: 700 13px/1 var(--outfit); cursor: pointer; transition: background-color .2s, color .2s; }
.gt-units [aria-checked="true"] { background: var(--gt-text); color: var(--si-ink); }
.gt-slide { display: flex; flex-direction: column; gap: 6px; }
.gt-slide-h { display: flex; justify-content: space-between; align-items: baseline; }
.gt-slide-h b { font: 800 22px/1 var(--outfit); }
.gt .gt-slide input[type="range"] { width: 100%; height: 28px; margin: 0; padding: 0; accent-color: var(--gt-red); background: transparent !important; box-shadow: none !important; }
.gt-days { display: flex; justify-content: space-between; gap: 4px; }
.gt-day { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; font: 800 14px/1 var(--outfit); text-align: center; }
.gt-equip { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; height: 118px; padding: 12px; border-radius: 22px; }
.gt-equip b { font: 800 15px/1.05 var(--outfit); }
.gt-banner { border-radius: 20px; overflow: hidden; background: rgba(242, 239, 234, .05); }
.gt-banner .gt-dots { height: auto; aspect-ratio: 326 / 150; fill: var(--gt-red); }
.gt-privacy { margin: 0; font: 500 13.5px/1.45 var(--outfit); color: var(--gt-mute); }
.gt-row { display: flex; align-items: center; gap: 10px; }
.gt-fill { flex: 1; }
.gt-leave { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 20px; background: rgba(242, 239, 234, .06); }
.gt-leave > span { font: 700 14px/1.35 var(--outfit); }
.gt-leave .gt-row > * { flex: 1; height: 48px; }

/* motion: sign-in headline and panel content, card entrance (rise 28, scale .98), options staggered 70 ms, new row */
@keyframes gtRise { from { opacity: 0; transform: translateY(24px); } }
@keyframes gtIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes gtCard { from { opacity: 0; transform: translateY(28px) scale(.98); } }
@keyframes gtRow { from { opacity: 0; transform: translateY(-8px); } }
.gt:not(.still) .gt-w { animation: gtRise .8s .35s var(--gt-ease) backwards; }
.gt:not(.still) .gt-w-code, .gt:not(.still) .gt-w-hello { animation-delay: 0s; }
.gt:not(.still) .gt-pstep > * { animation: gtIn .6s var(--gt-ease) backwards; }
.gt:not(.still) .gt-card { animation: gtCard .65s var(--gt-ease) backwards; }
.gt:not(.still) .gt-card .gt-opt { animation: gtIn .5s calc(120ms + var(--i, 0) * 70ms) var(--gt-ease) backwards; }
.gt:not(.still) .gt-sb-row.fresh { animation: gtRow .5s var(--gt-ease) backwards; }
.gt.still *, .gt.still .gt-panel { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .gt *, .gt-panel { animation: none !important; transition: none !important; } }
@media (max-width: 360px) { .gt-word { font-size: 84px; } .gt-sign[data-step="code"] .gt-word { font-size: 108px; } .gt-q-h h2 { font-size: 26px; } }

/* ---------------------------------------------------------------- Home (1b): six small changes */
body[data-route="home"] main { --sans: var(--outfit); --disp: var(--outfit); --mono: var(--outfit);
  font-family: var(--outfit); padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.today-list a { grid-template-columns: 22px minmax(0, 1fr) auto; }
.today-n { font: 700 12px/1 var(--code-mono); font-style: normal; color: #F0563C; letter-spacing: .02em; }
.today-h h1#todayh { font: 800 38px/.95 var(--outfit); letter-spacing: -.03em; }
.today-sq { display: inline-block; width: 9px; height: 9px; margin: 0 2px .14em; background: currentColor; vertical-align: middle; }
.home-cal .cal { gap: 5px; }
.home-cal .cal-day { aspect-ratio: 1; min-height: 0; border: 0; border-radius: 6px !important; outline: 0; }
.home-cal .cal-day em { font-size: 7.5px; }
.home-cal .cal-day.planned { background: color-mix(in srgb, var(--sig-ground) 16%, var(--tile)); color: var(--sig); box-shadow: inset 0 0 0 2px var(--sig-ground); }
.home-cal .cal-day.today { outline: 0; box-shadow: inset 0 0 0 2.5px var(--text); }
.home-cal .legend .sw { border-radius: 0; }
.home-cal .legend .sw.main { background: var(--sig-ground); }
.home-cal .legend .sw.planned { background: color-mix(in srgb, var(--sig-ground) 16%, var(--tile)); box-shadow: inset 0 0 0 2px var(--sig-ground); }
.home-cal .legend .sw.today { background: transparent; box-shadow: inset 0 0 0 2px var(--text); }
.home-cal .legend .sw.renew { border-radius: 50%; }
.slide { touch-action: none; cursor: grab; }
.slide.dragging { cursor: grabbing; }
.slide:focus-visible { outline: 3px solid var(--si-ink); outline-offset: 2px; }
.slide-knob { pointer-events: none; }
