/* 槲寄生：沿用嘟嘟可的头部、状态行和卡片工作区（dd-*）；只补启动中心编辑区、流程图画布和任务中心计划表。 */
#mistletoeView{--dd-gap:14px;--dd-card:#1d1e34;--dd-inset:#151626;--dd-soft:#26273f;--mt-yes:#6fd8ce;--mt-no:#e88a6f;--mt-fire:#ffc857}
#mistletoeView .dd-body{gap:12px}
/* 槲寄生页没有耕地机的底部选择栏，收掉为它预留的底部留白。 */
.container:has(#mistletoeView:not([hidden])){padding-bottom:28px}
.mt-break{overflow-wrap:anywhere;word-break:break-word}
.mt-head .dd-head-target select{width:300px}
.mt-opstage{display:flex;align-items:center;gap:10px;margin:-4px 2px 10px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--dd-inset);font-size:13px;color:var(--muted);overflow-wrap:anywhere;animation:mt-in .25s ease-out}
.mt-opstage[hidden]{display:none}
.mt-stage-pill{flex:none;padding:0 9px;border-radius:99px;font-size:12px;line-height:22px;background:#34354d;color:#d1cde1}
.mt-opstage[data-stage=sent] .mt-stage-pill,.mt-opstage[data-stage=accepted] .mt-stage-pill{background:#3b3550;color:#d9cff5}
.mt-opstage[data-stage=running] .mt-stage-pill{background:var(--gold);color:#29241a}
.mt-opstage[data-stage=done] .mt-stage-pill{background:#27463f;color:#a0e1c8}
.mt-opstage[data-stage=failed] .mt-stage-pill{background:#4a2f30;color:#f0b3a3}
.mt-opstage[data-stage=unknown]{border-color:#7a6a49}.mt-opstage[data-stage=unknown] .mt-stage-pill{background:#443b2e;color:#f0d39d}
.dodoco-status.is-error{color:#f3c3a8}
.mt-pending{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;margin:0 0 12px;padding:10px 14px;border:1px solid #7a6a49;border-radius:12px;background:#2a2533}
.mt-pending-text{flex:1 1 320px;min-width:0;font-size:13px;color:#eadfc4;overflow-wrap:anywhere}
@keyframes mt-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* 授权 */
.mt-auth{max-width:760px}
.mt-steps{margin:0 0 14px;padding-left:20px;color:var(--muted);font-size:13px;line-height:1.9}
.mt-auth-target{display:block;min-height:40px;padding:9px 0;color:var(--text);font-size:14px;font-weight:500;overflow-wrap:anywhere}
#mtAuthCode{width:180px;letter-spacing:.2em;font-family:Consolas,monospace}

/* 启动中心：运行卡片 */
.mt-run{padding:14px 18px;display:grid;gap:10px}
.mt-run-live{display:grid;gap:10px}
#mtRunNote:empty{display:none}
.mt-run-main{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap}
.mt-run-text{flex:1 1 260px;min-width:0;margin:0;font-size:14px;overflow-wrap:anywhere}
.mt-pill-run{background:#4a3f22;color:#f3dc92}
.mt-run-settings{display:flex;align-items:center;gap:6px 18px;flex-wrap:wrap;padding-top:10px;border-top:1px solid #2a2b42}
.mt-run-settings .dd-check{min-height:36px}
.mt-run-settings .dd-inline>span{color:var(--muted);font-size:13px}
.mt-run-settings input[type=number]{width:84px;min-height:36px;padding:5px 9px}
.mt-run-settings select{min-height:36px;padding:5px 9px;width:auto}
.mt-prompt{display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;padding:10px 14px;border:1px solid #6a5b3a;border-radius:10px;background:#272233}
.mt-prompt>div:first-child{flex:1 1 280px;min-width:0}
.mt-prompt strong{font-size:13px;color:var(--gold)}
.mt-prompt p{margin:2px 0;font-size:14px;overflow-wrap:anywhere}
.mt-prompt small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}

/* 方案与工具栏 */
.mt-tools{padding:12px 18px;display:grid;gap:8px}
.mt-scheme{display:grid;grid-template-columns:minmax(200px,1.2fr) auto minmax(180px,1fr) auto;gap:8px 12px;align-items:end}
.mt-scheme .dd-field{min-width:0}
.mt-scheme .dd-field select,.mt-scheme .dd-field input{min-height:36px;padding:6px 10px}
.mt-tool-row{display:flex;align-items:center;gap:6px 14px;flex-wrap:wrap}
.mt-tool-row .dd-check{min-height:34px;font-size:13px}
.mt-tool-row .dd-actions{margin-left:auto}
#mtSaveState{flex:0 0 180px;min-height:20px;line-height:20px}
.mt-save-state{font-size:12.5px;color:#a0e1c8}
.mt-save-state.is-dirty{color:#f0d39d}.mt-save-state.is-error{color:#f3b7a6;overflow-wrap:anywhere}

/* 运行中的触发器 */
.mt-triggers{padding:12px 18px}
.mt-triggers .dd-card-head{margin-bottom:8px}
.mt-trigger{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-top:6px;border:1px solid var(--line);border-radius:10px;background:var(--dd-soft)}
.mt-trigger-icon{flex:none;width:28px;text-align:center;font-size:16px}
.mt-trigger-text{flex:1;min-width:0;display:grid}
.mt-trigger-text strong{font-size:13px;font-weight:500;overflow-wrap:anywhere}
.mt-trigger-text small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}

/* 编辑区：大纲 | 画布 | 可收起的节点设置侧栏 */
.mt-editor{display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr) 320px;gap:12px;height:calc(100vh - 150px);min-height:520px}
.mt-editor.inspector-closed{grid-template-columns:minmax(300px,380px) minmax(0,1fr) 38px}
.mt-pane-switch{display:none}
.mt-outline{display:flex;flex-direction:column;min-height:0;padding:12px 10px 10px 12px}
.mt-outline-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin:0 2px 8px}
.mt-outline-head h2{font-size:15px}
.mt-outline-head .dodoco-hint{font-size:12px;line-height:1.5}
.mt-outline-body{flex:1;min-height:0;overflow:auto;overflow-x:hidden;padding-right:4px}
.mt-row{display:flex;align-items:center;gap:8px;min-height:44px;padding:5px 8px;margin:2px 0;border:1px solid transparent;border-radius:9px;cursor:pointer;min-width:0;user-select:none}
.mt-row:hover{background:#232440}
.mt-row.selected{background:#302d45;border-color:#7a6a49}
.mt-row.disabled{opacity:.55}
.mt-row.dragging{opacity:.4}
.mt-row.drop-before{box-shadow:inset 0 2px 0 var(--gold)}.mt-row.drop-after{box-shadow:inset 0 -2px 0 var(--gold)}
.mt-row.st-running{border-color:var(--gold);background:#2f2a2a}
.mt-grip{flex:none;color:#6c6886;font-size:13px;cursor:grab}
.mt-ic{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:7px;background:color-mix(in srgb,var(--c) 20%,transparent);color:var(--c);font-size:13px;line-height:1}
.mt-row .mt-ic{width:22px;height:22px;font-size:11px}
.mt-row-text{flex:1;min-width:0;display:grid}
.mt-no{font-weight:500;font-size:.85em;color:var(--muted)}
.mt-row-text b{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mt-row-text small{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mt-state{flex:none;padding:0 7px;border:1px solid var(--line);border-radius:99px;font-size:11px;line-height:18px;color:var(--muted)}
.mt-state.st-running{background:var(--gold);color:#29241a;border-color:var(--gold)}
.mt-state.st-success,.mt-state.st-condTrue,.mt-state.st-condFalse{color:var(--green);border-color:#3f6a60}
.mt-state.st-failed{color:#f0b3a3;border-color:#6a4141}
.mt-branches{margin-left:13px}
.mt-branch{padding-left:12px;border-left:2px solid #7f7aa255}
.mt-branch.yes{border-left-color:#6fd8ce66}.mt-branch.no{border-left-color:#e88a6f66}.mt-branch.fire{border-left:2px dashed #ffc85766}
.mt-branch.dim{opacity:.55}
.mt-branch-head{display:flex;align-items:center;gap:6px;margin:4px 0 2px;font-size:11.5px;font-weight:600;cursor:pointer;user-select:none}
.mt-branch.yes>.mt-branch-head{color:var(--mt-yes)}.mt-branch.no>.mt-branch-head{color:var(--mt-no)}.mt-branch.fire>.mt-branch-head{color:var(--mt-fire)}
.mt-branch-count{color:var(--muted);font-weight:400}
.mt-branch-empty{margin:2px 0 2px 8px;font-size:12px;color:#8f8aa9}
.mt-add-row{display:block;width:100%;min-height:30px;margin:2px 0 6px;padding:2px 8px;border:1px dashed transparent;border-radius:8px;text-align:left;font-size:12px;color:#8f8aa9}
.mt-add-row:hover:not(:disabled){border-color:#5a5772;color:var(--gold)}
.mt-add-row.drop-after{border-color:var(--gold)}

/* 画布 */
.mt-stage{position:relative;min-width:0;min-height:0;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--dd-inset);background-image:radial-gradient(#2a2b45 1px,transparent 1px);background-size:22px 22px;touch-action:none;cursor:grab;outline:none}
.mt-stage:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.mt-stage.panning{cursor:grabbing}
.mt-world{position:absolute;left:0;top:0;transform-origin:0 0}
.mt-canvas-empty{position:absolute;inset:0;display:grid;place-items:center;padding:24px;color:var(--muted);font-size:13px;text-align:center}
svg.mt-edges{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
.mt-start{position:absolute;width:76px;padding:2px 0;border:1px solid #6a5b3a;border-radius:99px;background:#2a2533;color:#f2e3b6;font-size:12px;text-align:center}
.mt-elabel{position:absolute;padding:0 4px;border-radius:5px;background:var(--dd-inset);font-size:11.5px;font-weight:700;line-height:18px;pointer-events:none}
.mt-elabel.dim{opacity:.3}.mt-elabel.lit{box-shadow:0 0 0 1px currentColor}
.mt-ph{position:absolute;display:grid;place-items:center;border:1px dashed #5a5772;border-radius:99px;color:var(--muted);font-size:11px;white-space:nowrap}
.mt-ph.dim{opacity:.35}
.mt-node{position:absolute;display:flex;align-items:flex-start;gap:9px;min-height:0;padding:9px 11px 9px 12px;border:1px solid #3f3c5c;border-radius:11px;background:#241f3b;box-shadow:0 6px 16px #0006, inset 3px 0 0 var(--c);color:var(--text);text-align:left;cursor:pointer;transition:border-color .15s,box-shadow .15s,opacity .2s}
.mt-node:hover{border-color:#6a6488}
.mt-node.emph{border-width:2px;border-color:color-mix(in srgb,var(--c) 60%,#3f3c5c)}
.mt-node-tx{flex:1;min-width:0;display:grid;gap:1px}
.mt-node-tx b{font-size:13.5px;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mt-node-tx small{font-size:11.5px;line-height:1.4;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.mt-node-st{position:absolute;top:-9px;right:10px;padding:0 7px;border:1px solid var(--line);border-radius:99px;background:#1b1c31;font-size:10.5px;line-height:17px;color:var(--muted)}
.mt-node.dim{opacity:.4}
.mt-node.off{opacity:.55;border-style:dashed}
.mt-node.sel{outline:2px solid var(--gold);outline-offset:3px}
.mt-node.st-running{border-color:var(--gold);box-shadow:0 0 0 3px #e8c96d33,0 6px 16px #0006,inset 3px 0 0 var(--c);animation:mt-pulse 1.6s ease-in-out infinite}
.mt-node.st-running .mt-node-st{background:var(--gold);color:#29241a;border-color:var(--gold)}
.mt-node.st-success,.mt-node.st-condTrue,.mt-node.st-condFalse{border-color:#3f6a60}
.mt-node.st-success .mt-node-st,.mt-node.st-condTrue .mt-node-st,.mt-node.st-condFalse .mt-node-st{color:var(--green);border-color:#3f6a60}
.mt-node.st-failed{border-color:#7a4545}.mt-node.st-failed .mt-node-st{color:#f0b3a3;border-color:#7a4545}
@keyframes mt-pulse{50%{box-shadow:0 0 0 6px #e8c96d22,0 6px 16px #0006,inset 3px 0 0 var(--c)}}
/* 远景：缩放低于 50% 时文字已无法辨认，节点改为按类型着色的色块；描边和连线按 1/缩放 补偿，任何缩放下在屏幕上粗细一致 */
.mt-stage.mt-far .mt-node{padding:0;background:color-mix(in srgb,var(--c) 42%,#241f3b);border-color:color-mix(in srgb,var(--c) 80%,#3f3c5c);border-width:calc(1px * var(--mt-inv,1));box-shadow:none;transition:none}
.mt-stage.mt-far .mt-node>*{visibility:hidden}
.mt-stage.mt-far .mt-node.dim{opacity:.3}
.mt-stage.mt-far .mt-node.sel{outline:calc(2.5px * var(--mt-inv,1)) solid var(--gold);outline-offset:calc(2px * var(--mt-inv,1))}
.mt-stage.mt-far .mt-node.st-running{outline:calc(3px * var(--mt-inv,1)) solid var(--gold);outline-offset:calc(2px * var(--mt-inv,1));animation:none}
.mt-stage.mt-far .mt-node.st-failed{outline:calc(2.5px * var(--mt-inv,1)) solid #e07a66;outline-offset:calc(2px * var(--mt-inv,1))}
.mt-stage.mt-far .mt-elabel,.mt-stage.mt-far .mt-start{visibility:hidden}
.mt-stage.mt-far .mt-ph{color:transparent;border-width:calc(1px * var(--mt-inv,1))}
.mt-stage.mt-far svg.mt-edges path{stroke-width:calc(1.2px * var(--mt-inv,1))}
.mt-far-hint{position:absolute;left:50%;top:8px;z-index:3;display:none;transform:translateX(-50%);padding:2px 12px;border:1px solid var(--line);border-radius:99px;background:#1b1c31e6;color:var(--muted);font-size:12px;line-height:20px;white-space:nowrap;pointer-events:none}
.mt-stage.mt-far .mt-far-hint{display:block}
.mt-legend{position:absolute;left:12px;bottom:12px;z-index:3;display:flex;gap:12px;padding:4px 10px;border-radius:8px;background:#151626d9;font-size:11.5px;color:var(--muted);pointer-events:none}
.mt-legend i{display:inline-block;width:16px;height:0;margin-right:4px;border-top:2px solid;vertical-align:middle}
.mt-legend .yes{color:var(--mt-yes)}.mt-legend .no{color:var(--mt-no)}.mt-legend .fire{color:var(--mt-fire);border-top-style:dashed}
.mt-zoom{position:absolute;right:10px;bottom:10px;z-index:3;display:flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--line);border-radius:10px;background:#1b1c31}
.mt-zoom button{min-width:34px;min-height:32px;padding:0 8px;border-radius:7px;color:var(--muted);font-size:13px}
.mt-zoom button:hover{background:#2c2b44;color:var(--text)}
.mt-zoom span{min-width:44px;text-align:center;color:var(--muted);font-size:12px}

/* 节点设置侧栏 */
.mt-inspector{display:flex;flex-direction:column;min-height:0;padding:0;overflow:hidden}
.mt-insp-head{display:flex;align-items:flex-start;gap:10px;padding:14px 14px 10px;border-bottom:1px solid #2a2b42}
.mt-insp-head>div{flex:1;min-width:0}
.mt-insp-head h3{font-size:15px;margin:0}
.mt-insp-head .dodoco-hint{font-size:12px;line-height:1.5}
.mt-insp-head .dd-btn{min-height:30px;padding:0 9px}
.mt-insp-body{flex:1;min-height:0;overflow:auto;display:grid;align-content:start;gap:10px;padding:12px 14px}
.mt-insp-body .dd-field{min-width:0}
.mt-insp-body input,.mt-insp-body select,.mt-insp-body textarea{min-height:38px;padding:7px 10px;font-size:13.5px}
.mt-insp-body textarea{width:100%;resize:vertical;border:1px solid #56556c;border-radius:8px;background:#181a2d;color:var(--text);font:inherit}
.mt-insp-body .dd-check{min-height:34px;white-space:normal;font-size:13px}
.mt-insp-body .dodoco-hint{font-size:12px;margin:0}
.mt-insp-state{margin:0;padding:6px 10px;border-radius:8px;background:var(--dd-soft);font-size:12.5px;overflow-wrap:anywhere}
.mt-insp-foot{display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px;border-top:1px solid #2a2b42}
.mt-insp-foot .dd-btn{flex:1 1 auto}
.mt-insp-tab{writing-mode:vertical-rl;width:100%;height:100%;min-height:120px;color:var(--gold);font-size:13px;letter-spacing:.12em}
.mt-form-row{display:flex;gap:8px 10px;flex-wrap:wrap;align-items:flex-end}
.mt-form-row>.dd-field{flex:1 1 120px}
.mt-form-row>.dd-grow{flex:2 1 160px}
.mt-week{display:flex;gap:4px;flex-wrap:wrap}
.mt-week label{display:inline-flex;align-items:center;gap:4px;min-height:34px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:var(--dd-inset);font-size:13px;cursor:pointer}
.mt-week label:has(input:checked){border-color:#7a6a49;color:var(--gold);background:#2c2a3f}
.mt-week input{width:15px;height:15px;min-height:15px}
.mt-path{display:flex;gap:6px}
.mt-path input{flex:1}
.mt-help{font-size:12px;color:var(--muted)}
.mt-help summary{color:var(--gold);cursor:pointer}
.mt-help p{margin:6px 0 0;line-height:1.7;overflow-wrap:anywhere}
.mt-help code{padding:0 4px;border-radius:4px;background:#11121f;color:#e8e2f8}

/* 对话框 */
.mt-dialog{width:min(640px,94vw);max-height:88vh;padding:0;border:1px solid var(--line);border-radius:14px;background:var(--dd-card);color:var(--text);overflow:auto}
.mt-dialog::backdrop{background:#05060ccc}
.mt-dialog-head{position:sticky;top:0;z-index:1;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);background:var(--dd-card)}
.mt-dialog-head>div{min-width:0}
.mt-dialog-head h3{font-size:16px;margin:0}
.mt-dialog h4{margin:12px 16px 6px;font-size:12px;color:var(--muted);letter-spacing:.06em}
.mt-kind-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:6px;padding:0 16px}
.mt-kind{display:flex;align-items:center;gap:8px;min-height:40px;padding:4px 10px;border:1px solid var(--line);border-radius:9px;background:var(--dd-soft);font-size:13px;text-align:left}
.mt-kind:hover{border-color:#7a6a49}
.mt-dialog>.mt-kind-grid:last-child{padding-bottom:16px}
.mt-fire-list{margin:0;padding:12px 16px 16px 36px;display:grid;gap:6px;font-size:13px}
.mt-fire-list small{color:var(--muted)}
.mt-browse{display:grid;gap:2px;padding:8px 10px 14px;max-height:60vh;overflow:auto}
.mt-browse-row{min-height:36px;padding:4px 10px;border-radius:8px;text-align:left;font-size:13px;overflow-wrap:anywhere}
.mt-browse-row:hover{background:var(--dd-soft)}
.mt-browse-row.is-exe{color:#a0e1c8}

/* 任务中心 */
.tc-runs{display:grid;gap:8px}
.tc-run{display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap;padding:12px 16px;border-left:3px solid #3f6a60}
.tc-run.tone-warn{border-left-color:#d9b46a}
.tc-run-main{display:flex;align-items:flex-start;gap:10px;flex:1 1 360px;min-width:0}
.tc-run-text{display:grid;gap:2px;min-width:0}
.tc-run-text strong{font-size:14px;overflow-wrap:anywhere}
.tc-run-text small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.tc-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:12px;align-items:start}
.tc-plans{padding:12px;position:sticky;top:12px}
.tc-plans-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 2px 8px}
.tc-plans-head h2{font-size:15px}
.tc-plan-list{display:grid;gap:4px;max-height:60vh;overflow:auto}
.tc-plan{display:grid;gap:1px;min-height:0;padding:8px 10px;border:1px solid transparent;border-radius:9px;text-align:left}
.tc-plan:hover{background:var(--dd-soft)}
.tc-plan.active{background:#302d45;border-color:#7a6a49;box-shadow:inset 2px 0 var(--gold)}
.tc-plan-name{font-size:14px;overflow-wrap:anywhere}
.tc-plan small{color:var(--muted);font-size:12px}
.tc-main{display:grid;gap:12px;min-width:0}
.tc-plan-head{padding:14px 18px;display:grid;gap:8px}
.tc-head-row{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap}
.tc-head-title{flex:1 1 300px;min-width:0}
.tc-head-title h2{font-size:17px}
.tc-head-sub{padding-top:8px;border-top:1px solid #2a2b42}
.tc-head-sub .dd-actions{margin-left:auto}
.tc-head-sub .dd-check{min-height:34px;font-size:13px}
.tc-reason{flex:1 1 240px;min-width:0;font-size:12.5px;color:#f0d39d;overflow-wrap:anywhere}
.tc-nodes{padding:14px 16px}
.tc-nodes-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.tc-nodes-head h3{font-size:15px}
.tc-table{display:grid;gap:4px}
.tc-tr{display:grid;grid-template-columns:18px 54px minmax(160px,1.6fr) minmax(90px,.8fr) minmax(110px,.9fr) minmax(110px,.9fr) 52px 84px;align-items:center;gap:8px;min-height:50px;padding:4px 8px;border:1px solid transparent;border-radius:10px;background:var(--dd-inset)}
.tc-th{min-height:30px;background:none;color:var(--muted);font-size:12px}
/* 表头与可点单元格的文字对齐：单元格按钮有 1px 边框 + 8px 内边距 */
.tc-th>span:nth-child(4),.tc-th>span:nth-child(5),.tc-th>span:nth-child(6){padding-left:9px}
.tc-th>span:nth-child(7){text-align:center}
.tc-tr.selected{border-color:#7a6a49;background:#26233a}
.tc-tr.off{opacity:.6}
.tc-tr.dragging{opacity:.4}
.tc-tr.drop-before{box-shadow:inset 0 2px 0 var(--gold)}.tc-tr.drop-after{box-shadow:inset 0 -2px 0 var(--gold)}
.tc-idx{display:flex;align-items:center;gap:4px;font-family:Consolas,monospace;color:var(--muted)}
.tc-start{padding:0 5px;border-radius:5px;background:#4a3f22;color:#f3dc92;font-size:10.5px;font-style:normal;font-family:inherit;white-space:nowrap}
.tc-name{display:grid;min-width:0}
.tc-name b{font-size:14px;font-weight:500}
.tc-name small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.tc-cell{min-height:36px;padding:2px 8px;border:1px solid transparent;border-radius:8px;text-align:left;font-size:13px;overflow-wrap:anywhere}
.tc-cell:hover:not(:disabled){border-color:#5a5772;background:#1f2036}
.tc-cell.is-out{color:#f0d39d}
.tc-out{padding:0 5px;border-radius:5px;background:#443b2e;font-size:11px;font-style:normal}
.tc-win-opts{display:block;font-size:10.5px;color:#e8c96d;opacity:.85}
.tc-sub-check{margin-left:22px}
.tc-label{display:none}
.tc-toggle{display:flex;justify-content:center}
.tc-row-act{display:flex;gap:4px;justify-content:flex-end}
.tc-row-act .dd-btn-icon{width:36px;min-height:34px;font-size:15px}
.tc-dialog-body{display:grid;gap:4px;padding:12px 16px}
.tc-dialog-body>.dd-field{min-width:0}
.tc-dialog-foot{position:sticky;bottom:0;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--line);background:var(--dd-card)}
.tc-picked{flex:1;min-width:0;color:var(--muted);font-size:12.5px;overflow-wrap:anywhere}
.tc-picked.is-error{color:#f3b7a6}
.tc-sec{padding:10px 0;border-top:1px solid #2a2b42;display:grid;gap:8px}
.tc-sec:first-child{border-top:0}
.tc-sec h4{margin:0;font-size:13px;color:var(--gold);letter-spacing:0}
.tc-sec.focus{margin:0 -10px;padding:10px;border-radius:10px;background:#26233a}
.tc-sec .dd-check{white-space:normal;min-height:34px;font-size:13px}
.tc-menu{display:grid;gap:6px}
.tc-menu .dd-btn{justify-content:flex-start;white-space:normal;text-align:left}
.tc-restore{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.tc-add-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0}
.tc-add-bar input{flex:1 1 160px;min-height:36px;padding:6px 10px}
.tc-add-list{display:grid;gap:4px;max-height:46vh;overflow:auto}
.tc-add-item{display:flex;align-items:center;gap:10px;min-height:40px;padding:4px 10px;border:1px solid var(--line);border-radius:9px;background:var(--dd-inset);font-size:13.5px;cursor:pointer}
.tc-add-item:has(input:checked){border-color:#7a6a49;background:#2c2a3f}
.tc-add-item small{color:var(--muted)}
.tc-inner{display:grid;gap:4px}
.tc-inner-row{display:flex;align-items:center;gap:8px;min-height:42px;padding:2px 8px;border:1px solid var(--line);border-radius:9px;background:var(--dd-inset);font-size:13.5px}
.tc-inner-row>span.mt-break{flex:1;min-width:0}
.tc-inner-row.off{opacity:.6}
.tc-inner-row.drop-before{box-shadow:inset 0 2px 0 var(--gold)}
.tc-inner-row .dd-check{min-height:30px}
.tc-hist header{flex-wrap:wrap}
.tc-hist p{overflow-wrap:anywhere}
.tc-outcomes{margin:6px 0 0;padding-left:20px;display:grid;gap:2px;font-size:12px;color:var(--muted)}
.tc-outcomes b{color:var(--text);font-weight:500}

@media(max-width:1280px){
  .mt-editor{grid-template-columns:300px minmax(0,1fr) 300px}
  .mt-editor.inspector-closed{grid-template-columns:300px minmax(0,1fr) 38px}
  .mt-scheme{grid-template-columns:minmax(0,1fr) auto}
}
@media(max-width:1100px){
  .tc-tr{grid-template-columns:18px 46px minmax(140px,1fr) minmax(86px,auto) minmax(96px,auto) 46px 80px}
  .tc-tr>.tc-cell[data-edit=account],.tc-th>span:nth-child(6){display:none}
}
/* 手机与窄屏：大纲 / 流程图分页切换；节点设置在下方展开；计划表改为卡片行。 */
@media(max-width:900px){
  .mt-head .dd-head-target select{width:auto;flex:1}
  .mt-editor,.mt-editor.inspector-closed{display:flex;flex-direction:column;height:auto;min-height:0;gap:10px}
  .mt-pane-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border:1px solid var(--line);border-radius:11px;background:#1b1c31}
  .mt-pane-switch button{min-height:38px;border-radius:8px;color:var(--muted);font-size:14px}
  .mt-pane-switch button.active{background:#35324a;color:var(--gold);font-weight:600}
  .mt-editor[data-pane=outline] .mt-stage{display:none}
  .mt-editor[data-pane=canvas] .mt-outline{display:none}
  .mt-outline{max-height:none}
  .mt-outline-body{max-height:none;overflow:visible}
  .mt-stage{height:62vh;min-height:360px}
  .mt-inspector{max-height:none}
  .mt-editor.inspector-closed .mt-inspector{min-height:0}
  .mt-insp-tab{writing-mode:horizontal-tb;min-height:42px;height:auto}
  .mt-insp-body{overflow:visible}
  .tc-layout{grid-template-columns:minmax(0,1fr)}
  .tc-plans{position:static}
  .tc-plan-list{display:flex;overflow-x:auto;max-height:none;padding-bottom:4px}
  .tc-plan{flex:0 0 auto;max-width:220px}
}
@media(max-width:700px){
  #mistletoeView .dodoco-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mt-run,.mt-tools,.mt-triggers{padding:12px 14px}
  .mt-run-main .dd-actions{width:100%}.mt-run-main .dd-actions .dd-btn{flex:1}
  .mt-scheme{grid-template-columns:minmax(0,1fr)}
  .mt-scheme .dd-actions .dd-btn{flex:1}
  .mt-tool-row .dd-actions{margin-left:0;width:100%}.mt-tool-row .dd-actions .dd-btn{flex:1}
  .mt-trigger{flex-wrap:wrap}.mt-trigger .dd-actions{width:100%}.mt-trigger .dd-actions .dd-btn{flex:1}
  .mt-row .mt-row-text small{display:none}
  .mt-branches{margin-left:6px}.mt-branch{padding-left:8px}
  .mt-stage{height:calc(100vh - 230px);min-height:340px}
  .mt-zoom button{min-width:30px;padding:0 6px}
  .mt-legend{display:none}
  .tc-plan-head,.tc-nodes{padding:12px}
  .tc-head-title{flex-basis:100%}
  .tc-plan-head .tc-head-row>.dd-actions{width:100%}.tc-plan-head .tc-head-row>.dd-actions .dd-btn{flex:1}
  .tc-head-sub .dd-actions{margin-left:0}
  .tc-th{display:none}
  .tc-tr{grid-template-columns:18px minmax(0,1fr) auto;grid-template-areas:"grip name act" "idx week toggle" "idx window toggle" "idx acc toggle";align-items:center;gap:2px 8px;padding:8px}
  .tc-tr>.mt-grip{grid-area:grip}.tc-tr>.tc-idx{grid-area:idx;align-self:start;flex-direction:column;align-items:flex-start}
  .tc-tr>.tc-name{grid-area:name}.tc-tr>.tc-row-act{grid-area:act}.tc-tr>.tc-toggle{grid-area:toggle;align-self:center}
  .tc-tr>.tc-cell[data-edit=week]{grid-area:week}.tc-tr>.tc-cell[data-edit=window]{grid-area:window}
  .tc-tr>.tc-cell[data-edit=account]{grid-area:acc;display:block}
  .tc-cell{min-height:30px;padding:2px 6px}
  .tc-label{display:inline-block;width:62px;color:var(--muted);font-size:12px}
  .mt-dialog{width:100vw;max-width:100vw;max-height:92vh;margin:auto 0 0;border-radius:16px 16px 0 0}
  .mt-kind-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #mtAuthCode{width:100%}
}
/* 嘟嘟可：查看他人数据时的只读说明与授权入口 */
.dd-owner-note{margin-bottom:var(--dd-gap,16px);border-color:#5d5039;background:#211f30}
.dd-owner-note .dd-filters{margin:0}
/* 运行备注是执行端的内部记录，同 PC 只显示两行，完整内容在悬停提示和运行记录里。 */
.tc-run-note{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* 两个中心共用寄存器，沿用现有卡片、金色选中态与表单控件。 */
#mtTriggers:not(:empty),#mtTaskPrompts:not(:empty){margin-bottom:12px}
#mtTaskPrompts{display:grid;gap:8px}
.mt-register-strip{display:flex;align-items:center;gap:8px 10px;flex-wrap:wrap;min-width:0}
.mt-register-head{font-size:13px;color:var(--muted);white-space:nowrap}
.mt-register-cells{display:grid;grid-template-columns:repeat(10,minmax(30px,1fr));gap:5px;flex:1 1 340px;max-width:560px;min-width:0}
.mt-register-cell{display:grid;place-items:center;gap:1px;min-height:44px;min-width:0;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--dd-inset);color:var(--muted);cursor:pointer}
.mt-register-cell small{font-size:10px;line-height:14px}.mt-register-cell strong{font:600 16px/20px Consolas,monospace;color:var(--text)}
.mt-register-cell:hover:not(:disabled){border-color:#7a6a49;background:var(--dd-soft)}
.mt-register-cell.is-one{border-color:#7a6a49;background:#302d45}.mt-register-cell.is-one strong{color:var(--gold)}
.mt-register-cell.is-unknown{border-style:dashed}.mt-register-cell:disabled{cursor:default;opacity:.65}
/* 启动标题旁使用紧凑状态格；触屏仍保留原有大点击区域与位号。 */
@media(min-width:701px){
  #mtStartupRegisters{gap:6px 8px}
  #mtStartupRegisters .mt-register-head{font-size:12px}
  #mtStartupRegisters .mt-register-cells{flex:0 0 auto;max-width:none;grid-template-columns:repeat(10,26px);gap:4px}
  #mtStartupRegisters .mt-register-cell{height:26px;min-height:26px;padding:0;border-radius:5px}
  #mtStartupRegisters .mt-register-cell small{display:none}
  #mtStartupRegisters .mt-register-cell strong{font-size:13px;line-height:18px}
  #mtStartupRegisters [data-register-reset-all]{min-height:26px;padding:3px 8px;font-size:11px;border-radius:5px}
}
.mt-register-feedback{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.mt-register-feedback:empty{display:none}
.mt-register-settings{padding:16px;display:grid;gap:14px}
.mt-register-settings .dd-field{min-width:0}.mt-register-settings .dd-field input,.mt-register-settings .dd-field select{width:100%}
.mt-register-time,.mt-register-delay{display:flex;gap:8px;flex-wrap:wrap;align-items:end}
.mt-register-delay .dd-field{flex:1 1 60px;min-width:54px}.mt-register-delay input{max-width:100%}
.mt-register-selection{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}
.mt-register-row{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:6px 8px;border:1px solid var(--line);border-radius:8px;background:var(--dd-inset);min-width:0}
.mt-register-label{display:grid;gap:2px;min-width:0;font-size:13px;overflow-wrap:anywhere}.mt-register-label small{font-size:11px;color:var(--muted)}
.mt-register-row select{flex:none;width:auto;min-width:80px;min-height:36px;padding:5px 8px}
.mt-register-row:focus-within{border-color:#7a6a49}
#mistletoeView button:focus-visible,#mistletoeView input:focus-visible,#mistletoeView select:focus-visible,#mistletoeView summary:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(max-width:700px){
  .mt-register-strip{gap:8px}.mt-register-head{flex-basis:100%}
  .mt-register-cells{flex-basis:100%;max-width:none;gap:4px;grid-template-columns:repeat(10,minmax(0,1fr))}
  .mt-register-cell{min-height:46px}.mt-register-cell small{font-size:9px}
  .mt-register-selection{grid-template-columns:minmax(0,1fr)}
  .mt-register-settings .dd-actions{flex-wrap:wrap}.mt-register-settings .dd-actions .dd-btn{flex:1 1 100px;min-height:40px}
}
@media(prefers-reduced-motion:reduce){#mistletoeView *,#mistletoeView *::before,#mistletoeView *::after{animation:none!important;scroll-behavior:auto!important}}

/* 通用流程与独立车道使用原计划表的卡片、折叠行与参数表单。 */
.tc-composition{display:grid;gap:8px;min-width:0}
.tc-composition-row{min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--dd-inset)}
.tc-composition-row>summary{display:flex;align-items:center;gap:8px 10px;min-height:38px;cursor:pointer;flex-wrap:wrap}
.tc-composition-row>summary strong{font-size:14px;overflow-wrap:anywhere;min-width:0}
.tc-composition-row>summary small{color:var(--muted);font-size:12px;flex:1 1 180px;overflow-wrap:anywhere}
.tc-composition-row[open]>summary{margin-bottom:8px}.tc-composition-row>.dd-actions{flex-wrap:wrap}
.tc-lanes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.tc-lane{min-width:0;border:1px solid var(--line);border-top:2px solid var(--mt-yes);border-radius:10px;padding:10px;background:var(--dd-card)}
.tc-lane:nth-child(2){border-top-color:var(--mt-no)}
.tc-lane>header{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:8px}
.tc-lane h4{display:grid;gap:4px;min-width:0;margin:0;font-size:13px;overflow-wrap:anywhere}
.tc-lane h4 small{font-weight:400;color:var(--muted)}
.tc-composition-resource{display:grid;grid-template-columns:22px minmax(120px,1.5fr) minmax(70px,.7fr) minmax(85px,.8fr) minmax(80px,.8fr) auto auto;align-items:center;gap:6px;min-width:0;padding:6px;border-radius:8px;background:var(--dd-inset);margin:5px 0}
.tc-composition-resource.off{opacity:.6}.tc-composition-resource>.dd-actions{flex-wrap:wrap;justify-content:flex-end}
.tc-lane .tc-composition-resource{grid-template-columns:20px minmax(0,1fr) auto}
.tc-lane .tc-composition-resource>.tc-name{grid-column:2}.tc-lane .tc-composition-resource>.tc-cell:not(.tc-name){grid-column:2}
.tc-lane .tc-composition-resource>.dd-check{grid-column:3;grid-row:1/4}.tc-lane .tc-composition-resource>.dd-actions{grid-column:1/-1}
.tc-flow-summary{padding-left:20px;margin:6px 0;min-width:0}.tc-flow-summary li{min-width:0;margin:3px 0}
.tc-flow-summary .tc-cell{display:grid;text-align:left;max-width:100%}.tc-flow-summary small{color:var(--muted);overflow-wrap:anywhere}
.tc-composition-dialog{width:min(1020px,96vw)}
.tc-composition-dialog .tc-dialog-body{padding:14px 16px;min-width:0}
.tc-flow-editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,230px);gap:14px;align-items:start;min-width:0}
.tc-flow-tree{min-width:0;max-height:48vh;overflow:auto;padding:3px}
.tc-flow-catalog{max-height:42vh;overflow:auto;display:grid;gap:6px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--dd-inset)}
.tc-flow-catalog h5{margin:6px 0 0;font-size:12px;color:var(--muted)}
.tc-flow-catalog .dd-actions{gap:6px}
.tc-flow-catalog h4{margin:2px 0;font-size:12px;color:var(--muted)}
.tc-flow-catalog .dd-btn{white-space:normal;text-align:left;min-height:36px}
.tc-flow-step{padding:7px;margin:5px 0;border:1px solid var(--line);border-radius:9px;background:var(--dd-inset);min-width:0}
.tc-flow-step.selected{border-color:#7a6a49;background:#302d45}.tc-flow-step.off{opacity:.6}
.tc-flow-select{display:grid;gap:3px;text-align:left;width:100%;min-height:40px;padding:5px 7px;border-radius:6px;overflow-wrap:anywhere}
.tc-flow-select small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.tc-flow-chain{border-left:2px solid #6fd8ce66;padding-left:9px;margin:8px 0 5px 6px;min-width:0}
.tc-flow-chain>summary{cursor:pointer;font-size:12px;color:var(--muted);min-height:30px}
.tc-flow-parameters{display:grid;gap:10px;min-width:0;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.tc-flow-parameters .dd-field{min-width:0}.tc-flow-parameters input,.tc-flow-parameters select{max-width:100%}
.tc-flow-parameters textarea{width:100%;min-height:72px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--dd-inset);color:var(--text);resize:vertical}
.tc-flow-preview{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;color:var(--muted);background:var(--dd-inset);padding:10px;border:1px solid var(--line);border-radius:9px}
.tc-flow-error{color:#f3b7a6;font-size:13px;overflow-wrap:anywhere}.tc-flow-error:empty{display:none}
.tc-composition-dialog .tc-dialog-foot{position:sticky;bottom:0;background:var(--dd-card);z-index:1;display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--line);flex-wrap:wrap}
.mt-trigger-summary{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;cursor:pointer;min-height:38px;line-height:1.6;font-size:14px;overflow-wrap:anywhere}
.mt-trigger-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}
.mt-trigger-list{max-height:210px;overflow-y:auto;overscroll-behavior:contain}
.mt-fire-list small{display:block;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
@media(max-width:1000px){.tc-composition-resource{grid-template-columns:22px minmax(120px,1fr) auto}.tc-composition-resource>.tc-cell:not(.tc-name){grid-column:2}.tc-composition-resource>.dd-check{grid-column:3;grid-row:1/4}.tc-composition-resource>.dd-actions{grid-column:1/-1}}
@media(max-width:700px){
  .tc-lanes{grid-template-columns:minmax(0,1fr)}.tc-composition-row{padding:8px}
  .tc-flow-editor{grid-template-columns:minmax(0,1fr)}.tc-flow-tree{max-height:42vh}
  .tc-flow-catalog{grid-template-columns:minmax(0,1fr)}.tc-flow-catalog .dd-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.tc-flow-catalog h4{grid-column:1/-1}
  .tc-composition-dialog{width:100vw;max-width:100vw}.tc-composition-dialog .tc-dialog-body{padding:12px}
  .tc-composition-dialog .dd-btn{min-height:40px}.tc-composition-dialog .tc-dialog-foot .dd-btn{flex:1}
}
/* 任务中心流程图（只读）与走过的路径 */
.tc-fc-dialog{width:min(1280px,96vw);height:min(880px,92vh);max-height:92vh;flex-direction:column;overflow:hidden}
.tc-fc-dialog[open]{display:flex}
.tc-fc-stage{flex:1;margin:10px 14px 14px}
.tc-fc-frame{position:absolute;border:1px solid color-mix(in srgb,var(--c) 45%,#3f3c5c);border-radius:13px;background:#1c1833cc}
.tc-fc-frame.st-success,.tc-fc-frame.st-condTrue,.tc-fc-frame.st-condFalse{border:2px solid #3f6a60}
.tc-fc-frame.st-running{border:2px solid var(--gold)}.tc-fc-frame.st-failed{border:2px solid #7a4545}
.tc-fc-frame.dim{opacity:.4}.tc-fc-frame.off{opacity:.55;border-style:dashed}
.tc-fc-frame-title{position:absolute;left:12px;top:5px;right:12px;padding:0;border:0;background:none;color:var(--c);font-size:12.5px;font-weight:700;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.tc-fc-pill{line-height:20px}
.tc-lane.is-taken.yes{border-color:var(--mt-yes)}.tc-lane.is-taken.no{border-color:var(--mt-no)}
.tc-lane.is-skipped{opacity:.45}
.tc-cell.is-walked b{color:var(--green)}
.tc-fc-flash{outline:2px solid var(--gold);outline-offset:2px}
/* 计划表行运行标志 */
.tc-run-badge{display:inline-block;margin-left:8px;padding:0 8px;border:1px solid #3f6a60;border-radius:99px;background:#6fd8ce1f;color:var(--green);font-size:11px;font-style:normal;font-weight:600;line-height:18px;vertical-align:middle;white-space:nowrap}
.tc-run-badge.st-running{border-color:var(--gold);background:var(--gold);color:#29241a}
.tc-run-badge.st-failed{border-color:#7a4545;background:#ef535033;color:#f0b3a3}
.tc-run-badge.st-skipped{border-color:#4a4566;background:#9c97c029;color:var(--muted)}
.tc-tr.is-running,.tc-composition-resource.is-running{border-color:var(--gold);box-shadow:0 0 0 1px #e8c96d55}
/* 任务中心跳转（网页，与 PC 同口径） */
.tc-run-badge.st-jumped{border-color:#4a4566;background:#9c97c029;color:var(--muted)}
.tc-jump-text{display:inline-block;margin-left:10px;color:#c9b4f0}
.tc-row-notice{margin:2px 0 4px 56px;color:var(--muted);font-size:11.5px}
.tc-row-notice.is-problem{color:#f0a08c}
.tc-composition-row.is-problem{border-color:#c9614f}
.tc-composition-resource.is-unreachable .tc-name b{color:var(--muted)}
.tc-jump-field select{max-width:420px}
.tc-row-notice.is-entry{color:#c9b4f0}
