.add-row { position: relative; }
.title-suggestions[hidden], #nav-overdue[hidden] { display: none; }
.title-suggestions {
    position: absolute;
    z-index: 8;
    top: calc(100% + 2px);
    left: 0;
    width: max(100%, 185px);
    max-width: 235px;
    padding: 2px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: 0 3px 8px #202c3224;
}
.day-column:focus-within { z-index: 2; }
.day-column:nth-last-child(-n+2) .title-suggestions { left: auto; right: 0; }
.title-suggestions [role=option] { padding: 5px; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; font-size: 12px; }
.title-suggestions [aria-selected=true], .title-suggestions [role=option]:hover { background: var(--accent-soft); }
.postpone-controls { display: grid; gap: 5px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.postpone-controls h3 { font-size: 13px; margin: 0; }
.postpone-weekdays { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; }
.postpone-weekdays button { display: flex; flex-direction: column; gap: 1px; padding: 3px 0; }
.postpone-weekdays small { color: var(--muted); font-size: 10px; }
.postpone-date { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; }
.postpone-date label { display: flex; flex: 1 0 8em; min-width: 0; }
.postpone-date button { padding-inline: 6px; }
.task-list { container-type: inline-size; }
body.edit-mode .week-open-card {
    --action-width: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, var(--action-width));
    grid-template-areas:
        "title title title title title"
        "days days days days days"
        "date postpone reschedule done cancel";
}
body.edit-mode .week-quick-done { display: none; }
body.edit-mode .week-edit-form { display: contents; }
.week-open-card .task-body { grid-area: title; }
.week-open-card .postpone-weekdays { grid-area: days; }
.week-edit-form input { grid-area: date; padding: 0 2px; font-size: 11px; }
.week-edit-form input::-webkit-datetime-edit { padding: 0; }
.week-edit-form input::-webkit-datetime-edit-text { padding: 0; }
.week-edit-form input::-webkit-calendar-picker-indicator { margin: 0; padding: 0; }
.week-postpone { grid-area: postpone; }
.week-reschedule { grid-area: reschedule; }
.week-done { grid-area: done; }
.week-cancel { grid-area: cancel; }
.week-edit-form > * {
    min-height: 26px;
    border: 0;
    border-top: 1px solid var(--line);
}
.week-edit-form button {
    padding: 0;
    border-left: 1px solid var(--line);
}
.week-edit-form button:not(.week-done) { font-size: 14px; }
.week-edit-form button:disabled { background: var(--panel); color: var(--muted); }
.week-cancel:hover { background: var(--coral-soft); color: var(--coral); }
@container (max-width: 183px) {
    body.edit-mode .week-open-card {
        grid-template-columns: minmax(0, 1fr) repeat(2, var(--action-width));
        grid-template-areas:
            "title done cancel"
            "days days days"
            "date postpone reschedule";
    }
    .week-edit-form :is(.week-done, .week-cancel) { border-top: 0; }
}
@container (max-width: 140px) {
    .week-edit-form input { padding-inline: 1px; font-size: 10px; }
}
.task-card > .postpone-weekdays { border-top: 1px solid var(--line); gap: 0; }
body:not(.edit-mode) .task-card > .postpone-weekdays { display: none; }
.task-card > .postpone-weekdays button {
    min-width: 0;
    gap: 1px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    font-size: 12px;
    line-height: 1.1;
}
.task-card > .postpone-weekdays button:last-child { border-right: 0; }
.task-card > .postpone-weekdays button:hover:enabled { background: var(--accent-soft); }
.postpone-weekdays button[data-this-week]:where(:not(:hover), :disabled) {
    background: rgb(76 107 123 / 10%);
}
@media (pointer: coarse) {
    .week-edit-form > * { min-height: 32px; }
    .task-card > .postpone-weekdays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .task-card > .postpone-weekdays button { min-height: 32px; }
    .task-card > .postpone-weekdays button:nth-child(n+5) { border-top: 1px solid var(--line); }
}
.backlog-panel .event-column-header h2 { min-width: 0; overflow-wrap: anywhere; }
.backlog-panel .event-column-header .ghost-button { flex-shrink: 0; }
@media (max-width: 800px) {
    .backlog-panel[data-selected-task] { grid-row: 1; }
}
