/* Scoped project graph. Owner colors intentionally fill task cards; workflow
   status and selection use separate signals. No demo data or global theme override. */
.tg-board { --tg-canvas: #f6f8fc; --tg-grid: #d7e2f2; --tg-boundary: #8c9fb8; --tg-panel: var(--surface); color: var(--text-1); font-size: 13px; }
.tg-board [hidden] { display: none !important; }
.tg-board button, .tg-board input, .tg-board select, .tg-board textarea { font: inherit; }
.tg-board button { cursor: pointer; }
.tg-board button:disabled { cursor: not-allowed; opacity: .48; }
.tg-board button:focus-visible, .tg-board a:focus-visible, .tg-board input:focus-visible, .tg-board select:focus-visible, .tg-board textarea:focus-visible, .tg-board [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tg-summary, .tg-toolbar, .tg-owner-legend, .tg-filter-note, .tg-foot { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tg-summary { justify-content: space-between; margin-bottom: 14px; }
.tg-summary > div:first-child { display: flex; align-items: baseline; gap: 15px; flex-wrap: wrap; }
.tg-summary strong { font-size: 21px; letter-spacing: -.04em; }
.tg-summary span { color: var(--text-2); }
.tg-btn { border: 1px solid var(--sep-strong); color: var(--text-2); background: var(--surface); padding: 7px 10px; border-radius: 7px; line-height: 1.4; white-space: nowrap; }
.tg-btn:hover { background: var(--fill-hover); color: var(--text-1); }
.tg-btn.active, .tg-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.tg-btn.tg-primary, .tg-toolbar [data-action="new"] { background: var(--accent); border-color: var(--accent); color: white; }
.tg-switch, .tg-depth { display: inline-flex; gap: 2px; background: var(--fill); border-radius: 8px; padding: 3px; }
.tg-switch .tg-btn, .tg-depth .tg-btn { border: 0; background: transparent; }
.tg-switch .tg-btn.active, .tg-depth .tg-btn.active { background: var(--surface); box-shadow: 0 1px 3px #0000000b; color: var(--accent); }
.tg-toolbar { margin-bottom: 10px; }
.tg-spacer { flex: 1; }
.tg-search { display: flex; align-items: center; border: 1px solid var(--sep-strong); border-radius: 8px; background: var(--surface); min-width: 180px; max-width: 290px; flex: 1; overflow: hidden; }
.tg-search > span { padding-left: 10px; font-size: 21px; color: var(--text-2); }
.tg-search input { width: 100%; padding: 9px; background: transparent; border: 0; color: var(--text-1); min-width: 0; }
.tg-toolbar select, .tg-form select, .tg-form input, .tg-form textarea { border: 1px solid var(--sep-strong); border-radius: 7px; padding: 8px; background: var(--surface); color: var(--text-1); }
.tg-owner-legend { padding: 6px 0 11px; gap: 6px 14px; }
.tg-owner-legend > span { font-size: 11px; color: var(--text-2); }
.tg-owner-legend > button { border: 0; background: transparent; padding: 3px; border-radius: 6px; }
.tg-owner-legend > button[aria-pressed="true"] { outline: 2px solid var(--tg-owner, var(--accent)); outline-offset: 2px; }
.tg-person { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--tg-owner); font-size: 11px; font-weight: 600; }
.tg-person > i { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: var(--tg-owner); color: #fff; font-size: 11px; font-style: normal; }
.tg-person > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-filter-note:not(:empty) { margin-bottom: 10px; padding: 7px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--text-2); }
.tg-body { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--sep-strong); border-radius: 12px; }
.tg-has-panel .tg-body { grid-template-columns: minmax(0, 1fr) 340px; }
.tg-mainview { min-width: 0; }
.tg-viewport { position: relative; height: clamp(540px, 68vh, 860px); overflow: hidden; background-color: var(--tg-canvas); background-image: radial-gradient(var(--tg-grid) 1px, transparent 1px); background-size: 24px 24px; cursor: grab; touch-action: none; }
.tg-viewport.dragging { cursor: grabbing; }
.tg-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.tg-canvas-caption { position: absolute; z-index: 3; left: 14px; top: 12px; color: var(--text-2); font-size: 11px; background: var(--tg-canvas); padding: 4px 6px; border-radius: 5px; pointer-events: none; }
.tg-engineering { position: absolute; background: transparent; border: 2px dashed var(--tg-boundary); border-radius: 12px; }
.tg-engineering > header { width: 158px; padding: 20px 12px; display: flex; align-content: flex-start; align-items: flex-start; flex-wrap: wrap; gap: 6px; color: var(--text-2); }
.tg-engineering > header > .tg-btn { border: 0; padding: 1px 4px; background: transparent; font-size: 20px; line-height: 18px; }
.tg-group-name { background: transparent; border: 0; color: var(--text-2); font-size: 13px; font-weight: 700; text-align: left; width: 100px; line-height: 1.5; overflow-wrap: anywhere; }
.tg-engineering > header > span, .tg-engineering > header > small { width: 100%; padding-left: 25px; font-size: 11px; }
.tg-engineering > header > small { color: #976817; }
.tg-task { position: absolute; z-index: 2; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--tg-owner) 25%, transparent); border-left: 4px solid var(--tg-owner); border-radius: 9px; background: var(--tg-owner-bg); color: var(--text-1); text-align: left; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 3px #15355407; transition: opacity .15s, box-shadow .15s; }
.tg-task:hover { box-shadow: 0 3px 15px #22426418; }
.tg-task.selected, .tg-group-summary.selected { outline: 3px solid #087be0; outline-offset: 4px; }
.tg-task.dimmed { opacity: .19; }
.tg-task > strong { font-size: 14px; line-height: 1.4; font-weight: 650; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.tg-node-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; color: var(--text-2); }
.tg-node-bottom { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: auto; min-width: 0; }
.tg-node-bottom .tg-person { max-width: 62%; }
.tg-node-hint, .tg-blocked { white-space: nowrap; font-size: 10px; }
.tg-node-hint { color: var(--text-2); }
.tg-blocked { color: #986717; font-weight: 500; }
.tg-status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px; font-size: 10px; line-height: 1.2; color: #66758b; border-radius: 4px; background: color-mix(in srgb, var(--surface) 82%, transparent); white-space: nowrap; }
.tg-status > i { font-style: normal; }
.tg-status-in_progress { color: #0071d8; }.tg-status-review { color: #a46a13; }.tg-status-done { color: #078576; }
.tg-depth-map .tg-task .tg-node-bottom, .tg-depth-map .tg-task .tg-status { display: none; }
.tg-depth-map .tg-task { justify-content: center; gap: 7px; }
.tg-depth-map .tg-task > strong { font-size: 16px; }
.tg-depth-full .tg-task > strong { -webkit-line-clamp: 2; }
.tg-group-summary { position: absolute; z-index: 2; background: var(--surface); border: 1px solid var(--sep-strong); border-radius: 9px; padding: 13px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; color: var(--text-1); text-align: left; box-shadow: 0 2px 7px #1639530a; }
.tg-group-summary strong { font-size: 14px; }.tg-group-summary > span, .tg-group-summary small { font-size: 10px; color: var(--text-2); }
.tg-distribution { display: flex; overflow: hidden; height: 5px; border-radius: 4px; gap: 2px; }.tg-distribution i { min-width: 3px; }
.tg-edges { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; z-index: 1; }
.tg-edge { fill: none; stroke: #8c9aaf; stroke-width: 1.7; }.tg-edge.highlight { stroke: #087be0; stroke-width: 2.8; }
.tg-edge-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.tg-edge-hit:hover { stroke: #087be027; }.tg-edge-dim { opacity: .12; }
.tg-edge-label { font-size: 11px; text-anchor: middle; fill: var(--text-2); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.tg-camera { position: absolute; z-index: 4; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 4px; padding: 5px; background: var(--surface); border: 1px solid var(--sep); border-radius: 9px; box-shadow: var(--shadow-card); }
.tg-camera .tg-btn { border: 0; padding: 6px 8px; font-size: 11px; }.tg-zoom { color: var(--text-2); font-size: 11px; min-width: 35px; text-align: center; }
.tg-minimap { position: absolute; z-index: 4; bottom: 12px; right: 12px; width: 170px; border: 1px solid var(--sep); border-radius: 9px; padding: 9px; background: var(--surface); box-shadow: var(--shadow-card); }
.tg-minimap > span { display: flex; justify-content: space-between; color: var(--text-2); font-size: 10px; margin-bottom: 6px; }.tg-minimap small { font-size: 9px; }.tg-minimap svg { display: block; width: 150px; height: 85px; cursor: crosshair; overflow: hidden; }.tg-mini-group { fill: #dce4ef; }.tg-mini-edge { fill: none; stroke: #889db5; stroke-width: 5; }.tg-mini-view { fill: #087be010; stroke: #087be0; stroke-width: 7; }
.tg-no-edges { position: absolute; z-index: 3; left: 50%; top: 70px; transform: translateX(-50%); font-size: 12px; color: var(--text-2); max-width: 80%; padding: 7px 10px; text-align: center; background: var(--surface); border-radius: 7px; pointer-events: none; }.tg-no-edges:empty { display: none; }
.tg-panel { border-left: 1px solid var(--sep-strong); background: var(--tg-panel); min-width: 0; height: clamp(540px, 68vh, 860px); overflow-y: auto; }
.tg-panel-head { position: sticky; top: 0; z-index: 5; background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--sep); }.tg-panel-head > strong { font-size: 12px; font-weight: 500; color: var(--text-2); }.tg-panel-head .tg-btn { border: 0; font-size: 21px; padding: 0 4px; }
.tg-panel-body { padding: 20px; }.tg-panel-body h3 { font-size: 20px; line-height: 1.45; margin: 8px 0 12px; overflow-wrap: anywhere; }.tg-panel-body h4 { font-size: 13px; margin: 20px 0 10px; color: var(--text-1); }
.tg-task-tags { display: flex; gap: 9px; align-items: center; }.tg-task-tags .tg-status { font-size: 12px; background: var(--fill); padding: 4px 7px; }
.tg-owner-detail { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin: 19px 0; }.tg-owner-detail .tg-btn { font-size: 11px; }.tg-owner-detail .tg-person { max-width: 45%; }
.tg-muted { color: var(--text-2); font-size: 12px; line-height: 1.65; }.tg-prose { white-space: pre-wrap; font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; }
.tg-focus { border-block: 1px solid var(--sep); padding: 14px 0; }.tg-focus > span { display: block; color: var(--text-2); font-size: 11px; margin-bottom: 8px; }.tg-focus > div { display: flex; background: var(--fill); border-radius: 7px; padding: 3px; }.tg-focus .tg-btn { flex: 1; font-size: 11px; padding: 7px 4px; border: 0; background: transparent; }.tg-focus .tg-btn[aria-pressed="true"] { background: var(--surface); }
.tg-detail-tabs { display: flex; border-bottom: 1px solid var(--sep); gap: 2px; margin: 16px 0; }.tg-detail-tabs .tg-btn { padding: 9px 3px; font-size: 11px; flex: 1; border: 0; border-radius: 0; background: transparent; }.tg-detail-tabs .tg-btn[aria-pressed="true"] { border-bottom: 2px solid var(--accent); color: var(--accent); }
.tg-criteria { padding-left: 20px; font-size: 12px; line-height: 1.8; }.tg-criteria li { margin: 8px 0; padding-left: 2px; }
.tg-relation { display: flex; align-items: flex-start; gap: 8px; width: 100%; border: 1px solid var(--sep); background: var(--surface); border-radius: 6px; text-align: left; padding: 9px; margin: 6px 0; color: var(--text-1); }.tg-relation > span:last-child { font-size: 12px; line-height: 1.5; }
.tg-source { padding: 9px 0; border-bottom: 1px solid var(--sep); font-size: 12px; }.tg-source strong { display: block; font-weight: 500; }.tg-source small { display: block; color: var(--text-2); margin-top: 4px; }.tg-source a { overflow-wrap: anywhere; }
.tg-source-text { margin-top: 8px; }.tg-source-text summary { color: var(--accent); cursor: pointer; }.tg-source-text .tg-prose { margin-top: 8px; }
.tg-form { display: flex; flex-direction: column; gap: 14px; }.tg-form > label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--text-2); }.tg-form select, .tg-form input, .tg-form textarea { width: 100%; min-width: 0; resize: vertical; }.tg-form textarea { min-height: 95px; }.tg-form select { text-overflow: ellipsis; }.tg-form > .tg-btn { align-self: flex-start; }
.tg-error { color: var(--danger); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }.tg-error:empty { display: none; }
.tg-edge-row { padding: 14px 0; border-bottom: 1px solid var(--sep); }.tg-edge-row p { display: flex; flex-direction: column; gap: 6px; }.tg-edge-row p > span { font-size: 11px; color: var(--text-2); }.tg-edge-row p > button { text-align: left; background: transparent; border: 0; color: var(--accent); font-size: 12px; line-height: 1.6; }.tg-edge-row > .tg-btn { margin-top: 10px; color: var(--danger); font-size: 11px; }.tg-edge-row > small { display: block; margin-top: 8px; font-size: 11px; color: var(--text-2); }
.tg-group-stats { padding: 10px; border-radius: 8px; background: var(--fill); font-size: 12px; }.tg-note { border: 1px solid var(--sep); border-radius: 8px; margin: 12px 0; padding: 11px; }.tg-note header { display: flex; flex-direction: column; gap: 5px; }.tg-note header b { font-size: 12px; }.tg-note header span { font-size: 10px; color: var(--text-2); }.tg-note p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; margin-top: 8px; }.tg-note a { display: inline-block; margin-top: 8px; font-size: 11px; }.tg-notes-more { margin: 10px 0; }
.tg-list { padding: 16px; height: clamp(540px, 68vh, 860px); overflow: auto; background: var(--tg-canvas); }.tg-list section { margin-bottom: 22px; }.tg-list section > header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }.tg-list section > header > span { margin-left: auto; color: var(--text-2); font-size: 11px; }.tg-list section > header > .tg-btn { background: transparent; border: 0; padding: 5px; }.tg-list-task { position: relative; width: 100%; min-height: 95px; margin: 9px 0; display: grid; grid-template-columns: 90px minmax(0, 1fr) 140px; gap: 12px; align-items: center; }.tg-list-task > strong { font-size: 14px; }.tg-list-task .tg-node-top, .tg-list-task .tg-node-bottom { display: flex; align-items: flex-start; flex-direction: column; margin: 0; gap: 8px; }.tg-list-task .tg-person { max-width: 100%; }.tg-empty { text-align: center; padding: 60px 20px; }.tg-empty p { margin-top: 10px; color: var(--text-2); }.tg-foot { justify-content: space-between; margin-top: 10px; font-size: 10px; color: var(--text-2); }
@media (prefers-color-scheme: dark) {
  .tg-board { --tg-canvas: #10171f; --tg-grid: #263749; --tg-boundary: #607d9b; }
  .tg-task { background: var(--tg-owner-dark); border-color: color-mix(in srgb, var(--tg-owner) 50%, transparent); border-left-color: var(--tg-owner); }
  .tg-task .tg-person { color: var(--text-1); }.tg-status-in_progress { color: #67b5ff; }.tg-status-review, .tg-blocked, .tg-engineering > header > small { color: #e9ba6b; }.tg-status-done { color: #67d3b5; }.tg-status-todo { color: #b4c3d5; }.tg-person > i { color: white; }.tg-mini-group { fill: #263749; }
}
@media (max-width: 1100px) { .tg-has-panel .tg-body { grid-template-columns: minmax(0, 1fr) 310px; }.tg-has-panel .tg-minimap { bottom: 65px; }.tg-panel-body { padding: 16px; }.tg-toolbar { gap: 7px; }.tg-toolbar .tg-spacer { display: none; }.tg-minimap { width: 145px; }.tg-minimap svg { width: 125px; height: 72px; }.tg-camera { gap: 1px; }.tg-camera .tg-btn { padding: 6px; }.tg-camera .tg-depth .tg-btn { padding: 6px 4px; } }
@media (max-width: 820px) { .tg-has-panel .tg-body { display: block; }.tg-has-panel .tg-mainview { display: none; }.tg-panel { border-left: 0; height: min(78vh, 760px); }.tg-toolbar .tg-search { max-width: none; flex: 1 1 100%; }.tg-summary strong { font-size: 18px; }.tg-owner-legend { max-height: 100px; overflow-y: auto; }.tg-list-task { grid-template-columns: 78px minmax(0, 1fr); }.tg-list-task .tg-node-bottom { grid-column: 2; flex-direction: row; }.tg-list-task > strong { -webkit-line-clamp: 3; }.tg-foot > span { display: none; } }
@media (max-width: 520px) { .tg-toolbar select { flex: 1; max-width: 48%; }.tg-toolbar > .tg-btn { font-size: 11px; padding: 7px; }.tg-summary { gap: 10px; }.tg-summary > div:first-child { gap: 6px; }.tg-summary > div:first-child > span { font-size: 11px; }.tg-viewport { height: 65vh; min-height: 420px; }.tg-minimap { bottom: 62px; width: 124px; }.tg-minimap svg { width: 104px; height: 60px; }.tg-camera { right: 8px; left: 8px; justify-content: center; }.tg-canvas-caption { font-size: 10px; max-width: calc(100% - 28px); }.tg-list { padding: 10px; }.tg-list-task { grid-template-columns: 65px minmax(0, 1fr); padding: 12px 9px; }.tg-list section > header { gap: 2px; }.tg-list section > header > .tg-btn { font-size: 11px; }.tg-person { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .tg-board * { transition: none !important; scroll-behavior: auto !important; } }

/* Vertical reading: compact upright nodes, module headings above their ranks. */
.tg-engineering > header { width: 100%; min-height: 72px; padding: 10px 12px; gap: 2px 6px; }
.tg-engineering > header > .tg-btn { min-width: 32px; min-height: 32px; }
.tg-group-name { width: calc(100% - 44px); min-height: 32px; font-size: 14px; }
.tg-engineering > header > span, .tg-engineering > header > small { width: auto; padding-left: 38px; }
.tg-engineering > header > small { padding-left: 0; }
.tg-world .tg-task { padding: 8px; gap: 5px; border-left-width: 4px; }
.tg-world .tg-task > strong { font-size: 14px; line-height: 1.35; }
.tg-world .tg-node-top { gap: 2px; }
.tg-world .tg-status { padding: 2px 3px; gap: 2px; }
.tg-world .tg-node-bottom .tg-person { max-width: 100%; }
.tg-world .tg-node-hint { display: none; }
.tg-world .tg-node-bottom > .tg-blocked { font-size: 0; }
.tg-world .tg-node-bottom > .tg-blocked::after { content: '!'; font-size: 13px; }
.tg-world .tg-task.selected { outline-offset: 2px; }
.tg-depth-map .tg-task > strong { font-size: 15px; }
.tg-parallel-summary { border-style: dashed; border-color: var(--tg-boundary); }
.tg-parallel-item { display: block; width: 100%; text-align: left; border: 1px solid var(--sep); border-left: 4px solid var(--tg-owner); border-radius: 9px; padding: 12px; margin: 10px 0; color: var(--text-1); background: var(--tg-owner-bg); }
.tg-parallel-item > strong { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.tg-parallel-item > span { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tg-parallel-item small { font-size: 11px; color: var(--text-2); }
.tg-no-edges { top: auto; bottom: 112px; font-size: 11px; }
@media (prefers-color-scheme: dark) { .tg-parallel-item { background: var(--tg-owner-dark); } }
@media (max-width: 820px) {
  .fx-enter:has(.tg-board) { animation: none; opacity: 1; transform: none; }
  .tg-has-panel .tg-mainview { display: block; }
  .tg-panel { position: fixed; inset: auto 0 0; z-index: 1100; height: min(68dvh, 650px); max-height: 80vh; border: 1px solid var(--sep-strong); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 50px #0003; padding-bottom: env(safe-area-inset-bottom); overscroll-behavior: contain; }
  .tg-panel-head { min-height: 52px; }
  .tg-panel-head .tg-btn { min-width: 44px; min-height: 44px; }
  .tg-panel-body { padding: 16px 20px 24px; }
  .tg-panel .tg-btn { min-height: 40px; }
  .tg-camera { left: 6px; right: 6px; bottom: 8px; justify-content: center; gap: 0; padding: 3px; }
  .tg-camera .tg-btn, .tg-camera .tg-depth .tg-btn { min-height: 38px; padding: 6px 5px; font-size: 11px; }
  .tg-zoom { min-width: 30px; }
  .tg-minimap { width: 94px; padding: 6px; bottom: 62px; opacity: .9; }
  .tg-minimap svg { width: 80px; height: 62px; }
  .tg-minimap small { display: none; }
  .tg-no-edges { bottom: 70px; left: 10px; transform: none; max-width: calc(100% - 125px); background: var(--tg-canvas); padding: 4px; }
  .tg-toolbar [data-navigate-group] { max-width: none; flex: 1 1 100%; }
}
.tg-node-time { font-size: 10px; line-height: 1.3; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-list-task .tg-node-time { white-space: normal; }
.tg-overdue { color: #d64545; font-weight: 600; }
.tg-schedule { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 6px 10px; margin: 12px 0 8px; font-size: 13px; align-items: center; }
.tg-schedule dt { color: var(--text-2); }
.tg-schedule dd { margin: 0; }
.tg-depth-map .tg-task .tg-node-time { display: none; }
@media (prefers-color-scheme: dark) { .tg-overdue { color: #ff8a80; } }
.tg-day { position: absolute; left: 0; z-index: 0; border-top: 1px dashed var(--tg-grid, #d7dee8); background: color-mix(in srgb, var(--tg-grid, #d7dee8) 14%, transparent); pointer-events: none; }
.tg-day:nth-of-type(even) { background: transparent; }
.tg-day > span { position: absolute; left: 14px; top: 10px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.tg-node-span { display: flex; flex-direction: column; gap: 1px; font-size: 10px; line-height: 1.3; color: var(--text-2); white-space: nowrap; }
.tg-list-task .tg-node-span { font-size: 12px; }
.tg-conflict { font-size: 10px; font-weight: 650; color: #b56d0b; white-space: nowrap; }
.tg-conflict-severe { color: #d64545; }
.tg-conflict-count { color: #d64545; font-weight: 650; }
.tg-edge.tg-edge-severe { stroke: #d64545; stroke-width: 2.2; }
.tg-edge.tg-edge-overlap { stroke: #d98a1c; stroke-dasharray: 6 4; }
.tg-conflict-list { margin: 6px 0 10px; padding: 8px 10px; border-radius: 8px; background: #fff6e8; font-size: 12px; }
.tg-conflict-list p { margin: 4px 0 0; }
.tg-group-notes { margin-left: auto; font-size: 11px; color: var(--text-2); background: transparent; border: 0; cursor: pointer; }
.tg-group-name { cursor: pointer; }
.tg-list-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 14px; font-size: 13px; }
.tg-list-bar select { margin-left: 6px; }
.tg-check { display: inline-flex; gap: 6px; align-items: center; }
.tg-drawer > header .tg-drawer-span { font-size: 11px; color: var(--text-2); }
.tg-drawer.closed { margin-bottom: 8px; }
.tg-world .tg-task.tg-time-card { gap: 4px; }
@media (prefers-color-scheme: dark) { .tg-conflict-list { background: #3a2c17; } .tg-conflict { color: #f0b35a; } .tg-conflict-severe, .tg-conflict-count { color: #ff8a80; } }
.tg-list .tg-list-task { grid-template-columns: 90px minmax(0, 1fr) 230px; min-height: 84px; }
.tg-list .tg-list-task .tg-node-bottom { gap: 5px; }
@media (max-width: 820px) {
  .tg-list .tg-list-task { grid-template-columns: 64px minmax(0, 1fr); }
  .tg-list .tg-list-task .tg-node-bottom { flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .tg-list .tg-list-task .tg-node-bottom .tg-node-span { flex-basis: 100%; flex-direction: row; gap: 10px; }
  .tg-list .tg-list-task .tg-node-bottom .tg-person { max-width: 45%; }
  .tg-drawer > header .tg-drawer-span { display: none; }
}

/* Round 3: module tiles (closed drawers), drawer handles, quick filters, fullscreen. */
.tg-topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tg-immersive-title { display: none; }
.tg-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tg-quick-label { font-size: 12px; color: var(--text-2); }
.tg-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--sep-strong); background: var(--surface); color: var(--text-1); font-size: 13px; white-space: nowrap; }
.tg-chip > em { font-style: normal; margin-right: -7px; }
.tg-chip > b { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--fill); color: var(--text-2); font-size: 11px; font-weight: 650; text-align: center; }
.tg-chip:hover { border-color: var(--accent); }
.tg-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tg-chip.active > b { background: #ffffff33; color: #fff; }
.tg-topbar > [data-action="immersive"] { min-height: 36px; font-weight: 600; }
.tg-filter-note b { color: var(--text-1); }
.tg-engineering.tg-drawer-closed { border-style: solid; border-color: transparent; }
.tg-engineering.tg-drawer-open { border-style: solid; border-color: color-mix(in srgb, var(--tg-boundary) 60%, transparent); background: color-mix(in srgb, var(--surface) 45%, transparent); }
.tg-drawer-open > header { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 0; padding: 8px 10px; }
.tg-drawer-open > header > .tg-group-name { width: auto; min-height: 0; flex: 1; font-size: 15px; color: var(--text-1); cursor: default; }
.tg-drawer-open > header > span, .tg-drawer-open > header > small { width: 100%; padding-left: 0; font-size: 11px; }
.tg-drawer-handle { min-height: 30px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 650; white-space: nowrap; }
.tg-drawer-handle:hover { background: var(--accent); color: #fff; }
.tg-module-tile { position: absolute; z-index: 2; box-sizing: border-box; display: flex; flex-direction: column; border: 1px solid var(--sep-strong); border-top: 4px solid var(--tg-boundary); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 14px #1639530f; overflow: hidden; }
.tg-module-tile.selected { outline: 3px solid #087be0; outline-offset: 3px; }
.tg-tile-head { box-sizing: border-box; height: 88px; flex: 0 0 88px; display: flex; flex-direction: column; gap: 3px; padding: 11px 14px 8px; border: 0; background: transparent; text-align: left; color: var(--text-1); }
.tg-tile-head > strong { font-size: 17px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-tile-head > span { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-tile-head > .tg-distribution { margin-top: 3px; }
.tg-tile-head:hover > strong { color: var(--accent); }
.tg-tile-tasks { list-style: none; margin: 0; padding: 0 8px; flex: 1; overflow: hidden; }
.tg-tile-tasks > li { height: 22px; }
.tg-tile-tasks button { display: flex; align-items: center; gap: 6px; width: 100%; height: 22px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; color: var(--text-1); font-size: 12px; text-align: left; }
.tg-tile-tasks button:hover { background: var(--tg-owner-bg); }
.tg-tile-tasks button > i { font-style: normal; color: var(--tg-owner); font-size: 11px; flex: 0 0 auto; }
.tg-tile-tasks button > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-tile-tasks button > time { flex: 0 0 auto; color: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.tg-tile-tasks button.dimmed { opacity: .3; }
.tg-tile-more { font-size: 11px; color: var(--text-2); padding: 3px 6px; }
.tg-tile-open { flex: 0 0 40px; height: 40px; margin: 6px 10px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 13px; }
.tg-tile-open:hover { background: var(--accent); color: #fff; border-style: solid; }
.tg-world .tg-node-span { font-size: 11px; color: var(--text-1); opacity: .82; }
.tg-drawer-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 12px; border-radius: 9px; border: 1px solid var(--sep-strong); background: var(--surface); color: var(--text-1); }
.tg-drawer-toggle > b { font-size: 14px; }
.tg-drawer-toggle > span { font-size: 11px; color: var(--text-2); }
.tg-drawer-toggle > em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 650; }
.tg-list section > header > span.tg-drawer-span { margin-left: 0; }
.tg-drawer-peek { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding: 10px; border: 1px dashed var(--sep-strong); border-radius: 9px; background: var(--surface); text-align: left; }
.tg-drawer-peek > span { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--fill); color: var(--text-1); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Fullscreen overlay: above the app's top bar and sidebar on every device. */
html.tg-lock, html.tg-lock body { overflow: hidden !important; overscroll-behavior: none; }
html.tg-lock :has(.tg-immersive) { opacity: 1 !important; transform: none !important; filter: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; animation: none !important; contain: none !important; }
.tg-board.tg-immersive { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: var(--bg-page, #f5f5f7); padding: calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + 8px) calc(env(safe-area-inset-bottom) + 8px) calc(env(safe-area-inset-left) + 8px); box-sizing: border-box; }
.tg-immersive > .tg-summary, .tg-immersive > .tg-toolbar, .tg-immersive > .tg-owner-legend, .tg-immersive > .tg-foot { display: none; }
.tg-immersive > .tg-topbar { margin-bottom: 6px; flex-wrap: nowrap; }
.tg-immersive .tg-immersive-title { display: block; font-size: 14px; max-width: 26%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-immersive .tg-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tg-immersive .tg-quick-label { display: none; }
.tg-immersive > .tg-topbar > [data-action="immersive"] { background: var(--text-1); color: var(--surface); border-color: var(--text-1); }
.tg-immersive > .tg-filter-note:not(:empty) { margin-bottom: 6px; padding: 4px 8px; font-size: 12px; }
.tg-immersive > .tg-body { flex: 1; min-height: 0; border-radius: 10px; }
.tg-immersive .tg-mainview { height: 100%; }
.tg-immersive .tg-viewport, .tg-immersive .tg-panel, .tg-immersive .tg-list { height: 100%; }
@media (max-width: 820px) {
  .tg-immersive .tg-panel { z-index: 2100; }
  .tg-quick { gap: 6px; }
  .tg-quick-label { flex-basis: 100%; }
  .tg-chip { min-height: 40px; padding: 6px 12px; }
  .tg-topbar > [data-action="immersive"] { min-height: 40px; }
  .tg-immersive .tg-immersive-title { display: none; }
  .tg-immersive > .tg-topbar { gap: 6px; }
  .tg-immersive .tg-chip { padding: 6px 10px; font-size: 12px; }
  .tg-immersive > .tg-topbar > [data-action="immersive"] { padding: 6px 12px; flex: 0 0 auto; }
  .tg-immersive .tg-chip > em, .tg-immersive .tg-full-text { display: none; }
  .tg-immersive .tg-chip { gap: 5px; }
}
@media (prefers-color-scheme: dark) { .tg-module-tile { box-shadow: none; } .tg-immersive > .tg-topbar > [data-action="immersive"] { background: var(--surface); color: var(--text-1); } }
.tg-drawer-open > header > span > small { font-size: inherit; color: #976817; }

/* 瞄准镜式的两条轴（与日程侦探板同款木框）：横轴钉顶边、纵轴钉左边、左上角交叉格；不挡拖动 */
.tg-axes { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.tg-ax-x, .tg-ax-y, .tg-ax-corner { position: absolute; left: 0; top: 0; box-sizing: border-box; overflow: hidden; background: rgba(46, 31, 16, .93); color: #F3E6CF; }
.tg-ax-x { right: 0; border-bottom: 2px solid #1C120A; }
.tg-ax-y { bottom: 0; border-right: 2px solid #1C120A; }
.tg-ax-corner { z-index: 2; background: #2E1F10; border-right: 2px solid #1C120A; border-bottom: 2px solid #1C120A; display: flex; align-items: center; justify-content: center; padding: 0 6px; font: 700 12px var(--case-mono, var(--mono)); text-align: center; line-height: 1.2; }
.tg-ax-band { position: absolute; top: 5px; padding: 0 8px; font-size: 13px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 2px solid rgba(243, 230, 207, .55); }
.tg-ax-step { position: absolute; bottom: 4px; transform: translateX(-50%); font: 600 11px var(--case-mono, var(--mono)); white-space: nowrap; color: #E8D3AE; }
.tg-ax-lane { position: absolute; left: 0; right: 0; padding: 3px 6px 3px 7px; border-left: 4px solid var(--c); font-size: 12px; font-weight: 650; line-height: 1.25; overflow: hidden; overflow-wrap: anywhere; }
.tg-ax-day { position: absolute; left: 0; right: 0; padding: 2px 6px; font: 650 12px var(--case-mono, var(--mono)); white-space: nowrap; border-top: 1px dashed rgba(243, 230, 207, .35); }
.tg-viewport .tg-canvas-caption { top: calc(var(--ax-top, 0px) + 8px); left: calc(var(--ax-left, 0px) + 14px); }
.tg-axes-on .tg-viewport .tg-canvas-caption { display: none; }
.tg-viewport .tg-outline { top: calc(var(--ax-top, 0px) + 8px); left: calc(var(--ax-left, 0px) + 12px); max-height: calc(100% - var(--ax-top, 0px) - 104px); }
@media (max-width: 700px) {
  .tg-ax-band { font-size: 12px; top: 3px; }
  .tg-ax-step { font-size: 10px; bottom: 3px; }
  .tg-ax-lane, .tg-ax-day { font-size: 10.5px; padding-left: 4px; padding-right: 3px; }
  .tg-ax-day { white-space: normal; line-height: 1.25; }
  .tg-ax-corner { font-size: 10px; }
}
