 :root{font:14px/1.45 system-ui,-apple-system,Segoe UI,sans-serif;--bg:#f7f8fa;--panel:#fff;--text:#252a32;--muted:#8c929c;--border:#e2e5e9;--accent:#8055ff;--canvas:#f9fafb;--shadow:0 8px 30px #2222}*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--text)}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:transparent;border-radius:7px;padding:9px}button:hover:not(:disabled),summary:hover{background:#8c8c8c15}button:disabled{opacity:.3;cursor:default}button:focus-visible,summary:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}input,textarea,select{width:100%;border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:7px;padding:9px}.top{height:68px;position:absolute;z-index:5;top:8px;left:9px;right:9px;display:flex;align-items:center;gap:22px;padding:0 18px;background:var(--panel);border:1px solid var(--border);border-radius:15px;box-shadow:0 2px 12px #0000000a}.brand{display:flex;align-items:center;gap:8px;white-space:nowrap}.brand img{object-fit:contain}.brand strong{font-size:18px}.menubar{display:flex;align-items:center;gap:3px}.menu{position:relative}.menu summary{cursor:pointer;list-style:none;padding:11px 12px;border-radius:8px;font-weight:550}.menu summary::-webkit-details-marker{display:none}.menu[open]>summary{background:#8055ff16;color:var(--accent)}.dropdown{position:absolute;top:calc(100% + 12px);left:0;min-width:240px;max-height:min(75vh,620px);overflow:auto;padding:12px;background:var(--panel);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:13px}.dropdown button{display:block;text-align:left;width:100%;padding:10px 12px}.dropdown hr{border:0;border-top:1px solid var(--border);margin:10px 0}.dropdown p,.dropdown #emptySelection{font-size:12px;color:var(--muted);line-height:1.6}.dropdown label{display:block;margin:8px 0;font-size:12px;color:var(--muted)}.dropdown label input,.dropdown label textarea,.dropdown label select{margin-top:5px}.properties{min-width:300px}.head-actions{margin-left:auto;display:flex;align-items:center;gap:15px;min-width:0}.head-actions #projectName{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}.head-actions #saveStatus{color:var(--muted);font-size:11px;white-space:nowrap}.stage{height:100dvh;position:relative;overflow:hidden;background:var(--canvas)}#viewport{height:100%;width:100%;touch-action:none;cursor:grab}#viewport:active{cursor:grabbing}#canvas{height:100%;width:100%;display:block;color:#8d949c}.edge{fill:none;stroke:#a3a8b3;stroke-width:2;opacity:.85;vector-effect:non-scaling-stroke}.edge.active{stroke:var(--accent);stroke-width:3}.node{cursor:move}.node rect{fill:#fff;stroke:#d6dbe1;stroke-width:1.6;rx:13;filter:drop-shadow(0 2px 3px #00000012)}.node text{fill:#343b46;font:500 16px system-ui;pointer-events:none}.node .sub{fill:#78818d;font:11px system-ui}.node.selected rect{stroke:var(--accent)!important;stroke-width:3}.node.match rect{stroke:#28a875;stroke-width:3}.node[data-color=violet] rect{fill:#8650ca;stroke:#9b69dc}.node[data-color=blue] rect{fill:#08a5c5;stroke:#33c0d7}.node[data-color=green] rect{fill:#2fa577;stroke:#4ebd94}.node[data-color=orange] rect{fill:#ff7017;stroke:#ff994c}.node[data-color=rose] rect{fill:#e64e56;stroke:#ff7278}.node[data-color=yellow] rect{fill:#efc400;stroke:#f9d73d}.node[data-color=slate] rect{fill:#fff;stroke:#cbd0d7}.node:not([data-color=slate]) text{fill:#fff}.node:not([data-color=slate]) .sub{fill:#fff9}.zoom{position:absolute;top:87px;right:20px;display:flex;align-items:center;gap:5px;background:var(--panel);padding:4px;border:1px solid var(--border);border-radius:12px;box-shadow:0 2px 10px #0000000a}.zoom output{min-width:50px;text-align:center;color:var(--muted);font-size:12px}.toolbar{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:5px;padding:7px 10px;background:var(--panel);border:1px solid var(--border);border-radius:17px;box-shadow:var(--shadow);max-width:calc(100vw - 20px);overflow-x:auto;scrollbar-width:thin}.toolbar>button,.context-only>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:47px;font-size:11px;padding:5px}.toolbar .symbol{font-size:21px;line-height:25px}.context-only{display:none;align-items:center;gap:4px}.toolbar.has-selection .context-only{display:flex}.separator{height:31px;width:1px;background:var(--border);flex:none;margin:0 5px}.colors{display:flex;align-items:center;gap:7px}.swatch{width:27px;height:27px;border-radius:50%;padding:0;border:2px solid #00000015;box-shadow:0 1px 4px #0002;flex:none}.swatch.white{background:white;border:2px solid #252a32}.swatch.rose{background:#e64e56}.swatch.orange{background:#ff7017}.swatch.yellow{background:#efc400}.swatch.green{background:#2fa577}.swatch.blue{background:#08a5c5}.swatch.violet{background:#8650ca}.danger{color:#ed6269}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}dialog{border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:16px;max-width:560px;padding:25px;box-shadow:var(--shadow)}dialog::backdrop{background:#0008}#toast{position:fixed;top:90px;left:50%;transform:translateX(-50%);background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:10px 15px;z-index:15;opacity:0;pointer-events:none;transition:opacity .2s}#toast.show{opacity:1}body:not(.light){--canvas:#121722;--panel:#202737;--text:#f1f3f9;--muted:#a1a8b9;--border:#394255;--shadow:0 8px 30px #0008}body:not(.light) .node[data-color=slate] rect{fill:#283246;stroke:#7e8ba1}body:not(.light) .node[data-color=slate] text{fill:#f2f5ff}body:not(.light) .node[data-color=slate] .sub{fill:#c6ccda}@media(max-width:900px){.top{gap:8px;padding:0 8px}.brand strong{font-size:15px}.brand img{width:29px}.menu summary{padding:9px 6px;font-size:12px}.head-actions #saveStatus{display:none}.head-actions #projectName{max-width:115px;font-size:11px}.toolbar{bottom:8px}.colors{gap:4px}.swatch{width:23px;height:23px}}@media(max-width:600px){.top{height:auto;min-height:65px;flex-wrap:wrap;align-content:center;padding:7px}.menubar{order:3;width:100%;justify-content:space-between}.head-actions{flex:1}.dropdown{position:fixed;top:112px;left:10px;right:10px;min-width:0}.zoom{top:130px}.toolbar{width:max-content}.toolbar.has-selection{width:calc(100vw - 12px)}.toolbar .symbol{font-size:18px}.toolbar>button,.context-only>button{min-width:40px}.swatch{width:21px;height:21px}}@media print{.top,.toolbar,.zoom{display:none!important}.stage{height:100vh;background:white}#canvas{color:#ccc}}
/* Mentalista v3: portas de conexão e propriedades integradas à barra */
.node-port{cursor:crosshair;pointer-events:all}.node-port .port-disc{fill:#8055ff;stroke:#fff;stroke-width:3;filter:drop-shadow(0 2px 4px #0003)}.node-port .port-plus{font:bold 22px system-ui;fill:#fff!important;pointer-events:none}.node-port:hover .port-disc{fill:#6540e6;stroke-width:4}.link-preview{fill:none;stroke:#8055ff;stroke-width:3;stroke-dasharray:7 5;vector-effect:non-scaling-stroke;pointer-events:none}.property-anchor{position:relative;display:flex;align-items:center}.property-anchor>button{display:flex;flex-direction:column;align-items:center;min-width:76px;font-size:11px;padding:5px}.property-panel{position:absolute;bottom:calc(100% + 17px);left:50%;transform:translateX(-50%);width:295px;max-height:min(65vh,460px);overflow:auto;background:var(--panel);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:15px;z-index:10}.property-panel[hidden]{display:none!important}.property-panel label{display:block;font-size:12px;color:var(--muted);margin-bottom:10px}.property-panel input,.property-panel textarea,.property-panel select{margin-top:5px}.property-panel #overview{border-top:1px solid var(--border);padding-top:9px;font-size:12px}.toolbar{overflow:visible}.toolbar.has-selection{overflow:visible}.toolbar .context-only{flex:none}.node{pointer-events:visiblePainted}.node text{user-select:none}.node-port .port-plus{user-select:none}@media(max-width:700px){.toolbar{overflow-x:auto;overflow-y:visible}.property-panel{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);max-width:calc(100vw - 24px)}}

/* Mentalista v4 — busca e página de atalhos */
.find-panel{position:absolute;z-index:4;top:90px;left:20px;width:min(390px,calc(100vw - 40px));max-height:calc(100dvh - 185px);display:flex;flex-direction:column;gap:9px;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:14px;box-shadow:var(--shadow)}.find-panel[hidden]{display:none}.find-head{display:flex;justify-content:space-between;align-items:center}.find-head button{font-size:17px}.find-count,.find-hint{font-size:12px;color:var(--muted);margin:0}.find-results{overflow-y:auto;min-height:0;max-height:48vh;display:flex;flex-direction:column;gap:3px}.find-result{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:3px;border:1px solid transparent;padding:9px}.find-result strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.find-result small{color:var(--muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.find-result.active{border-color:var(--accent);background:#8055ff12}.shortcuts-dialog{width:min(620px,calc(100vw - 30px));max-height:85dvh;overflow:auto}.shortcuts-grid{display:grid;grid-template-columns:1fr auto;gap:10px 18px;align-items:center;margin:18px 0}.shortcuts-grid kbd{font:12px system-ui;border:1px solid var(--border);background:var(--canvas);padding:5px 8px;border-radius:6px;text-align:center}.shortcuts-dialog form{text-align:right}@media(max-width:600px){.find-panel{top:132px;left:10px;width:calc(100vw - 20px);max-height:calc(100dvh - 220px)}}@media print{.find-panel{display:none!important}}

/* Mentalista v5 — listas rápidas */
.toolbar>button img{width:24px;height:24px;object-fit:contain}.node .list-line{font-size:12px;pointer-events:none}.node[data-color=slate] .list-line{fill:#596273}.list-dialog{width:min(530px,calc(100vw - 24px));max-height:88dvh;overflow-y:auto}.list-dialog h2{margin:0 0 7px}.list-dialog p{font-size:13px;color:var(--muted)}.list-dialog label{display:block;font-weight:600;margin:13px 0 5px}.list-entry{display:flex;gap:8px;align-items:stretch}.list-entry textarea{min-width:0;resize:vertical}.list-entry button,.list-footer button{background:var(--accent);color:white;padding:10px 16px}.list-voice{display:flex;align-items:center;gap:9px;margin:12px 0}.list-voice small{color:var(--muted);font-size:11px}.list-items{padding-left:24px;max-height:32vh;overflow:auto}.list-items li{margin:5px 0;padding-left:4px;display:flex;gap:5px}.list-items input{flex:1;min-width:0}.list-items button{font-size:20px;color:#d34b58}.list-footer{display:flex;justify-content:space-between;align-items:center;margin-top:15px}.list-footer span{color:var(--muted);font-size:12px}@media print{.list-dialog{display:none}}

/* Mentalista v6 — ações integradas às caixas Lista */
.node .list-tool-hit{fill:transparent!important;stroke:none!important;filter:none!important;pointer-events:all}.node .list-tool{cursor:pointer}.node .list-tool:hover .list-tool-hit{fill:#8883!important}.node .list-tool-icon{font:18px system-ui;pointer-events:none}.node .list-line.done{text-decoration:line-through;opacity:.55}.list-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.list-actions button{border:1px solid var(--border);background:var(--panel);padding:7px 11px}.list-items .topic-check{width:18px;height:18px;flex:none;align-self:center;accent-color:var(--accent)}.list-items .topic-marker{min-width:20px;align-self:center;text-align:center;font-weight:600}.list-items li{align-items:center}

/* v7: seleção deliberada de elos e editor independente */
.edge{pointer-events:none}.edge.edge-picked{stroke:#e15b50;stroke-width:4;opacity:1}.edge-actions{position:absolute;bottom:98px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:7px 12px;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:var(--shadow);z-index:4;white-space:nowrap}.edge-actions[hidden],.floating-editor[hidden]{display:none!important}.edge-actions button:first-of-type{background:#d94550;color:#fff}.floating-editor{position:fixed;z-index:12;top:105px;right:25px;width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 120px);display:flex;flex-direction:column;border:1px solid var(--border);border-radius:15px;background:var(--panel);box-shadow:0 15px 65px #0005;overflow:hidden}.editor-head{display:flex;align-items:center;justify-content:space-between;background:var(--canvas);padding:7px 12px;cursor:move;touch-action:none;user-select:none}.editor-head button{padding:4px 9px}.editor-tools{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:9px;border-bottom:1px solid var(--border)}.editor-tools select{width:auto;max-width:145px;padding:6px}.editor-tools button{padding:6px 9px;border:1px solid var(--border)}.editor-content{min-height:180px;max-height:38dvh;overflow:auto;outline:none;padding:16px;white-space:pre-wrap;line-height:1.6;user-select:text}.editor-content:empty:before{content:attr(data-placeholder);color:var(--muted)}.editor-content h2{margin:5px 0 12px}.editor-extract{border-top:1px solid var(--border);padding:9px}.editor-extract-buttons{display:flex;gap:4px;flex-wrap:wrap}.editor-extract-buttons button{background:var(--canvas);padding:6px 10px}.editor-matches{max-height:130px;overflow:auto;margin-top:7px;color:var(--muted);font-size:12px}.editor-match{display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--border);padding:4px}.editor-match span{overflow-wrap:anywhere;color:var(--text)}.editor-match button{color:var(--accent);white-space:nowrap}.editor-bottom{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--border);padding:5px 12px;font-size:11px;color:var(--muted)}.floating-editor.minimized .editor-tools,.floating-editor.minimized .editor-content,.floating-editor.minimized .editor-extract,.floating-editor.minimized .editor-bottom{display:none}@media(max-width:600px){.floating-editor{top:130px;right:10px;max-height:calc(100dvh - 145px)}.editor-tools select{max-width:115px}}@media print{.floating-editor,.edge-actions{display:none!important}}

/* v8: nós de texto e gerador local */
.node .text-node-body{height:100%;overflow:auto;user-select:text;cursor:text;color:#293242;background:transparent;font:14px/1.5 system-ui;overflow-wrap:anywhere;white-space:normal;padding:0 3px}.node .text-node-body h1,.node .text-node-body h2,.node .text-node-body h3{margin:0 0 8px;color:inherit}.node .text-node-body p{margin:0 0 9px}.node[data-color=slate] .text-node-body{color:#273142}body:not(.light) .node[data-color=slate] .text-node-body{color:#f2f5ff}.node:not([data-color=slate]) .text-node-body{color:white}.lero-panel{border-top:1px solid var(--border);padding:9px 12px;overflow:auto;max-height:220px}.lero-panel summary{cursor:pointer;font-weight:600}.lero-controls{display:grid;grid-template-columns:repeat(4,minmax(65px,1fr));gap:8px;margin:9px 0}.lero-controls label{font-size:11px;color:var(--muted)}.lero-controls input{margin-top:3px;padding:6px}.lero-controls button{grid-column:1/-1;background:var(--accent);color:#fff}.lero-panel small{color:var(--muted)}.floating-editor.minimized .lero-panel{display:none}@media(max-width:600px){.lero-controls{grid-template-columns:repeat(2,minmax(70px,1fr))}}

/* Mentalista v10: rodapé e fixação de todos os tipos de nó */
.node-footer-divider{stroke:currentColor;opacity:.22;pointer-events:none}.node .pinned-indicator{font:17px system-ui;pointer-events:none;opacity:.75}.node .list-tool-hit{pointer-events:all!important}.node .list-tool{pointer-events:all;cursor:pointer}.node .list-tool:focus .list-tool-hit{fill:#8b5cf655!important;stroke:#8b5cf6!important}.node .text-node-body{padding-bottom:4px}

/* v11 — texto integrado é leitura visual; edição somente no Editor.
   Isso impede seleção acidental e mantém nós comuns acima dos textos grandes. */
#viewport,#canvas,.node,.node foreignObject,.node .text-node-body{-webkit-user-select:none;user-select:none}
.node .text-node-body{pointer-events:none!important;cursor:move!important}
.node foreignObject{pointer-events:none!important}
.node text{pointer-events:none}
#editorDeleteSelection{min-width:46px;padding:6px 7px;font-weight:700}

/* v12: editor expandido ocupa toda a janela do Mentalista, sobrepondo o Palco. */
.floating-editor.maximized{position:fixed!important;inset:0!important;top:0!important;left:0!important;right:0!important;bottom:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;border-radius:0!important;z-index:30!important;}
.floating-editor.maximized .editor-head{cursor:default;}
.floating-editor.maximized .editor-content{flex:1 1 auto;min-height:120px;max-height:none;}
.floating-editor.maximized .lero-panel{flex-shrink:0;max-height:25dvh;}
.floating-editor.maximized .editor-extract{flex-shrink:0;}
.floating-editor.maximized .editor-matches{max-height:13dvh;}
.projects-dialog{width:min(540px,calc(100vw - 28px));max-height:80dvh;}
.projects-list{display:flex;flex-direction:column;gap:8px;max-height:55dvh;overflow:auto;margin:16px 0;}
.project-entry{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;padding:13px 15px;text-align:left;border:1px solid var(--border);background:var(--canvas);border-radius:10px;}
.project-entry:hover{border-color:var(--accent);}
.project-entry small{color:var(--muted);}

/* Calculadora flutuante — tema herdado do Mentalista */
.calculator[hidden]{display:none!important}.calculator{position:fixed;z-index:80;top:105px;right:25px;width:330px;max-width:calc(100vw - 16px);background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:15px;box-shadow:0 16px 55px #0006;overflow:hidden;display:flex;flex-direction:column}.calculator-head{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;background:var(--canvas);cursor:move;touch-action:none;user-select:none;font-weight:600}.calculator-head button{cursor:pointer;font-size:18px;padding:2px 10px}.calculator-screen{padding:15px 13px 12px;text-align:right;min-height:125px;display:flex;flex-direction:column;justify-content:end;align-items:stretch}.calculator-history{color:var(--muted);font-size:12px;min-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calculator-display{font-size:39px;font-weight:450;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:ltr}.calculator-copy{align-self:flex-end;font-size:12px;color:var(--accent);padding:4px 7px}.calculator-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:5px}.calculator-grid button{background:var(--canvas);border:1px solid var(--border);border-radius:6px;min-height:54px;font-size:19px;touch-action:manipulation}.calculator-grid button:hover{background:color-mix(in srgb,var(--accent) 16%,var(--canvas))}.calculator-grid .calc-equals{background:var(--accent);color:white;border-color:var(--accent)}.calculator-grid .calc-equals:hover{background:#6c42e7}.calculator-message{min-height:21px;padding:2px 10px 5px;font-size:11px;color:var(--muted);text-align:center}.calculator:focus-within{box-shadow:0 16px 55px #0006,0 0 0 1px var(--accent)}@media(max-width:600px){.calculator{top:135px;right:8px;width:min(330px,calc(100vw - 16px))}.calculator-grid button{min-height:47px}}@media print{.calculator{display:none!important}}

/* Mentalista v14 — configurações modulares e temas derivados das cinco paletas fornecidas */
.settings-dialog{width:min(860px,calc(100vw - 24px));max-width:none;max-height:90dvh;overflow:auto;padding:0;border-radius:18px;}
.settings-heading{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;padding:24px 26px 12px;border-bottom:1px solid var(--border)}
.settings-heading h2{margin:0 0 5px;font-size:23px}.settings-heading p,.settings-module-head p,.settings-note{margin:0;color:var(--muted);font-size:13px}
.settings-heading button{border:1px solid var(--border);flex:none}
.settings-module{margin:20px 24px;padding:20px;border:1px solid var(--border);border-radius:15px;background:var(--canvas)}
.settings-module-head h3{margin:0 0 5px;font-size:18px}
.mode-choice{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:18px 0;border:0;padding:0}
.mode-choice legend{font-weight:650;margin-bottom:8px}.mode-choice label{display:flex;align-items:center;gap:8px;padding:9px 14px;background:var(--panel);border:1px solid var(--border);border-radius:10px;cursor:pointer}
.mode-choice input{width:16px;height:16px;margin:0;accent-color:var(--accent)}
.theme-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.theme-option{display:flex;flex-direction:column;align-items:stretch;gap:11px;text-align:left;background:var(--panel);border:2px solid var(--border);padding:13px;border-radius:12px;min-height:100px}
.theme-option.is-selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.theme-option strong{font-size:13px}
.theme-swatches{display:flex;height:38px;border-radius:7px;overflow:hidden;border:1px solid #8883}.theme-swatches i{flex:1}
.settings-note{margin-top:16px}.settings-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 26px 22px}.settings-bottom span{font-size:12px;color:var(--muted)}
.settings-bottom button{background:var(--accent);color:var(--accent-ink);font-weight:650;padding:10px 20px}
/* Remove cores roxas fixas dos estados da interface; nós coloridos continuam independentes. */
.menu[open]>summary{background:var(--theme-soft);color:var(--text)}
.calculator-grid .calc-equals,.lero-controls button{color:var(--accent-ink)}
.calculator-grid .calc-equals:hover{background:var(--accent);filter:brightness(1.08)}
@media(max-width:600px){.settings-heading{padding:17px}.settings-module{margin:12px;padding:14px}.theme-gallery{grid-template-columns:1fr 1fr}.settings-bottom{padding:12px 17px}.theme-option{min-height:90px;padding:9px}}
@media(max-width:400px){.theme-gallery{grid-template-columns:1fr}}
@media print{.settings-dialog{display:none!important}}

/* Mentalista v15 — lista compacta e calculadora independente */
.calculator-launch{position:fixed;z-index:6;top:91px;left:24px;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;color:var(--accent-ink,var(--text));background:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 75%,var(--panel));box-shadow:0 8px 22px color-mix(in srgb,var(--accent) 30%,transparent),inset 0 1px 1px #ffffff50;transition:transform .15s,box-shadow .15s;}
.calculator-launch:hover{transform:translateY(-2px) scale(1.05);background:var(--accent);box-shadow:0 12px 28px color-mix(in srgb,var(--accent) 38%,transparent)}
.calculator-launch:active{transform:scale(.97)}
#editorCalculator{font-size:19px;min-width:36px;min-height:32px;line-height:1;padding:5px 8px}
.list-dialog{width:min(640px,calc(100vw - 24px));max-height:min(88dvh,800px);padding:0!important;overflow:hidden;display:flex;flex-direction:column;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:19px;box-shadow:0 24px 65px #0004}
.list-dialog:not([open]){display:none!important}
.list-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px 11px;border-bottom:1px solid var(--border)}
.list-dialog-heading{display:flex;align-items:center;gap:11px}.list-dialog-heading h2{margin:0;font-size:20px}
.list-dialog .list-exit{width:34px;height:34px;padding:0;border-radius:9px;display:grid;place-items:center;font-size:18px}
.list-dialog-body{padding:15px 20px 12px;overflow-y:auto;min-height:0}
.list-fields{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:12px}
.list-dialog .list-fields label{margin:0;color:var(--muted);font-size:12px;font-weight:600}
.list-dialog .list-fields input,.list-dialog .list-fields select{margin-top:5px;color:var(--text);font-size:14px}
.list-dialog .list-input-label{margin:15px 0 5px;color:var(--muted);font-size:12px}
.list-dialog .list-entry{gap:9px}.list-dialog .list-entry textarea{min-height:66px;resize:vertical}
.list-dialog .list-entry button{display:flex;align-items:center;gap:5px;justify-content:center;min-width:105px;background:var(--accent);color:var(--accent-ink,var(--text));font-weight:650}
.list-dialog .list-entry button span:first-child{font-size:22px;line-height:1}
.list-dialog .list-items{margin:12px 0 0;padding-left:12px;max-height:32dvh;overflow:auto;list-style:none}
.list-dialog .list-items:empty{display:none}
.list-dialog .list-items li{align-items:center;padding:3px 0}
.list-dialog .list-items input:not([type=checkbox]){padding:7px}
.list-dialog .list-status{font-size:11px;color:var(--muted);min-height:0;margin-top:6px}
.list-dialog .list-status:empty{display:none}
.list-dialog .list-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding:12px 18px;border-top:1px solid var(--border);background:var(--panel)}
.list-dialog .list-actions button{border:1px solid var(--border);background:var(--canvas);padding:8px 11px;border-radius:9px;font-size:12px;white-space:nowrap}
.list-dialog .list-actions button:hover:not(:disabled){background:color-mix(in srgb,var(--accent) 13%,var(--canvas))}
.list-dialog .list-actions .list-done{background:var(--accent);color:var(--accent-ink,var(--text));border-color:var(--accent);font-weight:650}
.list-dialog .list-counter{margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}
@media(max-width:600px){.calculator-launch{top:130px;left:10px;width:48px;height:48px}.list-dialog-head{padding:12px}.list-dialog-body{padding:12px}.list-fields{grid-template-columns:1fr}.list-dialog .list-actions{padding:9px;gap:5px}.list-dialog .list-actions button{padding:7px}.list-dialog .list-actions button span{display:none}.list-dialog .list-counter{order:2;margin-left:0}.list-dialog .list-actions .list-done{margin-left:auto}}
@media print{.calculator-launch{display:none!important}}

/* v17 — Ferramentas de interação */
.interaction-tools{position:absolute;z-index:6;top:90px;left:20px;display:flex;gap:4px;padding:5px;background:var(--panel);border:1px solid var(--border);border-radius:15px;box-shadow:var(--shadow)}
.interaction-tools button{display:flex;align-items:center;gap:6px;padding:9px 12px;font-weight:600;color:var(--text)}
.interaction-tools button.active{background:var(--accent);color:white}
#viewport.mode-pointer{cursor:default}#viewport.mode-pointer:active{cursor:default}
#viewport.mode-hand,#viewport.mode-hand:active{cursor:grab}#viewport.mode-hand:active{cursor:grabbing}
.marquee-rect{fill:var(--accent);fill-opacity:.12;stroke:var(--accent);stroke-width:1.5;stroke-dasharray:6 4;vector-effect:non-scaling-stroke}
.find-panel{top:155px!important;max-height:calc(100dvh - 240px)!important}
@media(max-width:650px){.interaction-tools{top:86px;left:10px}.interaction-tools button span{display:none}.find-panel{top:148px!important;max-height:calc(100dvh - 225px)!important}}

/* v18 — controles circulares e busca sem sobreposições */
.interaction-tools{position:fixed;top:91px;left:94px;z-index:7;display:flex;align-items:center;gap:7px;padding:5px;border:1px solid var(--border);border-radius:999px;background:var(--panel);box-shadow:var(--shadow)}
.interaction-tools button{width:46px;height:46px;min-width:46px;display:grid;place-items:center;padding:0;border-radius:50%;border:1px solid var(--border);background:color-mix(in srgb,var(--panel) 85%,var(--accent) 15%);color:var(--text);transition:transform .15s,background .15s,box-shadow .15s}
.interaction-tools button:hover{transform:translateY(-2px);background:color-mix(in srgb,var(--accent) 22%,var(--panel))}
.interaction-tools button.active{background:var(--accent);color:var(--accent-ink,var(--text));border-color:color-mix(in srgb,var(--accent) 80%,var(--border));box-shadow:0 3px 12px color-mix(in srgb,var(--accent) 30%,transparent)}
.interaction-tools button svg{display:block;pointer-events:none}
.find-panel{top:169px!important;left:20px;max-height:calc(100dvh - 190px)!important;z-index:8}
.list-dialog .list-exit{position:relative;z-index:2;cursor:pointer}
@media(max-width:650px){.interaction-tools{top:130px;left:66px;gap:4px;padding:4px}.interaction-tools button{width:39px;height:39px;min-width:39px}.interaction-tools button svg{width:21px;height:21px}.find-panel{top:194px!important;left:10px;max-height:calc(100dvh - 210px)!important}}
@media print{.interaction-tools{display:none!important}}

/* v19: comandos compactos do editor */
#editorIntegrate,#editorNewDraft,#editorCopy{width:35px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:6px;vertical-align:middle}
#editorIntegrate svg,#editorNewDraft svg,#editorCopy svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}

/* v20: formulário Editar desacoplado do botão Propriedades */
#propertyPanel:not([hidden]){position:fixed;z-index:40;bottom:92px;left:50%;transform:translateX(-50%);width:min(340px,calc(100vw - 30px));max-height:65vh;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:16px;padding:17px;box-shadow:var(--shadow)}
.node .text-node-body{pointer-events:auto!important;user-select:none!important;-webkit-user-select:none!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--accent) transparent;touch-action:pan-y;cursor:default!important}
.node foreignObject{pointer-events:auto!important}
/* Abertura cinematográfica: efeitos nativos e sem dependências */
.cinematic-splash{position:fixed;inset:0;z-index:99999;overflow:hidden;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 48%,#20243e 0%,#0a101e 54%,#03050b 100%);color:#f7f1db;isolation:isolate;opacity:1;transition:opacity .6s ease,visibility .6s ease}
.cinematic-splash.splash-done{opacity:0;visibility:hidden;pointer-events:none}
.splash-stars{position:absolute;inset:-50%;background-image:radial-gradient(circle,#fff9 1px,transparent 1.8px),radial-gradient(circle,#dbb96577 1px,transparent 2px);background-size:83px 83px,131px 131px;background-position:0 0,37px 52px;animation:splashStars 4s ease-out both;opacity:.4}
.splash-halo{position:absolute;width:min(90vw,750px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,#d4af3736 0%,#c6a64b0b 38%,transparent 68%);filter:blur(14px);animation:splashHalo 4s ease-in-out both}
.splash-orbit{position:absolute;width:min(72vw,430px);aspect-ratio:1;border-radius:50%;border:1px solid #d4af374d;box-shadow:0 0 40px #d4af371a,inset 0 0 30px #d4af3711;animation:splashOrbit 4s cubic-bezier(.2,.7,.1,1) both}
.orbit-two{width:min(85vw,530px);border-style:dashed;border-color:#f3dfac33;animation-direction:reverse}
.splash-center{z-index:2;text-align:center;display:flex;align-items:center;flex-direction:column;gap:10px}
.splash-mark{width:160px;height:160px;display:grid;place-items:center;border-radius:40px;background:radial-gradient(circle,#f4da8640,transparent 68%);filter:drop-shadow(0 0 24px #dfb84e88);animation:splashMark 4s cubic-bezier(.18,.7,.1,1) both}
.splash-mark img{width:138px;height:138px;object-fit:contain}
.splash-name{font-size:clamp(28px,6vw,64px);font-weight:800;letter-spacing:.22em;padding-left:.22em;background:linear-gradient(110deg,#a98533,#fff5c8,#d4af37,#fff4bf);background-clip:text;-webkit-background-clip:text;color:transparent;text-shadow:0 0 50px #caa54533;animation:splashName 4s ease both}
.splash-tagline{font-size:clamp(9px,1.4vw,13px);letter-spacing:.38em;color:#c8b77e;animation:splashTag 4s ease both}
.splash-progress{position:absolute;bottom:12%;width:min(240px,50vw);height:2px;background:#d4af3726;overflow:hidden;border-radius:5px}.splash-progress span{display:block;height:100%;width:100%;background:linear-gradient(90deg,transparent,#f8e9a9,#b8860b);transform-origin:left;animation:splashLoad 4s linear both}
@keyframes splashStars{from{transform:scale(1.2) rotate(-8deg);opacity:0}35%{opacity:.6}to{transform:scale(1) rotate(4deg);opacity:.2}}
@keyframes splashHalo{0%{transform:scale(.4);opacity:0}35%{transform:scale(1.1);opacity:1}85%{opacity:1}100%{transform:scale(1.25);opacity:.2}}
@keyframes splashOrbit{from{transform:rotate(-110deg) scale(.45);opacity:0}30%{opacity:1}to{transform:rotate(90deg) scale(1.15);opacity:.4}}
@keyframes splashMark{0%{opacity:0;transform:scale(.25) rotate(-25deg);filter:blur(20px)}28%{opacity:1;transform:scale(1.15) rotate(3deg);filter:blur(0)}45%{transform:scale(1) rotate(0)}85%{opacity:1}100%{opacity:0;transform:scale(1.15)}}
@keyframes splashName{0%,22%{opacity:0;transform:translateY(28px);letter-spacing:.4em}43%{opacity:1;transform:translateY(0);letter-spacing:.22em}82%{opacity:1}100%{opacity:0;transform:translateY(-12px)}}
@keyframes splashTag{0%,38%{opacity:0;transform:translateY(12px)}56%,83%{opacity:1;transform:translateY(0)}100%{opacity:0}}
@keyframes splashLoad{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(prefers-reduced-motion:reduce){.cinematic-splash *{animation:none!important}.splash-mark,.splash-name,.splash-tagline{opacity:1!important;transform:none!important}}

/* Janelas informativas — v23 */
.info-dialog{width:min(560px,calc(100vw - 32px));max-height:min(82vh,760px);overflow:auto;border:1px solid var(--border, #b8b8b8);border-radius:18px;padding:24px;background:var(--surface,#fff);color:var(--text,#252525);box-shadow:0 24px 80px #0004;line-height:1.6}.info-dialog::backdrop{background:#0009;backdrop-filter:blur(3px)}.info-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.info-heading h2{margin:0}.info-dialog h3{margin:18px 0 5px;font-size:1rem}.info-dialog p{margin:10px 0}.info-dialog a{color:var(--accent,#7252b4);text-decoration:underline;overflow-wrap:anywhere}.info-close{border:0;background:transparent;color:inherit;font-size:22px;cursor:pointer;padding:4px 10px}.about-brand{display:flex;align-items:center;gap:15px;padding:12px 0}.about-brand div{display:flex;flex-direction:column}.about-brand strong{font-size:1.4rem}.about-brand span{opacity:.75}.info-dialog form{text-align:right;margin-top:18px}.info-dialog form button{cursor:pointer}

/* Mapa de ícones e botões — v24 */
.icon-map-dialog{width:min(780px,calc(100vw - 24px));max-height:90dvh;overflow:auto;}
.icon-map-dialog .info-heading{position:sticky;top:0;z-index:2;background:var(--surface,#fff);padding:8px 0;}
.icon-map-search-label{display:block;margin:12px 0 5px;font-weight:600;font-size:.9rem;}
#iconMapSearch{width:100%;box-sizing:border-box;padding:11px 13px;border-radius:10px;border:1px solid var(--border,#bbb);background:var(--surface,#fff);color:var(--text,#222);font:inherit;}
.icon-map-section{margin:22px 0;} .icon-map-section h3{margin:0 0 10px;font-size:1.02rem;}
.icon-map-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:8px;}
.icon-map-entry{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--border,#ddd);border-radius:11px;font-size:.88rem;line-height:1.45;}
.icon-map-symbol{display:inline-flex;align-items:center;justify-content:center;flex:0 0 104px;min-height:34px;border-radius:9px;background:var(--surface-2,rgba(120,120,120,.10));font-weight:650;text-align:center;overflow-wrap:anywhere;padding:3px;}
.icon-map-entry[hidden],.icon-map-section[hidden]{display:none!important;}
@media(max-width:520px){.icon-map-grid{grid-template-columns:1fr}.icon-map-symbol{flex-basis:94px}}

/* v25: círculo cromático e checklist diretamente no palco */
.custom-color-wrap{position:relative;width:29px;height:29px;display:grid;place-items:center;border-radius:50%;border:2px solid var(--border);background:conic-gradient(#f55,#fd5,#5c5,#4af,#75f,#f5a,#f55);cursor:pointer;flex:none;color:#fff;text-shadow:0 1px 3px #000;font-size:19px;overflow:hidden}.custom-color-wrap:focus-within{outline:3px solid var(--accent);outline-offset:2px}.custom-color-wrap input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0}.node .stage-check{pointer-events:all;cursor:pointer;outline:none}.node .stage-check-box{fill:transparent!important;stroke:var(--node-ink,#fff)!important;stroke-width:1.8!important;filter:none!important}.node[data-color=slate] .stage-check-box{stroke:#46516a!important}.node .stage-check-tick{fill:none;stroke:var(--node-ink,#fff);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.node[data-color=slate] .stage-check-tick{stroke:#46516a}.node .stage-check:hover .stage-check-box,.node .stage-check:focus .stage-check-box{stroke:var(--accent)!important;stroke-width:3!important}.node[style*="--node-ink"] .list-line,.node[style*="--node-ink"]>text{fill:var(--node-ink)!important}.node[style*="--node-ink"] .stage-check-box{stroke:var(--node-ink)!important}.node[style*="--node-ink"] .stage-check-tick{stroke:var(--node-ink)!important}

/* v26: menus hierárquicos compactos, sem barras de rolagem internas */
.menubar .dropdown{padding:7px;min-width:246px;max-height:none;overflow:visible;z-index:30}
.menu-group{border-bottom:1px solid var(--border)}
.menu-group:last-of-type{border-bottom:0}
.menu-group>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;font-weight:650;font-size:13px;line-height:1.2;padding:9px 11px;border-radius:7px}
.menu-group>summary::-webkit-details-marker{display:none}
.menu-group>summary::after{content:'▸';font-size:12px;transition:transform .15s}
.menu-group[open]>summary::after{transform:rotate(90deg)}
.menu-group[open]>summary{background:var(--theme-soft,#8055ff13)}
.menu-group-items{padding:2px 0 6px 12px}
.menubar .menu-group-items>button{font-size:13px;line-height:1.2;padding:7px 9px;min-height:30px}
.menubar .menu-group-items>select{font-size:12px;padding:5px 7px;margin:2px 0 4px;width:calc(100% - 8px)}
.menubar .dropdown .menu-note{font-size:11px;line-height:1.35;margin:7px 9px}
@media(max-width:600px){.menubar .dropdown{top:112px;left:10px;right:10px;max-height:calc(100dvh - 125px);overflow-y:auto;overscroll-behavior:contain}.menu-group>summary{padding:8px 10px}.menubar .menu-group-items>button{padding:6px 8px;min-height:28px}}

/* v28 — Preferências de grade e alinhamento */
.stage-pref-row{margin-top:16px}.stage-pref-row>label{display:flex;align-items:center;gap:9px;font-weight:600;font-size:14px}.stage-pref-row input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent);flex:none}.stage-pref-range{display:grid;gap:8px}.stage-pref-range>label{justify-content:space-between}.stage-pref-range input[type=range]{width:100%;accent-color:var(--accent)}.stage-pref-range input:disabled{opacity:.45}.stage-pref-reset{margin-top:20px;padding:10px 14px;background:var(--panel);border:1px solid var(--border);border-radius:9px;color:var(--text);cursor:pointer}.stage-pref-reset:hover{border-color:var(--accent)}

/* v29 — Espessura configurável sem alterar destaque de seleção */
.edge{stroke-width:var(--edge-width,2)}
.edge.active{stroke-width:calc(var(--edge-width,2) * 1.5)}
.edge.edge-picked{stroke-width:calc(var(--edge-width,2) * 2)}
#prefEdgeStyle{display:block;width:100%;max-width:380px;margin-top:7px}

/* v30 — Barra de ferramentas sem controles soltos sobre o Palco */
.top{gap:10px}.head-actions{display:flex;align-items:center;justify-content:flex-end;flex:1;min-width:0}.header-tools{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:nowrap}.header-tools .calculator-launch,.header-tools .interaction-tools,.header-tools .zoom{position:static!important;inset:auto!important;transform:none!important;margin:0!important;box-shadow:none!important;background:transparent!important;border:0!important;padding:0!important;display:flex;align-items:center;gap:5px}.header-tools button,.header-tools .interaction-tools button,.header-tools .zoom button{position:static!important;display:grid;place-items:center;flex:0 0 auto;width:39px!important;height:39px!important;min-width:39px!important;padding:0!important;border-radius:50%!important;border:1px solid var(--border)!important;background:color-mix(in srgb,var(--panel) 82%,var(--accent) 18%)!important;color:var(--text)!important;box-shadow:none!important;cursor:pointer}.header-tools .interaction-tools button.active{background:var(--accent)!important;color:var(--accent-ink)!important;border-color:var(--accent)!important}.header-tools .calculator-launch{background:var(--accent)!important;color:var(--accent-ink)!important;border-color:var(--accent)!important}.header-tools .zoom output{font-size:11px;min-width:42px;text-align:center;color:var(--muted)}.header-tools .zoom{gap:2px}.header-tools button:hover{filter:brightness(1.09)}.floating-project-label{position:absolute;z-index:5;bottom:12px;right:14px;max-width:55%;display:flex;gap:9px;align-items:center;background:color-mix(in srgb,var(--panel) 88%,transparent);border:1px solid var(--border);border-radius:999px;padding:6px 11px;box-shadow:var(--shadow);pointer-events:none;font-size:11px;color:var(--muted)}.floating-project-label #projectName{font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.floating-project-label #saveStatus{font-size:10px}.node-pref-section{margin-top:18px;padding-top:12px;border-top:1px solid var(--border)}.node-pref-row{display:grid;gap:7px;margin:13px 0;font-size:13px}.node-pref-row output{float:right;color:var(--muted)}.node-pref-row input,.node-pref-row select{width:100%;accent-color:var(--accent)}.node>text:not(.port-plus){font-family:var(--node-font,Arial),sans-serif!important;letter-spacing:var(--node-letter-spacing,0px)}.node>text:first-of-type{font-size:var(--node-font-size,15px)!important}
@media(max-width:850px){.top{flex-wrap:wrap;height:auto!important}.header-tools{gap:3px}.header-tools button,.header-tools .interaction-tools button,.header-tools .zoom button{width:34px!important;height:34px!important;min-width:34px!important}.header-tools .zoom output{min-width:33px}.header-tools .calculator-launch{width:34px!important;height:34px!important}.head-actions{width:100%;justify-content:center;order:2}.menubar{order:3}.header-tools{max-width:100%;overflow-x:auto;scrollbar-width:none}.header-tools::-webkit-scrollbar{display:none}}@media print{.header-tools,.floating-project-label{display:none!important}}

/* v30.1 — reparos: calculadora, alinhamento do ícone e preferências contidas */
.header-tools #calculatorOpen.calculator-launch{display:grid!important;place-items:center!important;align-items:center!important;justify-content:center!important;gap:0!important;line-height:0!important;width:39px!important;height:39px!important;min-width:39px!important;min-height:39px!important;padding:0!important;margin:0!important;border-radius:50%!important;background:var(--accent)!important;border:1px solid var(--accent)!important;color:var(--accent-ink)!important;flex:0 0 39px!important}
.header-tools #calculatorOpen.calculator-launch svg{display:block!important;width:23px!important;height:23px!important;margin:0!important;flex:none!important;transform:none!important}
@media(max-width:850px){.header-tools #calculatorOpen.calculator-launch{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;flex-basis:34px!important}.header-tools #calculatorOpen.calculator-launch svg{width:21px!important;height:21px!important}}
#calculator:not([hidden]){display:flex!important;visibility:visible!important;opacity:1!important;z-index:10000!important;pointer-events:auto!important}
.settings-dialog{box-sizing:border-box;overflow-x:hidden!important;max-width:calc(100vw - 24px)!important}
.settings-dialog *{box-sizing:border-box}
.settings-dialog .node-pref-section{display:block;min-width:0;max-width:calc(100% - 48px);width:auto;overflow:hidden;margin:18px 24px;padding:18px 20px;border:1px solid var(--border);border-radius:15px;background:var(--canvas)}
.settings-dialog .node-pref-inner{min-width:0;max-width:100%;width:100%}
.settings-dialog .node-pref-row{min-width:0;max-width:100%;width:100%;display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
.settings-dialog .node-pref-row input,.settings-dialog .node-pref-row select{display:block;box-sizing:border-box;min-width:0;max-width:100%;width:100%;margin:0}
.settings-dialog .node-pref-row input[type=range]{width:100%;min-width:0;max-width:100%}
.settings-dialog .node-pref-row output{float:none;display:block}
@media(max-width:600px){.settings-dialog .node-pref-section{max-width:calc(100% - 24px);margin:12px;padding:14px}}

/* v30.2: calculadora independente de contêineres e responsiva */
body > #calculator{position:fixed!important;z-index:2147483000!important;max-height:calc(100dvh - 16px);overflow-y:auto;overscroll-behavior:contain;}
body > #calculator[hidden]{display:none!important;}
body > #calculator:not([hidden]){display:flex!important;visibility:visible!important;opacity:1!important;}
@media(max-height:650px){body > #calculator .calculator-grid button{min-height:36px}body > #calculator .calculator-screen{min-height:80px;padding:7px}}

/* v30.4: janela móvel com teclas clicáveis e posição preservada */
body > #calculator {position:fixed!important;right:auto;pointer-events:auto!important;touch-action:auto;overflow:hidden;max-height:calc(100dvh - 12px);}
body > #calculator[hidden]{display:none!important;}
body > #calculator:not([hidden]){display:flex!important;}
body > #calculator .calculator-head{cursor:grab;touch-action:none;}
body > #calculator .calculator-head:active{cursor:grabbing;}
body > #calculator .calculator-grid{overflow-y:auto;min-height:0;}
body > #calculator .calculator-grid button{pointer-events:auto!important;position:relative;z-index:1;}

/* v31 — Navegação e acessibilidade */
.settings-dialog .settings-module{min-width:0;max-width:calc(100% - 48px);box-sizing:border-box;overflow:hidden}
.settings-dialog .settings-module .stage-pref-row{min-width:0;max-width:100%}
.settings-dialog .settings-module input[type=range]{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box}
body.access-large-controls .top button,body.access-large-controls .top summary,body.access-large-controls .toolbar button,body.access-large-controls .menu-group>summary{min-height:48px;min-width:48px}
body.access-large-controls .interaction-tools button{width:54px;height:54px;min-width:54px}
body.access-large-controls .toolbar button{padding-inline:10px}
body.access-reduced-motion *,body.access-reduced-motion *::before,body.access-reduced-motion *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media(max-width:600px){.settings-dialog .settings-module{max-width:calc(100% - 24px)}}

/* v31.1 — ações dos nós aparecem sob demanda; impressão limpa. */
@media (hover:hover) and (pointer:fine){
  .node .list-tool{opacity:0;pointer-events:none;transition:opacity .13s ease}
  .node:hover .list-tool,.node:focus-within .list-tool{opacity:1;pointer-events:all}
}
@media (hover:none), (pointer:coarse){
  .node .list-tool{opacity:0;pointer-events:none}
  .node.selected .list-tool,.node:focus-within .list-tool{opacity:1;pointer-events:all}
}
@media print{
  .node .list-tool,.node .node-port,.node .node-footer-divider,.node .pinned-indicator{display:none!important;visibility:hidden!important}
}

/* v32.1: labels measured to fit actual SVG width */
.node .stage-content-label{pointer-events:none}

/* v32.2 — sistema, acessibilidade e lembretes não intrusivos */
body.access-no-animation *,body.access-no-animation *::before,body.access-no-animation *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.backup-reminder{position:fixed;z-index:450;top:74px;left:50%;transform:translateX(-50%);max-width:min(92vw,690px);width:max-content;display:flex;gap:10px;align-items:center;padding:12px 14px;border-radius:14px;border:1px solid var(--border,#aaa);background:var(--surface,#fff);color:var(--text,#222);box-shadow:0 8px 28px #0003;font-size:13px}
.backup-reminder[hidden]{display:none!important}.backup-reminder button{flex-shrink:0;border-radius:9px;padding:7px 10px;cursor:pointer}
@media(max-width:580px){.backup-reminder{width:92vw;flex-wrap:wrap;top:64px}}
@media print{.backup-reminder{display:none!important}}

/* v32.3 — conteúdo integral e rolagem discreta em nós, listas e textos. */
.node .stage-scroll-body{height:100%;width:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;pointer-events:auto!important;box-sizing:border-box;scrollbar-width:none;scrollbar-color:transparent transparent;scrollbar-gutter:stable;}
.node .stage-scroll-body:hover,.node .stage-scroll-body:focus-within{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--node-ink,#7c879b) 25%,transparent) transparent;}
.node .stage-scroll-body::-webkit-scrollbar{width:3px;height:3px;}
.node .stage-scroll-body::-webkit-scrollbar-thumb{background:transparent;border-radius:10px;}
.node .stage-scroll-body:hover::-webkit-scrollbar-thumb,.node .stage-scroll-body:focus-within::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--node-ink,#7c879b) 25%,transparent);}
.node .stage-scroll-body::-webkit-scrollbar-track{background:transparent;}
.node .stage-plain-body{padding:0 2px 4px 0;color:var(--node-ink,#fff);font-family:var(--node-font,Arial),sans-serif;font-size:var(--node-font-size,14px);letter-spacing:var(--node-letter-spacing,0px);line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap;user-select:text;-webkit-user-select:text;}
.node[data-color=slate] .stage-plain-body{color:var(--node-ink,#273142)}
.node .stage-scroll-title{font-weight:600;margin:0 0 8px;overflow-wrap:anywhere;}
.node .stage-scroll-desc{font-size:.9em;white-space:pre-wrap;overflow-wrap:anywhere;}
.node .stage-scroll-row{display:flex;align-items:flex-start;gap:7px;margin:0 0 5px;min-width:0;}
.node .stage-scroll-item{flex:1;min-width:0;overflow-wrap:anywhere;}
.node .stage-scroll-row.done .stage-scroll-item{text-decoration:line-through;opacity:.65;}
.node .stage-scroll-mark{flex:none;min-width:13px;}
.node .stage-scroll-check{flex:none;display:grid;place-items:center;margin:2px 0 0;padding:0;width:16px;height:16px;line-height:1;border:1.5px solid currentColor;border-radius:4px;background:transparent;color:inherit;cursor:pointer;font:700 12px system-ui;}
.node .stage-scroll-check:hover,.node .stage-scroll-check:focus-visible{outline:1px solid currentColor;outline-offset:1px;}
.node .text-node-body{scrollbar-width:none!important;}
.node .text-node-body:hover,.node .text-node-body:focus-within{scrollbar-width:thin!important;}
@media(hover:none){.node .stage-scroll-body{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--node-ink,#7c879b) 22%,transparent) transparent;}}
@media print{.node .stage-scroll-body{scrollbar-width:none!important;overflow:hidden!important}.node .stage-scroll-body::-webkit-scrollbar{display:none!important}}

/* v32.4 — porta de conexão (+) aparece somente ao interagir com o nó. */
@media (hover:hover) and (pointer:fine){
  .node .node-port{opacity:0;pointer-events:none;transition:opacity .13s ease}
  .node:hover .node-port,.node:focus-within .node-port{opacity:1;pointer-events:all}
}
@media (hover:none), (pointer:coarse){
  .node .node-port{opacity:0;pointer-events:none}
  .node.selected .node-port,.node:focus-within .node-port{opacity:1;pointer-events:all}
}
@media print{.node .node-port{display:none!important;visibility:hidden!important}}

/* v32.5 — arrastar pelo texto da caixa sem selecionar o conteúdo.
   Barras de rolagem, checkboxes e links mantêm interatividade própria. */
.node .stage-scroll-body{cursor:grab;}
.node .stage-scroll-body:active{cursor:grabbing;}
.node .stage-scroll-body a,.node .stage-scroll-body button{cursor:pointer;}

/* v34: controle de recolhimento; não integra documentos exportados. */
.node .branch-toggle{cursor:pointer;opacity:0;pointer-events:none;transition:opacity .14s ease}
.node:hover .branch-toggle,.node:focus-within .branch-toggle,.node.selected .branch-toggle{opacity:1;pointer-events:all}
.node .branch-toggle-disc{fill:var(--panel,#fff);stroke:var(--accent,#8052cf);stroke-width:2}
.node .branch-toggle-icon{fill:var(--accent,#8052cf)!important;font-size:17px;font-weight:800;pointer-events:none}
.node .branch-count{font-size:10px;fill:var(--node-ink,var(--text));pointer-events:none}
@media(hover:none){.node .branch-toggle{opacity:1;pointer-events:all}}
@media print{.node .branch-toggle,.node .branch-count{display:none!important}}

/* v34.1 — indicador permanente e discreto, distinto da porta de conexão (+). */
.node .branch-toggle{opacity:1!important;pointer-events:all!important;cursor:pointer}
.node .branch-toggle-hit{fill:transparent;stroke:none}
.node .branch-toggle-disc{fill:var(--accent,#8052cf);stroke:var(--panel,#fff);stroke-width:1.5;transition:r .15s ease}
.node .branch-toggle-chevron{fill:none;stroke:var(--panel,#fff);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.node .branch-toggle:hover .branch-toggle-disc,.node .branch-toggle:focus .branch-toggle-disc{stroke-width:2.5}
@media print{.node .branch-toggle,.node .branch-count{display:none!important}}

/* v34.2: contador compacto acima do título, sem encobrir o conteúdo. */
.node .branch-count{font-size:7px!important;font-weight:500;letter-spacing:0;opacity:.65;dominant-baseline:auto}

/* v34.4 — número minúsculo acima do indicador de ramificação recolhida. */
.node .branch-mini-count{font-family:Arial,Helvetica,sans-serif!important;font-weight:400!important;letter-spacing:0!important;fill:var(--accent,#8052cf);stroke:none;pointer-events:none;user-select:none}
@media print{.node .branch-mini-count{display:none!important}}

/* v34.5 — contador centralizado dentro do círculo, sem sobrepor o texto. */
.node .branch-mini-count{fill:var(--panel,#fff)!important;font-family:Arial,Helvetica,sans-serif!important;font-weight:400!important;letter-spacing:0!important;stroke:none!important;pointer-events:none;user-select:none}
.node .branch-toggle-disc{stroke-width:1.25}

/* v34.7 — regra explícita para vencer o font: 500 16px aplicado aos textos SVG. */
.node text.branch-mini-count{font-family:Arial,Helvetica,sans-serif!important;font-weight:300!important;font-stretch:condensed!important;letter-spacing:-.3px!important;font-size:7px!important;fill:var(--panel,#fff)!important;stroke:none!important}
.node text.branch-mini-count.digits-2{font-size:6.5px!important;letter-spacing:-.45px!important}
.node text.branch-mini-count.digits-3{font-size:5.7px!important;letter-spacing:-.4px!important}
.node text.branch-mini-count.digits-4{font-size:4.8px!important;letter-spacing:-.4px!important}

/* v34.8 — indicadores no lado direito do rodapé de ações, sem ocupar o título. */
.node .branch-toggle{opacity:1!important;pointer-events:all!important}
.node .branch-toggle-hit{pointer-events:all}
.node .branch-mini-count{font-family:Arial,Helvetica,sans-serif!important;font-weight:400!important;letter-spacing:0!important;stroke:none!important}
.node .pinned-indicator{font:13px Arial,Helvetica,sans-serif!important;opacity:.72;pointer-events:none}
.node .list-tool-icon{font-size:16px}
@media print{.node .branch-toggle,.node .pinned-indicator{display:none!important}}

/* v34.9: alinhamento real no rodapé, sem elementos no topo */
.node text.branch-mini-count{font-family:Arial,Helvetica,sans-serif!important;font-size:7px!important;font-weight:400!important;letter-spacing:0!important;stroke:none!important;fill:#fff!important;pointer-events:none}
.node .branch-toggle-disc{stroke-width:1!important}
.node .list-tool-icon{font-size:14px!important}
@media print{.node .branch-toggle{display:none!important}}

/* v35 — formulário de metadados responsivo */
.metadata-dialog{max-width:min(460px,calc(100vw - 24px));width:100%;box-sizing:border-box}
.metadata-form{display:grid;gap:14px;max-width:100%;min-width:0}
.metadata-form label{display:grid;gap:6px;min-width:0}
.metadata-form input,.metadata-form select{width:100%;max-width:100%;box-sizing:border-box;min-width:0}
.metadata-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}

/* v36 — minimapa e pesquisa/substituição. */
.mini-map-panel{position:absolute;z-index:4;right:16px;bottom:90px;width:210px;max-width:calc(100vw - 32px);background:var(--panel);border:1px solid var(--border);border-radius:13px;box-shadow:var(--shadow);padding:8px;color:var(--text)}
.mini-map-panel[hidden],#miniMapShow[hidden]{display:none!important}.mini-map-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;padding:0 3px}.mini-map-head button{padding:0 7px;font-size:19px}.mini-map-panel canvas{display:block;width:100%;height:auto;aspect-ratio:8/5;cursor:crosshair;touch-action:none;border:1px solid var(--border);border-radius:6px;background:var(--canvas)}.mini-map-panel p{font-size:10px;color:var(--muted);margin:4px 2px 0;text-align:center}#miniMapShow{position:absolute;right:14px;bottom:90px;z-index:4;border:1px solid var(--border);background:var(--panel);border-radius:50%;width:34px;height:34px;box-shadow:var(--shadow)}
.replace-section{border-top:1px solid var(--border);margin-top:10px;padding-top:9px}.replace-section summary{cursor:pointer;font-weight:600;font-size:12px}.replace-section label{display:block;margin:9px 0 4px;font-size:12px}.replace-option{display:flex!important;align-items:center;gap:7px}.replace-option input{width:auto}.replace-actions{display:flex;gap:6px;margin-top:8px}.replace-actions button{border:1px solid var(--border);font-size:12px;padding:6px 8px}.replace-section p{font-size:11px;color:var(--muted);line-height:1.4}
@media(max-width:600px){.mini-map-panel{width:155px;bottom:88px;right:8px}.mini-map-panel p{display:none}#miniMapShow{bottom:88px;right:8px}}
@media print{.mini-map-panel,#miniMapShow{display:none!important}}

/* v37 — Imagens locais e notas recolhíveis dentro da área rolável dos nós. */
.stage-node-image{display:block;max-width:100%;width:auto;max-height:220px;height:auto;object-fit:contain;border-radius:7px;margin:8px auto;user-select:none;pointer-events:none}
.stage-node-note{margin:9px 0 5px;border:1px solid currentColor;border-radius:7px;padding:5px 8px;opacity:.92}
.stage-node-note summary{cursor:pointer;font-size:.86em;font-weight:600;user-select:none;touch-action:manipulation}
.stage-node-note-text{white-space:pre-wrap;overflow-wrap:anywhere;padding:6px 0 3px;line-height:1.5;font-size:.91em}
.asset-dialog{width:min(92vw,520px);max-height:85dvh;overflow:auto}
.asset-form{display:grid;gap:12px;min-width:0}
.asset-form label{font-weight:600}
.asset-form input[type=file],.asset-form textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.asset-form textarea{resize:vertical}
.asset-preview{max-width:100%;max-height:250px;object-fit:contain;margin:auto;border-radius:9px}
@media print{.stage-node-note summary{list-style:none}.stage-node-note summary::-webkit-details-marker{display:none}}

/* v37.1 — anexos fora dos nós: ícones à esquerda e cartões ligados por linhas. */
.node-attachment-icon{cursor:pointer;pointer-events:all}
.node-attachment-icon-disc{fill:var(--panel,#fff)!important;stroke:var(--accent,#8055ff)!important;stroke-width:1.5!important;filter:none!important}
.node-attachment-icon-stroke{fill:none!important;stroke:var(--accent,#8055ff)!important;stroke-width:1.5!important;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.node-attachment-camera{fill:none!important;stroke:var(--accent,#8055ff)!important;stroke-width:1.5!important;pointer-events:none}
.node-attachment-icon:hover .node-attachment-icon-disc{stroke-width:2.5!important}
.node-attachment-link{fill:none;stroke:var(--accent,#8055ff);stroke-width:1.6;stroke-dasharray:3 3;pointer-events:none}
.node-attachment-card{height:100%;width:100%;padding:10px 12px;border:1px solid #c7ac45;border-radius:10px;overflow:auto;box-shadow:0 4px 12px #0002;cursor:auto;scrollbar-width:thin;scrollbar-color:transparent transparent;pointer-events:auto;user-select:text;touch-action:pan-y}
.node-attachment-card:hover{scrollbar-color:#8886 transparent}
.node-attachment-postit{background:#fff2a4;color:#393021;font:13px/1.5 system-ui,Arial,sans-serif}
.node-attachment-photo{background:var(--panel,#fff);color:var(--text,#252a32);border-color:var(--border,#ddd)}
.node-attachment-card-heading{font:600 12px system-ui,Arial,sans-serif;opacity:.65;margin-bottom:7px}
.node-attachment-note-text{white-space:pre-wrap;overflow-wrap:anywhere}
.node-attachment-photo img{display:block;max-width:100%;max-height:calc(100% - 27px);object-fit:contain;margin:auto;border-radius:5px}
@media print{.node-attachment-icon,.node-attachment-link{display:none!important}.node-attachment-card{box-shadow:none}}

/* v37.2 — fotografias sem cartão, sem título, na proporção original. */
.node-attachment-photo{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;display:block!important;}
.node-attachment-photo img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;margin:0!important;border-radius:0!important;}

/* v37.5 — ícones de anexos sem círculos, na mesma coluna e sem sobreposição. */
.node .attachment-bare-icon{cursor:pointer;pointer-events:all}
.node .attachment-bare-icon .node-attachment-hit{fill:transparent!important;stroke:none!important;pointer-events:all}
.node .attachment-bare-icon .node-attachment-icon-stroke,
.node .attachment-bare-icon .node-attachment-camera{stroke-width:1.9!important;stroke-linecap:round;stroke-linejoin:round}
.node .attachment-bare-icon:hover .node-attachment-icon-stroke,
.node .attachment-bare-icon:hover .node-attachment-camera{stroke-width:2.4!important}
.node .attachment-bare-icon:focus-visible .node-attachment-hit{stroke:var(--accent,#8055ff)!important;stroke-width:1!important;stroke-dasharray:2 2}

/* v38 — formulário de modelos, responsivo */
.template-dialog-content{display:grid;gap:12px;padding:24px;min-width:min(440px,85vw);max-width:90vw;color:var(--text)}
.template-dialog-content label{font-weight:600}
.template-dialog-content input,.template-dialog-content select{width:100%;max-width:100%;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--text)}

/* v39 — Histórico de versões, layout compacto e acessível */
.version-history-dialog{width:min(680px,calc(100vw - 24px));max-height:min(85vh,780px);padding:0!important;overflow:hidden}
.version-history-inner{display:flex;flex-direction:column;gap:13px;padding:20px;max-height:min(85vh,780px);color:var(--text);background:var(--panel)}
.version-history-header,.version-history-footer,.version-history-create-row,.version-history-item,.version-history-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.version-history-header h2{margin:0;font-size:1.2rem}.version-history-intro{margin:0;color:var(--muted);font-size:.85rem}
.version-history-create{display:grid;gap:7px}.version-history-create label{font-size:.85rem}.version-history-create-row input{min-width:0;flex:1}
.version-history-list{overflow:auto;min-height:90px;max-height:45vh;display:grid;align-content:start;gap:7px;scrollbar-width:thin}
.version-history-item{border:1px solid var(--border);border-radius:10px;padding:10px;background:var(--bg)}
.version-history-item-info{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}.version-history-item-info small{color:var(--muted);font-size:.73rem}
.version-history-actions{flex-shrink:0}.version-history-actions button{padding:7px 10px}
.version-history-footer{border-top:1px solid var(--border);padding-top:10px}.version-history-footer span{font-size:.73rem;color:var(--muted)}
#versionHistoryStatus{font-size:.8rem;color:var(--muted);margin:0}
@media(max-width:540px){.version-history-item,.version-history-footer{align-items:flex-start;flex-direction:column}.version-history-create-row{flex-wrap:wrap}.version-history-create-row input{flex-basis:100%}}

/* v39.1 — Manutenção */
.maintenance-dialog{border:1px solid var(--border,#ddd);border-radius:16px;max-width:min(680px,94vw);width:100%;max-height:88dvh;overflow:auto;background:var(--surface,#fff);color:var(--text,#243047);padding:22px;box-shadow:0 22px 80px #0004}
.maintenance-dialog::backdrop{background:#0008}
.maintenance-head{display:flex;align-items:start;justify-content:space-between;gap:14px;border-bottom:1px solid #9994;padding-bottom:12px}
.maintenance-head h2{margin:0 0 5px;font-size:1.25rem}.maintenance-head p{margin:0;color:var(--muted,#667085)}
.maintenance-head button{border:1px solid #9995;border-radius:50%;background:transparent;color:inherit;min-width:34px;min-height:34px}
.maintenance-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:9px;margin:18px 0}
.maintenance-actions button{min-height:45px;text-align:left;padding:10px 13px;border:1px solid #8885;border-radius:10px;background:var(--surface-2,#f7f4eb);color:inherit;cursor:pointer}
.maintenance-actions button:hover,.maintenance-actions button:focus-visible{outline:2px solid var(--accent,#87651a);outline-offset:1px}
.maintenance-result{white-space:pre-wrap;overflow-wrap:anywhere;max-height:35dvh;overflow:auto;padding:14px;border-radius:10px;border:1px solid #9995;line-height:1.55;font-size:.92rem}
.maintenance-warning{font-size:.85rem;color:var(--muted,#667085)}

/* Mentalista v41 — Window Controls Overlay (desktop instalado).
   O sistema controla os botões nativos; a interface jamais os desenha ou cobre. */
@media (display-mode: window-controls-overlay) and (min-width: 701px) {
  .top {
    top: env(titlebar-area-y, 0px);
    left: env(titlebar-area-x, 0px);
    right: auto;
    width: env(titlebar-area-width, 100%);
    height: max(54px, env(titlebar-area-height, 54px));
    min-width: 0;
    border-radius: 0 0 12px 0;
    padding-inline: 14px;
    gap: clamp(6px, 1.1vw, 18px);
    -webkit-app-region: drag;
    app-region: drag;
  }
  .top .brand, .top .menubar, .top .head-actions,
  .top button, .top a, .top summary, .top input, .top select, .top details {
    -webkit-app-region: no-drag;
    app-region: no-drag;
  }
  .top .brand { flex-shrink: 0; }
  .top .head-actions { min-width: 0; margin-left: auto; }
  .top .header-tools { min-width: 0; }
}
/* Em janelas estreitas ou dispositivos sem overlay, o cabeçalho original permanece. */

/* v42 — compartilhamento nativo */
.share-dialog{width:min(440px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;border:1px solid var(--border, #7776);border-radius:16px;padding:22px;background:var(--surface,#fff);color:var(--text,#222);box-shadow:0 18px 60px #0005}.share-dialog::backdrop{background:#0009}.share-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.share-heading h2{margin:0;font-size:1.3rem}.share-dialog label{display:block;margin:15px 0 6px;font-weight:600}.share-dialog select{width:100%;min-height:42px;padding:8px;border-radius:8px;background:var(--surface,#fff);color:inherit;border:1px solid #8888}.share-actions{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0}.share-actions button{flex:1;min-width:130px;min-height:42px}.share-dialog p{line-height:1.5}.share-dialog #shareStatus{font-size:.9rem;overflow-wrap:anywhere}

/* Mentalista v43 — Central de notificações */
.notifications-dialog{border:1px solid var(--border,#bbc2d0);border-radius:18px;background:var(--surface,#fff);color:var(--text,#1b2431);width:min(94vw,560px);max-height:88vh;overflow:auto;padding:22px;box-shadow:0 18px 55px #0005}
.notifications-dialog::backdrop{background:#0009}
.notifications-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.notifications-head h2{margin:0;font-size:1.25rem}
.notifications-actions{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}
.notifications-form{display:grid;gap:9px;margin:16px 0}
.notifications-form input{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid #8c97a9;border-radius:8px;background:var(--surface,#fff);color:inherit}
.notifications-dialog button{min-height:36px;cursor:pointer}
.notifications-toggle{display:flex;align-items:center;gap:10px;margin:12px 0}
.notifications-list{list-style:none;margin:0;padding:0;display:grid;gap:9px}
.notifications-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid #8c97a955;border-radius:10px;overflow-wrap:anywhere}
.notifications-list li span{flex:1;min-width:0}
.notifications-footnote{font-size:.85rem;opacity:.8}
#notificationsStatus{min-height:1.5em;font-weight:600}

/* v44 — avisos acessíveis para o File Handling */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* v47 — status discreto de disponibilidade offline */
.offline-badge{position:fixed;left:10px;bottom:10px;z-index:1500;max-width:min(250px,60vw);padding:5px 9px;border-radius:9px;background:var(--surface-2,#f5f5f5);color:var(--text,#222);border:1px solid #8887;box-shadow:0 2px 8px #0002;font:600 11px/1.35 system-ui,sans-serif;pointer-events:none;opacity:.88}
.offline-badge[data-state="ready"]{border-color:#23865f}.offline-badge[data-state="missing"]{border-color:#bd7925}.offline-badge[data-state="unsupported"]{border-color:#9a6571}

/* v49.1 — Correção de contraste na troca de tema.
   As caixas neutras mudam de fundo conforme o tema; a tinta dos seus
   conteúdos HTML (foreignObject) deve acompanhar essa mudança. */
body.light .node[data-color="slate"]{--node-ink:#273142}
body:not(.light) .node[data-color="slate"]{--node-ink:#f2f5ff}
.node[data-color="slate"] .stage-plain-body,
.node[data-color="slate"] .stage-scroll-title,
.node[data-color="slate"] .stage-scroll-desc,
.node[data-color="slate"] .stage-scroll-item,
.node[data-color="slate"] .stage-scroll-mark,
.node[data-color="slate"] .text-node-body{color:var(--node-ink)!important}
.node[data-color="slate"] .stage-check-box,
.node[data-color="slate"] .stage-check-tick{stroke:var(--node-ink)!important}
body:not(.light) .node[data-color="slate"] .list-line{fill:var(--node-ink)!important}

/* v49.2: comando explícito para atualizar uma caixa integrada */
#editorUpdate{width:35px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:6px;font-size:24px;font-weight:700;line-height:1}
#editorUpdate[hidden],#editorIntegrate[hidden]{display:none!important}

/* v49.4 — a tela de compatibilidade é exclusiva de plataformas móveis reconhecidas.
   Desktops e plataformas desconhecidas permanecem liberados. */
.mobile-compatibility{display:none}
@media (max-width:624px), (max-height:499px){

  html.mentalista-mobile-platform body > :not(#mobileCompatibility):not(script){display:none!important}
  html.mentalista-mobile-platform,html.mentalista-mobile-platform body{min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;margin:0!important;overflow:auto!important}
  html.mentalista-mobile-platform .mobile-compatibility{position:relative!important;display:flex!important;box-sizing:border-box;width:100%;min-height:100vh;min-height:100dvh;align-items:center;justify-content:center;padding:24px 16px;background:#121a2a;color:#fff;overflow-y:auto;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
  html.mentalista-mobile-platform .mobile-compatibility-card{box-sizing:border-box;width:min(100%,440px);display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px;padding:22px 14px}
  html.mentalista-mobile-platform .mobile-compatibility-logo{width:82px;height:82px;object-fit:contain}
  html.mentalista-mobile-platform .mobile-compatibility h1{font-size:1.7rem;line-height:1.2;margin:0;color:#fff}
  html.mentalista-mobile-platform .mobile-compatibility h2{font-size:1.25rem;line-height:1.35;margin:0;color:#fff}
  html.mentalista-mobile-platform .mobile-compatibility p{font-size:1rem;line-height:1.5;margin:0;color:#cbd5e1}
  html.mentalista-mobile-platform .mobile-compatibility .mobile-compatibility-size{font-size:1.9rem;line-height:1.25;color:#e9c65b;letter-spacing:.015em}
  html.mentalista-mobile-platform .mobile-compatibility .mobile-compatibility-recommendation{font-size:.9rem;color:#f1f5f9}
  html.mentalista-mobile-platform .mobile-compatibility .mobile-compatibility-footer{font-size:.75rem;color:#a6b4c8;margin-top:8px}
}
@media (max-width:624px) and (max-height:430px), (max-height:350px){
  html.mentalista-mobile-platform .mobile-compatibility{align-items:flex-start}
  html.mentalista-mobile-platform .mobile-compatibility-card{gap:10px;padding:8px}
  html.mentalista-mobile-platform .mobile-compatibility-logo{width:50px;height:50px}
}
