/* Живая схема: стили движка seo-kit/orchestra/src/style.css, шрифт Onest (OFL) – файлами */
@font-face{font-family:'Onest';font-style:normal;font-weight:300;font-display:block;src:url(fonts/onest-cyrillic-300-normal.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:300;font-display:block;src:url(fonts/onest-latin-300-normal.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Onest';font-style:normal;font-weight:400;font-display:block;src:url(fonts/onest-cyrillic-400-normal.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:400;font-display:block;src:url(fonts/onest-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Onest';font-style:normal;font-weight:500;font-display:block;src:url(fonts/onest-cyrillic-500-normal.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:500;font-display:block;src:url(fonts/onest-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Onest';font-style:normal;font-weight:600;font-display:block;src:url(fonts/onest-cyrillic-600-normal.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:600;font-display:block;src:url(fonts/onest-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Onest';font-style:normal;font-weight:700;font-display:block;src:url(fonts/onest-cyrillic-700-normal.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:700;font-display:block;src:url(fonts/onest-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Onest';font-style:normal;font-weight:800;font-display:block;src:url(fonts/onest-cyrillic-800-normal.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:800;font-display:block;src:url(fonts/onest-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
/* Живая схема оркестрации (seo-kit, копия utmn-rector/orchestra). Цвета и элементы схемы — как на «Живой схеме» пульта (agents.html);
   шрифт Onest (OFL), заголовки тонкие, акцент — голубой, защищённый контур руководителя — зелёный. */
:root {
  --bg: #f4f5f3; --surface: #fcfcfb; --ink: #0b0b0b; --ink2: #52514e; --muted: #77766f; --line: #e3e2dd; --chip: #efeee9;
  --good: #1a7f37; --ready: #2a78d6; --warn: #9a6700; --bad: #c62828; --run: #eb6834; --plan: #8a8980;
  --good-bg: #e3f3e7; --ready-bg: #e3eefb; --warn-bg: #f8eed6; --run-bg: #fde8de; --plan-bg: #efeee9;
  --hl: #6d5dfc; --hum: #b4570b; --hum-bg: #fbecd9;
  --brand: #0e86c4; --pa: #18794a;
  --m-opus: #7b4fd8; --m-sonnet: #0e7f8f; --m-haiku: #2f8f3a; --m-fable: #d1357f; --m-mixed: #b7791f; --m-def: #77766f;
  --pop-b: color-mix(in srgb, var(--hl) 60%, var(--line));
}
:root[data-theme="dark"] {
  --bg: #111110; --surface: #1a1a19; --ink: #f0efec; --ink2: #c3c2b7; --muted: #9a998f; --line: #2e2e2b; --chip: #262624;
  --good: #4ac26b; --ready: #5598e7; --warn: #d4a72c; --bad: #ff6b6b; --run: #f08a5d; --plan: #8a8980;
  --good-bg: #17301e; --ready-bg: #182a40; --warn-bg: #352a10; --run-bg: #3a2014; --plan-bg: #242422;
  --hl: #9d92ff; --hum: #f2a65a; --hum-bg: #3a2a16;
  --brand: #4cc3f5; --pa: #4cc884;
  --m-opus: #a98bff; --m-sonnet: #3ec6d8; --m-haiku: #5ccf6a; --m-fable: #ff6fae; --m-mixed: #e0b04a; --m-def: #9a998f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Onest, system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; font-size: 15px; overflow: hidden; }
button { font-family: inherit; }

/* ---------- страница вокруг сцены ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.top .tt { font-weight: 600; font-size: 15px; } .top .tt span { color: var(--muted); font-weight: 500; }
.top .sp { flex: 1; }
.top button, .top a { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--chip); border: 1px solid var(--line); border-radius: 10px; padding: 5px 12px; cursor: pointer; text-decoration: none; white-space: nowrap; }
html.embed .top { display: none; }
#vp { position: relative; width: 100vw; overflow: hidden; }
.rot { display: none; position: absolute; left: 16px; right: 16px; font-size: 14px; line-height: 1.4; color: var(--ink2); text-align: center; }
.rot b { display: block; font-weight: 600; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: var(--bg); overflow: hidden; }
@media (max-width: 720px) {
  .top { padding: 6px 16px; gap: 6px; flex-wrap: wrap; }
  .top .tt span, #fsBtn { display: none; }
}

/* ---------- шапка слайда ---------- */
.sh { position: absolute; left: 28px; right: 28px; top: 16px; height: 58px; display: flex; align-items: center; gap: 14px; }
.sh h1 { font-size: 31px; font-weight: 400; margin: 0; letter-spacing: -.015em; line-height: 1.05; white-space: nowrap; }
.sh h1 em { font-style: normal; font-weight: 600; color: var(--brand); }
.sh .sub { color: var(--muted); font-size: 14px; font-weight: 500; margin-top: 4px; white-space: nowrap; }
.sh .ttl { margin-right: auto; min-width: 0; }
.seg { display: inline-flex; background: var(--chip); border-radius: 12px; padding: 4px; flex: none; }
.seg button { border: 0; background: none; font: inherit; font-weight: 500; font-size: 15px; color: var(--ink2); padding: 8px 15px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px #0002; }
.seg button kbd, .scseg kbd { font: inherit; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-left: 6px; }
.lv-btn { font: inherit; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 7px 11px; cursor: pointer; white-space: nowrap; border: 1px solid var(--line); background: var(--chip); color: var(--ink); flex: none; }
.lv-btn[hidden] { display: none; }
.lv-wk { display: inline-flex; gap: 6px; flex: none; }
.lv-tg[aria-pressed="true"] { border-color: var(--hl); background: color-mix(in srgb, var(--hl) 18%, var(--surface)); }
.lv-sum { font-size: 14px; color: var(--ink2); font-weight: 500; white-space: nowrap; flex: none; }
.lv-sum b { font-size: 17px; font-weight: 700; color: var(--ink); }
.lv-sum .r b { color: var(--run); }

/* ---------- левая колонка: сводка оркестратора, схема, легенда ---------- */
.orch-sum { position: absolute; left: 28px; top: 84px; width: 1416px; height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 12px; font-size: 15px; font-weight: 600; background: color-mix(in srgb, var(--run) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--run) 40%, var(--line)); white-space: nowrap; overflow: hidden; }
.orch-sum .meta { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.orch-sum.idle { background: var(--surface); border-color: var(--line); color: var(--ink2); }
.orch-sum.pa { background: color-mix(in srgb, var(--pa) 10%, var(--surface)); border-color: color-mix(in srgb, var(--pa) 45%, var(--line)); }
.meta { color: var(--muted); font-size: 13px; }
.lv-scroll { position: absolute; left: 28px; top: 134px; width: 1416px; height: 884px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.lv-inner { position: relative; isolation: isolate; width: 100%; height: 100%; }
.lv-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; touch-action: none; font-family: inherit; }
.lv-tails { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.lv-tails .tail { fill: var(--surface); stroke: var(--pop-b); stroke-width: 1.5; stroke-linejoin: round; }
.lv-tails .tip { fill: var(--hl); }
.lv-pops { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.lv-leg { position: absolute; left: 30px; top: 1026px; width: 1412px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink2); }
.lv-leg span { display: inline-flex; align-items: center; gap: 6px; }
.lv-leg svg { width: 40px; height: 12px; flex: none; overflow: visible; }
.lv-leg .hx { display: inline-block; width: 24px; height: 13px; border: 1.2px solid var(--run); border-radius: 4px; background: var(--surface); }
.lv-leg .px2 { display: inline-block; width: 24px; height: 13px; border: 1.4px solid var(--pa); border-radius: 7px; background: color-mix(in srgb, var(--pa) 12%, var(--surface)); }
.lv-leg .foot { margin-left: auto; color: var(--muted); font-weight: 600; }

/* ---------- живая схема (как в agents.html) ---------- */
.lv-layer { font-size: 12px; font-weight: 600; fill: var(--muted); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.lv-band { transition: opacity .6s; pointer-events: none; }
.lv-band rect { fill: color-mix(in srgb, var(--ink) 3%, transparent); }
.lv-band.shield rect { fill: color-mix(in srgb, var(--good) 8%, transparent); stroke: color-mix(in srgb, var(--good) 40%, transparent); stroke-width: 1.2; stroke-dasharray: 6 5; }
.lv-band-t { font-size: 12px; font-weight: 600; fill: var(--good); letter-spacing: .03em; paint-order: stroke; stroke: color-mix(in srgb, var(--good) 8%, var(--bg)); stroke-width: 6px; stroke-linejoin: round; pointer-events: none; transition: opacity .6s; }
.lv-edge { fill: none; transition: opacity .2s, stroke-width .2s; pointer-events: none; }
.e-task { stroke: var(--hl); stroke-width: 2; }
.e-control { stroke: var(--good); stroke-width: 2; stroke-dasharray: 8 3 2 3; }
.e-data { stroke: var(--warn); stroke-width: 2.8; stroke-dasharray: .1 6; stroke-linecap: round; }
.e-human { stroke: var(--hum); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.e-org { stroke: var(--muted); stroke-width: 1.6; opacity: 0; } /* подчинение и взаимодействие — только при наведении */
.e-link { stroke: var(--warn); stroke-width: 2.4; stroke-dasharray: .1 6; stroke-linecap: round; opacity: 0; }
.lv-leg .e-org { opacity: .6; }
.lv-edge.hl { stroke-width: 3.4; opacity: 1 !important; }
.lv-edge.dimE { opacity: .07 !important; }
.lv-dot-h, .lv-dot-c { pointer-events: none; }
.par-svg .pbr { fill: var(--run); stroke: var(--surface); stroke-width: 1; }
.par-svg .pbt { font-size: 10px; font-weight: 700; fill: #fff; pointer-events: none; }
.que-svg .qbr { fill: var(--warn-bg); stroke: var(--warn); stroke-width: 1.2; }
.que-svg .qbt { font-size: 10px; font-weight: 700; fill: var(--warn); pointer-events: none; }
.lv-hc { cursor: pointer; }
.lv-hc rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.lv-hc.run rect { stroke: var(--run); }
.lv-hc:hover rect { stroke: var(--hl); stroke-width: 2; }
.lv-hc.done { opacity: .5; }
.lv-hc .h1 { font-size: 11.5px; font-weight: 700; fill: var(--ink); }
.lv-hc .h2 { font-size: 10.5px; font-weight: 500; fill: var(--ink2); }
.lv-hc .hd { fill: var(--muted); } .lv-hc.run .hd { fill: var(--run); animation: cpP 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.lv-hc .hin { transform-box: fill-box; transform-origin: 50% 0; }
.lv-hc.new .hin { animation: hcIn .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes hcIn { from { opacity: 0; transform: translateY(-14px) scale(.6); } to { opacity: 1; transform: none; } }
.lv-br { fill: none; stroke: var(--run); stroke-width: 1.6; opacity: .75; pointer-events: none; }
.lv-br.done { stroke: var(--muted); opacity: .35; stroke-dasharray: 3 4; }
.lv-br.run { stroke-dasharray: 6 5; animation: lvFlow .9s linear infinite; }
.lv-pill rect { fill: var(--surface); stroke: var(--run); stroke-width: 1.2; }
.lv-pill text { font-size: 11px; font-weight: 700; fill: var(--run); }
.lv-pill.by-orch rect { stroke: var(--hl); } .lv-pill.by-orch text { fill: var(--hl); }
.lv-lab { pointer-events: none; }
.lv-lab rect { fill: var(--surface); stroke: var(--run); stroke-width: 1.2; }
.lv-lab text { font-size: 11px; font-weight: 700; fill: var(--run); }
.lv-edge.flow { stroke-dasharray: 7 6; animation: lvFlow .9s linear infinite; stroke-width: 2.4; }
@keyframes lvFlow { to { stroke-dashoffset: -13; } }
@keyframes cpP { 50% { transform: scale(1.6); opacity: .5; } }
.lv-node { cursor: grab; touch-action: none; outline: none; transition: opacity .2s; }
.lv-node.grab { cursor: grabbing; }
.lv-node .bg { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; transition: stroke .2s; }
.lv-node:hover .bg, .lv-node:focus-visible .bg, .lv-node.grab .bg { stroke: var(--hl); }
.lv-node.lit .bg { stroke: var(--hl); stroke-width: 2.4; }
.lv-node.lit { filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--hl) 30%, transparent)); }
.lv-node.dimN { opacity: .25; }
.lv-node .halo { fill: var(--run); opacity: 0; pointer-events: none; }
.lv-node .tt { font-size: 12.5px; font-weight: 700; fill: var(--ink); }
.lv-node .st { font-size: 12px; font-weight: 500; fill: var(--ink2); }
.lv-node .pc { display: none; } /* загрузку показывает кольцо; ×N — плашка «параллельно» */
.lv-node .ic { font-size: 19px; }
.lv-node .track { fill: none; stroke: var(--line); stroke-width: 5; }
.lv-node .arc { fill: none; stroke: var(--muted); stroke-width: 5; stroke-linecap: round; }
.lv-node.run .arc { stroke: var(--run); }
.lv-node.run .bg { stroke: var(--run); }
.lv-node.run .st, .lv-node.run .pc { fill: var(--run); }
.lv-node.idle .tt, .lv-node.idle .st, .lv-node.idle .pc, .lv-node.idle .track, .lv-node.idle .arc { opacity: .62; }
.lv-node.idle .tt { fill: var(--ink2); }
.lv-node.idle .ic { filter: grayscale(1); opacity: .55; }
.lv-node.human .bg { fill: color-mix(in srgb, var(--hum) 7%, var(--surface)); stroke: color-mix(in srgb, var(--hum) 45%, var(--line)); }
.lv-node.human .st { fill: var(--hum); }
.lv-node.ext .bg { fill: transparent; stroke-dasharray: 6 5; }
.lv-node.wait .bg { stroke: var(--hum); stroke-width: 3; }
.lv-node.wait .halo { fill: var(--hum); }
/* личный агент руководителя — зелёная «защищённая» плашка */
.lv-node.pa .bg { fill: color-mix(in srgb, var(--pa) 9%, var(--surface)); stroke: var(--pa); stroke-width: 2.2; }
.lv-node.pa.idle .tt { fill: var(--ink); opacity: 1; }
.lv-node.pa.idle .ic { filter: none; opacity: 1; }
.lv-node.pa.run .bg { stroke: var(--run); }
.lv-dot { fill: var(--plan); }
.lv-dot.s-active { fill: var(--good); } .lv-dot.s-ready { fill: var(--ready); } .lv-dot.s-partial { fill: var(--warn); }
.lv-dot.s-human { fill: var(--hum); } .lv-dot.s-running { fill: var(--run); }
.lv-node.ev-hit, .pa-chip.ev-hit { animation: evHit 1.3s ease-out; }
@keyframes evHit { 0% { filter: drop-shadow(0 0 0 #fff0); } 25% { filter: drop-shadow(0 0 14px var(--run)) brightness(1.25); } 100% { filter: none; } }
.lv-edge.ev-flash { animation: evFl 1.2s ease-out; }
@keyframes evFl { 0%, 60% { stroke: var(--run); stroke-width: 5; opacity: 1; } 100% { } }
.ev-env { cursor: pointer; outline: none; }
.ev-env .eh { opacity: .28; } .ev-env .eb { fill: var(--surface); stroke-width: 2.5; } .ev-env .ei { font-size: 17px; }
.ev-env:hover .eh { opacity: .5; }

/* ---------- защищённый контур руководителя ---------- */
.pa-frame { pointer-events: none; }
.pa-box { fill: color-mix(in srgb, var(--pa) 6%, var(--bg)); stroke: var(--pa); stroke-width: 2; }
.pa-ring { fill: none; stroke: color-mix(in srgb, var(--pa) 40%, transparent); stroke-width: 1.4; stroke-dasharray: 3 7; }
.pa-spoke { stroke: color-mix(in srgb, var(--pa) 35%, transparent); stroke-width: 1.3; }
.pa-spoke.run { stroke: var(--run); stroke-width: 1.8; stroke-dasharray: 5 5; animation: lvFlow .9s linear infinite; }
.pa-lbg { fill: var(--bg); stroke: var(--pa); stroke-width: 1.5; }
.pa-leg { font-size: 13px; font-weight: 700; fill: var(--pa); }
.pa-leg2 { font-size: 12px; font-weight: 500; fill: var(--pa); }
.pa-chips { transition: opacity .2s; }
.pa-chips.dim { opacity: .3; }
.pa-chip { cursor: pointer; outline: none; }
.pa-chip .pcb { fill: var(--surface); stroke: color-mix(in srgb, var(--pa) 55%, var(--line)); stroke-width: 1.4; transition: stroke .2s, fill .2s; }
.pa-chip .pct { font-size: 12px; font-weight: 600; fill: var(--ink); pointer-events: none; }
.pa-chip .pci { font-size: 13px; pointer-events: none; }
.pa-chip.run .pcb { stroke: var(--run); stroke-width: 2.2; fill: color-mix(in srgb, var(--run) 10%, var(--surface)); }
.pa-chip.run .pct { fill: var(--run); }
.pa-chip.done .pcb { stroke: var(--pa); stroke-width: 1.8; fill: color-mix(in srgb, var(--pa) 13%, var(--surface)); }
.pa-chip:hover .pcb, .pa-chip:focus-visible .pcb { stroke: var(--hl); stroke-width: 2.2; }
.pa-tag .ptb { fill: color-mix(in srgb, var(--hl) 12%, var(--surface)); stroke: var(--hl); stroke-width: 1.3; }
.pa-tag .ptt { font-size: 11.5px; font-weight: 600; fill: var(--hl); pointer-events: none; }

/* ---------- бейдж модели ---------- */
.m-opus { --m: var(--m-opus); } .m-sonnet { --m: var(--m-sonnet); } .m-haiku { --m: var(--m-haiku); } .m-fable { --m: var(--m-fable); }
.m-mixed { --m: var(--m-mixed); } .m-def, .m-other { --m: var(--m-def); }
.mb { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.5; padding: 0 8px; border-radius: 99px; color: var(--m); background: color-mix(in srgb, var(--m) 15%, var(--surface)); border: 1px solid color-mix(in srgb, var(--m) 60%, transparent); white-space: nowrap; }
.mb-svg .mbr { fill: color-mix(in srgb, var(--m) 16%, var(--surface)); stroke: var(--m); stroke-width: 1.2; }
.mb-svg .mbt { font-size: 10.5px; font-weight: 700; fill: var(--m); pointer-events: none; }
.lv-node.pinned .bg { stroke: var(--hl); }

/* ---------- окна над схемой ---------- */
.pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.st-active { color: var(--good); background: var(--good-bg); } .st-ready { color: var(--ready); background: var(--ready-bg); }
.st-idle { color: var(--plan); background: var(--plan-bg); } .st-running { color: var(--run); background: var(--run-bg); }
.st-human { color: var(--hum); background: var(--hum-bg); } .st-partial { color: var(--warn); background: var(--warn-bg); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--hl); font-weight: 600; cursor: pointer; font-size: 13px; }
.pop { position: absolute; left: 0; top: 0; width: 300px; max-width: 90vw; max-height: 360px; display: flex; flex-direction: column; pointer-events: auto; background: var(--surface); border: 1.5px solid var(--pop-b); border-radius: 14px; box-shadow: 0 10px 30px #0004; font-size: 13px; transform-origin: 50% 100%; }
.pop.pop-in { animation: popIn .2s ease-out; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.88); } to { opacity: 1; transform: none; } }
.ph { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; border-bottom: 1px solid var(--line); flex: none; }
.ph.grab { cursor: grabbing; }
.ph .pi { font-size: 18px; } .ph .pt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.25; font-weight: 600; }
.px { border: 0; background: var(--chip); color: var(--ink); width: 28px; height: 28px; border-radius: 8px; font-size: 16px; cursor: pointer; flex: none; }
.pb { padding: 8px 12px 12px; overflow-y: auto; min-height: 0; touch-action: pan-y; }
.pb h5 { margin: 10px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.pb ul { margin: 2px 0; padding-left: 18px; } .pb li { margin: 2px 0; }
.pb p { margin: 2px 0; }
.prow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pm { margin-top: 3px; }
.pl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pbar { flex: 1; height: 7px; background: var(--chip); border-radius: 9px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--muted); border-radius: 9px; }
.pbar.r i { background: var(--run); }
.pf { margin-top: 10px; display: flex; justify-content: flex-end; }
.pf .more { border: 0; background: var(--hl); color: var(--surface); font: inherit; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.hum-note { margin-top: 6px; padding: 6px 9px; border-radius: 9px; background: var(--hum-bg); color: var(--hum); font-weight: 600; font-size: 12.5px; }
ul.cp { list-style: none; padding: 0; margin: 4px 0; }
ul.cp li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); }
ul.cp li:first-child { border-top: 0; }
ul.cp .cd { flex: 1 1 100%; font-weight: 600; }
ul.cp .cd i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--run); margin-right: 6px; animation: cpP 1.4s ease-in-out infinite; }
ul.cp .cd i.d { animation: none; background: var(--muted); }
.mpop { position: absolute; width: 420px; max-height: 560px; border-color: var(--kc, var(--pop-b)); z-index: 70; }
.mpop .kdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.mpop .mtxt { margin-top: 10px; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.mpop .meta { font-size: 13px; color: var(--ink2); font-weight: 600; }
.mpop .mft { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.mpop .mft small { display: inline-block; min-width: 42px; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.mpop .mhint { margin-top: 12px; font-size: 12px; color: var(--muted); }
.mpop .ph .pt { font-size: 15px; }
.mpop .ph { cursor: grab; touch-action: none; }
.mpop .px { min-width: 32px; min-height: 32px; font-size: 22px; line-height: 1; }
.mpop .pb p { font-size: 14px; }
#themeStage { display: none; font-size: 14px; padding: 7px 12px; white-space: nowrap; }
html.embed #themeStage { display: inline-flex; align-items: center; }
.ev-env:focus-visible .eb, .ev-env:hover .eb { stroke-width: 4; }
.msheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; }
.msheet .msb { position: absolute; inset: 0; background: #0006; }
.msheet .mpop { position: relative; width: 100%; max-height: 70vh; overflow: auto; border-radius: 18px 18px 0 0; padding-bottom: 20px; z-index: 1; }
.msheet .mtxt { font-size: 17px; } .msheet .mft { font-size: 15px; } .msheet .mhint { font-size: 13px; }
.msheet .px { min-width: 44px; min-height: 44px; }
/* лента: вся история, прокрутка, «к новым» */
.fcard { position: relative; }
.ev-feed { overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: auto; scrollbar-color: color-mix(in srgb, var(--muted) 60%, transparent) transparent; }
.ev-feed::-webkit-scrollbar { width: 10px; } .ev-feed::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 55%, transparent); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
.ev-feed:focus-visible { outline: 2px solid var(--hl); outline-offset: -2px; }
.ev-row { flex: none; }
.ev-row .et { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-row.sub { padding-left: 30px; background: color-mix(in srgb, var(--hl) 5%, var(--bg)); border-left-style: dashed; }
.ev-row.sub .ef { font-weight: 500; font-size: 12.5px; }
.ev-row.pers { background: color-mix(in srgb, var(--pa) 7%, var(--bg)); }
.ev-row .sb { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--hl); border: 1px solid currentColor; border-radius: 6px; padding: 0 4px; margin-right: 6px; }
.ev-row.pers .sb { color: var(--pa); }
.ev-new { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--hl); border: 0; border-radius: 999px; padding: 7px 16px; box-shadow: 0 4px 14px #0004; cursor: pointer; }
.ev-new[hidden] { display: none; }
:root:not([data-theme="dark"]) .ev-new { background: #4b3fd6; }
:root[data-theme="dark"] .ev-new { color: #111; }
.tipbox { position: absolute; z-index: 90; width: 300px; pointer-events: none; background: var(--surface); border: 1.5px solid var(--pop-b); border-radius: 12px; box-shadow: 0 10px 26px #0003; padding: 9px 12px 10px; font-size: 13.5px; opacity: 0; transform: translateY(4px); transition: opacity .14s, transform .14s; }
.tipbox.on { opacity: 1; transform: none; }
.tipbox b { font-size: 14.5px; font-weight: 600; } .tipbox .tk { color: var(--muted); font-size: 12.5px; font-weight: 600; margin: 1px 0 4px; }
.tipbox .tf { color: var(--ink2); font-size: 12.5px; margin-bottom: 3px; }
.tipbox .tn { margin-top: 5px; font-weight: 600; color: var(--ink2); } .tipbox .tn.r { color: var(--run); }
.tipbox .th { margin-top: 5px; color: var(--muted); font-size: 12px; }

/* окна «Диалоги» и «Ход мыслей» */
.pop.dlg, .pop.mind { width: 360px; height: 400px; }
.pop.dlg .pb, .pop.mind .pb { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.dtabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid var(--line); flex: none; scrollbar-width: thin; }
.dtab { flex: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink2); background: var(--chip); border: 1px solid transparent; border-radius: 99px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
.dtab.on { color: var(--hl); border-color: var(--hl); background: color-mix(in srgb, var(--hl) 12%, var(--surface)); }
.dtab i { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 3px; }
.dmsgs { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); border-radius: 0 0 12px 12px; }
.drow { display: flex; gap: 6px; align-items: flex-end; max-width: 100%; }
.drow.out { flex-direction: row-reverse; align-self: flex-end; }
.drow .av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--chip); border: 1px solid var(--line); display: grid; place-items: center; font-size: 14px; }
.dbub { position: relative; max-width: 78%; text-align: left; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 6px 10px 5px; overflow-wrap: anywhere; display: block; }
.drow.out .dbub { border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--hl) 14%, var(--surface)); border-color: color-mix(in srgb, var(--hl) 35%, var(--line)); }
.dbub .dw { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink2); margin-bottom: 1px; }
.dbub .dk { font-weight: 500; color: var(--muted); }
.dbub .dt { display: block; white-space: pre-wrap; }
.dbub .dm { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.dempty { margin: auto; color: var(--muted); text-align: center; padding: 20px; font-size: 13.5px; }
.mtask { padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--chip); flex: none; font-size: 13px; }
.mtask b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mtl { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 6px 12px; position: relative; }
.mit { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding-bottom: 10px; }
.mit::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.mit:last-child::before { display: none; }
.mit .mi { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--chip); border: 1px solid var(--line); z-index: 1; }
.mit.say .mi { background: color-mix(in srgb, var(--hl) 16%, var(--surface)); border-color: color-mix(in srgb, var(--hl) 40%, var(--line)); }
.mit .mx { font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; padding-top: 3px; }
.mit.say .mx { font-style: italic; color: var(--ink2); }
.mit .mt { font-size: 11px; color: var(--muted); margin-left: 6px; font-style: normal; }
.mit.new { animation: evNew .6s ease-out; }
.mfin { flex: none; padding: 9px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--good) 10%, var(--surface)); font-size: 13px; max-height: 32%; overflow-y: auto; }
.mfin b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--good); }
.mfin.run { background: var(--run-bg); } .mfin.run b { color: var(--run); }

/* окно «Решает человек»: Утвердить / Вернуть */
.appr-pop { position: absolute; z-index: 80; width: 330px; pointer-events: auto; background: var(--surface); border: 2px solid var(--hum); border-radius: 14px; box-shadow: 0 12px 32px #0004; padding: 11px 13px 13px; font-size: 13.5px; animation: popIn .25s ease-out; }
.appr-pop .ah { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--hum); }
.appr-pop .at { font-weight: 600; font-size: 17px; margin: 3px 0 2px; line-height: 1.25; }
.appr-pop .am { color: var(--ink2); font-size: 13px; }
.appr-pop .abtn { display: flex; gap: 8px; margin-top: 10px; }
.appr-pop .abtn button { flex: 1; border: 0; border-radius: 10px; padding: 9px 10px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.appr-pop #apBtn { color: #fff; background: var(--hum); animation: apPulse 1.6s ease-in-out infinite; flex: 1.4; }
.appr-pop #rtBtn { color: var(--ink); background: var(--chip); border: 1px solid var(--line); }
.appr-pop #rtBtn:hover { border-color: var(--hum); }
:root[data-theme="dark"] .appr-pop #apBtn { color: #1a1206; }
.appr-pop.ok { border-color: var(--good); } .appr-pop.ok .ah { color: var(--good); }
@keyframes apPulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--hum) 25%, transparent); } }

/* надпись при смене режима */
.mode-cap { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 60; pointer-events: none; background: var(--surface); border: 1.5px solid var(--hl); border-radius: 16px; box-shadow: 0 14px 40px #0004; padding: 14px 26px; text-align: center; opacity: 0; transition: opacity .35s, transform .35s; max-width: 1100px; }
.mode-cap.on { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }
.mode-cap b { display: block; font-size: 30px; font-weight: 400; letter-spacing: -.01em; }
.mode-cap span { display: block; color: var(--ink2); font-size: 17px; font-weight: 500; margin-top: 2px; }

/* ---------- правая колонка ---------- */
.rc { position: absolute; left: 1464px; top: 84px; width: 428px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
/* выбор сценария */
.scseg { flex: none; display: flex; gap: 6px; }
.scseg button { flex: 1; min-width: 0; font: inherit; font-size: 15px; font-weight: 500; padding: 8px 4px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.scseg button .si { font-size: 16px; }
.scseg button kbd { margin-left: 2px; }
.scseg button.on { border-color: var(--run); color: var(--ink); background: color-mix(in srgb, var(--run) 10%, var(--surface)); font-weight: 600; }
.scseg button:hover { border-color: var(--hl); }
/* плеер сценария */
.trbar { flex: none; background: var(--surface); border: 1.5px solid var(--hl); border-radius: 16px; padding: 9px 11px 10px; font-size: 13px; }
.trbar .r1 { display: flex; align-items: center; gap: 6px; }
.trbar .tn { font-weight: 600; margin-right: auto; white-space: nowrap; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 1.2; }
.trbar .tn small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.trbar button.tb { border: 0; background: var(--chip); color: var(--ink); width: 34px; height: 34px; border-radius: 10px; font-size: 15px; cursor: pointer; flex: none; }
.trbar button.tb:hover { background: color-mix(in srgb, var(--hl) 18%, var(--chip)); }
.trbar .tw { margin-top: 6px; color: var(--ink2); line-height: 1.3; font-size: 15px; min-height: 40px; }
.trbar .tw b { color: var(--ink); }
.trbar .ts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.trbar .tc { flex: none; font: inherit; font-size: 12px; font-weight: 700; border: 1.5px solid var(--line); background: var(--chip); color: var(--ink2); border-radius: 99px; padding: 0 8px; cursor: pointer; min-width: 26px; }
.trbar .tc.done { border-color: color-mix(in srgb, var(--hl) 45%, var(--line)); color: var(--ink); }
.trbar .tc.cur { border-color: var(--run); background: var(--run-bg); color: var(--run); }
.trbar .tc.h { border-style: dashed; }
.trbar .stg { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; margin-right: 6px; vertical-align: 1px; }
.trbar .stg.ai { color: var(--run); background: var(--run-bg); } .trbar .stg.hu { color: var(--hum); background: var(--hum-bg); }

/* сколько это заняло */
.tcard { flex: none; padding: 11px 14px 12px; }
.tcard h5, .fcard h5 { margin: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.trow { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 10px; margin-top: 8px; }
.trow .lb { font-size: 13px; font-weight: 600; color: var(--ink2); line-height: 1.2; }
.clk { display: flex; align-items: baseline; gap: 8px; }
.clk b { font-size: 34px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--run); line-height: 1; }
.clk span { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.25; }
.yours { display: flex; align-items: center; gap: 10px; }
.yv { font-size: 26px; font-weight: 600; letter-spacing: -.02em; min-width: 92px; white-space: nowrap; line-height: 1; color: var(--hum); }
.ysl { flex: 1; min-width: 0; }
.yours input[type=range] { width: 100%; margin: 0; accent-color: var(--hum); }
.yh { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 500; }
.appr { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; margin: 6px 0 0 122px; }
.appr button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); font: 600 16px/1 Onest, sans-serif; display: grid; place-items: center; padding: 0; cursor: pointer; }
.appr b { font-size: 17px; color: var(--ink); min-width: 18px; text-align: center; }
.aist { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink2); font-weight: 500; }
.aist b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.tnote { display: block; margin-top: 8px; font-size: 12px; color: var(--ink2); background: var(--chip); border-radius: 9px; padding: 6px 9px; line-height: 1.35; }

/* лента событий */
.fcard { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 0 0; overflow: hidden; }
.fcard h5 { padding: 0 14px 6px; }
.fcard h5 span { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ev-feed { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 16px 16px; scrollbar-width: thin; }
.ev-row { display: grid; grid-template-columns: 22px 1fr 58px; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; font: inherit; font-size: 13px; color: var(--ink); background: none; border: 0; border-left: 4px solid var(--kc); border-bottom: 1px solid var(--line); padding: 6px 10px; cursor: pointer; width: 100%; }
.ev-row:hover { background: var(--chip); }
.ev-row.fresh { background: color-mix(in srgb, var(--kc) 22%, var(--bg)); }
.ev-row.anim { animation: evNew 1s ease-out; }
@keyframes evNew { from { transform: translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.ev-row .ei { grid-row: span 2; }
.ev-row .ef { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-row .et { grid-column: 2 / 4; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.ev-row time { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.ev-empty { padding: 14px; color: var(--muted); font-size: 13px; }

/* ---------- подробности (выезжающая панель) ---------- */
.drawer-bg { position: absolute; inset: 0; background: #0006; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 100; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 500px; background: var(--surface); border-left: 1px solid var(--line); z-index: 101; transform: translateX(100%); transition: transform .22s ease; overflow-y: auto; padding: 18px 20px 40px; }
#stage.open .drawer { transform: none; } #stage.open .drawer-bg { opacity: 1; pointer-events: auto; }
.drawer .x { position: sticky; top: 0; float: right; border: 0; background: var(--chip); color: var(--ink); width: 34px; height: 34px; border-radius: 10px; font-size: 18px; cursor: pointer; }
.drawer h2 { font-size: 24px; font-weight: 500; margin: 4px 0 2px; }
.drawer h4 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.drawer p { margin: 6px 0; }
.drawer ul { margin: 4px 0; padding-left: 18px; } .drawer li { margin: 4px 0; font-size: 14px; }

/* справка по клавишам */
.help { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 110; width: 600px; padding: 18px 22px; display: none; box-shadow: 0 20px 50px #0005; }
.help.on { display: block; }
.help h3 { margin: 0 0 8px; font-weight: 500; } .help p { margin: 4px 0; font-size: 14px; color: var(--ink2); }
.help kbd { font: 700 12px/1 Onest, sans-serif; border: 1px solid var(--line); background: var(--chip); border-radius: 5px; padding: 2px 6px; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .lv-edge, .lv-node, .lv-node .bg { transition: none; }
  .lv-edge.flow, .lv-br.run, .lv-hc.run .hd, ul.cp .cd i, .appr-pop #apBtn, .pa-spoke.run { animation: none; }
  .pop.pop-in, .lv-node.ev-hit, .pa-chip.ev-hit, .ev-row.anim, .lv-hc.new .hin, .mit.new, .appr-pop { animation: none; }
  .ev-row.fresh { outline: 1px solid var(--kc); }
  .mode-cap, .tipbox, .drawer, .drawer-bg, .lv-band { transition: none; }
}

/* «Вся организация»: схема 1:1 к сцене 1920 — подписи не мельче 14 px */
.lv-svg.cx .lv-node .tt { font-size: 15px; }
.lv-svg.cx .lv-node .st { font-size: 14px; }
.lv-svg.cx .lv-node .pc { font-size: 12.5px; }
.lv-svg.cx .mb-svg .mbt, .lv-svg.cx .par-svg .pbt, .lv-svg.cx .que-svg .qbt { font-size: 12px; }
.lv-svg.cx .lv-hc .h1 { font-size: 14px; } .lv-svg.cx .lv-hc .h2 { font-size: 12.5px; }
.lv-svg.cx .lv-lab text, .lv-svg.cx .lv-pill text { font-size: 13px; }
.lv-svg.cx .lv-layer { font-size: 14px; }
.lv-layer.vert { text-transform: none; letter-spacing: .02em; font-weight: 600; fill: var(--ink2); }
.lv-svg.cx .pa-chip .pct { font-size: 14px; } .lv-svg.cx .pa-chip .pci { font-size: 15px; }
.lv-svg.cx .pa-tag .ptt { font-size: 14px; }
.lv-svg.cx .pa-leg { font-size: 15px; } .lv-svg.cx .pa-leg2 { font-size: 14px; }
