/* Compact editable task text, with a full-text expansion on focus. */
.board-card .task-table { min-width: calc(1246px + var(--row-action-width) + var(--tree-extra)); }
.board-card .task-table th.task-col { width: calc(280px + var(--tree-extra)); }
.task-title-stack { display: flex; flex: 1 1 0; flex-direction: column; min-width: 80px; }
.task-number { font-size: 10px; line-height: 12px; color: var(--mut); font-variant-numeric: tabular-nums; user-select: all; }
.board-card .task-table .task-name-input { flex: 0 0 auto; font-size: 12px; line-height: 15px; min-height: 19px; max-height: 34px; }
.board-card .task-table .task-name-input[aria-expanded="true"] { max-height: 300px; }
.board-card .task-table .task-text-input { font-size: 12px; line-height: 17px; height: 42px; min-height: 42px; max-height: 42px; overflow: hidden; resize: none; }
.board-card .task-table .task-text-input[aria-expanded="true"] { max-height: 300px; }
.board-card .task-table .task-row[data-outline-kind="summary"] .task-number { color: var(--acc-fg); }
.td-completion-summary { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.td-completion-summary small { font-size: 12px; color: var(--mut); }
.td-button.td-delete-task { color: var(--err); border-color: var(--err-line); }
.dependency-id-search { display: flex; gap: 8px; margin: 10px 0; }
.dependency-id-search input { flex: 1; width: 0; border: 1px solid var(--line); border-radius: 5px; padding: 8px; }
.dependency-id-search button, .dependency-add-found { border: 1px solid var(--line-strong); padding: 7px 10px; border-radius: 5px; color: var(--b-600); }
#dependencySearchResult { font-size: 12px; line-height: 1.6; margin: 8px 0; }
.dependency-task-name small { display: block; color: var(--mut); font-size: 11px; }
/* Drag preview occupies the exact insertion position. */
.task-drag-placeholder { pointer-events: none; }
.board-card .task-table .task-drag-placeholder td { padding: 0; background: var(--b-50); border: 2px dashed var(--b-400); }
.task-drag-preview { padding: 8px 16px; color: var(--b-600); opacity: .7; animation: task-preview-appear .14s ease-out; }
.task-drag-preview strong { font-size: 12px; display: block; margin-bottom: 5px; }
.task-drag-preview-line { font-size: 12px; line-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: calc(var(--preview-depth) * 18px); }
.board-card .task-table .task-row.dragging td { opacity: .28; }
.task-drag-status { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--b-700); color: white; padding: 8px 14px; border-radius: 7px; z-index: 200; pointer-events: none; font-size: 13px; }
@keyframes task-preview-appear { from { opacity: .2; transform: translateY(-5px); } to { opacity: .7; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .task-drag-preview { animation: none; } }
/* One scroll surface keeps tree labels and timeline rows aligned. */
.gantt-scroll { max-height: calc(100dvh - 260px); overflow: auto; overscroll-behavior: contain; }
.gantt-header { position: sticky; top: 0; z-index: 6; }
.gantt-task-label { position: sticky; left: 0; z-index: 3; text-align: left; }
.gantt-label-head { position: sticky; left: 0; z-index: 7; }
.gantt-task-open { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; text-align: left; padding: 0; }
.gantt-task-label .tree-toggle-space, .gantt-task-label .tree-toggle { flex-shrink: 0; }
.gantt-task-copy strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gantt-row.is-parent .gantt-task-label { background: var(--sunken2); }
.gantt-row.is-parent .gantt-bar { box-shadow: inset 0 -3px color-mix(in srgb, var(--acc-hover) 25.1%, transparent); }
.gantt-actual-delay { position: absolute; top: 34px; height: 5px; left: calc(var(--delay-left) * 38px); width: max(3px, calc(var(--delay-width) * 38px)); background: var(--err-fill); opacity: .8; }
.gantt-completed-marker { position: absolute; left: calc(var(--completed-left) * 38px - 5px); top: 8px; width: 11px; height: 30px; padding: 0; border-left: 3px solid var(--ok); color: var(--ok); font-size: 12px; z-index: 2; }
.gantt-completed-marker.is-late { border-color: var(--err-fill); color: var(--err); }
.gantt-legend .actual-completion { background: var(--ok); width: 3px; border-radius: 0; }
.gantt-legend .actual-delay { background: var(--err-fill); border-radius: 0; }
/* A single four-sided outline encloses the entire destination subtree. */
.board-card .task-table .task-drag-ghost { pointer-events: none; opacity: 1; --drag-accent: var(--b-500); --drag-fill: var(--b-50); }
.board-card .task-table .task-drag-ghost[data-drag-kind="reparent"] { --drag-accent: var(--ok); --drag-fill: var(--ok-soft); }
.board-card .task-table .task-drag-ghost td {
  background: var(--drag-fill) !important; color: var(--acc-hover) !important;
  border-top: 1px solid var(--b-100); border-bottom: 1px solid var(--b-100);
  box-shadow: inset var(--drag-left, 0px) 0 0 var(--drag-accent), inset var(--drag-right, 0px) 0 0 var(--drag-accent), inset 0 var(--drag-top, 0px) 0 var(--drag-accent), inset 0 var(--drag-bottom, 0px) 0 var(--drag-accent);
}
.board-card .task-table .task-drag-first td { --drag-top: 3px; }
.board-card .task-table .task-drag-last td { --drag-bottom: -3px; }
.board-card .task-table .task-drag-ghost td:first-child { --drag-left: 3px; }
.board-card .task-table .task-drag-ghost td:last-child { --drag-right: -3px; }
.board-card .task-table .task-drag-ghost :is(.task-name-input,.tree-number,.task-number) { color: var(--acc-hover) !important; }
.board-card .task-table .task-drag-ghost .task-drag-position { display: block; color: var(--drag-accent); font-size: 12px; line-height: 18px; font-weight: 700; }
.task-drag-status { max-width: calc(100vw - 32px); box-sizing: border-box; line-height: 1.6; }
.td-molecule-add .td-wait-next { display: flex; align-items: flex-start; gap: 8px; width: fit-content; max-width: 100%; color: var(--mut); font-size: 13px; font-weight: 500; line-height: 20px; margin: 10px 0 8px; cursor: pointer; }
.td-molecule-add .td-wait-next > span { flex: 1; min-width: 0; white-space: normal; }
.td-molecule-add .td-wait-next-hint { color: var(--mut); }
.td-molecule-add .td-wait-next input[type="checkbox"] { flex: 0 0 16px; width: 16px; max-width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 2px 0 0; appearance: auto; accent-color: var(--acc); cursor: pointer; }
.board-card .task-table .inline-template-picker { width: 24px; min-width: 24px; padding: 3px; }
.board-card .task-table .inline-template-picker span:last-child { display: none; }

/* Two detail lines determine the compact table height, including focused empty cells. */
.board-card .task-table .task-row td { padding-top: 2px; padding-bottom: 2px; }
.board-card .task-table .task-row.detail-expanded td { min-height: 46px; }
.confirm-dialog:has(.confirm-deletion-list:not([hidden])) { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; }
.confirm-deletion-list { max-height: 42dvh; overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.confirm-deletion-list[hidden] { display: none; }
.confirm-deletion-task { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 7px 10px 7px calc(10px + var(--delete-depth) * 14px); border-bottom: 1px solid var(--line); font-size: 12px; }
.confirm-deletion-task span { color: var(--mut); font-size: 11px; }
.confirm-deletion-task strong { flex: 1; min-width: 120px; overflow-wrap: anywhere; color: var(--fg-2); }
.confirm-deletion-task small { color: var(--err); }

.outline-toolbar #myTasksFilterBtn { border-color: var(--line); color: var(--acc); }
.outline-toolbar #myTasksFilterBtn[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--acc-fg); }
.board-card .task-table .task-row .assignee-picker-mine { background: var(--b-50); border-radius: 6px; box-shadow: inset 0 0 0 1px var(--b-300); padding-left: 5px; padding-right: 5px; }
.board-card .task-table .task-row .assignee-picker-mine :is(.assignee-picker-label,.assignee-chevron) { color: var(--b-600) !important; }
.board-card .task-table .task-row .assignee-picker-mine:hover { background: var(--b-100); }
.board-card .task-table .assignee-avatar-self { outline: 2px solid var(--b-400); outline-offset: 1px; z-index: 1; }
.board-card .task-table .assignee-self-badge { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 19px; height: 19px; padding: 0 3px; border-radius: 4px; background: var(--b-500); color: var(--acc-fg); font-size: 11px; font-weight: 700; line-height: 1; }

/* Keep planned and actual deadlines together without widening the task table. */
.board-card .task-table .task-actual-deadline { display: block; margin-top: 2px; padding-left: 5px; font-size: 11px; line-height: 16px; white-space: nowrap; color: var(--mut); opacity: 1; }
.td-actual-deadline { display: block; min-height: 36px; padding: 8px 10px; border: 1px solid var(--b-100); border-radius: 7px; background: var(--bg); color: var(--fg-2); }
.td-field > .td-actual-deadline + small { font-size: 12px; font-weight: 400; color: var(--mut); line-height: 1.5; }

.board-card .task-table .task-row[data-outline-kind="summary"] .task-actual-deadline { color: var(--acc-fg); }
.board-card .task-table .task-row.task-drag-ghost .task-actual-deadline { color: var(--acc-hover); }
