/* Opt-in to the three planners only; calculations, persistence and shared picker are unchanged. */
.planner-icon{display:inline-block;width:18px;height:18px;vertical-align:-3px;margin-right:7px;flex:none;color:inherit}
.planner-result-updated{animation:planner-result-pulse 1.4s ease-out}
@keyframes planner-result-pulse{from{outline:3px solid #E6007E;outline-offset:3px}to{outline:3px solid transparent;outline-offset:7px}}
:is(.tgl-fuel-planner-workspace,.tgl-warmup-workspace,.tgl-weather-planner-workspace) [tabindex="-1"]{scroll-margin-top:16px}
:is(.tgl-fuel-planner-workspace,.tgl-weather-planner-workspace) .planner-safety{font-size:13px;line-height:1.45;border-left:3px solid #8495A3;padding-left:12px;color:#D5DEE3;margin:16px 0 0}
/* Approved Fuel composition: common paired frame, natural content heights, labelled compact items. */
.tgl-fuel-planner-workspace .layout{gap:24px;align-items:start}
.tgl-fuel-planner-workspace .layout .panel{border:1px solid var(--tgl-workspace-line);border-radius:14px;background:var(--tgl-workspace-surface);padding:20px}
.tgl-fuel-planner-workspace .inputs{gap:16px;border:0}

.tgl-fuel-planner-workspace .outputs{border:0}
.tgl-fuel-planner-workspace .planner-ride-context{font-size:13px;color:#BDC9D2;margin:0 0 12px}
.tgl-fuel-planner-workspace .summary .stage{padding-top:0}
.tgl-fuel-planner-workspace .facts{gap:12px}
.tgl-fuel-planner-workspace .facts strong{font-size:clamp(20px,2.6vw,30px)}
.tgl-fuel-planner-workspace .session-facts strong{font-size:20px}
.tgl-fuel-planner-workspace .options label{font-size:13px}
.tgl-fuel-planner-workspace .builder-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.tgl-fuel-planner-workspace .fuel-choices{border-right:1px solid #454D62;padding-right:24px}
.tgl-fuel-planner-workspace .templates{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.tgl-fuel-planner-workspace .templates button{font-size:13px;padding:9px 10px;min-height:44px}
.tgl-fuel-planner-workspace .fuel-categories{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.tgl-fuel-planner-workspace .fuel-categories button{min-width:44px;min-height:44px;padding:8px 10px;border:1px solid #8495A3;border-radius:8px;background:transparent;color:#F4F7F9;font:700 13px Arial,sans-serif;cursor:pointer}
.tgl-fuel-planner-workspace .catalogue-hint{font-size:13px;margin:0}
.tgl-fuel-planner-workspace .fuel-item{grid-template-columns:minmax(0,1fr) 132px 52px 44px;gap:8px;padding:12px 0}
.tgl-fuel-planner-workspace .item-name{grid-column:1/-1}
.tgl-fuel-planner-workspace .item-carbs,.tgl-fuel-planner-workspace .quantity-controls{min-width:0}
.tgl-fuel-planner-workspace .quantity-controls>*{min-width:0}
.tgl-fuel-planner-workspace .quantity-controls button{min-width:44px;min-height:44px}
.tgl-fuel-planner-workspace .quantity-controls input{width:38px;min-width:0}
.tgl-fuel-planner-workspace .fuel-selected{min-width:0}
.tgl-fuel-planner-workspace #weight-edit .weight-control{gap:6px}
.tgl-fuel-planner-workspace #saved-weight{font-size:14px}
.tgl-fuel-planner-workspace .builder-comparison{padding:12px 0 0}
.tgl-fuel-planner-workspace .fuel-guidance>summary{padding-block:8px;min-height:44px}
.tgl-fuel-planner-workspace .weight-field>h3{display:none}
/* Match normal desktop card bottoms without fixed heights or stretching expanded options. */
.tgl-warmup-workspace .layout:not(:has(#planOptions[open]))>:is(.warm-setup,.warm-schedule){align-self:stretch}
.tgl-warmup-workspace .warm-setup,.tgl-warmup-workspace .warm-schedule{padding:20px}
.tgl-warmup-workspace .planner-schedule-link{display:none}
.tgl-warmup-workspace .step-editor{margin-top:0}
/* The accepted clock inserts its button inside .ride-time-field, below #time. */
.tgl-weather-planner-workspace .ride-time{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px}
.tgl-weather-planner-workspace .ride-time-field{min-width:0}
.tgl-weather-planner-workspace .ride-time-field>label{display:block;line-height:1.4;min-height:20px;margin:0 0 7px}
.tgl-weather-planner-workspace .ride-time-field>input{box-sizing:border-box;width:100%;height:46px;min-height:46px;margin:0}
.tgl-weather-planner-workspace .ride-time-field>.tgl-clock-open{margin:6px 0 0;max-width:100%;font-size:13px}
.tgl-weather-planner-workspace .time-hint{margin:10px 0 16px}
.tgl-weather-planner-workspace .planner-duration-detail,.tgl-weather-planner-workspace .planner-preferences{border-top:1px solid #454D62;margin-top:12px}
.tgl-weather-planner-workspace :is(.planner-duration-detail,.planner-preferences)>summary{min-height:44px;padding:10px 0;font-weight:700;cursor:pointer}
.tgl-weather-planner-workspace :is(.planner-duration-detail,.planner-preferences)>summary span{font-size:13px;color:#BDC9D2;font-weight:400;margin-left:6px}
.tgl-weather-planner-workspace .planner-preferences fieldset{margin:12px 0}
.tgl-weather-planner-workspace #duration-fields{margin-top:10px}
.tgl-weather-planner-workspace #submit{margin-top:12px}
.tgl-weather-planner-workspace .panel{padding:20px}
.tgl-weather-planner-workspace #result>h2:first-of-type{margin-top:0}
.tgl-weather-planner-workspace .metrics b[data-weather-metric]::before{content:'';display:inline-block;width:16px;height:16px;background:currentColor;vertical-align:-3px;margin-right:6px}
.tgl-weather-planner-workspace .metrics b[data-weather-metric="Wind"]::before{mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M3 8h12a3 3 0 1 0-3-3M3 12h16a3 3 0 1 1-3 3M3 16h5'/%3E%3C/svg%3E") center/contain no-repeat}
.tgl-weather-planner-workspace .metrics b[data-weather-metric="Rain"]::before{mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M7 14a5 5 0 1 1 8-6 4 4 0 1 1 3 6M8 17l-1 3m6-3-1 3m6-3-1 3'/%3E%3C/svg%3E") center/contain no-repeat}
.tgl-weather-planner-workspace .metrics b:not([data-weather-metric="Wind"]):not([data-weather-metric="Rain"])::before{display:none}
@media(max-width:760px){
 .tgl-fuel-planner-workspace .layout,.tgl-fuel-planner-workspace .builder-layout{grid-template-columns:minmax(0,1fr)}
 .tgl-fuel-planner-workspace .inputs{border-right:0}
 .tgl-fuel-planner-workspace .outputs{border:0}
 .tgl-fuel-planner-workspace .layout .panel{padding:18px}
 .tgl-fuel-planner-workspace .fuel-choices{border:0;padding:0}
 .tgl-fuel-planner-workspace .fuel-selected{border-top:1px solid #454D62;padding-top:18px}
 .tgl-fuel-planner-workspace .fuel-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
 .tgl-fuel-planner-workspace .item-total{grid-column:1;grid-row:3}
 .tgl-fuel-planner-workspace .fuel-item>.remove{grid-column:2;grid-row:3;justify-self:end}
 .tgl-fuel-planner-workspace .quantity-controls{display:flex;min-width:0}
 .tgl-fuel-planner-workspace .quantity-controls input{flex:1;width:0}
 .tgl-fuel-planner-workspace .quantity-controls button{flex:none}
 .tgl-warmup-workspace .layout:not(:has(#planOptions[open]))>:is(.warm-setup,.warm-schedule){align-self:start}
 .tgl-warmup-workspace .warm-setup,.tgl-warmup-workspace .warm-schedule,.tgl-weather-planner-workspace .panel{padding:18px}
 .tgl-warmup-workspace .planner-schedule-link{display:inline-flex;align-items:center;min-height:44px;font-weight:700}
}
@media(max-width:350px){
 .tgl-weather-planner-workspace .ride-time{grid-template-columns:minmax(0,1fr)}
 .tgl-fuel-planner-workspace .templates{grid-template-columns:minmax(0,1fr)}
 .tgl-fuel-planner-workspace .facts strong{font-size:23px}
}
@media(prefers-reduced-motion:reduce){.planner-result-updated{animation:none}}

/* PLANNERS-UX-02: bounded control/status refinements. */
.tgl-fuel-planner-workspace .target-control{display:flex;gap:8px;align-items:center}
.tgl-fuel-planner-workspace .target-control input{width:100%;min-width:0;flex:1}
.tgl-fuel-planner-workspace .target-control button{min-width:44px;min-height:44px;flex:none}
.tgl-fuel-planner-workspace .fluid-qualification{margin-top:10px;margin-bottom:16px}
.tgl-fuel-planner-workspace .fuel-status{display:flex;gap:10px;align-items:flex-start;border-left:3px solid #8495A3;background:#202437;border-radius:6px;padding:12px;margin-top:16px}
.tgl-fuel-planner-workspace .fuel-status[data-state="around"]{border-color:#93BCD0}
.tgl-fuel-planner-workspace .fuel-status[data-state="below"]{border-color:#C6B78F}
.tgl-fuel-planner-workspace .fuel-status[data-state="above"]{border-color:#B7A6C9}
.tgl-fuel-planner-workspace #fuel-status-icon{font-size:22px;line-height:1.2;min-width:20px}
.tgl-fuel-planner-workspace #builder-message{margin:4px 0 0;font-size:13px}
.tgl-weather-planner-workspace #durations{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.tgl-weather-planner-workspace #durations button{min-width:0;min-height:44px;padding:8px 2px;font-size:12px;white-space:nowrap}
.tgl-weather-planner-workspace .tgl-clock-open--compact{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;min-height:44px}
.tgl-weather-planner-workspace .tgl-clock-open--compact .planner-icon{width:16px;height:16px;margin:0}
.tgl-weather-planner-workspace #post-ride-feedback>summary{min-height:44px;padding:12px 16px;cursor:pointer;font-weight:700}
.tgl-weather-planner-workspace #post-ride-feedback .chips{margin-top:12px}
@media(max-width:350px){.tgl-weather-planner-workspace #durations{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* UX-POLISH: scoped presentation only; retain existing controls and calculations. */
:is(.tgl-fuel-planner-workspace,.tgl-weather-planner-workspace,.tgl-warmup-workspace) :is(h2,h3):has(>.planner-icon,>.cycling-icon),.kit-history :is(h2,h3):has(>.cycling-icon){display:flex;align-items:center;gap:8px}
:is(.tgl-fuel-planner-workspace,.tgl-weather-planner-workspace,.tgl-warmup-workspace) :is(h2,h3)>:is(.planner-icon,.cycling-icon),.kit-history :is(h2,h3)>.cycling-icon{width:20px;height:20px;flex:0 0 20px;margin:0;vertical-align:baseline}
.tgl-fuel-planner-workspace .builder-comparison{padding:12px;border:1px solid #8d6a86;border-radius:10px;background:#30253f}
.tgl-fuel-planner-workspace .builder-comparison .totals{margin:0;gap:12px}
.tgl-fuel-planner-workspace .builder-comparison .totals>div{border:0;padding:0;background:transparent}
.tgl-fuel-planner-workspace .builder-comparison .fuel-status{border:0;border-radius:0;background:transparent;margin-top:10px;padding:0;align-items:center;gap:8px}
.tgl-fuel-planner-workspace .builder-comparison #fuel-status-icon{display:flex;align-items:center;min-width:20px}
.tgl-fuel-planner-workspace .builder-comparison #fuel-status-icon .cycling-icon{width:20px;height:20px;margin:0}
.tgl-fuel-planner-workspace .builder-comparison #builder-message{margin:6px 0 0;line-height:1.4}
.tgl-fuel-planner-workspace .templates button{display:grid;grid-template-columns:20px minmax(0,1fr) 16px;align-items:center;gap:8px;text-align:left}
.tgl-fuel-planner-workspace .templates button::after{display:none}
.tgl-fuel-planner-workspace .fuel-option-icon{display:flex;width:20px;align-items:center}
.tgl-fuel-planner-workspace .fuel-option-icon .cycling-icon{margin:0;width:20px;height:20px}
.tgl-fuel-planner-workspace .fuel-option-name{min-width:0;overflow-wrap:anywhere}
.tgl-fuel-planner-workspace .fuel-option-add{text-align:center;font-size:18px;font-weight:400}
.tgl-fuel-planner-workspace .templates button[data-added=true] .fuel-option-add{color:#ff9bca}
.tgl-fuel-planner-workspace .duration-pair{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tgl-fuel-planner-workspace .stepper{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:2px}
.tgl-fuel-planner-workspace .stepper input{grid-column:2;grid-row:1;width:100%;min-width:0;padding:8px 2px;min-height:44px;height:44px;border-radius:8px}
.tgl-fuel-planner-workspace .stepper button{width:44px;min-height:44px;height:44px;border-radius:8px}
.tgl-fuel-planner-workspace .stepper button:first-child{grid-column:1;grid-row:1}
.tgl-fuel-planner-workspace .stepper button:last-child{grid-column:3;grid-row:1}
.tgl-fuel-planner-workspace .fuel-item{display:grid;grid-template-columns:minmax(0,1fr) 120px 44px;gap:6px;align-items:center;padding:10px 0}
.tgl-fuel-planner-workspace .fuel-item .item-name{padding-right:0;grid-column:1/3;grid-row:1;min-width:0}
.tgl-fuel-planner-workspace .fuel-item>.remove{grid-column:3;grid-row:1;justify-self:end;width:44px;height:44px;min-height:44px;border-radius:8px;margin:0;padding:0}
.tgl-fuel-planner-workspace .fuel-item .item-carbs{grid-column:1;grid-row:2;min-width:0}
.tgl-fuel-planner-workspace .fuel-item .quantity{grid-column:2;grid-row:2;min-width:0}
.tgl-fuel-planner-workspace .fuel-item .quantity-controls{display:grid;grid-template-columns:44px 32px 44px;gap:0;align-items:center}
.tgl-fuel-planner-workspace .fuel-item .quantity-controls button{width:44px;min-height:44px;height:44px;border-radius:8px;padding:0}
.tgl-fuel-planner-workspace .fuel-item .quantity-controls input{width:32px;min-width:0;padding:6px 0;text-align:center;min-height:44px;height:44px;border-radius:8px!important}
.tgl-fuel-planner-workspace .fuel-item .carb-control{display:flex;align-items:center;gap:3px;min-width:0;max-width:110px}
.tgl-fuel-planner-workspace .fuel-item .carb-control input{width:calc(100% - 13px);min-width:0;min-height:44px;height:44px;padding:6px 2px;border-radius:8px;font-size:14px;font-weight:700;appearance:textfield}
.tgl-fuel-planner-workspace .fuel-item input::-webkit-inner-spin-button{appearance:none}
.tgl-fuel-planner-workspace .fuel-item .carb-control>span{font-size:12px;white-space:nowrap}
.tgl-fuel-planner-workspace .fuel-item .item-total{grid-column:3;grid-row:2;display:flex;flex-direction:column;gap:0;align-items:center;justify-content:center;font-size:13px;min-width:0;overflow-wrap:anywhere}
.tgl-fuel-planner-workspace .fuel-item .item-total .item-field-label{font-size:11px;margin:0}
.tgl-fuel-planner-workspace .fuel-item>.error{grid-column:1/-1;grid-row:auto;margin:0}
.tgl-fuel-planner-workspace .fuel-item .item-name input{height:44px;border-radius:8px}
@media(min-width:1200px){
 .tgl-fuel-planner-workspace .fuel-item{grid-template-columns:minmax(110px,1fr) 78px 120px 44px 44px}
 .tgl-fuel-planner-workspace .fuel-item .item-name{grid-column:1;grid-row:1}
 .tgl-fuel-planner-workspace .fuel-item .item-carbs{grid-column:2;grid-row:1}
 .tgl-fuel-planner-workspace .fuel-item .quantity{grid-column:3;grid-row:1}
 .tgl-fuel-planner-workspace .fuel-item .item-total{grid-column:4;grid-row:1}
 .tgl-fuel-planner-workspace .fuel-item>.remove{grid-column:5;grid-row:1}
}
@media(max-width:330px){.tgl-fuel-planner-workspace .templates{grid-template-columns:minmax(0,1fr)}}

.tgl-fuel-planner-workspace .templates button{padding-inline:8px;gap:6px}
.tgl-fuel-planner-workspace #empty-items{display:none}

@media(min-width:1000px){.tgl-fuel-planner-workspace .duration-pair{grid-template-columns:repeat(2,minmax(0,160px));justify-content:start}}

/* DF-14: only the non-running historical warm-up view. */
.tgl-warmup-workspace [hidden]{display:none!important}
.tgl-warmup-workspace .history-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
.tgl-warmup-workspace .history-workspace>.card:first-child,.tgl-warmup-workspace .history-workspace>.card:last-child{grid-column:1/-1}
.tgl-warmup-workspace .history-workspace .card{min-width:0;overflow-wrap:anywhere}
.tgl-warmup-workspace #historySteps{padding-left:22px;margin:16px 0}
.tgl-warmup-workspace #historySteps li{padding:10px 0;border-bottom:1px solid var(--tgl-workspace-line)}
.tgl-warmup-workspace #historySteps span{display:block;font-size:14px;margin-top:4px}
.tgl-warmup-workspace .history-workspace textarea{box-sizing:border-box;width:100%;resize:vertical;font:inherit}
.tgl-warmup-workspace .history-workspace .field{margin:14px 0}
.tgl-warmup-workspace #historyStatus[data-state="error"],.tgl-warmup-workspace #historyStatus[data-state="conflict"]{border-left:3px solid var(--tgl-pink,#E6007E);padding-left:12px}
@media(max-width:700px){.tgl-warmup-workspace .history-workspace{grid-template-columns:minmax(0,1fr);gap:16px}.tgl-warmup-workspace .history-workspace .actions{display:flex;flex-wrap:wrap}.tgl-warmup-workspace .history-workspace button{min-height:44px;max-width:100%;white-space:normal}}

.tgl-warmup-workspace #reviewSave:not(:disabled){background:#E6007E;color:#fff;border-color:#E6007E}
.tgl-warmup-workspace #reviewSave:not(:disabled):hover{background:#C6006C;border-color:#C6006C}
