@import url('./workspace-pin-colors.css?v=1');
/* TimeGap chrome; the paper and painted nodes remain their own visual layer. */
:root { --tg-page:#0d1016; --tg-surface:#151820; --tg-raised:#1c2028; --tg-border:#42434a; --tg-text:#f3f1ed; --tg-muted:#c3c2c1; --tg-gold:#efc995; }
body { background:var(--tg-page); color:var(--tg-text); font-size:14px; }
.topbar { min-height:76px; height:auto; background:var(--tg-page); border-color:#292b32; padding:14px clamp(18px,3vw,48px); gap:20px; }
.timegap-mark { width:42px; height:42px; display:block; }
.brand {gap:12px}.brand b {font-size:13px;letter-spacing:.04em}.brand small{color:var(--tg-gold);font-size:9px;letter-spacing:.16em}.project-label{color:#a9a8a6}.project-title strong{font-size:14px}.status-indicator{color:var(--tg-muted)}
.button,.import-action {display:inline-flex;align-items:center;justify-content:center;min-height:42px;border-radius:2px;padding:10px 14px;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}
.button--light {background:var(--tg-gold);border-color:var(--tg-gold);color:#211913}.button--ghost,.button--sample{background:var(--tg-raised);border:1px solid var(--tg-border);color:var(--tg-text)}.button:hover,.import-action:hover{border-color:var(--tg-gold);filter:brightness(1.08)}
.workspace {min-height:calc(100vh - 76px);background:var(--tg-page)}.editor{background:var(--tg-page);padding:30px clamp(18px,3vw,48px) 40px}.editor-top{margin:0 0 24px}.editor h2{font:700 clamp(26px,3vw,38px)/1.15 var(--serif);letter-spacing:-.045em;margin:9px 0}.editor-top p{font-size:14px;color:var(--tg-muted)}.eyebrow,.editor-tag{color:var(--tg-gold)}.title-dot{color:var(--tg-gold)}
.simulation-bar{border:1px solid #34363d;border-radius:2px;background:var(--tg-surface);padding:12px;gap:10px;color:var(--tg-text);margin-bottom:16px}.simulation-bar select{max-width:min(260px,45vw);min-height:42px;border-radius:2px;background:var(--tg-raised);border-color:#4b4d55;color:var(--tg-text)}.simulation-bar label{font-size:12px}.add-node-button{min-width:155px}.simulation-bar #simulation-result{flex-basis:100%;color:var(--tg-muted);font-size:12px;line-height:1.5}.canvas-toolbar,.canvas-footer{border-radius:0;background:var(--tg-surface);border-color:#42434a}.canvas-toolbar{min-height:54px;height:auto}.canvas-tab{font-size:12px}.canvas-tab.hint-tab{font-size:11px;color:#c3c2c1}.canvas-tools .icon-button{min-width:32px;min-height:38px}.viewport{min-height:540px;max-height:none;max-width:100%;flex:none;height:min(68vh,760px);border-color:#65574d}.canvas-footer{color:var(--tg-muted)}
.sidebar{background:var(--tg-surface)}.panel-right{background:var(--tg-surface);border-color:var(--tg-border)}.drawer-close{border:0;background:transparent;color:var(--tg-muted);font-size:27px;line-height:1;width:42px;height:42px;cursor:pointer}.drawer-close:hover{color:var(--tg-gold)}.node-filter input,.rename-row input{background:var(--tg-raised);color:var(--tg-text);border-color:#555861;border-radius:2px}.node-filter input{min-height:44px;font-size:14px}.library-item{min-height:52px;border-radius:2px}.library-item b{font-size:13px}.library-item small{font-size:11px;color:var(--tg-muted)}.library-item:hover{background:#252931;border-color:var(--tg-gold)}
/* The default is a compact user workspace. Studio is only a local presentation mode. */
body:not(.studio) .workspace{display:block;min-height:calc(100vh - 76px)}
body:not(.studio) .studio-only,body:not(.studio) .panel-left > .variables-panel,body:not(.studio) .panel-left > .source-catalog,body:not(.studio) .panel-left > .side-bottom,body:not(.studio) .panel-left > .side-intro,body:not(.studio):not(.has-health) .simulation-bar > label[for="health-value"],body:not(.studio):not(.has-time) .simulation-bar > label[for="time-step"],body:not(.studio):not(.has-time) #advance,body:not(.studio) #reset-simulation,body:not(.studio) #actor-location-note,body:not(.studio) #trace-panel,body:not(.studio) .panel-right > .section-kicker,body:not(.studio) .inspector-header,body:not(.studio) .inspector-copy,body:not(.studio) .controls,body:not(.studio) .toggle-row,body:not(.studio) .inspector-divider,body:not(.studio) .formula-card,body:not(.studio) .file-controls,body:not(.studio) .legend{display:none!important}
body:not(.studio) .panel-left{position:fixed;z-index:60;inset:0 auto 0 0;width:min(390px,92vw);height:100dvh;overflow-y:auto;padding:20px;display:flex;transform:translateX(-105%);visibility:hidden;transition:transform .2s ease,visibility .2s;background:#151820;border-right:1px solid var(--tg-border);box-shadow:0 12px 50px #0009}
body:not(.studio) .panel-left.library-open{transform:translateX(0);visibility:visible}body:not(.studio) .panel-left .section-kicker{align-items:center;gap:10px;color:var(--tg-gold);font-size:11px}body:not(.studio) #library-count{margin-left:auto}body:not(.studio) .side-heading{padding-top:15px}body:not(.studio) .node-library{display:grid;grid-template-columns:1fr;overflow:visible;max-height:none}.node-library .library-item[hidden]{display:none!important}
body:not(.studio) .panel-right{display:none;position:fixed;z-index:45;top:88px;right:18px;width:min(330px,calc(100vw - 36px));max-height:calc(100dvh - 106px);overflow:auto;padding:20px;border:1px solid var(--tg-border);box-shadow:0 16px 45px #0009}body:not(.studio).has-selection:not(.inspector-dismissed) .panel-right{display:block}body:not(.studio) .inspector-close{float:right;margin:-8px -8px 0 0}body:not(.studio) .selected-label{padding-top:6px;color:var(--tg-gold)}body:not(.studio) .selection b{font-size:14px}body:not(.studio) .selection p,body:not(.studio) .rename-label{font-size:11px}body:not(.studio) .delete-button{font-size:12px;min-height:42px}body:not(.studio) .canvas-footer{min-height:34px}
body:not(.studio) #print-panel{margin-top:12px;order:10;border-radius:2px;background:var(--tg-surface);border-color:var(--tg-border)}
body.studio .drawer-close{display:none}body.studio .workspace{grid-template-columns:260px minmax(0,1fr) 280px}body.studio .panel-left,body.studio .panel-right{max-height:calc(100vh - 76px);overflow:auto}body.studio .studio-only{display:inline-flex}
/* Nine-slice backgrounds preserve painted headers and corners on tall nodes. */
.bp-node{background:none!important;border:0 solid transparent;border-image-slice:320 130 80 fill;border-image-width:43px 16px 15px;border-image-repeat:stretch}
.bp-node--flow{border-image-source:url('assets/node-flow.png')}.bp-node--event{border-image-source:url('assets/node-event.png')}.bp-node--pure{border-image-source:url('assets/node-pure.png')}.bp-node--call{border-image-source:url('assets/node-call.png')}
/* Data pins are circular, with the same colors as their corresponding wires. */
.bp-pin:not(.bp-pin--exec):not(.bp-pin--bool):not(.bp-pin--eventDelegate):not(.bp-pin--delegate)::before{width:15px;height:15px;left:3px;top:3px;border:2px solid var(--pin-color,#aaa8a1)!important;border-radius:50%!important;background:radial-gradient(circle at 30% 25%,#fff9,var(--pin-color,#aaa8a1) 38%,#363039 100%)!important}
.bp-pin:not(.bp-pin--exec):not(.bp-pin--bool):not(.bp-pin--eventDelegate):not(.bp-pin--delegate):not(.bp-pin--connected):not(.bp-pin--pending)::before{background:#39343a!important;opacity:1}
.bp-pin:focus-visible::before{outline:2px solid #fff;outline-offset:3px}
@media(max-width:850px){.topbar{gap:10px}.project-title,.top-divider,.status-indicator{display:none}.top-actions{gap:6px}.editor{padding:20px 14px 24px}.editor-top{margin-bottom:18px}.viewport{height:60vh;min-height:390px}.canvas-toolbar{padding:6px 10px}.canvas-tabs .hint-tab{display:none}.simulation-bar{gap:8px}.simulation-bar select{max-width:42vw}.panel-right{grid-column:auto}.rename-label,.rename-row,.pin-editor,#duration-control,.connections{grid-column:auto}body.studio .workspace{grid-template-columns:1fr}body.studio .panel-left,body.studio .panel-right{max-height:none}}
@media(max-width:560px){.brand small{font-size:8px}.brand b{font-size:11px}.timegap-mark{width:34px;height:34px}.topbar{padding:10px}.top-actions .button,.import-action{min-height:38px;padding:8px;font-size:11px}.editor-tag{display:none}.editor-top p{font-size:12px}.simulation-bar>label[for="example-select"]{order:1}.simulation-bar #load-example{order:2}.simulation-bar #run{order:3}.simulation-bar #simulation-result{order:4}.viewport{min-height:360px;height:55vh}.canvas-tools{gap:2px}body:not(.studio) .panel-right{top:auto;bottom:0;right:0;width:100%;max-height:48dvh;border-radius:8px 8px 0 0}}

.bp-node--type-setTimer{width:300px}.bp-node--type-setTimer .bp-node__pin-side--input .bp-pin__label{max-width:225px}.bp-node--type-setTimer .bp-node__pin-side--output .bp-pin__label{max-width:100px}

/* An unpaired pin can use the full row instead of being clipped at 80px. */
.bp-node__pin-row:has(.bp-node__pin-side--output:empty) .bp-node__pin-side--input .bp-pin__label,.bp-node__pin-row:has(.bp-node__pin-side--input:empty) .bp-node__pin-side--output .bp-pin__label{max-width:none}
@media(max-width:560px){.topbar{flex-wrap:wrap}.top-actions{flex-wrap:wrap;justify-content:flex-end}}

/* UE delegate pins are squares; event outputs live in the title bar. */
.bp-node__header--delegate{position:relative;padding-left:34px!important;padding-right:34px!important}
.bp-pin--header-delegate{position:absolute;right:7px;top:11px;z-index:2;cursor:crosshair}
.bp-pin--eventDelegate::before,.bp-pin--delegate::before{width:15px;height:15px;left:3px;top:3px;border:2px solid #d45864;border-radius:2px;background:#4a2930;opacity:1!important;box-shadow:inset 0 0 0 1px #542b31}
.bp-pin--eventDelegate.bp-pin--connected::before,.bp-pin--eventDelegate.bp-pin--pending::before,.bp-pin--delegate.bp-pin--connected::before,.bp-pin--delegate.bp-pin--pending::before{background:#d45864}
