/* Bo7 members hub and staff page, to the Bo7 brand guidelines v1.0:
   bone or black canvas, tan as the accent (never a background), Helvetica Neue / Inter, calm and spacious.
   One column, at most 560px wide (staff page 860px); a bottom tab bar on every screen size. */
:root {
  --bg: #F4EFE7;        /* Bone */
  --surface: #FBF8F3;
  --sunk: #E8DFD0;      /* Cream */
  --ink: #0A0A0A;       /* Bo7 Black */
  --ink-2: #1F1F1F;     /* Graphite */
  --muted: #6F6455;
  --line: #E0D6C6;
  --tan: #C49A6C;       /* Bo7 Tan: accents only */
  --tan-text: #7E6244;  /* Deep tan, darkened for small text on bone */
  --tan-wash: #EFE5D6;
  --button: #0A0A0A;
  --on-button: #F4EFE7;
  --bad: #9B3B2B;
  --body: "Helvetica Neue", Inter, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A; --surface: #151515; --sunk: #1F1F1F; --ink: #F4EFE7; --ink-2: #E8DFD0; --muted: #A3978A;
    --line: #2B2722; --tan: #C49A6C; --tan-text: #D2AE85; --tan-wash: #221C15; --button: #F4EFE7; --on-button: #0A0A0A;
    --bad: #E58C79; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0A0A; --surface: #151515; --sunk: #1F1F1F; --ink: #F4EFE7; --ink-2: #E8DFD0; --muted: #A3978A;
  --line: #2B2722; --tan: #C49A6C; --tan-text: #D2AE85; --tan-wash: #221C15; --button: #F4EFE7; --on-button: #0A0A0A;
  --bad: #E58C79; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--tan); outline-offset: 2px; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding: 0 20px calc(100px + env(safe-area-inset-bottom, 0px)); }
[hidden] { display: none !important; }

/* Header: the open-frame mark in tan, 32px high (brand minimum) */
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top, 0px)) 0 12px; }
.logo { display: block; width: 53px; height: 32px; background: var(--tan);
  -webkit-mask: url(../assets/bo7-logo.png) center / contain no-repeat; mask: url(../assets/bo7-logo.png) center / contain no-repeat; }
.sample { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tan-text); border: 1px solid var(--tan); border-radius: 999px; padding: 3px 9px; }

/* Type: bold, calm headlines in sentence case; tracked caps only for small labels */
h1 { font: 700 32px/1.1 var(--body); margin: 10px 0 6px; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font: 700 19px/1.25 var(--body); margin: 0; letter-spacing: -0.005em; }
h3 { font: 700 16px/1.3 var(--body); margin: 0; }
.lede { color: var(--muted); margin: 0; max-width: 60ch; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tan-text); margin: 0; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--tan); }
.label { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.section { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link { background: none; border: 0; padding: 0; color: var(--tan-text); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--tan); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: 12px 20px; font-weight: 700; cursor: pointer; min-height: 48px; text-decoration: none; color: var(--ink); letter-spacing: .01em; }
.btn.primary { background: var(--button); border-color: var(--button); color: var(--on-button); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 14px; font-size: 16px; min-height: 48px; }
.input:focus { outline: none; border-color: var(--tan); box-shadow: 0 0 0 3px var(--tan-wash); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.err { font-size: 13px; color: var(--bad); margin: 0; }
.err:empty { display: none; }

/* Login */
.login { min-height: calc(100vh - 90px); display: flex; flex-direction: column; justify-content: center; gap: 22px; padding-bottom: 40px; }
.phone { display: flex; gap: 8px; }
.phone .cc { width: 88px; flex: none; text-align: center; color: var(--muted); }
.code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code input { text-align: center; font-size: 22px; font-weight: 700; padding: 10px 0; }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }

/* Cards: used for objects, not every block */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat { padding: 14px 12px 14px 0; display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { padding-left: 14px; border-left: 1px solid var(--line); }
.stat b { font: 700 30px/1 var(--body); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--muted); }
.next { display: flex; align-items: center; gap: 14px; }
.next .when { font: 700 20px/1.2 var(--body); }
.next .meta { color: var(--muted); font-size: 14px; }
.next .btn { margin-left: auto; flex: none; }

.news { display: flex; flex-direction: column; }
.post { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.post:first-child { border-top: 0; padding-top: 0; }
.post:last-child { padding-bottom: 0; }
.post-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); }
.tag.pin, .tag.tan { background: var(--tan-wash); color: var(--tan-text); }
.post h3 { font-size: 17px; margin: 2px 0 0; }
.post p { margin: 0; color: var(--ink-2); font-size: 15px; }
.empty { color: var(--muted); font-size: 15px; margin: 0; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; min-height: 92px; }
.quick button b { font-size: 16px; }
.quick button span { font-size: 13px; color: var(--muted); }
.quick svg { width: 22px; height: 22px; color: var(--tan); }

/* This week (home) */
.week-card { display: flex; flex-direction: column; gap: 10px; border-left: 2px solid var(--tan); padding: 4px 0 4px 16px; }
.week-card .when { font: 700 22px/1.2 var(--body); letter-spacing: -0.01em; }
.week-card .meta { color: var(--muted); font-size: 14px; }

/* PBs */
.pb-list { display: flex; flex-direction: column; }
.pb { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 0; border: 0; border-top: 1px solid var(--line); align-items: center; background: none; text-align: left; width: 100%; cursor: pointer; }
.pb:first-child { border-top: 0; padding-top: 0; }
.pb:last-child { padding-bottom: 0; }
.pb b { font-size: 16px; }
.pb .val { font: 700 26px/1 var(--body); text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pb .val small { font: 700 13px var(--body); color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.pb .sub { font-size: 13px; color: var(--muted); }
.pb .up { font-size: 13px; color: var(--tan-text); font-weight: 700; text-align: right; }
.pb svg.trend { grid-column: 1 / -1; width: 100%; height: 28px; margin-top: 6px; }
.history { display: flex; flex-direction: column; }
.history > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.history > div:first-child { border-top: 0; }
.history .v { font: 700 22px/1 var(--body); font-variant-numeric: tabular-nums; min-width: 80px; }
.history .d { color: var(--muted); font-size: 14px; flex: 1; }
.history .best { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tan-text); background: var(--tan-wash); border-radius: 999px; padding: 3px 8px; }
.del { border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 0; }
.del:hover { color: var(--bad); }
.unit-sm { font: 700 13px var(--body); color: var(--muted); }

/* Milestones timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: flex; flex-direction: column; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--tan); }
.timeline li.auto::before { background: var(--tan); }
.timeline b { font-size: 16px; }
.timeline span { font-size: 13px; color: var(--muted); }
.timeline li.next-up::before { border-style: dashed; border-color: var(--muted); background: var(--surface); }
.timeline .del { position: absolute; right: 0; top: 0; }
.timeline li.mine { padding-right: 64px; }

/* Programme */
.weeks { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.weeks::-webkit-scrollbar { display: none; }
.wk { flex: none; min-width: 52px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: center; font-variant-numeric: tabular-nums; }
.wk b { display: block; font-size: 17px; }
.wk span { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wk[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.wk[aria-pressed="true"] span { color: var(--tan); }
.wk.now { box-shadow: inset 0 -2px 0 var(--tan); }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 10px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg b { font-size: 13px; }
.seg span { font-size: 11px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button[aria-pressed="true"] span { color: var(--tan); }
.focus-note { border-left: 2px solid var(--tan); padding: 2px 0 2px 14px; color: var(--ink-2); font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.session-head { display: flex; flex-direction: column; gap: 4px; }
.warm { font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; }
.warm span { background: var(--sunk); border-radius: 999px; padding: 4px 10px; }
.blocks { display: flex; flex-direction: column; }
.blk { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.blk:first-child { border-top: 0; padding-top: 0; }
.blk:last-child { padding-bottom: 0; }
.blk-name { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tan-text); padding-top: 3px; }
.blk-rows { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ex { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ex b { font-size: 15px; font-weight: 700; }
.ex .sr { flex: none; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.ex.key b::after { content: " · main lift"; font-weight: 400; color: var(--tan-text); font-size: 13px; }
.callout { font-size: 14px; color: var(--ink-2); background: var(--tan-wash); border-radius: 10px; padding: 10px 12px; }
.callout strong { display: block; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tan-text); margin-bottom: 2px; }
.logger { display: flex; flex-direction: column; gap: 12px; }
.logger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.guide-kg { font: 700 15px var(--body); color: var(--tan-text); font-variant-numeric: tabular-nums; }
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.sets label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sets .input { text-align: center; font-variant-numeric: tabular-nums; padding: 10px 6px; }
.table-wrap { overflow-x: auto; }
.mini { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.mini th, .mini td { text-align: right; padding: 8px 6px; border-top: 1px solid var(--line); white-space: nowrap; }
.mini th:first-child, .mini td:first-child { text-align: left; white-space: normal; }
.mini th { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.mini tr.me td { font-weight: 700; }
.mini .gain { color: var(--tan-text); font-weight: 700; }
details.glossary summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
details.glossary summary::after { content: "+"; color: var(--tan); font-weight: 700; }
details.glossary[open] summary::after { content: "–"; }
details.glossary dl { margin: 12px 0 0; display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 10px 14px; font-size: 14px; }
details.glossary dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tan-text); padding-top: 2px; }
details.glossary dd { margin: 0; color: var(--ink-2); }

/* Sheet (forms) */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(10,10,10,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet-in { width: 100%; max-width: 560px; background: var(--bg); border-radius: 18px 18px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.x { border: 0; background: var(--sunk); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 500; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--tan); margin-top: 2px; flex: none; }

/* Profile */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.list > div, .list > label { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.list > * + * { border-top: 1px solid var(--line); }
.list span { color: var(--muted); text-align: right; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--surface); border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--tan); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--tan); outline-offset: 2px; }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar button { border: 0; background: none; padding: 10px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); cursor: pointer; min-height: 60px; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--ink); }
.tabbar button[aria-current="page"] svg { color: var(--tan); }

.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Notices */
.banner { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--tan-wash); color: var(--tan-text); font-size: 14px; font-weight: 700; }
.setup { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 10px; }

/* Staff page */
.wide { max-width: 860px; }
.tabbar-in.staff { max-width: 860px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border-top: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--tan-wash); }
.scroll { overflow-x: auto; }
.result { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.result div { background: var(--sunk); border-radius: 10px; padding: 10px 12px; }
.result b { display: block; font: 700 24px/1 var(--body); }
.result span { font-size: 12px; color: var(--muted); }
.issues { font-size: 13px; color: var(--ink-2); margin: 0; padding-left: 18px; max-height: 240px; overflow: auto; }
.blocked { border: 1px solid var(--bad); color: var(--bad); border-radius: 10px; padding: 12px 14px; font-size: 14px; font-weight: 700; }
textarea.input { min-height: 110px; resize: vertical; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .input { flex: 1 1 200px; width: auto; }
.pill { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); }
.pill.published { background: var(--ink); color: var(--bg); }
.pill.draft { background: var(--tan-wash); color: var(--tan-text); }
.pill.quiet { color: var(--bad); background: transparent; border: 1px solid currentColor; }
.grid-guides input { width: 74px; text-align: center; padding: 6px; min-height: 36px; font-size: 14px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.tan-link { color: var(--tan-text); }
.kg-in { width: 84px; min-height: 36px; padding: 6px; text-align: center; }
.warm .label.full { flex-basis: 100%; background: none; padding: 0; }
.narrow { flex: 0 1 200px; width: auto; }
.grow { flex: 1 1 200px; }
.wide-sheet { max-width: 760px; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.md-grid > div { min-width: 0; }

/* Workout logger (full screen, thumb-sized controls) */
.workout { position: fixed; inset: 0; z-index: 35; background: var(--bg); display: flex; flex-direction: column; }
.wo-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.wo-head { flex: 1; min-width: 0; }
.wo-head h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-timer { font: 700 15px var(--body); font-variant-numeric: tabular-nums; color: var(--tan-text); }
.wo-body { flex: 1; overflow-y: auto; padding: 14px 16px calc(120px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; }
.wo-ex { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 8px; }
.wo-ex-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wo-ex-name { border: 0; background: none; padding: 0; text-align: left; font: 700 16px/1.3 var(--body); cursor: pointer; color: var(--ink); }
.wo-ex-name:hover { color: var(--tan-text); }
.wo-target { font-size: 13px; color: var(--muted); }
.wo-guide { font-size: 13px; font-weight: 700; color: var(--tan-text); }
.set-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 76px 64px 46px; gap: 6px; align-items: center; border-radius: 8px; padding: 2px; }
.set-row.head { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.set-row .no { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.set-row .prev { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row .input { min-height: 44px; padding: 8px 4px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.set-row .tick { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; color: var(--muted); }
.set-row.done { background: var(--tan-wash); }
.set-row.done .tick { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.wo-add { align-self: flex-start; border: 0; background: none; color: var(--tan-text); font-weight: 700; padding: 8px 2px; cursor: pointer; }
.wo-rest { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; justify-content: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); z-index: 36; }
.wo-rest b { font: 700 22px var(--body); font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.wo-rest .label { color: var(--tan); }
.wo-rest .btn { border-color: var(--bg); color: var(--bg); }
.wo-rest .btn.primary { background: var(--bg); color: var(--ink); }
.resume { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(68px + env(safe-area-inset-bottom, 0px)); z-index: 31; width: calc(100% - 32px); max-width: 528px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; border-radius: 12px; padding: 12px 16px; background: var(--ink); color: var(--bg); cursor: pointer; text-align: left; font-size: 14px; }
.resume b { color: var(--tan); }
.resume-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.cta { display: flex; flex-direction: column; gap: 10px; }

/* Progress */
.ex-list, .wo-list { display: flex; flex-direction: column; }
.ex-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; }
.ex-item:first-child { border-top: 0; padding-top: 0; }
.ex-item:last-child { padding-bottom: 0; }
.ex-item b { font-size: 15px; }
.ex-item .sub { font-size: 13px; color: var(--muted); }
.ex-item .val { text-align: right; font: 700 18px var(--body); font-variant-numeric: tabular-nums; }
.ex-item .val small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ex-item svg { grid-column: 1 / -1; width: 100%; height: 22px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--muted); font: 11px var(--body); }
.chart .grid { stroke: var(--line); }
.chart .line { stroke: var(--tan); fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--tan-wash); }
.chart .dot { fill: var(--surface); stroke: var(--tan); stroke-width: 2; }
.chart .dot.last { fill: var(--tan); }
.pr-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pr-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--tan-wash); font-size: 14px; }
.pr-list b { color: var(--tan-text); }
@media (max-width: 380px) {
  .set-row { grid-template-columns: 26px minmax(0, 1fr) 68px 56px 44px; gap: 4px; }
  h1 { font-size: 28px; }
}

.set-row .c { text-align: center; }
.wo-add.muted { color: var(--muted); font-weight: 400; }
.wo-ex .toolbar { gap: 14px; }
.md-grid .wide { grid-column: 1 / -1; }
.toolbar .field .input { flex: none; }
