* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  color: #f0f2eb;
  background: #141714;
  --line: #3c443c;
  --muted: #b8c2b6;
  --accent: #d9f697;
}
body { margin: 0; }
main { max-width: 448px; margin: 0 auto; padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.card { background: #202620; border: 1px solid var(--line); border-radius: 24px; padding: clamp(14px, 4.5vw, 24px); }
header, .row, .pump { display: flex; align-items: center; gap: 10px; }
header, .reps-label, .bodyweight, .pump { justify-content: space-between; }
h1, p { margin: 0; }
h1 { font-size: 22px; letter-spacing: .06em; }
.subtitle { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.actions button { min-height: 44px; padding: 0; white-space: nowrap; }
.tag { font-size: 12px; color: var(--accent); border: 1px solid #53634a; border-radius: 20px; padding: 5px 10px; }
.result { padding: 17px 0 15px; border-bottom: 1px solid var(--line); }
.caption { color: var(--muted); font-size: 13px; }
.number { display: flex; align-items: baseline; column-gap: 7px; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.number strong { font-size: clamp(30px, 10vw, 49px); line-height: 1.17; overflow-wrap: anywhere; }
.number span { font-size: 17px; letter-spacing: 0; }
#multiple { margin-top: 5px; color: var(--accent); font-size: 15px; }
.controls { padding: 9px 0; display: grid; gap: 8px; }
.row { min-height: 38px; font-size: 14px; }
.weight label { flex: none; }
input, button { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input[type=range] { flex: 1; min-width: 0; height: 36px; accent-color: var(--accent); }
.editable { color: inherit; background: #2b342c; border: 1px solid var(--line); border-radius: 9px; min-height: 40px; padding: 0 9px; }
.editable span { color: var(--accent); }
.editor { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.editor input { width: 50%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 16px; background: #151b15; color: inherit; }
#reps-hint { color: var(--muted); font-size: 12px; }
.reps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.reps button, .actions button { border: 1px solid #515d50; color: #edf1e7; background: #2b342c; border-radius: 24px; padding: 0; font-size: 14px; }
.reps button { min-height: 40px; }
.reps button[aria-pressed=true], .actions button[aria-pressed=true] { color: #192416; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.reps button[aria-disabled=true] { color: #a1aa9e; background: transparent; border-style: dashed; cursor: default; }
.summary { padding: 9px 0 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.55; }
#comparison, .feedback { margin-top: 4px; color: var(--accent); font-size: 13px; }
#suggestion { margin-top: 4px; }
.save { width: 100%; min-height: 46px; border: 0; border-radius: 12px; color: #172312; background: var(--accent); font-weight: 750; }
.save:disabled { opacity: .55; cursor: default; }
.save-row, .history-heading, .record-row { display: flex; align-items: center; gap: 8px; }
.save-row .save { flex: 1; width: auto; }
#repeat { min-height: 46px; white-space: nowrap; }
.history { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.history-heading, .record-row { justify-content: space-between; }
.history h2 { margin: 0; font-size: 15px; }
.metrics { display: flex; gap: 4px; }
.metrics button { min-height: 36px; padding: 0 8px; border-radius: 16px; border: 1px solid var(--line); color: inherit; background: #2b342c; font-size: 12px; }
.metrics button[aria-pressed=true] { background: var(--accent); color: #192416; }
#trend-empty { padding: 14px 0; color: var(--muted); font-size: 13px; }
#trend-chart { display: block; width: 100%; margin: 8px 0 12px; color: var(--accent); }
#trend-chart text { fill: var(--muted); font-size: 10px; }
#trend-chart .grid { stroke: var(--line); }
#record-list { margin: 4px 0 0; padding: 0; list-style: none; }
.record-row { border-bottom: 1px solid var(--line); font-size: 13px; }
.record-row button { min-height: 44px; border: 0; padding: 0 4px; background: transparent; color: var(--muted); white-space: nowrap; }
.record-row button[aria-pressed=true] { color: #ffd0b1; }
.safety { margin: 9px 0; color: #e0cfa4; font-size: 12px; }
.pump { border-top: 1px solid var(--line); padding-top: 2px; color: var(--muted); font-size: 12px; }
.pump button { color: inherit; background: transparent; border: 0; font-size: 20px; min-width: 42px; min-height: 40px; }

