/* 图内缩放与拖动，不改变页面或文字的缩放比例。 */
.task-timeline-task-list, .task-timeline-task-row, .task-timeline-attachment, .task-timeline-panel { min-width: 0; max-width: 100%; }
.task-timeline-task-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.task-timeline-task-row:last-child { border-bottom: 0; }
.task-timeline-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-timeline-row-info { min-width: 0; }
.task-timeline-row-info h3 { font-size: 14px; line-height: 21px; overflow-wrap: anywhere; margin: 0; }
.task-timeline-row-info p { font-size: 12px; line-height: 20px; margin: 2px 0 0; overflow-wrap: anywhere; }
.task-timeline-row-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.task-timeline-row-actions > a { font-size: 12px; white-space: nowrap; }
.task-timeline-panel { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.task-timeline-panel:not(.hidden) { animation: task-timeline-open 150ms ease-out; }
.task-timeline-arrow { display: inline-flex; align-items: center; justify-content: center; width: 36px; min-width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); cursor: pointer; }
.task-timeline-arrow:hover, .task-timeline-arrow[aria-expanded="true"] { background: var(--bg); color: var(--text); }
.task-timeline-arrow svg { transition: transform 150ms ease; }
.task-timeline-arrow[aria-expanded="true"] svg { transform: rotate(180deg); }
.task-timeline-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 6px; }
.task-timeline-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-2); font-size: 11px; line-height: 20px; }
.task-timeline-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.task-timeline-year { color: var(--text-2); }
.task-timeline-key { display: inline-flex; width: 9px; height: 9px; align-items: center; justify-content: center; font-size: 7px; font-style: normal; }
.task-timeline-key-plan { transform: rotate(45deg); background: var(--info); border: 1px solid var(--info); }
.task-timeline-key-actual { background: var(--tone-ok-ink); color: var(--on-success); border-radius: 999px; }
.task-timeline-tools { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
.task-timeline-tool { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 30px; padding: 0 5px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.task-timeline-tool:hover { background: var(--bg); color: var(--text); }
.task-timeline-tool:disabled { opacity: .35; cursor: default; }
.task-timeline-reset, .task-timeline-refresh { font-size: 11px; }
.task-timeline-zoom-value { min-width: 42px; font-size: 11px; color: var(--text-2); text-align: center; }
.task-timeline-scroll { overflow: auto; width: 100%; max-width: 100%; max-height: 460px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); overscroll-behavior-x: contain; overscroll-behavior-y: auto; touch-action: auto; cursor: grab; }
.task-timeline-scroll.is-dragging, .task-timeline-scroll.is-dragging * { cursor: grabbing; }
.task-timeline-canvas { position: relative; isolation: isolate; user-select: none; }
.task-timeline-lines { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.task-timeline-axis { stroke: var(--line-strong); stroke-width: 1.25; }
.task-timeline-correspondence { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 4; opacity: .5; transition: opacity 120ms ease, stroke-width 120ms ease; }
.task-timeline-correspondence.is-highlighted { stroke: var(--info); stroke-width: 2; opacity: 1; }
.task-timeline-today-line { stroke: var(--brand); stroke-width: 1; stroke-dasharray: 3 6; opacity: .35; }
.task-timeline-today { position: absolute; transform: translateX(-50%); font-size: 10px; line-height: 15px; background: var(--card); padding: 0 3px; color: var(--brand); }
.task-timeline-tick { position: absolute; transform: translateX(-50%); font-size: 10px; line-height: 14px; color: var(--text-2); white-space: nowrap; }
.task-timeline-point { position: absolute; width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; transition: box-shadow 120ms ease; }
.task-timeline-point-plan { transform: translate(-50%, -50%) rotate(45deg); background: var(--info); border: 1.5px solid var(--info); }
.task-timeline-point-actual { transform: translate(-50%, -50%); border-radius: 999px; background: var(--tone-ok-ink); border: 1.5px solid var(--tone-ok-ink); color: var(--on-success); font-size: 9px; font-weight: 600; }
.task-timeline-point-faded { background: var(--bg); border-color: var(--line-strong); }
.task-timeline-point.is-highlighted { box-shadow: 0 0 0 4px var(--bg); }
.task-timeline-label { position: absolute; width: 140px; height: 48px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 2px 5px; font-size: 12px; line-height: 17px; background: var(--card); border-radius: var(--radius-sm); transition: background 120ms ease, box-shadow 120ms ease; }
.task-timeline-label strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-timeline-label-actual { color: var(--tone-ok-ink); }
.task-timeline-label-plan { color: var(--text); }
.task-timeline-label.is-highlighted { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.task-timeline-label-meta { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.task-timeline-point-state { font-size: 11px; color: var(--tone-warn-ink); }
.task-timeline-undated { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--text-2); font-size: 11px; line-height: 18px; overflow-wrap: anywhere; }
.task-timeline-details { margin-top: 4px; }
.task-timeline-details > summary { padding: 6px 0; cursor: pointer; font-size: 11px; color: var(--text-2); }
.task-timeline-detail-row { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; font-size: 12px; line-height: 19px; }
.task-timeline-detail-row strong { font-weight: 500; }
.task-timeline-toggle:focus-visible, .task-timeline-tool:focus-visible, .task-timeline-label:focus-visible, .task-timeline-scroll:focus-visible, .task-timeline-details > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@keyframes task-timeline-open { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 767px) {
  .task-timeline-scroll { max-height: 420px; }
  .task-timeline-row-head { gap: 8px; }
  .task-timeline-row-actions { gap: 6px; }
  .task-timeline-row-actions .tag { max-width: 60px; font-size: 10px; padding: 2px 4px; }
  .task-timeline-arrow { width: 44px; min-width: 44px; height: 44px; }
  .task-timeline-tool { min-width: 44px; min-height: 44px; }
  .task-timeline-row-actions > a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .task-timeline-details > summary { display: flex; align-items: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .task-timeline-panel:not(.hidden) { animation: none; }
  .task-timeline-arrow svg, .task-timeline-correspondence, .task-timeline-point, .task-timeline-label { transition: none; }
}
