/* Fivefold. Dark first for the gym floor, one action colour, numbers in Space Grotesk. */
:root {
  --ground: #111214;
  --surface: #1A1C20;
  --raised: #23262B;
  --line: #2F3338;
  --divider: #2A2D32;
  --text: #F3F1EA;
  --muted: #B3B7BE;
  --subtle: #8C9199;
  --amber: #F5A524;
  --amber-hover: #FFC266;
  --amber-bg: #2B2414;
  --blue: #7AB2FF;
  --blue-bg: #15233A;
  --blue-text: #C9D6EA;
  --coral: #FF8A65;
  --coral-bg: #2A1914;
  --display: 'Space Grotesk', Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber); }
a:hover { color: var(--amber-hover); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.sidebar { display: none; }
.screen { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 16px calc(110px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.screen.no-tabs { padding-bottom: calc(24px + var(--safe-b)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 8px 6px calc(8px + var(--safe-b)); background: rgba(21, 23, 26, 0.96); backdrop-filter: blur(12px); border-top: 1px solid var(--divider); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; color: var(--subtle); text-decoration: none; font-size: 11px; font-weight: 600; }
.tabbar a[aria-current='page'] { color: var(--amber); }
@media (max-width: 999px) { .only-wide { display: none !important; } }

@media (min-width: 1000px) {
  .app { flex-direction: row; }
  .sidebar { display: flex; flex-direction: column; gap: 28px; width: 240px; flex: none; position: sticky; top: 0; height: 100dvh; padding: 28px 18px; background: #15171A; border-right: 1px solid #23262B; }
  .sidebar nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar nav a { height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 12px; text-decoration: none; }
  .sidebar nav a[aria-current='page'] { background: var(--raised); color: var(--text); font-weight: 600; }
  .sidebar nav a[aria-current='page'] svg { color: var(--amber); }
  .tabbar { display: none; }
  .screen, .screen.no-tabs { max-width: 1180px; padding: 32px 48px 48px; gap: 20px; }
  .screen.narrow { max-width: 640px; }
  .only-narrow { display: none !important; }
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.sync-state { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; color: var(--subtle); text-decoration: none; white-space: nowrap; }
.sync-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); flex: none; }
.sync-state.synced i { background: #7FD1AE; }
.sync-state.pending i { background: var(--amber); }
.sync-state.pending { color: var(--muted); }
.sync-state.failed i, .sync-state.removed i { background: var(--coral); }
.sync-state.failed, .sync-state.removed { color: #F3CDBF; }
.field-error { color: var(--coral); font-size: 13px; line-height: 1.4; margin: 0; }
.field-error:empty { display: none; }
.fix-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin: 6px 0; border-radius: var(--r-sm); background: var(--coral-bg); color: #F3CDBF; font-size: 14px; }
.fix-row .label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fix-row small { color: #F3CDBF; opacity: 0.85; font-size: 13px; line-height: 1.4; }
.fix-text { color: var(--coral); }
.card.session.needs-fix { border: 1px solid #5A2E22; }
.bw-list { display: flex; flex-direction: column; }
.bw-row { min-height: 52px; }

/* ---------- headings ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 4px; }
.page-head h1 { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.page-head p { font-size: 15px; color: var(--muted); margin-top: 2px; }
.mobile-brand { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 4px; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.topbar-title { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.topbar-title h1 { font-family: var(--display); font-size: 20px; font-weight: 600; }
.topbar-title span { font-size: 13px; color: var(--subtle); font-variant-numeric: tabular-nums; }
.section-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); padding: 0 4px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.flush { padding: 0 16px; gap: 0; }
.card h2 { font-family: var(--display); font-size: 20px; font-weight: 600; }
.card h3 { font-size: 15px; font-weight: 600; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--divider); }
.row:last-child { border-bottom: 0; }
.row .label { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 500; min-width: 0; }
.row .label small { font-size: 13px; color: var(--subtle); font-weight: 400; }
a.row { color: var(--text); text-decoration: none; }
.lift-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--divider); }
.lift-row .name { display: flex; flex-direction: column; gap: 2px; }
.lift-row .name b { font-size: 16px; font-weight: 600; }
.lift-row .name span { font-size: 13px; color: var(--subtle); }
.big { font-family: var(--display); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.big small { font-size: 14px; font-weight: 500; color: var(--muted); }
.notice { background: var(--blue-bg); border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; color: var(--blue-text); font-size: 14px; line-height: 1.45; }
.notice svg { color: var(--blue); flex: none; margin-top: 1px; }
.notice b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.notice.warn { background: var(--coral-bg); color: #F3CDBF; }
.notice.warn svg { color: var(--coral); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.pill.blue { background: var(--blue-bg); border-color: #2B4166; color: var(--blue-text); }
.chip-up { font-size: 12px; font-weight: 700; color: #111214; background: var(--amber); border-radius: 999px; padding: 3px 8px; }
.chip-repeat { font-size: 12px; font-weight: 700; color: var(--coral); border: 1.5px solid var(--coral); border-radius: 999px; padding: 2px 8px; }
.chip-reset { font-size: 12px; font-weight: 700; color: var(--blue); border: 1.5px solid var(--blue); border-radius: 999px; padding: 2px 8px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 20px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat span { font-size: 12px; color: var(--subtle); }
.stat b { font-family: var(--display); font-size: 20px; font-weight: 600; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid #3A3F46; background: transparent; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.btn:hover { color: var(--text); border-color: #50565F; }
.btn.primary { height: 56px; border: 0; background: var(--amber); color: #111214; font-weight: 700; font-size: 17px; border-radius: 16px; }
.btn.primary:hover { background: var(--amber-hover); color: #111214; }
.btn.small { height: 44px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.row > .btn.small, .fix-row > .btn.small { flex: none; white-space: nowrap; }
.btn.block { width: 100%; }
.btn.danger { color: var(--coral); border-color: #5A3328; }
.btn.amber-ghost { background: var(--amber-bg); border-color: #5A4520; color: var(--amber); height: 44px; }
.btn:disabled { opacity: 0.45; cursor: default; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.icon-btn:hover { color: var(--text); border-color: #50565F; }
.link-btn { background: none; border: 0; padding: 0; color: var(--amber); font-weight: 600; font-size: 15px; min-height: 44px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--divider); }
.seg button, .seg a { height: 38px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.seg [aria-pressed='true'], .seg [aria-current='page'] { background: #2E3137; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; min-width: 52px; padding: 0 12px; border-radius: 12px; border: 1px solid #3A3F46; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; }
.chip[aria-pressed='true'] { background: var(--amber); border-color: var(--amber); color: #111214; }
.chip.plate[aria-pressed='true'] { background: #E8E6DF; border-color: #E8E6DF; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days .chip { min-width: 0; padding: 0; }
.switch { width: 52px; height: 32px; flex: none; border-radius: 999px; border: 0; padding: 3px; background: #3A3F46; display: flex; justify-content: flex-start; transition: background 0.15s; }
.switch span { width: 26px; height: 26px; border-radius: 50%; background: #F3F1EA; }
.switch[aria-checked='true'] { background: var(--amber); justify-content: flex-end; }
.switch[aria-checked='true'] span { background: #111214; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .icon-btn { width: 44px; height: 44px; border-radius: 12px; background: var(--raised); }
.stepper-value { min-width: 78px; text-align: center; font-family: var(--display); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.radio-row { width: 100%; min-height: 60px; border: 0; border-bottom: 1px solid var(--divider); background: transparent; padding: 10px 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.radio-row:last-child { border-bottom: 0; }
.radio-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid #4A4F57; }
[aria-checked='true'] > .radio-dot { border: 7px solid var(--amber); }
.radio-row .label { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 600; }
.radio-row .label small { font-size: 13px; color: var(--subtle); font-weight: 400; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.input { height: 48px; border-radius: 12px; border: 1px solid #3A3F46; background: var(--ground); color: var(--text); padding: 0 14px; font-size: 16px; width: 100%; }
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.input.num-input { width: 104px; text-align: center; font-family: var(--display); font-weight: 600; font-size: 18px; }

/* ---------- workout ---------- */
.ex-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ex-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ex-head h2 { font-size: 16px; font-weight: 600; font-family: var(--body); }
.ex-head span { font-size: 13px; color: var(--subtle); }
.ex-weight { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px 0 10px; border: 0; background: transparent; color: var(--text); }
.ex-weight b { font-family: var(--display); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ex-weight small { font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tile { height: 56px; border-radius: var(--r-md); border: 1.5px solid #3A3F46; background: transparent; color: var(--subtle); font-family: var(--display); font-size: 20px; font-weight: 500; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tile.done { border-color: var(--amber); background: var(--amber); color: #111214; font-weight: 700; }
.tile.miss { border: 2px solid var(--coral); background: var(--coral-bg); color: var(--coral); font-weight: 700; }
.rest { position: sticky; bottom: calc(12px + var(--safe-b)); background: #1E2125; border: 1px solid #33373D; border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.45); }
.rest-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rest-time { font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rest-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.rest.over .rest-label { color: var(--amber); }
.rest-btns { display: flex; gap: 6px; }
.rest-btns button { min-width: 52px; height: 44px; border-radius: 12px; border: 1px solid #3A3F46; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; padding: 0 10px; }
.rest-bar { height: 6px; border-radius: 3px; background: #33373D; overflow: hidden; }
.rest-bar i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 3px; }
.warm-row { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--divider); }
.warm-check { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 2px solid #4A4F57; background: transparent; color: #111214; display: flex; align-items: center; justify-content: center; }
.warm-check[aria-pressed='true'] { background: var(--amber); border-color: var(--amber); }
.warm-row.next .warm-check { border-color: var(--amber); }
.warm-row.done .w { color: var(--subtle); }
.warm-row .w { width: 76px; font-family: var(--display); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.warm-row .r { width: 40px; color: var(--muted); }
.warm-row .p { flex: 1; text-align: right; font-size: 13px; color: var(--subtle); }
.warm-row.next .p { color: var(--amber); font-weight: 600; }

/* ---------- history ---------- */
.weeks { display: flex; flex-direction: column; gap: 6px; }
.weeks .wk { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; text-align: center; }
.weeks .wk > span:first-child { font-size: 12px; color: var(--subtle); text-align: left; }
.weeks .head span { font-size: 11px; font-weight: 600; color: var(--subtle); }
.cell { height: 34px; display: flex; align-items: center; justify-content: center; }
.cell i { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-style: normal; font-family: var(--display); font-weight: 700; font-size: 13px; }
.cell.k-rest i { width: 4px; height: 4px; border-radius: 50%; background: #3A3F46; }
.cell.k-done i { background: var(--amber); color: #111214; }
.cell.k-miss i { background: var(--coral-bg); border: 2px solid var(--coral); color: var(--coral); }
.cell.k-today i { border: 2px solid var(--amber); color: var(--amber); }
.cell.k-planned i { border: 1.5px dashed #4A4F57; color: var(--subtle); font-weight: 600; }
.cell.k-skipped i { width: 10px; height: 2px; border-radius: 1px; background: #4A4F57; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.session { display: flex; flex-direction: column; gap: 6px; }
.session-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.session-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #D5D3CC; }
.reps-miss { color: var(--coral); font-weight: 600; font-variant-numeric: tabular-nums; }
.reps-ok { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; color: var(--subtle); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; padding: 10px 12px 10px 0; }
td { padding: 12px 12px 12px 0; border-top: 1px solid var(--divider); }
td.miss { color: var(--coral); font-weight: 700; }

/* ---------- charts ---------- */
.chart { display: block; }
.chart .axis { font-family: var(--body); font-size: 12px; fill: var(--subtle); }
.chart .end-label { font-family: var(--body); font-size: 13px; font-weight: 600; }
.lift-link { display: flex; align-items: center; gap: 12px; min-height: 68px; border-bottom: 1px solid var(--divider); color: var(--text); text-decoration: none; }
.lift-link:last-child { border-bottom: 0; }
.lift-link .name { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lift-link .name b { font-size: 15px; font-weight: 600; }
.lift-link .name span { font-size: 13px; color: var(--subtle); }
.lift-link .name span.blue { color: var(--blue); font-weight: 600; }
.lift-link .now { width: 74px; text-align: right; font-family: var(--display); font-size: 20px; font-weight: 600; }
.lift-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; }
.lift-card:hover { color: var(--text); border-color: #50565F; }
.lift-card.reset { background: var(--blue-bg); border-color: #2B4166; }
.lift-card svg { width: 100%; height: 34px; }

/* ---------- week strip (today) ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--subtle); font-weight: 500; }
.week div.is-today { color: var(--text); font-weight: 700; }

/* ---------- modal ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.sheet { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 16px; margin-bottom: var(--safe-b); }
.sheet h2 { font-family: var(--display); font-size: 20px; font-weight: 600; }
.sheet p { color: var(--muted); font-size: 15px; line-height: 1.45; }
.sheet .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .backdrop { align-items: center; } }

.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%); z-index: 60; background: #2E3137; color: var(--text); border: 1px solid #3A3F46; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
@media (min-width: 1000px) { .toast { bottom: 32px; } }

/* ---------- setup ---------- */
.steps { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 6px; }
.steps i { height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--amber); }
.choice { width: 100%; text-align: left; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 14px 16px; display: flex; gap: 12px; align-items: center; min-height: 64px; }
.choice[aria-checked='true'] { border: 2px solid var(--amber); }
.choice .label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 16px; }
.choice .label small { font-weight: 400; font-size: 13px; color: var(--subtle); line-height: 1.4; }
.tpl-days { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.tpl-day { display: flex; gap: 12px; padding-top: 10px; border-top: 1px solid var(--divider); }
.tpl-day > b { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--raised); color: var(--amber); font: 700 13px var(--display); display: flex; align-items: center; justify-content: center; }
.tpl-day ul { flex: 1; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.tpl-day li { display: flex; justify-content: space-between; gap: 12px; }
.tpl-day li span { color: var(--muted); }

.bar-visual { width: 100%; height: 96px; }
.cues { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cues li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: #D5D3CC; }
.cues li b { font-family: var(--display); color: var(--amber); }
.empty { text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; padding: 20px 8px; }

/* ---------- exercise demos (js/figure.js) ---------- */
.demo { position: relative; display: block; width: 100%; aspect-ratio: 240 / 214; border-radius: var(--r-md); overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #1D2025 0%, #141619 70%); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.demo.paused::after { content: 'Paused. Tap to play'; position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--subtle); }
.demo-svg { display: block; width: 100%; height: 100%; }
.demo-svg line { stroke-linecap: round; }
.fg-near { stroke: #ECE9E2; }
.fg-torso { stroke: #DCE1E8; }
.fg-far { stroke: #6B7179; }
.fg-head, .fg-fill { fill: #ECE9E2; }
.fg-far-fill { fill: #6B7179; }
.plate { fill: #F5A524; fill-opacity: 0.88; stroke: #B87910; stroke-width: 1.5; }
.plate-ring { fill: none; stroke: #B87910; stroke-width: 1.2; }
.plate-hub { fill: #2A2D32; }
.db { fill: #F5A524; stroke: #B87910; stroke-width: 1.2; }
.db-head { stroke: #F5A524; }
.eq-bar { stroke: #9AA1AB; }
.eq-bar-end { fill: #9AA1AB; }
.eq-frame { stroke: #3B4047; }
.eq-pad, .eq-pad-round, .eq-block { fill: #343940; }
.eq-pad-line { stroke: #343940; }
.eq-floor { stroke: #2C3036; }
.eq-cable { stroke: #8C9199; }
.eq-pulley { fill: #23262B; stroke: #8C9199; stroke-width: 2; }
.demo-thumb { width: 64px; height: 57px; flex: none; border-radius: 10px; overflow: hidden; background: #16181C; }
.demo-thumb .demo-svg { width: 64px; height: 57px; }
.lib-row { gap: 12px; padding: 8px 0; }
.lib-row .label { flex: 1; }
.lib-tag { color: var(--amber); }
.card > .demo + h3 { margin-top: 4px; }
