.desktop-week-edit{display:none}
#editorLeaveDialog{max-width:480px;width:calc(100% - 32px)}
#editorLeaveError{color:#b42318}
#desktopWeekEditor[hidden]{display:none!important}
@media(min-width:1100px){
 .desktop-week-edit{display:inline-flex}
 body.desktop-week-editing .main{max-width:none;width:100%;padding-right:12px}
 body.desktop-week-editing #boardView{padding:0;max-width:none}
 body.desktop-week-editing #boardView>:not(#desktopWeekEditor){display:none!important}
 body.desktop-week-editing .top{max-width:none}
 .week-edit-toolbar{display:flex;align-items:center;gap:12px;margin:12px 0}
 .week-edit-toolbar strong{flex:1;text-align:center}
 .week-edit-toolbar button{min-height:40px;padding:8px 14px}
 .week-edit-help{font-size:13px;color:var(--muted);margin:10px 0}
 .week-edit-scroll{overflow-x:auto;padding-bottom:12px}
 #weekEditColumns{display:grid;grid-template-columns:repeat(7,minmax(240px,1fr));gap:10px;align-items:start}
 .week-edit-day{min-width:0;display:flex;flex-direction:column;gap:8px}
 .week-edit-day-header{display:flex;align-items:center;justify-content:space-between;gap:6px}
 .week-edit-day-header button{font-weight:700;padding:8px;min-height:40px;font-size:15px}
 .week-edit-day-header small{font-size:11px;white-space:nowrap}
 .week-edit-actions{display:flex;gap:4px}.week-edit-actions button{flex:1;min-height:36px;font-size:12px;padding:6px}
 body.desktop-week-editing .week-edit-day .section{margin:0;border-radius:9px;min-width:0}
 body.desktop-week-editing .week-edit-day .section-head{padding:7px;gap:4px;min-height:40px;flex-wrap:wrap}
 body.desktop-week-editing .week-edit-day h2{font-size:13px}
 body.desktop-week-editing .week-edit-day .counter{gap:4px;font-size:12px}
 body.desktop-week-editing .week-edit-day .counter button{width:28px;min-width:28px;min-height:30px;padding:2px}
 body.desktop-week-editing .week-edit-day .trip{display:grid;grid-template-columns:minmax(0,1fr) 26px;gap:4px;padding:6px;min-height:0}
 body.desktop-week-editing .week-edit-day .trip-label{grid-column:1/-1;grid-row:1;display:flex;align-items:center;gap:6px;font-size:11px}
 body.desktop-week-editing .week-edit-day .trip-label br{display:none}
 body.desktop-week-editing .week-edit-day .trip>.people{grid-column:1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 body.desktop-week-editing .week-edit-day .trip:not(:has(.trip-role-action))>.people{grid-column:1/-1}
 body.desktop-week-editing .week-edit-day .person{font-size:12px;min-height:36px;min-width:0;padding:5px 3px;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
 body.desktop-week-editing .week-edit-day .person .role-note{font-size:10px;margin-left:2px}
 body.desktop-week-editing .week-edit-day .trip-role-action{grid-column:2;grid-row:2;position:static}
 body.desktop-week-editing .week-edit-day .leader-choice{width:26px;min-width:26px;min-height:36px;padding:0}
 .week-edit-support{display:flex;gap:4px}.week-edit-support select{min-width:0;width:135px;font-size:12px;padding:6px}.week-edit-support button{font-size:12px;padding:6px;min-height:36px}
 .week-edit-pool{background:var(--paper,#fff);border:1px solid var(--line,#ddd);border-radius:9px;padding:8px}
 .week-edit-pool>strong{font-size:12px;display:block;margin-bottom:6px}
 .week-edit-pool .people{display:flex;flex-wrap:wrap;gap:4px}
 .week-edit-note{font-size:12px;display:grid;gap:4px}
 .week-edit-note textarea{box-sizing:border-box;width:100%;min-width:0;font-size:13px;padding:8px;resize:vertical}
}
@media(min-width:1100px){
 body.desktop-week-editing .week-edit-day .section{border-left:3px solid var(--area-color,#728078)}
 body.desktop-week-editing .week-edit-day .section-head{background:var(--area-surface,#f0f4f2)}
 body.desktop-week-editing .week-edit-day .section-head h2{color:var(--area-color,#4d6857)}
 body.desktop-week-editing .week-edit-day .dot{background:var(--area-color,#728078)!important}
}
@media(min-width:1100px){body.desktop-week-editing .bottom{left:12px}}

/* Week-only controls use the existing primary/ghost palette and geometry. */
@media(min-width:1100px){
 #desktopWeekEditor .week-edit-toolbar{flex-wrap:wrap;gap:8px}
 #desktopWeekEditor :is(.week-edit-toolbar,.week-edit-day-header,.week-edit-actions,.week-edit-support) button,
 #desktopWeekEditor .week-edit-pool .ghost{
  min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;
  font-size:14px;font-weight:700;line-height:1.4;white-space:nowrap;
 }
 #desktopWeekEditor .week-edit-actions{gap:8px}
 #desktopWeekEditor .week-edit-actions button{padding:10px 8px}
 #desktopWeekEditor .week-edit-support{gap:8px;align-items:center}
 #desktopWeekEditor .week-edit-support select{flex:1;width:auto;min-height:44px;border:1px solid var(--line);border-radius:10px}
 #desktopWeekEditor .week-edit-day>.section{flex-shrink:0}
 #desktopWeekEditor .week-edit-day-header{align-items:center}
}
@media(min-width:1100px){
 body.day-compact #desktopWeekEditor .week-edit-day .trip{grid-template-columns:minmax(0,1fr) 26px!important}
 body.day-compact #desktopWeekEditor .week-edit-day .trip-label{grid-column:1/-1!important;grid-row:1!important;white-space:nowrap;width:auto;min-width:0;padding-top:0}
 body.day-compact #desktopWeekEditor .week-edit-day .trip>.people{grid-column:1!important;grid-row:2!important}
 body.day-compact #desktopWeekEditor .week-edit-day .trip:not(:has(.trip-role-action))>.people{grid-column:1/-1!important}
}
/* Keep the switch in its own non-shrinking cell on day and week layouts. */
#boardView .leader-choice{white-space:nowrap!important;word-break:keep-all;overflow-wrap:normal;flex-shrink:0;line-height:1!important;display:inline-flex;align-items:center;justify-content:center}
body.desktop-week-editing #desktopWeekEditor .week-edit-day .trip:has(.trip-role-action){grid-template-columns:minmax(0,1fr) 32px!important}
body.desktop-week-editing #desktopWeekEditor .week-edit-day .trip>.trip-role-action{grid-column:2!important;grid-row:2!important;position:static!important;align-self:center;justify-self:center;margin:0}
body.desktop-week-editing #desktopWeekEditor .week-edit-day .leader-choice{width:32px;min-width:32px;min-height:36px;padding:0;font-size:18px}
#editorLeaveDialog .modal-actions{display:flex;flex-wrap:wrap;gap:8px}
#editorLeaveDialog .modal-actions button{flex:1 1 120px;min-height:44px;border:1px solid var(--line);border-radius:12px;padding:10px;font-weight:700;white-space:nowrap}
