:root {
  --bg: #101410;
  --surface: #171d19;
  --raised: #222a24;
  --fg: #f3f6f1;
  --muted: #93a197;
  --line: #313b34;
  --lime: #4ade5a;
  --lime-hi: #7be86a;
  --lime-hover: #63e570;
  --lime-press: #38c449;
  --brand-yellow: #e8f53a;
  --brand-grad: linear-gradient(135deg, #4ade5a 0%, #e8f53a 100%);
  --brand-grad-hover: linear-gradient(135deg, #5ce86b 0%, #f1fa5c 100%);
  --brand-grad-press: linear-gradient(135deg, #3cc94c 0%, #d4e12c 100%);
  --brand-glow: 0 6px 22px rgba(74,222,90,.22), 0 2px 10px rgba(232,245,58,.14);
  --brand-glow-hover: 0 8px 28px rgba(74,222,90,.3), 0 3px 14px rgba(232,245,58,.22);
  --ink: #04210b;
  --ember: #ff5c38;
  --teal: #2dd4bf;
  --orange: #fb923c;
  --violet: #a78bfa;
  --sky: #38bdf8;
  --teal-tint: rgba(45,212,191,.12);
  --orange-tint: rgba(251,146,60,.12);
  --violet-tint: rgba(167,139,250,.12);
  --sky-tint: rgba(56,189,248,.12);
  --lime-tint: rgba(74,222,90,.12);
  --sans: "Familjen Grotesk", ui-sans-serif, system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  overflow-x: clip;
}
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
::selection { background: var(--lime); color: var(--ink); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.mark {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.wrap { width: min(64rem, calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { width: min(36rem, 100%); margin-inline: auto; padding: 1.5rem 1rem calc(6.5rem + env(safe-area-inset-bottom)); }
.muted { color: var(--muted); }
.lime { color: var(--lime); }
.tabular { font-variant-numeric: tabular-nums; }
.kicker { font-size: 0.875rem; font-weight: 500; letter-spacing: 0.06em; color: var(--lime); }

.btn {
  display: inline-grid;
  place-items: center;
  height: 3rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--lime) linear-gradient(135deg, var(--lime), var(--lime-hi));
  box-shadow: 0 6px 20px rgba(74,222,90,.18);
  transition: background-color .15s, box-shadow .15s, transform .1s;
  color: var(--ink);
  font-weight: 650;
}
.btn:not(.ghost):not(:disabled):hover { background: var(--lime-hover) linear-gradient(135deg, var(--lime-hover), var(--lime-hi)); box-shadow: 0 8px 26px rgba(74,222,90,.26); }
.btn:not(.ghost):not(:disabled):active { background: var(--lime-press); box-shadow: 0 2px 10px rgba(74,222,90,.2); transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--lime-hi); outline-offset: 3px; }
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.small { height: 2.75rem; padding: 0 1rem; font-size: 0.95rem; }
.btn:disabled { opacity: 0.45; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.hero {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 4rem;
}
.hero h1 {
  margin-top: 0.75rem;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 4.2rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 0.92;
}
.lede { margin-top: 1rem; max-width: 28rem; font-size: 1.125rem; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.points {
  display: grid;
  gap: 1rem;
  padding-bottom: 4rem;
}
.card, .pad, .panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 1.5rem;
}
.card { padding: 1.25rem; }
.card h2, .panel h2 { margin-top: 0.75rem; font-size: 1.125rem; }
.card p, .panel p { margin-top: 0.5rem; color: var(--muted); font-size: 0.925rem; }
.icon { width: 22px; height: 22px; color: var(--lime); }

.shell {
  display: grid;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
}
.side {
  display: none;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.page-head h1 {
  flex: 1;
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}
.linkish {
  background: none;
  border: 0;
  color: var(--lime);
  padding: 0;
  font-size: 0.925rem;
}

.daybar, .split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.pager { display: flex; gap: 0.5rem; }
.pager button, .iconbtn {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: var(--raised);
  font-size: 1.4rem;
}
.pager button:disabled { opacity: 0.3; }

.streak-num {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--ember);
}

.field { display: block; margin: 0.85rem 0; color: var(--muted); font-size: 0.925rem; }
.field input, .field select, .field textarea, .inline input {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
  height: 3rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 0.9rem;
  font-size: 16px;
  line-height: 1.2;
}
.field input[type="date"] {
  min-width: 0;
}
.field input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
  min-height: 1.5em;
  line-height: 1.2;
}
.field textarea { height: 5.5rem; padding: 0.75rem 0.9rem; resize: vertical; line-height: 1.4; }
.field textarea.code {
  height: 8.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.35;
}
.badge-pick { margin: 0.35rem 0 0.85rem; }
.badge-pick .badge-mark { margin: 0; }
.inline { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.inline input { margin-top: 0; }

.stack { display: grid; gap: 0.75rem; }
.pad { padding: 1rem; }
.pad.met { border-color: color-mix(in srgb, var(--lime) 60%, transparent); }
.pad-top, .pad-mid, .steps { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.pad-top { align-items: flex-start; }
.pad h2 { font-size: 1.125rem; line-height: 1.2; }
.bar { height: 6px; margin-top: 0.75rem; border-radius: 999px; background: var(--raised); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--lime); border-radius: 999px; }
.pad-mid { align-items: flex-end; margin-top: 1rem; }
.count {
  font-family: var(--display);
  font-size: 3.6rem;
  font-weight: 600;
  line-height: 0.85;
}
.add {
  width: 5rem;
  height: 4rem;
  border: 0;
  border-radius: 1rem;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 600;
}
.add:active { transform: scale(0.95); }
.steps { flex-wrap: wrap; margin-top: 1rem; }
.chip {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--raised);
  color: var(--muted);
  line-height: 1;
}
.chip.on { background: var(--lime); color: var(--ink); }
.undo { margin-left: auto; background: none; border: 0; color: var(--muted); height: 2.75rem; }
.undo:disabled { opacity: 0.4; }
.chip.danger { color: var(--ember); }
.rowactions { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; align-items: center; }
.editrow { display: block; }
.editrow form { width: 100%; }
.sets { list-style: none; margin: 0.85rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.sets li { display: flex; align-items: center; justify-content: space-between; min-height: 2.25rem; color: var(--muted); }
.sets .tabular { color: var(--fg); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.dashed { border-style: dashed; padding: 1rem; }
.note {
  display: block;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.925rem;
}
.done { color: var(--lime); font-size: 0.925rem; }

.back {
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 2.2rem;
  line-height: 0.8;
  padding: 0 0.2rem 0.15rem 0;
}
.tabs {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  height: 4rem;
  color: var(--muted);
  font-size: 0.68rem;
}
.tabs a.on { color: var(--lime); }
.tabs svg { width: 20px; height: 20px; }

.list { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.list a, .rowitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--surface);
}
.restline { margin: 0 0 1rem; }
.restline .chip { margin-bottom: 0.35rem; }
.routine-bar {
  display: flex;
  align-items: flex-end;
  gap: .6rem;
  margin-bottom: 1rem;
}
.routine-bar .field { flex: 1; margin-bottom: 0; }
.routine-bar p { margin: 0; flex: 1; }
.routine-bar.center { align-items: center; }
.routine-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}
.routine-btn .lock { margin-left: 0; }
.checkline { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.7rem; font-size: 0.9rem; }
.weekgoals { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; margin-top: 0.55rem; }
.weekgoals label { display: grid; gap: 0.2rem; color: var(--muted); font-size: 0.68rem; }
.weekgoals input { width: 100%; padding: 0.4rem 0.2rem; text-align: center; font-size: 1rem; }
.rowitem .rowlink {
  display: block;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
.rowitem.has-howto { flex-wrap: wrap; }
.rowitem.has-howto > .howto { flex: 0 0 100%; margin-top: 0.25rem; }
.tag {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--raised);
  color: var(--lime);
  font-size: 0.75rem;
  font-weight: 650;
}
.list a.premium-row {
  border-color: color-mix(in srgb, var(--ember) 70%, var(--line));
  background: color-mix(in srgb, var(--ember) 12%, var(--surface));
}
.tag.daily { color: var(--muted); }
.tag.race { background: var(--lime); color: var(--ink); }
.tag.premium { background: var(--ember); color: #1a0804; }
.card.pro { margin-top: 1.25rem; border-color: color-mix(in srgb, var(--ember) 65%, var(--line)); }
.card.pro h2 { margin-top: 0; }
.card.pro ul { margin: 0.85rem 0 0; padding-left: 1.15rem; color: var(--muted); }
.card.pro .btn { margin-top: 1.15rem; }
.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.segment .chip { width: 100%; }
form .custom-name { display: none; }
form .custom-category { display: none; }
form.custom-category .custom-category { display: block; }
form.weeks-2 .week-late { display: none; }
.move-block { margin: 0.5rem 0 1rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }
.move-block.custom-exercise .custom-name { display: block; }
.move-week[hidden] { display: none !important; }
.day-block { margin: 0.85rem 0 1rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }
.day-block h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.today-strip { margin-bottom: 1rem; }
.today-strip-title {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.strip-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
}
a.strip-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.8rem;
  color: inherit;
  text-decoration: none;
}
.strip-list > a.strip-row + a.strip-row { border-top: 1px solid var(--line); }
.strip-main { min-width: 0; }
.strip-main b {
  display: block;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strip-main b { display: flex; align-items: center; gap: 0.4rem; }
.strip-main .strip-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-main .strip-icon { display: inline-flex; flex: none; width: 17px; height: 17px; color: var(--lime); }
.strip-main .strip-icon .icon { width: 17px; height: 17px; margin: 0; }
.strip-main > span {
  padding-left: calc(17px + 0.4rem);
  display: block;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.strip-side {
  align-self: center;
  text-align: right;
  font-size: 0.82rem;
  line-height: 1.15;
  white-space: nowrap;
}
.strip-done {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 650;
  line-height: 1.3;
  vertical-align: middle;
}
.strip-row.met .strip-side .tabular {
  font-size: 0.72rem;
  vertical-align: middle;
}
.strip-bar {
  grid-column: 1 / -1;
  height: 3px;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: var(--raised);
  overflow: hidden;
}
.strip-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lime);
}
.strip-row.met .strip-bar span { background: var(--lime); }
.strip-empty {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.strip-empty:hover { text-decoration: underline; }
.cue { margin: 0.35rem 0 0; max-width: 36rem; color: var(--muted); font-size: 0.92rem; line-height: 1.35; }
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0.75rem 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
}
.toggle b { display: block; }
.toggle .muted { display: block; margin-top: 0.15rem; }
.toggle input,
.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: #2c2c2c;
  border: 0;
  position: relative;
  flex: none;
  margin: 0;
}
.toggle .switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
}
.switch i,
.toggle input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.switch.on,
.toggle input:checked,
.toggle .switch:has(input:checked) { background: var(--lime); }
.switch.on i,
.toggle input:checked::before,
.toggle .switch:has(input:checked) i { transform: translateX(20px); }
.day-block .move-block { border-top: 0; margin-top: 0; padding-top: 0.35rem; }
form.custom-exercise .custom-name { display: block; }
form .kind-race { display: none; }
form.race .kind-daily { display: none; }
form.race .kind-race { display: block; }
.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.cal { margin-top: 0.25rem; }
.cal h3 { margin: 0.85rem 0 0.4rem; font-size: 1rem; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.04em; }
.cal-empty { aspect-ratio: 1; }
.cal-day {
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: var(--raised);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}
.cal-day b { font-size: 0.8rem; font-weight: 650; line-height: 1; }
.cal-day i { font-style: normal; font-size: 0.62rem; line-height: 1; color: var(--muted); }
.cal-day.l1 { background: #1d4425; }
.cal-day.l2 { background: #2c7638; }
.cal-day.l3 { background: #3bab4a; }
.cal-day.l3 b, .cal-day.l3 i, .cal-day.l4 b, .cal-day.l4 i { color: var(--ink); }
.cal-day.l4 { background: var(--lime); }
.cal-day.out { background: transparent; color: var(--muted); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--lime); }
.year-list { display: grid; gap: 0.45rem; }
.month-block { border: 1px solid var(--line); border-radius: 1.15rem; background: var(--surface); overflow: hidden; }
.month-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 0;
  background: transparent;
  text-align: left;
}
.month-row b { font-size: 1.05rem; font-weight: 650; }
.month-block.open .month-row { border-bottom: 1px solid var(--line); }
.month-block .cal { padding: 0.75rem 0.65rem 0.9rem; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1.25rem; }
.stats-row.quad { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.monthbars { display: grid; gap: 0.45rem; }
.barrow { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 0.55rem; align-items: center; font-size: 0.925rem; }
.bartrack { height: 8px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.bartrack span { display: block; height: 100%; background: var(--lime); border-radius: 999px; }
.chip.lock { opacity: 0.45; }
.stat {
  padding: 0.85rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 600;
}
.plans { display: grid; gap: 1rem; margin-top: 1.5rem; }
.plans article { padding: 1.25rem; }
.plans ul { margin: 1rem 0 0; padding-left: 1.1rem; }
.plans li { margin: 0.35rem 0; }
.pro { border-color: var(--lime); }
.fine { margin-top: 1.25rem; color: var(--muted); font-size: 0.85rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 5.2rem;
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  padding: 0.7rem 0.8rem 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.err { color: var(--ember); font-size: 0.925rem; }

.pop { animation: pop 180ms ease-out; }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .pop { animation: none; }
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; padding-top: 1.5rem; }
  .points { grid-template-columns: repeat(3, 1fr); }
  .shell { grid-template-columns: 220px minmax(0, 1fr); width: min(64rem, 100%); margin-inline: auto; }
  .side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 4;
    height: 100dvh;
    padding: 2rem 1.25rem;
    border-right: 1px solid var(--line);
    background: var(--bg);
  }
  .side nav { display: flex; flex-direction: column; gap: 0.25rem; }
  .side a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 3rem;
    padding: 0 0.75rem;
    border-radius: 1rem;
    color: var(--muted);
  }
  .side a.on { background: var(--raised); color: var(--lime); }
  .side svg { width: 20px; height: 20px; }
  .tabs { display: none; }
  .narrow { padding-bottom: 2.5rem; }
  .toast { bottom: 1.5rem; }
  .plans { grid-template-columns: 1fr 1fr; }
}
.badge-head {
  margin: 1.15rem 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
.badges.badge-solo { grid-template-columns: minmax(0, 9.5rem); margin: 0.85rem 0 1rem; }
.badge {
  padding: 0.7rem 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  text-align: center;
}
.badge-mark {
  width: 3.35rem;
  height: 3.35rem;
  margin: 0 auto 0.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 16%, transparent);
}
.badge-mark svg { width: 1.7rem; height: 1.7rem; display: block; }
.badge.streak .badge-mark svg { width: 2.45rem; height: 2.45rem; }
.badge b { display: block; font-size: 0.78rem; line-height: 1.2; }
.badge span { display: block; margin-top: 0.18rem; color: var(--muted); font-size: 0.68rem; line-height: 1.25; }
.badge.on { border-color: color-mix(in srgb, var(--lime) 70%, var(--line)); }
.badge.locked { background: transparent; }
.badge.locked .badge-mark { background: var(--raised); color: var(--muted); box-shadow: none; }
.badge.locked b { color: var(--muted); }
.badge.rare.on .badge-mark {
  background: linear-gradient(160deg, #b9f7c0, var(--lime) 42%, #2fb544);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 50%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--ink) 18%, transparent);
}

.howto {
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}
.challenge-howto { margin: 0.25rem 0 0.75rem; }
.challenge-howto .howto { border-top: 0; padding-top: 0; margin-top: 0; }
.howto-toggle {
  background: transparent;
  border: 0;
  color: var(--lime);
  font: inherit;
  font-weight: 600;
  font-size: 0.925rem;
  min-height: 2.75rem;
  padding: 0;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  cursor: pointer;
}
.howto.open .howto-caret { transform: rotate(180deg); }
.howto-steps {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.25rem;
  color: var(--fg);
  font-size: 0.925rem;
  line-height: 1.4;
}
.howto-steps li { margin: 0.25rem 0; }
.howto-line {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.howto-line b {
  color: var(--fg);
  font-weight: 600;
  margin-right: 0.25rem;
}
.howto-media[hidden] { display: none; }
.howto-media:not([hidden]) {
  background: var(--raised);
  border-radius: 0.85rem;
  padding: 0.5rem;
  margin: 0.15rem 0 0.75rem;
}
.howto-anim {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  aspect-ratio: 320 / 160;
}
.howto-anim .fig {
  fill: none;
  stroke: var(--fg);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.howto-anim .shin { stroke-width: 10; }
.howto-anim .thigh { stroke-width: 13; }
.howto-anim .torso { stroke-width: 26; }
.howto-anim .neck { stroke-width: 11; }
.howto-anim .upper { stroke-width: 10; }
.howto-anim .fore { stroke-width: 9; }
.howto-anim .arm-halo { fill: none; stroke: var(--raised); stroke-width: 15; stroke-linecap: round; }
.howto-anim .chest {
  fill: none;
  stroke: var(--lime);
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0.9;
}
.howto-anim .hand {
  fill: none;
  stroke: var(--lime);
  stroke-width: 6;
  stroke-linecap: round;
}
.howto-anim .foot { stroke-width: 7; }
.howto-anim .head { fill: var(--fg); stroke: none; }
.howto-anim .floor {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-linecap: round;
}
.howto-anim .guide {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.5;
  stroke-dasharray: 4 3.5;
  stroke-linecap: round;
  opacity: 0.85;
}
.howto-anim .cue {
  font-size: 11px;
  fill: var(--muted);
  font-family: var(--sans);
}
.howto-anim .cue.on { fill: var(--lime); }
.howto-anim .cue-arc { fill: none; stroke: var(--lime); stroke-width: 1.6; stroke-dasharray: 4 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.howto-anim .dbell rect { fill: var(--muted); stroke: var(--bg, #111); stroke-width: 1; }
.howto-anim .band { stroke: var(--orange, #ff8a3d); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.howto-anim .band.mini { stroke-width: 4; }
.howto-anim .kbell .kb-body { fill: var(--muted); stroke: var(--bg, #111); stroke-width: 1; }
.howto-anim .kbell .kb-handle { fill: none; stroke: var(--muted); stroke-width: 2.4; }
.howto-anim .bbell .bb-plate { fill: var(--muted); stroke: var(--bg, #111); stroke-width: 1.3; }
.howto-anim .bbell .bb-ring { fill: none; stroke: var(--bg, #111); stroke-width: 1.15; }
.howto-anim .bbell .bb-bar { fill: var(--fg, #eee); stroke: var(--bg, #111); stroke-width: 0.8; }
.howto-anim .bbell .bb-hub { fill: var(--bg, #111); stroke: none; }
.howto-anim .sball { fill: var(--muted); stroke: var(--bg, #111); stroke-width: 1.6; }
.howto-anim.sq { aspect-ratio: 320 / 190; }
.howto-anim.bp { aspect-ratio: 320 / 270; }
.howto-anim.bp.bp-still { aspect-ratio: 320 / 140.8; }
.howto-anim.sq .sq-stub { stroke-width: 7; }
.howto-anim.sq .sq-shin { stroke-width: 7.5; }
.howto-anim.sq .sq-thigh { stroke-width: 10; }
.howto-anim.sq .sq-torso { stroke-width: 19; }
.howto-anim.sq .sq-neck { stroke-width: 8; }
.howto-anim.sq .sq-halo { stroke-width: 11; }
.howto-anim.sq .sq-upper { stroke-width: 7.5; }
.howto-anim.sq .sq-fore { stroke-width: 7; }
.howto-anim.sq .sq-hand { stroke-width: 6; }
.howto-anim.sq .sq-foot {
  fill: none;
  stroke: var(--lime);
  stroke-width: 6;
  stroke-linecap: round;
}
.howto-anim.sq .sq-quad,
.howto-anim.sq .sq-glute {
  fill: none;
  stroke: var(--lime);
  stroke-linecap: round;
  opacity: 0.9;
}
.howto-anim.sq .sq-quad { stroke-width: 5; }
.howto-anim.sq .sq-glute { stroke-width: 6; }
.howto-anim.lg .lg-far { stroke: var(--muted); }
.howto-anim.lg .sq-foot.lg-far { stroke: var(--lime); opacity: .55; }
.howto-anim.su { aspect-ratio: 320 / 140; }
.howto-anim.cr { aspect-ratio: 320 / 140; }
.howto-anim.hg { aspect-ratio: 320 / 260; }
.howto-anim.hg .hg-foot { stroke: var(--fg); }
.howto-anim.hg .lg-far { stroke: var(--muted); }
.howto-anim.hg .hg-hand {
  fill: none;
  stroke: var(--lime);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.howto-anim.hg .hg-bar { fill: var(--muted); stroke: none; }
.howto-anim.hg .hg-rig {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.howto-anim.hg .hg-grip {
  font-size: 9.5px;
  fill: var(--muted);
  font-family: var(--sans);
}
.howto-anim.hg .hg-tip { fill: var(--lime); stroke: none; }
.howto-anim.jj { aspect-ratio: 320 / 240; }
.howto-anim.pk { aspect-ratio: 320 / 100; }
.howto-anim.pk .pk-core,
.howto-anim.pk .pk-core-halo {
  fill: none;
  stroke: var(--lime);
  stroke-linecap: round;
}
.howto-anim.pk .pk-core { stroke-width: 7; }
.howto-anim.pk .pk-core-halo { stroke-width: 16; opacity: 0.22; }

.pad-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  margin-top: 0.75rem;
}
.pad-links .inline { margin-top: 0; }
.pad-links .linkish { display: inline-flex; align-items: center; }
.lock {
  width: 0.85rem;
  height: 0.85rem;
  margin-left: 0.3rem;
  flex: none;
}
.quick-edit { margin-top: 1rem; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.quick-field > input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 2.75rem;
  margin: 0;
  padding: 0 0.15rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--raised);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none;
  appearance: none;
}
.quick-def {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.1;
  text-align: center;
}
.quick-def input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--lime);
}
.quick-edit .err { margin: 0.65rem 0 0; }
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.65rem;
  margin-top: 0.85rem;
}
.upsell {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80; /* above sheets (61), dialogs (60) and the drag ghost (70) */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.upsell-back {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(8, 12, 8, 0.62);
}
.upsell-card {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-width: 28rem;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 1.5rem 1.5rem 0 0;
  background: var(--surface);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.4);
  padding: 1.25rem calc(1.25rem + env(safe-area-inset-right)) calc(1.25rem + env(safe-area-inset-bottom)) calc(1.25rem + env(safe-area-inset-left));
}
.upsell-card h2 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
}
.upsell-card p {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.upsell-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.upsell-chips .chip { pointer-events: none; }
.upsell-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.setup {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(30rem, 100%);
  max-width: 30rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}
.setup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.setup-top .linkish,
.setup-actions .linkish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 0.35rem;
}
.setup-main { flex: 1 1 auto; min-width: 0; padding-bottom: 0.5rem; }
.setup-progress {
  border-radius: 999px;
  background: var(--raised);
  overflow: hidden;
}
.setup-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lime);
}
.setup-title {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0.5rem 0 1rem;
  overflow-wrap: break-word;
}
.setup-hero {
  font-family: var(--display);
  font-size: 3.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 0.92;
  margin: 0.85rem 0 1rem;
  overflow-wrap: break-word;
}
.setup-pitch {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.35;
}
.setup-options {
  display: grid;
  gap: 0.6rem;
}
.setup-option {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  color: var(--fg);
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}
.setup-option b {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.setup-option span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  line-height: 1.35;
}
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.setup-grid > * { min-width: 0; }
.setup-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.2rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  overflow: hidden;
}
.setup-tile[aria-pressed="true"],
.setup-tile.on {
  border-color: var(--lime);
}
.setup-tile > button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3.2rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  -webkit-appearance: none;
  appearance: none;
}
.setup-goal {
  display: block;
  margin: 0;
  padding: 0 0.75rem 0.7rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}
.setup-tile input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 2.75rem;
  margin-top: 0.35rem;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
}
.setup-more { margin-top: 0.75rem; }
.setup-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.85rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, rgba(16, 20, 16, 0));
}
.setup-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.setup-action-row .btn { flex: 1; }
.setup-action-row.solo .btn,
.setup-actions.solo .btn { width: 100%; }
.setup-action-row.stack {
  flex-direction: column;
  align-items: stretch;
}
.setup-action-row.stack .linkish { align-self: flex-start; }
.setup-action-row.stack .btn { width: 100%; }
.setup .field input[type="time"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.setup-perks {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}
.setup-perks li { margin: 0.45rem 0; }
.setup-save-note {
  margin: 0.5rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--lime);
  border-radius: 1rem;
  color: var(--fg);
  font-size: 0.95rem;
}
.suggest-card {
  position: relative;
  margin: 0 0 1rem;
  padding-right: 3.2rem;
  border-color: var(--lime);
}
.suggest-card h2 { margin-top: 0.35rem; }
.suggest-kicker {
  color: var(--muted);
  font-size: 0.8rem;
}
.suggest-dismiss {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}
.suggest-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
}
.suggest-card .lock { margin-left: 0; }
.backup-nudge {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.85rem 3.1rem 0.85rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.backup-nudge .backup-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  background: var(--acc-tint, var(--sky-tint));
  color: var(--acc, var(--sky));
}
.backup-nudge .backup-ico .icon {
  width: 22px;
  height: 22px;
  margin: 0;
  color: var(--acc, var(--sky));
}
.backup-nudge b {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}
.backup-nudge p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.backup-nudge .btn { margin-top: 0.75rem; }
.backup-dismiss {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}
.account-lock .lock {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0 0 0.35rem;
  color: var(--sky);
}
.account-lock .btn { margin-top: 1rem; }
.you-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  margin-top: 1.5rem;
}
.you-links .linkish {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
}
.setup-action-row.stack .btn { flex: none; }
.setup h1[tabindex="-1"]:focus { outline: none; }

/* Onboarding v2
   Mobile-first at 390px. --acc / --acc-tint come from .accent-* on the
   control or an ancestor. Overrides earlier .setup-option and
   .setup-progress rules. Tap targets are at least 44px. */

.accent-teal { --acc: var(--teal); --acc-tint: var(--teal-tint); --acc-fill: rgba(45, 212, 191, .2); }
.accent-orange { --acc: var(--orange); --acc-tint: var(--orange-tint); --acc-fill: rgba(251, 146, 60, .2); }
.accent-violet { --acc: var(--violet); --acc-tint: var(--violet-tint); --acc-fill: rgba(167, 139, 250, .2); }
.accent-sky { --acc: var(--sky); --acc-tint: var(--sky-tint); --acc-fill: rgba(56, 189, 248, .2); }
.accent-lime { --acc: var(--lime); --acc-tint: var(--lime-tint); --acc-fill: rgba(74, 222, 90, .2); }

.setup-logo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 2.5rem auto 1.5rem;
  border-radius: 24px;
  object-fit: cover;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 18px 60px var(--lime-tint);
}
.setup-main.center,
.setup-main:has(> .setup-logo) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  text-align: center;
}
.setup-main.center .setup-hero,
.setup-main:has(> .setup-logo) .setup-hero {
  width: 100%;
  max-width: 100%;
  font-size: 2.9rem;
}
.setup-main.center .setup-pitch,
.setup-main:has(> .setup-logo) .setup-pitch {
  width: 100%;
  max-width: 22rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.setup-option {
  position: relative;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  min-height: 4.5rem;
  padding: 1rem 1.05rem;
  border-width: 2px;
  color: var(--fg);
  opacity: 1;
}
/* Without .setup-opt-text, stack the title and copy beside the icon. */
.setup-option:not(:has(.setup-opt-text)) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.9rem;
  row-gap: 0.2rem;
  align-items: start;
}
.setup-option:not(:has(.setup-opt-text)) > .setup-ico {
  grid-row: 1 / span 2;
}
.setup-option:not(:has(.setup-opt-text)) > b {
  grid-column: 2;
  grid-row: 1;
}
.setup-option:not(:has(.setup-opt-text)) > span:not(.setup-ico) {
  grid-column: 2;
  grid-row: 2;
}
.setup-option:not(:has(.setup-ico)):not(:has(.setup-opt-text)) {
  display: block;
}
.setup-option .setup-ico,
.tour-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  border-radius: 0.9rem;
  background: var(--acc-tint, var(--lime-tint));
  color: var(--acc, var(--lime));
  font-size: 1rem;
  line-height: 1;
}
.setup-option .setup-ico .icon,
.tour-ico .icon {
  width: 24px;
  height: 24px;
  margin: 0;
  color: var(--acc, var(--lime));
}
.setup-opt-text,
.setup-option > b,
.setup-option > span:not(.setup-ico):not(.setup-opt-text) {
  min-width: 0;
  padding-right: 1.15rem;
}
.setup-opt-text {
  display: grid;
  flex: 1;
  gap: 0.2rem;
  color: var(--fg);
  opacity: 1;
}
.setup-opt-text b,
.setup-option > b {
  min-width: 0;
  color: var(--fg);
  opacity: 1;
  font-size: 1.02rem;
  overflow-wrap: break-word;
}
.setup-opt-text span,
.setup-option > span:not(.setup-ico):not(.setup-opt-text) {
  min-width: 0;
  margin-top: 0;
  color: var(--muted);
  opacity: 1;
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: break-word;
}
.setup-option[aria-checked="true"] {
  border: 2px solid var(--acc, var(--lime));
  background-color: var(--surface);
  background-image: linear-gradient(var(--acc-fill, rgba(74, 222, 90, .2)), var(--acc-fill, rgba(74, 222, 90, .2)));
  color: var(--fg);
  opacity: 1;
}
.setup-option[aria-checked="true"] .setup-opt-text,
.setup-option[aria-checked="true"] .setup-opt-text b,
.setup-option[aria-checked="true"] > b {
  color: var(--fg);
  opacity: 1;
}
.setup-option[aria-checked="true"] .setup-opt-text span,
.setup-option[aria-checked="true"] > span:not(.setup-ico):not(.setup-opt-text) {
  color: rgba(255, 255, 255, .82);
  opacity: 1;
}
.setup-option[aria-checked="true"] .setup-ico {
  background: var(--acc, var(--lime));
  color: var(--ink);
  opacity: 1;
}
.setup-option[aria-checked="true"] .setup-ico .icon {
  color: var(--ink);
}
.setup-option[aria-checked="true"]::after {
  content: "";
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--lime);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2 5.9 9.55 10.6 4.6' fill='none' stroke='%23152000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  pointer-events: none;
}

.setup-equip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
  max-width: 100%;
}
.setup-eq {
  position: relative;
  min-width: 0;
}
.setup-eq button,
button.setup-eq {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 6.5rem;
  margin: 0;
  padding: 0.7rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: break-word;
  -webkit-appearance: none;
  appearance: none;
}
.eq-icon {
  flex: none;
  width: 40px;
  height: 40px;
  color: var(--muted);
}
@media (max-width: 379px) {
  .eq-icon { width: 36px; height: 36px; }
}
button.setup-eq > span,
.setup-eq button > span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}
.setup-eq button[aria-pressed="true"],
button.setup-eq[aria-pressed="true"] {
  border-color: var(--acc, var(--lime));
  background: linear-gradient(var(--acc-tint, var(--lime-tint)), var(--acc-tint, var(--lime-tint))), var(--surface);
}
.setup-eq button[aria-pressed="true"] .eq-icon,
button.setup-eq[aria-pressed="true"] .eq-icon {
  color: var(--acc, var(--lime));
}
.setup-eq button[aria-pressed="true"]::after,
button.setup-eq[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acc, var(--lime));
  pointer-events: none;
}
.setup-rec {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  z-index: 1;
  max-width: calc(100% - 1.4rem);
  transform: translateX(-50%);
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: visible;
  pointer-events: none;
}
/* The pill is absolute, so top padding pushes the icon clear of it.
   A wrapper keeps that padding on the inner button only. */
.setup-eq.has-rec {
  padding-top: 1.4rem;
}
.setup-eq.has-rec:not(button) {
  padding-top: 0;
}
button.setup-eq.has-rec,
button.setup-eq:has(.setup-rec),
.setup-eq.has-rec button,
.setup-eq:has(.setup-rec) > button {
  padding-top: 1.4rem;
}
button.setup-eq.has-rec[aria-pressed="true"]::after {
  top: auto;
  bottom: 0.45rem;
}

.setup-progress {
  height: 6px;
  margin: 0.85rem 0 0.65rem;
}
.setup-progress > span {
  background: linear-gradient(to right, var(--lime), var(--teal));
  transition: width 0.35s ease;
}

.setup-bell-wrap {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  margin: 1.5rem auto 1.25rem;
  border-radius: 50%;
  background: var(--sky-tint);
  color: var(--sky);
  box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.06);
}
.setup-bell,
.setup-bell-wrap .icon {
  width: 40px;
  height: 40px;
  color: var(--sky);
}
.setup-notify-title {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: break-word;
}
.setup-notify-copy {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
  text-align: center;
}

/* Pro step fills the viewport as a column. Main takes the leftover
   space and scrolls only if the plans cannot fit. Actions stay in
   flow so they cannot cover the plan cards. */
.setup-pro {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding-top: 0.85rem;
}
.setup-pro .setup-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.setup-pro .setup-actions {
  position: static;
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 0.55rem;
  background: var(--bg);
}
.pro-ad {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.pro-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--raised);
  color: var(--muted);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}
.pro-close .icon {
  width: 20px;
  height: 20px;
  color: inherit;
}
.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: calc(100% - 3rem);
  margin: 0 0 0.1rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.pro-badge .icon {
  width: 14px;
  height: 14px;
  color: var(--ink);
}
.pro-title {
  max-width: calc(100% - 3rem);
  margin: 0.3rem 0 0.15rem;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.6vh, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 0.95;
  overflow-wrap: break-word;
}
.pro-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
}
.pro-perks {
  list-style: none;
  margin: 0.45rem 0 0.3rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.pro-perks li {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.2;
}
.pro-perks li > span:last-child {
  min-width: 0;
}
.perk-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.55rem;
  background: var(--acc-tint, var(--lime-tint));
  color: var(--acc, var(--lime));
}
.perk-ico .icon {
  width: 16px;
  height: 16px;
  color: var(--acc, var(--lime));
}
.perk-soon {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin-left: 0.35rem;
  padding: 0 0.4rem;
  border: 1px solid var(--sky);
  border-radius: 999px;
  color: var(--sky);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.7;
  white-space: nowrap;
}
.pro-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.7rem 0 0;
}
.pro-plan {
  position: relative;
  min-width: 0;
}
.pro-plan button,
button.pro-plan {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: auto;
  height: auto;
  margin: 0;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  overflow-wrap: break-word;
  -webkit-appearance: none;
  appearance: none;
}
.pro-plan b {
  display: block;
  font-size: 0.9rem;
}
.pro-plan .price {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.pro-plan small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
}
.pro-plan[aria-checked="true"] button,
button.pro-plan[aria-checked="true"] {
  border-color: var(--lime);
  background: linear-gradient(var(--lime-tint), var(--lime-tint)), var(--surface);
}
.pro-save {
  position: absolute;
  top: -0.55rem;
  right: 0.6rem;
  z-index: 1;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}

.today-welcome {
  margin: 0 0 1rem;
  max-width: 100%;
}
.today-welcome h2 {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  overflow-wrap: break-word;
}
.today-welcome p {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.45;
}
.tour {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(4.6rem + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}
.tour-card {
  width: 100%;
  max-width: 26rem;
  min-width: 0;
  padding: 1.05rem 1.1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--raised);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}
.tour-head {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  min-width: 0;
}
.tour-card h3 {
  margin: 0;
  min-width: 0;
  font-size: 1.05rem;
  overflow-wrap: break-word;
}
.tour-card p {
  margin: 0.45rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
.tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}
.tour-dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex: none;
}
.tour-dots i {
  display: block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: width 0.35s ease, background-color 0.35s ease;
}
.tour-dots i.on {
  width: 18px;
  border-radius: 999px;
  background: var(--lime);
}
.tour-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}
.tour-actions .linkish,
.tour-actions button {
  min-height: 44px;
}
.tour-actions .linkish {
  display: inline-flex;
  align-items: center;
  padding: 0 0.35rem;
}
.tour-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.45);
}
.coach-hl {
  position: relative;
  z-index: 58;
  border-radius: 0.9rem;
  box-shadow: 0 0 0 3px var(--lime), 0 0 0 9px var(--lime-tint) !important;
}
/* .tabs is its own stacking context, so a coached tab has to lift the bar
   with it or the scrim (z-index 55) paints over the highlight. */
.tabs:has(a.coach-hl) {
  z-index: 58;
}
.side:has(a.coach-hl) {
  z-index: 58;
}
.tabs a.coach-hl {
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  .setup-progress > span,
  .tour,
  .tour-card,
  .tour-dots i,
  .coach-hl {
    transition: none;
    animation: none;
  }
}

@media (max-height: 700px) {
  .setup-pro { padding-top: 0.6rem; }
  .setup-pro .setup-actions {
    gap: 0.4rem;
    padding-top: 0.4rem;
  }
  .pro-title { margin: 0.15rem 0 0.1rem; }
  .pro-perks {
    grid-template-columns: 1fr 1fr;
    gap: 0.28rem 0.45rem;
    margin: 0.35rem 0 0.2rem;
  }
  .pro-perks li:first-child { grid-column: 1 / -1; }
  .pro-plans { margin-top: 0.55rem; }
  .pro-plan .price { font-size: 1.45rem; }
}

/* breathing room between the top bar and the Pro badge */
.setup-pro .pro-ad { margin-top: 0.6rem; }
@media (max-height: 700px) { .setup-pro .pro-ad { margin-top: 0.35rem; } }

/* Onboarding step transitions (setup-main + setup-actions slide; top bar stays) */
.setup.setup-anim { position: relative; overflow: hidden; }
.setup-leave { position: absolute; z-index: 2; display: flex; flex-direction: column; pointer-events: none; background: var(--bg); }
.setup-leave > .setup-main { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.setup-leave-fwd { animation: setupLeaveFwd 300ms cubic-bezier(.2,.7,.2,1) both; will-change: transform, opacity; }
.setup-leave-back { animation: setupLeaveBack 300ms cubic-bezier(.2,.7,.2,1) both; will-change: transform, opacity; }
.setup-enter-fwd { animation: setupEnterFwd 300ms cubic-bezier(.2,.7,.2,1) both; will-change: transform; }
.setup-enter-back { animation: setupEnterBack 300ms cubic-bezier(.2,.7,.2,1) both; will-change: transform; }
.setup-enter-fade { animation: setupFade 150ms ease both; }
@keyframes setupLeaveFwd { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: .4; } }
@keyframes setupLeaveBack { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: .4; } }
@keyframes setupEnterFwd { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes setupEnterBack { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes setupFade { from { opacity: 0; } to { opacity: 1; } }
.setup-progress > span { transition: width .35s ease; }
@media (prefers-reduced-motion: reduce) {
  .setup-leave { display: none; }
  .setup-enter-fwd, .setup-enter-back { animation: setupFade 150ms ease both; }
  .setup-progress > span { transition: none; }
}

/* Pro screen: title matches other onboarding titles; larger body text */
.setup-pro .pro-title { font-size: 2.4rem; line-height: 1; letter-spacing: 0.03em; font-weight: 600; margin: 0.4rem 0 0.3rem; }
.setup-pro .pro-sub { font-size: 1rem; }
.setup-pro .pro-perks { gap: 0.45rem; }
.setup-pro .pro-perks li { font-size: 0.98rem; }
.setup-pro .perk-ico { width: 2rem; height: 2rem; }
.setup-pro .perk-ico .icon { width: 18px; height: 18px; }
@media (max-height: 700px) {
  .setup-pro .pro-title { margin: 0.2rem 0 0.15rem; }
  .setup-pro .pro-perks { gap: 0.35rem 0.5rem; }
  .setup-pro .pro-perks li { font-size: 0.9rem; }
  .setup-pro .pro-perks li.perk-extra { display: none; }
}

/* Today dashboard */
.dash-block { margin-top: 0.25rem; min-width: 0; max-width: 100%; }
.dash-block + .dash-block { margin-top: 1.35rem; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.7rem;
  min-width: 0;
  max-width: 100%;
}
.section-title h2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}
.section-ico { display: inline-flex; flex: none; }
.section-ico .icon { width: 1.15rem; height: 1.15rem; color: var(--fg); }
.section-title .routine-btn { flex: none; }
.tcards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}
.tcard {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  min-height: 76px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background:
    linear-gradient(90deg, var(--accent-tint, transparent), transparent 48%),
    var(--surface);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tcard:active { transform: scale(0.98); }
.tcard:focus {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.tcard:focus:not(:focus-visible) { outline: none; }
.tcard:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.tcard.done { color: inherit; font-size: inherit; }
.tcard .tbadge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: var(--accent-tint, var(--raised));
  color: var(--accent, var(--muted));
}
.tcard .tbadge .icon {
  width: 22px;
  height: 22px;
  margin: 0;
  color: var(--accent, var(--muted));
}
.tcard .tmain { min-width: 0; }
.tcard b {
  display: block;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.tcard .sub {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.tcard .sub.lime { color: var(--lime); }
.tcard.accent-teal { --accent: var(--teal); --accent-tint: var(--teal-tint); }
.tcard.accent-orange { --accent: var(--orange); --accent-tint: var(--orange-tint); }
.tcard.accent-violet { --accent: var(--violet); --accent-tint: var(--violet-tint); }
.tcard.accent-sky { --accent: var(--sky); --accent-tint: var(--sky-tint); }
.tcard.dashed {
  background: var(--surface);
  border-style: dashed;
}
.ring {
  display: block;
  width: 52px;
  height: 52px;
  flex: none;
}
.ring-track,
.ring-value { fill: none; stroke-width: 4; }
.ring-track { stroke: var(--line); }
.ring-value {
  stroke: var(--accent, var(--lime));
  stroke-linecap: round;
}
.ring-value.is-empty { stroke: transparent; }
.ring text {
  fill: var(--fg);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ring-check {
  fill: none;
  stroke: var(--lime);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tcard.done .ring-value { stroke: var(--lime); }
.ring-note {
  max-width: 5.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: right;
}
.tcard.pro-ad {
  --accent: var(--violet);
  --accent-tint: var(--violet-tint);
  grid-template-columns: 40px minmax(0, 1fr);
  background:
    linear-gradient(115deg, var(--violet-tint), rgba(167, 139, 250, 0.04) 62%),
    var(--surface);
}
.tcard.pro-ad .pro-pill {
  display: inline-block;
  margin: 0 0 0.28rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: var(--violet);
  color: #1b1030;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.45;
}
.tcard.pro-ad .see-pro {
  display: inline-grid;
  place-items: center;
  height: 2rem;
  margin-top: 0.55rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
}
@media (min-width: 700px) {
  .tcards { grid-template-columns: 1fr 1fr; }
  .tcard.pro-ad,
  .tcard.dashed { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .tcard:active { transform: none; }
}

/* Route changes only. Slides stay inside .shell; tabs, side, toast, and sheets do not move. */
.narrow.pt-in-right,
.narrow.pt-in-left,
.narrow.pt-fade-in {
  position: relative;
  background: var(--bg);
}
.narrow.pt-in-right,
.narrow.pt-in-left {
  animation-duration: 300ms;
  animation-timing-function: cubic-bezier(.2, .8, .2, 1);
  animation-fill-mode: both;
  will-change: transform;
}
.narrow.pt-in-right { z-index: 2; animation-name: ptInRight; }
.narrow.pt-in-left { z-index: 1; animation-name: ptInLeft; }
.narrow.pt-fade-in {
  z-index: 1;
  animation: ptFadeIn 180ms ease both;
  will-change: opacity;
}
.narrow.pt-old {
  position: absolute;
  margin: 0;
  pointer-events: none;
  background: var(--bg);
  z-index: 1;
}
.pt-old.pt-out-left,
.pt-old.pt-out-right {
  animation-duration: 300ms;
  animation-timing-function: cubic-bezier(.2, .8, .2, 1);
  animation-fill-mode: both;
  will-change: transform, opacity;
}
.pt-old.pt-out-left { z-index: 1; animation-name: ptOutLeft; }
.pt-old.pt-out-right { z-index: 2; animation-name: ptOutRight; }
@keyframes ptInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes ptInLeft {
  from { transform: translateX(-30%); }
  to { transform: translateX(0); }
}
@keyframes ptOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-30%); opacity: .4; }
}
@keyframes ptOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 1; }
}
@keyframes ptFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .narrow.pt-in-right,
  .narrow.pt-in-left,
  .pt-old.pt-out-left,
  .pt-old.pt-out-right { animation: none; }
  .narrow.pt-fade-in { animation-duration: 120ms; }
}

/* Guided workouts */
.g-more { margin-top: 0.75rem; font-size: 0.85rem; }
.g-more a { color: var(--lime); }
.g-lock {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.g-lock .lock {
  margin-left: 0;
  color: var(--muted);
}
.tcard .pro-pill {
  display: inline-block;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: var(--violet);
  color: #1b1030;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.45;
}
.g-start {
  display: inline-grid;
  place-items: center;
  height: 2rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
}
.g-detail {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 11.5rem - env(safe-area-inset-bottom));
}
.g-head {
  background:
    linear-gradient(115deg, var(--acc-tint, transparent), transparent 62%),
    var(--surface);
}
.g-head > p:first-child {
  margin-top: 0;
  color: var(--fg);
  font-size: 1rem;
}
.g-head .chips { margin-top: 0.75rem; }
.g-head .chip {
  height: 2rem;
  pointer-events: none;
  font-size: 0.8rem;
}
.g-steps {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.15rem;
}
.g-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--surface);
}
.g-step-main { min-width: 0; }
.g-step-main b {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
}
.g-step-main .muted {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.85rem;
}
.g-step-main .g-brief {
  margin: 0.4rem 0 0;
  padding-left: 0.6rem;
  border-left: 2px solid var(--accent, var(--line));
  color: #c4cec6;
  font-size: 0.84rem;
  line-height: 1.4;
}
.g-rest {
  padding: 0.1rem 0.75rem 0.2rem;
  font-size: 0.8rem;
  text-align: center;
}
.g-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.8rem;
  background: var(--acc-tint, var(--raised));
  color: var(--acc, var(--muted));
  overflow: hidden;
  flex: none;
}
.g-thumb .icon {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  color: var(--acc, var(--lime));
}
.g-thumb .howto-anim {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  aspect-ratio: auto;
  transform: none;
}
.g-start-wrap {
  position: sticky;
  bottom: calc(4.5rem + env(safe-area-inset-bottom));
  z-index: 6;
  margin-top: auto;
  padding: 0.85rem 0 0.35rem;
  background: linear-gradient(to top, var(--bg) 70%, rgba(16, 20, 16, 0));
}
.g-start-wrap .btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.g-start-wrap .btn .lock {
  margin-left: 0;
  color: var(--ink);
}
@media (min-width: 900px) {
  .g-start-wrap { bottom: 0; }
}

/* Guided player. Above the tab bar (20), under the toast (30) and upsell (40). */
.gp {
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  padding:
    calc(0.35rem + env(safe-area-inset-top))
    calc(0.7rem + env(safe-area-inset-right))
    calc(0.4rem + env(safe-area-inset-bottom))
    calc(0.7rem + env(safe-area-inset-left));
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.gp-top {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
  min-height: 2.75rem;
}
.gp-progress {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-weight: 650;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gp-iconbtn {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--raised);
  color: var(--fg);
  line-height: 1;
}
.gp-iconbtn svg,
.gp-side svg,
.gp-pause svg,
.gp-stepper button svg {
  display: block;
  width: 24px;
  height: 24px;
}
.gp-stage {
  position: relative;
  display: grid;
  place-items: stretch;
  flex: 1 1 38vh;
  width: 100%;
  min-height: 0;
  max-height: 38vh;
  margin-top: 0.35rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--acc-tint, var(--sky-tint));
}
.gp-stage > .g-thumb {
  place-self: stretch;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  background: transparent;
}
.gp-stage > .g-thumb .howto-anim {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}
.gp-stage > .g-thumb .icon {
  width: 42%;
  height: 42%;
  place-self: center;
}
.gp-kicker {
  flex: none;
  margin: 0.35rem 0 0;
  text-align: center;
  color: var(--sky);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gp.is-lime .gp-kicker { color: var(--lime); }
.gp-name {
  flex: none;
  margin: 0.15rem 0 0;
  max-width: 100%;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gp-sub {
  flex: none;
  margin: 0.2rem 0 0;
  text-align: center;
  font-size: 0.92rem;
}
.gp-brief {
  flex: none;
  max-width: 34rem;
  margin: 0.45rem auto 0;
  padding: 0 0.5rem;
  color: #c4cec6;
  font-size: 0.86rem;
  line-height: 1.38;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
@media (max-height: 640px) {
  .gp-brief { -webkit-line-clamp: 2; font-size: 0.8rem; }
}
.gp-ring-wrap {
  position: relative;
  flex: 0 1 240px;
  width: min(240px, 72vw);
  max-height: 240px;
  min-height: 0;
  aspect-ratio: 1;
  margin: 0.2rem auto 0;
}
.gp-ring-svg { display: block; width: 100%; height: 100%; }
.gp-track { fill: none; stroke: var(--line); }
.gp-arc { fill: none; stroke: var(--sky); }
.gp.is-lime .gp-arc { stroke: var(--lime); }
.gp.is-accent .gp-arc { stroke: var(--acc, var(--lime)); }
.gp-ring-center {
  position: absolute;
  top: 16%;
  right: 16%;
  bottom: 16%;
  left: 16%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.gp-num {
  font-family: var(--display);
  font-size: clamp(2.6rem, 12vw, 4.6rem);
  font-weight: 600;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.gp-num.is-word { font-size: clamp(1.6rem, 7vw, 2.2rem); letter-spacing: 0.02em; }
.gp-unit {
  margin-top: 0.15rem;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}
.gp-unit.is-label {
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: none;
}
.gp.is-accent .gp-unit { color: var(--acc, var(--lime)); letter-spacing: 0.04em; text-transform: lowercase; }
.gp.is-accent .gp-unit.is-label { color: var(--fg); letter-spacing: 0.01em; text-transform: none; }
.gp-elapsed {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.gp-done {
  flex: none;
  width: min(100%, 22rem);
  margin: 0.35rem auto 0;
}
.gp-controls {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  min-height: 56px;
  margin-top: auto;
  padding-top: 0.35rem;
}
.gp-side, .gp-pause {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
}
.gp-side {
  width: 3.25rem;
  height: 3.25rem;
  min-width: 44px;
  min-height: 44px;
  background: var(--raised);
  color: var(--fg);
}
.gp-pause {
  width: 4.5rem;
  height: 4.5rem;
  min-width: 44px;
  min-height: 44px;
  background: var(--lime);
  color: var(--ink);
}
.gp-side:active,
.gp-pause:active,
.gp-iconbtn:active,
.gp-stepper button:active {
  transform: scale(0.96);
}
.gp-next {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  left: 0.55rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
}
.gp-next-kicker {
  position: absolute;
  top: -0.55rem;
  left: 0.7rem;
  padding: 0 0.3rem;
  background: var(--surface);
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gp-next .g-thumb {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.55rem;
}
.gp-next .g-thumb .howto-anim {
  width: 100%;
  height: 100%;
  max-height: 100%;
}
.gp-next-main { min-width: 0; flex: 1; }
.gp-next-main b, .gp-next-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gp-next-main b { font-size: 0.92rem; }
.gp-next-main span { color: var(--muted); font-size: 0.75rem; }
.gp-backchip {
  flex: none;
  height: 2.25rem;
  padding: 0 0.7rem;
  font-size: 0.78rem;
}
.gp-scrim {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 12, 8, 0.55);
}
.gp-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  padding: 1.1rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  border-radius: 1.4rem 1.4rem 0 0;
  background: var(--surface);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45);
}
.gp-sheet h2 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
}
.gp-sheet .muted { margin-top: 0.35rem; }
.gp-sheet .btn,
.gp-sheet .chip {
  width: 100%;
  margin-top: 0.6rem;
}
.gp-sheet .chip { height: 3rem; }
.gp-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.gp-stepper button {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--raised);
  color: var(--fg);
  line-height: 1;
}
.gp-count-num {
  min-width: 4.5rem;
  font-family: var(--display);
  font-size: 4rem;
  font-weight: 600;
  line-height: 0.9;
  text-align: center;
}
.gp-summary {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
}
.gp-summary h1 {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 0.95;
}
.gp-sum-time {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 600;
  line-height: 0.9;
}
.gp-sum-count { margin: 0.2rem 0 0; color: var(--muted); }
.gp-sum-count b { color: var(--fg); font-size: 1.15rem; }
.gp-rows {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}
.gp-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.gp-row-main { flex: 1; min-width: 0; }
.gp-row-main b, .gp-row-main span { display: block; }
.gp-row-main b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gp-row-main span { margin-top: 0.1rem; color: var(--muted); font-size: 0.8rem; }
.gp-row .gp-stepper { margin-top: 0; gap: 0.4rem; }
.gp-row .gp-stepper button {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
}
.gp-num-input {
  width: 4.5rem;
  height: 2.75rem;
  padding: 0 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  text-align: center;
}
.gp-empty { margin-top: 1rem; }
.gp-sum-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-bottom: 0.25rem;
}
.gp-sum-actions .btn { width: 100%; }
.gp button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
@media (max-height: 700px) {
  .gp-name { font-size: 1.45rem; }
  .gp-kicker { margin-top: 0.15rem; }
  .gp-stage { flex-basis: 16vh; max-height: 20vh; }
  .gp-ring-wrap { flex-basis: 148px; max-height: 148px; width: min(148px, 52vw); }
  .gp-num { font-size: 2.7rem; }
  .gp-unit.is-label { font-size: 0.85rem; }
  .gp-pause { width: 4rem; height: 4rem; }
  .gp-side { width: 2.75rem; height: 2.75rem; }
  .gp-done { height: 2.75rem; }
  .gp-count-num { font-size: 3.2rem; }
  .gp-sheet h2 { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gp, .gp * { animation: none !important; transition: none !important; }
}

/* Exercise library. Colours come from the app tokens and .accent-* (--acc / --acc-tint). */
.narrow:has(> .lib-page) {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: calc(4.35rem + env(safe-area-inset-bottom));
}
.narrow:has(> .lib-page) .page-head {
  flex: none;
  margin-bottom: 0.65rem;
}
.narrow:has(> .lib-page) .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 0 0 0 -0.35rem;
  padding: 0;
}
.narrow:has(> .lib-page) .page-head h1 {
  min-width: 0;
  font-size: clamp(1.85rem, 8vw, 2.5rem);
  overflow-wrap: anywhere;
}
.lib-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
}
.lib-sticky {
  flex: none;
  position: sticky;
  top: 0;
  z-index: 4;
  min-width: 0;
  margin: 0 0 0.65rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.lib-search {
  display: block;
  width: 100%;
  height: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font-size: 16px;
}
.lib-search::placeholder { color: var(--muted); }
.lib-search:focus {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}
.lib-cats {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lib-cats::-webkit-scrollbar { display: none; }
.lib-cats.lib-wrap { flex-wrap: wrap; overflow: visible; }
.lib-cats .chip { white-space: nowrap; }
.chip.lib-chip,
.chip.lib-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0.35rem;
  min-height: 2.75rem;
}
.lib-chip .lib-dot { margin-right: 0; }
.lib-dot {
  display: inline-block;
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 99px;
  background: var(--acc, var(--lime));
}
.lib-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
  margin-top: 0.55rem;
}
.lib-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.32rem;
  border-radius: 99px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.lib-live { margin: 0.5rem 0 0; }
.lib-body,
.lib-detail {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lib-group { min-width: 0; margin-top: 0.35rem; }
.lib-group + .lib-group { margin-top: 1.05rem; }
.lib-group h2,
.lib-recent h2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.15rem 0 0.5rem;
  color: var(--acc, var(--muted));
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.lib-recent h2 { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.lib-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  min-height: 4.6rem;
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--acc, var(--lime));
  border-radius: 1.1rem;
  background:
    linear-gradient(90deg, var(--acc-tint, transparent), transparent 46%),
    var(--surface);
  color: inherit;
  text-align: left;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.lib-row:active { transform: scale(0.99); }
.lib-row:focus-visible { outline: 2px solid var(--acc, var(--lime)); outline-offset: 2px; }
.lib-thumb {
  display: grid;
  flex: 0 0 3.5rem;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  overflow: hidden;
  border-radius: 0.9rem;
  background: var(--acc-tint, var(--raised));
  color: var(--acc, var(--lime));
}
.lib-thumb svg,
.lib-thumb svg.howto-anim {
  display: block;
  width: 86%;
  height: auto;
  max-width: 100%;
  max-height: 86%;
  aspect-ratio: 320 / 190;
}
.lib-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 0.12rem; min-width: 0; }
.lib-copy b {
  overflow: hidden;
  color: var(--fg);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-copy .muted { font-size: 0.82rem; line-height: 1.35; }
.lib-match { display: block; color: var(--acc, var(--lime)); font-size: 0.8rem; font-weight: 650; }
.lib-in {
  flex: none;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.lib-pro {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.15rem;
  color: var(--sky);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lib-pro .lock { width: 0.95rem; height: 0.95rem; }
.lib-empty { padding: 1.1rem 1rem; }
.lib-empty .btn,
.lib-custom .btn,
.lib-action .btn { width: 100%; }
.lib-more { margin-top: 0.35rem; }
.lib-custom-link { margin: 0.85rem 0 0.35rem; }
.lib-custom-link .linkish { display: inline-flex; align-items: center; min-height: 2.75rem; }
.lib-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; }
.lib-media {
  display: grid;
  place-items: center;
  min-height: 9.5rem;
  margin-top: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, var(--acc-tint, var(--raised)), transparent 72%),
    var(--surface);
  color: var(--acc, var(--lime));
}
.lib-media svg,
.howto-media > svg {
  display: block;
  width: min(100%, 16rem);
  height: auto;
  max-height: 12.5rem;
}
.lib-media.lib-fallback { min-height: 7.5rem; }
.lib-media.lib-fallback svg { width: 4.5rem; height: 4.5rem; }
.lib-vars { display: grid; gap: 0.45rem; margin-top: 0.85rem; min-width: 0; }
.lib-var {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.lib-var.on {
  border-color: var(--acc, var(--lime));
  background: var(--acc-tint, var(--lime-tint));
  box-shadow: inset 3px 0 0 var(--acc, var(--lime));
}
.lib-var:focus-visible { outline: 2px solid var(--acc, var(--lime)); outline-offset: 2px; }
.lib-var.dim b,
.lib-var.dim .lib-pills { color: var(--muted); }
.lib-radio {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.12rem;
  border: 2px solid var(--line);
  border-radius: 99px;
  background: transparent;
}
.lib-var.on .lib-radio {
  border-color: var(--acc, var(--lime));
  background:
    radial-gradient(circle at center, var(--acc, var(--lime)) 0 42%, transparent 46%);
}
.lib-var-copy { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: 0.28rem; min-width: 0; }
.lib-var-copy b { font-size: 1rem; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.lib-pills { display: flex; flex-wrap: wrap; gap: 0.28rem; max-width: 100%; }
.lib-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.05rem 0.48rem;
  border-radius: 999px;
  background: var(--raised);
  color: var(--fg);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
.lib-pill.easier { color: var(--teal); }
.lib-pill.harder { color: var(--orange); }
.lib-pill.pro { color: var(--sky); }
.lib-copy .lib-pill { margin-left: 0.2rem; vertical-align: 1px; }
.lib-need { color: var(--fg); font-size: 0.82rem; line-height: 1.3; }
.lib-var .linkish {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0;
}
.lib-sub {
  margin: 1.15rem 0 0.4rem;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 650;
}
.lib-steps {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.45;
}
.lib-steps li { padding-left: 0.1rem; }
.lib-side { margin-top: 0.15rem; }
.lib-goal { position: relative; }
.lib-suffix {
  position: absolute;
  right: 0.95rem;
  bottom: 0;
  display: flex;
  align-items: center;
  height: 3rem;
  color: var(--muted);
  pointer-events: none;
}
.lib-goal input { padding-right: 2.8rem; }
.lib-action {
  flex: none;
  padding-top: 0.65rem;
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
}
.lib-action .fine { margin: 0 0 0.4rem; }
.lib-action .btn {
  height: auto;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}
.lib-checks { display: grid; max-height: 42vh; margin-top: 0.75rem; overflow: auto; }
.lib-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  color: var(--fg);
}
.lib-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--lime); }
.lib-sheet-label {
  margin: 0.95rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lib-varpick {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 2.75rem;
  margin-top: 0.2rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--raised);
  color: var(--fg);
  font-weight: 650;
  font-size: 0.92rem;
}
.lib-varpick:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.lib-breakdown { margin-top: 0.25rem; font-size: 0.85rem; line-height: 1.35; overflow-wrap: anywhere; }
.upsell-card:has(.lib-checks),
.upsell-card:has(.lib-vars) {
  max-height: min(78dvh, 100%);
  overflow: auto;
}
@media (min-width: 900px) {
  .narrow:has(> .lib-page) { padding-bottom: 1.25rem; }
}
@media (max-width: 390px) {
  .lib-row { gap: 0.6rem; padding-right: 0.55rem; }
  .lib-in { font-size: 0.68rem; }
}
.howto-anim .rope { fill: none; stroke: var(--fg, #eee); stroke-width: 1.4; stroke-linecap: round; opacity: 0.9; }
/* Workout level selector */
.g-levels.seg { display: flex; gap: 0; margin-top: .75rem; border: 1px solid var(--line, #333); border-radius: 999px; padding: 3px; background: rgba(0,0,0,.25); }
.g-levels .seg-btn { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 .9rem var(--sans); cursor: pointer; }
.g-levels .seg-btn.on { background: var(--lime); color: #111; }
.g-levels .seg-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
/* Save workouts */
.tcard-wrap { position: relative; min-width: 0; }
.tcard-wrap .tcard { padding-right: 6.4rem; }
.g-save { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg, #eee); font: 600 .85rem var(--sans); cursor: pointer; }
.g-save .icon { width: 18px; height: 18px; }
.g-save.on { border-color: var(--lime); color: var(--lime); }
.g-save.on .icon { fill: var(--lime); }
.g-save.on-card { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); }
.tcard-wrap .tcard .g-lock { margin-right: 0; }
.g-saved-empty .icon { width: 16px; height: 16px; vertical-align: -3px; }
/* Quick log */
.ql-btn { display: inline-flex; align-items: center; gap: .3rem; margin-right: .4rem; }
.ql-btn .icon { width: 16px; height: 16px; }
.ql-entry { margin: .9rem 0 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.ql-row { display: flex; align-items: center; justify-content: center; gap: .8rem; }
.ql-step { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg, #eee); font-size: 1.6rem; cursor: pointer; }
.ql-amt { display: flex; align-items: baseline; gap: .35rem; }
.ql-amt input { width: 5.5rem; text-align: center; font: 600 2.2rem var(--display); background: transparent; color: var(--fg, #eee); border: 0; border-bottom: 2px solid var(--lime); }
.ql-amt span { color: var(--muted); }
.ql-presets { justify-content: center; margin-top: .7rem; flex-wrap: wrap; }
.ql-extra { margin: -.25rem 0 1rem; padding: .75rem .9rem; border: 1px dashed var(--line); border-radius: 1rem; }
.ql-extra h3 { margin: 0 0 .4rem; font-size: .9rem; color: var(--muted); }
.ql-list { list-style: none; margin: 0; padding: 0; }
.ql-list li { display: flex; align-items: center; gap: .6rem; min-height: 40px; }
.ql-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-del { min-height: 36px; }

/* Workout categories (cat1) */
.w-cats{display:flex;gap:.45rem;overflow-x:auto;margin:.2rem 0 .9rem;padding-bottom:.15rem;scrollbar-width:none}
.w-cats::-webkit-scrollbar{display:none}
.w-cat{white-space:nowrap;border:1px solid var(--line,#2a2f2a);background:transparent;color:inherit;font:inherit;cursor:pointer}
.w-cat.on{background:var(--lime,#4ade5a);color:#111;border-color:transparent;font-weight:700}
.w-pinned{margin-bottom:1rem}
.w-cat-row{margin:0 0 1.1rem}
.w-cat-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 .5rem}
.w-cat-head h3{margin:0;font-size:1rem}
.w-see{background:none;border:0;font:inherit;font-size:.9rem;cursor:pointer;padding:.25rem 0}
.w-cat-blurb{margin:-.2rem 0 .6rem}
.g-swap,.g-needs{display:block;font-size:.78rem;margin-top:.15rem}
.g-swap-easier{color:var(--sky,#7cc8ff)}
.g-swap-harder{color:var(--orange,#ff9f43)}
.g-needs{color:var(--muted,#9aa39a)}
.lib-pill.needs{border-style:dashed}

/* Style refresh (Oct 2026): larger type, roomier cards, workout rows */
@media (min-width: 400px) { html { font-size: 17.5px; } }
.card { padding: 1.4rem; }
.card h2, .panel h2 { font-size: 1.2rem; }
.card p, .panel p { font-size: 0.95rem; line-height: 1.45; }
.tcard { min-height: 84px; padding: 1.1rem; border-radius: 1.25rem; }
.tcard b { font-size: 1.08rem; }
.tcard .sub { font-size: 0.88rem; }
.g-step { padding: 0.95rem; border-radius: 1.25rem; }
.w-cat-row { margin: 0 0 1.5rem; }
.w-cat-head { margin: 0 0 0.65rem; gap: 0.6rem; }
.w-cat-head h3 { font-size: 1.12rem; font-weight: 650; }
.w-back { background: none; border: 0; padding: 0.3rem 0.1rem; color: var(--lime); font: 600 0.95rem var(--sans); cursor: pointer; }
.w-all .w-cat-head { justify-content: flex-start; }
.wrow {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(46%, 13rem);
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-right: -1rem;
  padding: 0.1rem 1rem 0.3rem 0;
}
.wrow::-webkit-scrollbar { display: none; }
.wrow-item { scroll-snap-align: start; min-width: 0; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 11rem), 1fr)); gap: 0.75rem; }
.wtile-wrap { position: relative; height: 100%; min-width: 0; }
.wtile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: 100%;
  min-height: 9.5rem;
  aspect-ratio: 1 / 0.95;
  box-sizing: border-box;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: linear-gradient(160deg, var(--accent-tint, transparent), transparent 70%), var(--surface);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.wtile:active { transform: scale(0.98); }
.wtile:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.wtile.accent-teal { --accent: var(--teal); --accent-tint: var(--teal-tint); }
.wtile.accent-orange { --accent: var(--orange); --accent-tint: var(--orange-tint); }
.wtile.accent-violet { --accent: var(--violet); --accent-tint: var(--violet-tint); }
.wtile.accent-sky { --accent: var(--sky); --accent-tint: var(--sky-tint); }
.wtile.accent-lime { --accent: var(--lime); --accent-tint: var(--lime-tint); }
.wtile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.4rem; margin-bottom: auto; padding-right: 2.6rem; }
.wtile .tbadge { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 0.8rem; background: var(--accent-tint, var(--raised)); }
.wtile .tbadge .icon { width: 22px; height: 22px; margin: 0; color: var(--accent, var(--muted)); }
.wtile .g-lock { display: inline-flex; align-items: center; gap: 0.2rem; margin: 0; }
.wtile-free { padding: 0.15rem 0.45rem; border-radius: 999px; background: var(--lime-tint); color: var(--lime); font: 700 0.7rem var(--sans); letter-spacing: 0.04em; }
.wtile-name { font-size: 1.05rem; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wtile-sub { color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.wtile-lvl { color: var(--accent, var(--muted)); font-size: 0.78rem; font-weight: 600; }
.g-save.on-tile { position: absolute; top: 0.7rem; right: 0.7rem; width: 36px; height: 36px; min-height: 36px; padding: 0; justify-content: center; }
.g-save.on-tile span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wtile.is-locked .wtile-top { padding-right: 2.6rem; }
.w-needs { margin-top: 0; }

.pro-close{position:sticky;top:.75rem;float:right;z-index:5;width:44px;height:44px;border-radius:50%;border:1px solid var(--line,rgba(255,255,255,.18));background:var(--card,#16181c);color:inherit;font-size:1.6rem;line-height:1;cursor:pointer;margin:0 0 .5rem .75rem}
.pro-close:focus-visible{outline:2px solid var(--lime,#4ade5a);outline-offset:2px}

/* 3D exercise clips (EX_VIDEOS). The clip keeps its white background, shown as a soft light
   card on the dark theme. Always contain (never cover) so the whole figure, head to feet, shows. */
.ex-vid {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.ex-vid video { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; border: 0; outline: 0; }
.ex-vid img.ex-vid-still { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; border: 0; }
.ex-vid .ex-vid-fb { display: grid; place-items: center; width: 100%; height: 100%; background: var(--acc-tint, var(--raised)); }
.ex-vid .ex-vid-fb[hidden] { display: none; }
.ex-vid .ex-vid-fb svg { width: 100%; height: 100%; }
/* small thumbs: tighter radius, no shadow */
.g-thumb.g-thumb-vid { background: transparent; }
.g-thumb .ex-vid, .lib-thumb-v .ex-vid { border-radius: 0.7rem; box-shadow: none; }
.lib-thumb.lib-thumb-v { background: transparent; overflow: hidden; }
/* player stage: the light card sits centred inside the stage at the clip's 4:5 shape */
.gp-stage:has(.g-thumb-vid) { display: grid; place-items: center; background: transparent; }
.gp-stage > .g-thumb-vid { display: grid; place-items: center; width: 100%; height: 100%; }
.gp-stage > .g-thumb-vid .ex-vid { width: auto; height: 100%; max-width: min(100%, 480px); max-height: 55vh; aspect-ratio: 4 / 5; }
/* library detail + how-to: capped, centred card */
.lib-media.lib-media-vid { padding: 0.75rem; background: transparent; border: 0; }
.lib-media-vid .ex-vid,
.howto-media .ex-vid { width: min(100%, 22rem, 44vh); height: auto; max-height: 55vh; aspect-ratio: 4 / 5; margin: 0 auto; }
/* drawn poses/animations on wide screens: contained, centred, never stretched */
@media (min-width: 900px) {
  .lib-media svg, .howto-media > svg { max-width: 480px; max-height: 55vh; margin-inline: auto; }
  .gp-stage > .g-thumb svg { max-height: 55vh; }
}
.howto-media:has(.ex-vid) { display: grid; place-items: center; }
.lib-media-vid .ex-vid .ex-vid-fb svg { width: min(100%, 16rem); max-height: 12.5rem; }

/* Guided player top bar: true-centre the "Exercise N of M" label where there is room
   (1 button left, 3 right). On narrow phones it stays centred in the gap between the buttons. */
@media (min-width: 520px) {
  .gp-top { position: relative; }
  .gp-top > .gp-iconbtn:first-child { margin-right: auto; }
  .gp-progress {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    flex: none;
    max-width: calc(100% - 20rem);
    pointer-events: none;
  }
}

/* One fixed demo card size everywhere (clip, poster or drawing): 4:5, content contained.
   Size depends only on the viewport, never on the exercise, content or parent. */
:root { --demo-w: min(86vw, 340px, calc(36vh * 0.8)); }
@media (min-width: 900px) { :root { --demo-w: min(420px, calc(56vh * 0.8)); } }
.lib-media-vid .ex-vid,
.howto-media .ex-vid,
.gp-stage > .g-thumb-vid .ex-vid,
.lib-media:not(.lib-fallback) > svg,
.howto-media > svg,
.gp-stage > .g-thumb:not(.g-thumb-vid) > svg:not(.icon) {
  flex: none;
  box-sizing: border-box;
  width: var(--demo-w);
  height: auto;
  min-width: var(--demo-w);
  max-width: var(--demo-w);
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  place-self: center;
  object-fit: contain;
}
.ex-vid .ex-vid-fb svg { width: 100%; height: 100%; max-width: none; max-height: none; }
.lib-media:has(> svg:not(.icon)), .lib-media.lib-media-vid, .howto-media:not([hidden]) { display: grid; place-items: center; min-height: 0; }
.gp-stage:has(.g-thumb-vid), .gp-stage:has(> .g-thumb > svg:not(.icon)) { flex: none; height: auto; max-height: none; overflow: visible; background: transparent; place-items: center; }
.gp-stage > .g-thumb-vid, .gp-stage > .g-thumb:has(> svg:not(.icon)) { width: auto; height: auto; place-self: center; }

/* Guided ring: number and label scale with the ring itself, so they never overlap at any size. */
.gp-ring-wrap { container-type: size; min-height: 150px; flex-basis: 220px; }
.gp-ring-center { top: 18%; right: 18%; bottom: 18%; left: 18%; gap: 4cqmin; }
.gp-num { font-size: 30cqmin; line-height: 1; }
.gp-num.is-word { font-size: 15cqmin; }
.gp-unit { margin-top: 0; font-size: max(0.72rem, 7cqmin); line-height: 1.1; max-width: 100%; }
.gp-unit.is-label { font-size: max(0.8rem, 8cqmin); }
@media (max-height: 700px) { .gp-num { font-size: 30cqmin; } .gp-unit.is-label { font-size: max(0.8rem, 8cqmin); } }
@media (max-height: 700px) { .gp-ring-wrap { min-height: 120px; flex-basis: 150px; } }

/* Stats exercise filter + activity calendar */
.stx { position: relative; margin: 0.85rem 0 0.25rem; }
.stx-bar { display: flex; gap: 0.4rem; align-items: stretch; }
.stx-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 0.9rem;
  background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer;
}
.stx-btn b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.stx-btn.on { border-color: var(--sky); background: var(--sky-tint); }
.stx-k { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.stx-unit { font-size: 0.7rem; padding: 0.15rem 0.45rem; border-radius: 99px; background: var(--raised); color: var(--sky); }
.stx-caret { color: var(--muted); }
.stx.open .stx-caret { transform: rotate(180deg); }
.stx-clear {
  flex: none; width: 2.75rem; border: 1px solid var(--line); border-radius: 0.9rem;
  background: var(--surface); color: var(--muted); font-size: 1.2rem; cursor: pointer;
}
.stx-clear:hover { color: var(--fg); border-color: var(--muted); }
.stx-pop {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 0.35rem);
  border: 1px solid var(--line); border-radius: 1rem; background: var(--surface);
  box-shadow: 0 18px 40px rgba(0,0,0,.45); padding: 0.55rem; max-width: 30rem;
}
.stx-q {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 0.7rem;
  background: var(--raised); color: var(--fg); font: inherit;
}
.stx-q:focus { outline: none; border-color: var(--lime); }
.stx-list { max-height: min(50vh, 20rem); overflow-y: auto; margin-top: 0.45rem; display: grid; gap: 2px; }
.stx-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.6rem 0.7rem; border: 0; border-radius: 0.6rem; background: transparent;
  color: var(--fg); font: inherit; text-align: left; cursor: pointer;
}
.stx-opt[hidden] { display: none; }
.stx-opt:hover, .stx-opt:focus-visible { background: var(--raised); outline: none; }
.stx-opt.on { background: var(--lime-tint); color: var(--lime); }
.stx-tag { font-style: normal; font-size: 0.68rem; padding: 0.12rem 0.45rem; border-radius: 99px; flex: none; }
.stx-tag.r { background: var(--orange-tint); color: var(--orange); }
.stx-tag.t { background: var(--teal-tint); color: var(--teal); }
.stx-empty, .stx-none { margin: 0.5rem 0.4rem; font-size: 0.85rem; }
.cal-day.active { background: var(--lime); color: var(--ink); }
.cal-day.active b { color: var(--ink); font-weight: 750; }
.cal-dots .cal-day:not(.active):not(.out) { background: var(--raised); color: var(--muted); }
.cal-dots .cal-day.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }
.cal-dots .cal-day.out { background: transparent; color: rgba(147,161,151,.45); box-shadow: inset 0 0 0 1px rgba(49,59,52,.6); }
.cal-dot { display: none; }
.cal-dots .cal-day.goal { position: relative; }
.cal-goal { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1.5px var(--lime); }
.cal-dots .cal-day.goal:not(.active) .cal-goal { background: var(--lime); box-shadow: none; }
.rsum-sub { margin: 0; font-size: 0.8rem; color: var(--muted); }
.rsum-sub b { color: var(--fg); }
@media (min-width: 900px) {
  .stx-pop { right: auto; width: 26rem; }
  .stx-btn { max-width: 30rem; }
}

/* ---- Today: routine pills, exercise tiles, exercise page ---- */
@media (min-width: 900px) {
  .narrow.wide { width: min(76rem, 100%); padding-inline: 2rem; }
  .today-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 1fr); gap: 2rem; align-items: start; }
  .today-side { position: sticky; top: 1rem; }
}
.rpills { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.15rem 0 0.6rem; scrollbar-width: none; }
.rpills::-webkit-scrollbar { display: none; }
.rpill {
  flex: none; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.9rem; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.rpill:hover { border-color: var(--muted); }
.rpill.on { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.rpill-n { font-size: 0.72rem; font-weight: 600; padding: 0.08rem 0.4rem; border-radius: 99px; background: var(--raised); color: var(--muted); }
.rpill.on .rpill-n { background: rgba(4,33,11,.16); color: var(--ink); }
.rpill.locked { color: var(--muted); border-style: dashed; }
.rpill.locked svg { width: 0.85rem; height: 0.85rem; }
.tiles { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.tile {
  display: flex; align-items: stretch; min-height: 4.25rem; border: 1px solid var(--line);
  border-radius: 1rem; background: var(--surface); overflow: hidden; transition: border-color .15s, background .15s;
}
.tile.met { border-color: rgba(74,222,90,.45); background: linear-gradient(90deg, rgba(74,222,90,.07), var(--surface) 60%); }
.tile-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.4rem 0.5rem 0.55rem;
  border: 0; background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer;
}
.tile-main:hover .tile-txt b { color: var(--lime); }
.tile-pic { position: relative; flex: none; width: 3.25rem; height: 3.25rem; }
.xthumb { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #1c241f; box-shadow: inset 0 0 0 1.5px rgba(147,161,151,.28); }
.xthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile.met .xthumb { box-shadow: inset 0 0 0 2px var(--lime); }
.xthumb-fb { display: flex; align-items: center; justify-content: center; color: var(--sky); font-weight: 750; font-size: 1.15rem; background: var(--sky-tint); }
.tile-check {
  position: absolute; right: -0.15rem; bottom: -0.15rem; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--lime); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--surface);
}
.tile-check svg { width: 0.8rem; height: 0.8rem; }
.tile-txt { min-width: 0; flex: 1; display: grid; gap: 0.2rem; }
.tile-txt b { font-weight: 650; font-size: 0.98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.tile-prog { font-size: 0.8rem; color: var(--muted); }
.tile.met .tile-prog { color: var(--lime); }
.tile-bar { display: block; height: 3px; border-radius: 3px; background: var(--raised); overflow: hidden; max-width: 14rem; }
.tile-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--lime)); border-radius: 3px; }
.tile-add {
  flex: none; width: 4.1rem; border: 0; border-left: 1px solid var(--line); background: var(--raised);
  color: var(--lime); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05rem;
}
.tile-add span { font-size: 1.55rem; font-weight: 700; line-height: 1; }
.tile-add small { font-size: 0.7rem; color: var(--muted); }
.tile-add:hover, .tile-add:focus-visible { background: var(--lime); color: var(--ink); outline: none; }
.tile-add:hover small, .tile-add:focus-visible small { color: var(--ink); }
.tile-add:active { transform: scale(.96); }
.tiles-foot { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; flex-wrap: wrap; }
.tiles-foot .btn { margin: 0; }
.today-link { display: inline-block; margin: -0.5rem 0 0.25rem; }

.xpage-nav { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin: -0.65rem 0 1.15rem; }
.xsheet-nav {
  width: 2.5rem; height: 2.5rem; padding: 0; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); font-size: 1.35rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.xsheet-nav:disabled { opacity: .35; cursor: default; }
.xsheet-nav:not(:disabled):hover { border-color: var(--sky); color: var(--sky); }
.xsheet-pos { color: var(--muted); font-size: 0.85rem; min-width: 3.5rem; text-align: center; }
.xsheet-body { display: grid; gap: 1rem; }
.xsheet-demo .howto { margin: 0; border: 0; }
.howto-fixed .howto-title { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.xsheet-log .pad { margin: 0; }
.xsheet-nodemo { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px dashed var(--line); border-radius: 1rem; }
.xsheet-nodemo .xthumb { width: 4.5rem; height: 4.5rem; flex: none; }
@media (min-width: 900px) {
  .narrow:has(> .xpage-nav) { width: 100%; max-width: 52rem; padding-inline: 1.5rem; }
  .xsheet-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
}
@media (max-width: 899px) {
  .xsheet-log { order: -1; }
  .xsheet-demo .howto-media .ex-vid, .xsheet-demo .howto-media > svg { max-height: 34vh; width: auto; }
}

/* ---- Today v2: grouped section cards ---- */
.scard {
  --sc: var(--lime); --sc-tint: rgba(74,222,90,.12);
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem;
  padding: 1rem 1rem 0.9rem 1.15rem; overflow: hidden;
}
.scard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc); opacity: .85; }
.scard.sc-blue { --sc: var(--sky); --sc-tint: rgba(56,189,248,.13); }
.scard.sc-amber { --sc: var(--orange); --sc-tint: var(--orange-tint); }
.dash-block.scard + .dash-block.scard, .today-main > .scard + *, .today-side > .scard + .scard { margin-top: 1.25rem; }
.scard .section-title { margin-bottom: 0.8rem; }
.scard .section-title h2 { font-size: 1.15rem; font-weight: 700; gap: 0.55rem; }
.scard .section-ico { width: 1.9rem; height: 1.9rem; border-radius: 0.6rem; align-items: center; justify-content: center; background: var(--sc-tint); }
.scard .section-ico .icon, .scard .section-ico svg { width: 1.05rem; height: 1.05rem; color: var(--sc); }
.sec-act { flex: none; font-size: 0.85rem; font-weight: 600; color: var(--sc); text-decoration: none; background: none; border: 0; padding: 0.25rem 0; cursor: pointer; font-family: inherit; }
.sec-act:hover { text-decoration: underline; }
.scard .tile, .scard .tcard { background: var(--raised); }
.scard .tile-add { background: rgba(255,255,255,.04); }
.scard .tile.met { background: linear-gradient(90deg, rgba(74,222,90,.08), var(--raised) 60%); }
/* routine dropdown */
.rpick-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.55rem; }
.rpick { position: relative; }
.rpick-btn {
  list-style: none; display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
  padding: 0.4rem 0.7rem 0.4rem 0.8rem; border-radius: 0.7rem; border: 1px solid var(--line); background: var(--raised);
  font-weight: 650; font-size: 0.95rem; color: var(--fg);
}
.rpick-btn::-webkit-details-marker { display: none; }
.rpick-btn:hover { border-color: var(--muted); }
.rpick-chev { width: 1rem; height: 1rem; color: var(--lime); transition: transform .15s; }
.rpick[open] .rpick-chev { transform: rotate(180deg); }
.rmenu {
  position: absolute; z-index: 30; top: calc(100% + 0.35rem); left: 0; min-width: 14rem; padding: 0.35rem;
  background: var(--raised); border: 1px solid var(--line); border-radius: 0.9rem; box-shadow: 0 12px 32px rgba(0,0,0,.5);
  display: grid; gap: 0.1rem;
}
.rmenu-item {
  display: flex; align-items: center; gap: 0.55rem; width: 100%; padding: 0.6rem 0.7rem; border: 0; border-radius: 0.6rem;
  background: transparent; color: var(--fg); font: inherit; font-size: 0.93rem; text-align: left; cursor: pointer; text-decoration: none;
}
.rmenu-item:hover, .rmenu-item:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.rmenu-item.on { color: var(--lime); font-weight: 650; }
.rmenu-item.on::after { content: "✓"; margin-left: 0.25rem; }
.rmenu-name { flex: 1; }
.rmenu-n { font-size: 0.75rem; color: var(--muted); }
.rmenu-item.locked { color: var(--muted); }
.rmenu-item.locked svg { width: 0.9rem; height: 0.9rem; }
.rmenu-manage { border-top: 1px solid var(--line); border-radius: 0 0 0.6rem 0.6rem; margin-top: 0.2rem; color: var(--muted); font-size: 0.85rem; }
.rsum { display: grid; gap: 0.35rem; margin: 0.2rem 0 0.8rem; }
.rsum-txt { margin: 0; font-size: 0.85rem; color: var(--muted); }
.rsum-txt b { color: var(--fg); }
.rsum-bar { display: block; height: 4px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.rsum-bar i { display: block; height: 100%; background: var(--lime); border-radius: 4px; }
.scard-foot { display: flex; gap: 1.25rem; margin-top: 0.75rem; }
.add-link { font-size: 0.85rem; font-weight: 600; color: var(--lime); text-decoration: none; }
.add-link.muted-link { color: var(--muted); }
.add-link:hover { text-decoration: underline; }
/* rest chip in header */
.rest-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.5rem; vertical-align: middle;
  padding: 0.2rem 0.6rem; border-radius: 99px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.rest-chip:hover:not(:disabled) { border-color: var(--sky); color: var(--sky); }
.rest-chip.on { border-color: var(--sky); color: var(--sky); background: rgba(56,189,248,.1); }
.rest-chip:disabled { opacity: .45; cursor: default; }
.rest-left { opacity: .7; font-weight: 500; }
/* workouts as one horizontal row */
.sc-blue .tcards { display: flex; gap: 0.6rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.2rem; scrollbar-width: thin; }
.sc-blue .tcards > * { flex: 0 0 min(17rem, 82%); scroll-snap-align: start; }
.sc-blue .tcards > *:only-child { flex-basis: 100%; }
.scard .tcard { min-height: 68px; padding: 0.8rem; }
.scard .tcard b { font-size: 0.95rem; }
.scard .ql-extra h3 { font-size: 0.9rem; }
.scard { overflow: visible; box-shadow: inset 3px 0 0 var(--sc); }
.scard::before { display: none; }
.scard.today-log { z-index: 2; }
.today-side { margin-top: 1.25rem; }
@media (min-width: 900px) { .today-side { margin-top: 0; } }
@media (max-width: 899px) { .rest-chip { margin-left: 0; margin-top: 0.4rem; } .daybar .rest-chip { display: flex; width: max-content; } }

/* small row thumbnails (library, picker, search, quick log, routine editor) */
.row-thumb { flex: 0 0 3.25rem; width: 3.25rem; height: 3.25rem; }
.row-thumb.sm { flex-basis: 2.25rem; width: 2.25rem; height: 2.25rem; font-size: 0.9rem; }
.lib-row .row-thumb { flex-basis: 3.5rem; width: 3.5rem; height: 3.5rem; }
.rowitem > .row-thumb { order: -1; }
.rowitem .row-grow { flex: 1; min-width: 0; }

/* goal stepper in the library action bar */
.goal-step { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.35rem 0.75rem; margin: 0 0 0.6rem; }
.goal-step-label { font-size: 0.9rem; font-weight: 600; color: var(--fg); }
.goal-side { font-size: 0.75rem; font-weight: 600; color: var(--sky); margin-left: 0.25rem; }
.goal-step-ctl { display: flex; align-items: center; gap: 0.4rem; }
.goal-btn {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: var(--raised);
  color: var(--lime); font: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.goal-btn:hover:not(:disabled) { border-color: var(--lime); }
.goal-btn:disabled { opacity: .35; cursor: default; }
.goal-step-ctl input[data-lib-goal] {
  width: 4.2rem; height: 2.5rem; padding: 0 0.4rem; text-align: center; font: inherit; font-size: 1.05rem; font-weight: 700;
  color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 0.7rem;
}
.goal-step-ctl input[data-lib-goal]:focus { outline: 2px solid var(--lime); outline-offset: 1px; }
.goal-unit { min-width: 2.6rem; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.goal-step .lib-side { flex: 0 0 100%; margin: 0; text-align: right; }
.lib-action { padding-bottom: 0.25rem; }


/* press-and-hold reorder on Today */
ul.tiles[data-reorder] > li.tile { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
li.tile.tile-lift {
  position: fixed; z-index: 70; margin: 0; pointer-events: none;
  transform: scale(1.025); box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 0 1.5px var(--lime);
  transition: transform .12s ease, box-shadow .12s ease; cursor: grabbing;
}
li.tile-ph {
  list-style: none; border: 1.5px dashed rgba(74,222,90,.45); border-radius: 1rem; background: rgba(74,222,90,.05);
}
html.tile-dragging, html.tile-dragging * { cursor: grabbing !important; }
html.tile-dragging body { overscroll-behavior: none; }
.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; }

/* vertical Workouts / Challenges tiles on Today (same shape as routine tiles) */
.ltiles { margin-top: 0; }
.ltile .tile-main { text-decoration: none; color: var(--fg); padding-right: 0.8rem; }
.ltile .tile-pic { width: 2.75rem; height: 2.75rem; }
.ltile-ico { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--sc-tint, var(--raised)); color: var(--sc, var(--lime)); box-shadow: inset 0 0 0 1.5px rgba(147,161,151,.22); }
.ltile-ico .icon, .ltile-ico svg { width: 1.2rem; height: 1.2rem; }
.ltile { min-height: 3.75rem; }
.ltile .tile-bar i { background: var(--sc, var(--lime)); }
.ltile-side { flex: none; display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.5rem; font-size: 0.75rem; color: var(--muted); }
.ltile-lock svg { width: 0.85rem; height: 0.85rem; }
.ltile-txt { font-weight: 600; color: var(--lime); }
.ltile-done { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--lime); color: var(--ink); justify-content: center; }
.ltile-done svg { width: 0.85rem; height: 0.85rem; }
.ltile.locked .tile-txt b { color: var(--muted); }
.ltile.met { border-color: color-mix(in srgb, var(--sc, var(--lime)) 45%, transparent); }
.ltiles-note { margin: -0.35rem 0 0.55rem; }
.scard .tiles.ltiles .tile { background: var(--raised); }
.ltile .tile-prog { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltile .tile-bar { background: rgba(255,255,255,.08); margin-top: 0.1rem; }

/* Today: swipe left to reveal Remove */
.tile { position: relative; }
.tile-slide { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; align-items: stretch; background: inherit; border-radius: inherit; transition: transform .2s ease; touch-action: pan-y; }
.tile.swiping .tile-slide { transition: none; }
.tile-rm { display: none; }
ul.tiles[data-swipe] > li.tile > .tile-rm {
  position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  border: 0; background: #e5484d; color: #fff; font: inherit; font-size: 0.78rem; font-weight: 650; cursor: pointer;
}
.tile-rm svg { width: 1.15rem; height: 1.15rem; }
.tile.swiped, .tile.swiping { border-color: rgba(229,72,77,.55); }
.tile-lift .tile-slide { transform: none !important; }
.rm-ov { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background: rgba(5,8,6,.66); animation: rmFade .15s ease; }
.rm-dlg { width: 100%; max-width: 22rem; padding: 1.2rem 1.2rem 1rem; border: 1px solid var(--line); border-radius: 1.1rem; background: var(--surface); color: var(--fg); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.rm-dlg h2 { margin: 0 0 .45rem; font-size: 1.08rem; line-height: 1.3; }
.rm-dlg p { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.rm-btns { display: flex; gap: .6rem; justify-content: flex-end; }
.rm-btns .btn { height: 2.75rem; padding: 0 1rem; font-size: .95rem; flex: 1; }
.btn.rm-go { background: #e5484d; color: #fff; }
@keyframes rmFade { from { opacity: 0; } to { opacity: 1; } }
ul.tiles[data-swipe] > li.tile:not(.swiped):not(.swiping) > .tile-rm { visibility: hidden; }
.rm-btns .btn { white-space: nowrap; }

/* You: settings page */
.you-grid { display: grid; gap: 1.1rem; }
.you-col { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
@media (min-width: 900px) {
  .you-grid { max-width: 62rem; }
  .you-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
}
.you-ad {
  position: relative; overflow: hidden; display: grid; gap: .55rem; padding: 1.15rem 1.15rem 1rem;
  border-radius: 1.1rem; border: 1px solid rgba(74,222,90,.28); color: var(--fg); text-decoration: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(56,189,248,.22), transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(74,222,90,.16), transparent 60%), linear-gradient(160deg, #18211b, #0e130f);
}
.you-ad-kicker { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.you-ad h2 { margin: 0; font-family: var(--display); font-size: 2rem; line-height: 1; letter-spacing: .01em; }
.you-ad ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; color: var(--muted); font-size: .9rem; }
.you-ad li { position: relative; padding-left: 1.2rem; }
.you-ad li::before { content: ""; position: absolute; left: 0; top: .45em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--lime); }
.you-ad-cta { justify-self: start; margin-top: .35rem; padding: .6rem 1.1rem; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 750; }
.you-ad:hover .you-ad-cta, .you-ad:focus-visible .you-ad-cta { filter: brightness(1.06); }
.you-prorow, .you-badges, .set-row {
  display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 3.6rem; padding: .7rem .9rem;
  color: var(--fg); text-decoration: none; text-align: left; font: inherit; background: transparent; border: 0;
}
.you-prorow, .you-badges { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.you-prorow { border-color: rgba(74,222,90,.3); }
.you-manage { margin-left: auto; color: var(--lime); font-weight: 650; font-size: .9rem; white-space: nowrap; }
.set-txt { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.set-txt b { font-weight: 650; }
.set-txt .muted { font-size: .84rem; }
.set-ic { flex: none; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .7rem; background: var(--raised); color: var(--sky); }
.set-ic .icon { width: 1.2rem; height: 1.2rem; }
.you-badges .set-ic { color: var(--lime); background: var(--lime-tint); }
.set-chev { flex: none; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.set-side { flex: none; font-size: .88rem; font-weight: 650; }
.you-badge-row { display: flex; gap: .3rem; }
.badge-mini { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--lime); color: var(--ink); }
.badge-mini svg { width: 1.1rem; height: 1.1rem; }
.set-group { display: grid; gap: .45rem; }
.set-head { margin: 0 .2rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.set-list { display: grid; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); overflow: hidden; }
.set-list > * + * { border-top: 1px solid var(--line); }
.set-row { border-radius: 0; cursor: pointer; }
.set-row.static { cursor: default; }
.set-row:hover:not(.static), .set-row:focus-visible { background: var(--raised); }
.set-row.danger .set-ic { color: var(--ember); background: rgba(255,92,56,.12); }
.set-row.danger b { color: var(--ember); }
.set-form { padding: .9rem; display: grid; gap: .2rem; }
.set-form .field { margin-bottom: .5rem; }
.set-form .row { margin-top: .2rem; }
.set-email { margin: 0 0 .3rem; font-size: .88rem; }
.set-toggle { padding: 0 .9rem; }
.set-toggle .toggle { margin: .7rem 0; }
.set-eqs .toggle { margin: 0; padding: .8rem .9rem; }
.set-eqs .toggle[disabled] { opacity: .7; }
.you-sign { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; }
.you-sign .icon { width: 1.1rem; height: 1.1rem; }

.set-seg { display: flex; flex-wrap: wrap; gap: .5rem; }
.you-ad .pro-pill, .you-prorow .pro-pill { display: inline-block; padding: .15rem .45rem; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: .68rem; font-weight: 800; letter-spacing: .06em; line-height: 1.2; }
.you-prorow .pro-pill { flex: none; }
.set-txt .muted { overflow-wrap: anywhere; }

/* Brand gradient (logo: #4ade5a top-left -> #e8f53a bottom-right). Small text/icons stay solid var(--lime). */
.btn:not(.ghost) {
  background: var(--lime) var(--brand-grad);
  color: var(--ink);
  box-shadow: var(--brand-glow), inset 0 1px 0 rgba(255,255,255,.22);
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
}
.btn:not(.ghost):not(:disabled):hover { background: var(--lime-hover) var(--brand-grad-hover); box-shadow: var(--brand-glow-hover), inset 0 1px 0 rgba(255,255,255,.26); }
.btn:not(.ghost):not(:disabled):active { background: var(--lime-press) var(--brand-grad-press); box-shadow: 0 2px 8px rgba(74,222,90,.2), inset 0 1px 2px rgba(4,33,11,.18); transform: translateY(1px); }
.btn:not(.ghost):disabled { background: var(--raised); color: var(--muted); box-shadow: none; text-shadow: none; opacity: 1; }
.you-ad-cta, .add { background: var(--lime) var(--brand-grad); box-shadow: var(--brand-glow); }
.switch.on,
.toggle input:checked,
.toggle .switch:has(input:checked) { background: var(--lime) var(--brand-grad); }
.bar span, .bartrack span, .strip-bar span, .strip-row.met .strip-bar span, .rsum-bar i { background: var(--lime) var(--brand-grad); }
.badge-mark { background: var(--lime) var(--brand-grad); }
.badge.locked .badge-mark { background: var(--raised); }
.you-ad .pro-pill, .you-prorow .pro-pill { background: var(--lime) var(--brand-grad); }

/* Onboarding selection: one look for every selected card (subtle gradient border); unselected cards neutral. */
.setup-option .setup-ico,
.setup-option .setup-ico .icon { background: var(--raised); color: var(--muted); }
.setup-option .setup-ico .icon { background: none; }
button.setup-eq .eq-icon, .setup-eq button .eq-icon { color: var(--muted); }
.setup-option[aria-checked="true"],
.setup-eq button[aria-pressed="true"],
button.setup-eq[aria-pressed="true"] {
  border: 2px solid transparent;
  background: linear-gradient(rgba(74,222,90,.12), rgba(74,222,90,.12)) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box;
  color: var(--fg);
  box-shadow: 0 0 0 1px rgba(74,222,90,.08);
}
.setup-option[aria-checked="true"] .setup-opt-text,
.setup-option[aria-checked="true"] .setup-opt-text b,
.setup-option[aria-checked="true"] > b,
.setup-eq button[aria-pressed="true"] > span,
button.setup-eq[aria-pressed="true"] > span { color: var(--fg); }
.setup-option[aria-checked="true"] .setup-opt-text span,
.setup-option[aria-checked="true"] > span:not(.setup-ico):not(.setup-opt-text) { color: rgba(243,246,241,.78); }
button.setup-eq[aria-pressed="true"] > span, .setup-eq button[aria-pressed="true"] > span { font-weight: 650; }
.setup-option[aria-checked="true"] .setup-ico { background: rgba(74,222,90,.14); color: var(--lime); }
.setup-option[aria-checked="true"] .setup-ico .icon,
.setup-eq button[aria-pressed="true"] .eq-icon,
button.setup-eq[aria-pressed="true"] .eq-icon { color: var(--lime); background: none; }
.setup-option[aria-checked="true"]::after,
.setup-eq button[aria-pressed="true"]::after,
button.setup-eq[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  bottom: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2 5.9 9.55 10.6 4.6' fill='none' stroke='%2304210b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat, var(--brand-grad);
  background-color: var(--lime);
  pointer-events: none;
}
.setup-option[aria-checked="true"]::after { top: 0.7rem; right: 0.7rem; }
button.setup-eq.has-rec[aria-pressed="true"]::after { top: auto; bottom: 0.45rem; }
button.setup-eq[aria-pressed="true"] .setup-rec, .setup-eq button[aria-pressed="true"] .setup-rec { background: var(--lime) var(--brand-grad); color: var(--ink); }

/* Notifications step: match other onboarding steps' sizing on a 390px phone. */
@media (max-width: 390px) {
  .setup-bell-wrap {
    width: 4.25rem;
    height: 4.25rem;
    margin: 1rem auto 1rem;
    box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.06);
  }
  .setup-bell,
  .setup-bell-wrap .icon {
    width: 32px;
    height: 32px;
  }
  .setup-notify-title { font-size: 1.35rem; }
  .setup-notify-copy { font-size: 0.95rem; }
  .setup .field input[type="time"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
  }
}
