:root{font:14px system-ui,Segoe UI,sans-serif;color:#223344;background:#f5f7f9}*{box-sizing:border-box}body{margin:0;display:flex;flex-direction:column;height:100dvh;overflow:hidden}button{font:inherit;border:1px solid #cbd4de;border-radius:4px;background:white;color:inherit;cursor:pointer;padding:6px 10px;white-space:nowrap}button:hover{background:#edf3f8}button:focus-visible{outline:3px solid #3182c4;outline-offset:2px}button:disabled{opacity:.35;cursor:default}header{display:flex;align-items:center;gap:16px;padding:10px 16px;background:#fff;border-bottom:1px solid #dbe2e8}header strong{font-size:19px;color:#245d86}small{font-size:11px;font-weight:400;color:#687889;margin-left:8px}#saveState{margin-left:auto;font-size:12px;color:#617080}#help{border-radius:50%;padding:3px 10px}nav{display:flex;gap:5px;padding:7px 12px;overflow-x:auto;background:#e9eef3;min-height:46px}nav .doc{display:flex;align-items:center;border:1px solid #cbd4de;border-radius:4px;background:#f5f7f9}nav .active{background:white;border-color:#548cb4}nav .doc button{border:0;background:transparent}nav .doc .remove{padding:4px 7px;color:#758493}.toolbar{display:flex;align-items:center;gap:5px;padding:7px 12px;background:#fff;border-bottom:1px solid #dbe2e8;flex-wrap:wrap}.toolbar button{font-size:12px;padding:5px 8px}.toolbar i{height:20px;border-left:1px solid #dce3ea;margin:0 3px}#zoom{font-size:11px;min-width:36px;text-align:center}main{position:relative;flex:1;overflow:hidden;touch-action:none;background:#fafbfc;outline:none;cursor:grab}#world{position:absolute;transform-origin:0 0;width:1px;height:1px}#lines{position:absolute;overflow:visible;width:1px;height:1px;pointer-events:none}.node{position:absolute;display:flex;gap:7px;align-items:center;padding:9px 12px;min-height:40px;width:190px;background:#fff;border:1px solid #bbcbd7;border-radius:5px;cursor:pointer;user-select:none;box-shadow:0 1px 2px #243b5310}.node.root{background:#245d86;color:white;border-color:#245d86;font-weight:600}.node.selected{outline:2px solid #2788ce;outline-offset:3px}.node.drop{outline:4px solid #39976b}.node.dragging{opacity:.4}.node .label{overflow-wrap:anywhere;flex:1;line-height:1.3}.node .markers{display:flex;gap:3px;font-size:13px}.node .fold{position:absolute;right:-12px;top:11px;border-radius:50%;padding:0;width:20px;height:20px;background:white;font-size:12px;color:#416481}.node input{width:100%;font:inherit;border:0;outline:0;background:white;color:#223344;padding:2px}footer{display:flex;justify-content:space-between;gap:20px;padding:7px 12px;border-top:1px solid #dbe2e8;background:#fff;font-size:11px;color:#637587}.keyboard{text-align:right}dialog{max-width:560px;border:1px solid #b9c9d7;border-radius:8px;padding:24px;line-height:1.6}dialog::backdrop{background:#18304a55}h2{margin-top:0;font-size:20px}#empty{position:absolute;bottom:15px;left:15px;color:#62768b;font-size:12px;pointer-events:none}.flag-red{color:#d64c4c}.flag-yellow{color:#c18c00}.flag-green{color:#278255}.state{border:1px solid currentColor;border-radius:50%;width:15px;height:15px;display:inline-flex;align-items:center;justify-content:center;font-size:10px}.state-progress{color:#be8500}.state-done{color:#26804e}@media(pointer:coarse){.keyboard{display:none}.toolbar{gap:4px}.toolbar button{padding:8px}.node{min-height:44px}}@media print{body{height:auto;overflow:visible}header,nav,.toolbar,footer,#empty{display:none}main{height:180mm;background:white;overflow:visible}#world{transform:var(--print-transform)!important}.node{box-shadow:none;outline:none!important;print-color-adjust:exact}.fold{display:none}}

/* Compact text branches, following the classic working-map reference. */
.node{border:0;border-bottom:1px solid #9caab5;border-radius:0;background:transparent;box-shadow:none;padding:3px 6px;min-height:25px;width:auto;font-size:13px;gap:4px}
.node.root{border:1px solid #6394b7;border-radius:9px;background:#b9daf4;color:#18384e;padding:14px 16px;min-height:54px;text-align:center;font-size:14px}
.node.selected{outline:1px solid #2788ce;outline-offset:2px;background:#e9f3fb;border-radius:3px}
.node.root.selected{background:#b9daf4;border-radius:9px}
.node .fold{right:-10px;top:auto;bottom:-7px;width:14px;height:14px;font-size:10px;line-height:11px;border-color:#aebbc6}
.node .label{line-height:1.35}.node .markers:empty{display:none}.node input{padding:0}
@media(pointer:coarse){.node{min-height:32px}.node .fold{width:22px;height:22px;bottom:-10px;right:-14px;line-height:19px}}

#askText{width:100%;font:inherit;padding:8px;border:1px solid #aebdca;border-radius:4px}
@page{size:A4 landscape;margin:12mm}


.node .marker{padding:0;border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;font-size:11px;font-weight:650;line-height:1}
.node .priority{border:1px solid #8499aa;border-radius:50%;background:#fff;color:#26445c}.node .priority-1{border-color:#b65454;color:#a33030}.node .priority-2{border-color:#b58b47;color:#875b10}.node .progress{color:#2773ad}.marker svg{width:18px;height:18px}.node .marker:hover{outline:2px solid #90bddc;outline-offset:1px}

.node .label{min-width:0}.toolbar{gap:4px}.toolbar button{padding:5px 6px}.toolbar i{margin:0 2px}

.shortcuts{border-collapse:collapse;width:100%;font-size:13px}.shortcuts td{padding:5px 8px;border-bottom:1px solid #dbe2e8;vertical-align:top}.shortcuts td:first-child{white-space:nowrap;font-weight:600}#helpDialog{max-width:720px;max-height:85dvh;overflow:auto}

#marquee{position:absolute;border:1px solid #2788ce;background:#2788ce18;pointer-events:none;z-index:5}#marquee[hidden]{display:none}main{cursor:default}.node.selected{background:#dceefa;outline:2px solid #2788ce}.node.drop{outline:3px solid #39976b}@media print{#marquee{display:none!important}.node.selected{background:transparent}.node.root.selected{background:#b9daf4}}

/* Fixed geometry: state labels never shift neighboring controls. */
.toolbar{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:8px 12px}
.toolbar-row{display:flex;align-items:center;gap:16px;flex-wrap:nowrap;overflow-x:auto;padding:2px 0;min-height:40px}
.tool-group{display:flex;gap:4px;align-items:center;flex:0 0 auto;padding:3px;border-radius:5px}
.toolbar .tool-group button{font-size:14px;height:32px;padding:4px 6px;flex:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.structure-tools{background:#eaf2fa}.structure-tools button{background:#f2f7fc;border-color:#b8cbde}
.structure-tools [data-action="child"]{width:122px}.structure-tools [data-action="sibling"]{width:130px}.structure-tools [data-action="edit"]{width:112px}.structure-tools [data-action="delete"]{width:80px}
.marker-tools{background:#edf5ea}.marker-tools button{background:#f4f9f1;border-color:#c3d2ba}.marker-tools [data-action="flag"]{width:116px}.marker-tools [data-action="flagColor"]{width:100px}.marker-tools [data-action="status"]{width:116px}
.history-tools{background:#f0eef5}.history-tools button{background:#f7f5fa;border-color:#cbc6d8;width:36px}
.branch-tools{background:#f3efe5}.branch-tools button{background:#faf7ef;border-color:#d5cbb4;width:108px}.branch-tools [data-action="expandStep"],.branch-tools [data-action="collapseStep"]{width:78px}
.view-tools{background:#eaf3f3}.view-tools button{background:#f3f9f9;border-color:#bdd1d1;width:32px}.view-tools [data-action="fit"]{width:98px}.view-tools #zoom{width:50px;min-width:50px;flex:none;font-size:12px}
.file-tools{background:#f3ece8}.file-tools button{background:#fbf5f1;border-color:#d8c9c0;width:96px}.file-tools [data-action="import"]{width:76px}
.toolbar .tool-group button:hover{filter:brightness(.97)}.node.primary{font-weight:650}
nav .doc{width:210px;min-width:210px;flex:none}nav .doc button:first-child{width:180px;overflow:hidden;text-overflow:ellipsis;text-align:left}nav .doc .remove{width:28px;flex:none}nav>button{width:132px;min-width:132px;flex:none}
@media(pointer:coarse){.toolbar .tool-group button{height:36px}.toolbar-row{min-height:44px}}

/* Number + filled color identify each priority, as in the classic reference. */
.node .priority{font-weight:750;color:#173047;border:1px solid #728697}
.node .priority-1{background:#ed8b8f;border-color:#c85c63;color:#65191f}
.node .priority-2{background:#9ac9f2;border-color:#589acb;color:#173d5d}
.node .priority-3{background:#65c64a;border-color:#2f8e25;color:#123e0b}
.node .priority-4{background:#f2dd82;border-color:#c4a841;color:#51400c}
.node .priority-5{background:#f2bb7c;border-color:#ce944a;color:#55350e}

.node .label{white-space:pre-line}
nav{height:54px;min-height:54px;max-height:54px;flex-shrink:0;align-items:flex-start}
nav .doc,nav>button{height:32px}nav .doc button{height:30px;padding-top:4px;padding-bottom:4px}
nav::-webkit-scrollbar{height:8px}nav::-webkit-scrollbar-thumb{background:#aebac4;border-radius:4px}

.node .label{text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}
.node textarea{display:block;width:100%;min-width:0;margin:0;padding:0;border:0;outline:0;resize:none;overflow:hidden;background:transparent;color:inherit;font:inherit;line-height:1.35;text-align:left;white-space:pre-wrap;box-sizing:content-box}
.node.root textarea{font-weight:600}

.resize-grip{position:absolute;right:-4px;top:2px;bottom:6px;width:8px;cursor:ew-resize;touch-action:none;opacity:0;border-right:2px solid #6195bd}
.node:hover .resize-grip,.node.selected .resize-grip{opacity:.55}.resize-grip:hover{opacity:1!important}
@media(pointer:coarse){.resize-grip{width:14px;right:-7px;opacity:.45}}
@media print{.resize-grip{display:none}}

#selection{max-width:38%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.keyboard{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}footer{height:28px;min-height:28px;align-items:center;flex-shrink:0}


.node.root{min-height:72px}.node.root .label,.node.root textarea{text-align:center}

.node.root{font-size:17px;font-weight:650;min-height:80px}.node.root textarea{font-weight:650}


.node.root{min-height:58px;padding:8px 12px}


.shortcut-separator{display:inline-block;margin:0 9px}.keyboard b{font-weight:750;color:#43566a}
