body.tactical-editor{font-size:12px;background:#0d1220;--panel:#121827;--surface:#1b2536;--line:#2c3c51;--accent:#19b4d1;--muted:#8da3bd;--red:#fb8c89;--gold:#dfc77f}body.tactical-editor header{height:42px;padding:5px 12px;gap:12px;background:#121827}body.tactical-editor .brand{display:none}body.tactical-editor .header-mission{display:block!important;flex:0 1 200px}body.tactical-editor #active-title{color:#1ad2ed;font-weight:600;font-size:13px}body.tactical-editor #active-path{display:none}body.tactical-editor header button{padding:4px 9px;font-size:12px;border-radius:1px}body.tactical-editor .primary-views{display:flex;gap:0}body.tactical-editor .primary-views button{border-radius:0}body.tactical-editor #tactical-tools{margin:auto;gap:0}body.tactical-editor[data-workspace=flow] #tactical-tools,body.tactical-editor:not([data-workspace=map]) #tactical-tools{display:none}body.tactical-editor header .actions{margin-left:auto;align-items:center}body.tactical-editor #import,body.tactical-editor #export{display:none}body.tactical-editor #workbench-menu{position:relative}#workbench-menu summary{list-style:none;cursor:pointer;border:1px solid var(--line);padding:4px 8px;background:var(--surface);border-radius:1px}#workbench-menu nav{position:absolute;right:0;top:25px;z-index:50;width:215px;background:#152033;padding:8px;box-shadow:0 12px 35px #0008;border:1px solid var(--line);margin:0}#workbench-menu nav button{font-size:12px;white-space:normal;color:#c7d2df}.tactical-editor .rail{width:275px;padding:0;background:#121827;border-right:1px solid var(--line)}.side-tabs{display:flex;height:36px;flex-shrink:0;border-bottom:1px solid var(--line);padding:4px}.side-tabs button{border:0;background:none;font-size:11px;padding:5px 9px;color:var(--muted)}.side-tabs button.active{background:none!important;color:#e8eff8!important;border-bottom:1px solid var(--accent)}.side-content{overflow:auto;padding:14px 14px 24px;height:calc(100% - 36px)}.side-content h3{font-size:11px;color:#8ba3c0;letter-spacing:.5px;margin:12px 0}.side-content label{font-size:11px}.side-content input,.side-content select,.side-content textarea{font-size:12px;padding:6px}.info-section{padding:12px 0;border-bottom:1px solid var(--line)}.info-section:first-child{padding-top:0}.info-section button{font-size:11px;width:100%;padding:6px;margin:4px 0}.tactical-editor main>.map-panel>.viewbar{display:none}.tactical-editor .map-layout,.tactical-editor .flow-layout{grid-template-columns:minmax(160px,1fr) 310px}.tactical-editor .map-layout>.entity-pane,.tactical-editor .flow-layout>.entity-pane{display:none!important}.tactical-editor .inspector{padding:12px;background:#121827}.tactical-editor .inspector h2{font-size:13px;margin:8px 0 16px}.typed-panel label{font-size:11px;margin:12px 0}.typed-panel input,.typed-panel select,.typed-panel textarea{padding:6px 8px;font-size:12px;border-radius:1px}.typed-panel small{font-size:10px;line-height:1.6}.typed-panel h3{font-size:11px;color:#8ca5c5;padding-top:12px;margin-top:14px;border-top:1px solid var(--line)}.typed-panel .segment{display:flex}.segment button{width:50%;padding:4px;font-size:11px;border-radius:0}.typed-panel .checkbox-row{margin-top:8px;gap:10px;justify-content:flex-start}.typed-panel .checkbox-row label{margin:5px 0}.typed-panel .event-row{display:flex;align-items:center;justify-content:space-between;padding:5px 0;font-size:11px}.event-row button{font-size:10px;padding:3px 7px;background:transparent;border-radius:1px}.typed-panel .wide{width:100%;margin:3px 0;white-space:normal;font-size:11px;background:transparent;border-style:dashed}.typed-panel details summary{font-size:11px;color:var(--muted);cursor:pointer}.typed-panel details button{margin:7px 0;font-size:11px}.faction-row{padding:10px 0;border-bottom:1px solid var(--line)}.faction-row strong{font-size:12px;font-weight:500}.faction-row select{margin-top:7px}.tactical-editor .entity-item{font-size:11px;padding:8px 6px}.tactical-editor .entity-item strong{font-weight:500}.tactical-editor #entity-list small{font-size:10px}.tactical-editor .viewbar{padding:8px 12px}.tactical-editor [data-panel=flow] .viewbar{display:flex;align-items:center;flex-wrap:wrap;min-height:42px;gap:8px}.tactical-editor [data-panel=flow] .viewbar>div:first-of-type:not(.semantic-legend){display:none}.semantic-legend{display:flex;flex-wrap:wrap;gap:8px;flex:1}.semantic-legend span{font-size:9px;padding:1px 5px;font-weight:600}.semantic-legend .source{background:#66358a}.semantic-legend .event{background:#376f4c}.semantic-legend .trigger{background:#315d83}.semantic-legend .gate,.semantic-legend .objective{background:#817023}.semantic-legend .action{background:#304e73}.semantic-legend .outcome{background:#4a7244}.semantic-legend .win{background:#1b741b}.semantic-legend .lose{background:#7b2727}.semantic-legend .route{background:#16868d}.tactical-editor .graph-legend{display:none}.tactical-editor #graph-viewport{background:#0d1220;background-image:none}.tactical-editor .graph-node{width:205px;padding:0 8px 6px;border-radius:1px;border:1px solid #2c3c51;box-shadow:none;background:#121d30;min-height:65px}.tactical-editor .graph-node .kind{display:block;margin:0 -8px;padding:2px 7px;font-size:9px;font-weight:600;letter-spacing:.25px;color:#fff;background:#304e73}.tactical-editor .graph-node .node-title{display:block;text-align:left;background:none;border:none;color:#e4edf7;padding:5px 0 3px;font-size:12px;font-weight:600;white-space:normal;width:100%;line-height:1.3}.tactical-editor .graph-node small{display:block;font-size:10px;line-height:1.5;color:#8da8c5;white-space:normal;overflow:hidden;max-height:29px}.tactical-editor .graph-node.source .kind{background:#66358a}.tactical-editor .graph-node.event .kind{background:#376f4c}.tactical-editor .graph-node.trigger .kind{background:#315d83}.tactical-editor .graph-node.gate .kind,.tactical-editor .graph-node.objective .kind{background:#817023}.tactical-editor .graph-node.gate,.tactical-editor .graph-node.objective{background:#242715}.tactical-editor .graph-node.outcome .kind{background:#4a7244}.tactical-editor .graph-node.win .kind{background:#1b741b}.tactical-editor .graph-node.win{background:#132f18}.tactical-editor .graph-node.lose .kind{background:#7b2727}.tactical-editor .graph-node.lose{background:#31171b}.tactical-editor .graph-node.route .kind{background:#16868d}.tactical-editor .graph-node.selected{border-color:#4ad1ec;box-shadow:0 0 0 1px #4ad1ec}.tactical-editor .graph-node .node-connect{width:12px;height:12px;right:-7px;top:34px;border-width:1px;background:#122233}.tactical-editor #map-hint{background:#101a29c9;font-size:10px;max-width:calc(100% - 65px);padding:5px 9px}.tactical-editor #coordinate-readout,.tactical-editor #map-status{padding:4px 7px;font-size:10px}.tactical-editor #map-status:empty{display:none}.tactical-editor .unit-marker{border:0;width:40px;height:40px;box-shadow:none;background:transparent!important;border-radius:0;transform:none}.tactical-symbol{display:block;width:40px;height:40px;filter:drop-shadow(0 1px 1px #0007)}.tactical-editor .unit-marker.selected{box-shadow:none;filter:drop-shadow(0 0 3px #fff)}.tactical-editor .map-unit-label{top:43px;font-size:10px;color:#fff;background:#112235aa;text-shadow:0 1px 2px #000;max-width:135px;white-space:normal;line-height:1.2}.tactical-editor footer{font-size:10px;padding:5px 12px;background:#111727}.tactical-editor .maplibregl-ctrl-attrib{font-size:10px!important}.tactical-editor:not([data-workspace=map]):not([data-workspace=flow]) .rail{display:none}.tactical-editor:not([data-workspace=map]):not([data-workspace=flow]) main{width:100%}.tactical-editor #library-dialog select{margin:15px 0}.tactical-editor #palette-dialog #flow-palette{max-height:55vh;overflow:auto}
@media(max-width:1300px){.tactical-editor .rail{width:235px}.tactical-editor .map-layout,.tactical-editor .flow-layout{grid-template-columns:minmax(160px,1fr) 280px}.tactical-editor #tactical-tools button{font-size:10px;padding:4px 6px}.tactical-editor .header-mission{flex-basis:140px}.tactical-editor #graph-world .graph-node{width:205px}}
@media(max-width:950px){.tactical-editor .rail{width:210px}.tactical-editor .map-layout,.tactical-editor .flow-layout{grid-template-columns:minmax(120px,1fr) 245px}.tactical-editor header{height:auto;min-height:42px;flex-wrap:wrap;gap:6px}.tactical-editor #tactical-tools{order:4;margin:0;flex-basis:100%}.tactical-editor .side-tabs button{padding:5px 6px;font-size:10px}.tactical-editor header .actions{gap:3px}.tactical-editor .semantic-legend{gap:4px}.tactical-editor #graph-add{font-size:10px}}
@media(max-width:700px){.tactical-editor .app{display:block}.tactical-editor .rail{width:100%;height:220px}.tactical-editor .side-content{height:184px}.tactical-editor .map-layout,.tactical-editor .flow-layout{display:flex;flex-direction:column}.tactical-editor .map-stage{height:520px}.tactical-editor .inspector{width:100%;border-left:0;border-top:1px solid var(--line)}.tactical-editor #graph-viewport{height:620px}.tactical-editor header .header-mission{flex:1}.tactical-editor header .primary-views{order:3}.tactical-editor .actions #save{display:none}body.tactical-editor header .actions{margin-left:0}.tactical-editor .graph-node .node-title{font-size:12px}}

.tactical-editor [data-panel=flow] .viewbar>div:not(.tools):not(.semantic-legend):not(.flow-objective-tools):not(.flow-link-tools):not(.flow-zoom-tools){display:none}.tactical-editor [data-panel=flow] .viewbar .tools button{padding:4px 7px;font-size:10px}.menu-extras{display:flex;flex-direction:column;border-top:1px solid var(--line);padding-top:6px}.menu-extras button{text-align:left;background:transparent;border:0}.tactical-editor .graph-node{min-height:64px}
.semantic-legend .end{background:#695980}.tactical-editor .graph-node.end .kind{background:#695980}.tactical-editor .graph-node.end{background:#242036}
#palette-dialog{width:min(920px,94vw)}.behavior-filters{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:12px 0}.behavior-filters>label:first-child{flex:1;min-width:220px}.behavior-filters small{flex-basis:100%}#flow-palette{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px}.palette-item{display:flex;flex-direction:column;text-align:left;gap:5px;white-space:normal;padding:12px!important}.palette-item strong{color:#dcefff}.behavior-family{color:#47c7dc!important}.behavior-description{font-size:11px;line-height:1.5;color:#9db0c8}.behavior-technical{margin:12px 0}.parameter-type{opacity:.7;font-size:10px}.call-editor details{margin:6px 0}.call-editor label small,#block-fields label>small{display:block;line-height:1.45;margin:4px 0;color:#8da3bd}.behavior-filters .check{display:flex;align-items:center;gap:6px}.behavior-filters .check input{width:auto}
#flow-palette .palette-item{font-family:inherit}#flow-palette .behavior-description{font-family:inherit}#block-fields .behavior-technical{overflow-wrap:anywhere}
body.tactical-editor #import{display:inline-block}body.tactical-editor #export{display:none!important}#kyt-file-status{display:block;color:#9fb0c5;font-size:9px;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#kyt-save-dialog{width:min(780px,94vw)}#kyt-save-summary{color:#8ea7bf}.kyt-filename-row{display:flex;align-items:center;gap:8px}.kyt-filename-row input{flex:1;min-width:0}.save-issue{border-left:3px solid #d6b666;background:#182337;padding:10px 13px;margin:9px 0}.save-issue.error{border-color:#ef8a88}.save-issue strong,.save-issue small{display:block}.save-issue small{color:#8da3bd;margin:4px 0;overflow-wrap:anywhere}.save-issue p{margin:6px 0;line-height:1.5}.save-ready{padding:12px;background:#163327;color:#b2e6c1}.required-setting{padding:10px 0;border-bottom:1px solid #334051}.required-setting small{display:block;margin:5px 0;color:#8da3bd}.kyt-save-footer{display:flex;gap:15px;align-items:center;justify-content:space-between;position:sticky;bottom:-24px;background:#12212e;padding:14px 0;border-top:1px solid #334051}.kyt-save-footer small{max-width:65%;color:#8da3bd}#kyt-message-text{white-space:pre-wrap;overflow-wrap:anywhere}body.tactical-editor header{height:auto;min-height:48px}.tactical-editor header .header-mission{flex-basis:210px}.tactical-editor header .actions{gap:5px}@media(max-width:1450px){.tactical-editor[data-workspace=map] #tactical-tools{display:flex;order:5;flex-basis:100%;justify-content:center;flex-wrap:wrap}.tactical-editor header{flex-wrap:wrap}.tactical-editor #kyt-file-status{max-width:160px}.tactical-editor .header-mission{flex-basis:160px}}@media(max-width:900px){.tactical-editor header{flex-wrap:wrap}.tactical-editor header .actions{flex-wrap:wrap}.tactical-editor .header-mission{flex:1}.kyt-save-footer{position:static}.kyt-save-footer small{max-width:55%}}@media(max-width:440px){.tactical-editor header .actions{width:100%;justify-content:flex-end}.tactical-editor #library-open{font-size:10px}.tactical-editor header button{font-size:10px;padding:4px 6px}}
#mission-setup-dialog{width:min(850px,94vw)}#mission-setup-dialog h3{color:#96b1cc;font-size:12px;margin:18px 0 10px}#mission-setup-dialog section{border-top:1px solid #334051;padding:12px 0}#setup-checklist{list-style:none;margin:12px 0;padding:0}#setup-checklist li{display:flex;gap:12px;align-items:flex-start;padding:9px 0;border-bottom:1px solid #293b50}#setup-checklist li>span{font-size:17px;color:#d9b85a;width:20px}#setup-checklist li.done>span{color:#78d6ab}#setup-checklist li.optional>span{color:#8da3bd}#setup-checklist li>div{flex:1}#setup-checklist small{display:block;color:#90a6be;line-height:1.5;margin-top:4px}#setup-checklist button{font-size:10px;padding:4px 6px}.setup-stock-row{display:grid;grid-template-columns:1fr 130px;gap:12px;border-top:1px solid #2a3b51;padding:8px 0}.setup-stock-row small{display:block;color:#8da3bd}#mission-setup-open.setup-incomplete{border-color:#af924e;color:#e5c875}#setup-error{color:#ffaaaa;white-space:pre-wrap}#mission-setup-dialog .row{flex-wrap:wrap}#mission-setup-dialog .row select{flex:1;min-width:220px}#mission-setup-dialog details p{line-height:1.6;color:#9dafc4}#setup-player-controls{display:flex;gap:8px;flex-wrap:wrap}#setup-goal-pane small{display:block;color:#9dafc4;line-height:1.6}@media(max-width:550px){.setup-stock-row{grid-template-columns:1fr 90px}#mission-setup-dialog{padding:15px}}

.flow-objective-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.flow-objective-tools label{display:flex;align-items:center;gap:8px;margin:0}.flow-objective-tools select{width:240px;max-width:45vw;font-size:11px;margin:0}.input-events{border:1px solid var(--line);border-radius:2px;padding:10px;margin:14px 0}.input-events legend{font-size:11px;color:var(--muted)}.input-event-row{display:flex;gap:5px;margin:6px 0}.input-event-row select{flex:1;min-width:0}.input-event-row button{flex-shrink:0}.tactical-editor .graph-node.objective{border-color:#9a892f;background:#252313}.tactical-editor .graph-node.objective .kind{background:#8b782c}

#graph-viewport{touch-action:none}#graph-connection-preview{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:12}#graph-connection-preview[hidden]{display:none}#graph-connection-help{position:absolute;bottom:8px;left:10px;pointer-events:none;background:#101827e6;padding:4px 7px;font-size:10px;z-index:13}.tactical-editor .graph-node .node-input,.tactical-editor .graph-node .node-connect{position:absolute;width:18px;height:18px;padding:0;border:1px solid #89b7cb;border-radius:50%;background:#122233;cursor:crosshair;touch-action:none}.tactical-editor .graph-node .node-input{left:-10px}.tactical-editor .graph-node .node-connect{right:-10px;top:30px}.tactical-editor .graph-node .node-input::after{content:"";position:absolute;inset:-5px;border-radius:50%}.tactical-editor .graph-node .connect-compatible{border-color:#79ddcc;background:#204e49;box-shadow:0 0 0 3px #79ddcc35}.tactical-editor .graph-node.connect-hover{border-color:#79ddcc;box-shadow:0 0 0 2px #79ddcc}.tactical-editor .graph-node.connect-invalid{border-color:#fb8c89}.connecting,.connecting .graph-node{cursor:crosshair!important}

.node-state-input,.node-state-output{position:absolute;width:12px;height:12px;top:33px;background:#a8963c;border:1px solid #ebd877;transform:rotate(45deg);cursor:help}.node-state-input{left:-7px}.node-state-output{right:-7px}.starter-objective-note{color:#e7cb86}

#graph-nodes{pointer-events:none}.graph-node{pointer-events:auto}.graph-edge-hit{pointer-events:stroke;cursor:pointer}.graph-edge-line{pointer-events:none}.graph-edge.selected .graph-edge-line{stroke:#4ad1ec;stroke-width:3}.graph-edge:focus{outline:none}.graph-edge:focus .graph-edge-line{stroke:#79ddcc;stroke-width:3}

.flow-link-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.flow-link-tools label{display:flex;align-items:center;gap:6px;margin:0}.flow-link-tools select{width:260px;max-width:50vw;font-size:11px;margin:0}

.tactical-editor .graph-node.objective.initial-completed{background:#173025;border-color:#48765b}.tactical-editor .graph-node.objective.initial-completed .kind{background:#376f4c}.tactical-editor .graph-node.objective.initial-failed{background:#351d22;border-color:#80454c}.tactical-editor .graph-node.objective.initial-failed .kind{background:#7b2727}

.tactical-editor .graph-node{min-height:86px}.tactical-editor .graph-node .node-title{font-size:13px;font-weight:700;color:#e8f4ff}.graph-node .node-context{color:#93bbce;font-weight:600}.node-command-label{color:#7dd7ec;font-weight:600}.node-delete{margin:10px 0}.message-editor{margin:16px 0;padding:10px;border:1px solid var(--line)}.palette-item strong{font-size:15px!important}#flow-search{width:100%;font-size:14px;padding:12px}
