/* VOICE a calm gym tool, used one-handed between sets
   IDEA a set log with big numbers; a finished set fills solid
   PICTURE the open exercise card itself
   COLOUR fixed charcoal, near-white, one sky-blue accent
   TYPE system sans with rounded numerals
   LAYOUT single phone column, actions at the bottom, tabs under the thumb */
:root { color-scheme: dark; --bg: #18191b; --card: #232527; --well: #313437; --line: #45494d; --ink: #f6f7f8; --soft: #b9bec3; --acc: #6ec6f5; --on: #07202e;
  --num: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif; }
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: var(--bg); color: var(--ink); font: 16px/1.4 -apple-system, "Segoe UI", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
h1 { font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: 20px; line-height: 1.2; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.soft { color: var(--soft); font-size: 14px; }
.app { position: relative; display: flex; flex-direction: column; height: 100%; max-width: 480px; margin: 0 auto; }
main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 16px 28px; }
.tabs { display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs button { flex: 1; min-height: 60px; text-align: center; font-weight: 600; color: var(--soft); }
.tabs [aria-current] { color: var(--acc); box-shadow: inset 0 3px var(--acc); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
.tag { font-size: 13px; color: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card { width: 100%; background: var(--card); border-radius: 18px; padding: 16px; }
.row { display: flex; align-items: center; gap: 14px; }
.grow { flex: 1; }
.btn { display: block; width: 100%; min-height: 56px; padding: 0 16px; border-radius: 14px; background: var(--acc); color: var(--on); font-size: 17px; font-weight: 700; text-align: center; }
.btn.quiet { background: var(--well); color: var(--ink); font-weight: 600; }
.btn:disabled { opacity: .4; cursor: default; }
.day { flex: none; width: 60px; font: 800 52px/1 var(--num); text-align: center; }
.day.on { color: var(--acc); }
.bar { display: flex; gap: 4px; margin: 14px 0; }
.bar i { flex: 1; height: 8px; border-radius: 4px; background: var(--well); }
.bar i.f { background: var(--acc); }
.ex { padding: 12px; }
.top { display: flex; align-items: center; gap: 8px; }
.name { flex: 1; min-height: 52px; font-weight: 700; font-size: 19px; line-height: 1.2; }
.name small { display: block; font-size: 14px; font-weight: 400; color: var(--soft); margin-top: 3px; }
.swap { flex: none; min-height: 48px; padding: 0 16px; border-radius: 12px; background: var(--well); font-weight: 600; }
.full .name small { color: var(--acc); }
.coach { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 8px; }
.coach div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.coach h3 { font-size: 14px; font-weight: 500; color: var(--soft); }
.coach b { display: block; font: 700 22px/1.25 var(--num); }
.coach .t b { color: var(--acc); }
.why { font-size: 15px; margin-bottom: 12px; }
.set { display: grid; grid-template-columns: 30px minmax(0, 1.2fr) minmax(0, 1fr) 60px; gap: 8px; align-items: center; padding: 6px; border-radius: 16px; margin-top: 6px; }
.set.lab { padding: 0 6px; margin: 0; font-size: 13px; color: var(--soft); text-align: center; align-items: end; line-height: 1.2; }
.set > span { text-align: center; color: var(--soft); font-weight: 600; }
.set.lab > span { font-weight: 400; }
.val { height: 60px; border-radius: 12px; background: var(--well); text-align: center; font: 700 28px/1 var(--num); font-variant-numeric: tabular-nums; }
.val.no { font-size: 17px; font-weight: 500; color: var(--soft); }
.ok { height: 60px; border-radius: 12px; border: 2px solid #8b9197; display: grid; place-items: center; }
.ok svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.set.done { background: var(--acc); color: var(--on); }
.set.done > span { color: var(--on); }
.set.done .val { background: #ffffff47; color: var(--on); }
.set.done .ok { color: var(--acc); background: var(--on); border-color: var(--on); }
.as { font-size: 14px; color: var(--soft); padding: 4px 6px 2px 44px; }
.rpe { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.chips.half { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips button { min-height: 60px; border-radius: 12px; background: var(--well); text-align: center; font: 700 22px/1.1 var(--num); }
.chips.half button { min-height: 48px; font-size: 18px; }
.chips small { display: block; font: 400 13px/1.2 -apple-system, "Segoe UI", sans-serif; color: var(--soft); }
.chips [aria-pressed=true] { background: var(--acc); color: var(--on); }
.chips [aria-pressed=true] small { color: var(--on); }
.chips button:disabled { opacity: .4; cursor: default; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg button { min-height: 48px; border-radius: 11px; text-align: center; font-weight: 600; color: var(--soft); }
.seg [aria-pressed=true] { background: var(--acc); color: var(--on); }
.line { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.line span:last-child { text-align: right; font-family: var(--num); white-space: nowrap; }
.line em { display: block; font-style: normal; color: var(--soft); font-size: 14px; }
.hist { width: 100%; min-height: 48px; }
.over { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; }
.over[hidden] { display: none; }
.shade { position: absolute; inset: 0; width: 100%; background: #000000a8; }
.sheet { position: relative; width: 100%; max-height: 94%; overflow-y: auto; background: var(--bg); border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
.sheet:focus { outline: none; }
@media (prefers-reduced-motion: no-preference) { .sheet.in { animation: up .18s ease-out; } @keyframes up { from { transform: translateY(40px); } } }
.opt { width: 100%; min-height: 64px; background: var(--card); border-radius: 14px; padding: 11px 14px; }
.opt b, .opt span { display: block; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 8px; }
.pair button { border: 2px solid transparent; border-radius: 14px; background: var(--card); padding: 8px; text-align: center; }
.pair button[aria-pressed=true] { border-color: var(--acc); }
.pair b { display: block; min-height: 46px; font: 800 40px/46px var(--num); }
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.keys button, .step button { min-height: 50px; border-radius: 12px; background: var(--well); text-align: center; font: 600 23px/1 var(--num); }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.step button { background: var(--card); font-size: 19px; }
.err { min-height: 22px; font-weight: 600; font-size: 15px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 8px; }
.two.one { grid-template-columns: 1fr; }
.toast { position: absolute; z-index: 9; left: 16px; right: 16px; top: 12px; padding: 13px 16px; border-radius: 14px; background: var(--ink); color: #17181a; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; }
.toast.on { opacity: 1; }
@media (max-height: 640px) { .keys button, .step button { min-height: 44px; } .pair b { min-height: 36px; font-size: 32px; line-height: 36px; } .sheet { padding-top: 12px; } }
main { padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
.toast { top: calc(12px + env(safe-area-inset-top, 0px)); }
button.tag { min-height: 44px; padding: 3px 14px; }
button:disabled { cursor: default; }
button.card:disabled { opacity: .5; }
.tabs button { font-size: 15px; }
.btn.small { min-height: 46px; font-size: 16px; margin-top: 8px; }
.set.skip .val { color: var(--soft); font-size: 17px; font-weight: 500; opacity: .75; }
.chips.half { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two.eq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two.eq .btn.small { margin-top: 0; }
.tools { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; margin-top: 14px; }
.tools button, .three button { min-height: 48px; border-radius: 12px; background: var(--well); text-align: center; padding: 4px 8px; font-weight: 600; font-size: 15px; }
.tools [aria-pressed=true] { background: var(--ink); color: #17181a; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.seg.three { gap: 0; margin-top: 0; }
.seg.three button { background: none; }
.seg.three [aria-pressed=true] { background: var(--acc); color: var(--on); }
.three button:disabled { opacity: .4; }
textarea, .in { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid #8b9197; border-radius: 12px; padding: 11px 12px; }
.in { min-height: 48px; margin: 4px 0 10px; }
.in.num { width: 96px; flex: none; margin: 0; text-align: center; font-family: var(--num); }
.stepper { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.stepper > :first-child { flex: 1; }
.stepper button { width: 48px; height: 46px; border-radius: 12px; background: var(--well); text-align: center; font-size: 20px; }
.stepper b { width: 40px; text-align: center; font: 700 20px var(--num); }
.check { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; }
.check i { flex: none; width: 26px; height: 26px; border: 2px solid #8b9197; border-radius: 8px; }
.check[aria-pressed=true] i { background: var(--acc); border-color: var(--acc); box-shadow: inset 0 0 0 5px var(--card); }
.past .line { padding-bottom: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.pill { min-height: 44px; padding: 10px 14px; border-radius: 12px; background: var(--well); font-family: var(--num); }
.warn { border: 2px solid var(--ink); margin-bottom: 12px; font-weight: 600; }
a { color: var(--acc); }
