.mg-page{padding:12px;max-width:1500px;margin:auto}.mg-page header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.mg-page h1{font-size:24px;margin:0 0 5px}.mg-page header p{font-size:12px;margin:0}.mg-actions{display:flex;gap:5px;flex-wrap:wrap}.mg-page button,.mg-dialog button{cursor:pointer;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;padding:7px 10px}.mg-actions button,.mg-actions select{font-size:12px;padding:6px 8px}.mg-page progress{width:100%;height:7px;margin:10px 0;accent-color:#059669}.mg-alerts{font-size:12px;color:#9a3412;background:#fff7ed;border-radius:8px;padding:7px 10px;margin:4px 0}.mg-alerts summary{cursor:pointer}.mg-alerts p{margin:5px 0}.mg-center{position:relative;background:#0f766e;color:#fff;border-radius:14px;padding:12px 16px;text-align:center;margin:18px auto 26px;font-weight:700;font-size:14px;max-width:320px}.mg-center:after{content:"";position:absolute;width:2px;height:26px;background:#94a3b8;left:50%;top:100%}.mg-mindmap{display:grid;grid-template-columns:1fr 1fr;gap:24px;position:relative}.mg-mindmap:before{content:"";position:absolute;height:2px;background:#94a3b8;left:25%;right:25%;top:-12px}.mg-branch{position:relative;min-width:0;border-top:2px solid #94a3b8;padding-top:8px}.mg-branch:before{content:"";position:absolute;height:12px;width:2px;background:#94a3b8;top:-14px;left:50%}.mg-branch h2{font-size:15px;margin:0 0 8px;text-align:center}.mg-nodes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.mg-task{position:relative;min-width:0;border:1px solid #bae6fd;border-left:4px solid #0284c7;border-radius:11px;background:#f0f9ff;padding:8px;box-sizing:border-box;color:#0f172a}.mg-task.mg-internal{border-color:#ddd6fe;border-left-color:#7c3aed;background:#faf5ff}.mg-task.mg-finished{opacity:.78}.mg-page .mg-task-main{border:0;background:transparent;padding:0;display:grid;text-align:left;width:100%;gap:4px;min-width:0}.mg-task-main strong{font-size:13px;line-height:1.3;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mg-task-main small{font-size:11px;color:#475569}.mg-time{font-size:11px;font-weight:600;color:#0369a1}.mg-node-actions{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin-top:7px;font-size:11px}.mg-node-actions button,.mg-node-actions a{padding:4px 7px;border:1px solid #cbd5e1;border-radius:6px;background:white;font-size:11px;color:#0f172a;text-decoration:none;max-width:100%;overflow-wrap:anywhere}.mg-phone{font-variant-numeric:tabular-nums}.mg-check{color:#15803d;font-weight:600}.mg-warning{background:#fff7ed;padding:9px;color:#9a3412}
.mg-overlay{position:fixed;inset:0;background:#0f172ae8;z-index:20000;display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto}.mg-dialog{background:white;color:#0f172a;width:min(900px,100%);max-height:94vh;overflow:auto;border-radius:18px;padding:26px;box-sizing:border-box}.mg-dialog pre{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;background:#f1f5f9;padding:15px}.mg-dialog label{display:block;margin:12px 0}.mg-dialog input,.mg-dialog textarea,.mg-dialog select{display:block;width:100%;box-sizing:border-box;padding:10px;border:1px solid #94a3b8;border-radius:8px}.mg-dialog button{margin:8px 8px 0 0}.mg-table{overflow:auto}.mg-table td,.mg-table th{padding:10px;border-bottom:1px solid #e2e8f0}.mg-task strong{overflow-wrap:anywhere}@media(max-width:1000px){.mg-nodes{grid-template-columns:1fr}}@media(max-width:650px){.mg-mindmap{gap:10px}.mg-page{padding:8px}.mg-center{font-size:12px;padding:10px;max-width:260px;margin:14px auto 24px}.mg-task{padding:7px}.mg-task-main strong{font-size:12px}.mg-page h1{font-size:20px}.mg-actions{gap:4px}.mg-actions button{font-size:11px;padding:5px 7px}.mg-overlay{padding:8px}.mg-dialog{padding:16px;max-height:97vh}}@media(max-width:420px){.mg-mindmap{grid-template-columns:1fr}.mg-mindmap:before,.mg-branch:before{display:none}.mg-nodes{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-task-main strong{font-size:11px}.mg-branch h2{text-align:left}}

.mg-assigned-queue{margin-top:18px}.mg-assigned-queue h2{font-size:15px;margin-bottom:5px}.mg-queue-note{font-size:12px;color:#94a3b8;margin:0 0 10px}.mg-assigned-queue .mg-nodes{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:1000px){.mg-assigned-queue .mg-nodes{grid-template-columns:repeat(2,minmax(0,1fr))}}
.mg-dialog{position:relative}.mg-dialog .mg-dialog-close{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:42px;height:42px;min-width:42px;margin:0;padding:0;border:1px solid #cbd5e1;border-radius:50%;background:#fff;color:#334155;font-size:30px;line-height:1}.mg-dialog .mg-dialog-close:hover{background:#f1f5f9}.mg-dialog .mg-dialog-close:focus-visible{outline:3px solid #2563eb;outline-offset:2px}.mg-dialog>h1:first-of-type,.mg-dialog>h2:first-of-type{padding-right:48px}

.mg-agent-lead{padding:12px 0;border-bottom:1px solid #d2dce5}.mg-agent-lead p{white-space:pre-wrap;overflow-wrap:anywhere}.mg-agent-lead a{color:#008a91}.mg-agent-lead button{margin-left:8px}
/* Interactive guidance tree: connectors follow normal document flow. */
.mg-page{color:var(--txt);max-width:1600px}.mg-page header{align-items:flex-start;gap:18px}.mg-page header>div:first-child{flex:1 1 360px}.mg-actions{flex:1 1 340px;justify-content:flex-end}.mg-page button,.mg-dialog button,.mg-page input,.mg-page select{background:var(--panel,#fff);color:var(--txt,#162033);border:1px solid var(--line,#d5deea)}.mg-page button:focus-visible,.mg-dialog button:focus-visible,.mg-page input:focus-visible,.mg-page a:focus-visible{outline:3px solid #14b8a6;outline-offset:3px}.mg-day{display:flex;gap:10px;align-items:center;margin:12px 0}.mg-day input{padding:8px;border-radius:8px}.mg-workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:20px;align-items:start}.mg-canvas{min-width:0;padding:24px;border:1px solid var(--line);border-radius:18px;background-color:var(--bg);background-image:radial-gradient(var(--line) 1px,transparent 1px);background-size:18px 18px}.mg-center{margin:0 0 24px;max-width:none;background:#0f766e}.mg-center:after{height:24px;width:1px;left:20px;background:var(--line)}.mg-tree{margin-left:20px}.mg-tree-branch{position:relative;padding:0 0 20px 24px;border-left:1px solid var(--line)}.mg-tree-branch:last-child{border-left-color:transparent}.mg-tree-branch:before{content:"";position:absolute;left:-1px;top:0;height:25px;width:24px;border-left:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0 0 0 10px}.mg-page .mg-group{width:100%;display:grid;grid-template-columns:24px 1fr;text-align:left;gap:5px;padding:14px;border-radius:12px;border-color:#0d9488}.mg-group small{grid-column:2;color:var(--muted)}.mg-children{padding:16px 0 0 24px;animation:mg-reveal .18s ease-out}.mg-children[hidden]{display:none}.mg-leaf{position:relative;padding:0 0 12px 18px;border-left:1px solid var(--line);min-width:0}.mg-leaf:before{content:"";position:absolute;left:0;top:24px;width:18px;border-top:1px solid var(--line)}.mg-leaf:last-child{padding-bottom:0}.mg-page .mg-leaf button{display:grid;gap:7px;width:100%;text-align:left;padding:14px;border-radius:12px;overflow-wrap:anywhere;white-space:normal}.mg-leaf small{color:var(--muted)}.mg-leaf.is-selected button{border-color:#14b8a6;box-shadow:0 0 0 2px #14b8a640}.mg-status{font-size:12px;color:var(--muted)}.mg-status[data-status=DOING]{color:var(--brand)}.mg-status[data-status=DONE]{color:var(--good)}#mg-detail-pane{min-width:0;position:sticky;top:16px;padding:18px;border:1px solid var(--line);background:var(--panel);border-radius:18px;overflow-wrap:anywhere}.mg-dialog.mg-detail{width:100%;max-height:none;padding:0;box-shadow:none;background:transparent;color:var(--txt)}.mg-detail h2{font-size:20px;margin-top:0}.mg-dialog{background:var(--panel,#fff);color:var(--txt,#162033)}.mg-dialog pre{background:var(--panel2,#edf2f8);color:inherit}.mg-dialog input,.mg-dialog textarea,.mg-dialog select{background:var(--bg,#fff);color:var(--txt,#162033);border-color:var(--line)}.mg-detail a{color:var(--brand);display:inline-block;margin:5px 10px 5px 0}.mg-detail textarea{resize:vertical}.mg-detail input{max-width:100%}.mg-detail label{color:inherit}.mg-detail pre{line-height:1.6}.mg-detail p{line-height:1.5}.mg-page progress{height:9px}.mg-canvas strong{line-height:1.5}@keyframes mg-reveal{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}@media(max-width:1000px){.mg-workspace{grid-template-columns:minmax(0,1fr)}#mg-detail-pane{position:static}.mg-actions{justify-content:flex-start}}@media(max-width:600px){.mg-canvas{padding:14px 10px}.mg-tree{margin-left:10px}.mg-tree-branch{padding-left:14px}.mg-tree-branch:before{width:14px}.mg-children{padding-left:10px}.mg-page .mg-leaf button{padding:10px}.mg-center{font-size:14px;max-width:none}.mg-center:after{left:10px}.mg-page .mg-group{padding:10px}.mg-workspace{gap:12px}}@media(prefers-reduced-motion:reduce){.mg-children{animation:none}}
/* Approved mockup alignment. */
.mg-welcome{margin:22px 0 14px}.mg-welcome h2{font-size:24px;margin:0 0 8px}.mg-welcome p{margin:0;color:var(--muted)}.mg-page header p{padding:16px 18px;border-radius:12px;background:var(--panel);line-height:1.8}.mg-canvas{display:grid;grid-template-columns:150px minmax(0,1fr);gap:24px;padding:30px 20px}.mg-center{align-self:start;margin-top:56px;text-align:left;padding:20px 16px;position:sticky;top:30px;line-height:1.5}.mg-center small{display:block;font-size:12px;font-weight:400;margin-top:8px;color:#ccfbf1}.mg-center:after{height:1px;width:24px;left:100%;top:50%}.mg-tree{margin:0}.mg-tree-branch{padding-left:20px}.mg-tree-branch:before{width:20px}.mg-page .mg-leaf button{gap:4px;padding:12px 14px;grid-template-columns:1fr auto}.mg-leaf strong{grid-column:1/-1;grid-row:1;font-size:14px;font-weight:500}.mg-leaf small{grid-column:1;font-size:12px}.mg-leaf .mg-status{grid-column:2;font-size:12px}.mg-leaf.is-selected button{background:color-mix(in srgb,var(--panel) 90%,#14b8a6)}.mg-detail-caption{color:var(--muted);font-size:12px}.mg-detail h2{margin:20px 0 8px}.mg-detail-status{display:inline-block;background:#0d94881a;color:var(--good);padding:4px 8px;border-radius:5px;font-size:12px}.mg-facts{border-block:1px solid var(--line);padding:14px 0;margin:18px 0}.mg-facts div{display:flex;justify-content:space-between;gap:14px;padding:8px 0}.mg-facts dt{color:var(--muted)}.mg-facts dd{margin:0;text-align:right}@media(max-width:600px){.mg-canvas{display:block;padding:18px 12px}.mg-center{position:relative;margin:0 0 24px;top:auto}.mg-center:after{width:1px;height:24px;left:10px;top:100%}.mg-tree{margin-left:10px}.mg-leaf .mg-status{grid-column:1/-1}.mg-welcome h2{font-size:22px}}@media(min-width:1001px) and (max-width:1250px){.mg-canvas{grid-template-columns:120px minmax(0,1fr);gap:16px;padding:20px 12px}.mg-center:after{width:16px}}

.mg-report-image{display:block;max-width:100%;width:auto;max-height:240px;object-fit:contain;border:1px solid var(--line,#22304f);border-radius:8px;margin:8px 0}.mg-paste-hint{display:block;color:var(--muted,#8ea4c8);margin:6px 0 12px}#mg-paste-preview{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
