:root { color-scheme: light dark; --bg:light-dark(#f7f8f5,#111613); --surface:light-dark(#fff,#1a211c); --fg:light-dark(#18231b,#edf3ed); --sub:light-dark(#59655c,#a9b8ac); --line:light-dark(#dce3dc,#344138); --accent:light-dark(#286b41,#b7e39c); --on:light-dark(#fff,#15230e); --soft:light-dark(#e5f1e7,#26392b); --danger:light-dark(#a92727,#ffaba5); --danger-bg:light-dark(#fff0ed,#3a211e); --shadow:light-dark(#18231b12,#00000035); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--bg); color:var(--fg); }
:root[data-palette="ocean"] { --bg:light-dark(#f4f8fc,#101820); --surface:light-dark(#fff,#192633); --fg:light-dark(#17283b,#eef6ff); --sub:light-dark(#52677d,#adc1d5); --line:light-dark(#d6e2ee,#35495e); --accent:light-dark(#1f5e9c,#93c5fd); --on:light-dark(#fff,#0e2740); --soft:light-dark(#e4effb,#213b55); }
:root[data-palette="plum"] { --bg:light-dark(#faf6fc,#1b1323); --surface:light-dark(#fff,#291d35); --fg:light-dark(#2c1e3a,#f6eefd); --sub:light-dark(#705f7d,#c6b0d5); --line:light-dark(#e4d7ed,#4d3a60); --accent:light-dark(#7140a5,#d8b4fe); --on:light-dark(#fff,#301342); --soft:light-dark(#efe5f7,#3b2652); }
:root[data-palette="rose"] { --bg:light-dark(#fff6f8,#23141b); --surface:light-dark(#fff,#331e28); --fg:light-dark(#3c1d2b,#fff0f6); --sub:light-dark(#7e5c6a,#d2b3c0); --line:light-dark(#efd9e1,#593845); --accent:light-dark(#a13559,#f5adc5); --on:light-dark(#fff,#381321); --soft:light-dark(#f9e4ec,#4b2839); }
:root[data-palette="amber"] { --bg:light-dark(#fcf8f0,#20190f); --surface:light-dark(#fff,#30261a); --fg:light-dark(#352718,#fff6e8); --sub:light-dark(#74654e,#d4c0a1); --line:light-dark(#e8dfcc,#534633); --accent:light-dark(#875415,#f4cc83); --on:light-dark(#fff,#322109); --soft:light-dark(#f5ead2,#473720); }
:root[data-palette="slate"] { --bg:light-dark(#f5f6f8,#15171c); --surface:light-dark(#fff,#22252d); --fg:light-dark(#252a34,#f0f3f8); --sub:light-dark(#626c7d,#b0bbcb); --line:light-dark(#dce0e7,#3c4350); --accent:light-dark(#465265,#c6d2e3); --on:light-dark(#fff,#202937); --soft:light-dark(#e9edf3,#333b48); }
* { box-sizing:border-box; }
body { margin:0; -webkit-tap-highlight-color:transparent; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { touch-action:manipulation; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.5; }
button:focus-visible,a:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
input:focus,textarea:focus,select:focus { outline:2px solid var(--accent); outline-offset:1px; }
button { color:inherit; }
h1,h2,h3,p { margin:0; }
h1 { font-size:30px; line-height:1.15; letter-spacing:-.045em; font-weight:680; overflow-wrap:anywhere; }
h2 { font-size:21px; letter-spacing:-.025em; font-weight:630; }
h3 { font-size:17px; letter-spacing:-.015em; font-weight:620; }
p { line-height:1.55; }
a { color:var(--accent); }
.app-shell { max-width:520px; margin:0 auto; padding:0 18px calc(104px + env(safe-area-inset-bottom)); }
.topbar { padding-top:calc(18px + env(safe-area-inset-top)); padding-bottom:10px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brand { letter-spacing:.1em; font-size:14px; font-weight:650; }
.topbar-right { display:flex; align-items:center; gap:10px; }
.save-status { font-size:11px; color:var(--sub); }
.icon-button { display:inline-grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:13px; background:var(--surface); flex-shrink:0; }
.icon-button svg { width:20px; height:20px; }
.muted { color:var(--sub); font-size:13px; line-height:1.55; }
.tiny { color:var(--sub); font-size:11px; }
.eyebrow { color:var(--sub); font-size:11px; letter-spacing:.08em; text-transform:uppercase; margin-bottom:9px; }
.page-heading { margin:15px 0 24px; }
.page-heading p { margin-top:9px; }
.heading-row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.heading-row h2 { min-width:0; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:19px; padding:18px; margin-top:14px; }
.card p + p { margin-top:10px; }
.primary { width:100%; min-height:50px; border:0; border-radius:14px; color:var(--on); background:var(--accent); padding:12px 18px; font-size:16px; font-weight:600; }
.secondary { min-height:46px; border:1px solid var(--line); border-radius:12px; background:var(--surface); padding:10px 15px; color:var(--fg); font-size:14px; }
.text-button { min-height:44px; border:0; background:none; color:var(--accent); padding:8px 4px; font-size:14px; font-weight:550; }
.danger { color:var(--danger); }
.danger-button { background:var(--danger); color:var(--surface); }
.stack { display:grid; gap:12px; }
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.spaced { justify-content:space-between; }
.mt { margin-top:20px; }
.mt-small { margin-top:10px; }
.badge { display:inline-flex; align-items:center; min-height:23px; background:var(--soft); color:var(--accent); border-radius:6px; padding:3px 7px; font-size:11px; font-weight:550; }
.week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; margin-bottom:22px; }
.week span { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:7px; padding:10px 1px; border-radius:11px; font-size:11px; color:var(--sub); }
.week span::after { content:""; width:5px; height:5px; border-radius:50%; background:var(--line); }
.week .training::after { background:var(--accent); }
.week .current { background:var(--soft); color:var(--accent); }
.routine-card { padding:0; overflow:hidden; }
.routine-summary { padding:18px; }
.routine-summary h2 { margin-bottom:7px; }
.routine-bottom { display:flex; justify-content:space-between; align-items:center; gap:14px; border-top:1px solid var(--line); padding:12px 18px; }
.routine-bottom button { width:auto; min-height:44px; font-size:14px; padding:10px 20px; }
.routine-preview { list-style:none; padding:0; margin:14px 0 0; color:var(--sub); font-size:13px; line-height:1.8; }
.routine-preview li { overflow-wrap:anywhere; }
.rest-day { padding:30px 20px; text-align:center; margin-bottom:24px; }
.rest-day svg { width:28px; height:28px; color:var(--accent); margin-bottom:14px; }
.rest-day h2 { margin-bottom:8px; }
.plan-notes { padding:14px 0; margin-top:20px; }
.plan-notes ul { color:var(--sub); font-size:13px; line-height:1.7; padding-left:18px; }
.empty { padding:36px 8px; }
.empty h1 { margin-bottom:14px; max-width:340px; }
.empty p { color:var(--sub); font-size:15px; margin-bottom:26px; }
.empty .primary { margin-bottom:10px; }
.empty .secondary { width:100%; }
.nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:min(100%,520px); display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:9px 12px calc(9px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--bg); z-index:10; gap:5px; }
.nav button { min-height:52px; background:transparent; border:0; color:var(--sub); border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; font-size:11px; }
.nav button.active { color:var(--accent); background:var(--soft); }
.nav svg { width:19px; height:19px; }
.workout-header { position:sticky; top:0; background:var(--bg); z-index:5; padding:10px 0 12px; border-bottom:1px solid var(--line); }
.workout-header h1 { font-size:25px; }
.workout-header p { margin-top:8px; }
.workout-header .secondary { min-height:42px; font-size:13px; padding:8px 12px; flex-shrink:0; }
.session-date { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--sub); margin-top:12px; }
.session-date input { width:auto; max-width:165px; min-height:36px; font-size:13px; padding:4px 8px; }
.exercise { margin-top:16px; padding:16px 12px 8px; }
.exercise h2 { font-size:18px; line-height:1.3; margin-bottom:5px; }
.exercise .load-label { color:var(--sub); font-size:11px; margin-top:8px; }
.set-table { display:grid; grid-template-columns:44px minmax(44px,1fr) minmax(50px,.9fr) minmax(44px,.75fr) 44px; gap:7px 5px; align-items:center; margin-top:16px; }
.set-table .column { text-align:center; color:var(--sub); font-size:11px; }
.set-number { border:0; background:none; color:var(--sub); width:44px; min-height:44px; text-align:center; font-size:12px; border-radius:9px; }
.set-number.warmup { color:var(--accent); background:var(--soft); }
.previous { text-align:center; color:var(--sub); font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
input,select,textarea { background:var(--bg); color:var(--fg); border:1px solid var(--line); border-radius:10px; padding:10px 11px; min-height:44px; font-size:16px; width:100%; min-width:0; }
.set-input { text-align:center; padding:6px 3px; height:44px; font-variant-numeric:tabular-nums; }
.set-input:disabled { opacity:1; color:var(--fg); background:var(--soft); border-color:var(--soft); -webkit-text-fill-color:var(--fg); }
.check-set { width:44px; height:44px; display:grid; place-items:center; border:1px solid var(--line); border-radius:11px; background:var(--bg); color:var(--sub); font-size:19px; }
.check-set[aria-pressed="true"] { background:var(--accent); color:var(--on); border-color:var(--accent); }
.exercise-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.progression { color:var(--accent); font-size:12px; line-height:1.5; padding:9px 3px; border-top:1px solid var(--line); }
.notes { margin-top:22px; }
.notes label { font-size:13px; color:var(--sub); display:block; margin-bottom:8px; }
textarea { resize:vertical; min-height:90px; }
.session-footer { position:fixed; bottom:calc(80px + env(safe-area-inset-bottom)); width:calc(100% - 36px); max-width:484px; z-index:8; padding:11px 15px; background:var(--soft); border:1px solid var(--line); border-radius:14px; display:flex; justify-content:space-between; align-items:center; gap:10px; box-shadow:0 5px 20px var(--shadow); }
.session-footer strong { font-size:19px; font-variant-numeric:tabular-nums; }
.session-footer p { font-size:11px; color:var(--sub); }
.session-footer .text-button { font-size:13px; min-height:40px; }
.has-session { padding-bottom:calc(180px + env(safe-area-inset-bottom)); }
.keyboard-open .nav,.keyboard-open .session-footer { display:none; }
.keyboard-open .app-shell { padding-bottom:30px; }
.field { display:grid; gap:7px; color:var(--sub); font-size:13px; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field-row.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.editor-exercise { border:1px solid var(--line); background:var(--bg); border-radius:14px; padding:13px; margin-top:12px; }
.editor-actions { display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.editor-actions .text-button { font-size:12px; }
.editor-actions .row { gap:3px; }
dialog { color:var(--fg); background:var(--surface); border:1px solid var(--line); border-radius:24px; width:calc(100% - 24px); max-width:480px; max-height:calc(100dvh - 36px); padding:0; overscroll-behavior:contain; }
dialog::backdrop { background:#0008; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 18px 0; }
.dialog-head h2 { font-size:21px; }
.dialog-body { padding:16px 18px 22px; }
.dialog-body p { color:var(--sub); font-size:14px; }
.dialog-body .stack { margin-top:18px; }
.dialog-body form > .field { margin-bottom:14px; }
.dialog-body .warning { margin:16px 0; }
.dialog-error { color:var(--danger); font-size:13px; margin-top:10px; }
.summary-row { display:flex; gap:14px; align-items:baseline; margin:20px 0; }
.summary-row strong { font-size:30px; letter-spacing:-.04em; }
.history-button { width:100%; text-align:left; display:block; background:transparent; color:var(--fg); border:0; border-bottom:1px solid var(--line); padding:18px 0; }
.history-button h3 { margin-bottom:6px; }
.log-table { width:100%; border-collapse:collapse; font-size:13px; margin:12px 0; }
.log-table td,.log-table th { text-align:left; padding:11px 4px; border-bottom:1px solid var(--line); }
.log-table th { color:var(--sub); font-size:11px; font-weight:400; }
.log-table td:last-child,.log-table th:last-child { text-align:right; }
.log-table td { font-variant-numeric:tabular-nums; }
.chart { display:block; width:100%; margin:22px 0; }
.settings-row { padding:16px 0; border-bottom:1px solid var(--line); }
.settings-row h3 { margin-bottom:8px; font-size:15px; }
.settings-row .row { margin-top:12px; }
.palette-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
.palette-button { min-height:68px; display:grid; place-items:center; gap:6px; padding:9px 4px; background:var(--bg); border:1px solid var(--line); border-radius:12px; color:var(--fg); font-size:12px; }
.palette-button[aria-pressed="true"] { border:2px solid var(--accent); background:var(--soft); }
.palette-swatch { width:25px; height:25px; border-radius:50%; background:var(--swatch); }
.warning { background:var(--danger-bg); color:var(--danger); border-radius:12px; padding:12px 14px; font-size:13px; line-height:1.55; }
.warning p { color:inherit; }
.warning .secondary { margin-top:12px; }
.info { color:var(--sub); font-size:12px; line-height:1.6; padding:15px 0; }
.tip { color:var(--sub); font-size:12px; line-height:1.6; margin-top:20px; }
.empty-small { padding:22px 0; color:var(--sub); font-size:14px; line-height:1.6; }
#toast { position:fixed; bottom:calc(95px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 32px); background:var(--fg); color:var(--bg); border-radius:13px; padding:13px 18px; box-shadow:0 4px 25px var(--shadow); font-size:13px; z-index:30; }
.boot { max-width:480px; margin:10vh auto; padding:25px; }
.boot h1 { margin-top:24px; font-size:25px; }
.boot p { margin-top:18px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
[hidden] { display:none !important; }
@media(max-width:359px) { .app-shell { padding-inline:12px; } .card { padding:14px; } .exercise { padding-inline:9px; } .set-table { grid-template-columns:44px minmax(36px,1fr) minmax(44px,1fr) minmax(40px,.8fr) 44px; gap:6px 3px; } .previous { font-size:10px; } .session-footer { width:calc(100% - 24px); } .dialog-body { padding-inline:13px; } .dialog-head { padding-inline:13px; } }
@media(prefers-reduced-motion:no-preference) { button { transition:background .12s ease; } }
