:root{--ink:#171918;--muted:#858984;--line:#e9eae7;--paper:#f4f5f2;--white:#fff;--accent:#b9f277;--accent-dark:#507731;--soft:#edf3e6;--radius:20px;--shadow:0 12px 30px rgba(30,35,26,.045);font-family:system-ui,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh}.sidebar{width:242px;background:#fff;border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;padding:28px 19px 18px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:10px;font:800 23px system-ui,sans-serif;letter-spacing:-1.2px;padding:0 10px 46px}.brand-mark{display:grid;place-items:center;background:var(--accent);width:32px;height:32px;border-radius:11px;font:800 22px Manrope;color:#1e2718;transform:rotate(-5deg)}.brand-dot{color:#91c957}.side-caption,.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.4px;color:#999e97}.side-caption{padding:0 13px 14px}.side-nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:13px;padding:11px 13px;color:#747a73;border-radius:12px;font-size:13px;font-weight:600;transition:.18s}.nav-item:hover{background:#f7f8f5;color:var(--ink)}.nav-item.active{background:#eff2e9;color:#222a1e}.nav-icon{width:19px;height:19px;font-size:17px;display:grid;place-items:center}.sidebar-bottom{margin-top:auto}.mini-profile{display:flex;align-items:center;gap:10px;padding:14px 6px 13px;border-top:1px solid var(--line)}.avatar{border:0;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;background:#eaece5;color:#444c3d;font-weight:700}.mini-profile b{font-size:12px;display:block}.mini-profile span{display:block;font-size:10px;color:var(--muted);margin-top:3px}.mini-profile .icon-button{margin-left:auto}.privacy-note{font-size:10px;color:#a0a49d;padding-left:6px;margin:5px 0}.main-area{margin-left:242px;min-height:100vh}.topbar{height:67px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;background:rgba(255,255,255,.48)}.topbar-label{font-size:10px;letter-spacing:1.3px;font-weight:700;color:#929790}.topbar-right{display:flex;align-items:center;gap:14px}.today-pill{color:#6e746b;font-size:11px;font-weight:500}.small-avatar{width:30px;height:30px;font-size:11px;display:none}.content{max-width:1220px;margin:auto;padding:37px 42px 68px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:26px;gap:20px}.page-heading h1{font:700 29px system-ui,sans-serif;letter-spacing:-1.1px;margin:6px 0 5px}.page-heading p{margin:0;color:#888d86;font-size:13px}.btn{border:0;border-radius:12px;padding:12px 17px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:9px;transition:transform .15s,background .15s,box-shadow .15s}.btn:hover{transform:translateY(-1px)}.btn:active{transform:scale(.98)}.btn:focus-visible,.icon-button:focus-visible,.nav-item:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #a6d76a;outline-offset:2px}.btn-primary{background:var(--ink);color:#fff;box-shadow:0 6px 16px #17191820}.btn-primary:hover{background:#313731}.btn-accent{background:var(--accent);color:#20271a}.btn-quiet{background:#f1f2ef;color:#31352f}.btn-danger{background:#fff0ee;color:#b74435}.icon-button{border:0;background:transparent;color:#777d75;border-radius:9px;width:32px;height:32px;font-size:17px;display:grid;place-items:center}.icon-button:hover{background:#f0f1ee}.hero{background:#1b1e1b;border-radius:25px;padding:27px 30px;color:#fff;display:grid;grid-template-columns:1.25fr .75fr;min-height:235px;overflow:hidden;position:relative;box-shadow:var(--shadow)}.hero::after{content:'';position:absolute;width:290px;height:290px;border:1px solid #ffffff12;border-radius:50%;right:4%;top:-113px;box-shadow:0 0 0 30px #ffffff08,0 0 0 62px #ffffff05}.hero-copy{position:relative;z-index:1}.hero-kicker{display:flex;align-items:center;gap:8px;color:#b3b9af;font-size:11px}.live-dot{height:7px;width:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 4px #b9f27720}.hero h2{font:600 27px system-ui,sans-serif;line-height:1.22;letter-spacing:-1px;margin:18px 0 9px;max-width:400px}.hero p{color:#a9aea7;font-size:12px;margin:0 0 23px}.hero-art{position:relative;display:flex;align-items:center;justify-content:center;min-height:175px}.hero-art svg{width:205px;max-width:95%;height:188px;position:relative;z-index:1}.hero-note{position:absolute;right:0;bottom:1px;background:#ffffff14;border:1px solid #ffffff15;border-radius:10px;padding:9px 12px;font-size:10px;color:#c1c7bd;backdrop-filter:blur(8px);z-index:2}.hero-note strong{color:var(--accent);font-size:13px;display:block;margin-bottom:2px}.section-row{display:flex;align-items:center;justify-content:space-between;margin:29px 0 13px}.section-row h2{font:700 15px system-ui,sans-serif;letter-spacing:-.3px;margin:0}.text-action{border:0;background:none;font-size:11px;color:#626a5d;font-weight:700;padding:7px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card,.card{background:#fff;border:1px solid #ededeb;border-radius:17px;box-shadow:0 3px 13px #12160d05}.stat-card{padding:16px 16px 14px;min-height:102px}.stat-top{display:flex;align-items:center;justify-content:space-between;color:#848981;font-size:10px}.stat-symbol{display:grid;place-items:center;width:26px;height:26px;border-radius:9px;background:#f3f5f0;color:#4d5946;font-size:13px}.stat-value{font:700 23px system-ui,sans-serif;letter-spacing:-.8px;margin-top:9px}.stat-unit{font:500 10px 'DM Sans';color:#8e938c;margin-left:4px;letter-spacing:0}.stat-sub{font-size:10px;color:#939891;margin-top:2px}.dashboard-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px}.card{padding:19px}.card-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.card-title h3{font:700 13px system-ui,sans-serif;margin:0}.card-title span{font-size:10px;color:#959a93}.week-chart{height:131px;display:flex;align-items:end;justify-content:space-around;padding:8px 4px 0;gap:12px}.week-col{height:100%;display:flex;align-items:center;justify-content:end;flex-direction:column;gap:8px;flex:1}.bar-track{height:96px;width:100%;display:flex;align-items:end;justify-content:center}.bar{width:min(25px,80%);border-radius:8px 8px 4px 4px;background:#e9ede5;min-height:5px;position:relative}.bar.filled{background:#c0ef89}.bar.today{background:#789b4b}.bar-label{font-size:9px;color:#999e97}.week-note{display:flex;gap:7px;align-items:center;color:#8b908a;font-size:10px;margin-top:11px}.week-note i{display:block;width:6px;height:6px;background:#a7dc72;border-radius:99px}.empty-chart{height:123px;display:grid;place-items:center;text-align:center;color:#969b94;font-size:11px;line-height:1.5}.next-card{display:flex;align-items:center;gap:14px;background:#f8f9f6;border-radius:13px;padding:13px}.workout-glyph{width:45px;height:45px;border-radius:13px;background:#e9f2df;display:grid;place-items:center;font-size:20px}.next-card h4{font:700 12px system-ui,sans-serif;margin:0 0 4px}.next-card p{margin:0;color:#878d85;font-size:10px}.next-card .icon-button{margin-left:auto}.recent-list{display:grid}.recent-row{display:flex;align-items:center;padding:10px 0;border-bottom:1px solid #f0f0ee;gap:11px}.recent-row:last-child{border-bottom:0;padding-bottom:0}.recent-icon{width:32px;height:32px;border-radius:10px;background:#f3f4f0;display:grid;place-items:center;font-size:14px}.recent-info{flex:1}.recent-info b{display:block;font-size:11px}.recent-info span{display:block;color:#939890;font-size:9px;margin-top:4px}.recent-duration{font-size:10px;color:#747a73}.empty-box{padding:23px 16px;text-align:center;border:1px dashed #dcdfd8;border-radius:14px;color:#848a81;font-size:11px;line-height:1.6}.empty-box strong{display:block;color:#464b45;font-size:12px;margin-bottom:3px}.workout-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.workout-card{padding:17px}.workout-card-top{display:flex;align-items:center;justify-content:space-between}.workout-card .workout-glyph{width:42px;height:42px}.workout-card h3{font:700 15px system-ui,sans-serif;margin:16px 0 6px}.workout-card p{font-size:11px;color:#878d85;min-height:32px;line-height:1.45;margin:0}.workout-meta{display:flex;gap:12px;color:#777e75;font-size:10px;margin:13px 0 15px}.workout-card .btn{width:100%;padding:10px}.dots-wrap{position:relative}.menu-pop{display:none;position:absolute;right:0;top:32px;background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow);padding:5px;z-index:3;width:135px}.menu-pop.open{display:grid}.menu-pop button{border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:7px;font-size:11px}.menu-pop button:hover{background:#f5f6f3}.menu-pop button.danger{color:#b74435}.filter-row{display:flex;gap:8px;flex-wrap:wrap}.filter-chip{border:1px solid #e5e7e2;background:#fff;color:#787e76;border-radius:99px;padding:8px 12px;font-size:10px}.filter-chip.selected{background:var(--ink);border-color:var(--ink);color:#fff}.history-layout{display:grid;grid-template-columns:1fr .85fr;gap:15px}.calendar-card{padding:19px}.calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.calendar-head h3{font:700 14px system-ui,sans-serif;margin:0}.calendar-controls{display:flex;gap:3px}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;text-align:center}.weekday{font-size:9px;color:#999e97;padding-bottom:5px}.day-btn{border:0;background:transparent;min-height:36px;border-radius:10px;font-size:10px;position:relative}.day-btn:hover{background:#f3f4f0}.day-btn.muted{color:#c3c6c1}.day-btn.selected{background:#1b1e1b;color:white}.day-btn.has-workout::after{content:'';position:absolute;width:4px;height:4px;border-radius:50%;background:#84b94e;left:calc(50% - 2px);bottom:3px}.day-btn.selected.has-workout::after{background:var(--accent)}.history-detail h3{font:700 14px system-ui,sans-serif;margin:2px 0 4px}.history-detail>p{font-size:10px;color:#8d928b;margin:0 0 14px}.exercise-detail{padding:12px 0;border-top:1px solid #f0f0ee}.exercise-detail b{font-size:11px}.exercise-detail p{font-size:10px;color:#858b83;margin:5px 0 0}.record-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.record-card{padding:17px}.record-card .record-type{font-size:10px;color:#90968e}.record-card strong{display:block;font:700 22px system-ui,sans-serif;margin:12px 0 3px}.record-card p{font-size:11px;color:#575d55;margin:0}.record-card small{display:block;color:#969b94;font-size:9px;margin-top:9px}.record-bars{height:100px;display:flex;align-items:end;gap:8px;margin-top:15px;border-bottom:1px solid #e9eae7;padding:0 7px}.record-bars i{display:block;flex:1;border-radius:5px 5px 0 0;background:#d7edbf;min-height:4px}.record-bars i:last-child{background:#83aa56}.settings-layout{display:grid;grid-template-columns:205px 1fr;gap:17px}.settings-tabs{display:grid;align-content:start;gap:4px}.settings-tabs button{border:0;background:transparent;border-radius:10px;text-align:left;padding:11px;font-size:11px;color:#7e847b}.settings-tabs button.active{background:#fff;color:#252a24;font-weight:700}.settings-card{padding:22px;margin-bottom:13px}.settings-card h3{font:700 14px system-ui,sans-serif;margin:0 0 5px}.settings-card>p{font-size:10px;color:#898f87;margin:0 0 20px;line-height:1.5}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{display:grid;gap:6px;margin-bottom:14px}.field label{font-size:10px;font-weight:700;color:#565d54}.field input,.field select,.field textarea{width:100%;border:1px solid #e2e5df;background:#fff;border-radius:10px;padding:10px 11px;font-size:11px;color:#252a24}.field input::placeholder,.field textarea::placeholder{color:#b0b4ae}.field textarea{min-height:66px;resize:vertical}.field-hint{font-size:9px;color:#939891;line-height:1.45}.setting-line{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid #f0f0ee;padding:13px 0}.setting-line b{font-size:11px;display:block}.setting-line small{display:block;color:#92978f;font-size:9px;margin-top:4px;line-height:1.45}.toggle{appearance:none;width:37px;height:21px;border:0;border-radius:99px;background:#dfe2dc;position:relative;transition:.2s;flex:0 0 auto}.toggle:checked{background:#94c765}.toggle::after{content:'';width:15px;height:15px;border-radius:50%;background:white;position:absolute;top:3px;left:3px;box-shadow:0 1px 3px #0002;transition:.2s}.toggle:checked::after{left:19px}.modal-backdrop{position:fixed;inset:0;background:#16191577;z-index:20;display:grid;place-items:center;padding:18px;backdrop-filter:blur(3px)}.modal{width:min(510px,100%);max-height:min(90vh,780px);overflow:auto;background:#fff;border-radius:20px;padding:22px;box-shadow:0 25px 80px #0003}.modal.wide{width:min(700px,100%)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:17px}.modal-head h2{font:700 18px system-ui,sans-serif;margin:0 0 4px}.modal-head p{font-size:10px;color:#8b9089;margin:0}.modal-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:10px}.exercise-editor{display:grid;grid-template-columns:1.15fr .55fr .55fr .65fr 30px;gap:7px;align-items:center;margin-bottom:8px}.exercise-editor input,.set-entry input{border:1px solid #e3e5e1;border-radius:8px;padding:9px;font-size:10px;width:100%;min-width:0}.exercise-editor .icon-button{color:#b44b40}.subhead{font-size:10px;font-weight:700;color:#5e645d;margin:17px 0 9px}.session-exercise{border:1px solid #ebede9;border-radius:13px;padding:13px;margin-bottom:10px}.session-ex-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.session-ex-head strong{font-size:12px}.session-ex-head span{font-size:9px;color:#90968e}.set-head,.set-entry{display:grid;grid-template-columns:35px 1fr 1fr 75px;gap:7px;align-items:center}.set-head{font-size:9px;color:#959a93;padding:0 5px 5px}.set-entry{margin-bottom:6px}.set-entry .set-number{font-size:10px;color:#898f87;text-align:center}.set-entry label{display:flex;gap:6px;align-items:center;justify-content:center;font-size:9px;color:#777e75}.set-entry input[type=checkbox]{accent-color:#739a4c}.inline-note{font-size:9px;color:#858b83}.summary-hero{background:#eff5e7;border-radius:15px;text-align:center;padding:20px;margin-bottom:15px}.summary-hero .checkmark{width:43px;height:43px;border-radius:50%;background:#b9e98c;display:grid;place-items:center;margin:0 auto 9px;font-size:20px}.summary-hero h3{font:700 16px system-ui,sans-serif;margin:0 0 5px}.summary-hero p{font-size:10px;color:#737a6e;margin:0}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#1b1e1b;color:white;border-radius:11px;padding:12px 16px;font-size:11px;box-shadow:var(--shadow);z-index:50;animation:toast-in .18s ease-out}.toast.error{background:#9c3c30}@keyframes toast-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}.mobile-menu,.bottom-nav{display:none}.install-banner{display:flex;align-items:center;justify-content:space-between;padding:11px 13px;background:#fff;border:1px solid var(--line);border-radius:13px;font-size:10px;margin-top:15px}.install-banner p{margin:0;color:#727970}.install-banner button{border:0;background:none;font-weight:700;font-size:10px}.small-note{font-size:10px;color:#969b94;line-height:1.5}.btn-row{display:flex;gap:8px;flex-wrap:wrap}.history-workout{margin-top:14px}.history-actions{display:flex;gap:6px;margin-top:10px}.no-records{padding:28px;text-align:center;color:#90968e;font-size:11px}.no-records strong{display:block;color:#50564e;margin-bottom:4px}
@media(max-width:1050px){.content{padding-left:28px;padding-right:28px}.topbar{padding:0 28px}.stats-grid{grid-template-columns:repeat(2,1fr)}.workout-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.sidebar{display:none}.main-area{margin:0}.topbar{height:56px;padding:0 18px}.topbar-label{display:none}.topbar-right{margin-left:auto}.small-avatar{display:grid}.mobile-menu{display:grid}.content{padding:25px 17px calc(94px + env(safe-area-inset-bottom))}.page-heading{align-items:flex-start;margin-bottom:20px}.page-heading h1{font-size:25px}.page-heading p{font-size:11px;max-width:260px}.page-heading>.btn{padding:11px 12px;font-size:10px;white-space:nowrap}.hero{grid-template-columns:1fr;min-height:210px;padding:22px 21px}.hero h2{font-size:23px;max-width:270px}.hero-art{display:none}.hero p{max-width:260px;line-height:1.5}.stats-grid{gap:9px}.stat-card{min-height:92px;padding:13px}.stat-value{font-size:21px}.dashboard-grid,.history-layout{grid-template-columns:1fr}.dashboard-grid{gap:10px}.section-row{margin-top:24px}.card{padding:16px}.workout-grid{grid-template-columns:1fr}.workout-card{padding:15px}.workout-card p{min-height:0}.record-grid{grid-template-columns:repeat(2,1fr);gap:9px}.record-card{padding:13px}.record-card strong{font-size:20px}.settings-layout{grid-template-columns:1fr;gap:12px}.settings-tabs{display:flex;overflow:auto;gap:5px}.settings-tabs button{white-space:nowrap;padding:9px 10px}.settings-card{padding:17px}.form-row{grid-template-columns:1fr}.bottom-nav{position:fixed;z-index:10;inset:auto 0 0;display:flex;justify-content:space-around;padding:8px 7px calc(8px + env(safe-area-inset-bottom));background:#ffffffed;border-top:1px solid #e9eae7;backdrop-filter:blur(16px)}.bottom-nav .nav-item{display:grid;gap:4px;justify-items:center;padding:5px 6px;min-width:55px;border-radius:10px;font-size:9px}.bottom-nav .nav-icon{font-size:16px;width:22px;height:21px}.modal{padding:18px;border-radius:17px}.exercise-editor{grid-template-columns:1.1fr .65fr .65fr 26px;gap:5px}.exercise-editor input{padding:9px 6px;font-size:9px}.set-head,.set-entry{grid-template-columns:25px 1fr 1fr 60px;gap:4px}.set-entry input{padding:8px 5px}.calendar-grid{gap:2px}.day-btn{min-height:37px}.today-pill{font-size:10px}}
@media(max-width:380px){.content{padding-left:12px;padding-right:12px}.topbar{padding:0 12px}.page-heading h1{font-size:22px}.hero{padding:19px}.page-heading>.btn{padding:10px}.record-grid{grid-template-columns:1fr 1fr}.stats-grid{gap:7px}.stat-card{padding:11px}.exercise-editor{grid-template-columns:1fr .48fr .48fr .55fr 24px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
.nav-item{border:0;background:transparent}
.exercise-actions{display:flex;align-items:center;gap:0}


/* Calm, native-feeling visual system */
:root {
  color-scheme: light;
  --ink: #20231f;
  --muted: #747a73;
  --line: #e5e7e3;
  --paper: #f6f6f3;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f2f3f0;
  --surface-hover: #eceeeb;
  --field: #ffffff;
  --accent: #d7dbd3;
  --accent-dark: #4f554e;
  --soft: #eff0ed;
  --radius: 18px;
  --shadow: 0 3px 16px rgba(27, 31, 25, .045);
  --hero: #191c19;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef0ec;
  --muted: #a1a89f;
  --line: #303730;
  --paper: #111410;
  --white: #191d19;
  --surface: #191d19;
  --surface-subtle: #222721;
  --surface-hover: #292f28;
  --field: #151915;
  --accent: #353c34;
  --accent-dark: #c5cbc2;
  --soft: #252c23;
  --shadow: 0 8px 28px rgba(0, 0, 0, .18);
  --hero: #252b25;
}
html { min-height: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.app-shell, .main-area { background: var(--paper); }
.brand { padding-bottom: 42px; letter-spacing: -.7px; }
.brand-mark { transform: none; border-radius: 10px; background: var(--ink); color: var(--paper); }
.brand-dot { color: var(--muted); }
.sidebar { background: var(--surface); border-color: var(--line); }
.side-caption, .eyebrow { color: var(--muted); letter-spacing: .12em; }
.nav-item { color: var(--muted); min-height: 44px; }
.nav-item:hover, .icon-button:hover { background: var(--surface-subtle); color: var(--ink); }
.nav-item.active { background: var(--surface-subtle); color: var(--ink); }
.nav-icon { width: 20px; height: 20px; }
.nav-icon svg, .workout-glyph svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mini-profile, .topbar { border-color: var(--line); }
.mini-profile .avatar, .avatar { background: var(--surface-subtle); color: var(--ink); }
.mini-profile span, .privacy-note, .today-pill, .topbar-label { color: var(--muted); }
.main-area { min-height: 100vh; min-height: 100dvh; }
.topbar { background: var(--surface); }
.content { animation: stride-enter .16s ease-out both; }
@keyframes stride-enter { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { margin-bottom: 30px; }
.page-heading h1 { font-size: clamp(27px, 3vw, 34px); letter-spacing: -.045em; line-height: 1.12; }
.page-heading p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.eyebrow { font-size: 11px; }
.section-row { margin-top: 28px; }
.section-row h2 { font-size: 16px; letter-spacing: -.02em; }
.btn { min-height: 44px; border-radius: 12px; padding: 11px 16px; font-size: 13px; }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: none; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-accent { background: var(--ink); color: var(--paper); }
.btn-quiet { background: var(--surface-subtle); color: var(--ink); }
.btn-quiet:hover { background: var(--surface-hover); }
.btn-danger { background: #f7eeec; color: #8f372d; }
.icon-button { width: 44px; height: 44px; }
.btn:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .settings-tabs button:focus-visible, .theme-option:focus-visible, .text-action:focus-visible, .filter-chip:focus-visible, .day-btn:focus-visible { outline: 2px solid #737c72; outline-offset: 2px; }
.stat-card, .card, .workout-card, .calendar-card, .settings-card { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.stat-card { min-height: 100px; padding: 17px 18px; }
.stat-top, .stat-sub, .card-title span, .small-note, .bar-label, .week-note, .next-card p, .recent-info span, .recent-duration, .workout-card p, .workout-meta, .history-detail > p, .exercise-detail p, .record-type, .record-card small, .settings-tabs button, .settings-card > p, .field-hint, .setting-line small, .field label, .privacy-note, .mini-profile span, .today-pill, .topbar-label, .page-heading p, .side-caption, .eyebrow { color: var(--muted); }
.stat-top { font-size: 12px; }
.stat-value { font-size: 26px; letter-spacing: -.04em; }
.stat-sub { font-size: 11px; }
.stat-symbol, .workout-glyph, .recent-icon { background: var(--surface-subtle); color: var(--muted); }
.card { padding: 21px; }
.card-title h3, .workout-card h3, .settings-card h3 { font-size: 15px; }
.week-chart { height: 138px; }
.bar-track { height: 100px; }
.bar { background: var(--surface-subtle); }
.bar.filled { background: #c6cbc2; }
.bar.today { background: #646c61; }
.week-note i { background: #7f887e; }
.empty-chart { color: var(--muted); font-size: 12px; }
.next-card { background: var(--surface-subtle); }
.workout-glyph { border-radius: 12px; }
.recent-row { border-color: var(--line); min-height: 57px; }
.recent-marker { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #9ba298; }
.empty-box { border-color: var(--line); color: var(--muted); background: var(--surface); font-size: 12px; }
.empty-box strong { color: var(--ink); font-size: 13px; }
.workout-card { padding: 19px; }
.workout-card h3 { letter-spacing: -.02em; }
.menu-pop { background: var(--surface); border-color: var(--line); }
.menu-pop button:hover, .day-btn:hover { background: var(--surface-subtle); }
.filter-chip { min-height: 40px; background: var(--surface); border-color: var(--line); color: var(--muted); font-size: 12px; }
.filter-chip.selected, .day-btn.selected { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.calendar-card { padding: 21px; }
.day-btn { min-height: 40px; color: var(--ink); }
.day-btn.muted { color: #a7aca5; }
.history-layout { align-items: start; }
.record-card { background: var(--surface); border-color: var(--line); }
.record-bars { border-color: var(--line); }
.record-bars i { background: #d0d4cd; }
.record-bars i:last-child { background: #6f786d; }
.settings-layout { grid-template-columns: 190px minmax(0, 1fr); }
.settings-tabs button { min-height: 44px; padding: 11px 13px; font-size: 13px; }
.settings-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 5px rgba(0,0,0,.035); }
.settings-card { padding: 22px; margin-bottom: 14px; }
.settings-card > p { font-size: 13px; line-height: 1.55; margin-bottom: 18px; }
.field { gap: 8px; margin-bottom: 17px; }
.field label { font-size: 13px; }
.field input, .field select, .field textarea, .exercise-editor input, .set-entry input { background: var(--field); border-color: var(--line); color: var(--ink); font-size: 16px; }
.field input, .field select, .field textarea { min-height: 48px; padding: 11px 13px; border-radius: 11px; }
.field input::placeholder, .field textarea::placeholder, .exercise-editor input::placeholder, .set-entry input::placeholder { color: var(--muted); opacity: .72; }
.field-hint { font-size: 12px; line-height: 1.5; }
.setting-line { border-color: var(--line); min-height: 64px; }
.setting-line b { font-size: 13px; }
.setting-line small { font-size: 12px; }
.toggle { width: 46px; height: 27px; }
.toggle::after { width: 19px; height: 19px; top: 4px; left: 4px; }
.toggle:checked::after { left: 23px; }
.theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 3px 0 12px; }
.theme-option { position: relative; min-height: 48px; border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.theme-option:hover { background: var(--surface-subtle); color: var(--ink); }
.theme-option.selected { border-color: var(--ink); background: var(--surface-subtle); color: var(--ink); }
.theme-option.selected::after { content: ""; position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.install-banner { background: var(--surface-subtle); border-color: var(--line); font-size: 12px; }
.modal { background: var(--surface); color: var(--ink); }
.modal-head p, .subhead, .inline-note { color: var(--muted); }
.exercise-editor input, .set-entry input { border-color: var(--line); border-radius: 9px; padding: 10px; }
.session-exercise { background: var(--surface); border-color: var(--line); }
.session-exercise, .exercise-detail { border-color: var(--line); }
.session-ex-head span, .set-head, .set-entry .set-number { color: var(--muted); }
.session-ex-name, .session-ex-note { color: var(--ink); }
.summary-hero { background: var(--soft); color: var(--ink); }
.summary-hero .checkmark { background: var(--surface); color: var(--ink); }
.summary-hero p { color: var(--muted); }
.install-banner p, .small-note { line-height: 1.55; }

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .workout-card,
:root[data-theme="dark"] .calendar-card,
:root[data-theme="dark"] .settings-card,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .menu-pop { background: var(--surface); border-color: var(--line); }
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .bottom-nav { background: var(--surface); border-color: var(--line); }
:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .icon-button:hover,
:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .settings-tabs button.active,
:root[data-theme="dark"] .theme-option.selected { background: var(--surface-subtle); color: var(--ink); }
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .btn-accent { background: #edf0eb; color: #171a17; }
:root[data-theme="dark"] .btn-primary:hover,
:root[data-theme="dark"] .btn-accent:hover { background: #cbd1c8; }
:root[data-theme="dark"] .btn-quiet,
:root[data-theme="dark"] .filter-chip,
:root[data-theme="dark"] .next-card,
:root[data-theme="dark"] .workout-glyph,
:root[data-theme="dark"] .stat-symbol,
:root[data-theme="dark"] .recent-icon,
:root[data-theme="dark"] .install-banner,
:root[data-theme="dark"] .empty-box { background: var(--surface-subtle); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .btn-danger { background: #392622; color: #f2b8aa; }
:root[data-theme="dark"] .hero { background: var(--hero); }
:root[data-theme="dark"] .bar { background: #303730; }
:root[data-theme="dark"] .bar.filled { background: #626b60; }
:root[data-theme="dark"] .bar.today { background: #c6ccc2; }
:root[data-theme="dark"] .day-btn { color: var(--ink); }
:root[data-theme="dark"] .day-btn.selected,
:root[data-theme="dark"] .filter-chip.selected { background: #edf0eb; border-color: #edf0eb; color: #171a17; }
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .exercise-editor input,
:root[data-theme="dark"] .set-entry input { background: var(--field); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .exercise-editor input::placeholder,
:root[data-theme="dark"] .set-entry input::placeholder { color: var(--muted); }
:root[data-theme="dark"] .record-bars { border-color: var(--line); }
:root[data-theme="dark"] .record-bars i { background: #586154; }
:root[data-theme="dark"] .record-bars i:last-child { background: #b5bdb1; }
:root[data-theme="dark"] .summary-hero { background: var(--soft); }
:root[data-theme="dark"] .summary-hero .checkmark { background: #394334; color: var(--ink); }
:root[data-theme="dark"] .toast { background: #e9ece6; color: #191c19; }
:root[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, .72); }
:root[data-theme="dark"] .recent-row,
:root[data-theme="dark"] .exercise-detail,
:root[data-theme="dark"] .setting-line,
:root[data-theme="dark"] .mini-profile { border-color: var(--line); }

@media (max-width: 760px) {
  .topbar { min-height: 58px; height: auto; padding: 6px 14px; }
  .topbar-right { gap: 8px; }
  .mobile-menu, .small-avatar { width: 44px; height: 44px; }
  .content { padding: 23px 17px calc(104px + env(safe-area-inset-bottom)); }
  .page-heading { display: flex; flex-direction: column; align-items: stretch; gap: 15px; margin-bottom: 25px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading p { font-size: 14px; }
  .page-heading > .btn { width: 100%; min-height: 48px; font-size: 14px; }
  .section-row { margin-top: 25px; }
  .section-row h2 { font-size: 16px; }
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 94px; padding: 14px; }
  .stat-top { font-size: 11px; line-height: 1.35; }
  .stat-value { font-size: 24px; }
  .stat-sub { font-size: 11px; }
  .dashboard-grid, .history-layout { gap: 12px; }
  .card { padding: 17px; }
  .bottom-nav { justify-content: stretch; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); }
  .bottom-nav .nav-item { flex: 1 1 0; min-width: 0; min-height: 48px; gap: 3px; padding: 4px 2px; border-radius: 10px; font-size: 10px; }
  .bottom-nav .nav-icon { width: 22px; height: 21px; }
  .bottom-nav .nav-icon svg { width: 19px; height: 19px; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .settings-tabs { display: flex; overflow-x: auto; gap: 5px; padding: 2px 1px 7px; margin: 0 -1px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .settings-tabs::-webkit-scrollbar { display: none; }
  .settings-tabs button { flex: 0 0 auto; min-height: 44px; white-space: nowrap; padding: 9px 13px; background: var(--surface); border: 1px solid var(--line); }
  .settings-tabs button.active { border-color: var(--ink); }
  .settings-card { padding: 18px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .btn-row { align-items: stretch; }
  .btn-row .btn { min-height: 48px; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { width: 100%; max-width: none; max-height: 92vh; max-height: 92dvh; padding: 21px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .modal-head { align-items: center; }
  .modal-head .icon-button { flex: 0 0 44px; }
  .modal-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: 0 -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .modal-actions .btn { flex: 1; min-height: 48px; }
  .exercise-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .exercise-editor > input:first-child { grid-column: 1 / -1; }
  .exercise-editor input { min-width: 0; min-height: 46px; padding: 9px 7px; text-align: center; }
  .exercise-editor .exercise-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 4px; }
  .exercise-editor .exercise-actions .icon-button { min-width: 44px; min-height: 44px; }
  .set-head, .set-entry { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 69px; gap: 5px; }
  .set-entry input { min-width: 0; min-height: 46px; padding: 8px 5px; text-align: center; }
  .set-entry label { min-height: 44px; gap: 5px; font-size: 11px; }
  .set-entry input[type="checkbox"] { width: 18px; height: 18px; }
  .session-ex-head span { display: none; }
  .calendar-grid { gap: 3px; }
  .day-btn { min-height: 42px; }
}
@media (max-width: 380px) {
  .content { padding-left: 13px; padding-right: 13px; }
  .topbar { padding-left: 9px; padding-right: 9px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .theme-options { gap: 6px; }
  .theme-option { padding: 9px 5px; font-size: 12px; }
  .set-head, .set-entry { grid-template-columns: 25px minmax(0, 1fr) minmax(0, 1fr) 64px; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .content { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.mobile-brand { display: none; align-items: center; color: var(--ink); font: 750 20px system-ui, sans-serif; letter-spacing: -.065em; }
.mobile-brand span { color: var(--muted); }
@media (max-width: 760px) { .mobile-brand { display: flex; } .topbar-label { display: none; } }

.toast { bottom: 25px; }
.empty-chart { height: 96px; }
@media (max-width: 760px) { .toast { bottom: calc(78px + env(safe-area-inset-bottom)); } }
