:root {
  --bg: #121417; --card: #1C1F24; --card2: #24282E; --line: #2B2F36; --line2: #3A3F47;
  --text: #F2F1EE; --muted: #A3A6AC; --dim: #6B7078;
  --run: #FF7A2F; --spin: #8EC5FF; --lift: #E8E1D3; --core: #B9A6E8; --rest: #4A4F57;
  --good: #5BD18B; --warn: #F2C14E; --bad: #FF6B6B;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
a { color: var(--run); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 520px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 96px); display: flex; flex-direction: column; gap: 20px; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
h1 { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1; margin: 0; }
h2 { font-family: var(--display); font-size: 22px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.base { align-items: baseline; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.card.tight { padding: 4px 18px; gap: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.tile .k { font-size: 11px; color: var(--muted); }
.tile .v { font-size: 19px; font-weight: 600; }
.big { font-family: var(--display); font-size: 48px; font-weight: 600; line-height: 1; }
.mid { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.05; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.accent { color: var(--run); }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; background: var(--run); border-radius: 4px; }
.dot { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }
.btn { min-height: 48px; border: none; border-radius: 12px; background: var(--run); color: #121417; font-weight: 600; font-size: 16px; padding: 0 18px; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: none; }
.item .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item .t { font-weight: 600; font-size: 16px; }
.item .d { font-size: 13px; color: var(--muted); line-height: 1.4; }
.check { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check.on { background: var(--good); border-color: var(--good); color: #121417; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wday { background: var(--card); border: 1px solid transparent; border-radius: 10px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 74px; text-decoration: none; color: inherit; }
.wday.today { border-color: var(--run); background: var(--card2); }
.wday .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.wday .pip { width: 8px; height: 8px; border-radius: 4px; border: 1.5px solid; }
.wday .lab { font-size: 10.5px; font-weight: 600; text-align: center; line-height: 1.2; color: var(--muted); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend span { display: flex; gap: 5px; align-items: center; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
label.field small { font-weight: 400; color: var(--muted); }
input.in, textarea.in, select.in { background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 12px; font-size: 17px; width: 100%; min-height: 48px; }
textarea.in { font-size: 15px; resize: vertical; }
input.in:focus, textarea.in:focus { outline: 2px solid var(--run); outline-offset: 1px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.seg button { min-height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: transparent; font-size: 15px; }
.seg button[aria-pressed="true"] { border-color: var(--run); background: #2A1D15; }
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: #181B1F; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; color: var(--muted); text-decoration: none; font-size: 12px; }
nav.tabs a[aria-current="page"] { color: var(--run); font-weight: 600; }
.status { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 76px); background: var(--text); color: #121417; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 10; }
.flag { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.table td:last-child { text-align: right; color: var(--muted); }
.set { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 64px; gap: 8px; align-items: center; border-radius: 12px; padding: 4px; }
.set.done { background: #1E2620; }
.set .n { font-family: var(--display); font-size: 22px; font-weight: 600; text-align: center; }
.set .box { display: flex; align-items: center; gap: 4px; background: var(--card2); border-radius: 10px; padding: 0 10px; min-height: 46px; }
.set .box input { width: 100%; min-width: 0; background: transparent; border: none; font-size: 17px; font-weight: 600; outline: none; }
.set .box input::placeholder { color: var(--dim); }
.set .box span { font-size: 12px; color: var(--muted); }
.setbtn { min-height: 46px; border: none; border-radius: 10px; background: var(--run); color: #121417; font-weight: 600; }
.set.done .setbtn { background: var(--good); }
.steps { display: flex; gap: 4px; }
.steps div { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps .past { background: var(--run); } .steps .cur { background: var(--text); }
.chart { width: 100%; height: auto; display: block; }
.empty { font-size: 14px; color: var(--muted); line-height: 1.5; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 560px) { .wrap { padding-top: 32px; } }
