/* Layout: trading-terminal shell. Left rail on wide screens, bottom tab bar on phones; content in panels on a two-column grid. */
:root {
  color-scheme: dark;
  /* Hard Evidence: charcoal black, gunmetal gray, antique gold */
  --bg: #0e0f11;
  --panel: #151619;
  --panel-2: #1b1d21;
  --raise: #23262b;
  --line: #2a2d32;
  --line-2: #3a3e45;
  --fg: #ecebe8;
  --fg-2: #b2b4b8;
  --muted: #898d94;
  --placeholder: #5c6068;
  --accent: #c9a55c;          /* antique gold: brand, PRs, all-time highs */
  --accent-ink: #19140a;
  --accent-soft: rgba(201, 165, 92, 0.13);
  --accent-line: rgba(201, 165, 92, 0.42);
  --up: #2fc57f;
  --up-ink: #05210f;
  --up-soft: rgba(47, 197, 127, 0.13);
  --up-line: rgba(47, 197, 127, 0.4);
  --down: #f25a5f;
  --down-soft: rgba(242, 90, 95, 0.13);
  --down-line: rgba(242, 90, 95, 0.45);
  --series: #4f8ff0;
  --on-series: #ffffff;
  --series-stripe: rgba(79, 143, 240, 0.22);
  --cat-1: #3987e5;
  --cat-2: #d95926;
  --cat-3: #199e70;
  --wk-1: #3987e5;
  --wk-2: #d95926;
  --wk-3: #199e70;
  --wk-4: #c98500;
  --wk-5: #d55181;
  --wk-6: #9085e9;
  --wk-7: #e66767;
  --wk-8: #2fa8a0;
  /* workout types: validated dark-palette steps; every use pairs the color with a code and an icon */
  --c-push: #d95926;
  --c-pull: #3987e5;
  --c-legs: #199e70;
  --c-upper: #9085e9;
  --c-lower: #d55181;
  --c-fullbody: #c98500;
  --c-core: #008300;
  --c-cardio: #e66767;
  --c-recovery: #8a94a3;
  --heat-1: rgba(79, 143, 240, 0.2);
  --heat-2: rgba(79, 143, 240, 0.36);
  --heat-3: rgba(79, 143, 240, 0.56);
  --heat-4: rgba(79, 143, 240, 0.8);
  --scrim: rgba(4, 4, 5, 0.7);
  --glass: rgba(21, 22, 25, 0.92);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  --tabbar-h: 62px;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.soft { color: var(--fg-2); }
.up { color: var(--up); } .down { color: var(--down); }

/* shell */
.shell { min-height: 100vh; }
.rail { display: none; }
.main { width: 100%; max-width: 1280px; margin: 0 auto; min-width: 0; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom, 0px)); }
.view { min-width: 0; }
@keyframes rise { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } * { scroll-behavior: auto !important; } }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); background: var(--glass); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 500; text-decoration: none; letter-spacing: .02em; border: 0; background: transparent; min-height: 48px; }
.tab .ic { width: 20px; height: 20px; }
.tab.on { color: var(--fg); }
.tab.on .ic { color: var(--accent); }
.tab-plus { width: 42px; height: 30px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.tab-plus .ic { color: var(--accent-ink) !important; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 23px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--fg-2); text-decoration: none; font-weight: 500; font-size: 14.5px; border: 0; background: transparent; width: 100%; text-align: left; min-height: 44px; }
.nav-item:hover { background: var(--panel-2); color: var(--fg); }
.nav-item.on { background: var(--raise); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav-item.on .ic { color: var(--accent); }
.rail-foot { margin-top: auto; display: grid; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--fg-2); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); display: inline-block; flex: none; }
.status.local i { background: var(--accent); }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
  .rail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 22px 14px 18px; border-right: 1px solid var(--line); background: var(--panel); }
  .tabbar { display: none; }
  .main { padding-inline: 32px; padding-block: 22px 64px; }
}

/* page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 8px 18px; }
.page-head h1 { font-family: var(--font-display); font-weight: 600; font-size: 36px; letter-spacing: .02em; line-height: .95; text-transform: uppercase; }
.eyebrow { font-family: var(--font-data); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ph-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mobile-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
@media (min-width: 960px) { .mobile-brand { display: none; } }

/* panels & grid */
.panel { --pad: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.panel-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cols.list-detail { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr); } }
.section-gap { margin-top: 16px; }
.section-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; margin: 28px 0 12px; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { background: var(--panel); padding: 14px 16px; min-width: 0; }
.kpi-label { font-family: var(--font-data); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); line-height: 1.35; }
.kpi-value { font-family: var(--font-display); font-size: 31px; font-weight: 600; line-height: 1.05; margin-top: 6px; overflow-wrap: anywhere; }
.kpi-value small { font-size: 15px; color: var(--fg-2); font-weight: 500; margin-left: 3px; }
.kpi-sub { font-size: 12.5px; margin-top: 4px; color: var(--fg-2); }

/* deltas, chips */
.delta { font-family: var(--font-data); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.delta.up { color: var(--up); } .delta.down { color: var(--down); } .delta.flat { color: var(--muted); }
.delta .tri { font-size: 9px; margin-right: 4px; position: relative; top: -1px; }
.delta .dl { color: var(--muted); font-weight: 400; font-family: var(--font-body); }
.pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 13.5px; }
.pill.up { background: var(--up-soft); } .pill.down { background: var(--down-soft); } .pill.flat { background: var(--panel-2); }
.delta.pill { white-space: normal; max-width: 100%; }
.kpi-sub .delta { white-space: normal; }
.kpi, .stat { position: relative; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-family: var(--font-data); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.chip.pr { background: var(--accent-soft); color: var(--accent); }
.chip.ath { background: var(--accent); color: var(--accent-ink); }
.chip.sample { border: 1px dashed var(--line-2); color: var(--fg-2); background: repeating-linear-gradient(135deg, transparent 0 4px, var(--panel-2) 4px 8px); }
.chip.plain { background: var(--panel-2); color: var(--fg-2); border: 1px solid var(--line); }
.ticker { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--raise); border: 1px solid var(--line-2); font-family: var(--font-data); font-weight: 600; font-size: 11.5px; letter-spacing: .06em; color: var(--fg); white-space: nowrap; }

/* controls */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; flex: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; color: var(--fg-2); padding: 0 11px; min-height: 32px; border-radius: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button:hover:not(.on) { color: var(--fg); }
.seg button.on { background: var(--raise); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg.data button { font-family: var(--font-data); font-size: 12.5px; }
.seg.sm button { min-height: 28px; padding: 0 9px; font-size: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg); font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--raise); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); background: var(--accent); }
.btn.danger { border-color: var(--down-line); color: var(--down); background: var(--down-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn.ghost:hover { color: var(--fg); background: var(--panel-2); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--fg-2); flex: none; }
.icon-btn:hover { color: var(--fg); background: var(--panel-2); }
.icon-btn.sm { width: 32px; height: 32px; }
.ic { width: 18px; height: 18px; flex: none; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 12px; color: var(--fg-2); font-weight: 500; }
.input { width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); font-size: 16px; }
.input::placeholder { color: var(--placeholder); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a9b3c1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea.input { min-height: 72px; resize: vertical; line-height: 1.4; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-row .grow { flex: 1 1 220px; min-width: 0; max-width: 380px; }

/* banners */
.banner { display: flex; gap: 10px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); border: 1px dashed var(--line-2); background: var(--panel); font-size: 13.5px; color: var(--fg-2); margin-bottom: 16px; }
.banner strong { color: var(--fg); font-weight: 600; }
.banner.warn { border: 1px solid var(--accent-line); background: var(--accent-soft); }
.banner.bad { border: 1px solid var(--down-line); background: var(--down-soft); }
.banner .txt { flex: 1 1 280px; min-width: 0; }

/* tables */
.tbl-wrap { overflow-x: auto; min-width: 0; position: relative; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-family: var(--font-data); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th.r { font-family: var(--font-data); }
.tbl .nw { white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td, .tbl tr.click:focus-visible td { background: var(--panel-2); }
.tbl .sets-cell { font-family: var(--font-data); font-size: 12.5px; color: var(--fg-2); min-width: 160px; }

/* charts */
.chart { position: relative; width: 100%; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.chart svg { display: block; overflow: visible; }
.chart svg:focus { outline: none; }
.chart svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-family: var(--font-data); font-size: 10.5px; }
.chart .base { stroke: var(--muted); stroke-dasharray: 2 4; stroke-width: 1; }
.chart .ath { stroke: var(--accent); stroke-dasharray: 6 4; stroke-width: 1; }
.chart .xh { stroke: var(--fg-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .tag-text { font-family: var(--font-data); font-size: 10.5px; font-weight: 600; }
.chart-empty { position: absolute; inset: 0 60px 26px 0; display: grid; place-items: center; color: var(--muted); font-size: 13.5px; text-align: center; padding: 0 20px; pointer-events: none; }
.tip { position: absolute; top: 4px; z-index: 5; pointer-events: none; background: var(--raise); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; font-size: 12.5px; width: max-content; min-width: 168px; max-width: min(250px, calc(100% - 8px)); box-shadow: var(--shadow); }
.tip-date { font-family: var(--font-data); font-size: 11px; color: var(--fg-2); margin-bottom: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tip-val { font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.1; }
.tip-rows { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 6px 0 0; }
.tip-rows dt { color: var(--muted); }
.tip-rows dd { margin: 0; text-align: right; font-family: var(--font-data); color: var(--fg); }
.chart-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; align-items: center; }
.chart-legend .k { display: inline-flex; align-items: center; gap: 6px; }
.lk { width: 16px; height: 0; border-top: 1px dashed var(--muted); display: inline-block; }
.lk.ath { border-top: 1px dashed var(--accent); }
.lk.pr { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); }

/* hero quote */
.quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.quote-name { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: .01em; margin-top: 8px; }
.quote { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin: 10px 0 14px; }
.figure { font-family: var(--font-display); font-weight: 600; font-size: clamp(42px, 8vw, 58px); line-height: .95; letter-spacing: .005em; }
.figure .u { font-size: .42em; color: var(--fg-2); margin-left: 5px; font-weight: 500; letter-spacing: .02em; }
.quote .delta { font-size: 14px; }
.metric-tabs { margin-bottom: 10px; }

/* lists */
.w-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 2px; border: 0; border-top: 1px solid var(--line); width: 100%; background: transparent; text-align: left; color: inherit; }
.w-row:first-child { border-top: 0; }
.w-row:hover { background: var(--panel-2); }
.w-date { text-align: center; line-height: 1.05; }
.w-date .d { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--fg); display: block; }
.w-date .m { font-family: var(--font-data); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; display: block; }
.w-name { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.w-meta { font-size: 12.5px; color: var(--fg-2); margin-top: 1px; }
.w-right { text-align: right; font-family: var(--font-data); font-size: 13px; white-space: nowrap; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 76px minmax(78px, auto); gap: 12px; align-items: center; padding: 10px 2px; border: 0; border-top: 1px solid var(--line); width: 100%; background: transparent; text-align: left; color: inherit; }
.watch:first-child { border-top: 0; }
.watch:hover { background: var(--panel-2); }
.watch .nm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.watch .nm span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.watch .val { text-align: right; font-family: var(--font-data); font-size: 13px; line-height: 1.3; }
.watch .val .delta { font-size: 12px; }
.pr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--line); }
.pr-row:first-child { border-top: 0; }
.pr-what { font-size: 13px; color: var(--fg-2); }
.pr-what b { color: var(--fg); font-weight: 600; }
.empty { text-align: center; padding: 26px 12px; color: var(--fg-2); display: grid; gap: 10px; justify-items: center; }
.empty h3 { font-family: var(--font-display); font-size: 24px; text-transform: uppercase; color: var(--fg); letter-spacing: .02em; }
.empty p { max-width: 46ch; font-size: 14px; }
.loading { padding: 40px 0; color: var(--fg-2); display: grid; gap: 12px; }
.loading .boot-tag { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: .03em; color: var(--accent); }
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--panel-2), var(--raise), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* stats & records */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); margin: 16px calc(-1 * var(--pad)) calc(-1 * var(--pad)); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stat { background: var(--panel); padding: 12px 16px; min-width: 0; }
.stat .kpi-value { font-size: 24px; }
.rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.rec:first-child { border-top: 0; }
.rec-label { font-size: 13px; color: var(--fg-2); }
.rec-val { font-family: var(--font-display); font-size: 22px; font-weight: 600; text-align: right; }
.rec-meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); font-family: var(--font-data); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-month { font-family: var(--font-display); font-size: 23px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { font-family: var(--font-data); font-size: 10.5px; color: var(--muted); text-align: center; padding-bottom: 4px; letter-spacing: .08em; }
.day { position: relative; min-height: 42px; aspect-ratio: 1 / 0.86; max-width: 100%; border-radius: 8px; border: 1px solid transparent; background: var(--panel-2); color: var(--fg-2); font-family: var(--font-data); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.day:hover { border-color: var(--line-2); }
.day.out { opacity: .32; }
.day.l1 { background: var(--heat-1); color: var(--fg); }
.day.l2 { background: var(--heat-2); color: var(--fg); }
.day.l3 { background: var(--heat-3); color: var(--fg); }
.day.l4 { background: var(--heat-4); color: var(--fg); }
.day.today { border-color: var(--fg-2); }
.day.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day .cnt { display: flex; gap: 2px; }
.day .cnt i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; display: block; }
.day .prd { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.cal-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* workout detail */
.wd { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 14px; }
.wd + .wd { margin-top: 12px; }
.wd-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.wd-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.05; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wd-totals { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-2); margin-top: 6px; font-family: var(--font-data); }
.wd-totals b { color: var(--fg); font-weight: 500; }
.wd-ex { padding: 12px 0 2px; border-top: 1px solid var(--line); margin-top: 12px; }
.wd-ex-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.wd-ex-name { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wd-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px; margin-top: 8px; }
.wd-set { font-family: var(--font-data); font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; display: flex; gap: 8px; align-items: baseline; }
.wd-set .n { color: var(--muted); font-size: 11px; }
.wd-set.undone { opacity: .55; border-style: dashed; }
.wd-note { font-size: 13px; color: var(--fg-2); margin-top: 6px; font-style: italic; }
.wd-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* log editor */
.ed-meta { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 680px) { .ed-meta { grid-template-columns: 170px minmax(0, 1fr) auto; align-items: end; } }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.qn { border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); border-radius: 999px; padding: 0 11px; min-height: 30px; font-size: 12.5px; }
.qn:hover, .qn.on { color: var(--fg); border-color: var(--fg-2); }
.ex-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.ex-card + .ex-card { margin-top: 12px; }
.ex-card-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.ex-title { font-weight: 600; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-last { font-size: 12px; color: var(--muted); margin-top: 3px; font-family: var(--font-data); }
.set-grid { display: grid; grid-template-columns: 24px minmax(0, 1fr) 76px 60px 44px 26px; gap: 6px; align-items: center; }
.set-hdr { font-family: var(--font-data); font-size: 10px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; padding: 10px 0 4px; }
.set-hdr span:nth-child(3), .set-hdr span:nth-child(4) { text-align: center; }
.set-row { padding: 3px 0; }
.set-n { font-family: var(--font-data); color: var(--fg-2); text-align: center; font-size: 13px; }
.prev { background: transparent; border: 0; color: var(--muted); font-family: var(--font-data); font-size: 12px; text-align: left; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 40px; }
.prev:hover { color: var(--fg-2); }
.in { width: 100%; height: 42px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); text-align: center; font-family: var(--font-data); font-size: 16px; padding: 0 4px; }
.in::placeholder { color: var(--placeholder); }
.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.set-row.done .in { background: var(--up-soft); border-color: var(--up-line); }
.chk { width: 44px; height: 42px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); display: grid; place-items: center; }
.chk.on { background: var(--up); border-color: var(--up); color: var(--up-ink); }
.rm { width: 26px; height: 42px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; border-radius: 6px; }
.rm:hover { color: var(--down); }
.rm .ic { width: 15px; height: 15px; }
.ex-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.picker-list { margin-top: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); max-height: 320px; overflow-y: auto; }
.pick-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--fg); min-height: 48px; }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover, .pick-item:focus-visible { background: var(--raise); }
.pick-item .meta { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pick-item.create { color: var(--accent); font-weight: 500; }
.create-box { padding: 12px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.save-bar { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; padding: 10px 12px; background: var(--glass); border: 1px solid var(--line-2); border-radius: 12px; margin-top: 16px; }
@media (min-width: 960px) { .save-bar { bottom: 16px; } }
.save-sum { font-family: var(--font-data); font-size: 12.5px; color: var(--fg-2); min-width: 0; }
.save-bar .btn { flex: none; }
.save-sum b { color: var(--fg); font-weight: 500; }
.issues { margin: 12px 0 0; padding: 10px 14px 10px 30px; border: 1px solid var(--down-line); background: var(--down-soft); border-radius: 10px; font-size: 13.5px; }
.pending { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 10px; display: grid; gap: 10px; font-size: 14px; }

/* modal & toast */
.overlay { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: grid; place-items: end center; }
.modal { width: 100%; max-width: 540px; max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px 16px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow); }
@media (min-width: 640px) { .overlay { place-items: center; padding: 24px; } .modal { border-radius: 14px; padding-bottom: 18px; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.modal-head h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.modal-body { display: grid; gap: 14px; font-size: 14px; color: var(--fg-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.set-block { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.set-block:first-child { border-top: 0; padding-top: 0; }
.set-block h4 { font-size: 13px; color: var(--fg); font-weight: 600; }
.hint { font-size: 12.5px; color: var(--muted); }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 80; display: grid; gap: 8px; width: min(460px, calc(100% - 32px)); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 22px; left: calc(50% + 112px); } }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; font-size: 14px; box-shadow: var(--shadow); pointer-events: auto; }
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-2); margin-top: 7px; flex: none; }
.toast.good i { background: var(--up); } .toast.bad i { background: var(--down); } .toast.pr i { background: var(--accent); }
.csv-box { font-family: var(--font-data); font-size: 12px; min-height: 120px; white-space: pre; }

/* muscle groups */
.mchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.mchip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 9px; border-radius: 5px; font-size: 12.5px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg-2); white-space: nowrap; }
button.mchip:hover { color: var(--fg); border-color: var(--fg-2); }
.mchip.p { color: var(--fg); border-color: var(--series); }
.mchip.s { border-style: dashed; }
.mchip b { font-family: var(--font-data); font-weight: 500; color: var(--fg); }
.mtk { font-family: var(--font-data); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.split { display: flex; height: 10px; border-radius: 3px; background: var(--panel-2); overflow: hidden; min-width: 70px; }
.split .d { background: var(--series); }
.split .s { background: repeating-linear-gradient(135deg, var(--series) 0 2px, var(--series-stripe) 2px 5px); }
.sw-d, .sw-s { width: 12px; height: 10px; border-radius: 2px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.sw-d { background: var(--series); }
.sw-s { background: repeating-linear-gradient(135deg, var(--series) 0 2px, var(--series-stripe) 2px 5px); }
.legend-keys { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--fg-2); align-items: center; }
.lkey { width: 14px; height: 0; border-top: 2px solid var(--fg-2); display: inline-block; vertical-align: middle; }
.pairs .pair { display: grid; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); }
.pairs .pair:first-child { border-top: 0; padding-top: 2px; }
.pair-bar { display: flex; height: 8px; border-radius: 3px; overflow: hidden; gap: 2px; }
.pair-bar .a { background: var(--cat-1); }
.pair-bar .b { background: var(--cat-2); }
.mtog-row { display: flex; flex-wrap: wrap; gap: 6px; }
.mtog { border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); border-radius: 6px; padding: 0 10px; min-height: 32px; font-size: 12.5px; }
.mtog:hover { color: var(--fg); }
.mtog.on-p { background: var(--series); border-color: var(--series); color: var(--on-series); }
.mtog.on-s { border-style: dashed; border-color: var(--series); color: var(--fg); background: var(--series-stripe); }
.cmp-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-2); border-radius: 999px; padding: 0 10px; min-height: 30px; font-size: 12.5px; }
.cmp-chip:hover { color: var(--fg); }
.cmp-chip.on { color: var(--fg); border-color: var(--fg-2); background: var(--panel-2); }
.chip.lean { background: var(--accent-soft); color: var(--accent); }

/* workout types */
.cat { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; border: 1px solid var(--cc); background: color-mix(in srgb, var(--cc) 16%, transparent); color: var(--fg); font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; line-height: 1; letter-spacing: 0; text-transform: none; font-family: var(--font-body); flex: none; }
.cat.sm { height: 19px; padding: 0 6px 0 4px; font-size: 11px; gap: 4px; }
.cat .catg { color: var(--cc); }
.cat .cc { font-family: var(--font-data); font-size: 10.5px; letter-spacing: .06em; }
.catg { width: 12px; height: 12px; flex: none; display: inline-block; vertical-align: -1px; }
.cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--cc); display: inline-block; flex: none; vertical-align: middle; }
.cat-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cat-stack { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; }
.cat-stack span { background: var(--cc); min-width: 4px; }
.mix-weeks { display: grid; gap: 6px; margin-top: 12px; }
.mix-week { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: center; }
.mix-week .row { gap: 4px; }
.day .cnt i.cd { background: var(--cc); width: 7px; height: 7px; box-shadow: 0 0 0 1.5px var(--bg); }
.qn { display: inline-flex; align-items: center; gap: 5px; }
.wd-w .catg { width: 10px; height: 10px; }
.cat-edit { display: grid; gap: 6px; }
.cat-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px auto; gap: 8px; align-items: center; }
.cat-edit-row input[type=color] { width: 46px; height: 30px; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; padding: 2px; cursor: pointer; }
.bm-t > * { fill: var(--tint); }
.w-name .cat { margin-right: 2px; }

/* simplified shell */
.rail-cta { margin: 0 0 14px; justify-content: flex-start; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px); z-index: 45; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow); text-decoration: none; }
.fab .ic { width: 24px; height: 24px; }
@media (min-width: 960px) { .fab { display: none; } }
.today { display: grid; gap: 10px; }
.btn.lg { min-height: 48px; padding: 0 18px; font-size: 15px; }
.disc-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: inherit; text-align: left; min-height: 58px; }
.disc-head:hover { border-color: var(--line-2); }
.disc-title { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.disc-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.disc-ic { color: var(--fg-2); display: inline-flex; }
.disc-body { display: grid; gap: 16px; margin-top: 16px; min-width: 0; }
.disc-body > .section-title:first-child { display: none; }
.gloss { display: grid; gap: 12px; margin: 0; }
.gloss dt { font-weight: 600; color: var(--fg); }
.gloss dd { margin: 2px 0 0; color: var(--fg-2); font-size: 13.5px; max-width: 70ch; }
.how { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--fg-2); }
.how b { color: var(--fg); }
.pick-head { padding: 8px 12px 4px; font-family: var(--font-data); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.ex-card.complete { border-color: var(--up-line); }
.chip.done { background: var(--up-soft); color: var(--up); }
.ex-hist { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); display: grid; gap: 4px; font-size: 12.5px; }

/* mobile-first refinements */
html { overscroll-behavior-y: contain; }
button, .btn, .tab, .chk, .seg button, .pick-item, .w-row, .watch { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.btn:active, .chk:active, .tab:active, .seg button:active, .icon-btn:active, .rm:active { filter: brightness(.88); }
.tab .ic { padding: 3px 14px; border-radius: 999px; box-sizing: content-box; }
.tab.on .ic { background: var(--accent-soft); }
.ex-toggle { border: 0; background: transparent; color: inherit; padding: 0; text-align: left; cursor: pointer; font: inherit; font-weight: 600; font-size: 16px; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 8px 30px; }
.ed-summary { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: inherit; text-align: left; min-height: 52px; }
.ed-sum-name { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sum-edit { display: inline-flex; gap: 6px; align-items: center; color: var(--fg-2); font-size: 13px; flex: none; }
@media (max-width: 600px) {
  .tbl.stackable, .tbl.stackable tbody { display: block; width: 100%; }
  .tbl.stackable thead { display: none; }
  .tbl.stackable tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 12px 2px; border-top: 1px solid var(--line); }
  .tbl.stackable tr:first-child { border-top: 0; }
  .tbl.stackable td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; min-width: 0; background: transparent !important; }
  .tbl.stackable td.r { text-align: left; }
  .tbl.stackable td::before { content: attr(data-label); display: block; font-family: var(--font-data); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .tbl.stackable td[data-label=""]::before { display: none; }
  .tbl.stackable td:first-child { grid-column: 1 / -1; }
  .tbl.stackable td:first-child::before { display: none; }
  .tbl.stackable.num-first tr { grid-template-columns: 30px repeat(2, minmax(0, 1fr)); }
  .tbl.stackable.num-first td:first-child { grid-column: 1; grid-row: span 2; font-family: var(--font-display); font-size: 20px; }
  .tbl.stackable.num-first td:nth-child(2) { grid-column: 2 / -1; }
  .tbl.stackable.num-first td:nth-child(2)::before { display: none; }
  .tbl.stackable .sets-cell { min-width: 0; grid-column: 1 / -1; }
  .tbl.stackable tr.me, .tbl.stackable tr[style*="panel-2"] { background: var(--panel-2); border-radius: 8px; }
  .tbl-wrap:has(> .stackable) { overflow: visible; }
}
@media (max-width: 959px) {
  .page-head { padding-block: 4px 12px; }
  .page-head h1 { font-size: 30px; }
  .quote-name { font-size: 26px; }
  .switch { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; background: var(--bg); }
  input.input, select.input, textarea.input, .in { font-size: 16px !important; }
  .toasts { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 84px); }
  .modal { max-height: 90vh; max-height: 90dvh; }
  /* While the on-screen keyboard is up, free the bottom of the screen for the save bar. */
  body.kb-open .tabbar, body.kb-open .fab { display: none; }
  body.kb-open .save-bar { bottom: calc(var(--kb, 0px) + 8px); }
}
@media (max-width: 420px) {
  .kpi-value { font-size: 26px; }
  .kpi { padding: 12px 14px; }
}
.set-grid { grid-template-columns: 24px minmax(0, 1fr) 78px 62px 46px 36px; }
.rm { width: 36px; }
.in { scroll-margin-block: 90px 140px; }
@media (max-width: 369px) {
  .set-grid { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 46px 36px; }
  .set-grid .prev, .set-hdr span:nth-child(2) { display: none; }
}
@media (min-width: 960px) { .panel { --pad: 20px; } .stack, .cols { gap: 20px; } }
@media (max-width: 959px) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 38px; }
  .seg button { min-height: 38px; }
  .icon-btn { width: 42px; height: 42px; }
  .icon-btn.sm { width: 38px; height: 38px; }
  .main { padding-block: 10px calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom, 0px)); }
}

.tbl tr.me td { background: var(--accent-soft); }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who img { width: 22px; height: 22px; border-radius: 50%; flex: none; }

/* view switcher */
.switch { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: -6px 0 16px; }
.switch::-webkit-scrollbar { display: none; }
.switch button { flex: none; border: 0; background: transparent; color: var(--fg-2); padding: 10px 12px; font-size: 13.5px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.switch button:hover { color: var(--fg); }
.switch button.on { color: var(--fg); border-bottom-color: var(--accent); }
.tabbar.dense .tab { font-size: 9.5px; letter-spacing: 0; }

/* movement figures & body maps */
.fig { display: block; overflow: visible; flex: none; }
.fig-limb { stroke: var(--fg-2); stroke-width: 5; stroke-linecap: round; }
.fig-head { fill: var(--fg-2); }
.fig-eq { fill: var(--series); stroke: var(--bg); stroke-width: 1.5; }
.fig-eq-l { stroke: var(--series); stroke-width: 4; stroke-linecap: round; }
.fig-prop { fill: var(--raise); stroke: var(--line-2); stroke-width: 1; }
.fig-prop-l { stroke: var(--line-2); stroke-width: 3; stroke-linecap: round; }
.fig-floor { stroke: var(--line-2); stroke-width: 2; stroke-linecap: round; }
.fig-ghost { opacity: .22; }
.bodymap { display: block; max-width: 100%; height: auto; flex: none; }
.bm-sil > * { fill: var(--panel-2); stroke: var(--line-2); stroke-width: 1; }
.bm-m > * { stroke: var(--bg); stroke-width: .8; }
.bm-off > * { fill: var(--raise); }
.bm-p > *, .bm-h > * { fill: var(--series); }
.bm-s > * { fill: var(--series); fill-opacity: .38; stroke: var(--series); stroke-dasharray: 2 1.5; }
.bm-click { cursor: pointer; }
.bm-click:hover > * { stroke: var(--fg); stroke-width: 1.3; }
.sw-sec { width: 12px; height: 10px; border-radius: 2px; display: inline-block; vertical-align: middle; margin-right: 6px; background: var(--series-stripe); outline: 1px dashed var(--series); outline-offset: -1px; }
.heat-scale { width: 64px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--heat-1), var(--series)); display: inline-block; vertical-align: middle; }
.exvis { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 20px; align-items: center; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.exvis-fig, .exvis-body { display: grid; justify-items: center; gap: 6px; }
.exvis-cue { grid-column: 1 / -1; }
@media (max-width: 560px) { .exvis { grid-template-columns: minmax(0, 1fr); justify-items: center; } }
.wv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; align-items: start; }
.wv-body { display: grid; justify-items: center; gap: 6px; }
.wv-list { list-style: none; margin: 0; padding: 0; display: grid; }
.wv-item { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.wv-item.nofig { grid-template-columns: 20px minmax(0, 1fr) auto; }
.wv-item:first-child { border-top: 0; }
.wv-n { font-family: var(--font-data); color: var(--muted); font-size: 12px; text-align: center; }
.wv-name { font-weight: 600; font-size: 14px; }
.wv-sets { display: grid; justify-items: end; gap: 2px; }
@media (max-width: 520px) { .wv-item { grid-template-columns: 20px auto minmax(0, 1fr); } .wv-item.nofig { grid-template-columns: 20px minmax(0, 1fr); } .wv-sets { grid-column: 2 / -1; justify-items: start; } }
.wd-visual { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.vis-body { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); justify-items: center; }
@media (min-width: 760px) { .vis-body { grid-template-columns: 300px minmax(0, 1fr); align-items: center; justify-items: stretch; } }
.vis-list { display: grid; gap: 2px; width: 100%; }
.vis-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; gap: 8px; align-items: center; border: 0; background: transparent; color: inherit; text-align: left; padding: 4px 2px; font-size: 13px; border-radius: 4px; }
.vis-row:hover { background: var(--panel-2); }
.vis-row .mono { text-align: right; }
.freq { display: grid; grid-template-columns: 26px repeat(12, minmax(0, 1fr)); gap: 3px; align-items: center; }
.fc { aspect-ratio: 1 / 1; max-width: 100%; border-radius: 3px; background: var(--panel-2); }
.fc.l1 { background: var(--heat-1); } .fc.l2 { background: var(--heat-2); } .fc.l3 { background: var(--heat-3); } .fc.l4 { background: var(--heat-4); }
.fc.future { background: transparent; border: 1px dashed var(--line); }
.fl { font-family: var(--font-data); font-size: 9.5px; color: var(--muted); }
.mini-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mcard { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: grid; gap: 4px; text-align: left; color: inherit; }
.mcard:hover, .gcard:hover, .prog-card:hover { border-color: var(--fg-2); }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gcard { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: inherit; }
.gfig { display: flex; gap: 8px; align-items: center; justify-content: center; }

/* programs */
.prog-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.prog-card { display: grid; gap: 8px; align-content: start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: inherit; min-width: 0; }
.prog-card .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prog-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.week .wd { border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 3px; min-height: 54px; display: grid; align-content: start; gap: 2px; text-align: center; min-width: 0; }
.week .wd.rest { border-style: dashed; color: var(--muted); }
.week .wd.today { box-shadow: 0 0 0 2px var(--accent); }
.week.mini .wd { min-height: 0; padding: 3px 0; }
.wd-d { font-family: var(--font-data); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.wd-w { font-size: 11px; font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.wk-key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.wk-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--fg-2); }
.wk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sched-edit { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.sched-edit label { display: grid; gap: 4px; }
.pe-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 56px 76px 116px auto; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.pe-head { font-family: var(--font-data); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-bottom: 0; }
.pe-row .in { height: 38px; }
.pe-row select.input { min-height: 38px; font-size: 14px; padding: 4px 28px 4px 8px; }
@media (max-width: 680px) { .pe-row { grid-template-columns: 22px minmax(0, 1fr) 52px 70px; } .pe-row .pe-rest, .pe-row .pe-act { grid-column: 2 / -1; } .pe-head .pe-rest, .pe-head .pe-act { display: none; } }
/* privacy, legal & consent */
.gate-shell { min-height: 100vh; padding: max(22px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.gate { max-width: 680px; margin: 0 auto; display: grid; gap: 16px; }
.gate-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.gate h1 { font-family: var(--font-display); font-weight: 600; font-size: 36px; letter-spacing: .02em; line-height: .98; text-transform: uppercase; }
.gate-step { font-family: var(--font-data); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.gate-lead { font-size: 15.5px; color: var(--fg-2); line-height: 1.55; max-width: 62ch; }
fieldset.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
fieldset.choices legend { font-weight: 600; color: var(--fg); font-size: 16px; margin-bottom: 8px; padding: 0; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); cursor: pointer; font-size: 15px; color: var(--fg); }
.choice.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.agree-list { display: grid; gap: 10px; }
.agree { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.agree .check { align-items: flex-start; font-size: 14.5px; color: var(--fg); min-height: 32px; }
.agree .check input { margin-top: 1px; flex: none; }
.doc { display: grid; gap: 10px; color: var(--fg-2); font-size: 15px; line-height: 1.6; max-width: 72ch; min-width: 0; overflow-wrap: anywhere; }
.doc h2 { font-family: var(--font-display); font-size: 30px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--fg); line-height: 1.02; }
.doc h3 { font-size: 16.5px; font-weight: 600; color: var(--fg); margin: 14px 0 2px; }
.doc section { scroll-margin-top: 72px; }
.doc p { margin: 6px 0; }
.doc ul { margin: 6px 0; padding-left: 20px; display: grid; gap: 6px; }
.doc-meta { font-family: var(--font-data); font-size: 12px; color: var(--muted); margin-top: 6px; }
.doc-sum { color: var(--fg); }
.draft-flag { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; }
.draft-flag strong { color: var(--fg); }
.df-missing { display: block; margin-top: 4px; }
.draft-flag strong + .df-missing, .df-missing:first-child { margin-top: 0; }
.doc-web { margin-top: 16px; }
.doc-web a, .pub-foot a { color: var(--accent); }

/* ===== Public legal pages (privacy.html, terms.html, delete-account.html…): the in-app document styles, full page ===== */
.pub { min-height: 100vh; }
.pub-head, .pub-main, .pub-foot { max-width: 820px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.pub-head { padding-top: 20px; display: grid; gap: 10px; }
.pub-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; justify-self: start; }
.pub-brand > span:last-child { display: grid; gap: 3px; }
.pub-tag { font-size: 12.5px; color: var(--accent); letter-spacing: .02em; }
.pub-nav { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
.pub-nav a { color: var(--fg-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.pub-nav a:hover, .pub-nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.pub-main { padding-top: 18px; padding-bottom: 28px; }
.pub .doc h1 { font-family: var(--font-display); font-size: 34px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--fg); line-height: 1.02; }
.pub .doc h2 { font-family: var(--font-body); font-size: 17px; font-weight: 600; text-transform: none; letter-spacing: 0; line-height: 1.3; color: var(--fg); margin: 16px 0 2px; }
.pub .doc section { scroll-margin-top: 16px; }
.pub-list { display: grid; gap: 10px; margin-top: 6px; }
.pub-list a.doc-card { color: var(--fg-2); text-decoration: none; }
.pub-list a.doc-card:hover { border-color: var(--accent-line); }
.pub-foot { padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 14px; }
.rnote { border-left: 3px solid var(--series); background: rgba(79, 143, 240, 0.09); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); }
.rnote-tag { font-family: var(--font-data); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--series); margin-right: 8px; }
.doc-cards { display: grid; gap: 8px; margin: 8px 0; }
.doc-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 14px; line-height: 1.5; }
.doc-card b { color: var(--fg); font-weight: 600; }
.dc-l { display: block; font-family: var(--font-data); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc { display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.toc button { text-align: left; border: 0; background: transparent; color: var(--fg-2); min-height: 38px; padding: 6px 8px; border-radius: 6px; font-size: 14px; }
.toc button:hover { background: var(--panel-2); color: var(--fg); }
.legal-layout { display: grid; gap: 16px; min-width: 0; }
.doc-list { display: grid; gap: 4px; align-content: start; min-width: 0; }
.doc-list button, .doc-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; min-height: 44px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--fg-2); font-size: 14px; width: 100%; }
.doc-list button:hover, .doc-link:hover { color: var(--fg); border-color: var(--line-2); }
.doc-list button.on { background: var(--raise); color: var(--fg); border-color: var(--line-2); box-shadow: inset 3px 0 0 var(--accent); }
@media (min-width: 1000px) { .legal-layout { grid-template-columns: 250px minmax(0, 1fr); align-items: start; } .doc-list { position: sticky; top: 22px; } }
@media (max-width: 999px) { .doc-list { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .doc-list::-webkit-scrollbar { display: none; } .doc-list button { width: auto; } }
.priv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.priv-row:first-of-type { border-top: 0; padding-top: 2px; }
.pr-t { font-weight: 500; color: var(--fg); min-width: 0; }
.pr-s { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.state { font-family: var(--font-data); font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap; justify-self: end; }
.state.on { border-color: var(--accent-line); color: var(--accent); }
.state.priv { border-color: var(--up-line); color: var(--up); }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font: inherit; cursor: pointer; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 12px; }
.legal-links button { border: 0; background: none; padding: 6px 0; color: var(--muted); font-size: 12px; cursor: pointer; }
.legal-links button:hover { color: var(--fg); text-decoration: underline; }
.home-foot { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); }
.home-foot .legal-links button { min-height: 36px; font-size: 12.5px; }
.gate .legal-links button { font-size: 13px; min-height: 36px; }
.safety-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 16px 0 0; max-width: 80ch; line-height: 1.5; }
.safety-note .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--fg-2); }
.rec-list { display: grid; }
.rec { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--fg-2); }
.rec:first-child { border-top: 0; }
.rec .mono { font-size: 12px; }
.req { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); min-width: 0; }
.req-msg { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg); font-size: 14px; }
.req-reply { display: grid; gap: 2px; border-left: 3px solid var(--up-line); padding-left: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--fg-2); }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.how-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.how-list b { color: var(--fg); }

/* accounts, guest mode & sync (standalone build) */
.auth-actions { display: grid; gap: 10px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .field label, .field > label { font-size: 13px; color: var(--fg-2); font-weight: 500; }
.auth-back { justify-self: start; margin-left: -8px; }
.btn.lg { min-height: 52px; font-size: 16px; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap .input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 36px; min-width: 64px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--panel-2); color: var(--fg-2); font-size: 13px; font-weight: 600; }
.pw-toggle:hover { color: var(--fg); }
.pw-meter { display: grid; gap: 6px; }
.pw-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-bars i { display: block; height: 4px; border-radius: 2px; background: var(--line-2); }
.pw-bars i.on.s1 { background: var(--down); }
.pw-bars i.on.s2 { background: var(--accent); }
.pw-bars i.on.s3, .pw-bars i.on.s4 { background: var(--up); }
.hint.up { color: var(--up); }
.hint.down { color: var(--down); }
.form-err { border: 1px solid var(--down-line); background: var(--down-soft); color: var(--fg); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.captcha { min-height: 65px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.status.bad i { background: var(--down); }
.status.busy i { background: var(--series); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.sync-mobile { display: inline-flex; margin-top: 8px; font-size: 12px; color: var(--fg-2); text-decoration: none; }
@media (min-width: 960px) { .sync-mobile { display: none; } }
.rail-user { font-weight: 600; color: var(--fg); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user:hover { text-decoration: underline; }
.gate h1 + .gate-lead { margin-top: -4px; }
@media (max-width: 600px) { .gate h1 { font-size: 32px; } }
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }

/* exercise library */
.lib-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.picker-list .lib-filters { position: sticky; top: 0; z-index: 1; margin: 0; padding: 8px 10px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1 1 260px; min-width: 0; }
.chips-scroll::-webkit-scrollbar { display: none; }
.fchip { flex: none; min-height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--fg-2); font-size: 12.5px; font-weight: 500; }
.fchip:hover:not(.on) { color: var(--fg); }
.fchip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--fg); }
.eq-pick { flex: 0 1 190px; min-width: 0; }
.eq-pick .input { min-height: 32px; padding-block: 4px; font-size: 13px; }
.ticker.lib { color: var(--accent); }
.ticker.lib .ic { width: 14px; height: 14px; }
.lib-list { display: grid; max-height: 640px; overflow-y: auto; }
.lib-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 6px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--fg); text-align: left; }
.lib-row:first-child { border-top: 0; }
.lib-row:hover, .lib-row.on { background: var(--panel-2); }
.lib-name { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; font-weight: 500; }
.lib-info { display: grid; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--fg-2); }
.lib-info p { margin: 0; }
.lib-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.seg.wrap { flex-wrap: wrap; overflow: visible; }

/* tracking: effort, rest, holds */
.set-n { display: grid; justify-items: center; line-height: 1.1; }
.effort { font-family: var(--font-data); font-size: 10px; color: var(--accent); white-space: nowrap; }
.wd-set .effort { font-size: 11px; }
.mini-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-2); }
.mini-field .input { width: auto; min-height: 32px; padding-block: 2px; font-size: 13px; }
.ex-foot .mini-field.rest { margin-left: auto; }

/* cardio */
.cardio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: start; margin-top: 12px; }
.cardio-grid.more { margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.unit-in { display: flex; gap: 6px; align-items: center; }
.unit-in .input { flex: 1 1 auto; min-width: 0; }
.cardio-live { display: flex; gap: 8px 18px; flex-wrap: wrap; min-height: 22px; margin-top: 10px; font-size: 13.5px; color: var(--fg-2); }
.cardio-live b { font-family: var(--font-data); font-weight: 600; color: var(--fg); }
.issues.inline { margin-top: 8px; }
.splits { display: grid; gap: 8px; margin-top: 12px; }
.split-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 26px minmax(0, 1fr) 38px; gap: 8px; align-items: center; }
.cardio-detail { margin-top: 8px; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 16px; margin: 0; }
.cd-grid div { min-width: 0; }
.cd-grid dt { font-family: var(--font-data); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cd-grid dd { margin: 2px 0 0; font-family: var(--font-data); font-size: 14px; color: var(--fg); }
.cd-splits { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* friends, leaderboards, challenges */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-data); font-size: 11px; font-weight: 700; }
.tab { position: relative; }
.tab .nav-badge { position: absolute; top: 4px; left: calc(50% + 10px); margin: 0; }
.person-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.panel-head + .person-row { border-top: 0; }
.person-row .row { margin-left: auto; gap: 6px; }
.invite-out { display: flex; gap: 8px; margin-top: 10px; }
.invite-out .input { flex: 1 1 auto; min-width: 0; font-size: 12px; }
.lb { display: grid; margin: 0; padding: 0; list-style: none; }
.lb-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "rank name val" "rank bar bar"; gap: 4px 10px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--line); }
.lb-row:first-child { border-top: 0; }
.lb-row.me { background: var(--accent-soft); border-radius: 8px; }
.lb-rank { grid-area: rank; font-family: var(--font-display); font-size: 22px; font-weight: 600; text-align: center; }
.lb-name { grid-area: name; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; font-weight: 500; }
.lb-sync { font-weight: 400; }
.lb-val { grid-area: val; font-family: var(--font-data); font-size: 13.5px; text-align: right; white-space: nowrap; }
.lb-bar { grid-area: bar; height: 6px; overflow: hidden; border-radius: 3px; background: var(--panel-2); }
.lb-bar i { display: block; height: 100%; border-radius: 3px; background: var(--series); }
.lb-row.me .lb-bar i { background: var(--accent); }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ch-card { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--fg); text-align: left; }
.ch-card:hover { border-color: var(--line-2); background: var(--raise); }
.ch-name { font-weight: 600; }
.ch-win { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-weight: 600; color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ach-grid { display: grid; gap: 10px; }
.ach { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.ach > .ic { flex: none; margin-top: 2px; color: var(--accent); }
@media (max-width: 600px) {
  .person-row .row { margin-left: 0; width: 100%; }
  .ex-foot .mini-field.rest { margin-left: 0; }
  .split-row { grid-template-columns: 22px minmax(0, 1fr) 22px minmax(0, 1fr) 38px; gap: 6px; }
}

/* ===== Usability pass (2026-10-16): phones first ===== */

/* Room for the status bar / Dynamic Island when installed to the home screen. */
.main { padding-top: max(10px, env(safe-area-inset-top, 0px)); }

/* Readable small text: nothing below about 11px. */
.eyebrow { font-size: 11.5px; letter-spacing: .12em; }
.kpi-label, .tbl th, .dc-l { font-size: 11.5px; letter-spacing: .08em; }
.chip { font-size: 11px; height: 22px; letter-spacing: .06em; }
.mtk, .wd-d, .w-date .m, .dow { font-size: 11px; }
.fl { font-size: 11px; }
.chart .axis { font-size: 11.5px; }
.chart .tag-text { font-size: 11px; }
.pick-item .meta, .ex-last { font-size: 12.5px; }
.legal-links button { font-size: 13px; }

/* Touch targets: at least 44 × 44 on phones and tablets. */
@media (max-width: 959px), (pointer: coarse) {
  .btn, .btn.sm { min-height: 44px; }
  .seg button, .seg.sm button, .seg.data button { min-height: 44px; }
  .icon-btn, .icon-btn.sm { width: 44px; height: 44px; }
  .switch button { min-height: 44px; }
  .fchip { min-height: 44px; padding: 0 14px; }
  .mini-field .input, select.input { min-height: 44px; }
  .legal-links button, .home-foot .legal-links button, .gate .legal-links button { min-height: 44px; padding: 0 2px; }
  .pick-item { min-height: 54px; }
  .disc-head { min-height: 56px; }
  .day { min-height: 44px; }
}

/* Set rows: Set | Weight | Reps | Done stand out; last time's numbers sit in the inputs as grey placeholders. */
.set-grid { grid-template-columns: 30px minmax(0, 1fr) 84px 68px 50px 40px; gap: 6px; }
.set-hdr { font-size: 11.5px; letter-spacing: .08em; }
.set-hdr span:nth-child(5) { text-align: center; }
.in { height: 46px; font-size: 18px; font-weight: 500; }
.in::placeholder { color: var(--muted); opacity: .8; font-weight: 400; }
.chk { width: 50px; height: 46px; border-radius: 10px; }
.chk .ic { width: 22px; height: 22px; }
.rm { width: 40px; height: 46px; }
.set-row { padding: 3px 4px; margin: 0 -4px; border-radius: 10px; transition: background-color .15s; }
.set-row.done { background: var(--up-soft); }
.set-row.done .set-n { color: var(--up); font-weight: 600; }
.set-n { display: grid; justify-items: center; font-size: 15px; }
@media (max-width: 599px) {
  .set-grid { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 54px 44px; gap: 6px; }
  .set-grid .prev, .set-hdr .prev-h { display: none; }
  .in { height: 50px; font-size: 19px !important; }
  .chk { width: 54px; height: 50px; }
  .rm { width: 44px; height: 50px; }
}
.ex-card-head { align-items: flex-start; }
.ex-name { min-width: 0; overflow-wrap: anywhere; }
.ex-menu-wrap { position: relative; flex: none; }
.ex-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; display: grid; gap: 4px; min-width: 190px; padding: 6px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); }
.ex-menu .btn { justify-content: flex-start; width: 100%; }
.add-set { width: 100%; margin-top: 8px; min-height: 48px; justify-content: center; gap: 8px; border-style: dashed; flex-wrap: wrap; }
.add-set-hint { font-family: var(--font-data); font-size: 12.5px; color: var(--muted); font-weight: 400; }
.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 10px; font-size: 14px; }
.tip-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: nowrap; margin-top: 16px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: 14px; color: var(--fg-2); }
.tip-note b { color: var(--fg); }

/* Workout summary chip: name and date stack instead of being cut off. */
.ed-summary { align-items: center; }
.ed-sum-main { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.ed-sum-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sum-meta { font-family: var(--font-data); font-size: 12.5px; color: var(--muted); }

/* Save bar states */
.save-bar.err { border-color: var(--down-line); }
.save-bar .btn.primary { min-height: 46px; }
.pending.bad { border-color: var(--down-line); background: var(--down-soft); }
.spinner.sm { width: 14px; height: 14px; }
@media (max-width: 380px) { .save-vol { display: none; } }

/* Strength or cardio */
.start-choose .panel-title { margin-bottom: 12px; }
.choose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choose { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 16px; min-height: 84px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); color: var(--fg); }
.choose .ic { width: 28px; height: 28px; flex: none; color: var(--accent); margin-top: 2px; }
.choose b { display: block; font-size: 17px; }
.choose-sub { display: block; margin-top: 3px; font-size: 13.5px; color: var(--fg-2); }
.choose:hover { border-color: var(--accent-line); }
.choose.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.act { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); color: var(--fg); text-align: left; font-weight: 500; }
.act:hover { border-color: var(--accent-line); }
.act .fig { flex: none; }
.act-sub { display: block; font-size: 12px; color: var(--accent); font-weight: 400; }
.soon { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--fg-2); }
.soon p { margin: 4px 0 0; }

/* Exercise picker: search first, then recent, favorites, filters and the library. */
.picker-label { font-size: 13px; color: var(--fg-2); font-weight: 600; }
.search-in { position: relative; display: block; }
.search-in > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-in > .input { padding-left: 40px; min-height: 48px; }
.picker-list { max-height: 440px; }
@media (max-width: 959px) { .picker-list { max-height: 62vh; max-height: 62dvh; } }
.filter-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.filter-line + .filter-line { margin-top: 6px; }
.filter-k { flex: none; width: 92px; font-size: 12px; color: var(--muted); }
@media (max-width: 599px) { .filter-k { width: auto; font-size: 11.5px; } .picker-list .lib-filters { position: static; } }
.lib-filters { display: block; }
.pick-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.pick-row .pick-item { border-bottom: 0; flex: 1 1 auto; min-width: 0; }
.pick-name { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; font-weight: 500; }
.pick-name .meta { margin-left: 0; white-space: normal; font-weight: 400; }
.pick-add { margin-left: auto; color: var(--accent); display: grid; place-items: center; width: 32px; flex: none; }
.pick-fav { flex: none; width: 48px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; }
.pick-fav:hover { color: var(--accent); }
.pick-fav.on { color: var(--accent); }
.pick-fav.on .ic, .fav-btn.on .ic { fill: currentColor; }
.fav-btn.on { border-color: var(--accent-line); color: var(--accent); }
.pick-empty { padding: 12px; color: var(--muted); font-size: 13.5px; }

/* Home: this week */
.wk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wk-stat { display: grid; align-content: start; gap: 2px; min-width: 0; }
.wk-v { font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1; color: var(--fg); }
.wk-v small { font-size: 18px; color: var(--muted); }
.wk-k { font-size: 13px; color: var(--fg-2); }
.wk-trend { display: grid; gap: 6px; margin-top: 14px; }
.pr-badge { color: var(--accent); display: grid; place-items: center; }
.pr-badge .ic { width: 18px; height: 18px; }
.pr-date { font-size: 12px; white-space: nowrap; }

/* Records */
.rec-table { display: grid; }
.rec-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; width: 100%; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--fg); text-align: left; min-height: 56px; }
.rec-line:first-child { border-top: 0; }
.rec-line:hover { background: var(--panel-2); }
.rec-ex { display: grid; gap: 2px; font-weight: 600; min-width: 0; }
.rec-cells { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.rec-cell { display: grid; justify-items: end; gap: 1px; font-family: var(--font-data); }
.rec-cell b { font-weight: 600; font-size: 14px; }
.rec-k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 480px) { .rec-line { grid-template-columns: 1fr; } .rec-cells { justify-content: flex-start; } .rec-cell { justify-items: start; } }

/* Primary actions stand out; secondary ones recede. */
.btn.ghost { border-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  *:not(.spinner), *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
@media (max-width: 959px), (pointer: coarse) {
  .input { min-height: 44px; }
  .btn:has(> .ic:only-child) { min-width: 44px; }
  .seg button { min-width: 44px; flex-shrink: 0; }
  .ex-toggle { min-height: 44px; }
  .mchip { min-height: 44px; }
  .legal-links button { min-width: 44px; flex-shrink: 0; }
}
.cat .cc { font-size: 11px; }
@media (max-width: 959px), (pointer: coarse) {
  .vis-row { min-height: 44px; }
  .toc button { min-height: 44px; }
}

/* ===== Light theme (2026-10-20). Dark stays the default look; "Match device" follows the phone or computer. ===== */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eeeeec; --panel: #f9f9f8; --panel-2: #f0f0ee; --raise: #ffffff; --line: #dddcd8; --line-2: #c6c5c0;
  --fg: #151618; --fg-2: #41444a; --muted: #5d6168; --placeholder: #8d9097;
  --accent: #7a5c1a; --accent-ink: #ffffff; --accent-soft: rgba(160, 124, 48, 0.14); --accent-line: rgba(122, 92, 26, 0.45);
  --up: #0f7646; --up-ink: #ffffff; --up-soft: rgba(18, 128, 78, 0.12); --up-line: rgba(18, 128, 78, 0.4);
  --down: #c2353b; --down-soft: rgba(194, 53, 59, 0.1); --down-line: rgba(194, 53, 59, 0.4);
  --series: #2a66c4; --on-series: #ffffff; --series-stripe: rgba(47, 111, 208, 0.18);
  --heat-1: rgba(47, 111, 208, 0.18); --heat-2: rgba(47, 111, 208, 0.32); --heat-3: rgba(47, 111, 208, 0.52); --heat-4: rgba(47, 111, 208, 0.78);
  --scrim: rgba(21, 22, 24, 0.45); --glass: rgba(249, 249, 248, 0.94); --shadow: 0 12px 30px rgba(20, 20, 24, 0.16);
}
/* The brand gold stays bright on buttons in both themes; a darker gold is used for gold text on light backgrounds.
   The mark is a gold monogram on charcoal in both themes, like the app icon. */
.brand-mark { background: #16171a; color: #c9a55c; box-shadow: inset 0 0 0 1px rgba(201, 165, 92, 0.45); }
:root[data-theme="light"] .btn.primary, :root[data-theme="light"] .fab, :root[data-theme="light"] .tab-plus, :root[data-theme="light"] .nav-badge { background: #c9a55c; border-color: #b08d45; color: #19140a; }
:root[data-theme="light"] .btn.primary .ic, :root[data-theme="light"] .fab .ic { color: #19140a; }
:root[data-theme="light"] .chart svg { color: var(--fg); }

/* ===== Workout system ===== */
.ex-targets { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: 12.5px; }
.ex-targets .tm.p { color: var(--fg-2); font-weight: 600; }
.ex-targets .tm.s { color: var(--muted); }
.mode-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.fail-tag { display: inline-grid; place-items: center; min-width: 18px; height: 16px; padding: 0 3px; border-radius: 4px; background: var(--down-soft); color: var(--down); font-family: var(--font-data); font-size: 10.5px; font-weight: 700; }
.effort.fail { color: var(--down); }
.on-toggle { border-color: var(--down-line); color: var(--down); background: var(--down-soft); }
.set-timer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px 34px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); }
.st-clock { font-family: var(--font-data); font-size: 22px; font-weight: 600; min-width: 64px; color: var(--fg-2); }
.st-clock.run { color: var(--up); }
.rest-bar { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 82px); z-index: 21; display: grid; grid-template-columns: auto auto minmax(40px, 1fr) auto auto; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 8px 6px 14px; border: 1px solid var(--up-line); background: var(--glass); border-radius: 12px; }
@media (min-width: 960px) { .rest-bar { bottom: 82px; } }
body.kb-open .rest-bar { display: none; }
.rest-k { font-size: 13px; color: var(--fg-2); }
.rest-clock { font-family: var(--font-data); font-size: 20px; font-weight: 600; color: var(--up); }
.rest-track { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.rest-track i { display: block; height: 100%; background: var(--up); border-radius: 3px; }
.ss { position: relative; margin-top: 12px; padding: 10px 10px 10px 14px; border: 1px solid var(--accent-line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.ss > .ex-card { margin-top: 8px; }
.ss > .ex-card + .ex-card { margin-top: 8px; }
.ss-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ss-tag { font-family: var(--font-display); font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--accent); }
.ss-round { font-family: var(--font-data); font-size: 13px; color: var(--fg); font-weight: 600; }
.ss-chip { background: var(--accent-soft); color: var(--accent); }
.focus-nav { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: 10px; margin-top: 12px; }
.focus-nav .btn { min-height: 52px; min-width: 0; font-size: 16px; }
.fn-next { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.focus-top { display: grid; gap: 2px; margin-bottom: 8px; }
.focus-pos { text-align: center; font-family: var(--font-data); font-size: 13.5px; color: var(--fg-2); }
.focus-dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 2px; flex-wrap: wrap; }
.focus-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.focus-dots i.done { background: var(--up); }
.focus-dots i.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.focus-set { margin-top: 10px; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--fg); }
.wd-focus { margin-top: 6px; font-size: 14px; }
.wd-map { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.wd-map-key { display: grid; gap: 4px; font-size: 13.5px; min-width: 0; }

/* GPS recording */
.chip.warn { background: var(--down-soft); color: var(--down); }
.gps-start { margin-top: 14px; padding: 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); display: grid; gap: 10px; }
.gps-go { justify-self: start; min-height: 48px; padding: 0 20px; font-size: 16px; }
.gps-about summary { cursor: pointer; color: var(--fg-2); font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.gps-about p { margin: 6px 0 0; }
.gps-live { border-color: var(--up-line); }
.gps-live.paused { border-color: var(--accent-line); }
.gps-live.done { border-color: var(--line-2); }
.gps-big { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 10px; }
.gps-dist { font-family: var(--font-data); font-size: clamp(44px, 14vw, 64px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.gps-unit { color: var(--fg-2); font-size: 16px; }
.gps-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0 0 12px; }
.gps-stats > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.gps-stats dt { color: var(--muted); font-size: 12px; }
.gps-stats dd { margin: 2px 0 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.gps-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gps-actions .btn.big { flex: 1 1 130px; min-height: 52px; font-size: 17px; }
.gps-mini { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; min-height: 48px; border: 1px solid var(--up-line); border-radius: 12px; background: var(--up-soft); color: var(--fg); text-decoration: none; }
.gps-mini > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gps-mini-go { display: inline-flex; align-items: center; gap: 2px; color: var(--fg-2); font-size: 14px; }
.gps-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--up); flex: none; }
.gps-dot.paused { background: var(--accent); }
.gps-dot.done { background: var(--fg-2); }
@media (prefers-reduced-motion: no-preference) { .gps-dot.recording { animation: gps-pulse 1.6s ease-in-out infinite; } }
@keyframes gps-pulse { 50% { opacity: .35; } }
.route-map { margin: 8px 0 0; }
.route-map svg { display: block; width: 100%; max-width: 520px; height: auto; }
.rm-bg { fill: var(--panel-2); stroke: var(--line); }
.rm-line { fill: none; stroke: var(--series); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rm-start { fill: var(--up); stroke: var(--panel); stroke-width: 2; }
.rm-end { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.rm-scale path { stroke: var(--fg-2); stroke-width: 2; fill: none; }
.rm-scale text { fill: var(--fg-2); font-size: 11px; font-family: var(--font-data); }
.rm-key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--up); vertical-align: middle; }
.rm-key.e { border-radius: 2px; background: var(--accent); margin-left: 6px; }
.cd-gps { margin-top: 10px; }

/* One exercise at a time */
.focus-info { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.focus-info .bodymap, .focus-info svg { flex: none; }
.focus-best { display: grid; gap: 2px; font-size: 14px; }
.focus-best b { font-size: 17px; }
.ex-card.focus .ex-name { font-size: 20px; }
.ex-opts { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.ex-opts summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: 14px; }
.ex-opts summary .hint { margin-left: auto; }
.ex-opts .mode-row { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Bottom of the workout screen: rest timer, music player and save bar stay together above the tab bar. */
.log-dock { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px); z-index: 20; display: grid; gap: 8px; margin-top: 16px; }
@media (min-width: 960px) { .log-dock { bottom: 16px; } }
.log-dock > .save-bar, .log-dock > .rest-bar { position: static; margin-top: 0; }
@media (max-width: 959px) { body.kb-open .log-dock { bottom: calc(var(--kb, 0px) + 8px); } }
body.kb-open .music-bar { display: none; }

/* Music player */
.music-bar { position: relative; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 6px 6px 6px; background: var(--glass); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: pointer; }
.mb-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; padding: 0 4px 0 0; text-align: left; font: inherit; min-height: 44px; cursor: pointer; }
.mb-art { position: relative; flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; overflow: hidden; }
.mb-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.mb-art .ic { width: 20px; height: 20px; }
.mb-art.big { width: min(52vw, 180px); height: min(52vw, 180px); border-radius: 14px; }
.mb-art.big .ic { width: 44px; height: 44px; }
.mb-text { min-width: 0; display: grid; gap: 1px; }
.mb-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-sub { color: var(--fg-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-ctl { display: flex; align-items: center; gap: 2px; flex: none; }
.mb-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--fg); cursor: pointer; }
.mb-btn .ic { width: 20px; height: 20px; }
.mb-btn.mb-pp { background: var(--accent); color: var(--accent-ink); }
.mb-btn:disabled { opacity: .35; cursor: default; }
.mb-ctl.big { justify-content: center; gap: 18px; margin: 6px 0 4px; }
.mb-ctl.big .mb-btn { width: 56px; height: 56px; }
.mb-ctl.big .mb-btn.mb-pp { width: 68px; height: 68px; }
.mb-ctl.big .mb-btn .ic { width: 26px; height: 26px; }
.music-bar > .btn, .music-bar > a.btn { flex: none; }
.mb-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.mb-prog i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
@media (max-width: 340px) { .mb-ctl .mb-btn:not(.mb-pp) { width: 38px; } .mb-art:not(.big) { width: 38px; height: 38px; } }
/* A subtle slide when the track changes: from the right for next, from the left for previous. */
@media (prefers-reduced-motion: no-preference) {
  .dir-next { animation: mb-in-next .32s ease-out; }
  .dir-prev { animation: mb-in-prev .32s ease-out; }
  .music-sheet { animation: ms-up .22s ease-out; }
}
@keyframes mb-in-next { from { opacity: 0; transform: translateX(18px); } }
@keyframes mb-in-prev { from { opacity: 0; transform: translateX(-18px); } }
@keyframes ms-up { from { opacity: 0; transform: translateY(24px); } }
.music-ov { z-index: 70; }
.music-sheet { width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px 20px 0 0; padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow); display: grid; gap: 12px; outline: none; }
@media (min-width: 640px) { .music-ov { place-items: center; } .music-sheet { border-radius: 20px; } }
.ms-head { display: flex; align-items: center; justify-content: space-between; }
.ms-head .icon-btn { width: 44px; height: 44px; }
.ms-now { display: grid; justify-items: center; gap: 12px; text-align: center; }
.ms-text { min-width: 0; max-width: 100%; }
.ms-title { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.ms-artist { color: var(--fg-2); margin-top: 2px; overflow-wrap: anywhere; }
.ms-svc { margin-top: 6px; }
.ms-bar { height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
.ms-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.ms-actions { justify-content: center; gap: 8px; }
.ms-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ms-svc-btn { min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg); font: inherit; font-size: 14px; cursor: pointer; padding: 0 8px; }
.ms-svc-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); font-weight: 600; }

/* Home: choose a workout, then the progress graph */
.home-start { display: grid; gap: 4px; margin: 0 0 14px; }
.home-start .btn.lg { min-height: 54px; font-size: 17px; }
.home-start .hs-main { width: 100%; justify-content: center; }
.home-graph { margin-bottom: 4px; }
.hg-unit-t { font-family: var(--font-body, inherit); font-size: 14px; color: var(--fg-2); font-weight: 500; letter-spacing: 0; text-transform: none; }
.hg-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.hg-part .input { min-height: 40px; width: auto; }
.hg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.hg-val b { font-family: var(--font-data); font-size: clamp(30px, 9vw, 40px); font-weight: 600; font-variant-numeric: tabular-nums; }
.hg-unit { color: var(--fg-2); font-size: 15px; }
.hg-help { margin-top: 8px; }
.hg-empty { padding: 18px 14px; border: 1px dashed var(--line-2); border-radius: 12px; display: grid; gap: 10px; justify-items: start; }
.hg-empty p { margin: 0; }
/* Measurement entry and history */
.measure-form { display: grid; gap: 10px; }
.mf-bmi { margin: 0; font-size: 15px; }
.mf-actions { flex-wrap: wrap; }
.bm-list { display: grid; gap: 6px; }
.bm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 28px; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.bm-edit .ic { width: 16px; height: 16px; color: var(--fg-2); }
/* Onboarding and settings choices */
.hc-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 10px; }
.home-choices { display: grid; gap: 10px; }
/* Choosing a workout */
.cw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); }
.cw-row:first-child { border-top: 0; }
.cw-main { display: grid; gap: 2px; min-width: 0; }
.cw-main b { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cw-group { margin-top: 8px; }
.cw-group .label { display: block; margin: 6px 0 2px; }
.cw-prog { border-top: 1px solid var(--line); padding: 4px 0; }
.cw-prog summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; }
.cw-prog .cw-row { padding-left: 8px; }
/* Exercise demonstrations */
.demo-btn { width: 40px; height: 40px; }
.demo-sheet { display: grid; gap: 8px; }
.demo h3.demo-h { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-2); margin: 12px 0 4px; }
.demo p { margin: 0 0 6px; }
.demo-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.demo-list.warn li::marker { color: var(--down); }
.demo-video video { width: 100%; max-height: 50vh; border-radius: 12px; background: #000; display: block; }
.demo-err { padding: 12px; border: 1px solid var(--down-line); background: var(--down-soft); border-radius: 10px; display: grid; gap: 8px; justify-items: start; }
.demo-err p { margin: 0; }
.demo-novideo { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px dashed var(--line-2); border-radius: 12px; }
.demo-novideo p { margin: 0; }
.lib-demo { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }

/* Simpler Home (2026-11-01): one notice line, one main action with a single line under it, one "this week" line */
.home-note { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 0 2px 0 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; color: var(--fg-2); }
.home-note .hn-txt { flex: 1; min-width: 0; }
.home-note b { color: var(--fg); font-weight: 600; }
.home-note .hn-more { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; color: var(--fg-2); font-size: 13px; }
.home-note .icon-btn { border: 0; background: none; width: 40px; height: 40px; }
.hs-line { margin: 0; font-size: 14px; color: var(--fg-2); text-align: center; }
.hs-line b { color: var(--fg); font-weight: 600; }
.hs-line .linkish { display: inline-flex; align-items: center; min-height: 40px; }
.home-week { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding: 4px 0; color: var(--fg-2); }
.hw-item { display: grid; align-content: start; gap: 2px; min-height: 44px; padding: 2px 4px; border-radius: 8px; color: inherit; text-decoration: none; text-align: center; font-size: 13px; line-height: 1.3; }
a.hw-item:hover { color: var(--fg); background: var(--panel); }
.hw-item b { font-family: var(--font-data); font-size: 22px; font-weight: 600; line-height: 1.1; color: var(--fg); }

/* Workout screen: compact header (back, title, workout details, ⋯ menu); the tab bar is hidden while a workout is open */
.wk-head { flex-wrap: nowrap; align-items: center; gap: 10px; padding-block: 2px 10px; }
.wk-head-main { flex: 1; min-width: 0; display: grid; justify-items: start; }
.wk-head h1 { font-size: 24px; line-height: 1; }
.wk-head .ed-summary { width: 100%; min-width: 0; min-height: 32px; padding: 2px 0; gap: 6px; border: 0; border-radius: 6px; background: none; overflow: hidden; }
.wk-head .ed-sum-main { display: flex; align-items: baseline; gap: 6px; flex: 1 1 auto; min-width: 0; }
.wk-head .ed-sum-name { font-size: 14px; flex: none; max-width: 55%; }
.wk-head .ed-sum-meta { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-back { flex: none; }
@media (min-width: 960px) { .wk-back { display: none; } }
.wk-menu { min-width: 210px; }
.wk-menu-label { padding: 6px 10px 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wk-menu .ic-gap { width: 18px; flex: none; }
@media (max-width: 959px) {
  .shell.working .main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .shell.working .log-dock { bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
  body.kb-open .shell.working .log-dock { bottom: calc(var(--kb, 0px) + 8px); }
}
@media (max-width: 359px) {
  .save-bar .save-sum { font-size: 12px; }
  .save-bar .sb-more { display: none; }
}

/* ===== Progress → Body: body diagram, measurement details and guides (2026-11-04) ===== */
.bd-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.bd-goal { min-height: 40px; padding: 0 14px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); color: var(--fg); font: inherit; font-size: 13px; }
.bd-goal b { color: var(--accent); font-weight: 600; }
.bd-layout { display: block; }
.bd-layout.wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 16px; align-items: start; }
.bd-main { min-width: 0; }
.bd-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; min-width: 0; border-radius: var(--radius); }
.bd-pickone p { margin: 0; color: var(--fg-2); }
.bd-foot { margin: 10px 0 0; text-align: center; }
.bd-weight { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--fg); font: inherit; text-align: left; }
.bd-weight:hover, .bd-label:hover, .bl-row:hover { border-color: var(--line-2); }
.bd-weight.on, .bd-label.on, .bl-row.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.bd-wl { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.bd-wv { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.bd-wv b { font-family: var(--font-data); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-wv small { color: var(--fg-2); font-size: 13px; }
.bd-ch { font-style: normal; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.bd-ch.up { color: var(--up); } .bd-ch.down { color: var(--down); } .bd-ch.flat { color: var(--muted); }
.bd-wv .bd-ch { margin-left: 6px; font-size: 13px; }
.bd-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bd-diagram { position: relative; width: 100%; margin-top: 10px; }
.bd-svg { position: absolute; inset: 0; display: block; overflow: visible; }
.bd-part { fill: var(--panel-2); stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bd-part.on { fill: var(--accent-soft); stroke: var(--accent-line); }
.bd-fd { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bd-band { fill: var(--accent-soft); stroke: none; }
.bd-tape { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bd-tape.back { stroke-dasharray: 2 2.5; opacity: .4; }
.bd-site.on .bd-tape { stroke: var(--accent); stroke-width: 2.2; opacity: 1; }
.bd-site.on .bd-tape.back { opacity: .75; }
.bd-dot { fill: var(--muted); }
.bd-site.on .bd-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.bd-lead { fill: none; stroke: var(--line-2); stroke-width: 1; }
.bd-lead.on { stroke: var(--accent); stroke-width: 1.5; }
.bd-label { position: absolute; display: grid; align-content: center; gap: 1px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--fg); font: inherit; line-height: 1.15; text-align: left; min-width: 0; }
.bd-label.right { text-align: right; }
.bd-name { font-size: 11px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-val { font-family: var(--font-data); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.bd-val .bd-ch { margin-left: 4px; font-size: 11px; font-weight: 500; }
.bd-label.blank .bd-val { color: var(--muted); font-weight: 500; }
.bd-diagram.compact .bd-label { padding: 3px 6px; }
.bd-diagram.compact .bd-val { font-size: 13.5px; }
.bd-diagram.compact .bd-name { font-size: 10.5px; }
.bd-diagram.tight .bd-label { padding: 3px 6px; }
.bd-diagram.tight .bd-val { font-size: 13.5px; }
.bd-diagram.tight .bd-val .bd-ch { margin-left: 3px; }
.bl-list { display: grid; gap: 6px; }
.bl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(64px, auto); align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); font: inherit; text-align: left; }
.bl-name { display: grid; min-width: 0; }
.bl-name small { font-size: 12px; color: var(--muted); }
.bl-row .bd-ch { text-align: right; font-size: 12.5px; }
.bd-unsorted, .bd-remind { margin-top: 16px; display: grid; gap: 10px; }
.bd-unsorted p, .bd-remind p { margin: 0; }
.bdu-list { display: grid; gap: 6px; }
.bdu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.bdu-row small { display: block; font-size: 12px; color: var(--muted); }
.sort-opts { display: grid; gap: 6px; }
.sort-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); cursor: pointer; }
.sort-opt input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.sort-opt:has(input:checked) { border-color: var(--accent); }
/* The detail panel: a bottom sheet on phones, beside the diagram on wide screens */
.bd-sheet { max-width: 560px; }
.bd-sheet:focus { outline: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: -6px auto 2px; }
@media (min-width: 640px) { .sheet-grip { display: none; } }
.bd-detail { display: grid; gap: 14px; min-width: 0; }
.bd-detail > *, .bdd-sec > *, .bg-body > * { min-width: 0; }
.bdd-head { display: flex; align-items: flex-start; gap: 10px; }
.bdd-head > :first-child { flex: 1; }
.bdd-title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: .02em; line-height: 1.05; text-transform: uppercase; }
.bdd-series, .bdd-method { display: block; margin-top: -8px; }
.bdd-series .input { min-height: 40px; width: 100%; max-width: 340px; }
.bdd-now { white-space: nowrap; text-align: right; }
.bdd-now b { font-family: var(--font-data); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bdd-now span { margin-left: 4px; color: var(--fg-2); }
.bdd-pill { justify-self: start; margin: -6px 0 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--fg-2); font-family: var(--font-data); font-size: 13px; }
.bdd-pill.up { color: var(--up); background: var(--up-soft); border-color: var(--up-line); }
.bdd-pill.down { color: var(--down); background: var(--down-soft); border-color: var(--down-line); }
.bdd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0; }
.bdd-stats div { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.bdd-stats dt { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.bdd-stats dd { margin: 2px 0 0; font-family: var(--font-data); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bdd-stats dd small { display: block; font-family: var(--font-body); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.bdd-sec { display: grid; gap: 8px; min-width: 0; }
.bdd-sec h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--fg-2); letter-spacing: .08em; text-transform: uppercase; }
.bdd-sec p { margin: 0; }
.bdd-cmp { font-size: 14px; color: var(--fg-2); }
.bdd-cmp b { font-weight: 600; }
.bdd-tform { display: grid; gap: 8px; }
.bdd-tform .input { max-width: 170px; }
.bdd-note { padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; font-size: 13.5px; }
.bdd-note p { margin: 0; }
.bdd-hist { display: grid; gap: 6px; }
.bdd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 28px; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--fg); font: inherit; text-align: left; }
.bdd-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.bdd-actions .hint { margin: 0; align-self: center; }
.bd-sheet .bdd-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); z-index: 1; margin: 0 -16px calc(-18px - env(safe-area-inset-bottom, 0px)); padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--panel); }
.bd-sheet .bdd-actions .btn { flex: 1 1 0; justify-content: center; }
/* How to measure */
.bg-fig { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.bg-fig .bd-part { fill: var(--panel); }
.bg-fig .bd-part.on { fill: var(--accent-soft); }
.bg-fig .bd-band { opacity: .55; }
.bg-tape path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: bg-in .6s ease-out both; }
.bg-tape .back { stroke-dasharray: 4 4; opacity: .7; }
.bg-alt path { fill: none; stroke: var(--fg-2); stroke-width: 1.2; stroke-dasharray: 2 3; opacity: .8; vector-effect: non-scaling-stroke; }
.bg-mark line { stroke: var(--fg-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bg-mark circle { fill: var(--accent); }
.bg-mark text { fill: var(--fg); font-family: var(--font-body); }
@keyframes bg-in { from { opacity: 0; } to { opacity: 1; } }
.bg-body { display: grid; gap: 10px; min-width: 0; }
.bg-facts { display: grid; gap: 8px; margin: 0; }
.bg-facts div { padding: 8px 10px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--panel-2); }
.bg-facts dt { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.bg-facts dd { margin: 2px 0 0; font-size: 14px; }
.bg-help { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; color: var(--fg-2); }
.bg-help .ic { width: 16px; height: 16px; flex: none; }
.bg-h { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--fg-2); letter-spacing: .08em; text-transform: uppercase; }
.bg-steps, .bg-mistakes, .bg-tips { display: grid; gap: 5px; margin: 0; padding-left: 22px; font-size: 14px; }
.bg-steps li::marker { color: var(--accent); font-family: var(--font-data); font-weight: 600; }
.bg-mistakes, .bg-tips { color: var(--fg-2); }
.bg-mistakes li::marker { content: '✕  '; color: var(--down); }
.bg-body.compact { gap: 8px; font-size: 13.5px; }
.bg-body.compact .bg-steps, .bg-body.compact .bg-mistakes { font-size: 13.5px; }
.mf-guide-btn { justify-self: start; min-height: 32px; }
.mf-guide { max-height: 280px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.body-remind { margin: 0; }
@media (prefers-reduced-motion: reduce) { .bg-tape path { animation: none; } }
@media (forced-colors: active) { .bd-site.on .bd-tape, .bg-tape path { stroke: Highlight; } .bd-label.on, .bl-row.on, .bd-weight.on { border: 2px solid Highlight; } }
