:root {
  color-scheme: light;
  --ink: #1c2024;
  --ink-soft: #3f4352;
  --muted: #626572;
  --faint: #777a89;
  --line: #e5e6ed;
  --line-strong: #d9dce6;
  --paper: #f8f9fc;
  --white: #fff;
  --iris-3: #f0f1fe;
  --iris-4: #e6e7ff;
  --iris-6: #cbcdff;
  --iris-8: #9b9ef0;
  --iris-9: #5b5bd6;
  --iris-10: #5151cd;
  --iris-12: #272962;
  --accent: var(--iris-10);
  --radius: 16px;
  --ease: cubic-bezier(.2, .75, .3, 1);
  --plot-height: clamp(374px, 44vh, 478px);
  font: 14px/1.5 "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

*, ::before, ::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip-path: inset(50%); white-space: nowrap; border: 0; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .42; }
:focus-visible { outline: 2px solid var(--iris-9); outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }
::selection { color: var(--iris-12); background: var(--iris-4); }
.icon-library { width: 0; height: 0; position: absolute; overflow: hidden; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.icon-btn, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-soft); white-space: nowrap; font-size: 13px; font-weight: 600; line-height: 1.2; transition: color 160ms, background-color 160ms, border-color 160ms; }
.btn { padding: 0 12px; }
.icon-btn { inline-size: 36px; padding: 0; }
.icon-btn:not(:disabled):hover, .btn-quiet:not(:disabled):hover { background: #eff0f5; color: var(--ink); }
.btn-outline { background: var(--white); border-color: var(--line); }
.btn-outline:not(:disabled):hover { background: #f7f7fd; border-color: var(--iris-6); }
.btn-primary { color: white; background: var(--accent); border-color: var(--accent); box-shadow: inset 0 1px 0 #ffffff2e, 0 2px 4px #34358f1c; }
.btn-primary:not(:disabled):hover { background: #4545ba; border-color: #4545ba; }
.btn-danger-text { color: #a42d3c; }
.btn-danger-text:hover { background: #ffeff0; }
.btn-danger { color: #fff; background: #b32940; border-color: #b32940; }
.btn-danger:hover { background: #97263a; }
.btn .icon { width: 17px; height: 17px; }

.app-header { background: #fff; border-bottom: 1px solid #e7e8f0; }
.header-inner, .page { width: min(100%, 1680px); margin-inline: auto; padding-inline: clamp(19px, 4vw, 62px); }
.header-inner { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand, .header-actions, .history, .file-actions { display: flex; align-items: center; }
.brand { gap: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 2px 3px #5b5bd631); }
.brand-name { font-size: 21px; font-weight: 750; letter-spacing: -.035em; white-space: nowrap; }
.brand-context { color: var(--faint); margin-left: 9px; padding-left: 17px; border-left: 1px solid var(--line-strong); font-size: 13px; white-space: nowrap; }
.header-actions { gap: 11px; }
.history { gap: 1px; padding-right: 10px; border-right: 1px solid var(--line); }
.file-actions { gap: 1px; }

.page { padding-block: 32px 16px; }
.project-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; }
.project-title { min-width: 0; }
.title-line { display: flex; gap: 9px; align-items: center; }
.title-line h1 { margin: 0; font-size: clamp(28px, 3.1vw, 42px); font-weight: 720; line-height: 1.18; letter-spacing: -.05em; overflow-wrap: anywhere; }
.edit-title { color: var(--faint); flex: none; }
.edit-title .icon { width: 16px; height: 16px; }
.project-title p { color: var(--muted); margin: 8px 0 0; }
.project-actions { display: flex; gap: 9px; flex: none; }
.project-actions .btn { min-height: 39px; }
.date-btn > span, .project-actions .icon { color: var(--muted); }
.date-btn strong { font-variant-numeric: tabular-nums; }
.date-btn .caret { width: 13px; height: 13px; margin-left: 2px; }

.metrics { display: grid; grid-template-columns: 1.05fr 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.metric { min-width: 0; min-height: 116px; padding: 18px 21px; display: flex; align-items: flex-start; gap: 13px; position: relative; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-finish { background: linear-gradient(115deg, #f7f7ff 0%, #f1f1ff 83%, #eef0ff 100%); color: var(--iris-12); isolation: isolate; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; margin-top: 1px; flex: none; }
.metric-finish .metric-icon { color: var(--iris-10); background: #e4e6ff; }
.metric-route .metric-icon { color: #514fbf; background: #eeefff; }
.metric-tasks .metric-icon { color: #176b65; background: #e3f5f0; }
.metric-orbit { position: absolute; z-index: -1; inset: auto -1px -1px auto; width: min(48%, 184px); height: auto; color: #cdcefa; stroke: currentColor; stroke-width: 1; pointer-events: none; opacity: .8; }
.metric-orbit .orbit-dot { fill: #a8a9f2; stroke: #f7f7ff; stroke-width: 1.5px; }
.metric dl, .metric dd { margin: 0; }
.metric dt { color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.4; }
.metric dd:not(.metric-meta) { margin-block: 2px 3px; font-size: 34px; font-weight: 685; line-height: 1.15; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric small { color: var(--muted); margin-left: 7px; font-size: 13px; font-weight: 550; letter-spacing: 0; }
.metric-finish small { color: var(--iris-12); margin: 0 4px; font-size: 17px; font-weight: 650; }
.metric dd.metric-meta { color: var(--muted); font-size: 12px; font-weight: 500; }
.metric #finish-meta[data-shift="later"] { color: #a43c38; }
.metric #finish-meta[data-shift="earlier"] { color: #1f755a; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(265px, 300px); align-items: stretch; gap: 16px; margin-top: 19px; }
.workbench, .inspector { min-width: 0; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); box-shadow: 0 2px 3px #27296205; }
.workbench { overflow: hidden; }
.workbench-toolbar { min-height: 57px; padding: 8px 13px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.view-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; background: #f2f3f8; }
.view-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 31px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 600; transition: color 150ms, background-color 150ms; }
.view-btn[aria-pressed="true"] { border-color: #e2e4ed; background: #fff; box-shadow: 0 1px 2px #2729620d; color: var(--iris-12); }
.view-btn:hover:not([aria-pressed="true"]) { color: var(--ink); background: #e9eaf3; }
.view-btn .icon { width: 16px; height: 16px; }
.toolbar-actions { display: flex; align-items: center; gap: 4px; }
.toolbar-actions .tool-button { min-height: 34px; padding-inline: 9px; }
.tool-button[aria-pressed="true"] { color: var(--iris-10); background: var(--iris-3); border-color: var(--iris-4); }
.tool-button[aria-pressed="true"]:hover { background: var(--iris-4); color: var(--iris-12); }
.toolbar-square { height: 34px; width: 34px; min-height: 34px; }

.graph-pane, .gantt-pane { height: var(--plot-height); position: relative; border-block: 1px solid var(--line); isolation: isolate; }
.graph-pane {
  background: radial-gradient(circle, #c9cbdf 0.8px, transparent 1.15px) 4px 4px / 17px 17px,
    radial-gradient(ellipse at 55% 5%, #eeeffe, transparent 70%),
    radial-gradient(ellipse at 100% 95%, #efeefd, transparent 67%), #f9faff;
}
.graph-viewport { position: absolute; inset: 0 0 51px; overflow: hidden; cursor: grab; touch-action: none; outline-offset: -3px; }
.graph-viewport.is-grabbing { cursor: grabbing; }
.graph-viewport[data-linking] .task-node { cursor: crosshair; }
.graph-world { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform-origin: top left; pointer-events: none; }
.edge-plane { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#edge-group > g { transition: opacity 160ms; }
.edge-line { stroke: #a9acc0; stroke-width: 1.55; fill: none; marker-end: url(#arrow-muted); }
.edge-line.critical { stroke: #6b67df; stroke-width: 1.8; marker-end: url(#arrow-critical); }
.edge-current { stroke: #8a83f1; stroke-width: 2; fill: none; opacity: 0; }
.is-flowing .edge-current { opacity: 1; }
.edge-line.critical + .edge-current { stroke: #e3e0ff; }
.graph-viewport[data-playing] .edge-current { stroke-dasharray: 3 8; }
#edge-group .is-dim { opacity: .24; }

[data-group="product"] { --group-bg: #eaf0ff; --group-ink: #3d5bac; --group-bar: #6082d6; }
[data-group="design"] { --group-bg: #efeaff; --group-ink: #6644ac; --group-bar: #9271d3; }
[data-group="build"] { --group-bg: #e4f5f2; --group-ink: #1c7268; --group-bar: #3b9f8d; }
[data-group="content"] { --group-bg: #fff1df; --group-ink: #936014; --group-bar: #c58b40; }
.task-node {
  position: absolute; left: 0; top: 0; width: 158px; height: 64px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center;
  border: 1px solid #dfe0eb; border-radius: 11px; background: #fff; padding: 8px 9px;
  color: var(--ink); text-align: left; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  box-shadow: 0 2px 5px #3236640d; transition: border-color 160ms, background-color 160ms, opacity 180ms, box-shadow 160ms;
}
.task-node.critical { border-color: #c9c9f4; }
.task-node.is-dim:not(.is-selected):not(:focus-visible):not(:hover) { opacity: .39; }
.task-node:hover { z-index: 2; border-color: #9d9bee; box-shadow: 0 3px 9px #5c5cd525; }
.task-node.is-selected { z-index: 3; border-color: #7976e5; background: #fcfbff; box-shadow: 0 0 0 3px #dcdcffbf, 0 7px 16px #5b57ca20; }
.task-node.is-source { border-color: var(--accent); outline: 2px dashed var(--iris-9); outline-offset: 4px; }
.task-node.is-dragging { z-index: 5; cursor: grabbing; }
.task-node .port { position: absolute; top: 28px; width: 7px; height: 7px; border: 1.4px solid #aaadc1; background: #fff; border-radius: 50%; }
.task-node .port.in { left: -4px; }
.task-node .port.out { right: -4px; }
.task-node.critical .port { border-color: #8d89e9; }
.task-node.is-selected .port { border-color: #6865e1; }
.task-node[data-status="active"] { background: #f0efff; border-color: #8d86e9; }
.task-node[data-status="done"] { background: #f3faf8; border-color: #abd8cc; }
.task-node[data-status="done"] .node-indicator { display: block; background: #368977; }
.task-node[data-status="active"] .node-indicator { display: block; background: #7268e0; }
.node-indicator { display: none; position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; }
.node-icon { display: grid; place-items: center; width: 30px; height: 30px; background: var(--group-bg); color: var(--group-ink); border-radius: 7px; flex: none; }
.node-icon .icon { width: 17px; height: 17px; }
.node-copy { min-width: 0; }
.node-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 670; }
.node-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.node-meta em { color: #a0a2b1; font-size: 10px; font-style: normal; }
.graph-bottom { position: absolute; inset: auto 13px 11px; display: flex; align-items: end; justify-content: space-between; gap: 6px; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 11px; color: var(--muted); background: #fcfcffd9; border: 1px solid #e7e8f2; padding: 6px 9px; border-radius: 7px; }
.legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.swatch { width: 14px; height: 2px; border-radius: 4px; background: #a5a8bd; }
.swatch.is-critical { background: #706ce0; }
.camera-controls { display: flex; align-items: center; height: 35px; padding: 2px; gap: 1px; background: #fff; border: 1px solid #e0e1ed; border-radius: 8px; box-shadow: 0 2px 5px #3236640c; pointer-events: auto; }
.camera-controls .icon-btn { width: 29px; min-height: 29px; border-radius: 6px; }
.camera-controls .icon { width: 16px; height: 16px; }
#zoom-value { min-width: 38px; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.camera-controls .fit-button { margin-left: 3px; border-left-color: var(--line); border-radius: 0 6px 6px 0; }
.link-guide { position: absolute; top: 10px; left: 12px; max-width: calc(100% - 24px); z-index: 6; display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border: 1px solid var(--iris-6); background: #fff; color: var(--iris-12); border-radius: 8px; box-shadow: 0 3px 10px #4c4cc416; font-size: 12px; overflow-wrap: anywhere; }
.link-guide .icon { width: 15px; height: 15px; }
.link-guide .icon-btn { min-height: 29px; width: 29px; flex: none; }
.graph-inspect { display: none; position: absolute; top: 9px; right: 9px; min-height: 33px; padding-inline: 7px; border-color: #e1e2f0; background: #fcfcff; gap: 4px; font-size: 12px; }
.graph-inspect .icon { width: 13px; height: 13px; }
.empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 20px; color: var(--muted); text-align: center; pointer-events: none; }
.empty > * { pointer-events: auto; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--iris-4); color: var(--iris-10); }
.empty-icon .icon { width: 25px; height: 25px; }
.empty h3 { margin: 3px 0 0; color: var(--ink); font-size: 17px; }
.empty p { margin: 0 0 3px; }

.transport { display: flex; align-items: center; gap: 12px; padding: 13px 15px; min-height: 70px; }
.play-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #5855d1; border-radius: 11px; background: var(--iris-9); color: white; box-shadow: inset 0 1px 0 #ffffff30, 0 2px 4px #5b5bd628; transition: background-color 155ms; }
.play-btn:hover:not(:disabled) { background: #4747bd; }
.play-btn .icon { width: 21px; height: 21px; }
.transport-id { display: grid; gap: 1px; margin-right: 8px; min-width: 66px; }
.transport-id strong { font-size: 13px; font-weight: 680; }
.transport-id span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.transport-track { flex: 1; min-width: 0; display: grid; gap: 1px; align-content: center; }
.transport-labels { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
#play-day { color: var(--iris-12); font-weight: 650; }
#play-range { --played: 0%; appearance: none; display: block; width: 100%; height: 21px; margin: 0; padding: 0; background: transparent; cursor: pointer; accent-color: var(--iris-9); }
#play-range:disabled { cursor: default; opacity: .5; }
#play-range::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; background: linear-gradient(90deg, #7773e5 var(--played), #e6e7f2 var(--played)); }
#play-range::-moz-range-track { height: 5px; border-radius: 5px; background: linear-gradient(90deg, #7773e5 var(--played), #e6e7f2 var(--played)); }
#play-range::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -4.5px; border: 2px solid #fff; border-radius: 50%; background: var(--iris-9); box-shadow: 0 0 0 1px #a8a6f0; }
#play-range::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: var(--iris-9); box-shadow: 0 0 0 1px #a8a6f0; }
.transport-actions { display: flex; gap: 4px; align-items: center; margin-left: 4px; }
.speed-btn { width: 39px; min-height: 32px; border-color: var(--line); font-variant-numeric: tabular-nums; }
.speed-btn:hover:not(:disabled) { background: var(--iris-3); }
.transport-actions .icon-btn { width: 32px; min-height: 32px; }
.transport-actions .icon { width: 17px; height: 17px; }

.inspector { padding: 16px 17px; display: flex; flex-direction: column; min-height: 0; }
.inspector-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 650; border-bottom: 1px solid var(--line); padding: 3px 2px 12px; }
#inspector-title { color: inherit; font: inherit; letter-spacing: normal; margin: 0; }
.serial { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .035em; }
.inspector-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.inspector-main { padding-top: 15px; }
.identity-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; flex-wrap: wrap; }
.identity-row .node-icon { width: 36px; height: 36px; border-radius: 9px; }
.identity-row .node-icon .icon { width: 19px; height: 19px; }
.identity-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); background: #f2f3f7; font-size: 11px; font-weight: 650; line-height: 1.1; border-radius: 5px; padding: 5px 7px; white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; }
.badge.is-critical { color: var(--iris-10); background: var(--iris-3); }
.badge[data-status="done"] { color: #176451; background: #e2f5ee; }
.badge[data-status="active"] { color: #453ac4; background: #e9e6ff; }
.inspector h2 { color: var(--ink); font-size: 22px; font-weight: 690; line-height: 1.3; letter-spacing: -.034em; margin: 8px 0 4px; overflow-wrap: anywhere; }
.task-summary { margin: 0; min-height: 38px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.task-numbers { display: grid; grid-template-columns: 1fr 1fr; margin: 11px 0 0; border: 1px solid #e9eaf0; border-radius: 9px; background: #f8f9fc; }
.task-numbers div { padding: 8px 9px; }
.task-numbers div + div { border-left: 1px solid #e9eaf0; }
.task-numbers dt, .detail-block h3 { color: var(--muted); font-size: 11px; font-weight: 600; margin: 0; }
.task-numbers dd { margin: 2px 0 0; font-size: 19px; line-height: 1.15; font-weight: 670; font-variant-numeric: tabular-nums; }
.task-numbers small { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 500; }
.detail-block { margin-top: 12px; }
.date-window { display: flex; align-items: center; gap: 5px; min-height: 25px; margin-top: 2px; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.date-window svg { width: 14px; height: 14px; color: var(--faint); }
.neighbor-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; max-height: 75px; overflow: auto; padding: 3px; margin-inline: -3px; }
.neighbor { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 25px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.neighbor:hover { background: var(--iris-3); border-color: var(--iris-6); }
.neighbor .node-icon { border-radius: 3px; width: 16px; height: 16px; }
.neighbor .icon { width: 11px; height: 11px; }
.neighbor span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.none { color: var(--faint); font-size: 11px; }
.inspector-actions { padding-top: 12px; margin-top: auto; }
.inspector-actions .btn { width: 100%; }
.inspector-placeholder { display: grid; place-content: center; gap: 8px; min-height: 180px; text-align: center; color: var(--muted); }
.inspector-placeholder .empty-icon { margin-inline: auto; }
.page-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; padding: 12px 2px 0; color: var(--muted); font-size: 11px; }
#save-status { display: inline-flex; align-items: center; gap: 6px; }
#save-status i { width: 6px; height: 6px; border-radius: 50%; background: #389782; box-shadow: 0 0 0 3px #d9f0e9; }
#save-status[data-error] i { background: #b66a28; box-shadow: 0 0 0 3px #fae9d7; }

.gantt-pane { background: #fff; }
.gantt-scroll { height: 100%; overflow: auto; overscroll-behavior: contain; outline-offset: -3px; }
.gantt-table { --gantt-label-width: 154px; width: max(100%, calc(var(--axis-min) + var(--gantt-label-width))); border-spacing: 0; font-size: 12px; table-layout: fixed; }
.gantt-table th, .gantt-table td { padding: 0; border-bottom: 1px solid #ebeaf0; }
.gantt-table thead th { position: sticky; top: 0; z-index: 3; background: #f7f7fc; height: 36px; font-weight: 650; }
.gantt-table .gantt-label { position: sticky; left: 0; z-index: 2; width: var(--gantt-label-width); text-align: left; border-right: 1px solid #e6e5ef; background: #fff; }
.gantt-table thead .gantt-label { padding-left: 13px; z-index: 4; background: #f7f7fc; color: var(--muted); }
.gantt-table tbody tr { height: 40px; }
.gantt-table tbody tr.is-selected .gantt-label { background: #f1f0ff; }
.gantt-label .gantt-pick { display: flex; align-items: center; gap: 6px; max-width: 100%; height: 37px; border: 0; outline-offset: -2px; background: transparent; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 0 10px; }
.gantt-pick span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-pick:hover span:last-child { text-decoration: underline; }
.gantt-pick .node-icon { width: 19px; height: 19px; border-radius: 5px; }
.gantt-pick .node-icon .icon { width: 13px; height: 13px; }
.gantt-time { position: relative; min-width: var(--axis-min); background-image: linear-gradient(to right, #ececf6 1px, transparent 1px); background-size: calc(100% / var(--tick-columns)) 100%; }
.gantt-table tbody tr:nth-child(even) .gantt-time { background-color: #fbfbfd; }
.gantt-table tbody tr.is-selected .gantt-time { background-color: #f7f6ff; }
.axis-tick { position: absolute; inset: 0 auto 0 var(--left); display: flex; align-items: center; border-left: 1px solid #e8e8f1; padding: 0 5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 10px; }
.axis-tick:first-child { border-left: 0; }
.gantt-bar, .gantt-ghost { position: absolute; left: var(--left); width: var(--width); min-width: 5px; border-radius: 5px; background: var(--group-bg); border: 1px solid var(--group-bar); color: var(--group-ink); }
.gantt-bar { display: grid; place-items: center; top: 8px; height: 23px; font-size: 11px; font-weight: 650; white-space: nowrap; padding: 0; }
.gantt-bar span { overflow: hidden; max-width: 100%; }
.gantt-bar.critical { background: #eeedff; color: var(--iris-12); border-color: #8883e8; }
.gantt-table tr.is-selected .gantt-bar { box-shadow: 0 0 0 2px #dcdcff; }
.gantt-time[data-with-ghost] .gantt-bar { top: 5px; height: 21px; }
.gantt-ghost { top: 30px; height: 6px; border-color: #a8a9bc; background: repeating-linear-gradient(135deg, #d9dae6 0 2px, #f1f1f7 2px 4px); opacity: .9; pointer-events: none; }
.gantt-bar[data-status="done"] { background: #e2f5ee; border-color: #59a895; color: #176451; }
.gantt-bar[data-status="active"] { background: #dfddff; border-color: #635ede; color: var(--iris-12); }
.gantt-table tr.is-dim:not(.is-selected) .gantt-bar { opacity: .39; }
.gantt-table[data-sim] .gantt-time::after { position: absolute; z-index: 1; inset: 0 auto 0 min(calc(100% - 2px), var(--cursor)); content: ""; width: 2px; background: #8b80ee; opacity: .79; pointer-events: none; }

dialog { width: min(480px, calc(100% - 24px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 16px 65px #27296232, 0 4px 18px #2729621d; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: #23244468; overflow: hidden; overscroll-behavior: contain; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 20px; line-height: 1.35; margin: 0; letter-spacing: -.035em; }
.dialog-body { display: grid; gap: 13px; padding: 17px; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field { display: block; min-width: 0; color: var(--ink-soft); font-weight: 650; font-size: 13px; }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 38px; margin-top: 4px; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fcfcfe; color: var(--ink); outline-offset: 1px; font-size: 14px; font-weight: 500; }
.field textarea { resize: vertical; min-height: 56px; max-height: 190px; }
.optional, .field-help { color: var(--muted); font-size: 11px; font-weight: 500; }
.field-help { margin: -5px 0 0; }
.deps-field { min-width: 0; padding: 6px 9px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 0; }
.deps-field legend { font-size: 13px; font-weight: 650; padding-inline: 4px; }
.deps-field p { margin: 0 2px 5px; color: var(--muted); font-size: 11px; }
.dependency-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4px; overflow: auto; max-height: 118px; padding: 2px; }
.dependency-options label { display: flex; align-items: center; gap: 5px; min-height: 29px; border-radius: 5px; padding: 2px; font-size: 12px; overflow-wrap: anywhere; }
.dependency-options label:hover { background: #f3f2fd; }
.dependency-options label:has(input:disabled) { color: var(--faint); }
.dependency-options input { flex: none; margin: 0 2px 0 0; accent-color: var(--accent); }
.dialog-actions { display: flex; justify-content: end; align-items: center; flex-wrap: wrap; gap: 7px; padding: 12px 17px; border-top: 1px solid var(--line); background: #fafafe; }
.spacer { flex: 1; }
.form-error { background: #fff0f1; color: #9e2738; font-size: 12px; padding: 7px 9px; border-radius: 6px; margin: 0; }
.baseline-stats { border: 1px solid var(--line); border-radius: 9px; border-spacing: 0; overflow: hidden; width: 100%; font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.baseline-stats th, .baseline-stats td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.baseline-stats tbody tr:last-child > * { border-bottom: 0; }
.baseline-stats thead { background: #f6f6fe; color: var(--iris-12); }
.baseline-stats th:first-child { text-align: left; }
.baseline-body p { margin: 0; color: var(--muted); font-size: 12px; }
.baseline-body .baseline-delta { font-size: 16px; color: var(--iris-12); font-weight: 670; }
.baseline-changes { margin: 0; padding-left: 19px; font-size: 12px; color: var(--muted); max-height: 115px; overflow: auto; overflow-wrap: anywhere; }

.toast { position: fixed; z-index: 9; inset: auto 17px 18px auto; max-width: min(440px, calc(100% - 34px)); display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 9px; color: white; background: #2c2e48; box-shadow: 0 4px 15px #28294d2a; font-size: 13px; pointer-events: none; opacity: 0; }
.toast.is-visible { opacity: 1; }
.toast[data-error] { background: #7d2b3a; }
.toast .icon { width: 16px; height: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .project-head, .metrics, .workspace { animation: arrive 360ms var(--ease) both; }
  .metrics { animation-delay: 45ms; }
  .workspace { animation-delay: 85ms; }
  .graph-world.camera-ease { transition: transform 250ms var(--ease); }
  .graph-pane:not([hidden]), .gantt-pane:not([hidden]) { animation: pane-in 210ms var(--ease); }
  .inspector-main { animation: details-in 200ms var(--ease); }
  .graph-viewport[data-playing] .is-flowing .edge-current { animation: flow 500ms linear infinite; }
  .graph-viewport[data-playing] .task-node[data-status="active"] .node-indicator { animation: signal 1.5s ease-out infinite; }
  dialog[open] { animation: dialog-in 210ms var(--ease) both; }
  .toast { transform: translateY(5px); transition: opacity 180ms ease-out, transform 200ms var(--ease); }
  .toast.is-visible { transform: translateY(0); }
  @keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
  @keyframes pane-in { from { opacity: .68; } }
  @keyframes details-in { from { opacity: .7; transform: translateY(3px); } }
  @keyframes flow { to { stroke-dashoffset: -11; } }
  @keyframes signal { 0% { box-shadow: 0 0 0 0 #7168eb62; } 75%, 100% { box-shadow: 0 0 0 5px #7168eb00; } }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(6px) scale(.988); } }
}

@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 246px; gap: 12px; }
  .inspector { padding-inline: 13px; }
  .transport { gap: 8px; }
  .transport-id { margin-right: 1px; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .inspector { padding-inline: 16px; }
  .graph-inspect { display: inline-flex; }
  .inspector-actions { max-width: 250px; }
  .inspector-content { min-height: 120px; }
  .metric { padding-inline: 12px; gap: 8px; }
  .metric-icon { width: 32px; height: 32px; }
  .metric-icon .icon { width: 16px; height: 16px; }
}
@media (max-width: 600px) {
  :root { --plot-height: 330px; }
  .header-inner, .page { padding-inline: 12px; }
  .header-inner { min-height: 59px; }
  .brand { gap: 7px; }
  .brand-context, .file-button span { display: none; }
  .header-actions { gap: 3px; }
  .history { border-right: 0; padding-right: 0; gap: 0; }
  .header-actions .icon-btn, .file-button { min-width: 32px; width: 32px; padding-inline: 0; }
  #new-task { padding-inline: 8px; gap: 3px; }
  .page { padding-top: 22px; }
  .project-head { flex-wrap: wrap; margin-bottom: 15px; gap: 12px; }
  .project-title p { margin-top: 5px; font-size: 13px; }
  .project-actions .btn { min-height: 34px; padding-inline: 9px; }
  .metric { min-height: 98px; padding: 11px 8px 10px; }
  .metric-icon { display: none; }
  .metric dt { font-size: 11px; }
  .metric dd:not(.metric-meta) { font-size: clamp(21px, 6vw, 29px); margin-block: 4px 2px; }
  .metric small { margin-left: 3px; font-size: 10px; }
  .metric-finish small { margin: 0 2px; font-size: 11px; }
  .metric dd.metric-meta { font-size: 10px; }
  .metric-orbit { opacity: .56; }
  .workspace { margin-top: 12px; }
  .workbench-toolbar { min-height: 54px; padding: 7px 8px; gap: 5px; }
  .view-btn { gap: 5px; padding-inline: 7px; font-size: 12px; }
  .toolbar-actions { gap: 3px; }
  .toolbar-actions .tool-button, .toolbar-actions .toolbar-square { min-height: 35px; width: 35px; padding: 0; }
  .toolbar-actions .tool-button > span { display: none; }
  .graph-bottom { inset: auto 7px 8px; }
  .legend { gap: 5px; padding-inline: 5px; }
  .legend .swatch { width: 9px; }
  .graph-viewport { touch-action: pan-y pinch-zoom; }
  .transport { padding: 9px 8px; gap: 6px; }
  .transport-id { min-width: 55px; }
  .transport-id strong { font-size: 12px; }
  .transport-actions { margin-left: 1px; gap: 1px; }
  .speed-btn { width: 32px; padding-inline: 3px; }
  .transport-actions .icon-btn { width: 29px; }
  .play-btn { width: 36px; height: 36px; }
  .gantt-table { --gantt-label-width: 106px; }
  .gantt-label .gantt-pick { padding: 0 5px; gap: 3px; font-size: 11px; }
  .gantt-label .node-icon { width: 16px; height: 16px; }
  .footer-detail { display: none; }
}
@media (max-width: 340px) {
  .brand-mark { width: 29px; height: 29px; }
  .brand-name { font-size: 18px; }
  .header-actions .icon-btn, .file-button { min-width: 26px; width: 26px; }
  .metrics { grid-template-columns: 1.15fr 1fr 1fr; }
}
