/* Shared desktop/mobile block editor; theme tokens remain authoritative. */
dialog.wf-editor{padding:0;width:min(720px,calc(100vw - 24px));max-width:none;max-height:min(860px,calc(var(--wf-visible-height,100dvh) - 24px));margin:auto;border:1px solid var(--line);border-radius:20px;background:var(--panel,var(--surface-solid));color:var(--ink,var(--text));overflow:hidden}
dialog.wf-editor[open]{display:flex;flex-direction:column}
.wf-editor>header,.wf-editor>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding:18px 22px;background:var(--panel,var(--surface-solid))}
.wf-editor>header{border-bottom:1px solid var(--line)}.wf-editor>header h2{margin:0;font-size:21px;line-height:1.3}
.wf-editor>footer{border-top:1px solid var(--line);justify-content:flex-end;padding-bottom:max(18px,env(safe-area-inset-bottom))}
.wf-editor .wf-editor-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:20px 22px;display:grid;gap:18px;scrollbar-gutter:stable}
.wf-editor .wf-editor-field{display:grid;gap:8px;margin:0;font-size:14px;font-weight:600;min-width:0}
.wf-editor input:not([type=radio]):not([type=checkbox]),.wf-editor select,.wf-editor textarea{box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:inherit;font:inherit;font-size:16px}
.wf-editor input[type=file]{max-width:100%;overflow:hidden}.wf-editor textarea{resize:vertical}.wf-editor input[type=radio],.wf-editor input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;accent-color:var(--accent)}
.wf-editor .btn{min-height:48px;white-space:normal;line-height:1.4;margin:0}.wf-editor .workflow-dialog-close{color:inherit}
.wf-type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:0;padding:0;margin:0}.wf-type-grid legend{margin-bottom:14px}
.wf-type-choice{display:flex;align-items:center;gap:12px;padding:16px;min-height:60px;border:1px solid var(--line);border-radius:12px;cursor:pointer;background:var(--surface-2);overflow-wrap:anywhere}.wf-type-choice:has(:checked){border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.wf-choice-list{display:grid;gap:10px;align-content:start}.wf-editor .wf-choice{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;padding:14px 16px;min-height:60px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:inherit;text-align:start;font:inherit;font-weight:600;cursor:pointer;overflow-wrap:anywhere}
.wf-editor .wf-choice small{color:var(--muted);font-size:13px;font-weight:400}.wf-editor .wf-choice[aria-pressed=true]{border-color:var(--accent)}.wf-editor .wf-choice:disabled{opacity:.65;cursor:not-allowed}
.wf-editor .wf-inputs{display:grid;gap:12px}.wf-editor .wf-inputs h3{font-size:18px;margin:6px 0}.wf-editor .wf-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.wf-editor .wf-input-row>strong{font-size:14px}.wf-editor .wf-input-row>p{grid-column:1/-1;margin:0;line-height:1.6;font-size:14px;overflow-wrap:anywhere}.wf-editor .wf-input-row>.btn{font-size:14px}.wf-requirement{color:var(--muted);text-align:end;font-size:12px}.wf-extra-inputs{display:grid;gap:12px}.wf-extra-inputs summary{cursor:pointer;min-height:44px;padding:12px 0}.wf-editor .wf-extra-inputs .wf-input-row{margin-block:10px}
.wf-output-options{border:1px solid var(--line);border-radius:14px;padding:16px;display:grid;gap:10px}.wf-output-options label{display:flex;align-items:center;gap:12px;min-height:44px}
.wf-editor p.hint{margin:0;line-height:1.6;color:var(--muted);font-size:14px}.wf-editor-message,.wf-editor-warning{margin:0;padding:14px 22px;background:var(--surface-2);border-inline-start:3px solid var(--accent);line-height:1.5;font-size:14px;overflow-wrap:anywhere}.wf-editor-message{flex-shrink:0;max-height:20vh;overflow:auto}.wf-editor-message[hidden]{display:none}.wf-editor li{margin-bottom:16px;overflow-wrap:anywhere}.wf-editor :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.workflow-step-card .workflow-step-inputs{grid-column:1/-1;grid-row:auto;width:100%}.workflow-mobile-undo{display:none}
.wf-wire.image{stroke-dasharray:7 5}.wf-wire.is-related{stroke-width:4}.wf-wire.is-dimmed{opacity:.25}
.wf-graph.is-expanded{position:fixed;inset:12px;z-index:1800;background:var(--panel,var(--surface-solid));padding:14px;border:1px solid var(--line);border-radius:16px;overflow:auto;box-shadow:0 0 0 100vmax #0009}.wf-graph.is-expanded .wf-graph-viewport{height:calc(100dvh - 180px)!important}
@media(max-width:740px){dialog.wf-editor{width:calc(100vw - 16px);max-height:calc(var(--wf-visible-height,100dvh) - 16px);margin:auto;border-radius:18px}.wf-editor>header,.wf-editor>footer{padding:14px 16px}.wf-editor .wf-editor-body{padding:16px}.wf-editor>footer{padding-bottom:max(14px,env(safe-area-inset-bottom))}.wf-editor>footer>.btn{flex:1}.wf-editor>header h2{font-size:19px}.wf-type-choice{padding:12px}.wf-type-choice strong{font-size:14px}.workflow-mobile-undo{display:block!important}.wf-graph.is-expanded{inset:4px;padding:8px}}
@media(prefers-reduced-motion:reduce){.wf-editor *, .wf-wire{animation:none!important;transition:none!important}}

.wf-graph .wf-graph-viewport{overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y}.wf-graph-plane{position:relative;min-width:1px;min-height:1px}.wf-graph-plane>.wf-graph-stage{position:absolute;inset:0 auto auto 0}.wf-graph.is-mobile .wf-node-sockets{display:none}.wf-graph.is-mobile .wf-canvas-node{min-height:0}.wf-graph.is-mobile .wf-node-description{display:none}.wf-graph.is-mobile .wf-node-actions{padding-top:8px}

@media(max-width:740px){.wf-graph-toolbar{flex-wrap:wrap;gap:10px}.wf-graph-controls{flex-wrap:wrap;margin-inline-start:0;width:100%;justify-content:space-between}.wf-graph-controls .wf-graph-tool:nth-child(n+3){display:inline-flex;min-width:44px;min-height:44px}.wf-graph-zoom{display:inline-block}.wf-graph-controls [data-graph-arrange]{display:none!important}.wf-graph-plane{margin-inline:auto}.wf-graph.is-mobile .wf-node-description{display:block;min-height:0;height:auto;max-height:38px;font-size:13px}.wf-graph.is-mobile .wf-node-actions .wf-graph-tool{min-height:44px}}

dialog.wf-editor{position:fixed;inset-inline:0;top:var(--wf-visible-center,50%);bottom:auto;transform:translateY(-50%);margin:0 auto}

.workflow-step-actions{grid-column:1/-1;border-top:1px solid var(--line);padding-top:6px}.workflow-step-actions summary{min-height:44px;padding-block:12px;cursor:pointer}.workflow-step-actions>.btn{min-height:44px;margin:4px;width:calc(100% - 8px)}.wf-graph.is-mobile .wf-node-actions{display:none}.wf-graph.is-mobile .wf-canvas-node{cursor:pointer}

.wf-input-adders{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.wf-input-adders .btn{font-size:12px;padding:8px 10px;min-height:40px}
.wf-reference-list{max-height:300px;overflow:auto;overscroll-behavior:contain;padding:4px;display:grid;gap:10px}
.wf-reference-list .wf-input-row{margin:0}.wf-reference-list .icon-action{min-width:44px;width:44px;min-height:44px;padding:11px}.wf-reference-list .icon-action svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}

.wf-editor .wf-input-actions{grid-column:1/-1;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.wf-editor .wf-input-actions .icon-action{flex:0 0 44px;min-height:44px;width:44px;padding:11px}.wf-editor .wf-input-actions .icon-action svg{width:20px;height:20px}.wf-editor .wf-input-row{box-sizing:border-box}
