:root{
  --bg:#f4f4f2;
  --panel:#ffffff;
  --panel-2:#ececea;
  --text:#0a0a0a;
  --muted:#707070;
  --soft:#9a9a9a;
  --line:#dededb;
  --black:#111111;
  --shadow:0 12px 34px rgba(0,0,0,.07);
  --radius:24px;
  --safe-bottom:max(16px, env(safe-area-inset-bottom));
}
*{box-sizing:border-box}
html,body{margin:0;background:#dededb;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased}
body{min-height:100vh}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.app-shell{width:min(100%,460px);min-height:100vh;margin:0 auto;background:var(--bg);position:relative;box-shadow:0 0 80px rgba(0,0,0,.14)}
.app{padding:18px 18px 112px;min-height:100vh}
.header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:6px 0 18px}
.greeting{display:flex;align-items:center;gap:12px}
.avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(150deg,#111,#777);display:grid;place-items:center;color:#fff;font-weight:700;letter-spacing:.02em}
.eyebrow{font-size:14px;color:var(--muted);line-height:1.1}.title-xl{font-size:30px;font-weight:760;letter-spacing:-.04em;line-height:1}.title-lg{font-size:24px;font-weight:750;letter-spacing:-.035em;line-height:1.08}.title-md{font-size:19px;font-weight:720;letter-spacing:-.02em}.muted{color:var(--muted)}
.icon-btn{border:0;background:rgba(255,255,255,.82);width:42px;height:42px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}
.icon-btn .icon{width:20px;height:20px}
.row{display:flex;align-items:center}.between{justify-content:space-between}.gap8{gap:8px}.gap12{gap:12px}.gap16{gap:16px}
.section{margin-top:18px}.section-title{display:flex;align-items:flex-end;justify-content:space-between;margin:0 2px 10px}.section-title h2{margin:0;font-size:18px;letter-spacing:-.02em}.section-title button{border:0;background:transparent;color:var(--muted);font-size:13px}
.weekstrip{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;padding:8px;border-radius:22px;background:rgba(255,255,255,.58);box-shadow:inset 0 0 0 1px rgba(0,0,0,.045)}
.daychip{border:0;background:transparent;border-radius:17px;padding:8px 2px;display:flex;flex-direction:column;gap:4px;align-items:center;color:var(--muted)}
.daychip b{font-size:13px}.daychip small{font-size:10px;font-weight:650;letter-spacing:.02em}.daychip.active{background:var(--black);color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.15)}
.hero{margin-top:12px;border-radius:28px;background:radial-gradient(circle at 88% 10%,#505050 0,#202020 32%,#0c0c0c 66%);color:#fff;min-height:164px;padding:20px;position:relative;overflow:hidden;box-shadow:var(--shadow)}
.hero:after{content:"";position:absolute;right:-36px;bottom:-70px;width:210px;height:210px;border:28px solid rgba(255,255,255,.08);border-radius:50%}.hero:before{content:"";position:absolute;right:48px;top:-42px;width:100px;height:190px;border-radius:50%;border:20px solid rgba(255,255,255,.045);transform:rotate(18deg)}
.hero .kicker{font-size:12px;text-transform:uppercase;letter-spacing:.08em;opacity:.8}.hero h1{margin:12px 0 6px;font-size:29px;line-height:1.02;letter-spacing:-.045em;max-width:260px}.hero p{margin:0;color:#cfcfcf;font-size:14px;line-height:1.4;max-width:245px}.hero .circle-arrow{position:absolute;right:16px;bottom:16px;width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.3);display:grid;place-items:center;background:rgba(255,255,255,.08);backdrop-filter:blur(8px)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.card{background:rgba(255,255,255,.82);border-radius:22px;padding:16px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.045),0 8px 24px rgba(0,0,0,.035)}
.metric-head{display:flex;align-items:center;gap:9px;color:#333;font-size:12px;font-weight:620}.metric-head .icon{width:20px;height:20px}.metric-value{font-size:22px;font-weight:760;letter-spacing:-.035em;margin-top:8px}.metric-sub{font-size:11px;color:var(--muted);margin-top:4px}.spark{height:34px;margin-top:6px}.spark svg{width:100%;height:100%}
.list-card{display:flex;align-items:center;gap:14px}.list-card .leading{width:42px;height:42px;border-radius:14px;background:var(--panel-2);display:grid;place-items:center;flex:0 0 auto}.list-card .leading .icon{width:22px;height:22px}.list-card .body{min-width:0;flex:1}.list-card .body b{display:block;font-size:14px}.list-card .body span{display:block;font-size:12px;color:var(--muted);margin-top:3px}.list-card .chev{font-size:24px;color:#aaa}
.progress-track{height:7px;border-radius:999px;background:#dededc;overflow:hidden}.progress-fill{height:100%;background:#111;border-radius:999px}
.tabbar{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,460px);height:86px;padding:10px 22px var(--safe-bottom);display:grid;grid-template-columns:repeat(4,1fr);background:rgba(249,249,247,.9);backdrop-filter:blur(18px);border-top:1px solid rgba(0,0,0,.07);z-index:30}.tab{border:0;background:transparent;color:#929292;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px;font-weight:650}.tab .icon{width:22px;height:22px}.tab.active{color:#111}
.icon svg{display:block;width:100%;height:100%}
.topbar{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;margin:6px 0 14px}.topbar .center{text-align:center}.topbar h1{font-size:18px;margin:0}.topbar p{font-size:12px;color:var(--muted);margin:3px 0 0}
.stepper{display:flex;gap:6px;align-items:center;margin:4px 6px 14px}.stepper .seg{height:6px;border-radius:999px;background:#dfdfdd;flex:1}.stepper .seg.done{background:#111}.stepper span{font-size:11px;margin-left:10px;white-space:nowrap}
.exercise-card{padding:18px}.pill{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border-radius:999px;background:#111;color:#fff;font-size:11px;font-weight:650}.exercise-card h2{font-size:32px;letter-spacing:-.045em;margin:10px 0 4px}.exercise-card .sub{color:var(--muted);font-size:14px}.stats-row{margin-top:18px;display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);padding-top:14px}.stat{padding:0 9px;border-right:1px solid var(--line)}.stat:first-child{padding-left:0}.stat:last-child{border:0;padding-right:0}.stat small{display:block;color:var(--muted);font-size:10px;margin-bottom:7px}.stat b{font-size:16px}
.timer-card{margin-top:12px;padding:18px}.timer-main{display:flex;align-items:center;justify-content:space-between;gap:14px}.timer-ring{width:54px;height:54px;border-radius:50%;background:conic-gradient(#111 calc(var(--p,55)*1%),#dededc 0);position:relative;flex:0 0 auto}.timer-ring:after{content:"";position:absolute;inset:8px;background:#fff;border-radius:50%}.timer-time{font-size:46px;letter-spacing:.04em;font-weight:700;line-height:1}.timer-label{font-size:11px;color:var(--muted)}.round-btn{width:58px;height:58px;border:0;border-radius:50%;background:#111;color:#fff;display:grid;place-items:center}.link-row{margin-top:14px;padding:11px 12px;border-radius:14px;background:#f4f4f2;display:flex;justify-content:space-between;font-size:12px}
.prev-set{margin-top:14px;border-top:1px solid var(--line);padding-top:12px;font-size:12px;color:var(--muted)}.prev-set b{color:#222}.rir{margin-top:16px}.rir label{display:block;font-size:13px;font-weight:700;margin-bottom:4px}.rir p{font-size:11px;color:var(--muted);margin:0 0 10px}.rir-options{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.rir-btn{border:1px solid var(--line);background:#fff;border-radius:12px;height:40px;font-size:12px}.rir-btn.active{background:#111;color:#fff;border-color:#111}
.set-inputs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.field{background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px 12px}.field label{display:block;font-size:10px;color:var(--muted);margin-bottom:3px}.field input{width:100%;border:0;background:transparent;outline:0;font-weight:700;font-size:20px;color:#111}
.action-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:12px}.action{border:0;border-radius:18px;background:#f1f1ef;padding:12px 5px;font-size:11px;min-height:68px}.action .icon{display:block;width:22px;height:22px;margin:0 auto 6px}.primary-wide{width:100%;border:0;border-radius:18px;background:#111;color:#fff;padding:17px;font-weight:700;margin-top:12px}
.segmented{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:16px;padding:3px;background:rgba(255,255,255,.65)}.seg-btn{border:0;background:transparent;border-radius:12px;padding:9px 4px;font-size:12px;color:#555}.seg-btn.active{background:#111;color:#fff;box-shadow:0 3px 8px rgba(0,0,0,.12)}
.chart-card{margin-top:10px}.chart-head{display:flex;justify-content:space-between;align-items:flex-start}.chart-head b{font-size:15px}.chart-head .delta{font-size:15px;font-weight:760}.chart-head small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.big-chart{height:180px;margin-top:12px}.big-chart svg{width:100%;height:100%}.bars{height:76px;display:flex;align-items:flex-end;gap:7px;margin-top:10px}.bar{flex:1;border-radius:5px 5px 2px 2px;background:#cfcfcd}.bar.dark{background:#333}
.form-card{margin-top:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form-row{margin-top:12px}.form-row label{display:block;font-size:11px;color:var(--muted);margin-bottom:6px}.input{width:100%;background:#f6f6f4;border:1px solid var(--line);border-radius:15px;padding:13px 14px;outline:0}.button{border:0;border-radius:16px;padding:13px 16px;background:#111;color:#fff;font-weight:700}.button.secondary{background:#ededeb;color:#111}.button.full{width:100%}
.info-list{display:grid;gap:10px}.info-row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line)}.info-row:last-child{border:0}.info-row span{font-size:13px;color:var(--muted)}.info-row b{font-size:13px}
.toast{position:fixed;left:50%;bottom:102px;transform:translate(-50%,14px);background:#111;color:#fff;padding:11px 16px;border-radius:999px;font-size:12px;opacity:0;pointer-events:none;transition:.22s ease;z-index:50;box-shadow:0 8px 30px rgba(0,0,0,.18)}.toast.show{opacity:1;transform:translate(-50%,0)}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.28);display:flex;align-items:flex-end;justify-content:center;z-index:60;backdrop-filter:blur(3px)}.modal{width:min(100%,460px);max-height:86vh;overflow:auto;background:#f8f8f6;border-radius:28px 28px 0 0;padding:10px 18px calc(24px + env(safe-area-inset-bottom));box-shadow:0 -16px 50px rgba(0,0,0,.2)}.modal-handle{width:42px;height:5px;border-radius:999px;background:#c4c4c2;margin:2px auto 16px}.modal-content h2{margin:0 0 14px;font-size:24px;letter-spacing:-.03em}
.empty{padding:26px;text-align:center;color:var(--muted);font-size:13px}.micro{font-size:10px;color:var(--muted)}
@media (min-width:700px){body{padding:30px 0}.app-shell{min-height:900px;border-radius:44px;overflow:hidden}.tabbar{bottom:30px;border-radius:0 0 44px 44px}}
