:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:light;--canvas:#f2f2f7;--card:#fff;--ink:#14161d;--muted:#757985;--line:rgba(20,22,29,.07);--blue:#0045d1;--soft:#edf2ff;--stage:#e8ebf0;--shadow:0 26px 80px #19234725}
*{box-sizing:border-box}body{margin:0;background:var(--stage);color:var(--ink);font-size:15px}body.dark{color-scheme:dark;--canvas:#101115;--card:#1c1d24;--ink:#f5f6fa;--muted:#a4a7b4;--line:#ffffff0d;--blue:#4887ff;--soft:#4887ff16;--stage:#0c0f17;--shadow:0 26px 80px #0008}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;background:none;color:var(--blue);touch-action:manipulation}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible{outline:2px solid var(--blue);outline-offset:4px}input,select,textarea{min-width:0;color:var(--ink);background:var(--canvas);border:1px solid transparent;border-radius:12px;padding:12px;width:100%;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--blue)}textarea{resize:vertical;min-height:100px}input[type=checkbox]{accent-color:var(--blue);width:20px;height:20px}input[type=range]{accent-color:var(--blue);padding:0}h1,h2,h3,p{margin:0}p{line-height:1.55}svg.icon{width:22px;height:22px;vertical-align:middle;flex-shrink:0}small,.muted{color:var(--muted);font-size:12px;line-height:1.5}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 32px;border-bottom:1px solid var(--line)}.preview-toolbar strong{font-size:14px;letter-spacing:2px}.preview-toolbar span{font-size:12px;color:var(--muted);margin-left:18px}.preview-controls{display:flex;gap:10px}.preview-controls button{color:var(--ink);font-size:12px;border:1px solid var(--line);padding:8px 12px;border-radius:8px}.preview-stage{display:flex;align-items:center;justify-content:center;gap:70px;padding:26px;min-height:calc(100vh - 77px)}.preview-guide{max-width:300px}.eyebrow{font-size:10px;letter-spacing:1.6px;color:var(--blue);font-weight:700}.preview-guide h1{font-size:38px;letter-spacing:-1.8px;line-height:1.12;margin:18px 0}.preview-guide p{color:var(--muted);font-size:14px}.guide-note{font-size:12px;line-height:1.65;margin:24px 0;padding:16px;border:1px solid var(--line);border-radius:16px;color:var(--muted)}.phone{width:402px;height:min(850px,calc(100vh - 120px));min-height:550px;background:var(--canvas);border:8px solid #15161b;border-radius:48px;box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;position:relative;flex-shrink:0}.phone-status{display:flex;align-items:center;justify-content:space-between;height:46px;padding:0 22px;flex-shrink:0;font-size:11px;position:relative}.island{position:absolute;width:110px;height:27px;background:#080809;border-radius:20px;left:calc(50% - 55px);top:7px}.app-header{display:flex;align-items:center;justify-content:space-between;padding:0 12px;height:48px;flex-shrink:0;font-weight:600;font-size:16px}.icon-button{width:44px;height:44px;padding:10px;flex-shrink:0;display:grid;place-items:center}.logo{background:#000;border-radius:10px;width:176px;height:32px;overflow:hidden;display:flex;align-items:center;justify-content:center}.logo img{width:156px;height:52px;object-fit:contain;flex-shrink:0}#app-content{flex:1;overflow:auto;scrollbar-width:thin;padding:8px 20px 24px;outline:none}#tabbar{display:flex;justify-content:space-around;padding:10px 4px 3px;border-top:1px solid var(--line);background:var(--card);flex-shrink:0}#tabbar button{font-size:10px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:5px;width:25%;padding:0}#tabbar button.active{color:var(--blue);font-weight:600}.home-indicator{height:20px;position:relative;background:var(--card);flex-shrink:0}.home-indicator:after{content:"";width:110px;height:4px;background:var(--ink);position:absolute;bottom:6px;left:calc(50% - 55px);border-radius:4px}.heading{margin:4px 0 24px}.heading h1{font-size:31px;letter-spacing:-1.3px;font-weight:750;line-height:1.15;margin-bottom:8px}.heading p{font-size:13px;color:var(--muted)}.card{padding:20px;border:1px solid var(--line);background:var(--card);border-radius:24px;margin:0 0 16px}.card>*+*{margin-top:14px}.card h2{font-size:20px;letter-spacing:-.5px}.card h3,.section-title{font-size:16px;font-weight:650}.section-title{display:flex;justify-content:space-between;align-items:center;margin:24px 0 12px}.section-title small{font-weight:400;font-size:11px}.primary{display:flex;justify-content:space-between;align-items:center;width:100%;padding:15px 16px;border-radius:16px;background:var(--blue);color:white;font-weight:600;text-align:left;font-size:13px;gap:12px}.primary .icon{width:18px;height:18px}.route{display:flex;align-items:center;gap:12px;width:100%;padding:0;text-align:left;color:var(--ink)}.route-icon{color:var(--blue);background:var(--soft);width:42px;height:42px;border-radius:13px;display:grid;place-items:center;flex-shrink:0}.route-copy{flex:1}.route-copy b{font-size:13px;font-weight:600;display:block}.route-copy small{display:block;margin-top:4px;font-size:11px}.chevron{color:var(--muted);font-size:18px}hr{border:0;border-top:1px solid var(--line);margin:16px 0}.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.row.top{align-items:flex-start}.row label{font-size:13px}.row input[type=number],.row input[type=text]{width:112px;text-align:right}.stack{display:grid;gap:12px}.blue{color:var(--blue)}.badge{font-size:10px;font-weight:600;display:inline-flex;gap:5px;align-items:center;border-radius:20px;color:var(--blue);background:var(--soft);padding:6px 10px}.metrics{display:flex;gap:20px}.metric{flex:1}.metric b{display:block;font-size:25px;letter-spacing:-.8px;margin-bottom:4px;font-variant-numeric:tabular-nums}.metric small{font-size:11px}.progress{height:7px;border-radius:9px;background:var(--line);overflow:hidden}.progress>span{height:100%;background:var(--blue);display:block;border-radius:9px}.workout-title{font-size:14px;font-weight:600}.workout-sub{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.45}.big{font-size:43px;font-weight:750;letter-spacing:-1.6px;font-variant-numeric:tabular-nums}.pills{display:flex;gap:8px;overflow:auto;padding-bottom:3px}.pill{padding:10px 12px;border-radius:12px;background:var(--canvas);font-size:12px;color:var(--ink);white-space:nowrap}.pill.selected{color:var(--blue);background:var(--soft);box-shadow:inset 0 0 0 1px var(--blue)}.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.choice-grid .pill{white-space:normal;min-height:43px;text-align:left}.week{display:flex;gap:6px;justify-content:space-between}.week button{border-radius:14px;padding:10px 4px;min-width:34px;color:var(--muted);font-size:10px}.week b{display:block;font-size:15px;margin-top:6px;color:var(--ink)}.week button.active{background:var(--blue);color:#fffc}.week button.active b{color:#fff}.avatar{width:64px;height:64px;display:grid;place-items:center;border-radius:50%;background:var(--soft);color:var(--blue);font-size:28px;font-weight:600;flex-shrink:0}.form-label{display:grid;gap:7px;font-size:12px}.form-error{color:#c33b4c;font-size:12px;line-height:1.5}.demo-label{font-size:10px;letter-spacing:.5px;color:var(--muted);text-transform:uppercase}.danger{color:#c33b4c}.text-button{padding:4px 0;text-align:left;font-size:12px}.empty{color:var(--muted);font-size:13px;padding:8px 0}details>summary{cursor:pointer;font-size:13px;font-weight:550}details[open]>summary{margin-bottom:14px}dialog{width:min(430px,calc(100vw - 32px));max-height:90vh;padding:0;border:1px solid var(--line);border-radius:28px;background:var(--canvas);color:var(--ink);box-shadow:var(--shadow)}dialog::backdrop{background:#0a102c60;backdrop-filter:blur(4px)}.sheet-header{position:sticky;top:0;background:var(--canvas);padding:12px 12px 12px 22px;display:flex;align-items:center;justify-content:space-between;z-index:2;border-bottom:1px solid var(--line)}.sheet-header h2{font-size:16px}#sheet-content{padding:20px}#sheet-content .card:last-child{margin-bottom:0}.sheet-footer{position:sticky;bottom:0;background:var(--canvas);padding:14px 0 0;margin-top:18px;border-top:1px solid var(--line)}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:var(--card);padding:13px 20px;border-radius:16px;font-size:13px;box-shadow:var(--shadow);z-index:50;opacity:0;pointer-events:none;transition:opacity .2s;max-width:90vw}#toast.visible{opacity:1}.info-seen{opacity:.3}@media(max-width:900px){.preview-guide{display:none}.preview-stage{padding:18px}.preview-toolbar{padding:14px 18px}.preview-toolbar span{display:block;margin:5px 0 0;font-size:10px}.preview-controls{gap:6px}.preview-controls button{font-size:10px;padding:8px}.phone{height:calc(100vh - 116px);min-height:480px;max-width:100%}}@media(max-width:430px){.preview-stage{padding:0}.phone{border:0;border-radius:0;width:100%;height:calc(100vh - 73px);box-shadow:none}.preview-toolbar{padding:10px 14px}.preview-toolbar span{font-size:9px}.preview-controls button{padding:7px;font-size:9px}}
/* Entire overview cards are interactive, including their metrics. */
#sheet:has(#ride-dashboard)[open]{display:flex;flex-direction:column;height:min(850px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);overflow:hidden}
#sheet:has(#ride-dashboard) .sheet-header{flex-shrink:0;padding-top:8px;padding-bottom:8px}
#sheet:has(#ride-dashboard) #sheet-content{flex:1;min-height:0;overflow:hidden;padding:10px 18px}
#sheet #ride-dashboard{position:relative;height:100%;min-height:0;container-type:size;display:grid;gap:3px;grid-template-rows:16px 16px minmax(0,1.4fr) 8px minmax(52px,.95fr) 16px minmax(0,1fr) 6px 14px 22px minmax(0,1.65fr) auto}
#sheet .ride-info{font-size:9px;line-height:16px;z-index:5;margin:0;align-self:center}
#sheet .ride-info>summary{font-size:9px;font-weight:500;line-height:16px;color:var(--blue);list-style:none;margin:0}
#sheet .ride-info>p{position:absolute;top:22px;left:0;right:0;background:var(--card);padding:16px;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);font-size:12px}
#sheet .ride-caption{font-size:12px;line-height:16px}
#sheet .ride-power{min-height:0;align-items:center;justify-content:center;line-height:1}
#sheet .ride-power strong{font-size:clamp(32px,12cqh,82px);line-height:1}
#sheet .ride-gauge{margin:0;align-self:center}
#sheet .ride-target{margin:0;min-height:0}
#sheet .ride-target>div{gap:0;line-height:1.1}
#sheet .ride-target b{font-size:clamp(18px,4cqh,26px)}
#sheet .ride-target small{font-size:9px;line-height:12px}
#sheet .ride-target>button{width:44px;height:44px}
#sheet #ride-phase{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:16px}
#sheet .ride-countdown{font-size:clamp(26px,8cqh,54px);line-height:1;margin:0;display:grid;place-items:center}
#sheet .ride-dashboard>.progress{margin:0;height:6px}
#sheet #ride-next-title{font-size:10px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sheet #ride-next{font-size:16px;line-height:22px;margin:0}
#sheet .ride-metrics{min-height:0;gap:3px;margin:0;align-content:stretch}
#sheet .ride-metrics>div{gap:1px;align-content:center;min-height:0}
#sheet .ride-metrics small{font-size:10px;line-height:12px}
#sheet .ride-metrics b{font-size:clamp(18px,4cqh,28px);line-height:1.1}
#sheet .ride-dock{position:static;margin:0;padding:6px 0 0;min-height:0}
#sheet .ride-profile{margin:0 0 4px}
#sheet .ride-profile .indoor-chart{height:48px}
#sheet .ride-controls{margin-top:6px}
#sheet .ride-controls>button{width:44px;height:44px;font-size:22px}
#sheet .ride-controls>.ride-toggle{width:54px;height:54px;font-size:24px}
.ride-dashboard{text-align:center}.ride-dashboard>.badge{margin-bottom:16px}.ride-caption{font-size:14px}.ride-power{display:flex;align-items:baseline;justify-content:center;gap:8px}.ride-power strong{font-size:82px;font-weight:650;letter-spacing:-3px;font-variant-numeric:tabular-nums}.ride-power>span{font-size:21px;color:var(--muted)}
.ride-gauge{height:8px;border-radius:10px;background:var(--line);position:relative;margin:14px 0}.ride-gauge>span{height:100%;background:var(--blue);display:block;border-radius:10px}.ride-gauge>i{position:absolute;left:80%;top:-5px;height:18px;width:2px;background:var(--ink)}
.ride-target{display:flex;align-items:center;justify-content:space-around;margin:20px 0}.ride-target>div{display:grid;gap:4px}.ride-target b{font-size:26px}.ride-target>button,.ride-controls>button{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:var(--card);border:1px solid var(--line);font-size:24px}
.ride-countdown{font-size:54px;font-weight:650;letter-spacing:-1px;font-variant-numeric:tabular-nums;margin:12px 0}.ride-dashboard>.progress{margin:12px 0}.ride-dashboard h3{margin:6px 0 22px;font-size:20px}
.ride-metrics{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:24px 0}.ride-metrics>div{display:grid;gap:8px}.ride-metrics b{font-size:29px;color:var(--blue);font-weight:600}.ride-metrics em{font-size:11px;font-style:normal;color:var(--muted)}
.ride-dock{position:sticky;bottom:0;background:var(--canvas);padding:12px 0 8px;border-top:1px solid var(--line);z-index:3}.ride-profile{position:relative;margin-bottom:7px}.ride-marker{position:absolute;top:-4px;bottom:-3px;width:3px;left:0;background:var(--ink);box-shadow:0 0 3px var(--canvas);transform:translateX(-2px);pointer-events:none}.ride-controls{display:flex;align-items:center;justify-content:center;gap:26px;margin-top:12px}.ride-controls>.ride-toggle{width:68px;height:68px;background:var(--blue);color:#fff;border:0;font-size:25px}
.indoor-chart{display:flex;align-items:flex-end;gap:1px;height:76px;overflow:hidden;border-radius:10px}
.indoor-chart>span{min-width:0;display:block}
#app-content{min-height:0;scroll-padding-bottom:24px;padding-bottom:32px}
#app-content>:not(:has(input,textarea,select,.pills,.week,[contenteditable])){touch-action:pan-y pinch-zoom}
#tabbar{flex-shrink:0}
.home-welcome{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 24px}
.home-welcome>div{min-width:0}.home-welcome p{color:var(--muted);font-size:18px;font-weight:500;margin-bottom:5px}
.home-welcome h1{font-size:30px;line-height:1.15;letter-spacing:-1px;overflow-wrap:anywhere;margin-bottom:9px}
.home-avatar{width:62px;height:62px;border-radius:50%;flex-shrink:0;background:var(--soft);border:2px solid var(--blue);font-size:20px;font-weight:650;display:grid;place-items:center}
#tabbar{align-items:flex-end;padding:10px 8px 4px;gap:4px}
#tabbar button{min-height:72px;justify-content:flex-end;gap:5px}
#tabbar .tab-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;transition:width .25s ease,height .25s ease,background .25s ease,box-shadow .25s ease}
#tabbar .tab-icon .icon{width:21px;height:21px;transition:width .25s ease,height .25s ease}
#tabbar button.active .tab-icon{width:50px;height:50px;background:var(--blue);color:#fff;box-shadow:0 4px 12px var(--soft)}
#tabbar button.active .icon{width:25px;height:25px}
@media(prefers-reduced-motion:reduce){#tabbar .tab-icon,#tabbar .tab-icon .icon{transition:none}}
.food-search-label{font-size:16px;font-weight:650;gap:12px}
.food-search-box{display:flex;align-items:center;gap:12px;min-height:58px;padding:0 16px;background:var(--soft);border:1.5px solid var(--blue);border-radius:16px;color:var(--blue)}
.food-search-box:focus-within{box-shadow:0 0 0 2px var(--blue)}
.food-search-box input{background:transparent;border:0;padding:16px 0;font-size:16px;outline:none;color:var(--ink)}
.food-search-box input::placeholder{color:var(--muted);opacity:1}
.dashboard-card{display:block;width:100%;padding:0;border:0;background:none;color:inherit;text-align:left;font:inherit;cursor:pointer;border-radius:24px}
.dashboard-card:focus-visible{outline:3px solid var(--accent,#0066ff);outline-offset:4px}
.dashboard-card{transition:transform .18s ease-out,opacity .18s ease-out}
.dashboard-card:active{opacity:.86;transform:scale(.98)}
#app-content .route{transition:transform .18s ease-out,opacity .18s ease-out}
#app-content .route:active{opacity:.86;transform:scale(.98)}
@media(prefers-reduced-motion:reduce){.dashboard-card,#app-content .route{transition:none}.dashboard-card:active,#app-content .route:active{transform:none}}
