:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #12151b;
  --muted: #5d6573;
  --border: #e1e4ea;
  --accent: #5a7d00;
  --accent-bg: #c6f432;
  --accent-ink: #0f1115;
  --beginner: #1f8a4c;
  --intermediate: #b26b00;
  --expert: #c0392b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #20242d;
    --text: #eef1f5;
    --muted: #9aa3b2;
    --border: #2a2f3a;
    --accent: #c6f432;
    --beginner: #4ade80;
    --intermediate: #fbbf24;
    --expert: #f87171;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #20242d;
  --text: #eef1f5;
  --muted: #9aa3b2;
  --border: #2a2f3a;
  --accent: #c6f432;
  --beginner: #4ade80;
  --intermediate: #fbbf24;
  --expert: #f87171;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main:focus { outline: none; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.brand b { font-weight: 800; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; flex: none;
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a { padding: 8px 10px; }
}

/* Hero */
.hero { padding: 48px 0 24px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent-bg); color: var(--accent-ink); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.search {
  display: flex; align-items: center; gap: 8px; max-width: 560px; margin-top: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px 4px 16px; box-shadow: var(--shadow);
}
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; padding: 10px 0; outline: none;
}
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font-size: .9rem; }
.stat b { font-size: 1.1rem; display: block; }

/* Sections */
.section { padding: 28px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; }

/* Muscle cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; font-size: .9rem; color: var(--muted); }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.nick { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* Animated exercise motion (two frames) */
.motion { position: relative; aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.motion img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity .35s ease;
}
.motion img.f1 { opacity: 0; }
.tick .motion.auto img.f1 { opacity: 1; }
.tick .motion.auto img.f0 { opacity: 0; }
.motion.show-1 img.f1 { opacity: 1; }
.motion.show-1 img.f0 { opacity: 0; }
.motion .badge-anim {
  position: absolute; left: 10px; bottom: 10px; background: rgba(15,17,21,.75); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .03em;
}

/* Pills / chips */
.pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); text-transform: capitalize; white-space: nowrap;
}
.pill.beginner { color: var(--beginner); }
.pill.intermediate { color: var(--intermediate); }
.pill.expert { color: var(--expert); }
.pill.accent { background: var(--accent-bg); color: var(--accent-ink); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-right: 10px; }
.filter-group > span { font-size: .8rem; font-weight: 700; color: var(--muted); margin-right: 2px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Breadcrumb */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 20px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--text); }

/* Muscle page header */
.muscle-head { padding: 12px 0 8px; display: grid; gap: 24px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.info-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.info-box h3 { margin-top: 0; }
.info-box ul { margin: 0; padding-left: 18px; }
.info-box li { margin-bottom: 6px; }
@media (max-width: 800px) { .muscle-head { grid-template-columns: 1fr; } }

/* Exercise detail */
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; padding: 16px 0 8px; align-items: start; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.player { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 76px; }
@media (max-width: 860px) { .player { position: static; } }
.player-controls { display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.player-controls .label { font-size: .8rem; color: var(--muted); font-weight: 600; margin-left: auto; }
.btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: .88rem;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn.primary { background: var(--accent-bg); color: var(--accent-ink); border-color: transparent; }
.btn:hover { border-color: var(--accent); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }
.steps li {
  counter-increment: step; position: relative; padding: 12px 14px 12px 52px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 12px; top: 11px; width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent-ink); font-weight: 800; font-size: .85rem; display: grid; place-items: center;
}
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0 20px; }
.kv div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.kv small { display: block; color: var(--muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.kv b { text-transform: capitalize; }
.callout { border-left: 4px solid var(--accent-bg); background: var(--surface); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 0 0 16px; }
.callout p:last-child { margin: 0; }

/* Rest timer */
.timer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timer-display { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.6rem; min-width: 70px; }

/* Plans */
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.plan-days { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 14px; }
.day { background: var(--surface-2); border-radius: 12px; padding: 14px; }
.day h3 { margin-bottom: 8px; }
.day ol { margin: 0; padding-left: 20px; }
.day li { margin-bottom: 6px; }
.day li a { font-weight: 600; }
.day li small { color: var(--muted); display: block; }

.basics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 24px 0 40px; font-size: .9rem; }
.footer p { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  .motion img { transition: none; }
  .card { transition: none; }
}

/* ---------- Cartoon exercise rig ---------- */
:root {
  --rig-bg1: #eef6ff; --rig-bg2: #f8fbff; --rig-ground: #dfe7f1;
  --rig-skin: #f2b98b; --rig-skin-far: #d99a6c;
  --rig-shirt: #2563eb; --rig-shorts: #1f2937; --rig-shorts-far: #374151;
  --rig-shoe: #111827; --rig-hair: #2b1b10;
  --rig-hl: #ff3b30;
  --rig-metal: #94a3b8; --rig-pad: #334155; --rig-wood: #b7814a; --rig-stack: #475569;
  --rig-iron: #1f2937;
}
:root[data-theme="dark"] { --rig-bg1: #1b2230; --rig-bg2: #151a23; --rig-ground: #283142; --rig-metal: #64748b; --rig-pad: #0b1220; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --rig-bg1: #1b2230; --rig-bg2: #151a23; --rig-ground: #283142; --rig-metal: #64748b; --rig-pad: #0b1220; }
}
svg.rig { display: block; width: 100%; height: 100%; }
.rig line { stroke-linecap: round; }
.rp-bg { fill: var(--rig-bg1); }
.rp-ground { fill: var(--rig-ground); }
.rp-shadow { fill: rgba(0,0,0,.08); }
.rp-metal { fill: var(--rig-metal); }
.rp-pad { fill: var(--rig-pad); }
.rp-wood { fill: var(--rig-wood); }
.rp-stack { fill: var(--rig-stack); }
.rp-bar { stroke: var(--rig-metal); stroke-width: 4; }
.rp-post { stroke: var(--rig-metal); stroke-width: 5; }
.rp-pulley { fill: var(--rig-iron); }
.r-cable { stroke: #64748b; stroke-width: 1.6; }
.r-skin { stroke: var(--rig-skin); }
.r-skin-fill { fill: var(--rig-skin); }
.far .r-skin { stroke: var(--rig-skin-far); }
.far .r-skin-fill { fill: var(--rig-skin-far); }
.r-shirt { stroke: var(--rig-shirt); }
.r-shirt-fill { fill: var(--rig-shirt); stroke: var(--rig-shirt); stroke-width: 8; stroke-linejoin: round; }
.r-shorts { stroke: var(--rig-shorts); }
.far .r-shorts { stroke: var(--rig-shorts-far); }
.r-shoe { stroke: var(--rig-shoe); }
.r-hair { fill: var(--rig-hair); }
.r-eye { fill: #111; }
.r-mouth { fill: none; stroke: #7a3b1d; stroke-width: 1.4; stroke-linecap: round; }
.r-hl { stroke: var(--rig-hl); animation: hl-pulse 1.2s ease-in-out infinite; }
.r-hl-fill { fill: var(--rig-hl); stroke: var(--rig-hl); stroke-width: 8; stroke-linejoin: round; animation: hl-pulse 1.2s ease-in-out infinite; }
.far .r-hl { opacity: .35; animation: none; }
@keyframes hl-pulse { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }
.r-db, .r-plate { fill: var(--rig-iron); }
.r-db-bar { fill: #9ca3af; }
.r-barbell { stroke: #6b7280; stroke-width: 4; }
.r-plate-rect { fill: var(--rig-iron); }
.r-platform { stroke: var(--rig-pad); stroke-width: 6; }
.r-band { fill: none; stroke: #ef4444; stroke-width: 3; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .r-hl, .r-hl-fill { animation: none; opacity: .6; } }

/* ---------- v2: gym plan, mobile, workout mode ---------- */
.hidden { display: none !important; }
.small { font-size: .85rem; }
.link { font-weight: 700; text-decoration: none; color: var(--accent); }
.free-badge { font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-ink); white-space: nowrap; }
.btn.big { padding: 12px 20px; font-size: 1rem; }
.btn.huge { padding: 16px 28px; font-size: 1.15rem; width: 100%; justify-content: center; border-radius: 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-row.center { justify-content: center; }
.card { position: relative; }
.motion.photo { background: #fff; }
.motion.rig-host { background: var(--rig-bg1); }
.motion.rig-host svg { position: absolute; inset: 0; }
.anim-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--accent-bg); color: var(--accent-ink); font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.nick-inline { font-weight: 600; font-size: .5em; }

/* Bottom tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 820px) {
  .nav { display: none; }
  .free-badge { margin-left: auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 700; padding: 4px 0; border-radius: 12px; }
  .tabbar svg { width: 24px; height: 24px; fill: currentColor; }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active svg { color: var(--accent); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.in-workout .tabbar { display: none; }
  body.in-workout { padding-bottom: 0; }
}
@media (max-width: 560px) { .brand span { display: inline; font-size: .95rem; } }

/* Today hero */
.hero-today { padding: 20px 0 8px; }
.today-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: stretch;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
  border-top: 6px solid var(--day);
}
.today-anim { position: relative; aspect-ratio: 10 / 9; background: var(--rig-bg1); }
.today-anim svg { position: absolute; inset: 0; }
.today-info { padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; }
.today-info h1 { margin-bottom: 6px; }
.today-info .lead { color: var(--muted); margin-bottom: 12px; }
@media (max-width: 720px) {
  .today-card { grid-template-columns: 1fr; }
  .today-anim { aspect-ratio: 4 / 3; }
  .today-info { padding: 16px; }
  .btn-row .btn.big { flex: 1; justify-content: center; }
}
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.progress span { display: block; height: 100%; background: var(--day, var(--accent-bg)); border-radius: inherit; transition: width .3s ease; }

/* Week strip */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.week-strip { scrollbar-width: none; }
.week-strip::-webkit-scrollbar { display: none; }
.week-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); min-width: 0;
}
.week-day .wd { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.week-day .we { font-size: 1.3rem; line-height: 1.2; }
.week-day .wn { font-size: .74rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.week-day.today { border-color: var(--day); box-shadow: inset 0 0 0 1px var(--day); }
.week-day.active { background: var(--day); color: #fff; border-color: var(--day); }
.week-day.active .wd { color: rgba(255,255,255,.85); }
@media (max-width: 560px) {
  .week-strip { grid-template-columns: repeat(7, 64px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin-right: -16px; padding-right: 16px; }
  .week-day { scroll-snap-align: start; }
}

/* How it works */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.how-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.how-item p { margin: 0; font-size: .85rem; color: var(--muted); }
.how-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); font-weight: 900; font-size: .85rem; }
.hl-dot { display: inline-block; width: 14px; height: 14px; border-radius: 999px; background: var(--rig-hl); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rig-hl) 25%, transparent); vertical-align: middle; }
.how-ico.hl-dot { width: 18px; height: 18px; margin: 12px; }
@media (max-width: 720px) { .how { grid-template-columns: 1fr; } }

/* Plan list */
.plan-list { display: grid; gap: 10px; }
.plan-row {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 16px 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--day); border-radius: 14px;
}
.plan-row.today { box-shadow: 0 0 0 2px var(--day); }
.pr-day { font-weight: 800; color: var(--muted); font-size: .85rem; text-transform: uppercase; }
.pr-name { font-weight: 800; font-size: 1.1rem; }
.pr-meta { color: var(--muted); font-size: .85rem; }
@media (max-width: 600px) { .plan-row { grid-template-columns: 1fr; gap: 2px; } }

/* Day page */
.day-head { padding: 16px 0 4px; }
.day-head .lead { color: var(--muted); }
.day-head .callout { margin-top: 16px; }
.ex-list { display: grid; gap: 14px; }
.ex-row {
  display: grid; grid-template-columns: 240px 1fr; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
}
.ex-media { display: block; position: relative; }
.ex-media .motion { height: 100%; aspect-ratio: auto; min-height: 180px; }
.ex-info { padding: 14px 16px; position: relative; }
.ex-info h3 { font-size: 1.15rem; margin: 0 0 2px; padding-right: 40px; }
.ex-info h3 a { text-decoration: none; }
.ex-num { position: absolute; top: 12px; right: 14px; font-weight: 900; color: var(--muted); font-size: .9rem; }
.dose { font-weight: 800; font-size: 1.05rem; margin: 0 0 10px; }
.sets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.set {
  border: 2px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 800;
  padding: 12px 6px; border-radius: 12px; cursor: pointer; transition: background .15s, border-color .15s;
}
.set.on { background: #10b981; border-color: #10b981; color: #fff; }
.set.on::before { content: "\2713  "; }
.weight { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.weight input { width: 80px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--bg); color: var(--text); }
.finisher-title { margin: 14px 0 0; }
@media (max-width: 640px) {
  .ex-row { grid-template-columns: 1fr; }
  .ex-media .motion { aspect-ratio: 4 / 3; min-height: 0; }
}

/* Chips row (scrollable on phones) */
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 6px; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { text-decoration: none; white-space: nowrap; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (max-width: 640px) {
  .filters { flex-direction: column; gap: 10px; }
  .filter-group { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .filter-group::-webkit-scrollbar { display: none; }
  .filter-group .chip { white-space: nowrap; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 12px 12px; }
  .card-body h3 { font-size: .92rem; }
  .card-meta .pill:nth-child(n+2) { display: none; }
  .anim-badge { top: 6px; left: 6px; font-size: .62rem; }
}

/* Exercise player */
.view-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.vt { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; padding: 12px; cursor: pointer; }
.vt.on { color: var(--text); box-shadow: inset 0 -3px 0 var(--accent-bg); }
.stage { position: relative; }
.motion.big { aspect-ratio: 10 / 9; }
.rep-badge {
  position: absolute; top: 10px; right: 10px; background: rgba(15,17,21,.82); color: #fff; border-radius: 14px;
  padding: 6px 12px; text-align: center; line-height: 1; min-width: 56px;
}
.rep-badge span { font-size: 1.6rem; font-weight: 900; display: block; font-variant-numeric: tabular-nums; }
.rep-badge small { font-size: .65rem; font-weight: 700; opacity: .8; text-transform: uppercase; }
.cue { margin: 0; padding: 12px 14px; font-weight: 800; font-size: 1.05rem; text-align: center; background: var(--surface-2); min-height: 3.2em; display: grid; place-items: center; }
.legend { margin: 0; padding: 0 14px 12px; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.easy-steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 16px; }
.easy-steps li {
  counter-increment: step; position: relative; padding: 14px 14px 14px 58px; margin-bottom: 10px; font-size: 1.08rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; min-height: 56px; display: flex; align-items: center;
}
.easy-steps li::before {
  content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent-ink); font-weight: 900; display: grid; place-items: center;
}
.easy-steps.small li { font-size: .95rem; padding: 10px 12px 10px 52px; min-height: 0; }
details.more { margin: 0 0 16px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 6px 0; }

/* Guided workout */
.go { max-width: 640px; margin: 0 auto; padding: 12px 0 24px; }
.go-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.go-progress { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.go-progress span { display: block; height: 100%; background: var(--day); }
.go-body { text-align: center; }
.go-label { font-weight: 800; color: var(--muted); margin: 0 0 4px; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }
.go-title { font-size: clamp(1.5rem, 5vw, 2.1rem); margin-bottom: 12px; }
.go-stage { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.go-stage .motion { aspect-ratio: 10 / 9; }
.go .cue { border-radius: 14px; margin-top: 10px; }
.go-set { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0; font-size: 1.1rem; flex-wrap: wrap; }
.dot { width: 14px; height: 14px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--border); }
.dot.on { background: #10b981; border-color: #10b981; }
.dot.now { border-color: var(--day); background: color-mix(in srgb, var(--day) 30%, transparent); }
.go-actions { display: flex; gap: 10px; margin-top: 8px; }
.go-actions .btn:not(.huge) { flex: none; }
.go .easy-steps { text-align: left; }
.go-body.rest { padding-top: 20px; }
.ring { position: relative; width: 220px; height: 220px; margin: 16px auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--day); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.go-next { margin: 16px 0; font-size: 1.05rem; }
.go-body.done { position: relative; padding: 40px 0; overflow: hidden; }
.big-emoji { font-size: 5rem; margin: 0; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -10px; left: var(--x); width: 8px; height: 14px; background: var(--c); border-radius: 2px; animation: fall var(--d) linear infinite; }
@keyframes fall { to { transform: translateY(520px) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
