:root{color-scheme:dark;--bg:#0d0f12;--side:#121416;--card:#171a1e;--card2:#1d2025;--stroke:#30343a;--txt:#f6f5f1;--muted:#9a9da4;--low:#656a73;--accent:#ffac55;--accent2:#ffcb77;--danger:#f3a59a;--good:#9ddaba;--radius:18px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--txt)}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent2);outline-offset:2px}h1,h2,h3,p{margin:0}h1,h2,h3{letter-spacing:-.045em}p{line-height:1.55}input,textarea,select{color:var(--txt);background:#202329;border:1px solid #41454c;border-radius:11px;min-height:44px;padding:11px 12px;width:100%;outline:0}textarea{resize:vertical;min-height:94px}input::placeholder,textarea::placeholder{color:#7b7e84}input:focus,textarea:focus,select:focus{border-color:#cc8b45}button:disabled{opacity:.45;cursor:wait}a{color:var(--accent)}.icon{width:19px;height:19px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}.app{max-width:1700px;margin:auto;min-height:100vh;display:grid;grid-template-columns:235px minmax(0,1fr) 300px}.sidebar{border-right:1px solid #262a2e;background:var(--side);padding:29px 18px 24px;display:flex;flex-direction:column;gap:37px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:11px}.brandmark{width:46px;height:46px;flex-shrink:0;background:linear-gradient(142deg,#ffd079,#ff9a3c);color:#27170c;border-radius:14px;position:relative;display:grid;place-items:center;font-size:28px;font-weight:1000;letter-spacing:-.08em}.brandmark i{position:absolute;right:9px;bottom:8px;width:6px;height:6px;background:#6d3c14;border-radius:50%}.brandwords strong{font-size:26px;font-weight:950;letter-spacing:-.08em;line-height:1}.brandwords strong span{color:#ffaf51}.brandwords small{font-size:8px;letter-spacing:.12em;color:#9f9fa1;display:block;margin-top:7px;font-weight:700}.nav-label,.rail-eyebrow{font-size:10px;letter-spacing:.13em;color:#6d7379;font-weight:800}.nav{display:grid;gap:5px;margin-top:-23px}.nav button,.mobile-tabs button{display:flex;align-items:center;gap:13px;background:transparent;border:1px solid transparent;text-align:left;color:#9a9ca3;padding:13px 13px;border-radius:12px;font-size:13px;font-weight:720}.nav button.active{background:#34281f;border-color:#5f4630;color:#ffbf79}.nav button:hover{background:#24272a}.nav button.active:hover{background:#392d22}.nav .icon{width:19px;height:19px}.sidebar-foot{margin-top:auto}.sidebar-quote{border:1px solid #65442e;background:linear-gradient(145deg,#33261e,#1c1c1e);padding:19px 15px;border-radius:15px;color:#d6b899;font-size:13px;line-height:1.65;letter-spacing:.07em}.sidebar-quote b{color:#ffbb6d}.mini-device{font-size:10px;color:#a9a9a9;margin:21px 4px 12px;display:flex;align-items:center;gap:8px}.device-dot{width:7px;height:7px;background:#ffae67;border-radius:50%}.sidebar-foot>small{font-size:10px;color:#696b71;margin-left:4px}.center{min-width:0;padding:0 clamp(20px,3vw,54px) 90px}.top{height:85px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #2b2c31;gap:10px}.breadcrumb{font-size:12px;color:#777c82;font-weight:700}.breadcrumb span{margin:0 8px;color:#4d5055}.breadcrumb b{color:#eee9e2}.topactions{display:flex;align-items:center;gap:16px}.status-pill{border:1px solid #65442f;background:#30221a;border-radius:100px;color:#ffba77;padding:7px 11px;font-size:10px;font-weight:800}.profile-bubble{width:35px;height:35px;background:#47301e;border:1px solid #99623b;border-radius:50%;display:grid;place-items:center;color:#ffc88c;font-size:11px;font-weight:800}.right-rail{background:#121416;border-left:1px solid #25282d;position:sticky;top:0;height:100vh;padding:31px 24px;display:flex;flex-direction:column}.rail-top{display:flex;align-items:center;justify-content:space-between}.rail-ring{border:1px solid #63452e;border-radius:50%;width:43px;height:43px;display:grid;place-items:center;color:#ffba66;font-size:17px;font-weight:950}.rail-ring span{color:#e6b179}.right-rail h3{font-size:28px;line-height:1.2;margin-top:43px}.right-rail em{font-style:normal;color:#fbb36f}.right-rail p{color:#898e93;font-size:12px;margin-top:12px}.rail-line{border-top:1px solid #2c3033;margin:26px 0}.rail-metric{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#aaaeb4;margin:13px 0}.rail-metric b{color:#f5e2c5;font-size:12px}.rail-up-next small{font-size:10px;letter-spacing:.14em;color:#e5a35d;font-weight:800}.rail-up-next>b{font-size:14px;display:block;line-height:1.55;margin-top:13px}.ghost-link{background:transparent;border:0;color:#ffc17c;margin-top:13px;padding:0;font-weight:750;font-size:11px}.rail-bottom{margin-top:auto;color:#666c71;font-size:10px}.eyebrow{color:#ffb467;text-transform:uppercase;font-weight:850;letter-spacing:.14em;font-size:10px}.page-head{padding-top:39px;display:flex;justify-content:space-between;align-items:flex-end;gap:18px}.page-head h1{font-size:clamp(34px,4vw,52px);line-height:1.04;margin:8px 0 9px;font-weight:850}.page-head p{font-size:13px;color:#a6a5a5;max-width:620px}.page-body{max-width:900px}.orange{color:#ffad62}.head-date{font-size:12px;color:#b0b0b1}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:13px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.card{background:var(--card);border:1px solid var(--stroke);border-radius:var(--radius);padding:21px}.card+.card{margin-top:14px}.card-title{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:17px}.card-title h3{font-size:17px;letter-spacing:-.025em}.card-title small{color:#909399;font-size:11px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:27px 0 13px}.section-title h3{font-size:16px}.section-title small{font-size:11px;color:#90949a}.row{display:flex;align-items:center;gap:10px}.between{justify-content:space-between}.mb{margin-bottom:16px}.muted{color:#a2a5ad}.tiny{font-size:11px;color:#898c91}.small{font-size:12px;color:#b7bac0}.text-right{text-align:right}.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid transparent;background:linear-gradient(125deg,#ffca70,#ff9c4a);color:#25180e;border-radius:12px;padding:12px 17px;font-size:12px;font-weight:870;min-height:43px}.btn:hover{filter:brightness(1.07)}.btn .icon{width:16px;height:16px}.btn.secondary{background:#292d32;color:#ede7dd;border-color:#49484b}.btn.minor{background:transparent;color:#fbc18a;border-color:#644733}.btn.sm{min-height:33px;padding:7px 11px;font-size:11px;border-radius:9px}.btn.block{width:100%}.hero{position:relative;overflow:hidden;background:radial-gradient(circle at 98% -10%,#f2a33e42,transparent 40%),linear-gradient(120deg,#2d221d,#1b1b1f 66%);border:1px solid #805233;border-radius:22px;padding:25px 24px;margin-top:22px}.hero::after{content:'';position:absolute;width:205px;height:205px;right:-70px;top:-90px;border:1px solid #f2a74b40;border-radius:50%;box-shadow:0 0 0 24px #d6a25e13,0 0 0 52px #cd853f0d;pointer-events:none}.hero>*{position:relative;z-index:1}.hero h2{font-size:30px;line-height:1.12;letter-spacing:-.06em;margin:12px 0 9px;max-width:440px}.hero p{font-size:12px;color:#d0c0b5;max-width:420px}.hero form{margin-top:22px;display:flex;background:#16171b;border:1px solid #585047;border-radius:14px;gap:8px;padding:7px;align-items:center}.hero form input{border:none;background:transparent;min-width:0;flex:1}.hero form button{min-width:44px;width:44px;height:44px;border-radius:11px;display:grid;place-items:center;background:#fbb361;border:none;color:#342012}.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}.chip{background:#27242a;border:1px solid #574839;border-radius:99px;color:#e6c6a4;font-size:11px;padding:9px 12px}.chip:hover{border-color:#e69b55}.metric{background:#1b1e23;border:1px solid #343941;border-radius:15px;padding:17px}.metric-head{display:flex;align-items:center;gap:8px;color:#a3a4a7;font-size:11px}.metric-head .icon{width:15px;height:15px;color:#e8ad69}.metric strong{display:block;font-size:26px;letter-spacing:-.06em;margin:10px 0 4px}.metric small{color:#8c9094;font-size:10px;line-height:1.5;display:block}.warning{border:1px solid #6c5036;background:#2e241b;color:#eed2aa;border-radius:13px;padding:12px 14px;font-size:11px;line-height:1.6}.note{border:1px dashed #464b51;border-radius:12px;background:#1a1e23;color:#9c9eaa;font-size:11px;line-height:1.65;padding:14px}.workout-feature{background:linear-gradient(110deg,#26211e,#17191f);border:1px solid #654934;padding:21px;border-radius:20px}.workout-feature h3{font-size:21px;margin:10px 0 8px}.workout-feature p{font-size:12px;color:#b9b2ae}.workout-feature .meta{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0}.tag{display:inline-flex;align-items:center;border:1px solid #554436;background:#2b2723;border-radius:8px;padding:7px 9px;color:#e2c3a2;font-size:10px;font-weight:650}.go-today{margin-top:14px;display:flex;gap:9px;flex-wrap:wrap}.day-row{display:flex;gap:13px;align-items:center;background:#191c21;border:1px solid #30343b;border-radius:14px;padding:14px;margin-bottom:9px}.day-row.current{border-color:#b0794a;background:#26221f}.day-date{min-width:52px;color:#e4ddd5;font-size:12px;font-weight:750}.day-date small{display:block;color:#85898e;font-size:10px;margin-top:5px}.type-icon{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#332b23;color:#ffc182;flex:0 0 auto}.type-icon.strength{background:#2c2a3a;color:#c6b9ed}.type-icon.func{background:#382823;color:#eab6a0}.type-icon.rest{background:#24332a;color:#a7d6b0}.type-icon.hockey{background:#282d3f;color:#b4cef1}.day-info{min-width:0;flex:1}.day-info b{font-size:13px;display:block}.day-info span{font-size:11px;color:#989ba1;display:block;line-height:1.45;margin-top:4px}.day-action{border:0;background:transparent;color:#f6b777;padding:7px;font-size:11px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{margin:12px 0}.field label{display:block;color:#afb0b4;font-size:11px;font-weight:730;margin-bottom:7px}.field small{color:#777c81;display:block;font-size:10px;margin-top:7px}.option-tabs{border:1px solid #393c43;padding:4px;display:flex;background:#202329;border-radius:13px;gap:5px;margin:16px 0}.option-tabs button{flex:1;border:0;background:transparent;color:#aeb0b2;padding:12px 10px;border-radius:9px;font-size:12px;font-weight:750}.option-tabs button.active{background:#513721;color:#ffcc90}.goal-card{border:1px solid #35383f;background:#1c1e23;border-radius:14px;padding:16px;margin:10px 0}.goal-card h3{font-size:15px;margin:6px 0 9px}.goal-meta{display:flex;justify-content:space-between;gap:10px;align-items:center}.goal-meta span{font-size:10px;color:#b6a499}.goal-meta button{border:0;background:transparent;color:#edab77}.coach-layout{display:flex;flex-direction:column;min-height:58vh}.coach-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.coach-intro{margin:12px 0 19px;color:#9da0a6;font-size:12px}.chat-scroll{display:flex;flex-direction:column;gap:13px;min-height:270px;max-height:55vh;overflow-y:auto;scrollbar-width:thin;padding:10px 4px 20px}.bubble{max-width:90%;border-radius:16px;padding:15px 17px;font-size:13px;white-space:pre-wrap;line-height:1.65;overflow-wrap:anywhere}.bubble.assistant{align-self:flex-start;background:#22252a;border:1px solid #383c43;color:#e5e4e0}.bubble.user{align-self:flex-end;background:#4c3323;border:1px solid #8c5530;color:#f9e0c5}.bubble-meta{font-size:10px;color:#96999d;margin-top:11px}.composer{border:1px solid #534b45;background:#1c1d21;padding:9px;border-radius:17px;display:flex;align-items:flex-end;gap:10px;position:sticky;bottom:14px}.composer textarea{background:transparent;border:0;min-height:48px;max-height:150px;padding:12px;resize:vertical;flex:1}.composer .btn{padding:11px}.history-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.history-card{overflow:hidden;border:1px solid #333840;background:#191c21;border-radius:17px}.history-cover{height:96px;background:linear-gradient(135deg,#403026,#22262b);display:flex;align-items:center;justify-content:center;position:relative;color:#ffb773;font-size:40px}.history-cover.func{background:linear-gradient(135deg,#463026,#23252c)}.history-cover.strength{background:linear-gradient(135deg,#322e45,#21242c);color:#c7b6ef}.history-cover img{width:100%;height:100%;object-fit:cover}.history-cover .fake{position:absolute;top:9px;right:9px;background:#211d1ddd;border:1px solid #49403b;padding:4px 7px;border-radius:7px;font-size:9px;color:#ffc590}.history-content{padding:16px}.history-content h3{font-size:15px;margin:5px 0 7px}.history-content p{color:#a5a5aa;font-size:11px;min-height:38px}.history-content small{font-size:10px;color:#989aa0}.history-content .actions{margin-top:13px;display:flex;gap:7px;flex-wrap:wrap}.history-filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:17px}.history-filters input{flex:1;min-width:160px}.history-filters select{width:auto;min-width:108px}.empty{text-align:center;border:1px dashed #454a50;border-radius:17px;padding:31px 20px;color:#b6b4b3}.empty .icon{color:#d2a46d;width:30px;height:30px;margin-bottom:8px}.conn{display:flex;justify-content:space-between;align-items:center;gap:13px;border:1px solid #36383c;background:#1b1d22;border-radius:16px;padding:16px;margin:10px 0}.conn-name{font-weight:800;font-size:13px}.conn-desc{color:#97999e;font-size:11px;line-height:1.55;margin-top:5px}.conn-status{font-size:10px;color:#f8c08d;border:1px solid #6f5036;border-radius:8px;padding:7px 9px;white-space:nowrap}.mobile-tabs{display:none}.modal-wrap{position:fixed;inset:0;background:#060708bf;z-index:30;display:grid;place-items:center;padding:16px}.modal{background:#1b1d22;border:1px solid #535151;border-radius:21px;max-width:610px;width:100%;max-height:min(90vh,850px);overflow:auto;padding:24px;box-shadow:0 20px 100px #0009}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal h2{font-size:23px}.close{border:0;background:#303239;color:#eee;border-radius:9px;width:34px;height:34px}.modal-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:21px}.toast{position:fixed;z-index:50;left:50%;bottom:24px;transform:translateX(-50%);padding:12px 17px;border:1px solid #885d38;background:#3b2b20;color:#ffdaa9;border-radius:12px;box-shadow:0 12px 40px #0008;display:none;font-size:12px;max-width:92vw}.toast.on{display:block}.signin-mask{position:fixed;inset:0;z-index:60;background:#0c0e11ed;display:grid;place-items:center;padding:16px}.signin-box{background:#171a1e;border:1px solid #5b4433;border-radius:24px;padding:29px;max-width:420px;width:100%}.signin-box h2{font-size:32px;margin:20px 0 6px}.signin-box p{color:#a3a6aa;font-size:12px}.hide{display:none!important}
@media(max-width:1280px){.app{grid-template-columns:216px minmax(0,1fr)}.right-rail{display:none}}
@media(max-width:780px){.app{display:block}.sidebar{display:none}.center{padding:0 18px 110px}.top{height:68px}.page-head{padding-top:27px}.page-head h1{font-size:36px}.mobile-tabs{display:grid;grid-template-columns:repeat(6,1fr);position:fixed;left:0;right:0;bottom:0;z-index:20;background:#16181df5;border-top:1px solid #383739;padding:7px 4px max(9px,env(safe-area-inset-bottom));gap:1px;backdrop-filter:blur(16px)}.mobile-tabs button{font-size:9px;padding:8px 0;display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;border-radius:10px;min-height:52px}.mobile-tabs .icon{width:19px;height:19px}.mobile-tabs button.active{color:#ffbb73;background:#34281e}.grid2{grid-template-columns:1fr 1fr}.history-grid{grid-template-columns:1fr 1fr}.hero{padding:23px 19px}.hero h2{font-size:26px}.card{padding:17px}.coach-layout{min-height:63vh}.chat-scroll{max-height:57vh}.form-grid{grid-template-columns:1fr 1fr}}
@media(max-width:460px){.grid2{gap:8px}.metric{padding:12px}.metric strong{font-size:23px}.history-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.page-head h1{font-size:33px}.conn{flex-wrap:wrap}.modal{padding:19px}.bubble{max-width:96%;font-size:12px}}
.toast{pointer-events:none}
@media(max-width:780px){.toast{bottom:calc(87px + env(safe-area-inset-bottom))}}

.composer{position:relative;bottom:auto;margin-top:2px}
/* FREM v6 — responsive Plan / Coach upgrade */
.brandwords small{letter-spacing:.1em}
.day-open{border:0;background:transparent;text-align:left;color:inherit;padding:4px 0;cursor:pointer}
.day-open:hover b,.day-hint{color:#ffbb76!important}
.day-hint{font-size:10px!important;margin-top:8px!important}
.workout-feature{margin-bottom:20px}
.section-title{margin-top:22px}
.back-link{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;color:#f8b16a;cursor:pointer;padding:6px 0 18px;font-weight:700;font-size:13px}
.back-link .icon{transform:rotate(180deg)}
.day-tools{margin-bottom:15px;flex-wrap:wrap;gap:10px}
.completed{border-color:#386d50;color:#a9e5b9;background:#182a23}
.exercise-list{display:grid;gap:15px}
.exercise-card{border:1px solid #373c42;background:#1a1d22;border-radius:18px;padding:18px;box-shadow:0 10px 30px #0002}
.exercise-top{display:flex;align-items:center;gap:16px;margin-bottom:19px}
.exercise-figure{width:92px;height:92px;border:1px solid #5e4534;background:#28211d;border-radius:14px;overflow:hidden;flex:0 0 auto}
.exercise-figure svg{width:100%;height:100%}
.exercise-info{flex:1;min-width:0}
.exercise-info small{display:block;font-size:10px;color:#f4b46e;font-weight:800;margin-bottom:7px;letter-spacing:.08em}
.exercise-info input{width:100%;border:0;border-bottom:1px solid #48454a;border-radius:0;background:transparent;font-weight:800;font-size:16px;padding:6px 0;color:#fff}
.exercise-info span{display:block;font-size:11px;line-height:1.5;color:#a5a7aa;margin-top:7px}
.icon-button{border:0;background:transparent;color:#af9d96;padding:10px;align-self:flex-start;cursor:pointer}
.set-grid-head,.set-grid{display:grid;grid-template-columns:50px minmax(0,1fr) minmax(0,1fr) 70px;align-items:center;gap:9px}
.set-grid-head{margin-bottom:8px;color:#a6a9b0;font-size:10px;font-weight:750}
.set-grid{margin-bottom:9px}
.set-grid b{display:grid;place-items:center;border-radius:8px;background:#282e32;height:42px;color:#ffd6a4}
.set-grid input:not([type=checkbox]){width:100%;font-size:16px!important;text-align:center;padding:10px 4px;height:44px;background:#24282e;color:#fff;border-radius:9px}
.set-done{height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.set-done input{accent-color:#ffb45f;width:21px;height:21px}
.set-done span{display:none}
.exercise-bottom{display:flex;gap:9px;margin-top:14px}
.session-finish{display:flex;justify-content:space-between;gap:12px;margin-top:18px;flex-wrap:wrap}
.profile-shortcuts{margin-top:23px}
.profile-goals-button{display:flex;gap:15px;align-items:center;text-align:left;width:100%;background:linear-gradient(110deg,#31231a,#211d1b);border:1px solid #936038;border-radius:16px;padding:20px;cursor:pointer;color:#ffc080}
.profile-goals-button>.icon{width:26px;height:26px;flex:none}
.profile-goals-button span{flex:1}
.profile-goals-button b{display:block;color:white;font-size:17px}
.profile-goals-button small{display:block;margin-top:5px;font-size:11px;color:#beb0a1}
.pr-row{display:flex;gap:14px;align-items:center;border-bottom:1px solid #333840;padding:12px 0}
.pr-row b{flex:1;font-size:13px}
.pr-row span{font-size:14px;color:#ffc184;font-weight:750}
.pr-row button{background:transparent;border:0;color:#c6b0a1;padding:8px}
.chat-text{white-space:normal;font-size:inherit;line-height:1.7}
.chat-line{margin-bottom:6px}
.chat-heading{font-weight:850;font-size:1.06em;color:#fff;margin:11px 0 7px}
.chat-bullet{display:flex;gap:10px;margin:5px 0 7px}
.chat-bullet>span:first-child{color:#ffb669;font-weight:800;min-width:12px}
.chat-gap{height:8px}
.chat-text code{background:#343940;padding:2px 5px;border-radius:4px;color:#ffd6a4}
.chat-text strong{color:#fff}
.coach-layout{height:calc(100dvh - 225px);min-height:510px;overflow:hidden;display:flex;flex-direction:column;margin-top:20px}
.coach-layout .chat-scroll{min-height:0;max-height:none;flex:1;overflow-y:auto}
.coach-layout .coach-chips{flex-shrink:0;margin-top:6px}
.coach-layout .composer{flex-shrink:0}
.bubble{font-size:14px;line-height:1.7;white-space:normal}
.history-filters select{flex:0 0 auto}
@media (max-width:780px){
 .coach-open .center{padding-bottom:calc(83px + env(safe-area-inset-bottom))}
 .coach-open .page-head{display:none}
 .coach-open .top{height:56px}
 .coach-open .page-body{padding-top:5px}
 .coach-open .coach-layout{height:calc(100dvh - 56px - 84px - env(safe-area-inset-bottom) - 12px);min-height:220px;margin-top:0;padding:12px}
 .coach-open .chat-scroll{min-height:0;max-height:none;padding:8px 3px}
 .coach-open .coach-chips{flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;margin-top:3px;scrollbar-width:none}
 .coach-open .composer{margin-top:8px;padding:6px}
 .coach-open .composer textarea{font-size:16px;line-height:1.35;min-height:42px;padding:10px 8px}
 .bubble{font-size:15.5px!important;line-height:1.65;padding:13px 14px}
 .coach-layout .coach-top{padding-bottom:9px}
 .exercise-card{padding:13px}
 .exercise-top{gap:12px}
 .exercise-figure{width:76px;height:76px}
 .set-grid-head,.set-grid{grid-template-columns:36px minmax(0,1fr) minmax(0,1fr) 44px;gap:6px}
 .set-grid-head{font-size:9px}
 .exercise-info input{font-size:15px}
 .session-finish .btn{flex:1;justify-content:center}
 .history-filters{display:grid;grid-template-columns:1fr 1fr}
 .history-filters input{grid-column:1/-1}
 .history-filters select{width:100%;min-width:0}
}
@media (max-width:420px){.exercise-figure{width:62px;height:62px}.exercise-info span{font-size:10px}.exercise-top{align-items:flex-start}.coach-open .coach-layout{padding:10px}.coach-open .coach-top .tag{font-size:9px}}
@media(max-width:640px){.page-body:has(#goalForm)>.grid2{grid-template-columns:1fr}}
.rail-foot-link{display:inline-block;color:#b18a65;margin-top:7px;text-decoration:none;font-size:11px}
.rail-foot-link:hover{color:#ffbc75}

/* FREM v7: premium, usable on mobile + desktop. Additive only; v6 is preserved. */
:root{--accent:#ff942c;--accent2:#ffc06b;--glow:#ff7d1b}
.orange,.eyebrow,.chat-bullet>span:first-child{color:var(--accent)}
.btn{background:linear-gradient(125deg,#ffba60,#ff8b25);color:#1c1310}
.btn:hover{filter:brightness(1.11)}
.nav button.active,.mobile-tabs button.active{color:#ffaf65;background:#31221b;border-color:#7d4425}
.sidebar-quote,.workout-feature{border-color:#8d4c25}
.brandwords strong,.home-logo{font-weight:1000;font-stretch:expanded;letter-spacing:-.075em}
.home-brand{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:32px}
.home-logo{font-size:clamp(43px,6vw,68px);line-height:.97;color:#fff}
.home-logo span{color:var(--accent)}
.home-brand small{display:block;color:#fa9e4e;letter-spacing:.26em;font-size:9px;font-weight:850;margin-top:7px}
.home-edition{font-size:10px;color:#72777d;letter-spacing:.16em;text-align:right}
.home-welcome{margin-top:30px}.home-welcome h1{font-size:clamp(25px,3vw,36px);letter-spacing:-.04em;margin:10px 0 5px}.home-welcome p{font-size:13px;color:#abaeb5}
.workout-feature.feature-v7{min-height:236px;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 41%;padding:0;background:linear-gradient(120deg,#2d211b,#14171b 70%);overflow:hidden;box-shadow:inset 0 1px #f88f2c22;margin:23px 0 21px}
.feature-copy{padding:26px 25px;position:relative;z-index:2}.feature-copy h2{font-size:clamp(24px,3vw,33px);margin:14px 0 8px;line-height:1.15}.feature-copy p{font-size:12px;color:#c9b4a9;max-width:400px;line-height:1.5}.feature-badge{display:flex;align-items:center;gap:6px;font-size:11px;color:#e9bf9b;margin-top:16px}.feature-badge svg{height:18px;width:18px;color:#ff942c}.hero-start{margin-top:22px;min-width:205px}.feature-image{height:100%;position:absolute;right:0;width:49%;top:0;opacity:.8}.feature-image img{height:100%;width:100%;object-fit:cover;object-position:center}.feature-image:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#251d1b 0%,#251d1b30 35%,transparent 75%)}
.home-chat{margin-top:26px;border-radius:18px;border:1px solid #484039;background:#1b1d20;padding:17px;display:flex;gap:13px;align-items:center}.home-chat-icon{width:40px;height:40px;border-radius:14px;display:grid;place-items:center;background:#372519;color:#ff9c33;flex:none}.home-chat-icon .icon{width:24px;height:24px}.home-chat strong{font-size:14px}.home-chat p{color:#9ea2aa;font-size:11px;margin-top:3px}.home-chat .btn{margin-left:auto;flex:none}
.coach-open .page-head{display:none}.coach-open .center{padding-bottom:0}.coach-shell{margin-top:20px;height:calc(100dvh - 110px);display:flex;flex-direction:column;min-height:370px;border-radius:20px;background:#14171a;border:1px solid #343840;overflow:hidden}
.chat-room-header{display:flex;gap:12px;align-items:center;padding:15px 20px;background:#1b1f23;border-bottom:1px solid #31363c}.coach-avatar{width:26px;height:26px;background:#39281a;color:#ffa241;border-radius:50%;display:grid;place-items:center;flex:none}.coach-avatar .icon{width:16px;height:16px}.coach-avatar.big{height:44px;width:44px}.coach-avatar.big .icon{height:21px;width:21px}.chat-room-title{display:flex;flex-direction:column;gap:4px}.chat-room-title b{font-size:16px}.chat-room-title small{color:#a5adb5;font-size:11px}.status-dot{display:inline-block;height:7px;width:7px;border-radius:50%;background:#76d6aa;margin-right:6px}.chat-room-tag{margin-left:auto;font-size:9px;letter-spacing:.1em;color:#bf987e}.coach-shell .chat-scroll{flex:1;overflow-y:auto;max-height:none;min-height:0;padding:22px 18px;display:flex;flex-direction:column;gap:16px}
.chat-message{display:flex;align-items:flex-end;gap:8px}.chat-message.mine{justify-content:flex-end}.chat-message .bubble{max-width:min(86%,740px);font-size:15px!important;line-height:1.64;border-radius:18px;padding:14px 18px}.chat-message.mine .bubble{background:#733e1f;border-color:#a2592d;color:#fff}.chat-message.theirs .bubble{background:#24282e;border-color:#3c414a}.chat-message .bubble-meta{font-size:10px;margin-top:9px;color:#aeb8c0}.chat-intro{color:#d9d9d6;margin:auto;text-align:center}.chat-intro .icon{color:#f98e32;width:38px;height:38px}.chat-intro h3{margin:12px}.chat-intro p{font-size:13px;color:#979da4}.coach-shell .coach-chips{padding:4px 17px 12px;margin-top:0}.coach-shell .composer{margin:0 15px 15px;padding:7px;background:#24282e;border:1px solid #54565a;border-radius:15px;display:flex;align-items:flex-end}.coach-shell .composer textarea{font-size:15.5px;min-height:48px;max-height:140px;line-height:1.45;border:none;background:transparent;padding:12px;resize:vertical}.coach-shell .composer .btn{height:45px;width:48px;display:grid;place-items:center;flex:none;padding:0}.coach-shell .composer .icon{width:19px;height:19px}
.exercise-card{overflow:hidden}.exercise-top{align-items:center}.exercise-figure.realistic{width:210px;height:132px;background:#17191d;border-color:#714522;box-shadow:0 4px 17px #0005}.exercise-figure.realistic img{height:100%;width:100%;object-fit:cover}.exercise-info input{font-size:19px!important}.exercise-info span{font-size:12px}.run-hero{position:relative;min-height:270px;border:1px solid #6b462e;border-radius:20px;overflow:hidden;background:#181b1f;margin:12px 0 18px}.run-hero-art{position:absolute;inset:0}.run-hero-art img{width:100%;height:100%;object-fit:cover}.run-hero-art:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#111419 8%,#11141999 43%,#11141910 100%)}.run-hero-overlay{position:absolute;bottom:18px;left:23px;right:23px}.run-hero-overlay h1{font-size:clamp(29px,4vw,42px);margin:7px 0}.run-hero-overlay p{color:#c2c7ce;font-size:12px}
.run-plan-card{padding:24px}.run-mode-switch{display:flex;gap:8px;margin:6px 0 23px}.run-mode-switch label{display:flex;align-items:center;gap:8px;background:#252a30;padding:12px 17px;border-radius:12px;font-size:13px;cursor:pointer;border:1px solid #45484b}.run-mode-switch input{accent-color:#ff902c;width:16px;height:16px;min-height:16px}.run-step{display:flex;gap:14px;border:1px solid #353c44;background:#1d2227;border-radius:15px;padding:16px;margin:12px 0}.run-step.focus{border-color:#9b5429;background:#2a211e}.run-step-num{background:#353b43;border-radius:10px;display:grid;place-items:center;width:40px;height:40px;color:#f6a15c;font-weight:850;flex:none}.run-step-body{flex:1;min-width:0}.run-step-body b{display:block;margin:0 0 14px;font-size:17px}.run-inputs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:8px}.run-field{display:block;max-width:100%;min-width:0}.run-field>span{display:block;color:#a3abb4;font-size:11px;margin:0 0 7px}.run-field input{background:#171c22;width:100%;max-width:225px}.run-inputs .run-field input{max-width:none}.notes-field{margin-top:20px}.notes-field textarea{min-height:70px}.run-steady-fields .run-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}
.profile-v7-intro{margin:22px 0;padding:25px 22px;border-radius:19px;border:1px solid #694a34;background:linear-gradient(115deg,#30231d,#17191d);display:flex;align-items:center;gap:20px}.profile-avatar{height:94px;width:94px;flex:none;display:grid;place-items:center;border-radius:50%;border:3px solid #ff942c;overflow:hidden;background:#37322e;color:#ffc58c;font-size:29px;font-weight:850}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-identity h2{font-size:26px}.profile-identity p{color:#b3a7a2;font-size:12px;margin:5px 0 12px}.avatar-upload{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#ffb56f;cursor:pointer;font-weight:750}.avatar-upload .icon{width:15px;height:15px}.profile-menu{border-radius:19px;border:1px solid #373c43;overflow:hidden;margin-top:15px}.profile-menu button{width:100%;text-align:left;background:#1a1d21;border:0;border-bottom:1px solid #33383f;color:#fff;padding:17px 19px;display:flex;align-items:center;gap:15px}.profile-menu button:hover{background:#26292d}.profile-menu button:last-child{border-bottom:0}.profile-menu button>.icon:first-child{color:#f99b38;width:23px;height:23px}.profile-menu button>span{flex:1}.profile-menu b{display:block;font-size:14px}.profile-menu small{display:block;margin-top:6px;color:#898f99;font-size:11px}.profile-menu button>.icon:last-child{width:15px;height:15px;color:#92969d}
@media(max-width:780px){.home-brand{padding-top:18px}.home-logo{font-size:48px}.home-edition{font-size:8px}.home-welcome{margin-top:22px}.home-welcome h1{font-size:26px}.feature-image{width:62%;opacity:.6}.feature-copy{padding:21px 18px}.feature-copy h2{font-size:25px}.feature-copy p{max-width:75%;font-size:12px}.home-chat{flex-wrap:wrap}.home-chat .btn{margin-left:auto}.chat-room-tag{display:none}.coach-open .page-body{padding-top:0}.coach-open .top{height:56px}.coach-shell{height:calc(100dvh - 58px - 78px - env(safe-area-inset-bottom));min-height:0;margin-top:0;border:0;border-radius:0;background:transparent}.coach-shell .chat-scroll{padding:16px 6px}.chat-message .bubble{font-size:16px!important;padding:12px 14px;max-width:92%}.chat-room-header{padding:12px 5px;background:#14171a}.coach-shell .coach-chips{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap;padding:8px 3px}.coach-shell .composer{margin:0 0 4px;padding:4px}.coach-shell .composer textarea{font-size:16px}.exercise-top{flex-direction:column;align-items:stretch}.exercise-figure.realistic{width:100%;height:190px}.run-plan-card{padding:15px}.run-hero{min-height:236px}.run-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.run-step{padding:13px;gap:10px}.profile-v7-intro{padding:18px 15px}.profile-avatar{width:76px;height:76px}.profile-identity h2{font-size:22px}}
@media(max-width:400px){.feature-copy p{max-width:100%}.feature-image{opacity:.3}.home-brand .home-logo{font-size:44px}.home-chat .btn{width:100%}.run-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-v7-intro{gap:12px}}
@media(max-width:780px){.mobile-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}}

/* FREM v9 – small, approved refinements on top of v7. Keep v7 list, archive and profile menu unchanged. */
:root{--accent:#ff972e;--accent2:#ffc06e}
.option-tabs{margin:16px 0!important}
.exercise-list{gap:11px}
.exercise-card{padding:12px!important;border-radius:16px!important}
.exercise-top{gap:12px!important;margin-bottom:10px!important}
.exercise-figure.realistic{width:126px!important;height:112px!important;flex:none;border-radius:13px!important}
.exercise-info input{font-size:17px!important;padding:4px 0!important}
.exercise-info span{font-size:11px!important;margin-top:5px!important}
.exercise-info small{margin-bottom:3px}
.set-grid{margin-bottom:5px!important;gap:7px!important}
.set-grid b{height:36px!important}
.set-grid input:not([type=checkbox]){height:36px!important;min-height:36px!important;padding:7px 3px!important}
.exercise-bottom{margin-top:8px!important}
.run-step{gap:0!important}
.run-step-body{width:100%}
.run-inputs .run-field select{background:#171c22;border:1px solid #41484f;color:#fff;border-radius:11px;min-height:44px;width:100%;padding:9px}
@media(max-width:780px){.exercise-card{padding:10px!important}.exercise-top{flex-direction:row!important;align-items:center!important}.exercise-figure.realistic{width:112px!important;height:108px!important}.exercise-info input{font-size:15px!important}.exercise-info span{display:none}.exercise-info small{font-size:9px}.set-grid{grid-template-columns:36px 1fr 1fr 48px!important;gap:6px!important}.set-grid-head{font-size:9px}.set-grid input:not([type=checkbox]){font-size:14px!important}.run-step{padding:14px!important}.run-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:370px){.exercise-figure.realistic{width:94px!important;height:100px!important}}


/* FREM v10 · narrowly scoped changes. Preserve v9 Plan list, Archive and Profile. */
.day-group{border-bottom:1px solid #32363c;margin:0 0 3px;padding-bottom:8px}
.day-group:last-child{border-bottom:0}
.day-group.current{background:#261c151c;border-radius:13px}
.day-group .day-row{border:0}
.day-group .second-session{padding-left:30px;background:#1c2025;border-radius:12px;margin:3px 8px}
.day-group .second-session .day-date small{font-weight:750;color:#ffac63}
.day-extra{padding:2px 12px 7px 85px}
.day-extra .btn{font-size:11px!important;min-height:32px}
.media-empty{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#ffa44a;text-align:center;background:#21252b}
.media-empty .icon{height:25px;width:25px}.media-empty small{font-size:10px;line-height:1.35;color:#bcc1c8}
.exercise-info .media-link{display:inline-flex;align-items:center;gap:4px;background:none;color:#f7a35b;border:0;padding:5px 0;font-size:11px;font-weight:700;text-align:left}
.exercise-info .media-link .icon{width:14px;height:14px}
.media-library-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-height:360px;overflow:auto;margin:14px 0}
.media-pick{border:1px solid #343941;background:#1e2228;border-radius:12px;padding:5px;display:flex;flex-direction:column;gap:6px;color:#eee;text-align:center;font-size:11px;overflow:hidden}
.media-pick:hover{border-color:#ff9e3d}.media-pick img{width:100%;height:85px;object-fit:cover;border-radius:9px}
.superset-wrap{background:#181c22;border:1px solid #864c24;border-radius:18px;padding:12px;margin-bottom:14px;display:grid;gap:8px}
.superset-wrap .exercise-card{margin-bottom:0!important}
.superset-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.superset-head>div{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center}
.superset-head small{grid-column:2;color:#aeb3bb;font-size:10px}
.superset-symbol{grid-row:span 2;width:31px;height:31px;border-radius:10px;background:#ff9e3d;color:#21160d;display:grid;place-items:center;font-weight:850}
.session-picker{display:grid;gap:8px;max-height:330px;overflow:auto;margin:14px 0}
.session-pick{width:100%;border:1px solid #3b414a;background:#20242a;color:#fff;padding:15px;border-radius:12px;display:flex;gap:10px;align-items:center;text-align:left;font-weight:700}
.session-pick>.icon:last-child{margin-left:auto}
.import-preview{max-height:300px;overflow:auto;display:grid;gap:7px;margin:16px 0}
.import-choice{display:flex;gap:11px;align-items:center;border:1px solid #323842;padding:12px;border-radius:12px;cursor:pointer}
.import-choice input{width:16px;height:16px;accent-color:#ff9e3d}
.import-choice small{display:block;color:#aab1ba;margin-top:5px}
@media(max-width:780px){
 .day-group .second-session{margin:4px 5px;padding-left:8px}
 .day-extra{padding-left:55px}
 .superset-head{align-items:flex-start;flex-wrap:wrap}
 .superset-wrap{padding:9px}
 .media-library-grid{grid-template-columns:repeat(2,1fr)}
 .exercise-figure.realistic{width:126px!important;height:112px!important}
}

/* FREM v11 additions – existing v7/v9 layout untouched */
.coach-daily{margin-bottom:20px;background:linear-gradient(135deg,#22242a,#15181c);border:1px solid #3c3530;}
.coach-daily-title{display:flex;justify-content:space-between;align-items:center;gap:12px}
.coach-daily h3{font-size:clamp(19px,2.5vw,25px);margin:9px 0 6px}
.coach-daily p{line-height:1.6;color:#c8c8c8;margin:8px 0}
.coach-daily-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.coach-daily .coach-alert{display:flex;gap:9px;align-items:center;color:#ffad68}
.coach-weekline{padding-top:12px;border-top:1px solid #393939;margin-top:14px!important}
.coach-latest{margin-top:16px;border-top:1px solid #35383e;padding-top:13px}
.coach-latest .ghost-link{color:#ff9e52}
.coach-latest p{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.garmin-panel{margin-bottom:20px;border:1px solid #42474c}
.garmin-state{display:flex;gap:10px;align-items:center;background:#242930;border-radius:12px;padding:12px;color:#f6f0e8;font-size:13px;margin-top:12px}
.garmin-state .icon{color:#f99c4c;flex-shrink:0}
.coach-settings{margin-bottom:16px}
.coach-toggle{display:flex;align-items:flex-start;gap:12px;padding:12px 0;cursor:pointer}
.coach-toggle input{flex-shrink:0;width:19px;height:19px;accent-color:#e98436;margin-top:4px}
.coach-toggle span{display:flex;flex-direction:column;gap:4px}
.coach-toggle small{font-size:12px;line-height:1.5;color:#a4a9b0}
@media(max-width:580px){.coach-daily{padding:16px}.coach-daily-actions .btn{flex:1 1 130px}.coach-toggle{font-size:13px}}

.exercise-history { margin: 12px 0; font-size: 0.85rem; line-height: 1.6; }
.exercise-history summary { cursor: pointer; overflow-wrap: anywhere; }
.exercise-history p { margin: 8px 0; }

.exercise-grip{display:block;width:100%;background:transparent;color:#acb1b8;border:0;border-bottom:1px solid #373c42;padding:7px 4px;margin:0 0 10px;text-align:left;font:inherit;font-size:11px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.exercise-grip:focus-visible{outline:2px solid #ff9e3d;outline-offset:2px}
.exercise-dragging{outline:2px solid #ff9e3d;opacity:.85;box-shadow:0 8px 26px #0008}
.exercise-dragging .exercise-grip{cursor:grabbing;color:#ffb471}
.exercise-sprite{display:block;width:100%;height:100%;background-repeat:no-repeat;background-size:300% 400%}
.media-pick .exercise-sprite{height:95px;border-radius:8px}

#addExercisePreview[hidden]{display:none!important}
#addExercisePreview{margin-top:10px}

/* Personal plans, running and progression. */
.equipment-options{border:1px solid #3c3c3c;border-radius:12px;padding:14px;margin:4px 0 18px;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.equipment-options[hidden]{display:none}.equipment-options legend{color:#ffb45b;padding:0 8px}.equipment-options label{display:flex;align-items:center;gap:8px}.equipment-options input{width:18px;height:18px;accent-color:#ff9c38}.equipment-options p{grid-column:1/-1}
.proposal-loading{text-align:center;padding:30px 10px}.proposal-loading svg{width:36px;height:36px;color:#ff9c38}.proposal-loading p{color:#bec1c7;line-height:1.6}.proposal-reason{line-height:1.65;margin:14px 0}
.proposal-week{display:grid;gap:12px;margin:20px 0}.proposal-day{padding:18px;border:1px solid #45413b;border-radius:14px;background:#1c1f22;margin-bottom:12px}.proposal-day small{color:#ffb45b}.proposal-day h3{margin:5px 0 8px}.proposal-day p{line-height:1.6;color:#c3c7cd}.proposal-day div{display:flex;justify-content:space-between;gap:12px;font-size:14px;padding:6px 0}.proposal-day div b{white-space:nowrap}.plan-empty{margin:18px 0}.plan-empty h3{margin:0 0 8px}
.run-hero{min-height:340px;background:#111418}.run-hero-art img{object-position:70% 30%}.run-hero-art:after{background:linear-gradient(90deg,#0b1013e0,#0b10134a 65%,transparent),linear-gradient(0deg,#0b101399,transparent 70%)}.run-hero-overlay{left:32px;bottom:32px;right:32px;max-width:70%}.run-hero-overlay h1{font-size:clamp(32px,4.8vw,54px);line-height:1.05;letter-spacing:-1.5px}.run-hero-overlay p{font-size:14px;line-height:1.6;max-width:460px;color:#e3dfda}.run-hero-overlay .eyebrow{font-size:11px;color:#ffd094}
.run-coach-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;margin-bottom:20px;border:1px solid #76502b;border-radius:16px;background:linear-gradient(115deg,#312319,#1a1d20 75%)}.run-coach-panel h3{margin:8px 0}.run-coach-panel p{font-size:14px;color:#c8c7c5;max-width:540px;line-height:1.55}.run-coach-panel .btn{flex-shrink:0}
.progress-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin-top:14px;border-left:3px solid #ffa344;border-radius:4px 10px 10px 4px;background:#28251f}.progress-card small{display:block;font-size:10px;letter-spacing:.5px;color:#ffc886}.progress-card b{display:block;font-size:13px;font-weight:500;line-height:1.6;margin-top:5px}.progress-card .btn{flex-shrink:0}.progress-table{display:grid;margin:10px 0;border:1px solid #393c3f;border-radius:10px;overflow:hidden}.progress-row{display:grid;grid-template-columns:minmax(105px,1fr) 2fr;gap:12px;padding:10px;border-bottom:1px solid #303337}.progress-row:last-child{border-bottom:0}.previous-set{margin:0 0 12px 44px;color:#ffcb92;font-size:11px}.garmin-import-row{border:1px solid #45413b;border-radius:14px;overflow:hidden}.garmin-import-row .import-choice{border:0}.garmin-match{padding:0 14px 14px;margin:0}.garmin-match span{font-size:13px}.garmin-match small{color:#c6b59e;font-size:12px;line-height:1.5;margin-top:8px}
@media(max-width:780px){.run-hero{min-height:300px}.run-hero-art img{object-position:70% center}.run-hero-overlay{left:20px;right:20px;bottom:22px;max-width:none}.run-hero-overlay h1{max-width:85%;font-size:32px}.run-hero-overlay p{max-width:90%;font-size:12px}.run-coach-panel{align-items:stretch;flex-direction:column;gap:14px;padding:18px}.run-coach-panel .btn{justify-content:center}.progress-card{align-items:flex-start;flex-direction:column}.progress-card .btn{align-self:flex-end}.proposal-day div{font-size:13px}.progress-row{font-size:12px;grid-template-columns:100px 1fr}}

/* Archive: one calendar and one workout-type filter. */
.history-filters{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr);align-items:end;gap:12px}
.history-filters label{display:grid;gap:7px;min-width:0}
.history-filters label>span{font-size:11px;color:#b7bac0;font-weight:700}
.history-filters input,.history-filters select{width:100%;max-width:100%;min-width:0;min-height:46px}
.history-filters input[type=date]{color-scheme:dark;cursor:pointer}
.archive-date-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px 0 18px;color:#c4b7a6;font-size:12px}
@media(max-width:780px){.history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.history-filters .archive-search{grid-column:1/-1}.history-filters input,.history-filters select{font-size:16px}.archive-date-status{flex-wrap:wrap}}

/* Equal-sized archive controls, including Safari's native date field. */
.history-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
.history-filters input,.history-filters select{display:block;box-sizing:border-box;height:48px;min-height:48px;max-height:48px;min-inline-size:0;padding:10px 12px;font-size:16px;line-height:26px}
.history-filters input[type=date]{-webkit-appearance:none;appearance:none}
.history-filters input[type=date]::-webkit-date-and-time-value{text-align:left;min-height:26px}
.history-card{display:flex;flex-direction:column}
.history-workout-open{display:block;flex:1;color:inherit;text-decoration:none}
.history-workout-open:hover{background:#24272c}
.history-workout-open:focus-visible{outline:2px solid #ffb467;outline-offset:-3px;border-radius:16px}
.history-actions{display:flex;flex-wrap:wrap;gap:7px;padding:0 16px 16px;position:relative}
.archive-open-label{display:flex;justify-content:space-between;gap:10px;margin-top:16px;color:#ffbb73;font-size:12px;font-weight:700}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.archived-workout-header{padding-top:16px;margin-bottom:24px}
.archived-workout-header h1{overflow-wrap:anywhere}
.archived-workout .back-link{margin-top:20px}
.archived-workout h2{font-size:20px;letter-spacing:-.03em}
.archived-garmin{background:linear-gradient(115deg,#30241b,#1b1e22 75%);border-color:#76502b}
.archived-garmin .card-title{margin-bottom:20px;align-items:flex-start}
.archived-garmin h2{margin-top:7px}
.archived-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.archived-metric{background:#11151880;border:1px solid #4f4437;border-radius:12px;padding:15px;min-width:0}
.archived-metric dt{font-size:12px;color:#c5baaa}
.archived-metric dd{margin:7px 0 0;font-size:22px;font-weight:750;letter-spacing:-.03em;overflow-wrap:anywhere}
.archived-manual-log>.section-title{margin-top:30px;margin-bottom:18px}
.archived-workout-photo{display:block;width:100%;max-height:420px;object-fit:cover;border:1px solid #41454c;border-radius:16px;margin:16px 0}
.archived-effort{font-size:13px;color:#c5bdaf;margin:0 0 16px}
.archived-exercise .exercise-info{min-width:0}
.archived-exercise .exercise-info h3{font-size:21px;margin:6px 0;overflow-wrap:anywhere}
.archived-cue{font-size:12px;color:#acafb5;line-height:1.5}
.archived-sets{width:100%;border-collapse:separate;border-spacing:6px 8px;table-layout:fixed;margin-top:12px}
.archived-sets thead th{font-size:11px;font-weight:600;color:#a6a9b0;text-align:center;letter-spacing:0}
.archived-sets th:first-child{width:42px}
.archived-sets th:last-child{width:56px}
.archived-sets tbody th{background:#292f34;border-radius:8px;font-size:14px;color:#ffd6a4}
.archived-sets td{text-align:center}
.archived-set-value{display:block;min-height:40px;padding:9px 4px;background:#24282e;border:1px solid #41454c;border-radius:9px;font-size:16px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.archived-set-status{display:inline-flex;justify-content:center;align-items:center;width:32px;height:32px;border-radius:9px;border:1px solid #4a4f55;color:#94999f;background:#23272b}
.archived-set-status.completed{background:#ffb75f;border-color:#ffb75f;color:#302014;font-size:20px;font-weight:900}
.archived-set-legend{margin:14px 0 22px;line-height:1.6}
.archived-notes{margin-top:18px;padding:18px;border:1px solid #42464d;border-radius:13px;background:#1b1e23}
.archived-notes h3,.archived-notes summary{font-size:15px;font-weight:700;color:#eee6dc}
.archived-notes summary{cursor:pointer}
.archived-notes p{font-size:14px;color:#c4c5ca;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:12px}
.archived-legacy-note{margin:16px 0;line-height:1.6}
.archived-run{padding:0;overflow:hidden}
.archived-run-cover{position:relative;height:190px;overflow:hidden}
.archived-run-cover img{width:100%;height:100%;object-fit:cover;object-position:70% 30%}
.archived-run-cover:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#14181be6,transparent)}
.archived-run-cover h3{position:absolute;left:22px;bottom:20px;z-index:1;font-size:28px}
.archived-run-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:0;padding:22px}
.archived-run-field dt{font-size:12px;color:#aeb1b7}
.archived-run-field dd{font-size:18px;line-height:1.4;margin:6px 0 0;overflow-wrap:anywhere}
.archived-run>.archived-notes{margin:0 22px 22px}
@media(max-width:780px){
 .history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .archived-garmin{padding:17px}
 .archived-garmin h2{font-size:18px}
 .archived-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .archived-metric{padding:12px}
 .archived-metric dd{font-size:20px}
 .archived-exercise .exercise-info h3{font-size:17px}
 .archived-cue{font-size:11px}
 .archived-sets{border-spacing:4px 7px}
 .archived-sets th:first-child{width:30px}
 .archived-sets th:last-child{width:42px}
 .archived-run-fields{padding:18px;gap:16px}
}

/* Mobile phase 1: the existing running form, with a compact optional coach. */
.run-coach-details{margin:10px 0;border:1px solid #59432f;border-radius:12px;background:#211d19}
.run-coach-details>summary{padding:12px 14px;min-height:44px;cursor:pointer;color:#ffbb73;font-size:13px;font-weight:700}
.run-coach-details>summary span{float:right;color:#bdb4a9;font-weight:400}
.run-coach-details .run-coach-panel{margin:0;border:0;background:transparent}
@media(max-width:780px){
 .run-hero{min-height:0;display:flex;flex-direction:column-reverse;margin:0 0 10px}
 .run-hero-art{position:relative;inset:auto;height:140px;flex:none}
 .run-hero-overlay{position:static;padding:12px 14px;max-width:none}
 .run-hero-overlay h1{font-size:26px;max-width:none;margin:5px 0;overflow-wrap:anywhere}
 .run-hero-overlay p{max-width:none;font-size:13px;line-height:1.4}
 .run-plan-card .card-title{margin-bottom:10px}
 .run-mode-switch{margin:0 0 10px;gap:6px}
 .run-mode-switch label{padding:10px;font-size:12px;min-height:44px}
 .run-step{margin:8px 0;padding:10px!important}
 .run-step-body b{margin-bottom:8px;font-size:16px}
 .run-field input,.run-field select{font-size:16px;min-height:44px}
}

/* Archive: periods and compact cards grouped by day. */
.archive-periods{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}
.archive-periods button{min-height:44px}
.archive-periods [aria-pressed=true]{background:#39281c;border-color:#ffaf65;color:#ffd4a4}
.history-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.archive-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.archive-range label{font-size:12px;min-width:0;color:#b5b7bc}
.archive-range input{display:block;width:100%;min-width:0;height:48px;font-size:16px;color-scheme:dark;-webkit-appearance:none}
.archive-period-status{margin:10px 0 18px}
.history-grid{display:block}
.archive-day{margin-bottom:18px}
.archive-day-title{font-size:15px;margin:12px 0;display:flex;justify-content:space-between;align-items:center}
.archive-day-title small{font-size:11px;font-weight:400;color:#aaa}
.history-card{margin-bottom:8px}
.history-content{padding:12px 14px}
.history-content h3{margin:5px 0;font-size:17px}
.history-content small{line-height:1.6}
.archive-open-label{margin-top:8px}
.history-actions{padding:0 14px 10px;align-items:flex-start}
.history-menu{flex:1}
.history-menu summary{cursor:pointer;min-height:44px;padding:12px;font-size:12px;color:#d3c2af}
.history-menu>div{display:flex;flex-wrap:wrap;gap:8px;padding:8px 0}
.history-actions .btn{min-height:44px}
.archive-more{width:100%;min-height:44px;margin:10px 0}
@media(max-width:780px){.history-filters .archive-search{grid-column:auto}.history-content h3{font-size:16px}}

/* Strength: explicit set state and confirmed save feedback. */
.save-status{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:#c2c7cc;padding:7px 0}
.save-status[hidden],.save-status button[hidden]{display:none}
.save-status[data-phase=saved]{color:#a9e5b9}
.save-status[data-phase=error]{color:#ffd29a;border-bottom:1px solid #97643a}
.set-row-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 5px}
.set-state{font-size:11px;color:#aeb3bb}
.set-entry:has(.set-completed) .set-state{color:#a9e5b9}
.set-completed input:not([type=checkbox]){border-color:#568866;background:#1b2c23}
.previous-set{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.set-row-tools .btn,.previous-set .btn{min-height:44px}
.set-row-tools .btn:disabled,.previous-set .btn:disabled{opacity:.45;cursor:default}
@media(max-width:780px){
 .set-grid input:not([type=checkbox]){height:44px!important;min-height:44px!important;font-size:16px!important}
 .set-grid b{height:44px!important}
 .set-done{min-width:44px;min-height:44px}
 .set-grid-head{font-size:10px}
 .exercise-info input{font-size:16px!important}
 .exercise-bottom{flex-wrap:wrap}
 .exercise-bottom .btn{min-height:44px}
 .progress-card{gap:8px;padding:10px;margin:8px 0}
 .progress-card b{font-size:12px}
}

/* General mobile spacing: keep 44 px touch targets and the iPhone safe area. */
html{scroll-padding-bottom:calc(90px + var(--keyboard-inset,0px))}
.keyboard-done[hidden]{display:none}
.keyboard-done{position:fixed;right:12px;bottom:calc(var(--keyboard-inset,0px) + 6px);z-index:100;min-width:76px;min-height:44px;background:#ffb35f;color:#21180f;border:1px solid #ffc883;border-radius:12px;font-weight:700}
@media(max-width:780px){
 .center{padding-bottom:calc(88px + env(safe-area-inset-bottom) + var(--keyboard-inset,0px))}
 .top{height:56px}
 .page-head{padding-top:16px;margin-bottom:16px}
 .page-head h1{font-size:30px}
 .back-link{min-height:44px;padding:8px 0}
 .section-title{margin-top:16px;margin-bottom:12px}
 .mobile-tabs{padding:4px 4px max(4px,env(safe-area-inset-bottom))}
 .mobile-tabs button{min-height:48px;padding:5px 0;gap:3px;font-size:11px}
 .mobile-tabs .icon{width:18px;height:18px}
 .save-status{position:sticky;top:0;z-index:21;background:#0e1012;padding:7px 0;min-height:30px}
 .run-step:not(.focus) .run-step-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:center}
 .run-step:not(.focus) .run-step-body b{margin:0}
 .run-coach-details>summary span{font-size:11px}
 .archive-day-title{font-size:14px}
 .day-group{padding-bottom:8px}
 .day-row{padding-top:10px;padding-bottom:10px}
 .day-action,.icon-button,.close{min-width:44px;min-height:44px}
 input,textarea,select{scroll-margin-top:80px;scroll-margin-bottom:100px}
 .modal{max-height:calc(var(--visual-height,100dvh) - 24px);overflow-y:auto;padding-bottom:64px}
 .modal input,.modal textarea,.modal select{font-size:16px}
 .keyboard-open .mobile-tabs{display:none}
 .keyboard-open .modal-wrap{top:var(--visual-top,0px);height:var(--visual-height,100dvh);bottom:auto}
 .keyboard-open .coach-shell{height:calc(var(--visual-height,100dvh) - 66px)}
 .keyboard-open .composer{margin-bottom:54px}
 .toast{bottom:calc(65px + env(safe-area-inset-bottom) + var(--keyboard-inset,0px))}
}

/* Account gate: public information lives on /om, /privacy and /terms. */
body.auth-required .sidebar,body.auth-required .right-rail,body.auth-required #mobileNav,body.auth-required .top{display:none!important}body.auth-required .app{display:block}body.auth-required .center{margin:0 auto;max-width:700px}body.auth-required #content{padding-bottom:24px}
[data-plan-drag]{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;touch-action:pan-y}
.plan-drag-source{opacity:.25}.plan-drag-ghost{position:fixed!important;z-index:10000;pointer-events:none;transform:scale(.94);background:#202328;border:1px solid #ff962c;border-radius:16px;box-shadow:0 16px 40px #0009;opacity:.97}.day-group.plan-drop-active{outline:2px solid #ff962c;outline-offset:3px}.plan-session>[data-plan-match]{flex-basis:100%}.plan-session{flex-wrap:wrap}
