/* The workflow editor (js/workflow-*.js) and the page around it (Pages/Workflows).
   Every rule is scoped under .wf. Chrome follows the app's --rl-* tokens, which the app redefines for dark mode;
   the --wf-* tokens below derive from them, so nothing here hard-codes a theme except the data colours (port types,
   status) that need a light and a dark value of their own. */

.wf {
    --wf-accent: var(--rl-accent);
    --wf-accent-soft: color-mix(in srgb, var(--rl-accent) 16%, transparent);
    --wf-canvas: var(--rl-surface-raised);
    --wf-dot: rgba(100, 116, 139, .38);
    --wf-node: var(--rl-surface);
    --wf-chrome: var(--rl-surface);
    --wf-line: var(--rl-border);
    --wf-line-strong: color-mix(in srgb, var(--rl-text) 28%, var(--rl-border));
    --wf-muted: var(--rl-text-muted);
    --wf-field: var(--rl-bg);
    --wf-hover: var(--rl-surface-sunken);
    --wf-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 4px 14px rgba(15, 23, 42, .1);
    --wf-shadow-lg: 0 10px 34px rgba(15, 23, 42, .28), 0 2px 6px rgba(15, 23, 42, .14);
    --wf-ok: var(--rl-ok);
    --wf-bad: var(--rl-danger);
    --wf-warn: #b45309;
    --wf-cached: #2563eb;
    --wf-ty-text: #5d6b82;
    --wf-ty-image: #d6407f;
    --wf-ty-mesh: #7a56e8;
    --wf-ty-audio: #c26f00;
    --wf-ty-video: #08899f;
    --wf-ty-file: #8b6a3a;
    --wf-ty-json: #2c9a57;
    --wf-ty-any: #55606f;
    --wf-note-mm: #e8c75a;

    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    outline: none;
    color: var(--rl-text);
    background: var(--wf-canvas);
    font-size: 13px;
    line-height: 1.35;
    -webkit-tap-highlight-color: transparent;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .wf {
        --wf-canvas: var(--rl-bg);
        --wf-node: var(--rl-surface-raised);
        --wf-chrome: var(--rl-surface);
        --wf-dot: rgba(148, 163, 184, .26);
        --wf-field: var(--rl-surface);
        --wf-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 5px 16px rgba(0, 0, 0, .35);
        --wf-shadow-lg: 0 12px 38px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .4);
        --wf-warn: #f0b24d;
        --wf-cached: #7db3ff;
        --wf-ty-text: #9fb0c8;
        --wf-ty-image: #ff7fb0;
        --wf-ty-mesh: #aa90ff;
        --wf-ty-audio: #ffb35c;
        --wf-ty-video: #4fd3ea;
        --wf-ty-file: #d2ad72;
        --wf-ty-json: #62d68f;
        --wf-ty-any: #c4cbd6;
        --wf-note-mm: #8a7424;
    }
}
:root[data-theme="dark"] .wf {
    --wf-canvas: var(--rl-bg);
    --wf-node: var(--rl-surface-raised);
    --wf-chrome: var(--rl-surface);
    --wf-dot: rgba(148, 163, 184, .26);
    --wf-field: var(--rl-surface);
    --wf-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 5px 16px rgba(0, 0, 0, .35);
    --wf-shadow-lg: 0 12px 38px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .4);
    --wf-warn: #f0b24d;
    --wf-cached: #7db3ff;
    --wf-ty-text: #9fb0c8;
    --wf-ty-image: #ff7fb0;
    --wf-ty-mesh: #aa90ff;
    --wf-ty-audio: #ffb35c;
    --wf-ty-video: #4fd3ea;
    --wf-ty-file: #d2ad72;
    --wf-ty-json: #62d68f;
    --wf-ty-any: #c4cbd6;
    --wf-note-mm: #8a7424;
}

.wf *, .wf *::before, .wf *::after { box-sizing: border-box; }
.wf button { font: inherit; color: inherit; }
.wf [hidden] { display: none !important; }
.wf .wf-ic { display: inline-flex; line-height: 0; flex: none; }
.wf .wf-ic svg { display: block; }
.wf :focus-visible { outline: 2px solid var(--wf-accent); outline-offset: 1px; }

/* ---- port types: one colour per type, on ports, wires and chips ---- */
.wf .wf-ty-text { --ty: var(--wf-ty-text); }
.wf .wf-ty-image { --ty: var(--wf-ty-image); }
.wf .wf-ty-mesh { --ty: var(--wf-ty-mesh); }
.wf .wf-ty-audio { --ty: var(--wf-ty-audio); }
.wf .wf-ty-video { --ty: var(--wf-ty-video); }
.wf .wf-ty-file { --ty: var(--wf-ty-file); }
.wf .wf-ty-json { --ty: var(--wf-ty-json); }
.wf .wf-ty-any { --ty: var(--wf-ty-any); }

/* ---- toolbar ---- */
.wf .wf-toolbar {
    flex: none; display: flex; align-items: center; gap: 3px; padding: 5px 8px; min-height: 44px;
    background: var(--wf-chrome); border-bottom: 1px solid var(--wf-line); overflow-x: auto; scrollbar-width: none;
}
.wf .wf-toolbar::-webkit-scrollbar { display: none; }
.wf .wf-spacer { flex: 1; min-width: 8px; }
.wf .wf-sep { width: 1px; height: 22px; background: var(--wf-line); margin: 0 4px; flex: none; }
.wf .wf-tb {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none;
    min-width: 32px; height: 32px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.wf .wf-tb:hover:not(:disabled) { background: var(--wf-hover); }
.wf .wf-tb:disabled { opacity: .35; cursor: default; }
.wf .wf-tb.is-on, .wf .wf-tb[aria-pressed="true"].is-on { background: var(--wf-accent-soft); color: var(--wf-accent); }
.wf .wf-tb--text { font-size: 12.5px; }
.wf .wf-zoom { min-width: 52px; font-variant-numeric: tabular-nums; }
.wf .wf-tb__badge {
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--wf-bad); color: #fff;
    font-size: 10.5px; line-height: 17px; text-align: center; font-weight: 700;
}
.wf .wf-tb__badge.is-warn { background: var(--wf-warn); color: #111; }
.wf .wf-save { font-size: 12px; color: var(--wf-muted); white-space: nowrap; padding: 0 6px; }
.wf .wf-save--error { color: var(--wf-bad); font-weight: 600; }
.wf .wf-save--saving, .wf .wf-save--dirty { font-style: italic; }
.wf .wf-runstatus {
    font-size: 12px; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 9px; border-radius: 999px;
    background: var(--wf-hover); color: var(--rl-text);
}
.wf .wf-runstatus--running, .wf .wf-runstatus--queued { background: var(--wf-accent-soft); color: var(--wf-accent); }
.wf .wf-runstatus--completed { background: color-mix(in srgb, var(--wf-ok) 18%, transparent); color: var(--wf-ok); }
.wf .wf-runstatus--failed, .wf .wf-runstatus--completedWithErrors, .wf .wf-runstatus--interrupted { background: color-mix(in srgb, var(--wf-bad) 16%, transparent); color: var(--wf-bad); }

.wf .wf-split { display: inline-flex; flex: none; }
.wf .wf-run {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; cursor: pointer; font-weight: 600;
    background: var(--wf-accent); color: var(--rl-accent-contrast); border-radius: 8px;
}
.wf .wf-split .wf-run:first-child { border-radius: 8px 0 0 8px; }
.wf .wf-run--caret { border-radius: 0 8px 8px 0; padding: 0 7px; border-left: 1px solid color-mix(in srgb, var(--rl-accent-contrast) 30%, transparent); }
.wf .wf-run:hover { filter: brightness(1.08); }
.wf .wf-run--stop { background: var(--wf-bad); color: #fff; }
.wf .wf-run:disabled { opacity: .5; cursor: default; }

/* ---- main layout: palette | canvas | inspector ---- */
.wf .wf-main { position: relative; flex: 1; min-height: 0; display: flex; }
.wf .wf-pal, .wf .wf-insp { flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--wf-chrome); }
.wf .wf-pal { width: 232px; border-right: 1px solid var(--wf-line); }
.wf .wf-insp { width: 330px; border-left: 1px solid var(--wf-line); }
.wf:not(.pal-open) .wf-pal, .wf:not(.insp-open) .wf-insp, .wf--ro .wf-pal { display: none; }
.wf .wf-canvas { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.wf .wf-scrim { display: none; }

.wf .wf-pal__h, .wf .wf-insp__h { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px 12px; }
.wf .wf-pal__x, .wf .wf-insp__x { display: none; }
.wf .wf-pal__s { position: relative; padding: 4px 10px 8px; }
.wf .wf-pal__s .wf-ic { position: absolute; left: 19px; top: 13px; color: var(--wf-muted); pointer-events: none; }
.wf .wf-pal__s .wf-in { padding-left: 28px; }
.wf .wf-pal__list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 6px 8px; }
.wf .wf-pal__cat {
    display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 6px; border: 0; background: transparent; cursor: pointer;
    font-weight: 600; font-size: 12px; text-align: left; border-radius: 7px; color: var(--rl-text);
}
.wf .wf-pal__cat:hover { background: var(--wf-hover); }
.wf .wf-pal__ct { flex: 1; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; color: var(--wf-muted); }
.wf .wf-pal__cat em { font-style: normal; font-size: 11px; color: var(--wf-muted); }
.wf .wf-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cat, var(--ty, var(--wf-muted))); flex: none; display: inline-block; }
.wf .wf-pal__items { display: flex; flex-direction: column; gap: 2px; padding: 0 0 6px; }
.wf .wf-pal__item {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 7px; border: 1px solid transparent; border-radius: 9px; background: transparent;
    cursor: grab; text-align: left;
}
.wf .wf-pal__item:hover { background: var(--wf-hover); border-color: var(--wf-line); }
.wf .wf-pal__item:active { cursor: grabbing; }
.wf .wf-pal__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf .wf-pal__none, .wf .wf-pal__foot { padding: 10px 12px; color: var(--wf-muted); font-size: 12px; }
.wf .wf-pal__foot { border-top: 1px solid var(--wf-line); }

/* ---- the canvas ---- */
.wf .wf-view {
    position: absolute; inset: 0; overflow: hidden; outline: none; touch-action: none; user-select: none; -webkit-user-select: none;
    background-color: var(--wf-canvas);
    background-image: radial-gradient(circle at 0 0, var(--wf-dot) 1.3px, transparent 1.8px);
    background-size: 20px 20px;
}
.wf .wf-view.is-space, .wf .wf-view.is-panning { cursor: grab; }
.wf .wf-view.is-panning { cursor: grabbing; }
.wf--wiring .wf-view, .wf--wiring .wf-view * { cursor: crosshair !important; }
.wf .wf-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.wf .wf-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.wf .wf-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.wf .wf-marquee { position: absolute; z-index: 4; pointer-events: none; border: 1px dashed var(--wf-accent); background: var(--wf-accent-soft); border-radius: 3px; }

.wf .wf-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; color: var(--wf-muted); padding: 24px; }
.wf .wf-empty div { display: flex; flex-direction: column; gap: 4px; max-width: 28ch; }
.wf .wf-empty b { color: var(--rl-text); font-size: 15px; }

/* wires */
.wf .wf-edge__hit { stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
.wf .wf-edge__line { stroke: var(--ty); stroke-width: 2.5; stroke-linecap: round; pointer-events: none; opacity: .92; }
.wf .wf-edge:hover .wf-edge__line { stroke-width: 3.5; opacity: 1; }
.wf .wf-edge.is-sel .wf-edge__line { stroke-width: 4; filter: drop-shadow(0 0 4px var(--ty)); opacity: 1; }
.wf .wf-edge.is-ghost { opacity: 0; }
.wf .wf-edge.is-flow .wf-edge__line { stroke-dasharray: 8 7; animation: wf-flow .7s linear infinite; }
.wf .wf-edge__lab rect { fill: var(--wf-chrome); stroke: var(--ty); stroke-width: 1.2; }
.wf .wf-edge__lab text { fill: var(--rl-text); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wf .wf-edge__lab { pointer-events: none; }
.wf .wf-edge__del { opacity: 0; pointer-events: none; cursor: pointer; transition: opacity .12s; }
.wf .wf-edge__del circle { fill: var(--wf-chrome); stroke: var(--wf-line-strong); stroke-width: 1.5; }
.wf .wf-edge__del path { stroke: var(--rl-text); stroke-width: 1.8; stroke-linecap: round; }
.wf .wf-edge__del:hover circle { fill: var(--wf-bad); stroke: var(--wf-bad); }
.wf .wf-edge__del:hover path { stroke: #fff; }
.wf .wf-edge:hover .wf-edge__del, .wf .wf-edge.is-sel .wf-edge__del { opacity: 1; pointer-events: all; }
.wf .wf-wire { fill: none; stroke: var(--ty); stroke-width: 2.5; stroke-dasharray: 7 5; stroke-linecap: round; pointer-events: none; }

/* ---- nodes ---- */
.wf .wf-node {
    position: absolute; left: 0; top: 0; width: 240px; z-index: 1; pointer-events: auto;
    background: var(--wf-node); border: 1.5px solid var(--wf-line-strong); border-radius: 12px; box-shadow: var(--wf-shadow);
    color: var(--rl-text); font-size: 13px;
}
.wf .wf-node.is-sel { border-color: var(--wf-accent); box-shadow: 0 0 0 3px var(--wf-accent-soft), var(--wf-shadow); z-index: 3; }
.wf .wf-node__head {
    display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 7px; cursor: grab; min-height: 38px;
    background: color-mix(in srgb, var(--cat) 15%, var(--wf-node)); border-radius: 10.5px 10.5px 0 0;
    border-bottom: 1px solid color-mix(in srgb, var(--cat) 30%, var(--wf-line));
}
.wf .wf-node.is-collapsed .wf-node__head { border-radius: 10.5px; border-bottom: 0; }
.wf .wf-node__ic { width: 24px; height: 24px; border-radius: 7px; background: var(--cat); color: #fff; display: inline-grid; place-items: center; flex: none; }
.wf .wf-node__title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf .wf-title-edit {
    flex: 1; min-width: 0; font: inherit; font-weight: 600; padding: 2px 5px; border: 1px solid var(--wf-accent); border-radius: 6px;
    background: var(--wf-field); color: var(--rl-text); user-select: text; -webkit-user-select: text;
}
.wf .wf-node__col, .wf .wf-node__del { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--wf-muted); padding: 0; }
.wf .wf-node__col:hover { background: var(--wf-hover); color: var(--rl-text); }
.wf .wf-node__del:hover { background: color-mix(in srgb, var(--wf-bad) 18%, transparent); color: var(--wf-bad); }
.wf .wf-note .wf-node__del { color: color-mix(in srgb, var(--ni) 72%, transparent); }
.wf .wf-node__body { padding: 8px 11px 10px; display: flex; flex-direction: column; gap: 7px; }
.wf .wf-tag { flex: none; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: var(--wf-hover); color: var(--wf-muted); font-weight: 600; white-space: nowrap; }

.wf .wf-badge {
    flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
    background: var(--wf-hover); color: var(--wf-muted); white-space: nowrap;
}
.wf .wf-badge--running { background: var(--wf-accent-soft); color: var(--wf-accent); }
.wf .wf-badge--done { background: color-mix(in srgb, var(--wf-ok) 18%, transparent); color: var(--wf-ok); }
.wf .wf-badge--cached { background: color-mix(in srgb, var(--wf-cached) 16%, transparent); color: var(--wf-cached); }
.wf .wf-badge--failed { background: color-mix(in srgb, var(--wf-bad) 16%, transparent); color: var(--wf-bad); }
.wf .wf-spin svg { animation: wf-rot .9s linear infinite; }

/* run state on the node frame */
.wf .wf-node.st-pending { border-style: dashed; }
.wf .wf-node.st-running { border-color: var(--wf-accent); animation: wf-pulse 1.7s ease-in-out infinite; }
.wf .wf-node.st-done { border-color: var(--wf-ok); }
.wf .wf-node.st-cached { border-color: var(--wf-cached); }
.wf .wf-node.st-failed { border-color: var(--wf-bad); border-width: 2px; background: color-mix(in srgb, var(--wf-bad) 6%, var(--wf-node)); }
.wf .wf-node.st-skipped { opacity: .6; border-style: dashed; }
.wf .wf-node.st-blocked { opacity: .5; border-style: dotted; }
.wf .wf-node.is-disabled { opacity: .55; border-style: dashed; }
.wf .wf-node.has-error { box-shadow: 0 0 0 3px color-mix(in srgb, var(--wf-bad) 35%, transparent), var(--wf-shadow); }
.wf .wf-node.has-warn { box-shadow: 0 0 0 3px color-mix(in srgb, var(--wf-warn) 35%, transparent), var(--wf-shadow); }
.wf .wf-node.is-sel.st-running { border-color: var(--wf-accent); }
.wf .wf-node.is-unknown { border: 1.5px dashed var(--wf-bad); }
.wf .wf-node.is-unknown .wf-node__head { background: color-mix(in srgb, var(--wf-bad) 14%, var(--wf-node)); }
.wf .wf-unknown { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--wf-bad); user-select: text; -webkit-user-select: text; }
.wf .wf-unknown code { font-size: 11.5px; word-break: break-all; color: var(--rl-text); }
.wf .wf-unknown span { color: var(--wf-muted); }

.wf .wf-meta { display: flex; align-items: center; gap: 6px; min-height: 18px; font-size: 11.5px; color: var(--wf-muted); }
.wf .wf-mode { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; background: var(--wf-hover); color: var(--wf-muted); }
.wf .wf-count { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--rl-text); }
.wf .wf-msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf .wf-bar { height: 4px; border-radius: 2px; background: var(--wf-hover); overflow: hidden; margin-top: -2px; }
.wf .wf-bar i { display: block; height: 100%; width: 0; background: var(--wf-accent); border-radius: 2px; transition: width .25s ease; }
.wf .wf-bar.is-indet i { width: 35%; animation: wf-indet 1.2s ease-in-out infinite; }
.wf .wf-err, .wf .wf-errbox {
    margin: 0; padding: 6px 8px; border-radius: 8px; font-size: 12px; line-height: 1.4; max-height: 120px; overflow: auto; white-space: pre-wrap; word-break: break-word;
    background: color-mix(in srgb, var(--wf-bad) 10%, transparent); color: var(--wf-bad); border: 1px solid color-mix(in srgb, var(--wf-bad) 35%, transparent);
    user-select: text; -webkit-user-select: text; cursor: text; font-family: inherit;
}
.wf .wf-warn { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--wf-warn); user-select: text; -webkit-user-select: text; }
.wf .wf-warn div, .wf div.wf-warn { display: flex; gap: 5px; align-items: flex-start; }
.wf .wf-warn .wf-ic { margin-top: 2px; }

/* ports and their rows */
.wf .wf-inrow { position: relative; display: block; }
.wf .wf-in__main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wf .wf-in__line { display: flex; align-items: baseline; gap: 6px; min-height: 18px; }
.wf .wf-in__label { font-weight: 500; }
.wf .wf-req { color: var(--wf-warn); margin-left: 2px; }
.wf .wf-from { color: var(--wf-muted); font-style: italic; font-size: 11.5px; }
.wf .wf-out { position: relative; display: flex; flex-direction: column; gap: 5px; }
.wf .wf-out__head { position: relative; display: flex; justify-content: flex-end; min-height: 18px; }
.wf .wf-out__label { font-weight: 500; text-align: right; }
.wf .wf-port {
    position: absolute; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--wf-node); border: 3px solid var(--ty); cursor: crosshair; z-index: 2;
    transition: transform .1s, box-shadow .1s;
}
.wf .wf-port::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.wf .wf-port--in { left: -19px; }
.wf .wf-port--out { right: -19px; }
.wf .wf-port.is-connected { background: var(--ty); }
.wf .wf-port:hover { transform: scale(1.25); }
.wf .wf-port.is-req { border-color: var(--wf-warn); }
.wf .wf-port.is-req::after { content: ""; position: absolute; left: -7px; top: -7px; width: 9px; height: 9px; border-radius: 50%; background: var(--wf-warn); border: 1.5px solid var(--wf-node); }
.wf .wf-port.is-origin { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ty) 35%, transparent); background: var(--ty); }
.wf .wf-port.is-ok { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ty) 32%, transparent); transform: scale(1.2); }
.wf .wf-port.is-hot { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ty) 55%, transparent); transform: scale(1.5); background: var(--ty); }
.wf .wf-port.is-dim { opacity: .22; }
.wf--wiring .wf-node:not(.is-sel) { transition: opacity .12s; }

/* ---- fields ---- */
.wf .wf-params { display: flex; flex-direction: column; gap: 7px; }
.wf .wf-group { margin: 3px 0 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wf-muted); }
.wf .wf-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wf .wf-field__l { font-size: 11.5px; font-weight: 500; color: var(--wf-muted); }
.wf .wf-field__h { font-size: 11.5px; color: var(--wf-muted); }
.wf .wf-field__e { font-size: 11.5px; color: var(--wf-bad); user-select: text; -webkit-user-select: text; }
.wf .wf-field--full { gap: 4px; }
.wf .wf-field--full .wf-field__l { font-size: 12px; }
.wf .wf-field.is-wired > .wf-field__h { display: flex; align-items: center; gap: 4px; color: var(--wf-cached); }
.wf .wf-in, .wf input.wf-in, .wf select.wf-in, .wf textarea.wf-in {
    width: 100%; min-width: 0; min-height: 28px; padding: 3px 7px; font: inherit; font-size: 12.5px; color: var(--rl-text);
    background: var(--wf-field); border: 1px solid var(--wf-line-strong); border-radius: 8px; user-select: text; -webkit-user-select: text;
}
.wf .wf-field--full .wf-in { min-height: 32px; font-size: 13px; }
.wf textarea.wf-in { resize: vertical; line-height: 1.35; padding: 5px 7px; min-height: 52px; }
.wf .wf-in:disabled { opacity: .7; }
.wf .wf-in:focus { outline: 2px solid var(--wf-accent); outline-offset: -1px; border-color: transparent; }
.wf .wf-numrow { display: flex; align-items: center; gap: 5px; min-width: 0; }
.wf .wf-range { flex: 1; min-width: 60px; accent-color: var(--wf-accent); }
.wf .wf-numrow .wf-in[type=number] { flex: 0 1 96px; min-width: 64px; }
.wf .wf-field--full .wf-numrow .wf-in[type=number] { flex: 0 0 96px; }
.wf .wf-seedtag { font-size: 11px; color: var(--wf-muted); white-space: nowrap; }
.wf .wf-color { width: 34px; height: 28px; padding: 0; border: 1px solid var(--wf-line-strong); border-radius: 8px; background: var(--wf-field); cursor: pointer; flex: none; }
.wf .wf-hex { flex: 1; font-family: ui-monospace, Consolas, monospace; }
.wf .wf-mini {
    flex: none; width: 28px; height: 28px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--wf-line-strong); border-radius: 8px;
    background: var(--wf-field); cursor: pointer; color: var(--rl-text);
}
.wf .wf-mini:hover:not(:disabled) { background: var(--wf-hover); }
.wf .wf-mini:disabled { opacity: .45; cursor: default; }
.wf .wf-bool { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; min-height: 24px; }
.wf .wf-bool input { width: 16px; height: 16px; accent-color: var(--wf-accent); flex: none; }
.wf .wf-adv { border-top: 1px dashed var(--wf-line); padding-top: 5px; }
.wf .wf-adv > summary { cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--wf-muted); padding: 2px 0; list-style-position: inside; }
.wf .wf-adv[open] > summary { margin-bottom: 6px; }
.wf .wf-adv[open] { display: flex; flex-direction: column; gap: 7px; }

.wf .wf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--wf-line-strong); background: var(--wf-field); color: var(--rl-text); font-size: 12.5px; font-weight: 500;
}
.wf .wf-btn:hover:not(:disabled) { background: var(--wf-hover); }
.wf .wf-btn:disabled { opacity: .45; cursor: default; }
.wf .wf-btn--sm { min-height: 28px; padding: 0 9px; font-size: 12px; }
.wf .wf-btn--ghost { border-color: transparent; background: transparent; color: var(--wf-muted); }
.wf .wf-btn--primary { background: var(--wf-accent); border-color: var(--wf-accent); color: var(--rl-accent-contrast); font-weight: 600; }
.wf .wf-btn--primary:hover:not(:disabled) { background: var(--wf-accent); filter: brightness(1.08); }
.wf .wf-btn--danger { color: var(--wf-bad); }

/* files and assets */
.wf .wf-files { display: flex; flex-direction: column; gap: 6px; }
.wf .wf-drop { border: 1.5px dashed var(--wf-line-strong); border-radius: 9px; padding: 7px; display: flex; flex-direction: column; gap: 6px; background: var(--wf-field); transition: background .12s, border-color .12s; }
.wf .wf-drop.is-over { border-color: var(--wf-accent); background: var(--wf-accent-soft); }
.wf .wf-drop__hint { font-size: 11.5px; color: var(--wf-muted); text-align: center; }
.wf .wf-drop__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wf .wf-files__n { flex: 1 1 auto; font-size: 11.5px; color: var(--wf-muted); text-align: right; white-space: nowrap; }
.wf .wf-prog { height: 5px; border-radius: 3px; background: var(--wf-hover); overflow: hidden; }
.wf .wf-prog i { display: block; height: 100%; width: 0; background: var(--wf-accent); transition: width .2s; }
.wf .wf-prog__t { font-size: 11.5px; color: var(--wf-muted); }
.wf .wf-files__thumbs { display: flex; flex-wrap: wrap; gap: 4px; }
.wf .wf-files__list { display: flex; flex-direction: column; gap: 3px; max-height: 220px; overflow-y: auto; }
.wf .wf-thumb { position: relative; width: 40px; height: 40px; border-radius: 7px; overflow: hidden; border: 1px solid var(--wf-line-strong); background: var(--wf-hover); flex: none; }
.wf .wf-thumb--row { width: 100%; height: 36px; display: flex; align-items: center; gap: 8px; padding-right: 30px; border-radius: 8px; }
.wf .wf-thumb__b { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; overflow: hidden; }
.wf .wf-thumb--row .wf-thumb__b { width: 34px; height: 34px; flex: none; }
.wf .wf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf .wf-thumb__ic { color: var(--wf-muted); display: inline-grid; place-items: center; }
.wf .wf-thumb__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.wf .wf-thumb__x {
    position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(15, 18, 24, .75); color: #fff; opacity: 0; transition: opacity .1s;
}
.wf .wf-thumb--row .wf-thumb__x { top: 50%; right: 6px; transform: translateY(-50%); opacity: 1; background: transparent; color: var(--wf-muted); }
.wf .wf-thumb--row .wf-thumb__x:hover { color: var(--wf-bad); }
.wf .wf-thumb:hover .wf-thumb__x, .wf .wf-thumb__x:focus-visible { opacity: 1; }
.wf .wf-thumb--more { display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--wf-muted); }

/* output previews */
.wf .wf-out__prev:empty { display: none; }
.wf .wf-prev { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.wf .wf-prev--big { align-items: flex-start; }
.wf .wf-thumbs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.wf .wf-prev--big .wf-thumbs { justify-content: flex-start; }
.wf .wf-th { position: relative; width: 44px; height: 44px; padding: 0; border: 1px solid var(--wf-line-strong); border-radius: 7px; overflow: hidden; cursor: zoom-in; background: var(--wf-hover); }
.wf .wf-prev--big .wf-th { width: 62px; height: 62px; }
.wf .wf-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf .wf-th__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 12, 16, .62); color: #fff; font-weight: 700; font-size: 12px; }
.wf .wf-prev__n { font-size: 11px; color: var(--wf-muted); }
.wf .wf-snip {
    display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px; border: 1px solid var(--wf-line-strong); border-radius: 7px; background: var(--wf-field);
    cursor: pointer; text-align: left; font-size: 12px;
}
.wf .wf-snip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf .wf-snip b { color: var(--wf-muted); font-size: 11px; }
.wf .wf-chip {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 8px; border: 1px solid var(--wf-line-strong); border-radius: 999px; background: var(--wf-field);
    color: var(--rl-text); text-decoration: none; font-size: 12px; cursor: pointer;
}
.wf .wf-chip:hover { background: var(--wf-hover); }
.wf .wf-chip__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }

/* ---- notes ---- */
.wf .wf-note {
    --nb: #fdf0b8; --nl: #e0c85a; --ni: #3b3412; z-index: 0; display: flex; flex-direction: column; background: var(--nb); border-color: var(--nl); border-radius: 6px; color: var(--ni); box-shadow: 2px 4px 12px rgba(0, 0, 0, .14);
}
.wf .wf-note--blue { --nb: #d3e6fb; --nl: #8db6e6; --ni: #12304f; }
.wf .wf-note--green { --nb: #d5f0d9; --nl: #87c78f; --ni: #143a1b; }
.wf .wf-note--pink { --nb: #fbdbe7; --nl: #e79ab9; --ni: #4a1428; }
.wf .wf-note.is-sel { z-index: 0; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .wf .wf-note { --nb: #4a4220; --nl: #8a7a36; --ni: #f6eebd; }
    :root:not([data-theme="light"]) .wf .wf-note--blue { --nb: #23384f; --nl: #4a6f99; --ni: #d7e8fa; }
    :root:not([data-theme="light"]) .wf .wf-note--green { --nb: #243c28; --nl: #4f7f57; --ni: #d8f1dc; }
    :root:not([data-theme="light"]) .wf .wf-note--pink { --nb: #4a2535; --nl: #96506e; --ni: #fbdfeb; }
}
:root[data-theme="dark"] .wf .wf-note { --nb: #4a4220; --nl: #8a7a36; --ni: #f6eebd; }
:root[data-theme="dark"] .wf .wf-note--blue { --nb: #23384f; --nl: #4a6f99; --ni: #d7e8fa; }
:root[data-theme="dark"] .wf .wf-note--green { --nb: #243c28; --nl: #4f7f57; --ni: #d8f1dc; }
:root[data-theme="dark"] .wf .wf-note--pink { --nb: #4a2535; --nl: #96506e; --ni: #fbdfeb; }
.wf .wf-note__bar { display: flex; align-items: center; justify-content: space-between; padding: 3px 6px; cursor: grab; color: color-mix(in srgb, var(--ni) 60%, transparent); flex: none; }
.wf .wf-note__sws { display: inline-flex; gap: 4px; }
.wf .wf-note__sw { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .25); padding: 0; cursor: pointer; }
.wf .wf-note__sw.is-on { box-shadow: 0 0 0 2px var(--wf-accent); }
.wf .wf-note__sw--yellow { background: #f2d95c; }
.wf .wf-note__sw--blue { background: #7fb2ea; }
.wf .wf-note__sw--green { background: #7bcb86; }
.wf .wf-note__sw--pink { background: #ee8fb2; }
.wf .wf-swatches { display: flex; gap: 8px; }
.wf .wf-swatches .wf-note__sw { width: 24px; height: 24px; }
.wf .wf-note__t {
    flex: 1; min-height: 0; width: 100%; resize: none; border: 0; background: transparent; color: var(--ni); font: inherit; font-size: 13px; padding: 2px 10px 12px; outline: none;
    user-select: text; -webkit-user-select: text;
}
.wf .wf-note__t::placeholder { color: color-mix(in srgb, var(--ni) 50%, transparent); }

/* resize handles */
.wf .wf-rz { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: ew-resize; z-index: 2; }
.wf .wf-rz--both { cursor: nwse-resize; }
.wf .wf-rz::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; opacity: .4; }

/* ---- floating bits ---- */
.wf .wf-zoomctl { position: absolute; left: 12px; bottom: 12px; z-index: 6; display: flex; background: var(--wf-chrome); border: 1px solid var(--wf-line); border-radius: 9px; box-shadow: var(--wf-shadow); }
.wf .wf-minimap {
    position: absolute; right: 12px; bottom: 12px; z-index: 6; width: 190px; height: 124px; border: 1px solid var(--wf-line); border-radius: 10px; overflow: hidden;
    background: color-mix(in srgb, var(--wf-chrome) 88%, transparent); box-shadow: var(--wf-shadow); cursor: pointer; touch-action: none;
}
.wf .wf-minimap__cv { width: 100%; height: 100%; display: block; }
.wf .wf-vpanel {
    position: absolute; right: 12px; top: 12px; z-index: 7; width: min(360px, calc(100% - 24px)); max-height: calc(100% - 170px); display: flex; flex-direction: column;
    background: var(--wf-chrome); border: 1px solid var(--wf-line); border-radius: 12px; box-shadow: var(--wf-shadow-lg);
}
.wf .wf-vpanel__h { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--wf-line); }
.wf .wf-vpanel__h b { flex: none; }
.wf .wf-vpanel__n { flex: 1; font-size: 12px; color: var(--wf-muted); }
.wf .wf-vlist { list-style: none; margin: 0; padding: 4px; overflow-y: auto; }
.wf .wf-vitem { display: flex; gap: 8px; align-items: flex-start; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 12.5px; cursor: default; }
.wf button.wf-vitem { cursor: pointer; }
.wf button.wf-vitem:hover { background: var(--wf-hover); }
.wf .wf-vitem .wf-ic { margin-top: 1px; }
.wf .wf-vitem--error .wf-ic { color: var(--wf-bad); }
.wf .wf-vitem--warning .wf-ic { color: var(--wf-warn); }
.wf .wf-vpanel__ok { display: flex; align-items: center; gap: 8px; padding: 14px 12px; color: var(--wf-ok); }

.wf .wf-overlay { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.wf .wf-overlay > * { pointer-events: auto; }
.wf .wf-toasts { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(520px, calc(100% - 24px)); }
.wf .wf-toast {
    padding: 8px 14px; border-radius: 10px; background: #111827; color: #fff; font-size: 13px; box-shadow: var(--wf-shadow-lg); pointer-events: auto; animation: wf-toast .2s ease-out;
    max-width: 100%;
}
.wf .wf-pop {
    position: absolute; z-index: 10; max-width: min(380px, calc(100% - 12px)); min-width: 160px; padding: 6px; background: var(--wf-chrome); border: 1px solid var(--wf-line-strong);
    border-radius: 11px; box-shadow: var(--wf-shadow-lg);
}
.wf .wf-menu { display: flex; flex-direction: column; min-width: 250px; }
.wf .wf-mi { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; font-size: 13px; }
.wf .wf-mi:hover:not(:disabled), .wf .wf-mi:focus-visible { background: var(--wf-hover); }
.wf .wf-mi:disabled { opacity: .45; cursor: default; }
.wf .wf-pop__list { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.wf .wf-pop__text pre { margin: 0; max-height: min(40vh, 320px); overflow: auto; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 12.5px; user-select: text; -webkit-user-select: text; padding: 4px 6px; }
.wf .wf-pop__bar { display: flex; align-items: center; gap: 10px; padding-top: 6px; font-size: 11.5px; color: var(--wf-muted); }

.wf .wf-qa {
    position: absolute; z-index: 12; width: 330px; max-width: calc(100% - 12px); padding: 8px; display: flex; flex-direction: column; gap: 6px;
    background: var(--wf-chrome); border: 1px solid var(--wf-line-strong); border-radius: 12px; box-shadow: var(--wf-shadow-lg);
}
.wf .wf-qa__hint { font-size: 11.5px; color: var(--wf-muted); padding: 0 2px; }
.wf .wf-qa__list { max-height: min(46vh, 340px); overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.wf .wf-qa__item { display: flex; align-items: center; gap: 9px; padding: 5px 7px; border-radius: 8px; cursor: pointer; }
.wf .wf-qa__item.is-active { background: var(--wf-accent-soft); outline: 1px solid color-mix(in srgb, var(--wf-accent) 50%, transparent); }
.wf .wf-qa__t { display: flex; flex-direction: column; min-width: 0; }
.wf .wf-qa__t small { color: var(--wf-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.wf .wf-qa__none { padding: 12px; text-align: center; color: var(--wf-muted); }

/* lightbox and library picker */
.wf .wf-lb { position: absolute; inset: 0; z-index: 20; background: rgba(8, 10, 14, .9); display: grid; grid-template-rows: 1fr auto; color: #fff; }
.wf .wf-lb__stage { display: grid; place-items: center; padding: 56px 64px 8px; min-height: 0; }
.wf .wf-lb__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 8px 40px rgba(0, 0, 0, .6); background: #222; }
.wf .wf-lb__cap { text-align: center; padding: 6px 16px 16px; font-size: 13px; color: #cbd2dc; }
.wf .wf-lb__btn {
    position: absolute; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; text-decoration: none;
}
.wf .wf-lb__btn:hover { background: rgba(255, 255, 255, .24); }
.wf .wf-lb__close { top: 10px; right: 10px; }
.wf .wf-lb__btn[download] { top: 10px; right: 60px; }
.wf .wf-lb__prev { left: 10px; top: 50%; transform: translateY(-50%) scaleX(-1); }
.wf .wf-lb__next { right: 10px; top: 50%; transform: translateY(-50%); }

.wf .wf-modal-bg { position: absolute; inset: 0; z-index: 15; background: rgba(10, 12, 16, .5); display: grid; place-items: center; padding: 14px; }
.wf .wf-modal { width: min(780px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--wf-chrome); border: 1px solid var(--wf-line-strong); border-radius: 14px; box-shadow: var(--wf-shadow-lg); }
.wf .wf-modal__h { display: flex; align-items: center; justify-content: space-between; }
.wf .wf-modal__f { display: grid; grid-template-columns: 1fr 150px; gap: 8px; }
.wf .wf-modal__more { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; font-size: 12px; color: var(--wf-muted); }
.wf .wf-modal__b { display: flex; justify-content: flex-end; gap: 8px; }
.wf .wf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; overflow-y: auto; min-height: 160px; max-height: min(52vh, 460px); align-content: start; padding: 2px; }
.wf .wf-tile { position: relative; display: flex; flex-direction: column; border: 2px solid var(--wf-line); border-radius: 10px; overflow: hidden; background: var(--wf-hover); padding: 0; cursor: pointer; text-align: left; }
.wf .wf-tile.is-on { border-color: var(--wf-accent); }
.wf .wf-tile img, .wf .wf-tile__ic { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; color: var(--wf-muted); }
.wf .wf-tile__n { padding: 4px 6px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--wf-chrome); }
.wf .wf-tile__ck { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--wf-accent); color: var(--rl-accent-contrast); }
.wf .wf-sentinel { grid-column: 1 / -1; height: 1px; }

/* ---- inspector ---- */
.wf .wf-insp__body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 16px; }
.wf .wf-insp__sec { padding: 8px 0; display: flex; flex-direction: column; gap: 9px; border-bottom: 1px solid var(--wf-line); }
.wf .wf-insp__sec:last-child { border-bottom: 0; }
.wf .wf-insp__sec h3 { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--wf-muted); }
.wf .wf-insp__sec .wf-group { margin: 4px 0 0; }
.wf .wf-insp__p { margin: 0; font-size: 12.5px; color: var(--rl-text); }
.wf .wf-insp__muted { color: var(--wf-muted); }
.wf .wf-insp__bad { color: var(--wf-bad); }
.wf .wf-insp__desc { color: var(--wf-muted); }
.wf .wf-insp__node { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.wf .wf-insp__node > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.wf .wf-insp__node small { color: var(--wf-muted); font-size: 11.5px; word-break: break-all; }
.wf .wf-insp__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.wf .wf-keys { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; margin: 0; font-size: 12px; }
.wf .wf-keys dt { font-weight: 600; white-space: nowrap; }
.wf .wf-keys dd { margin: 0; color: var(--wf-muted); }
.wf .wf-pre { margin: 0; padding: 8px; max-height: 220px; overflow: auto; font-size: 11.5px; background: var(--wf-field); border: 1px solid var(--wf-line); border-radius: 8px; user-select: text; -webkit-user-select: text; }
.wf .wf-typechip { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 2px solid var(--ty); font-size: 12px; font-weight: 600; }
.wf .wf-runline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wf .wf-runline small { color: var(--wf-muted); }
.wf .wf-runout { display: flex; flex-direction: column; gap: 5px; }
.wf .wf-runout__h { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.wf .wf-runout__h small { margin-left: auto; color: var(--wf-muted); font-weight: 400; }
.wf .wf-runout__h .wf-dot { background: var(--ty); }

/* ---- read-only ---- */
.wf--ro .wf-node__head, .wf--ro .wf-note__bar { cursor: default; }
.wf--ro .wf-port { cursor: default; }
.wf--ro .wf-rz { display: none; }

/* ---- phones: palette and inspector become drawers ---- */
.wf--narrow .wf-pal, .wf--narrow .wf-insp {
    position: absolute; top: 0; bottom: 0; z-index: 30; width: min(320px, 88%); box-shadow: var(--wf-shadow-lg);
}
.wf--narrow .wf-pal { left: 0; }
.wf--narrow .wf-insp { right: 0; }
.wf--narrow .wf-pal__x, .wf--narrow .wf-insp__x { display: inline-flex; }
.wf--narrow.pal-open .wf-scrim, .wf--narrow.insp-open .wf-scrim { display: block; position: absolute; inset: 0; z-index: 25; background: rgba(10, 12, 16, .4); }
.wf--narrow .wf-tb--text span, .wf--narrow .wf-runstatus, .wf--narrow .wf-save { display: none; }
.wf--narrow .wf-minimap { width: 118px; height: 78px; right: 8px; bottom: 8px; }
.wf--narrow .wf-zoomctl { left: 8px; bottom: 8px; }
.wf--narrow .wf-vpanel { right: 8px; top: 8px; }
.wf--narrow .wf-lb__stage { padding: 56px 12px 8px; }
.wf--narrow .wf-tb { min-width: 34px; height: 36px; padding: 0 4px; }
.wf--narrow .wf-run { height: 36px; }
.wf--narrow .wf-toolbar { gap: 1px; padding: 4px; }
.wf--narrow .wf-sep, .wf--narrow .wf-zoom, .wf--narrow .wf-snap { display: none; }
.wf--narrow .wf-toolbar .wf-spacer { min-width: 0; }
.wf--narrow .wf-modal__f { grid-template-columns: 1fr; }

/* ---- motion ---- */
@keyframes wf-flow { to { stroke-dashoffset: -15; } }
@keyframes wf-rot { to { transform: rotate(360deg); } }
@keyframes wf-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wf-accent) 45%, transparent), var(--wf-shadow); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--wf-accent) 0%, transparent), var(--wf-shadow); }
}
@keyframes wf-indet { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
@keyframes wf-toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .wf *, .wf *::before, .wf *::after { animation: none !important; transition: none !important; }
    .wf .wf-bar.is-indet i { width: 100%; opacity: .5; }
}
