.todo-board {
  padding: 28px 36px 72px;
  max-width: 1400px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #2f2924;
}

.todo-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.todo-board-header-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.todo-board-view-switch {
  display: inline-flex;
  padding: 3px;
  background: #f7f3ee;
  border: 1px solid #e7dfd3;
  border-radius: 12px;
}

.todo-board-view-button {
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9a8e80;
  font-size: 12px;
  cursor: pointer;
}

.todo-board-view-button:hover {
  color: #c2410c;
}

.todo-board-view-button.active {
  background: #2f2924;
  color: #ffffff;
  font-weight: 600;
}

.todo-board-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #2f2924;
}

.todo-board-date-icon {
  font-size: 18px;
}

.todo-board-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  margin-left: 6px;
  border: 1px solid #e7dfd3;
  border-radius: 999px;
  background: #f7f3ee;
  color: #75685b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.todo-board-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  transform: translate(-50%, 12px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 18px;
  border: 1px solid #e7dfd3;
  border-radius: 12px;
  background: #2f2924;
  color: #fdf8f2;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 10px 30px rgba(47, 41, 36, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.todo-board-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 自定义阶段浮窗：暖白底 + 米色边框，圆角 + 浅阴影，跟随触发元素位置 */
.todo-phase-tooltip {
  position: absolute;
  z-index: 130;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 11px;
  min-width: 0;
  max-width: 320px;
  background: #fffdfa;
  border: 1px solid #ede5da;
  border-radius: 12px;
  color: #2f2924;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 10px 24px rgba(73, 54, 38, 0.18), 0 2px 6px rgba(73, 54, 38, 0.06);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.todo-phase-tooltip.is-visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* 左侧色条：复用阶段状态色，与条本身保持一致 */
.todo-phase-tooltip-mark {
  flex: 0 0 auto;
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  background: #dfe4ea;
}

.todo-phase-tooltip-mark.is-todo { background: #cbd5e1; }
.todo-phase-tooltip-mark.is-doing { background: #c2410c; }
.todo-phase-tooltip-mark.is-done { background: #6cc79b; }

.todo-phase-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.todo-phase-tooltip-title {
  color: #2f2924;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* 第二行：日期 · 状态；状态点与文字内联 */
.todo-phase-tooltip-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #8d7d6c;
}

.todo-phase-tooltip-period {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}

.todo-phase-tooltip-sep {
  color: #c8b9a8;
}

.todo-phase-tooltip-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.todo-phase-tooltip-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

.todo-phase-tooltip-status.is-doing {
  color: #c2410c;
}
.todo-phase-tooltip-status.is-doing i {
  background: #c2410c;
  box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.18);
}

.todo-phase-tooltip-status.is-done {
  color: #3e8054;
}
.todo-phase-tooltip-status.is-done i {
  background: #6cc79b;
}

.todo-phase-tooltip-status.is-todo {
  color: #64748b;
}

/* 阶段按钮 / 卡片缩略条用：阶段链列表 */
.todo-phase-tooltip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  color: #2f2924;
  font-size: 12px;
}

.todo-phase-tooltip-segment {
  display: inline-block;
  padding: 2px 7px;
  background: #f7f3ee;
  border: 1px solid #ede5da;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.3;
  color: #51463c;
}

.todo-phase-tooltip-sep {
  color: #c8b9a8;
  font-size: 11px;
}

.todo-board-history-toggle {
  background: #ffffff;
  border: 1px solid #e7dfd3;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  color: #5a4f44;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.todo-board-add {
  border: 1px solid #c2410c;
  border-radius: 20px;
  padding: 6px 14px;
  background: #c2410c;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.todo-board-add:hover {
  background: #9a3412;
  border-color: #9a3412;
}

.todo-new-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #5a4f44;
  font-size: 12px;
}

.todo-new-field input,
.todo-new-field select,
.todo-new-field textarea {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #e7dfd3;
  border-radius: 7px;
  background: #fbf8f3;
  color: #2f2924;
  font: inherit;
  box-sizing: border-box;
}

.todo-new-field textarea {
  resize: vertical;
}

.todo-new-field input:focus,
.todo-new-field select:focus,
.todo-new-field textarea:focus {
  outline: 2px solid rgba(194, 65, 12, .22);
  border-color: #c2410c;
}

.todo-new-field-spacer {
  display: none;
}

/* 「新增任务」弹窗：橙色 kicker 兼作标题（语义与「新增任务」重复，不再另设 h2）。
   用两级选择器压过后文的 .todo-modal-kicker（11px），字号与右侧 28px 关闭按钮视觉等高。 */
.todo-modal-header .todo-new-title {
  margin-bottom: 0;
  color: #c2410c;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: .02em;
}

.todo-new-field-label {
  display: block;
}

/* 看板分类自定义下拉：替代原生 select 的系统弹出样式。 */
.todo-new-dropdown {
  position: relative;
}

.todo-new-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #e7dfd3;
  border-radius: 7px;
  background: #fbf8f3;
  color: #2f2924;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.todo-new-dropdown-toggle:hover {
  border-color: #c2410c;
}

.todo-new-dropdown-caret {
  color: #9a8e80;
  font-size: 11px;
}

.todo-new-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #e7dfd3;
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(47, 41, 36, .14);
}

.todo-new-dropdown-option {
  padding: 8px 10px;
  border-radius: 6px;
  color: #2f2924;
  font-size: 13px;
  cursor: pointer;
}

.todo-new-dropdown-option:hover {
  background: #f7f3ee;
}

.todo-new-dropdown-option.is-selected {
  color: #c2410c;
  font-weight: 600;
}

.todo-new-dropdown-option.is-selected::after {
  content: '✓';
  float: right;
}

.todo-board-history-toggle:hover {
  background: #fbf6ee;
  border-color: #c2410c;
  color: #c2410c;
}

.todo-board-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #e7dfd3;
  border-radius: 10px;
}

.todo-board-stats-text {
  font-size: 13px;
  color: #5a4f44;
  white-space: nowrap;
  font-weight: 500;
}

.todo-board-stats-bar {
  flex: 1;
  height: 6px;
  background: #e7dfd3;
  border-radius: 3px;
  overflow: hidden;
}

.todo-board-stats-fill {
  height: 100%;
  background: linear-gradient(90deg, #c2410c, #f59e0b);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.todo-board-empty {
  color: #9a8e80;
  font-size: 13px;
  text-align: center;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-style: normal;
}

.todo-board-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.todo-board-column {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 560px;
  min-height: 0;
  overflow: hidden;
}

.todo-board-column:nth-child(1) { background: #f8fafc; }
.todo-board-column:nth-child(2) { background: #fef6ee; }
.todo-board-column:nth-child(3) { background: #ecfdf5; }

.todo-board-column-header {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.todo-board-column-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.todo-status-todo .todo-board-column-dot { background: #94a3b8; }
.todo-status-doing .todo-board-column-dot { background: #c2410c; }
.todo-status-done .todo-board-column-dot { background: #10b981; }

.todo-board-column-count {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.06);
  color: #5a4f44;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.todo-board-column-body {
  flex: 1;
  min-height: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.todo-board-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px 10px;
  color: #9a8e80;
  font-size: 12px;
}

.todo-board-pagination button {
  padding: 4px 8px;
  border: 1px solid #e7dfd3;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #5a4f44;
  font-size: 12px;
  cursor: pointer;
}

.todo-board-pagination button:hover:not(:disabled) {
  border-color: #c2410c;
  color: #c2410c;
}

.todo-board-pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.todo-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  border-left: 3px solid #94a3b8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.todo-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}

.todo-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.todo-card-action {
  padding: 3px 6px;
  border: 1px solid #e7dfd3;
  border-radius: 6px;
  background: #ffffff;
  color: #9a8e80;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.todo-card-action:hover {
  border-color: #c2410c;
  color: #c2410c;
}

.todo-card-action-danger {
  color: #b91c1c;
}

.todo-card-action-danger:hover {
  border-color: #b91c1c;
  color: #b91c1c;
}

.todo-card-doing {
  border-left-color: #c2410c;
  box-shadow: 0 1px 4px rgba(194, 65, 12, 0.08);
}

.todo-card-done {
  border-left-color: #10b981;
  background: #f1f5f9;
  opacity: 0.72;
}

.todo-card-done .todo-card-title {
  text-decoration: line-through;
  color: #6b7280;
}

.todo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.todo-card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #2f2924;
  line-height: 1.5;
}

.todo-card-link {
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.todo-card-link:hover .todo-card-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.todo-card-note {
  font-size: 12px;
  color: #5a4f44;
  font-style: italic;
  margin: 0;
  line-height: 1.4;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.todo-card:hover .todo-card-note,
.todo-card:focus-within .todo-card-note {
  max-height: none;
  opacity: 1;
  overflow: visible;
}

.todo-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 12px;
  color: #9a8e80;
}

.todo-card-meta-item {
  white-space: nowrap;
}

.todo-card-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 2px 8px;
  background: #f7f3ee;
  border: 1px solid #e7dfd3;
  border-radius: 10px;
  color: #5a4f44;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
}

.todo-card-meta-icon {
  margin-right: 2px;
}

.todo-gantt {
  margin-bottom: 20px;
  padding: 18px 20px 14px;
  background: #ffffff;
  border: 1px solid #e7dfd3;
  border-radius: 12px;
}

.todo-gantt-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

/* 左侧标题列弹性撑满，把控件和日期范围推到右侧同一行。 */
.todo-gantt-toolbar > div:first-child {
  flex: 1;
  min-width: 0;
}

.todo-gantt-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2f2924;
}

.todo-gantt-subtitle {
  margin: 4px 0 0;
  color: #9a8e80;
  font-size: 12px;
}

.todo-gantt-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: #6f6257;
  font-size: 12px;
  white-space: nowrap;
}

.todo-gantt-controls label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.todo-gantt-scale {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #e7dfd3;
  border-radius: 6px;
  background: #fbf8f3;
}

.todo-gantt-scale-button {
  padding: 4px 7px;
  border: 0;
  border-right: 1px solid #e7dfd3;
  background: transparent;
  color: #9a8e80;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}

.todo-gantt-scale-button:last-child {
  border-right: 0;
}

.todo-gantt-scale-button.is-active {
  background: #ffeddc;
  color: #9a3e13;
  font-weight: 600;
}

/* 工具栏右侧纵栏：显示已完成开关在上、日期范围在下，统一右对齐。 */
.todo-gantt-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* 起止日期范围：右侧纵栏底部，与副标题同一行高度。 */
.todo-gantt-window {
  color: #9a8e80;
  font-size: 12px;
  white-space: nowrap;
}

.todo-gantt-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.todo-gantt-grid {
  --todo-gantt-label-width: 220px;
  min-width: max(100%, calc(var(--todo-gantt-days) * 42px + var(--todo-gantt-label-width)));
}

.todo-hour-gantt-grid {
  --todo-gantt-label-width: 220px;
  min-width: max(100%, calc(var(--todo-gantt-hours) * 54px + var(--todo-gantt-label-width)));
}

.todo-gantt-axis-row,
.todo-gantt-row {
  display: grid;
  grid-template-columns: var(--todo-gantt-label-width) minmax(0, 1fr);
}

.todo-gantt-axis-label,
.todo-gantt-axis-track,
.todo-gantt-label,
.todo-gantt-track,
.todo-hour-gantt-axis-track,
.todo-hour-gantt-track {
  border-bottom: 1px solid #e7dfd3;
}

.todo-gantt-axis-label,
.todo-gantt-label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid #e7dfd3;
  background: #fbf8f3;
  color: #6f6257;
  font-size: 12px;
}

/* 上面那条共用 display:flex 用 .todo-gantt-axis-label 选择器；这里只覆盖 label 的 grid 行布局。 */
.todo-gantt-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  row-gap: 5px;
  align-items: stretch;
}

.todo-gantt-axis-track,
.todo-gantt-track,
.todo-hour-gantt-axis-track,
.todo-hour-gantt-track {
  display: grid;
  grid-template-columns: var(--todo-gantt-columns);
  min-width: 0;
}

.todo-gantt-axis-track {
  background: #fbf8f3;
}

.todo-hour-gantt-axis-track {
  background: #fbf8f3;
}

.todo-gantt-day {
  min-width: 0;
  padding: 8px 3px;
  border-left: 1px solid #eee7dd;
  color: #9a8e80;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.todo-gantt-day.is-today {
  background: #fff0e5;
  color: #c2410c;
  font-weight: 600;
}

.todo-hour-gantt-hour {
  display: grid;
  min-width: 0;
  min-height: 38px;
  align-content: center;
  padding: 3px 2px;
  border-left: 1px solid #eee7dd;
  color: #9a8e80;
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.todo-hour-gantt-hour small {
  min-height: 12px;
  color: #b1a495;
  font-size: 9px;
  font-weight: 400;
}

.todo-hour-gantt-hour b {
  font-weight: 500;
}

.todo-hour-gantt-hour.is-day-start {
  background: #f8f2e8;
}

.todo-hour-gantt-hour.is-today {
  background: #fff0e5;
  color: #c2410c;
}

.todo-gantt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.todo-gantt-label-content {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.todo-gantt-board-icon {
  flex: 0 0 auto;
  font-size: 15px;
}

.todo-gantt-task-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-gantt-remove {
  flex: 0 0 auto;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #e7dfd3;
  border-radius: 5px;
  background: #ffffff;
  color: #9a8e80;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.todo-gantt-remove:hover {
  border-color: #c2410c;
  color: #c2410c;
}

.todo-gantt-track {
  position: relative;
  align-items: center;
  min-height: 52px;
  background-image: linear-gradient(to right, transparent calc(100% - 1px), #eee7dd calc(100% - 1px));
  background-size: calc(100% / var(--todo-gantt-days)) 100%;
}

.todo-hour-gantt-track {
  position: relative;
  align-items: center;
  min-height: 52px;
  background-image: linear-gradient(to right, transparent calc(100% - 1px), #eee7dd calc(100% - 1px));
  background-size: calc(100% / var(--todo-gantt-hours)) 100%;
}

.todo-hour-gantt-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-column: var(--todo-gantt-start) / span var(--todo-gantt-span);
  min-width: 0;
  min-height: 30px;
  align-content: center;
  gap: 1px;
  margin: 6px 0;
  padding: 4px 6px;
  overflow: hidden;
  border: 1px solid #d76a31;
  border-radius: 7px;
  background: #ffeddc;
  color: #6f3217;
  text-align: center;
  cursor: grab;
}

.todo-hour-gantt-bar.is-dragging {
  cursor: grabbing;
  border-color: #c2410c;
  box-shadow: 0 2px 8px rgba(194, 65, 12, .16);
}

.todo-hour-gantt-bar.is-resizing {
  cursor: ew-resize;
}

.todo-hour-gantt-bar.has-phases {
  display: block;
  padding: 1px;
  background: #fffdfa;
}

.todo-hour-gantt-phases {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--todo-gantt-span, 1), 1fr);
  min-height: 28px;
  height: 100%;
}

.todo-hour-gantt-bar-copy {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  gap: 1px;
  height: 100%;
}

.todo-hour-gantt-bar strong,
.todo-hour-gantt-bar small,
.todo-hour-gantt-bar-copy strong,
.todo-hour-gantt-bar-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-hour-gantt-bar strong,
.todo-hour-gantt-bar-copy strong {
  font-size: 11px;
}

.todo-hour-gantt-bar small,
.todo-hour-gantt-bar-copy small {
  font-size: 10px;
  opacity: .72;
}

.todo-hour-gantt-bar-done {
  border-color: #55a982;
  background: #dcf5e9;
  color: #216a4a;
}

.todo-gantt-bar {
  position: relative;
  z-index: 1;
  display: block;
  grid-column: var(--todo-gantt-start) / span var(--todo-gantt-span);
  min-width: 0;
  min-height: 30px;
  margin: 6px 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d76a31;
  border-radius: 7px;
  background: #ffeddc;
  color: #6f3217;
  text-align: left;
  cursor: grab;
}

/* 有阶段时 bar 退化为容器，背景由阶段色块填充 */
.todo-gantt-bar.has-phases {
  background: #fffdfa;
  padding: 1px;
}

.todo-gantt-phases {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--todo-gantt-span, 1), 1fr);
  height: 100%;
  min-height: 28px;
}

/* 相邻阶段之间的分割缝：绝对定位浮在交界处，拖动它重新分配左右两段的天数 */
.todo-gantt-phase-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 9px;
  margin-left: -4.5px;
  cursor: ew-resize;
  background: transparent;
}

.todo-gantt-phase-seam::after {
  content: '';
  position: absolute;
  top: 15%;
  bottom: 15%;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: rgba(120, 96, 74, 0.35);
  transition: background 0.12s ease, top 0.12s ease, bottom 0.12s ease;
}

.todo-gantt-phase-seam:hover::after,
.todo-gantt-bar.is-resizing .todo-gantt-phase-seam::after {
  top: 0;
  bottom: 0;
  background: #c2410c;
}

.todo-gantt-bar.is-resizing {
  cursor: ew-resize;
}

.todo-gantt-phase {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  grid-column: var(--phase-start) / span var(--phase-span);
  /* 阶段永远锁定在第一行：拖拽预览期间列号是即时计算的，兜底防止任何非法值把格子挤到第二行。 */
  grid-row: 1;
  padding: 2px 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.todo-gantt-phase:last-child {
  border-right: 0;
}

.todo-gantt-phase.is-todo {
  background: #eef1f5;
  color: #64748b;
}

.todo-gantt-phase.is-doing {
  background: #ffeddc;
  color: #6f3217;
}

.todo-gantt-phase.is-done {
  background: #dcf5e9;
  color: #216a4a;
}

.todo-gantt-phase-copy {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-gantt-phases-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #e7dfd3;
  border-radius: 5px;
  background: #ffffff;
  color: #9a8e80;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
}

.todo-phase-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.todo-phase-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.todo-phase-dot.is-done {
  background: #6cc79b;
}

.todo-phase-dot.is-doing {
  background: #c2410c;
  box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.18);
}

.todo-phase-dot.is-todo {
  background: #dfe4ea;
}

/* 当前阶段名：按钮宽度有限，超出部分省略，完整内容靠 title 悬浮 */
.todo-phase-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-gantt-phases-open:hover {
  border-color: #c2410c;
  color: #c2410c;
}

.todo-gantt-phases-open.is-set {
  border-color: #d3bba4;
  background: #fbf6ee;
  color: #6f3217;
  font-weight: 600;
}

.todo-gantt-bar:hover,
.todo-gantt-bar.is-dragging {
  border-color: #c2410c;
  box-shadow: 0 2px 8px rgba(194, 65, 12, .16);
}

.todo-gantt-bar.is-dragging {
  cursor: grabbing;
}

.todo-gantt-bar-done {
  border-color: #55a982;
  background: #dcf5e9;
  color: #216a4a;
}

.todo-gantt-bar-copy {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  flex: 1;
  gap: 1px;
  padding: 4px 6px;
}

.todo-gantt-bar-copy strong,
.todo-gantt-bar-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.todo-gantt-bar-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.todo-gantt-bar-copy small {
  font-size: 10px;
  opacity: .72;
}

/* 手柄绝对定位浮在两端，不占布局流，保证阶段列宽与日期轴严格 1:1 对齐 */
.todo-gantt-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  z-index: 2;
  cursor: ew-resize;
}

.todo-gantt-handle[data-gantt-edge="start"] {
  left: 0;
}

.todo-gantt-handle[data-hour-gantt-edge="start"] {
  left: 0;
}

.todo-gantt-handle[data-gantt-edge="end"] {
  right: 0;
}

.todo-gantt-handle[data-hour-gantt-edge="end"] {
  right: 0;
}

.todo-gantt-empty {
  display: grid;
  gap: 5px;
  min-height: 160px;
  place-content: center;
  padding: 20px;
  border: 1px dashed #e7dfd3;
  border-radius: 9px;
  color: #9a8e80;
  font-size: 12px;
  text-align: center;
}

.todo-gantt-empty strong {
  color: #5a4f44;
  font-size: 14px;
}

.todo-gantt-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: #9a8e80;
  font-size: 11px;
}

.todo-gantt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.todo-gantt-legend-swatch {
  width: 16px;
  height: 8px;
  border: 1px solid #d76a31;
  border-radius: 3px;
  background: #ffeddc;
}

.todo-gantt-legend-swatch.is-done {
  border-color: #55a982;
  background: #dcf5e9;
}

.todo-gantt-legend-swatch.is-todo {
  border-color: #cbd5e1;
  background: #eef1f5;
}

.todo-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(47, 41, 36, .32);
}

.todo-modal {
  position: fixed;
  z-index: 101;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  padding: 20px;
  border: 1px solid #e7dfd3;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(47, 41, 36, .18);
}

.todo-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.todo-modal-kicker {
  display: block;
  margin-bottom: 5px;
  color: #c2410c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}

.todo-modal h2 {
  margin: 0;
  color: #2f2924;
  font-size: 17px;
  font-weight: 600;
}

.todo-modal-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f7f3ee;
  color: #6f6257;
  cursor: pointer;
}

.todo-modal-close:hover {
  background: #e7dfd3;
  color: #c2410c;
}

.todo-modal-help {
  margin: 0 0 14px;
  color: #9a8e80;
  font-size: 12px;
  line-height: 1.5;
}

.todo-date-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.todo-time-fields {
  margin-top: 12px;
}

.todo-date-fields label,
.todo-completion-field {
  display: grid;
  gap: 6px;
  color: #5a4f44;
  font-size: 12px;
}

.todo-date-fields input,
.todo-completion-field input {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #e7dfd3;
  border-radius: 7px;
  background: #fbf8f3;
  color: #2f2924;
  font: inherit;
}

.todo-date-fields input:focus,
.todo-completion-field input:focus {
  outline: 2px solid rgba(194, 65, 12, .22);
  border-color: #c2410c;
}

.todo-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.todo-modal-secondary,
.todo-modal-primary {
  padding: 8px 13px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
}

.todo-modal-secondary {
  border: 1px solid #e7dfd3;
  background: #ffffff;
  color: #6f6257;
}

.todo-modal-primary {
  border: 1px solid #c2410c;
  background: #c2410c;
  color: #ffffff;
}

.todo-modal-phases {
  width: min(620px, calc(100vw - 32px));
}

.todo-phase-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(46vh, 380px);
  overflow-y: auto;
  padding-right: 2px;
}

.todo-phase-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto minmax(0, 150px) 96px 26px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #ede5da;
  border-radius: 10px;
  background: #fffdfa;
}

.todo-phase-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #e7dfd3;
  border-radius: 7px;
  background: #faf7f2;
  color: #a09180;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.todo-phase-row input[type="text"],
.todo-phase-row input[type="date"],
.todo-phase-row input[type="datetime-local"],
.todo-phase-row select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #e7dfd3;
  border-radius: 7px;
  background: #fbf8f3;
  color: #2f2924;
  font: inherit;
  font-size: 12px;
}

.todo-phase-row input:focus,
.todo-phase-row select:focus {
  outline: 2px solid rgba(194, 65, 12, 0.22);
  border-color: #c2410c;
}

.todo-phase-until {
  color: #9a8e80;
  font-size: 12px;
}

.todo-phase-end-static {
  padding: 6px 8px;
  border: 1px dashed #e0d6c8;
  border-radius: 7px;
  background: #f7f3ee;
  color: #8d7d6c;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.todo-phase-remove {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e7dfd3;
  border-radius: 50%;
  background: #ffffff;
  color: #9a8e80;
  font-size: 11px;
  cursor: pointer;
}

.todo-phase-remove:hover:not(:disabled) {
  border-color: #c2410c;
  color: #c2410c;
}

.todo-phase-remove:disabled {
  cursor: default;
  opacity: 0.35;
}

.todo-phase-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.todo-phase-add,
.todo-phase-even {
  padding: 6px 12px;
  border: 1px dashed #d9cbb8;
  border-radius: 8px;
  background: #ffffff;
  color: #8a5a34;
  font-size: 12px;
  cursor: pointer;
}

.todo-phase-add:hover:not(:disabled),
.todo-phase-even:hover {
  border-style: solid;
  border-color: #c2410c;
  color: #c2410c;
}

.todo-phase-add:disabled {
  cursor: default;
  opacity: 0.45;
}

/* 看板卡片上的阶段缩略条 */
.todo-card-phases {
  display: flex;
  align-items: center;
  gap: 6px;
}

.todo-card-phase-track {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.todo-card-phase {
  height: 5px;
  border-radius: 3px;
  flex: var(--phase-weight, 1);
  min-width: 4px;
}

.todo-card-phase.is-todo { background: #dfe4ea; }
.todo-card-phase.is-doing { background: #f3a06a; }
.todo-card-phase.is-done { background: #6cc79b; }

.todo-card-phase-label {
  flex: 0 0 auto;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #9a8e80;
  font-size: 11px;
}

.todo-modal-secondary:hover {
  border-color: #c2410c;
  color: #c2410c;
}

.todo-modal-primary:hover {
  background: #a9380a;
}

.todo-board-history {
  background: #ffffff;
  border: 1px solid #e7dfd3;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.todo-board-history-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #2f2924;
}

.todo-board-history-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hm-summary {
  color: #9a8e80;
  font-size: 12px;
  white-space: nowrap;
}

.hm-outer {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.hm-chart {
  width: max-content;
  margin: 0 auto;
}

.hm-months {
  display: grid;
  grid-template-columns: 28px repeat(var(--hm-week-count), 17px);
  column-gap: 3px;
  min-width: max-content;
  margin-bottom: 7px;
  font-size: 11px;
  color: #9a8e80;
  line-height: 1;
}

.hm-months > span:first-child {
  grid-column: 1;
}

.hm-month-label {
  font-weight: 400;
  font-size: 11px;
  color: #9a8e80;
  text-align: center;
  padding: 0;
  white-space: nowrap;
}

.hm-grid {
  display: grid;
  grid-template-columns: 28px repeat(var(--hm-week-count), 17px);
  grid-auto-rows: 17px;
  gap: 3px;
  min-width: max-content;
}

.hm-day-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 10px;
  color: #9a8e80;
  padding-right: 4px;
}

.hm-cell {
  width: 17px;
  height: 17px;
  border-radius: 3px;
  background: #ebedf0 !important;
  cursor: pointer;
  transition: all 0.1s ease;
  border: none;
  padding: 0;
  appearance: none;
}

.hm-cell:focus-visible {
  outline: 2px solid #2f2924;
  outline-offset: 2px;
}

.hm-cell:hover {
  transform: scale(1.25);
}

.hm-cell.hm-future {
  background: #f4f4f5 !important;
  cursor: default;
}

.hm-cell.hm-future:hover {
  transform: none;
}

.hm-cell.hm-selected {
  outline: 2px solid #2f2924;
  outline-offset: 2px;
}

.hm-grid .hm-lvl-1 { background: #9be9a8 !important; }
.hm-grid .hm-lvl-2 { background: #40c463 !important; }
.hm-grid .hm-lvl-3 { background: #30a14e !important; }
.hm-grid .hm-lvl-4 { background: #216e39 !important; }
.hm-legend .hm-lvl-1 { background: #9be9a8 !important; }
.hm-legend .hm-lvl-2 { background: #40c463 !important; }
.hm-legend .hm-lvl-3 { background: #30a14e !important; }
.hm-legend .hm-lvl-4 { background: #216e39 !important; }

.hm-legend {
  display: flex;
  align-items: center;
  gap: 3px;
  padding-left: 28px;
  margin-top: 4px;
  font-size: 10px;
  color: #9a8e80;
}

.hm-legend .hm-cell {
  cursor: default;
  width: 17px;
  height: 17px;
  border: none;
}

.hm-popover-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(47, 41, 36, 0.08);
  backdrop-filter: blur(2px);
  z-index: 100;
  animation: hmPopoverFadeIn 0.18s ease;
}

.hm-popover {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(410px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 32px));
  transform: translate(-50%, -50%);
  background: #fffdfa;
  border: 1px solid #ded2c4;
  border-radius: 24px;
  z-index: 101;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(73, 54, 38, 0.2), 0 4px 12px rgba(73, 54, 38, 0.08);
  animation: hmPopoverIn 0.2s cubic-bezier(0.22, 0.8, 0.24, 1);
}

@keyframes hmPopoverFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hmPopoverIn {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.hm-popover-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px 14px;
}

.hm-popover-kicker,
.hm-popover-count,
.hm-popover-date-rel,
.hm-popover-board {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hm-popover-kicker {
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #e7dfd3;
  background: #f7f3ee;
  color: #5a4f44;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hm-popover-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c2410c;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}

.hm-popover-count {
  margin-left: auto;
  padding: 5px 10px;
  background: #edf7ef;
  color: #3e8054;
  font-size: 11px;
  font-weight: 600;
}

.hm-popover-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e7dfd3;
  background: #fff;
  border-radius: 50%;
  color: #8d7d6c;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.hm-popover-close:hover {
  border-color: #c2410c;
  background: #fff4ed;
  color: #c2410c;
}

.hm-popover-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 20px;
  padding: 14px 15px;
  border: 1px solid #ede5da;
  border-radius: 16px;
  background: #fff;
}

.hm-popover-date-value {
  color: #2f2924;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px;
  letter-spacing: 0.02em;
}

.hm-popover-date-rel {
  padding: 5px 9px;
  background: #f7f3ee;
  color: #75685b;
  font-size: 11px;
}

.hm-popover-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 12px 20px 14px;
  overflow-y: auto;
}

.hm-popover-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #eee7dd;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(87, 64, 43, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.hm-popover-item:hover {
  border-color: #dfc5ad;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(87, 64, 43, 0.08);
}

.hm-popover-item-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  border: 1px solid #e7dfd3;
  border-radius: 9px;
  background: #faf7f2;
  color: #a09180;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.hm-popover-item-body {
  min-width: 0;
  flex: 1;
}

.hm-popover-item-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.hm-popover-board {
  gap: 4px;
  padding: 4px 8px;
  background: #f7f3ee;
  color: #806f60;
  font-size: 10px;
}

.hm-popover-item-title {
  margin-top: 6px;
  color: #51463c;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hm-popover-link {
  color: #b34b1b;
  text-decoration: none;
}

.hm-popover-link:hover {
  color: #8e3612;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hm-popover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 16px 30px;
  border: 1px dashed #ded2c4;
  border-radius: 15px;
  color: #9a8e80;
  font-size: 12px;
}

.hm-popover-empty-mark {
  color: #c8b9a8;
  font-size: 18px;
}

.hm-popover-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px 16px;
}

.hm-popover-pagination button {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e7dfd3;
  border-radius: 50%;
  background: #fff;
  color: #75685b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.hm-popover-pagination button:hover:not(:disabled) {
  border-color: #c2410c;
  color: #c2410c;
}

.hm-popover-pagination button:disabled {
  cursor: default;
  opacity: 0.35;
}

.hm-popover-pagination > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid #eee7dd;
  border-radius: 999px;
  background: #faf7f2;
  color: #a09180;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.hm-popover-pagination > span strong {
  color: #5a4f44;
  font-weight: 600;
}

.hm-popover-pagination > span i {
  color: #c8b9a8;
  font-style: normal;
}

@media (max-width: 768px) {
  .todo-board-header {
    align-items: flex-start;
  }

  .todo-board-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .todo-board-history-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .todo-board {
    padding: 16px 12px 40px;
  }

  .todo-board-stats {
    flex-wrap: wrap;
  }

  .todo-board-columns {
    grid-template-columns: 1fr;
  }

  .todo-board-column {
    height: 440px;
  }

  .todo-board-history-group summary {
    flex-wrap: wrap;
  }

  .hm-chart {
    margin-left: 0;
    margin-right: 0;
  }

  .hm-popover {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 20px;
  }

  .hm-popover-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hm-popover-date-row {
    margin-left: 16px;
    margin-right: 16px;
  }

  .hm-popover-section-heading {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hm-popover-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .todo-gantt {
    padding: 16px 12px 12px;
  }

  .todo-gantt-toolbar {
    flex-direction: column;
    gap: 12px;
  }

  .todo-gantt-controls {
    justify-content: flex-start;
  }

  .todo-gantt-grid {
    --todo-gantt-label-width: 150px;
  }

  .todo-hour-gantt-grid {
    --todo-gantt-label-width: 150px;
  }
}

@media (max-width: 480px) {
  .todo-board-view-switch {
    flex: 1;
  }

  .todo-board-view-button {
    flex: 1;
  }

  .todo-board-history-toggle {
    padding-inline: 10px;
  }

  .todo-card-actions {
    gap: 2px;
  }

  .todo-card-action {
    padding-inline: 4px;
  }

  .todo-date-fields {
    grid-template-columns: 1fr;
  }

  .todo-phase-row {
    grid-template-columns: 22px minmax(0, 1fr) 96px 26px;
    row-gap: 6px;
  }

  .todo-phase-row input[name="phaseTitle"] {
    grid-column: 2 / span 3;
  }

  .todo-phase-until {
    grid-column: 1;
    justify-self: center;
  }

  .todo-phase-row input[type="date"],
  .todo-phase-row input[type="datetime-local"],
  .todo-phase-end-static {
    grid-column: 2 / span 1;
  }

  .todo-phase-row select {
    grid-column: 3 / span 1;
  }

  .todo-phase-remove {
    grid-column: 4 / span 1;
  }

  .todo-gantt-grid {
    --todo-gantt-label-width: 118px;
  }

  .todo-hour-gantt-grid {
    --todo-gantt-label-width: 118px;
  }

  .todo-gantt-bar-copy strong {
    font-size: 10px;
  }
}
