/* Keep the existing agenda and board; give their labels and controls room. */
.task-toolbar { gap: 12px; margin-bottom: 22px; }
.task-toolbar-left { gap: 12px; min-width: 0; }
.task-toolbar-left .btn { min-height: 44px; padding: 10px 13px; font-size: 13px; line-height: 1.4; }
.task-toolbar-right { gap: 2px; flex-shrink: 0; }
.task-toolbar-right .icon-btn { width: 44px; min-width: 44px; height: 44px; }
.board-navigation { gap: 16px; margin-bottom: 18px; }
.board-navigation p { min-width: 0; font-size: 15px; line-height: 1.5; }
.board-navigation small { margin-top: 5px; font-size: 12px; line-height: 1.5; }
.board-navigation > div { gap: 8px; }
.board .column-header { gap: 10px; padding: 0 3px 15px; margin-bottom: 4px; }
.board .list-title { min-width: 0; text-align: left; overflow-wrap: anywhere; }
.board .column-header > .icon-btn { flex: 0 0 44px; }
.board .column-cards { gap: 14px; }
.task-card .task-main { gap: 10px; }
.task-card .task-title { min-width: 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.task-card .task-main > .icon-btn { width: 32px; min-width: 32px; height: 44px; flex-shrink: 0; }
.task-card .tags { flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.task-card .tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; padding: 4px 7px; }
.task-card .tag svg, .task-card .tag i { flex-shrink: 0; }
.task-card .subtasks { margin-top: 12px; }
.task-card .subtasks summary { min-height: 44px; font-size: 12px; line-height: 1.5; }
.task-card .subtask { align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.6; padding-block: 10px; }
.task-card .subtask input { flex-shrink: 0; margin-top: 2px; }
.matrix { gap: 18px; }
.matrix .quadrant > h3 { line-height: 1.5; margin-bottom: 18px; }
.matrix .task-card + .task-card { margin-top: 14px; }

.agenda-content { min-width: 0; padding: 20px 16px; }
.agenda-title { width: 100%; }
.agenda-title h3 { margin-top: 5px; line-height: 1.5; overflow-wrap: anywhere; }
.agenda-duration { display: block; line-height: 1.55; }
.agenda-progress { line-height: 1.55; margin-top: 7px; }
.agenda-time { font-variant-numeric: tabular-nums; }
.agenda-gap-body { min-width: 0; line-height: 1.6; }
.agenda-gap-body > span { flex-wrap: wrap; row-gap: 3px; }
.agenda-gap-body > span svg { flex-shrink: 0; }
.agenda-gap-body small { margin-top: 8px; line-height: 1.5; }
.agenda-boundary { line-height: 1.5; }
.calendar-reorder-hint { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.flexible-day-heading { align-items: flex-start; gap: 10px 18px; margin-bottom: 18px; }
.flexible-day-heading > div { min-width: 0; }
.flexible-day-heading p { line-height: 1.6; }
.flexible-day-summary { line-height: 1.6; padding-top: 2px; }
.flexible-set-time { font-size: 13px; line-height: 1.5; margin-top: 3px; }
.calendar-below { margin-top: 24px; }
.calendar-below-heading h2 { line-height: 1.5; }
.calendar-below-heading p { font-size: 13px; line-height: 1.6; margin-top: 5px; }
.calendar-quick-actions { gap: 12px; margin: 20px 0; }
.calendar-quick-actions .btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 48px; font-size: 13px; line-height: 1.5; white-space: normal; padding: 10px; }
.calendar-quick-actions .btn svg { flex-shrink: 0; }
.calendar-unscheduled-heading { flex-wrap: wrap; gap: 8px 12px; padding-top: 18px; margin-bottom: 12px; }
.calendar-unscheduled-heading h3 { font-size: 14px; line-height: 1.5; }
.calendar-unscheduled-heading .btn { font-size: 12px; line-height: 1.5; min-height: 44px; }
.calendar-candidates { gap: 12px; }
.calendar-candidate { min-width: 0; }
.calendar-candidates .habit-body { min-width: 0; }
.calendar-candidates .habit-title { line-height: 1.5; overflow-wrap: anywhere; }
.calendar-candidates .habit-progress { line-height: 1.5; }
.calendar-week-heading { line-height: 1.5; flex-wrap: wrap; }
.calendar-month-heading { gap: 12px; }
.calendar-month-heading h2 { min-width: 0; text-align: center; line-height: 1.5; }
.calendar-month > .small { margin-top: 18px; line-height: 1.65; }

/* A draft row reads top-to-bottom: name, time, then optional detail. */
.plan-preview.plan-editor .plan-draft-row { padding-block: 22px; }
.plan-preview.plan-editor .plan-row-copy { gap: 6px; }
.plan-preview.plan-editor .plan-row-copy > strong { line-height: 1.55; }
.plan-preview.plan-editor .plan-row-copy > small { line-height: 1.6; }
.plan-preview.plan-editor .plan-row-main + .plan-row-actions { margin-top: 16px; }
.plan-preview.plan-editor .plan-row-reason { margin-top: 12px; line-height: 1.6; }
.plan-preview.plan-editor .plan-preview-summary { gap: 12px 16px; padding: 16px; }
.plan-preview.plan-editor .plan-row-editor { gap: 16px 12px; }
.plan-selection-actions { gap: 4px 16px; }
.plan-preferences > summary { gap: 12px; line-height: 1.5; }
.plan-rules p { line-height: 1.65; }

@media (max-width: 560px) {
 .task-toolbar { gap: 8px; }
 .task-toolbar-left { gap: 10px; }
 .task-toolbar-left .btn { padding-inline: 11px; }
 .board-navigation > div { gap: 6px; }
 .agenda-event { --track-width: 52px; grid-template-columns: var(--time-width,42px) var(--track-width) minmax(0,1fr) 44px; }
 .agenda-event .agenda-icon { width: 46px; min-width: 46px; }
 .agenda-event .agenda-content { padding: 18px 9px; }
 .agenda-title h3 { font-size: 16px; }
 .agenda-gap { grid-template-columns: var(--time-width,42px) 52px minmax(0,1fr); }
 .agenda-gap-body { padding: 22px 9px; }
 .flexible-plan-row.agenda-event { grid-template-columns: 52px minmax(0,1fr) 44px; }
 .calendar-below { padding: 20px 14px; }
 .calendar-week-heading { gap: 5px 12px; }
}
@media (max-width: 360px) {
 .task-toolbar-left { gap: 8px; }
 .task-toolbar-left .btn { padding-inline: 9px; font-size: 12px; }
 .task-toolbar-right { gap: 0; }
 .task-toolbar-right .icon-btn { width: 36px; min-width: 36px; }
 .board-navigation { gap: 10px; }
 .board-navigation .icon-btn { width: 40px; min-width: 40px; }
 .board-navigation > div { gap: 4px; }
 .task-card .task-main { gap: 8px; }
 .task-card .task-main > .icon-btn { width: 28px; min-width: 28px; }
 .agenda-event { --time-width: 39px; --track-width: 47px; grid-template-columns: 39px 47px minmax(0,1fr) 44px; }
 .agenda-event .agenda-icon { width: 42px; min-width: 42px; }
 .agenda-event .agenda-content { padding-inline: 8px; }
 .agenda-gap { grid-template-columns: 39px 47px minmax(0,1fr); }
 .agenda-gap-body { padding-inline: 8px; }
 .agenda-gap-body > span { font-size: 13px; }
 .flexible-plan-row.agenda-event { grid-template-columns: 47px minmax(0,1fr) 44px; }
 .flexible-day-heading { display: grid; gap: 8px; }
 .flexible-day-summary { margin-left: 0; }
 .calendar-quick-actions { gap: 8px; }
 .calendar-quick-actions .btn { font-size: 12px; padding-inline: 7px; }
 .plan-preview.plan-editor .plan-row-actions { gap: 10px; }
}
/* Calendar candidates are a short preview; editing opens the complete task. */
.calendar-task-preview { display:grid; grid-template-columns:24px minmax(0,1fr) 28px; align-items:center; gap:9px; min-width:0; padding:14px 10px; border:1px solid color-mix(in srgb,var(--list-color) 16%,transparent); border-radius:17px; background:var(--surface); background:color-mix(in srgb,var(--list-color) 8%,var(--surface)); }
.calendar-task-preview .check-btn { width:24px; height:24px; min-width:24px; }
.calendar-task-preview > .icon-btn { width:28px; min-width:28px; height:44px; }
.calendar-task-copy { display:grid; gap:7px; min-width:0; min-height:44px; padding:0; text-align:left; }
.calendar-task-copy strong { font-size:13px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.calendar-task-copy small { color:var(--muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.plan-preview.plan-editor .plan-draft-feedback:empty { display:none; }
