.coach-live-editor,.coach-live-dialog { --sheet:var(--surface2,#212528); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.coach-live-editor { display:block; width:100%; max-width:960px; margin:0 auto; min-width:0; }
.coach-live-selectors { display:grid; grid-template-columns:minmax(0,1fr) 78px; gap:12px; margin-bottom:18px; }
.coach-live-selectors #coachAddWeek { grid-column:1 / -1; justify-self:start; min-height:44px; padding:10px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font-size:14px; }
.coach-live-selectors label { display:grid; gap:8px; font-size:11px; color:var(--muted); min-width:0; overflow:hidden; }
.coach-live-selectors select:focus-visible { outline-offset:-3px!important; }
.coach-live-selectors select { width:100%; min-width:0; min-height:48px; border:1px solid var(--line); border-radius:10px; padding:9px; background:var(--surface); color:var(--text); font-size:16px; }
.coach-live-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin-bottom:22px; }
.coach-live-days button { min-width:0; min-height:44px; padding:0; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--muted); font-size:12px; }
.coach-live-days button[aria-pressed="true"] { background:var(--greenSoft); border-color:var(--green); color:var(--green); }
.coach-live-editor .editor-day-note textarea { box-sizing:border-box; }
.coach-live-options { margin:20px 0; }
.coach-live-options summary { min-height:44px; line-height:44px; color:var(--muted); font-size:12px; cursor:pointer; }
.coach-live-options>button { margin-top:16px; min-height:44px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--muted); padding:10px; font-size:12px; }
.coach-live-footer { position:static; display:grid; grid-template-columns:.7fr 1.15fr 1.15fr; gap:7px; margin-top:24px; padding:16px 0; border-top:1px solid var(--line); background:var(--bg); }
.coach-live-footer button { min-height:48px; min-width:0; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font-size:12px; padding:8px; }
.coach-live-footer #publishTrainerDay { background:var(--green); border-color:var(--green); color:#062515; font-weight:600; }
.coach-live-dialog { box-sizing:border-box; }
.coach-live-dialog :is(input,select,textarea) { box-sizing:border-box; }
.coach-live-dialog :is(.block-builder-form,.block-builder-body) { min-width:0; }
.coach-live-editor .editor-exercise,.coach-live-editor .editor-delete { font-family:inherit; }
#coachLiveToast { bottom:calc(88px + env(safe-area-inset-bottom)); }

/* Keep the live editor independent of legacy grid and floating action bars. */
#trainer-app .coach-live-editor h2 { font-family:inherit; }
#trainer-app :is(.coach-live-editor,.coach-live-dialog) button { min-height:44px!important; }
#trainer-app :is(.coach-live-footer,.block-builder-footer) button { min-height:48px!important; }
#trainer-app body:has(#coachLiveEditor) .v59-pilot-status { display:none!important; }
#trainer-app #screen-trainer #trainerRoot { min-height:0!important; }
.coach-live-editor :is(button,input,select,textarea) { scroll-margin-block:24px; }
.coach-live-dialog .block-builder-body { scroll-padding-block:18px; }
.coach-live-dialog .block-builder-body :is(button,input,select,textarea) { scroll-margin-block:18px; }
@media(min-width:901px) {
  #trainer-app .v57-coach-nav { grid-row:1!important; align-self:start; min-height:0!important; height:calc(100dvh - 56px); max-height:calc(100dvh - 56px); overflow-y:auto; }
}
@media(min-width:761px) {
  #trainer-app body.c3-coach-mode { padding-bottom:0!important; }
  #trainer-app body.c3-coach-mode .page { padding-bottom:28px!important; }
}
@media(min-width:761px) and (max-width:900px) {
  #trainer-app .v57-coach-nav { position:static!important; }
}
@media(max-width:760px) {
  #trainer-app .coach-live-dialog .block-builder-form[data-block-mode="single"] .builder-target-fields { grid-template-columns:minmax(0,1fr) minmax(0,1.65fr); }
  #trainer-app .coach-live-dialog .block-builder-form[data-block-mode="single"] [data-quantity-label] { grid-column:1 / -1; }
  .coach-live-editor { max-width:640px; }
  .coach-live-editor :is(button,input,select,textarea) { scroll-margin-bottom:calc(100px + env(safe-area-inset-bottom)); }
  #trainer-app body.c3-coach-mode .page { padding-bottom:calc(100px + env(safe-area-inset-bottom))!important; }
}
