html{background:#f5f7f8}:root{--bg:#f5f7f8;--surface:#fff;--surface-muted:#eef2f3;--border:#d7dfe2;--text:#182126;--muted:#66757d;--accent:#1f6f63;--accent-strong:#17564d;--danger:#b23b3b;--danger-soft:#f8e8e8;--heart-rate:#ff3b30;--notice:#154f92;--diagram-bg:#f2f2f7;--pace-sprint:#e84d3d;--pace-goal:#ff9e40;--pace-tempo:#ffd966;--pace-marathon:#b8c257;--pace-easy:#70ad47;--pace-recovery:#5c9bd6;--shadow:0 14px 36px #18212614}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);letter-spacing:0;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,select,textarea{font:inherit}button{border:0}button:focus-visible,summary:focus-visible{outline-offset:2px;outline:3px solid #1f6f6347}#root{min-height:100svh}.app-shell{flex-direction:column;min-height:100svh;display:flex}.nav-actions,.button-row,.form-actions,.row-actions{align-items:center;gap:8px;display:flex}.view-tabs{border-bottom:1px solid var(--border);background:var(--surface);align-items:center;gap:6px;min-height:64px;padding:10px clamp(18px,3vw,36px);display:flex}.app-mark{border-radius:9px;flex:none;width:42px;height:42px;margin-right:8px;overflow:hidden;box-shadow:0 6px 16px #1821261f}.app-mark img{width:100%;height:100%;display:block}.nav-actions{flex:none;margin-left:auto}.tab{height:38px;color:var(--muted);cursor:pointer;background:0 0;border-radius:6px;align-items:center;gap:8px;padding:0 14px;display:inline-flex}.tab.active{background:var(--surface-muted);color:var(--text)}.status-row{min-height:34px;color:var(--muted);align-items:center;gap:14px;padding:8px clamp(18px,3vw,36px);font-size:13px;display:flex}.status-row strong{color:var(--notice)}.status-row .error-copy,.field-error{color:var(--danger)}.loading-state{color:var(--muted);padding:32px clamp(18px,3vw,36px)}.home-page{flex:1;align-content:start;gap:22px;padding:0 clamp(18px,3vw,36px) 36px;display:grid}.home-header{justify-content:space-between;align-items:flex-end;gap:22px;min-width:0;display:flex}.home-header h1{letter-spacing:0;margin:5px 0 8px;font-size:clamp(28px,4vw,46px);line-height:1.04}.training-plan-title{align-items:center;gap:8px;min-width:0;display:flex}.training-plan-title h1{overflow-wrap:anywhere;min-width:0;margin:5px 0 8px}.context-menu{flex:none;position:relative}.context-menu>summary{width:38px;min-height:38px;color:var(--muted);cursor:pointer;border:1px solid #0000;border-radius:50%;place-items:center;list-style:none;display:grid}.context-menu>summary::-webkit-details-marker{display:none}.context-menu>summary:hover,.context-menu[open]>summary{border-color:var(--border);background:var(--surface);color:var(--text)}.context-menu-popover{z-index:20;border:1px solid var(--border);background:var(--surface);border-radius:9px;gap:2px;width:max-content;min-width:190px;padding:5px;display:grid;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 16px 38px #18212629}.context-menu-popover button{min-height:38px;color:var(--text);text-align:left;cursor:pointer;background:0 0;border-radius:6px;align-items:center;gap:8px;padding:8px 10px;display:flex}.context-menu-popover button:hover{background:var(--surface-muted)}.context-menu-popover button:disabled{cursor:not-allowed;opacity:.45}.context-menu-popover .danger-menu-item{color:var(--danger)}.plan-title-menu{margin-top:1px}.home-header p{max-width:660px;color:var(--muted);margin:0;font-size:15px;line-height:1.5}.home-kicker{color:var(--accent);text-transform:uppercase;font-size:12px;font-weight:800}.home-header-actions,.home-action-row{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.home-grid{grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);align-items:start;gap:16px;display:grid}.home-card{border:1px solid var(--border);background:var(--surface);min-width:0;box-shadow:var(--shadow);border-radius:8px;gap:16px;padding:20px;display:grid}.workout-home-card,.best-efforts-home-card{grid-column:span 1}.workout-home-title{gap:4px;display:grid}.workout-home-title strong{font-size:24px;line-height:1.15}.workout-home-title span,.home-list-row span,.best-effort-chip small{color:var(--muted);font-size:12px}.workout-structure-preview{gap:10px;display:grid}.workout-structure-bars{background:var(--diagram-bg);border-radius:8px;align-items:stretch;gap:3px;height:132px;padding:10px;display:flex;overflow:hidden}.workout-structure-segment{border-radius:5px;align-items:flex-end;min-width:16px;display:flex;overflow:hidden}.workout-structure-segment i{background:currentColor;border-radius:5px 5px 3px 3px;width:100%;min-height:12%}.tone-sprint{color:var(--pace-sprint)}.tone-goal{color:var(--pace-goal)}.tone-tempo{color:var(--pace-tempo)}.tone-marathon{color:var(--pace-marathon)}.tone-easy{color:var(--pace-easy)}.tone-recovery,.tone-zone1{color:var(--pace-recovery)}.tone-zone2{color:var(--pace-easy)}.tone-zone3{color:var(--pace-tempo)}.tone-zone4{color:var(--pace-goal)}.tone-zone5{color:var(--pace-sprint)}.workout-structure-legend{background:color-mix(in srgb, var(--diagram-bg) 82%, var(--surface));border-radius:8px;flex-wrap:wrap;gap:10px 22px;padding:10px 12px;display:flex}.workout-structure-legend span{align-items:center;gap:6px;min-height:22px;font-size:12px;font-weight:650;display:inline-flex}.workout-structure-legend span:before{content:"";background:var(--legend-color,currentColor);border-radius:50%;width:8px;height:8px}.create-workout-card{background:linear-gradient(135deg, #1f6f631a, #5b8def1a), var(--surface)}.create-workout-card h2{margin:0;font-size:22px}.create-workout-card p,.home-empty p{color:var(--muted);margin:0;line-height:1.5}.home-card-icon{width:42px;height:42px;color:var(--accent);background:#1f6f631f;border-radius:8px;place-items:center;display:grid}.home-list,.recent-workout-summary,.home-empty{gap:12px;display:grid}.home-list-row{border-bottom:1px solid var(--border);gap:3px;min-height:48px;padding-bottom:10px;display:grid}.home-list-row:last-child{border-bottom:0;padding-bottom:0}.recent-workout-summary>strong{font-size:18px}button.recent-workout-summary{width:100%;color:var(--text);text-align:left;cursor:pointer;background:0 0;padding:0}.mini-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.mini-metrics .metric{background:0 0;border:0;padding:0}.best-effort-strip{overscroll-behavior-x:contain;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;gap:10px;min-width:0;padding-bottom:4px;display:flex;overflow-x:auto}.best-effort-chip{border:1px solid color-mix(in srgb, var(--card-tint,var(--border)) 18%, var(--border));background:color-mix(in srgb, var(--card-tint,var(--surface-muted)) 11%, var(--surface));scroll-snap-align:start;border-radius:16px;flex:0 0 124px;align-content:start;gap:6px;width:124px;min-height:78px;padding:12px;display:grid}.best-effort-chip span{color:var(--card-tint,var(--muted));font-size:12px;font-weight:700;line-height:1.2}.best-effort-chip strong{font-variant-numeric:tabular-nums;font-size:18px;line-height:1.15}.best-effort-chip small{font-variant-numeric:tabular-nums;font-weight:650;line-height:1.25}.workspace-grid{flex:1;grid-template-columns:minmax(290px,340px) minmax(0,1fr);gap:0;min-height:0;display:grid}.plans-page{align-content:start;gap:20px;width:100%;max-width:1280px;margin:0 auto;padding:0 clamp(18px,3vw,36px) 40px;display:grid}.plans-page-header{min-width:0}.plans-page-header .training-plan-title h1{font-size:clamp(28px,4vw,42px);line-height:1.05}.plan-editing-layout{grid-template-columns:minmax(280px,340px) minmax(0,1fr);align-items:start;gap:20px;min-width:0;display:grid}.workout-picker-trigger{display:none}.workout-picker{border:1px solid var(--border);background:color-mix(in srgb, var(--surface-muted) 55%, var(--surface));border-radius:12px;min-width:0;padding:14px}.current-selection-card{background:var(--surface-muted);border-radius:10px;gap:4px;padding:14px;display:grid}.current-selection-card span,.selection-list-label{color:var(--muted);letter-spacing:.06em;text-transform:uppercase;font-size:11px;font-weight:750}.current-selection-card strong{font-size:16px}.current-selection-card small,.selection-row small,.planned-workout-row small{color:var(--muted);font-size:12px;line-height:1.35}.compact-card{background:var(--surface);margin-bottom:16px}.workout-picker-heading{justify-content:space-between;align-items:center;gap:12px;padding:0 4px 8px 8px;display:flex}.workout-picker-heading>div{align-items:baseline;gap:8px;display:flex}.workout-picker-heading h2{margin:0;font-size:16px}.workout-picker-heading span{color:var(--muted);font-size:12px}.planned-workout-list{gap:4px;display:grid}.planned-workout-row{border:1px solid #0000;border-radius:9px;align-items:center;gap:2px;min-width:0;min-height:62px;display:flex}.planned-workout-row:hover,.planned-workout-row.editing{border-color:var(--border);background:var(--surface)}.planned-workout-select{min-width:0;color:var(--text);text-align:left;cursor:pointer;background:0 0;flex:1;align-items:flex-start;gap:10px;padding:10px;display:flex}.planned-workout-select>svg{color:var(--accent);flex:none;margin-top:1px}.planned-workout-select>span{gap:3px;min-width:0;display:grid}.planned-workout-select strong,.planned-workout-select small{overflow-wrap:anywhere}.row-context-menu>summary,.editor-context-menu>summary{width:36px;min-height:36px}.workout-editor{min-width:0}.workout-editor-shell{border:1px solid var(--border);background:var(--surface);min-width:0;box-shadow:var(--shadow);border-radius:12px;overflow:visible}.workout-editor-form{gap:16px;display:grid}.workout-editor-toolbar{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:14px;min-width:0;padding:16px 18px;display:flex}.workout-editor-toolbar>div:first-child{min-width:0}.workout-editor-toolbar span{color:var(--muted);font-size:12px}.workout-editor-toolbar h2{margin:2px 0 0;font-size:18px}.workout-editor-actions{align-items:center;gap:8px;display:flex}.workout-editor-form>:not(.workout-editor-toolbar){margin-inline:18px}.workout-editor-form>:last-child{margin-bottom:20px}.workout-name-field{max-width:520px}.workout-editor-form .workout-builder-preview{border:0;margin-top:2px;padding:0}.workout-editor-form .workout-builder-preview .workout-structure-bars{height:132px}.text-button,.danger-text-button{min-height:38px;color:var(--accent);cursor:pointer;background:0 0;border-radius:6px;align-items:center;gap:6px;padding:0 8px;display:inline-flex}.text-button:hover,.danger-text-button:hover{background:var(--surface-muted)}.danger-text-button{color:var(--danger)}.editor-disclosure{border-top:1px solid var(--border)}.editor-disclosure>summary{cursor:pointer;justify-content:space-between;align-items:center;gap:12px;min-height:56px;padding:10px 2px;list-style:none;display:flex}.editor-disclosure>summary::-webkit-details-marker{display:none}.editor-disclosure>summary>span{gap:2px;display:grid}.editor-disclosure>summary strong{color:var(--text);font-size:14px}.editor-disclosure>summary small{color:var(--muted);font-size:12px}.editor-disclosure[open]>summary>svg{transform:rotate(180deg)}.disclosure-content{padding-bottom:16px}.advanced-editor{padding-top:0}.advanced-editor .json-field{padding-bottom:16px}.segment-row{background:var(--surface);padding:12px 12px 12px 16px;position:relative;overflow:visible}.segment-row:before{content:"";background:var(--pace-goal);border-radius:0 3px 3px 0;width:4px;position:absolute;inset:8px auto 8px 0}.segment-row[data-role=warmup]:before,.segment-row[data-role=cooldown]:before{background:var(--pace-easy)}.segment-row[data-role=recovery]:before,.segment-row[data-role=rest]:before{background:var(--pace-recovery)}.segment-identity{flex:1;align-items:center;gap:8px;min-width:0;display:flex}.segment-role-control,.segment-name-control{min-height:34px}.segment-role-control{background:var(--surface-muted);width:auto;max-width:142px;color:var(--text);border-color:#0000;font-weight:700}.segment-name-control{border-color:#0000;min-width:0}.segment-name-control:hover,.segment-name-control:focus{border-color:var(--border)}.segment-value-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.segment-value-token{border:1px solid color-mix(in srgb, var(--accent) 22%, var(--border));background:color-mix(in srgb, var(--accent) 7%, var(--surface));border-radius:8px;gap:6px;min-width:0;padding:9px 10px;display:grid}.segment-value-token>span{color:var(--muted);font-size:11px;font-weight:700}.segment-token-controls{grid-template-columns:minmax(86px,1.1fr) minmax(58px,.7fr) minmax(54px,.55fr);align-items:center;gap:6px;min-width:0;display:grid}.segment-token-controls.target-controls{grid-template-columns:minmax(82px,.8fr) minmax(100px,1.2fr)}.segment-token-controls input,.segment-token-controls select{background:var(--surface);min-width:0;min-height:34px;padding-inline:7px;font-size:12px}.segment-control-unit{color:var(--muted);font-size:12px}.workout-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.modal-backdrop{z-index:100;background:#1821265c;place-items:center;padding:40px 18px;display:grid;position:fixed;inset:0}.plan-panel{border:1px solid var(--border);background:var(--surface);border-radius:14px;width:min(100%,560px);max-height:min(760px,100svh - 80px);overflow:auto;box-shadow:0 28px 70px #18212640}.plan-panel-header{z-index:2;border-bottom:1px solid var(--border);background:color-mix(in srgb, var(--surface) 94%, transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);grid-template-columns:1fr auto 1fr;align-items:center;min-height:58px;padding:8px 12px;display:grid;position:sticky;top:0}.plan-panel-header h2{margin:0;font-size:16px}.plan-panel-header>:last-child{min-width:52px}.plan-panel-header .text-button{justify-self:start}.plan-panel-content{padding:18px}.plan-selection,.plan-settings-editor{gap:18px;display:grid}.selection-list{gap:4px;display:grid}.selection-list-label{padding:0 10px 5px}.selection-row{width:100%;min-height:58px;color:var(--text);text-align:left;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:9px;align-items:center;gap:10px;padding:10px;display:flex}.selection-row:hover,.selection-row.active{border-color:var(--border);background:var(--surface-muted)}.selection-row>svg{color:var(--accent)}.selection-row>span{gap:3px;display:grid}.plan-create-form{border-top:1px solid var(--border);gap:14px;padding-top:18px;display:grid}.plan-create-form h3{margin:0;font-size:15px}.plan-create-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.plan-create-trigger{justify-self:start}.settings-section{border:1px solid var(--border);border-radius:9px;margin:0;padding:14px}.settings-section legend{padding:0 5px;font-size:13px;font-weight:700}.plan-settings-editor>.danger-text-button{justify-self:start}.history-workspace{overflow:hidden}.rail{border-right:1px solid var(--border);min-width:0;padding:0 18px 24px clamp(18px,3vw,36px)}.rail-header,.section-heading{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.rail-header{margin-bottom:14px}.rail-header h2,.section-heading h2,.section-heading h3,.empty-state h2{margin:0;font-size:18px;line-height:1.25}.rail-header span,.section-heading span{color:var(--muted);font-size:13px}.rail-list{gap:8px;margin-bottom:20px;display:grid}.rail-item{text-align:left;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:8px;gap:2px;width:100%;min-height:58px;padding:10px 12px;display:grid}.rail-item strong,.list-row strong{font-size:14px}.rail-item span,.list-row span{color:var(--muted);font-size:12px}.rail-item:hover,.rail-item.active{border-color:var(--border);background:var(--surface)}.workspace-main{align-content:start;gap:24px;min-width:0;padding:0 clamp(18px,3vw,36px) 32px;display:grid}.history-detail-nav{display:none}.editor-band,.inline-editor,.empty-state{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:20px}.history-detail{gap:22px;display:grid}.completed-workout-page{gap:18px;display:grid}.completed-workout-hero{border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow);border-radius:8px;justify-content:space-between;align-items:flex-start;gap:18px;padding:22px;display:flex}.completed-workout-hero h2{margin:0 0 6px;font-size:28px;line-height:1.12}.completed-workout-hero span,.completed-workout-status{color:var(--muted);font-size:13px}.completed-workout-status{background:var(--surface-muted);white-space:nowrap;border-radius:6px;min-height:30px;padding:6px 10px}.analysis-tabs{border:1px solid var(--border);background:var(--surface);border-radius:8px;gap:4px;padding:4px;display:flex}.analysis-tab{min-height:38px;color:var(--muted);cursor:pointer;background:0 0;border-radius:6px;padding:0 14px;font-weight:650}.analysis-tab.active{background:var(--surface-muted);color:var(--text)}.analysis-panel{gap:18px;display:grid}.analysis-controls{border:1px solid var(--border);background:var(--surface);border-radius:8px;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:4px;padding:4px;display:flex}.analysis-toggle{min-height:38px;color:var(--muted);cursor:pointer;border-radius:6px;align-items:center;gap:8px;padding:0 12px;font-weight:650;display:inline-flex}.analysis-toggle:has(input:checked){background:var(--surface-muted);color:var(--text)}.analysis-toggle:has(input:disabled){cursor:not-allowed;opacity:.55}.analysis-toggle input{width:16px;min-height:16px}.completed-workout-controls{justify-content:space-between}.completed-workout-controls>span{color:var(--muted);padding:0 10px;font-size:12px;font-weight:650}.history-metrics{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;display:grid}.metric{border:1px solid var(--border);background:var(--surface);border-radius:8px;gap:4px;min-width:0;padding:14px;display:grid}.metric-tinted{border-color:color-mix(in srgb, var(--card-tint) 18%, var(--border));background:color-mix(in srgb, var(--card-tint) 10%, var(--surface))}.metric span{color:var(--muted);font-size:12px}.metric strong{font-variant-numeric:tabular-nums;font-size:18px}.history-subsection{gap:10px;display:grid}.heart-rate-zones{border:1px solid var(--border);background:var(--surface);border-radius:8px;gap:12px;padding:16px;display:grid}.heart-rate-zones-heading{justify-content:space-between;align-items:baseline;gap:16px;display:flex}.heart-rate-zones-heading h3{align-items:center;gap:8px;margin:0;font-size:15px;display:inline-flex}.heart-rate-zones-heading strong{white-space:nowrap;font-size:12px}.heart-rate-zone-bar{background:var(--surface-muted);border-radius:5px;gap:2px;height:10px;display:flex;overflow:hidden}.heart-rate-zone-bar span{background:var(--zone-color);border-radius:5px;flex-basis:0;min-width:2px}.heart-rate-zone-legend{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;display:grid}.heart-rate-zone-chip{border:1px solid color-mix(in srgb, var(--zone-color) 20%, transparent);background:color-mix(in srgb, var(--zone-color) 10%, transparent);border-radius:8px;align-content:start;gap:4px;min-width:0;min-height:76px;padding:8px;display:grid}.heart-rate-zone-chip>strong{font-variant-numeric:tabular-nums;font-size:15px}.heart-rate-zone-chip>span{min-width:0;color:var(--muted);overflow-wrap:anywhere;font-size:11px;line-height:1.25}.heart-rate-zone-label{align-items:center;gap:5px;font-weight:700;display:flex}.heart-rate-zone-label i{background:var(--zone-color);border-radius:50%;flex:none;width:7px;height:7px}.telemetry-figure,.workout-map-figure{gap:8px;margin:0;display:grid}.telemetry-figure figcaption,.workout-map-figure figcaption{justify-content:space-between;gap:12px;font-size:13px;display:flex}.telemetry-figure figcaption span,.workout-map-figure figcaption span{color:var(--muted);text-align:right}.telemetry-stats{grid-template-columns:repeat(3,minmax(42px,auto));gap:12px;margin:0;display:grid}.telemetry-stats>div{justify-items:center;gap:1px;display:grid}.telemetry-stats dt{color:var(--muted);font-size:12px}.telemetry-stats dd{color:var(--heart-rate);font-variant-numeric:tabular-nums;margin:0;font-size:14px;font-weight:650}.telemetry-legend{background:color-mix(in srgb, var(--diagram-bg) 82%, var(--surface));color:var(--muted);border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px 18px;padding:10px 12px;font-size:12px;font-weight:650;display:flex}.telemetry-legend span{align-items:center;gap:6px;display:inline-flex}.telemetry-legend span:before{content:"";background:var(--zone-color,currentColor);border-radius:50%;width:8px;height:8px}.telemetry-legend .heart-rate-line-legend{color:var(--heart-rate)}.heart-rate-chart-legend span:not(.heart-rate-line-legend):before{opacity:.2}.workout-map-shell{border:1px solid var(--border);background:var(--surface-muted);border-radius:8px;min-height:280px;position:relative;overflow:hidden}.workout-map{position:absolute;inset:0}.workout-map-loading{background:color-mix(in srgb, var(--surface-muted) 78%, transparent);color:var(--muted);place-items:center;font-size:13px;font-weight:700;display:grid;position:absolute;inset:0}.route-preview,.heart-rate-preview{background:var(--surface-muted);border-radius:8px;width:100%;display:block}.route-preview{min-height:180px}.route-preview path{fill:none;stroke:var(--accent);stroke-linecap:round;stroke-linejoin:round;stroke-width:3px}.route-start{fill:var(--accent)}.route-end{fill:var(--text)}.heart-rate-preview{min-height:140px}.segment-performance-card,.performance-table-card,.details-card,.analysis-empty{border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow);border-radius:8px;gap:14px;padding:18px;display:grid}.segment-performance-chart{background:var(--diagram-bg);border-radius:8px;min-height:190px;position:relative;overflow:hidden}.segment-performance-bars{align-items:stretch;gap:3px;display:flex;position:absolute;inset:10px}.segment-performance-block{opacity:.8;border-radius:5px;align-items:flex-end;min-width:14px;display:flex;overflow:hidden}.segment-performance-block i{background:currentColor;border-radius:5px 5px 2px 2px;width:100%;min-height:12%}.actual-pace-overlay,.actual-heart-rate-overlay{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.actual-pace-overlay path{fill:none;stroke:#111820;stroke-linecap:round;stroke-linejoin:round;stroke-width:3px;filter:drop-shadow(0 1px #ffffffbf)}.actual-heart-rate-overlay path{fill:none;stroke:#ff3b30;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;opacity:.86}.performance-table{display:grid;overflow-x:auto}.performance-table-row{border-bottom:1px solid var(--border);grid-template-columns:minmax(110px,1fr) minmax(180px,1.55fr) minmax(88px,.7fr);align-items:center;gap:12px;min-width:420px;min-height:46px;padding:0 10px;display:grid}.performance-table-with-distance .performance-table-row{grid-template-columns:minmax(110px,1fr) minmax(82px,.65fr) minmax(180px,1.45fr) minmax(88px,.7fr);min-width:520px}.performance-table-row:last-child{border-bottom:0}.performance-table-row.header{min-height:34px;color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:800}.performance-table-row strong{font-size:13px}.performance-table-row span{color:var(--muted);font-size:13px}.pace-performance-cell{background:var(--surface-muted);border-radius:8px;justify-content:flex-start;align-items:center;min-height:30px;padding:6px 10px;display:flex;position:relative;overflow:hidden;color:var(--text)!important}.pace-performance-cell i{width:var(--pace-bar-width);background:color-mix(in srgb, var(--card-tint) 48%, var(--surface));border-radius:6px;position:absolute;inset:4px auto 4px 4px}.pace-performance-cell strong{z-index:1;font-variant-numeric:tabular-nums;font-size:13px;line-height:1;position:relative}.analysis-empty{align-content:center;min-height:140px}.analysis-empty strong{font-size:16px}.analysis-empty p{color:var(--muted);margin:0;line-height:1.5}.details-card{gap:16px;display:grid}.details-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;display:grid}.detail-item{background:var(--surface-muted);border-radius:8px;align-content:center;gap:3px;min-width:0;min-height:58px;padding:10px 12px;display:grid}.detail-item span{color:var(--muted);text-transform:uppercase;font-size:11px;font-weight:750}.detail-item strong{overflow-wrap:anywhere;min-width:0;font-size:13px}.heart-rate-fill{fill:none}.heart-rate-zone-band{fill:var(--zone-color);opacity:.2}.heart-rate-line{fill:none;stroke:var(--heart-rate);stroke-linecap:round;stroke-linejoin:round;stroke-width:3px}.heart-rate-chart-grid line{stroke:var(--border);stroke-width:1px}.heart-rate-chart-grid line:nth-child(n+5){stroke-dasharray:4 4}.heart-rate-chart-axis{fill:var(--muted);font-variant-numeric:tabular-nums;font-size:11px}.artifact-list{gap:10px;display:grid}.artifact-row{border:1px solid var(--border);background:var(--surface);border-radius:8px;justify-content:space-between;align-items:center;gap:12px;min-height:56px;padding:12px 14px;display:flex}.artifact-row div{gap:2px;min-width:0;display:grid}.artifact-row strong{font-size:14px}.artifact-row span{color:var(--muted);font-size:12px}.editor-band{box-shadow:var(--shadow)}.inline-editor{margin-top:20px}.workout-creator{box-shadow:var(--shadow);margin-top:0}.compact{align-items:center}.field-grid,.stack-form,.rail-form{gap:14px;display:grid}.field-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px}.rail-form{border-top:1px solid var(--border);padding-top:18px}.rail-form h3{margin:0;font-size:15px}.two-up,.rule-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}label{min-width:0;color:var(--muted);gap:6px;font-size:13px;display:grid}input,select,textarea{border:1px solid var(--border);background:var(--surface);width:100%;color:var(--text);border-radius:6px;outline:none}input,select{min-height:38px;padding:0 10px}textarea{resize:vertical;padding:10px;line-height:1.4}input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #1f6f631f}.primary-button,.secondary-button,.danger-button,.icon-button{cursor:pointer;border-radius:6px;justify-content:center;align-items:center;gap:8px;min-height:38px;display:inline-flex}.primary-button,.secondary-button,.danger-button{padding:0 12px}.primary-button{background:var(--accent);color:#fff}.primary-button:hover{background:var(--accent-strong)}.secondary-button{border:1px solid var(--border);background:var(--surface);color:var(--text);text-decoration:none}.danger-button{background:var(--danger-soft);color:var(--danger)}.icon-button{background:var(--surface);width:38px;color:var(--text);border:1px solid var(--border)}.icon-button.danger{color:var(--danger)}.primary-button:disabled,.secondary-button:disabled,.danger-button:disabled,.icon-button:disabled{cursor:not-allowed;opacity:.55}.workout-layout{grid-template-columns:minmax(290px,360px) minmax(0,1fr);gap:18px;display:grid}.workout-list,.workout-editor{min-width:0}.list-row{background:0 0;border:1px solid #0000;border-radius:8px;justify-content:space-between;align-items:center;gap:8px;min-height:58px;margin-top:8px;padding:8px 8px 8px 12px;display:flex}.list-row.active,.list-row:hover{border-color:var(--border);background:var(--surface)}.list-row>button{text-align:left;cursor:pointer;background:0 0;gap:2px;min-width:0;display:grid}.builder-block{border-top:1px solid var(--border);gap:14px;margin-top:6px;padding-top:18px;display:grid}.workout-template-block,.workout-builder-preview{border:1px solid var(--border);background:var(--surface-muted);border-radius:8px;gap:14px;margin-top:6px;padding:18px;display:grid}.workout-template-block h3,.workout-template-block p,.workout-builder-preview h3,.workout-builder-preview p{margin:0}.workout-template-block p,.workout-builder-preview p{color:var(--muted);margin-top:4px;font-size:13px}.workout-template-heading{justify-content:space-between;align-items:center;gap:14px;display:flex}.workout-template-heading>div{min-width:0}.ai-create-button,.ai-recreate-button{flex:none}.ai-create-button svg,.ai-recreate-button svg{color:var(--accent)}.ai-recreate-button{justify-self:start}.ai-workout-panel-content{gap:16px;display:grid}.ai-description-field{color:var(--text);font-size:14px;font-weight:700}.ai-description-field textarea{min-height:150px;font-weight:400}.field-assistive-row{color:var(--muted);justify-content:space-between;align-items:flex-start;gap:12px;font-weight:400;display:flex}.field-assistive-row small:first-child{max-width:390px}.field-assistive-row small:last-child{white-space:nowrap}.ai-description-status,.ai-workout-error,.ai-loading-description{border-radius:9px;padding:11px 12px;font-size:13px}.ai-description-status{border:1px solid color-mix(in srgb, var(--pace-goal) 28%, var(--border));background:color-mix(in srgb, var(--pace-goal) 10%, var(--surface));justify-content:space-between;align-items:center;gap:12px;display:flex}.ai-description-status>div,.ai-workout-error,.ai-loading-description{align-items:center;gap:9px;display:flex}.ai-description-status svg,.ai-workout-error>svg{color:var(--pace-goal);flex:none}.ai-workout-error{border:1px solid color-mix(in srgb, var(--danger) 24%, var(--border));background:var(--danger-soft);color:var(--danger)}.ai-workout-error .text-button{margin-left:auto}.ai-loading-description{background:var(--surface-muted);color:var(--muted)}.ai-generate-button{width:100%;min-height:44px}.spinner{border:2px solid color-mix(in srgb, var(--accent) 25%, transparent);border-top-color:var(--accent);border-radius:50%;width:16px;height:16px;animation:.8s linear infinite spinner-rotation}.spinner.light{border-color:#fff #ffffff59 #ffffff59}@keyframes spinner-rotation{to{transform:rotate(360deg)}}.ai-generated-preview{border-top:1px solid var(--border);gap:14px;padding-top:16px;display:grid}.ai-generated-preview>div:first-child{gap:3px;display:grid}.ai-generated-preview span,.title-suggestion-card span{color:var(--muted);letter-spacing:.05em;text-transform:uppercase;font-size:11px;font-weight:750}.ai-generated-preview h3{margin:0;font-size:18px}.ai-generated-preview .workout-structure-bars{height:116px}.ai-generated-preview>.primary-button{justify-self:start}.title-review-panel{gap:16px;display:grid}.title-review-panel>p{color:var(--muted);margin:0;line-height:1.5}.title-suggestion-card{border:1px solid color-mix(in srgb, var(--accent) 24%, var(--border));background:color-mix(in srgb, var(--accent) 7%, var(--surface));border-radius:9px;gap:5px;padding:14px;display:grid}.title-suggestion-card strong{font-size:17px}.title-review-actions{flex-wrap:wrap;align-items:center;gap:9px;display:flex}@media (prefers-reduced-motion:reduce){.spinner{animation-duration:1.8s}}.workout-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.workout-template-card{border:1px solid var(--border);background:var(--surface);min-width:0;min-height:84px;color:var(--text);text-align:left;cursor:pointer;border-radius:8px;align-content:center;gap:5px;padding:14px;display:grid}.workout-template-card:hover,.workout-template-card:focus-visible{border-color:var(--accent);box-shadow:0 0 0 3px #1f6f631a}.workout-template-card span{color:var(--muted);font-size:12px;line-height:1.4}.workout-builder-preview{background:var(--surface)}.workout-builder-preview .workout-structure-bars{height:112px}.segment-list{gap:10px;display:grid}.segment-row{border:1px solid var(--border);background:var(--surface);border-radius:8px;gap:12px;padding:12px 12px 12px 16px;display:grid;position:relative;overflow:visible}.segment-row-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.segment-row-heading strong{font-size:14px}.segment-fields{grid-template-columns:repeat(auto-fit,minmax(132px,1fr));align-items:end;gap:10px;display:grid}.json-field{margin-top:4px}.advanced-editor{border-top:1px solid var(--border);padding-top:0}.advanced-editor summary{color:var(--muted);cursor:pointer;font-size:13px;font-weight:650}.advanced-editor[open] summary{margin-bottom:0}.track-editor{gap:18px;display:grid}.track-editor-map-shell,.track-shape-preview{border:1px solid var(--border);background:var(--surface-muted);border-radius:14px;min-height:520px;position:relative;overflow:hidden}.track-map-stage{position:relative}.track-editor-map{position:absolute;inset:0}.track-editor-map-shell.dragging,.track-editor-map-shell.dragging *{cursor:grabbing!important}.track-shape-preview{align-content:center;display:grid}.track-shape-preview svg{width:100%;min-height:300px;display:block}.track-shape-preview>span{color:var(--muted);padding:0 16px 12px;font-size:12px}.track-gps-line,.track-lane{fill:none;stroke-linecap:round;stroke-linejoin:round}.track-gps-line{stroke:#51646d;stroke-width:3px;opacity:.55}.track-lane{stroke:#e18a2d;stroke-width:2px;opacity:.58}.track-lane.selected{stroke:var(--accent);stroke-width:5px;opacity:.95}.track-center-handle{fill:var(--accent);stroke:#fff;stroke-width:2px}.track-editor-controls,.track-basic-controls{gap:16px;display:grid}.track-basic-controls{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.track-basic-controls>.two-up{grid-template-columns:repeat(2,minmax(0,1fr))}.track-basic-controls.alignment-disabled>label{grid-column:1/-1}.track-toggle{border:1px solid var(--border);min-height:58px;color:var(--text);cursor:pointer;border-radius:8px;align-items:center;gap:10px;padding:10px 12px;display:flex}.track-toggle input{width:18px;min-height:18px}.track-toggle span{gap:2px;display:grid}.track-toggle small{color:var(--muted)}.track-editor-heading{align-items:center}.track-header-actions{align-items:center;gap:8px;display:flex}.track-toggle-header{background:var(--surface);border-radius:10px;min-height:38px;padding:6px 10px}.track-toggle-header small{font-size:11px}.track-map-title,.track-map-adjustments{z-index:2;-webkit-backdrop-filter:blur(12px)saturate(1.12);border:1px solid #ffffffa8;position:absolute;box-shadow:0 10px 30px #18212629}.track-map-title{min-height:40px;color:var(--text);background:color-mix(in srgb, var(--surface) 64%, transparent);pointer-events:none;border-radius:12px;align-items:center;gap:8px;padding:0 14px;display:inline-flex;top:16px;left:16px}.track-map-title strong{font-size:13px}.track-map-adjustments{background:color-mix(in srgb, var(--surface) 52%, transparent);border-radius:14px;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px;padding:12px;display:grid;bottom:16px;left:16px;right:16px}.track-slider-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;display:grid}.track-slider>span{color:var(--text);justify-content:space-between;align-items:center;gap:12px;display:flex}.track-slider strong{align-items:center;gap:6px;display:inline-flex}.track-slider output{color:var(--muted);font-variant-numeric:tabular-nums}.track-slider input[type=range]{min-height:20px;accent-color:var(--accent);box-shadow:none;padding:0}.compact-slider{gap:2px;font-size:12px}.compact-slider output{font-size:12px}.track-map-button-group{grid-template-columns:repeat(5,34px);gap:5px;display:grid}.track-map-button-group .icon-button{border:1px solid color-mix(in srgb, var(--border) 78%, transparent);background:color-mix(in srgb, var(--surface) 88%, transparent);width:34px;min-height:34px;color:var(--text);border-radius:9px}.track-map-button-group .track-reset-button{color:var(--accent);margin-left:3px}.track-editor .form-actions{justify-content:flex-end}.muted-copy,.empty-state p{color:var(--muted);margin:0}.settings-grid{grid-template-columns:minmax(320px,.8fr) minmax(420px,1.2fr);gap:24px;padding:0 clamp(18px,3vw,36px) 32px;display:grid}.compact-field{max-width:260px}.rule-panel{border:1px solid var(--border);border-radius:8px;gap:10px;margin:0;padding:14px;display:grid}.rule-panel legend{color:var(--text);padding:0 6px;font-weight:600}.checkbox-row{align-items:center;gap:8px;display:flex}.checkbox-row input{width:16px;min-height:16px}.empty-state{align-content:center;gap:8px;min-height:160px;display:grid}@media (width>=1081px){.history-workspace{align-items:stretch;height:calc(100svh - 98px);max-height:calc(100svh - 98px)}.history-workspace .rail,.history-workspace .workspace-main{height:100%;min-height:0;overflow-y:auto}.history-workspace .rail{scrollbar-gutter:stable}}@media (width<=1080px){.home-grid,.workspace-grid,.settings-grid,.workout-layout{grid-template-columns:1fr}.home-header{flex-direction:column;align-items:flex-start}.home-header-actions{width:100%}.home-header-actions .primary-button,.home-header-actions .secondary-button{flex:1}.plan-editing-layout{grid-template-columns:1fr;gap:12px}.workout-picker-trigger{border:1px solid var(--border);background:var(--surface);width:100%;min-height:62px;color:var(--text);text-align:left;cursor:pointer;border-radius:10px;align-items:center;gap:11px;padding:9px 12px;display:flex}.workout-picker-trigger>svg:first-child{color:var(--accent)}.workout-picker-trigger>svg:last-child{color:var(--muted);margin-left:auto}.workout-picker-trigger[aria-expanded=true]>svg:last-child{transform:rotate(180deg)}.workout-picker-trigger>span{gap:2px;min-width:0;display:grid}.workout-picker-trigger small{color:var(--muted);text-transform:uppercase;font-size:11px}.workout-picker-trigger strong{overflow-wrap:anywhere}.workout-picker{display:none}.workout-picker.open{display:block}.rail{border-right:0;border-bottom:1px solid var(--border);padding-bottom:24px;padding-right:clamp(18px,3vw,36px)}.workspace-main{padding-top:24px}.history-workspace{overflow:visible}.history-workspace.detail-mode .rail,.history-workspace.list-mode:not(.empty-list-mode) .workspace-main,.history-workspace.empty-list-mode .rail{display:none}.history-workspace.detail-mode .workspace-main{padding-top:0}.history-detail-nav{align-items:center;display:flex}}@media (width<=760px){.field-grid,.two-up,.rule-grid,.segment-row{grid-template-columns:1fr}.section-heading{flex-direction:column;align-items:flex-start}.button-row{flex-wrap:wrap}.view-tabs{gap:4px;min-height:58px;padding:8px;overflow-x:hidden}.app-mark{display:none}.nav-actions{gap:4px;margin-left:auto}.tab{flex:none;justify-content:center;width:44px;min-width:44px;padding:0}.tab span{display:none}.home-page,.plans-page{padding-inline:16px}.plans-page-header .training-plan-title h1{font-size:30px}.workout-editor-toolbar{padding:14px}.workout-editor-form>:not(.workout-editor-toolbar){margin-inline:14px}.workout-editor-actions .text-button{padding-inline:4px}.segment-value-grid{grid-template-columns:1fr}.segment-identity{flex-direction:column;align-items:stretch}.segment-role-control{max-width:none}.modal-backdrop{place-items:end center;padding:0}.plan-panel{border-radius:16px 16px 0 0;width:100%;max-height:calc(100svh - 24px)}.home-card{padding:16px}.completed-workout-hero{flex-direction:column;padding:18px}.completed-workout-status{white-space:normal}.analysis-tabs{overflow-x:auto}.analysis-tab{flex:none}.home-action-row .primary-button,.home-action-row .secondary-button{flex:100%}.mini-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.workout-structure-bars{height:110px}.segment-row .icon-button{width:100%}.workout-template-grid{grid-template-columns:1fr}.workout-template-heading,.ai-description-status{flex-direction:column;align-items:stretch}.ai-create-button,.ai-generated-preview>.primary-button,.title-review-actions>button{width:100%}.field-assistive-row{flex-direction:column;align-items:flex-end}.ai-workout-error{flex-wrap:wrap;align-items:flex-start}.segment-row-heading .icon-button{width:38px}.segment-fields{grid-template-columns:1fr}.track-editor-map-shell,.track-shape-preview{min-height:440px}.track-basic-controls,.track-basic-controls>.two-up,.track-slider-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.track-editor-heading{align-items:flex-start}.track-header-actions{width:100%}.track-toggle-header{flex:1}.track-map-adjustments{grid-template-columns:1fr}.track-map-button-group{justify-self:end}.artifact-row{flex-direction:column;align-items:flex-start}.heart-rate-zones{gap:10px;padding:12px}.heart-rate-zones-heading{gap:8px}.heart-rate-zones-heading h3{font-size:14px}.heart-rate-zones-heading strong{font-size:11px}.heart-rate-zone-legend{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.heart-rate-zone-chip{border-radius:7px;gap:2px;min-height:56px;padding:6px 4px}.heart-rate-zone-chip>strong{font-size:12px}.heart-rate-zone-chip>span{font-size:9px;line-height:1.15}.heart-rate-zone-label{gap:3px;font-size:10px}.heart-rate-zone-label i{width:5px;height:5px}}
