        :root {
            --bg: #f2ede3;
            --panel: rgba(255, 250, 240, 0.86);
            --line: #d7c9b3;
            --ink: #1d1b18;
            --muted: #776a58;
            --accent: #d45c2c;
            --accent-soft: #f3c8a9;
            --sky: #2f7e91;
            --leaf: #5f8054;
            --gold: #b88b2d;
            --grid-major: rgba(76, 61, 42, 0.12);
            --grid-minor: rgba(76, 61, 42, 0.05);
            --shadow: 0 24px 60px rgba(68, 48, 22, 0.12);
        }

        * { box-sizing: border-box; }

        body {
            margin: 0;
            font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
            color: var(--ink);
            background:
                radial-gradient(circle at top left, rgba(212, 92, 44, 0.16), transparent 28%),
                radial-gradient(circle at right, rgba(47, 126, 145, 0.12), transparent 22%),
                linear-gradient(180deg, #f7f0e5 0%, var(--bg) 100%);
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        body.is-box-selecting,
        body.is-box-selecting * {
            user-select: none !important;
            -webkit-user-select: none !important;
        }

        body.is-library-dragging,
        body.is-library-dragging * {
            user-select: none !important;
            -webkit-user-select: none !important;
        }

        .menu-bar {
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 0 16px;
            background: linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(246, 237, 221, 0.94));
            border-bottom: 1px solid rgba(110, 84, 43, 0.12);
            box-shadow: 0 8px 28px rgba(82, 59, 31, 0.08);
            position: relative;
            z-index: 8;
        }

        .menu-status,
        .toolbar-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .menu-status {
            flex: 1 1 auto;
            overflow: hidden;
        }

        .toolbar-actions {
            flex: 0 0 auto;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

        .view-mode-switch {
            display: inline-grid;
            grid-template-columns: repeat(2, minmax(72px, 1fr));
            padding: 3px;
            border: 1px solid rgba(92, 73, 45, 0.18);
            border-radius: 8px;
            background: rgba(239, 233, 223, 0.92);
        }

        .view-mode-button {
            min-height: 32px;
            padding: 6px 10px;
            border: 0;
            border-radius: 6px;
            background: transparent;
            color: var(--muted);
            font: inherit;
            font-size: 12px;
            letter-spacing: 0;
            cursor: pointer;
        }

        .view-mode-button.is-active {
            background: #fffdf8;
            color: var(--ink);
            box-shadow: 0 1px 4px rgba(68, 48, 22, 0.14);
        }

        .view-mode-button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .toolbar-select {
            min-width: 240px;
            max-width: 320px;
            border: 1px solid rgba(92, 73, 45, 0.16);
            background: rgba(255, 251, 245, 0.86);
            color: var(--ink);
            border-radius: 999px;
            padding: 10px 14px;
            font-size: 13px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
        }

        .toolbar-select:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .app-shell {
            display: grid;
            grid-template-columns: 320px 8px 1fr;
            height: calc(100vh - 56px);
            min-height: 0;
        }

        .sidebar {
            z-index: 2;
            padding: 18px 16px 20px;
            background:
                radial-gradient(circle at top left, rgba(212, 92, 44, 0.08), transparent 34%),
                linear-gradient(180deg, rgba(252, 247, 240, 0.98), rgba(245, 237, 225, 0.94));
            border-right: 1px solid rgba(110, 84, 43, 0.12);
            box-shadow: 8px 0 40px rgba(82, 59, 31, 0.08);
            overflow-y: auto;
            min-width: 220px;
            display: grid;
            align-content: start;
            gap: 14px;
        }

        .explorer-intro {
            display: grid;
            gap: 10px;
            padding: 16px;
            border-radius: 20px;
            border: 1px solid rgba(114, 95, 67, 0.12);
            background: rgba(255, 252, 247, 0.82);
            box-shadow: 0 16px 36px rgba(82, 59, 31, 0.07);
        }

        .explorer-intro-top {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .explorer-intro-copy {
            display: grid;
            gap: 4px;
            min-width: 0;
        }

        .explorer-kicker {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            color: rgba(119, 106, 88, 0.72);
        }

        .explorer-intro h1 {
            margin: 0;
            font-size: 22px;
            line-height: 1.1;
        }

        .graph-tree {
            display: grid;
            gap: 12px;
        }

        .graph-tree-filter {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 12px;
            margin-bottom: 8px;
            border-radius: 12px;
            background: rgba(248, 242, 233, 0.6);
            border: 1px solid rgba(126, 106, 78, 0.1);
        }

        .filter-search input {
            width: 100%;
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid rgba(126, 106, 78, 0.2);
            background: #fff;
            font-size: 13px;
            color: #625648;
            box-sizing: border-box;
        }

        .filter-search input:focus {
            outline: none;
            border-color: rgba(128, 105, 72, 0.5);
            box-shadow: 0 0 0 2px rgba(128, 105, 72, 0.1);
        }

        .filter-search input::placeholder {
            color: rgba(126, 106, 78, 0.5);
        }

        .filter-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .filter-btn {
            padding: 5px 10px;
            border-radius: 6px;
            border: 1px solid rgba(126, 106, 78, 0.2);
            background: rgba(255, 252, 247, 0.8);
            font-size: 12px;
            color: #625648;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .filter-btn:hover {
            background: rgba(220, 207, 187, 0.5);
        }

        .filter-btn.active {
            background: rgba(128, 105, 72, 0.15);
            border-color: rgba(128, 105, 72, 0.4);
            font-weight: 500;
        }

        .graph-tree-section {
            display: grid;
            gap: 0;
            border-radius: 18px;
            border: 1px solid var(--tree-border);
            background: var(--tree-section-bg);
            box-shadow: 0 14px 32px rgba(82, 59, 31, 0.05);
            overflow: hidden;
            --tree-border: rgba(126, 106, 78, 0.14);
            --tree-section-bg: rgba(248, 242, 233, 0.88);
            --tree-accent-bg: rgba(220, 207, 187, 0.96);
            --tree-accent-ink: #625648;
            --tree-group-bg: rgba(236, 227, 212, 0.92);
            --tree-selection-stroke: rgba(128, 105, 72, 0.9);
            --tree-item-opened: rgba(237, 222, 202, 0.96);
        }

        .graph-tree-section[data-tree-section-kind="mainGraph"] {
            --tree-border: rgba(104, 132, 107, 0.18);
            --tree-section-bg: rgba(239, 245, 239, 0.92);
            --tree-accent-bg: rgba(190, 210, 191, 0.98);
            --tree-accent-ink: #4f6552;
            --tree-group-bg: rgba(216, 231, 217, 0.94);
            --tree-selection-stroke: rgba(80, 117, 84, 0.92);
            --tree-item-opened: rgba(226, 236, 227, 0.98);
        }

        .graph-tree-section[data-tree-section-kind="workflow"] {
            --tree-border: rgba(146, 119, 88, 0.18);
            --tree-section-bg: rgba(247, 241, 233, 0.92);
            --tree-accent-bg: rgba(222, 205, 179, 0.98);
            --tree-accent-ink: #69563f;
            --tree-group-bg: rgba(237, 224, 203, 0.94);
            --tree-selection-stroke: rgba(151, 114, 66, 0.92);
            --tree-item-opened: rgba(241, 226, 208, 0.98);
        }

        .graph-tree-section[data-tree-section-kind="agent"] {
            --tree-border: rgba(143, 111, 101, 0.18);
            --tree-section-bg: rgba(248, 240, 236, 0.92);
            --tree-accent-bg: rgba(225, 198, 188, 0.98);
            --tree-accent-ink: #6a5047;
            --tree-group-bg: rgba(238, 220, 213, 0.94);
            --tree-selection-stroke: rgba(144, 93, 78, 0.9);
            --tree-item-opened: rgba(242, 224, 216, 0.98);
        }

        .graph-tree-section[data-tree-section-kind="envVar"] {
            --tree-border: rgba(93, 132, 128, 0.18);
            --tree-section-bg: rgba(238, 246, 244, 0.92);
            --tree-accent-bg: rgba(188, 211, 207, 0.98);
            --tree-accent-ink: #466763;
            --tree-group-bg: rgba(212, 230, 227, 0.94);
            --tree-selection-stroke: rgba(69, 123, 118, 0.9);
            --tree-item-opened: rgba(223, 236, 233, 0.98);
        }

        .graph-tree-header {
            display: flex;
            align-items: center;
            gap: 0;
            padding: 8px 8px 6px;
            border-bottom: 1px solid rgba(108, 89, 61, 0.08);
        }

        .graph-tree-header-right {
            display: flex;
            align-items: center;
            gap: 6px;
            flex: 0 0 auto;
        }

        .graph-tree-list {
            display: grid;
            gap: 1px;
        }

        .graph-tree-section-body,
        .graph-tree-group-body {
            display: grid;
            gap: 0;
        }

        .graph-tree-section-body {
            padding: 0 8px 6px;
        }

        .graph-tree-section.is-collapsed .graph-tree-section-body,
        .graph-tree-group.is-collapsed .graph-tree-group-body {
            display: none;
        }

        .graph-tree-title-shell,
        .graph-tree-group-toggle {
            width: 100%;
            min-height: 38px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 0 12px;
            border-radius: 12px;
            border: 0;
            background: var(--tree-accent-bg);
            color: var(--ink);
            text-align: left;
            box-shadow: none;
        }

        .graph-tree-title-shell:hover,
        .graph-tree-group-toggle:hover {
            filter: brightness(1.02) saturate(1.03);
        }

        .graph-tree-group-toggle {
            background: var(--tree-group-bg);
            min-height: 32px;
            padding: 0 10px;
        }

        .graph-tree-group-toggle:hover {
            filter: brightness(1.02) saturate(1.03);
        }

        .graph-tree-title-btn {
            flex: 1 1 auto;
            min-width: 0;
            min-height: 38px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--ink);
            cursor: pointer;
            text-align: left;
        }

        .graph-tree-title-text,
        .graph-tree-group-title {
            min-width: 0;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--tree-accent-ink);
        }

        .graph-tree-title-text {
            font-size: 17px;
            font-weight: 900;
            letter-spacing: 0.04em;
        }

        .graph-tree-group-title {
            font-size: 12px;
            font-weight: 800;
        }

        .graph-tree-group[data-tree-depth="1"] .graph-tree-group-title {
            font-size: 12px;
            font-weight: 800;
        }

        .graph-tree-group[data-tree-depth="2"] .graph-tree-group-title {
            font-size: 11px;
            font-weight: 760;
            letter-spacing: 0.08em;
        }

        .graph-tree-group[data-tree-depth="3"] .graph-tree-group-title,
        .graph-tree-group[data-tree-depth="4"] .graph-tree-group-title,
        .graph-tree-group[data-tree-depth="5"] .graph-tree-group-title {
            font-size: 10px;
            font-weight: 740;
            letter-spacing: 0.08em;
        }

        .graph-tree-title-meta {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            flex: 0 0 auto;
        }

        .graph-tree-title-actions {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex: 0 0 auto;
        }

        .graph-tree-item {
            border: 0;
            background: transparent;
            border-radius: 12px;
            padding: 10px 12px;
            display: block;
            cursor: pointer;
            transition: background 0.14s ease, color 0.14s ease;
        }

        .graph-tree-item,
        .graph-tree-item * {
            user-select: none;
            -webkit-user-select: none;
        }

        .graph-tree-item:hover {
            background: rgba(255, 255, 255, 0.7);
        }

        .graph-tree-item.selected {
            background: rgba(255, 255, 255, 0.56);
            box-shadow: inset 0 0 0 2px var(--tree-selection-stroke);
        }

        .graph-tree-item.opened {
            background: var(--tree-item-opened);
        }

        .graph-tree-item.selected.opened {
            box-shadow: inset 0 0 0 2px var(--tree-selection-stroke);
        }

        .graph-tree-item-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }

        .graph-tree-item-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .graph-tree-item-emoji {
            flex: 0 0 auto;
            font-size: 14px;
            line-height: 1;
            opacity: 0.88;
        }

        .graph-tree-item-title {
            font-size: 13px;
            font-weight: 700;
            line-height: 1.4;
        }

        .graph-tree-item-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .graph-tree-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 20px;
            padding: 3px 8px;
            border-radius: 999px;
            border: 0;
            background: rgba(255,255,255,0.74);
            font-size: 10px;
            color: rgba(92, 77, 56, 0.82);
        }

        .graph-tree-item[draggable="true"] {
            cursor: grab;
        }

        .graph-tree-item[draggable="true"]:active {
            cursor: grabbing;
        }

        .graph-tree-group {
            display: grid;
            gap: 0;
        }

        .graph-tree-group-header {
            display: flex;
            align-items: center;
            gap: 0;
            padding: 2px 0 0;
        }

        .graph-tree-add-btn {
            width: 24px;
            height: 24px;
            border-radius: 8px;
            border: 0;
            background: rgba(255,255,255,0.74);
            color: var(--ink);
            cursor: pointer;
            font-size: 15px;
            line-height: 1;
            padding: 0;
        }

        .graph-tree-add-btn:hover {
            background: rgba(255,255,255,0.92);
        }

        .graph-tree-item-tooltip {
            display: none;
        }

        .graph-tree-item:hover .graph-tree-item-tooltip {
            display: block;
            position: absolute;
            left: calc(100% + 12px);
            top: 0;
            width: 260px;
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(86, 63, 35, 0.12);
            background: rgba(255, 251, 245, 0.98);
            box-shadow: 0 18px 36px rgba(63, 41, 16, 0.14);
            font-size: 12px;
            line-height: 1.6;
            color: var(--ink);
            z-index: 6;
            pointer-events: none;
        }

        .graph-tree-item-inner {
            position: relative;
        }

        .graph-tree-group-body {
            padding: 0 0 4px;
        }

        .graph-tree-group-body > .graph-tree-list,
        .graph-tree-section-body > .graph-tree-list {
            padding-top: 6px;
        }

        .workspace-shell {
            min-width: 0;
            min-height: 0;
            display: grid;
            grid-template-columns: minmax(0, 1fr) 380px;
            height: 100%;
        }

        .workspace-shell.is-office-mode {
            grid-template-columns: minmax(0, 1fr);
        }

        .workspace-shell.is-office-mode > .inspector-sidebar {
            display: none;
        }

        .sidebar-resizer {
            position: relative;
            z-index: 4;
            cursor: col-resize;
            background: linear-gradient(180deg, rgba(117, 97, 67, 0.06), rgba(117, 97, 67, 0.14));
        }

        .sidebar-resizer::after {
            content: '';
            position: absolute;
            left: 50%;
            top: 50%;
            width: 3px;
            height: 56px;
            transform: translate(-50%, -50%);
            border-radius: 999px;
            background: rgba(117, 97, 67, 0.28);
        }

        .brand-mark {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: grid;
            place-items: center;
            background: rgba(212, 92, 44, 0.14);
            color: var(--accent);
            font-weight: 800;
            box-shadow: none;
        }

        .sidebar h1 {
            margin: 0;
            font-size: 24px;
            line-height: 1.1;
        }

        .sidebar p.lead {
            margin: 0;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.55;
        }

        .panel {
            background: var(--panel);
            border: 1px solid rgba(119, 106, 88, 0.16);
            border-radius: 22px;
            padding: 18px;
            box-shadow: var(--shadow);
            margin-bottom: 16px;
        }

        .panel h2 {
            margin: 0 0 10px;
            font-size: 13px;
            text-transform: uppercase;
            color: var(--muted);
        }

        .panel-note {
            font-size: 12px;
            line-height: 1.6;
            color: var(--muted);
        }

        .sidebar-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 12px;
        }

        .sidebar-panel-title {
            margin: 0;
            font-size: 13px;
            text-transform: uppercase;
            color: var(--muted);
        }

        .sidebar-toggle {
            border: 1px solid rgba(86, 63, 35, 0.12);
            background: rgba(255,255,255,0.78);
            border-radius: 999px;
            padding: 4px 10px;
            font-size: 11px;
            color: var(--ink);
            cursor: pointer;
        }

        .sidebar-panel-body.is-collapsed {
            display: none;
        }

        .sidebar-form-grid {
            display: grid;
            gap: 10px;
        }

        .sidebar-subsection {
            display: grid;
            gap: 8px;
            margin-top: 10px;
        }

        .sidebar-subsection-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            font-size: 12px;
            color: var(--muted);
        }

        .sidebar-port-list {
            display: grid;
            gap: 8px;
        }

        /* ── Context / Output Preview ── */
        .ctx-preview-table {
            display: grid;
            gap: 2px;
            font-size: 11.5px;
        }
        .ctx-preview-row {
            display: grid;
            grid-template-columns: 10px minmax(60px, auto) minmax(50px, auto) 1fr;
            gap: 6px;
            align-items: center;
            padding: 4px 8px;
            border-radius: 8px;
            background: rgba(255,255,255,0.45);
        }
        .ctx-preview-row:hover {
            background: rgba(255,255,255,0.75);
        }
        .ctx-preview-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .ctx-preview-dot.is-array {
            border-radius: 2px;
            transform: rotate(45deg);
        }
        .ctx-preview-dot.exec-dot {
            background: var(--exec, #8b8b8b);
            border-radius: 2px;
        }
        .ctx-preview-name {
            font-weight: 600;
            color: var(--fg-primary, #3d2e1a);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .ctx-preview-type {
            color: var(--muted, #9a876e);
            font-family: var(--mono, monospace);
            font-size: 10px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .ctx-preview-binding {
            color: var(--fg-secondary, #6d5a42);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-family: var(--mono, monospace);
            font-size: 10px;
        }
        .ctx-preview-binding.unbound {
            color: var(--danger, #c0392b);
            font-style: italic;
            font-family: inherit;
        }

        .sidebar-port-row {
            display: grid;
            gap: 8px;
            padding: 10px;
            border-radius: 14px;
            background: rgba(255,255,255,0.62);
            border: 1px solid rgba(90, 68, 40, 0.12);
        }

        .sidebar-port-row-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }

        .sidebar-tree {
            display: grid;
            gap: 10px;
        }

        .sidebar-tree .context-menu-group-items {
            background: transparent;
            border-radius: 0;
            overflow: visible;
        }

        .sidebar-tree-item {
            border-radius: 16px;
            border: 1px solid rgba(90, 68, 40, 0.12);
            background: rgba(255,255,255,0.62);
            padding: 12px;
            display: grid;
            gap: 8px;
        }

        .sidebar-tree-item-head {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            align-items: flex-start;
        }

        .sidebar-tree-item-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--ink);
        }

        .sidebar-meta {
            font-size: 11px;
            color: var(--muted);
        }

        .sidebar-inline-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .sidebar-notice {
            margin-top: 10px;
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(86, 63, 35, 0.12);
            background: rgba(255,255,255,0.72);
            font-size: 12px;
            line-height: 1.5;
            color: var(--ink);
        }

        .sidebar-notice.error {
            border-color: rgba(138, 45, 33, 0.18);
            background: rgba(255, 244, 242, 0.92);
            color: #8a2d21;
        }

        .chip-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chip {
            padding: 7px 10px;
            border-radius: 999px;
            background: rgba(255,255,255,0.76);
            border: 1px solid rgba(108, 88, 58, 0.15);
            font-size: 12px;
            cursor: help;
        }

        .env-card {
            border-radius: 16px;
            border: 1px solid rgba(90, 68, 40, 0.12);
            background: rgba(255,255,255,0.62);
            padding: 12px;
            margin-bottom: 10px;
        }

        .env-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 6px;
            font-size: 13px;
            font-weight: 700;
        }

        .env-binding,
        .binding-pill,
        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border-radius: 999px;
            padding: 4px 9px;
            background: rgba(255,255,255,0.8);
            border: 1px solid rgba(86, 63, 35, 0.12);
            font-size: 11px;
            color: var(--muted);
        }

        .env-meta,
        .config-list {
            display: grid;
            gap: 6px;
            margin-top: 8px;
        }

        .env-meta-row,
        .config-item {
            font-size: 12px;
            line-height: 1.55;
            color: #4f4337;
        }

        .small-muted {
            font-size: 11px;
            color: var(--muted);
        }

        .canvas-shell {
            position: relative;
            overflow: hidden;
            height: 100%;
            background: rgba(255, 251, 244, 0.18);
            --grid-major-size: 120px;
            --grid-minor-size: 24px;
            --grid-offset-x: 0px;
            --grid-offset-y: 0px;
            background-image:
                linear-gradient(var(--grid-major) 1px, transparent 1px),
                linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
                linear-gradient(var(--grid-minor) 1px, transparent 1px),
                linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
            background-size:
                var(--grid-major-size) var(--grid-major-size),
                var(--grid-major-size) var(--grid-major-size),
                var(--grid-minor-size) var(--grid-minor-size),
                var(--grid-minor-size) var(--grid-minor-size);
            background-position:
                var(--grid-offset-x) var(--grid-offset-y),
                var(--grid-offset-x) var(--grid-offset-y),
                var(--grid-offset-x) var(--grid-offset-y),
                var(--grid-offset-x) var(--grid-offset-y);
        }

        .graph-viewport {
            position: absolute;
            left: 0;
            top: 0;
            width: 6400px;
            height: 4200px;
            transform-origin: 0 0;
        }

        .graph-viewport.is-zoomed .node {
            background: rgba(255, 251, 244, 0.97);
            backdrop-filter: none;
        }

        .crumb, .ghost-button {
            border: 1px solid rgba(92, 73, 45, 0.16);
            background: rgba(255, 251, 245, 0.86);
            backdrop-filter: blur(12px);
            border-radius: 999px;
            padding: 10px 14px;
            font-size: 13px;
            color: var(--ink);
            text-decoration: none;
            transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
        }

        .ghost-button:not(:disabled):hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 18px rgba(70, 50, 24, 0.10);
        }

        .ghost-button.save-active {
            border-color: rgba(47, 126, 145, 0.28);
            background: rgba(239, 248, 250, 0.94);
            box-shadow: 0 10px 24px rgba(47, 126, 145, 0.16);
        }

        .ghost-button.save-active[data-save-state='saving'] {
            background: linear-gradient(90deg, rgba(239, 248, 250, 0.96), rgba(224, 241, 245, 0.96), rgba(239, 248, 250, 0.96));
            background-size: 220% 100%;
            animation: saveButtonPulse 1.1s linear infinite;
        }

        .ghost-button.save-active[data-save-state='success'] {
            border-color: rgba(95, 128, 84, 0.30);
            background: rgba(243, 250, 240, 0.96);
            box-shadow: 0 10px 24px rgba(95, 128, 84, 0.14);
        }

        .ghost-button.save-active[data-save-state='error'] {
            border-color: rgba(138, 45, 33, 0.24);
            background: rgba(255, 243, 240, 0.96);
            box-shadow: 0 10px 24px rgba(138, 45, 33, 0.12);
        }

        @keyframes saveButtonPulse {
            from { background-position: 0% 50%; }
            to { background-position: 200% 50%; }
        }

        .ghost-button.danger {
            color: #8a2d21;
            border-color: rgba(138, 45, 33, 0.18);
            background: rgba(255, 244, 242, 0.92);
        }

        .ghost-button:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .inspector-sidebar {
            padding: 18px;
            overflow-y: auto;
            border-left: 1px solid rgba(110, 84, 43, 0.12);
            background: linear-gradient(180deg, rgba(255, 249, 239, 0.98), rgba(249, 241, 228, 0.94));
            box-shadow: -8px 0 32px rgba(82, 59, 31, 0.06);
        }

        .inspector-stack {
            display: grid;
            gap: 16px;
        }

        .workflow-meta-card {
            position: static;
            width: 100%;
            padding: 16px;
            border-radius: 22px;
            border: 1px solid rgba(92, 73, 45, 0.14);
            background: rgba(255, 251, 245, 0.94);
            backdrop-filter: blur(14px);
            box-shadow: var(--shadow);
        }

        .debug-status-card {
            width: 100%;
            padding: 14px;
            border-radius: 18px;
            border: 1px solid rgba(92, 73, 45, 0.14);
            background: rgba(255, 251, 245, 0.92);
            box-shadow: 0 14px 32px rgba(82, 59, 31, 0.08);
        }

        .debug-status-card[data-connection-state="connected"] {
            border-color: rgba(70, 125, 82, 0.28);
        }

        .debug-status-card[data-connection-state="connecting"],
        .debug-status-card[data-connection-state="reconnecting"] {
            border-color: rgba(175, 118, 29, 0.42);
        }

        .debug-status-card[data-connection-state="disconnected"],
        .debug-status-card[data-connection-state="error"] {
            border-color: rgba(180, 66, 48, 0.48);
        }

        .debug-status-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 10px;
        }

        .debug-status-title {
            display: grid;
            gap: 3px;
        }

        .debug-status-title strong {
            font-size: 14px;
        }

        .debug-status-title span,
        .debug-empty {
            font-size: 12px;
            color: var(--muted);
        }

        .debug-status-card[data-connection-state="connected"] .debug-status-title span {
            color: #467d52;
        }

        .debug-status-card[data-connection-state="connecting"] .debug-status-title span,
        .debug-status-card[data-connection-state="reconnecting"] .debug-status-title span {
            color: #956519;
        }

        .debug-status-card[data-connection-state="disconnected"] .debug-status-title span,
        .debug-status-card[data-connection-state="error"] .debug-status-title span {
            color: #a33c2e;
        }

        .debug-connection-notice {
            margin-bottom: 10px;
            padding: 8px 10px;
            border: 1px solid rgba(175, 118, 29, 0.28);
            border-radius: 6px;
            background: rgba(255, 244, 218, 0.82);
            color: #765014;
            font-size: 12px;
            font-weight: 700;
            line-height: 1.4;
        }

        .debug-connection-notice[hidden] {
            display: none;
        }

        .debug-status-card[data-connection-state="disconnected"] .debug-connection-notice,
        .debug-status-card[data-connection-state="error"] .debug-connection-notice {
            border-color: rgba(180, 66, 48, 0.28);
            background: rgba(255, 234, 229, 0.88);
            color: #91382c;
        }

        .debug-timeline {
            display: grid;
            gap: 8px;
            max-height: 280px;
            overflow-y: auto;
        }

        .debug-event {
            display: grid;
            gap: 5px;
            padding: 10px;
            border-radius: 12px;
            border: 1px solid rgba(92, 73, 45, 0.12);
            background: rgba(255, 255, 255, 0.68);
        }

        .debug-event-top,
        .debug-event-meta {
            display: flex;
            justify-content: space-between;
            gap: 8px;
            min-width: 0;
        }

        .debug-event-top {
            font-size: 12px;
            font-weight: 700;
        }

        .debug-event-meta,
        .debug-event-error {
            font-size: 11px;
            color: var(--muted);
        }

        .debug-event-error {
            color: #a33c2e;
        }

        .debug-event.debug-running { border-color: rgba(47, 126, 145, 0.28); }
        .debug-event.debug-success { border-color: rgba(95, 128, 84, 0.28); }
        .debug-event.debug-error { border-color: rgba(180, 66, 48, 0.34); }

        .workflow-meta-card.collapsed .workflow-meta-body,
        .workflow-meta-card.collapsed .workflow-meta-actions,
        .workflow-meta-card.collapsed .workflow-meta-hint {
            display: none;
        }

        .workflow-meta-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }

        .workflow-meta-card.collapsed .workflow-meta-header {
            margin-bottom: 0;
        }

        .workflow-meta-title {
            display: grid;
            gap: 4px;
        }

        .workflow-meta-title strong {
            font-size: 14px;
        }

        .workflow-meta-title span {
            font-size: 12px;
            color: var(--muted);
        }

        .workflow-meta-body {
            display: grid;
            gap: 14px;
        }

        .workflow-meta-overview {
            display: grid;
            gap: 10px;
            padding: 14px;
            border-radius: 18px;
            border: 1px solid rgba(92, 73, 45, 0.10);
            background: rgba(255, 255, 255, 0.72);
        }

        .workflow-meta-overview-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }

        .workflow-meta-overview-top strong {
            font-size: 15px;
            line-height: 1.2;
        }

        .workflow-title-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
            align-items: center;
        }

        .workflow-meta-badge {
            display: inline-flex;
            align-items: center;
            padding: 5px 10px;
            border-radius: 999px;
            border: 1px solid rgba(92, 73, 45, 0.12);
            background: rgba(248, 241, 229, 0.92);
            font-size: 11px;
            color: #5d4c3b;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .workflow-meta-rows {
            display: grid;
            gap: 10px;
        }

        .workflow-meta-row {
            display: grid;
            grid-template-columns: 96px minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            min-width: 0;
        }

        .workflow-row-label {
            font-size: 11px;
            text-transform: uppercase;
            color: var(--muted);
            letter-spacing: 0.04em;
            white-space: nowrap;
        }

        .workflow-row-value {
            min-width: 0;
        }

        .workflow-meta-row-switch {
            grid-template-columns: 96px auto;
            justify-content: space-between;
        }

        .workflow-meta-row-switch .workflow-checkbox {
            justify-self: end;
        }

        .workflow-trigger-channel-row {
            grid-template-columns: 1fr;
            align-items: stretch;
            gap: 6px;
        }

        .workflow-trigger-channel-row .workflow-row-label {
            white-space: normal;
        }

        .workflow-help-icon {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 1px solid rgba(92, 73, 45, 0.14);
            background: rgba(255, 255, 255, 0.82);
            color: var(--muted);
            font-size: 12px;
            line-height: 1;
            font-weight: 700;
            cursor: help;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .workflow-help-icon:hover {
            color: var(--ink);
            border-color: rgba(92, 73, 45, 0.24);
        }

        .workflow-description-popup {
            display: none;
            position: absolute;
            right: 0;
            top: calc(100% + 8px);
            width: 280px;
            max-height: 200px;
            overflow-y: auto;
            padding: 12px 14px;
            border-radius: 14px;
            border: 1px solid rgba(86, 63, 35, 0.12);
            background: rgba(255, 251, 245, 0.98);
            box-shadow: 0 18px 36px rgba(63, 41, 16, 0.14);
            font-size: 12px;
            line-height: 1.6;
            color: var(--ink);
            white-space: pre-wrap;
            word-break: break-word;
            z-index: 10;
        }

        .workflow-description-popup.is-visible {
            display: block;
        }

        .workflow-description-popup .popup-edit-link {
            display: block;
            margin-top: 8px;
            font-size: 11px;
            color: var(--muted);
            cursor: pointer;
            text-decoration: underline;
        }

        .workflow-description-popup .popup-edit-link:hover {
            color: var(--ink);
        }

        .workflow-meta-section-title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .workflow-meta-section {
            display: grid;
            gap: 12px;
            padding: 14px;
            border-radius: 18px;
            border: 1px solid rgba(92, 73, 45, 0.10);
            background: rgba(255, 255, 255, 0.72);
        }

        .workflow-meta-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .workflow-meta-section-header strong {
            font-size: 13px;
            color: var(--ink);
        }

        .workflow-meta-card.is-workflow #workflow-main-trigger-section {
            display: none;
        }

        .workflow-meta-section.is-collapsed .workflow-meta-section-body {
            display: none;
        }

        .workflow-meta-section-toggle {
            background: none;
            border: none;
            color: var(--muted);
            font-size: 13px;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            line-height: 1;
        }

        .workflow-meta-section-toggle:hover {
            color: var(--ink);
            background: rgba(92, 73, 45, 0.06);
        }

        .workflow-input-schema-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
        }

        .workflow-meta-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 0;
            flex-wrap: wrap;
        }

        .workflow-meta-hint {
            margin-top: 0;
            padding: 12px 14px;
            border-radius: 16px;
            border: 1px solid rgba(92, 73, 45, 0.10);
            background: rgba(248, 241, 229, 0.5);
            font-size: 12px;
            color: var(--muted);
            line-height: 1.6;
        }

        .workflow-field {
            display: grid;
            gap: 6px;
            min-width: 0;
        }

        .workflow-field label {
            font-size: 11px;
            text-transform: uppercase;
            color: var(--muted);
            letter-spacing: 0.04em;
        }

        .workflow-input,
        .workflow-textarea,
        .workflow-select {
            width: 100%;
            border: 1px solid rgba(92, 73, 45, 0.14);
            background: rgba(255, 255, 255, 0.82);
            border-radius: 14px;
            padding: 10px 12px;
            font-size: 13px;
            color: var(--ink);
            outline: none;
        }

        .workflow-textarea {
            min-height: 76px;
            resize: vertical;
            font-family: inherit;
            line-height: 1.5;
        }

        .workflow-textarea.auto-resize {
            resize: none;
            overflow: hidden;
            field-sizing: content;
        }

        .workflow-input:disabled,
        .workflow-textarea:disabled,
        .workflow-select:disabled {
            background: rgba(240, 234, 225, 0.88);
            color: var(--muted);
            cursor: not-allowed;
        }

        .workflow-input[readonly] {
            border-color: transparent;
            background: transparent;
            padding-left: 0;
            padding-right: 0;
            color: var(--ink);
            cursor: default;
        }

        .workflow-trigger-channel-select {
            min-height: 150px;
            padding: 6px;
            background: rgba(255, 255, 255, 0.92);
            color: var(--ink);
            overflow-x: auto;
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
        }

        .workflow-trigger-channel-select option {
            padding: 7px 8px;
            border-radius: 8px;
            background: #fffaf2;
            color: var(--ink);
            white-space: nowrap;
        }

        .workflow-trigger-channel-select option:checked {
            background: var(--accent-soft);
            color: var(--ink);
        }

        .workflow-trigger-channel-select:disabled option {
            background: rgba(240, 234, 225, 0.88);
            color: var(--muted);
        }

        .workflow-checkbox {
            width: 18px;
            height: 18px;
            accent-color: rgba(212, 92, 44, 0.82);
            cursor: pointer;
            flex-shrink: 0;
        }

        .workflow-field-toggle {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .workflow-meta-card.is-main-graph #workflow-kind-badge {
            background: rgba(236, 247, 255, 0.95);
            border-color: rgba(64, 116, 158, 0.2);
            color: #345f84;
        }

        .workflow-meta-card.is-workflow #workflow-kind-badge {
            background: rgba(247, 243, 232, 0.95);
            border-color: rgba(126, 98, 59, 0.2);
            color: #735634;
        }

        .canvas-empty-state {
            position: absolute;
            inset: 20px;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2;
            pointer-events: none;
        }

        .canvas-empty-state.visible {
            display: flex;
        }

        .canvas-empty-card {
            max-width: 420px;
            padding: 22px 24px;
            border-radius: 26px;
            border: 1px solid rgba(92, 73, 45, 0.14);
            background: rgba(255, 251, 245, 0.92);
            box-shadow: var(--shadow);
            text-align: center;
        }

        .canvas-empty-card strong {
            display: block;
            margin-bottom: 8px;
            font-size: 18px;
        }

        .canvas-empty-card p {
            margin: 0;
            font-size: 13px;
            line-height: 1.6;
            color: var(--muted);
        }

        .dialog-backdrop {
            position: fixed;
            inset: 0;
            z-index: 10;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(37, 26, 13, 0.22);
            backdrop-filter: blur(6px);
        }

        .dialog-backdrop.open {
            display: flex;
        }

        .dialog-card {
            width: min(560px, calc(100% - 32px));
            max-height: calc(100vh - 48px);
            border-radius: 26px;
            background: rgba(255, 250, 242, 0.98);
            border: 1px solid rgba(92, 73, 45, 0.14);
            box-shadow: 0 28px 80px rgba(63, 41, 16, 0.22);
            padding: 22px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .dialog-card h3 {
            margin: 0 0 8px;
            font-size: 22px;
            flex-shrink: 0;
        }

        .dialog-card p {
            margin: 0 0 16px;
            font-size: 13px;
            line-height: 1.6;
            color: var(--muted);
            flex-shrink: 0;
        }

        .dialog-card > div:not(.dialog-actions) {
            overflow-y: auto;
            flex: 1 1 auto;
            min-height: 0;
            scrollbar-width: thin;
            scrollbar-color: rgba(212, 92, 44, 0.48) rgba(119, 106, 88, 0.12);
        }

        .dialog-card > .dialog-actions {
            flex-shrink: 0;
        }

        .dialog-grid {
            display: grid;
            gap: 12px;
        }

        .dialog-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 18px;
            flex-wrap: wrap;
        }

        .dialog-inline-note {
            font-size: 12px;
            color: var(--muted);
            line-height: 1.5;
        }

        .flow-canvas {
            position: absolute;
            left: 0;
            top: 0;
            width: 6400px;
            height: 4200px;
            background: transparent;
            cursor: grab;
        }

        .agent-office-view {
            --office-wall: #dce7df;
            --office-floor: #d3b98f;
            --office-ink: #20302c;
            --office-muted: #64736c;
            --office-teal: #277b78;
            --office-coral: #cf6247;
            --office-green: #4f8458;
            --office-red: #b24a44;
            position: absolute;
            inset: 0;
            z-index: 4;
            display: flex;
            min-width: 0;
            min-height: 0;
            flex-direction: column;
            overflow: hidden;
            color: var(--office-ink);
            background: #edf1ed;
        }

        .agent-office-view[hidden] {
            display: none;
        }

        .agent-office-header {
            min-height: 64px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 10px 16px;
            border-bottom: 1px solid rgba(32, 48, 44, 0.14);
            background: rgba(248, 250, 247, 0.96);
        }

        .agent-office-floor-title {
            min-width: 0;
            display: grid;
            grid-template-columns: auto minmax(0, auto) auto;
            align-items: baseline;
            gap: 6px 10px;
        }

        .agent-office-floor-title strong {
            max-width: 340px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 15px;
            font-weight: 600;
        }

        .agent-office-kicker,
        .agent-office-floor-title > span:last-child {
            color: var(--office-muted);
            font-size: 11px;
            letter-spacing: 0;
        }

        .agent-office-status-summary {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            min-height: 24px;
            color: var(--office-muted);
            font-size: 12px;
        }

        .agent-office-summary-item {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
        }

        .agent-office-summary-dot,
        .agent-office-status-dot {
            width: 8px;
            height: 8px;
            flex: 0 0 auto;
            border-radius: 50%;
            background: #819089;
        }

        .agent-office-summary-dot.is-running,
        .agent-office-status-dot.is-running { background: var(--office-teal); }
        .agent-office-summary-dot.is-success,
        .agent-office-status-dot.is-success { background: var(--office-green); }
        .agent-office-summary-dot.is-error,
        .agent-office-status-dot.is-error { background: var(--office-red); }

        .agent-office-layout {
            min-width: 0;
            min-height: 0;
            flex: 1 1 auto;
            display: grid;
            grid-template-columns: minmax(0, 1fr);
        }

        .agent-office-layout.has-inspector {
            grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
        }

        .agent-office-wall {
            position: absolute;
            z-index: 1;
            inset: 18px 22px auto;
            height: 78px;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            pointer-events: none;
        }

        .agent-office-window {
            width: 126px;
            height: 64px;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 3px;
            padding: 6px;
            border: 6px solid #48635f;
            background: #b9d9df;
            box-shadow: inset 0 -13px 0 rgba(73, 129, 116, 0.18);
        }

        .agent-office-window span {
            border-right: 2px solid rgba(72, 99, 95, 0.65);
        }

        .agent-office-window span:last-child { border-right: 0; }

        .agent-office-clock {
            position: absolute;
            left: 50%;
            width: 54px;
            height: 54px;
            border: 5px solid #735a45;
            border-radius: 50%;
            background: #fffdf6;
            transform: translateX(-50%);
        }

        .agent-office-clock::before,
        .agent-office-clock::after {
            content: '';
            position: absolute;
            left: 23px;
            top: 12px;
            width: 2px;
            height: 14px;
            background: #735a45;
            transform-origin: bottom;
        }

        .agent-office-clock::after {
            transform: rotate(120deg);
        }

        .agent-office-plant {
            position: relative;
            width: 64px;
            height: 72px;
            align-self: flex-end;
            border-bottom: 26px solid #ad6250;
            border-left: 9px solid transparent;
            border-right: 9px solid transparent;
        }

        .agent-office-plant span {
            position: absolute;
            left: 22px;
            bottom: 19px;
            width: 18px;
            height: 38px;
            border-radius: 60% 10% 60% 20%;
            background: #4f8458;
            transform: rotate(-28deg);
            transform-origin: bottom;
        }

        .agent-office-plant span:nth-child(2) {
            left: 26px;
            height: 44px;
            transform: rotate(9deg);
        }

        .agent-office-plant span:nth-child(3) {
            left: 28px;
            height: 34px;
            transform: rotate(35deg);
        }

        .agent-office-workstations {
            position: relative;
            z-index: 2;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
            align-items: stretch;
            gap: 16px;
            max-width: 1180px;
            margin: 0 auto;
        }

        .agent-office-workstation {
            position: relative;
            width: 100%;
            min-width: 0;
            min-height: 224px;
            display: grid;
            grid-template-rows: 158px auto;
            padding: 8px 10px 10px;
            overflow: visible;
            border: 1px solid rgba(44, 62, 56, 0.2);
            border-radius: 8px;
            background: rgba(250, 251, 247, 0.9);
            color: var(--office-ink);
            text-align: left;
            box-shadow: 0 7px 16px rgba(48, 57, 43, 0.1);
            cursor: pointer;
        }

        .agent-office-workstation:hover {
            border-color: rgba(39, 123, 120, 0.55);
            transform: translateY(-1px);
        }

        .agent-office-workstation.is-selected {
            outline: 3px solid rgba(39, 123, 120, 0.26);
            border-color: var(--office-teal);
        }

        .agent-office-workstation.is-running {
            border-color: rgba(39, 123, 120, 0.7);
        }

        .agent-office-workstation.is-success {
            border-color: rgba(79, 132, 88, 0.62);
        }

        .agent-office-workstation.is-error {
            border-color: rgba(178, 74, 68, 0.72);
        }

        .agent-office-avatar {
            width: 100%;
            height: 158px;
            display: block;
            overflow: visible;
        }

        .agent-office-screen-glow {
            opacity: 0.28;
        }

        .agent-office-workstation.is-running .agent-office-screen-glow {
            opacity: 0.76;
        }

        .agent-office-workstation.is-running .agent-office-hand-left {
            animation: agentOfficeTypeLeft 0.34s ease-in-out infinite alternate;
            transform-origin: 67px 98px;
        }

        .agent-office-workstation.is-running .agent-office-hand-right {
            animation: agentOfficeTypeRight 0.28s ease-in-out infinite alternate;
            transform-origin: 91px 98px;
        }

        .agent-office-workstation.is-running .agent-office-screen-line {
            animation: agentOfficeScreenPulse 0.85s ease-in-out infinite alternate;
        }

        .agent-office-workstation.is-idle .agent-office-eye {
            animation: agentOfficeBlink 5s linear infinite;
            transform-origin: center;
        }

        .agent-office-bubble {
            position: absolute;
            z-index: 4;
            top: -12px;
            right: 10px;
            min-width: 36px;
            min-height: 30px;
            display: grid;
            place-items: center;
            padding: 4px 9px;
            border: 1px solid rgba(32, 48, 44, 0.18);
            border-radius: 8px;
            background: #fffef9;
            color: var(--office-teal);
            font-size: 16px;
            box-shadow: 0 5px 12px rgba(37, 48, 42, 0.14);
        }

        .agent-office-workstation.is-running .agent-office-bubble {
            animation: agentOfficeBubble 0.8s ease-in-out infinite alternate;
        }

        .agent-office-workstation.is-success .agent-office-bubble { color: var(--office-green); }
        .agent-office-workstation.is-error .agent-office-bubble { color: var(--office-red); }

        .agent-office-workstation-copy {
            min-width: 0;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: end;
            gap: 5px 8px;
        }

        .agent-office-workstation-copy strong {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 13px;
            font-weight: 600;
        }

        .agent-office-workstation-copy small {
            grid-column: 1 / -1;
            overflow: hidden;
            color: var(--office-muted);
            font-size: 11px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .agent-office-status-label {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: var(--office-muted);
            font-size: 11px;
            white-space: nowrap;
        }

        .agent-office-empty {
            position: relative;
            z-index: 2;
            min-height: 220px;
            display: grid;
            place-items: center;
            max-width: 540px;
            margin: 0 auto;
            color: var(--office-muted);
            text-align: center;
        }

        .agent-office-zone-labels,
        .agent-office-utilities {
            position: relative;
            z-index: 2;
            max-width: 1180px;
            margin: 18px auto 0;
        }

        .agent-office-zone-labels {
            display: flex;
            align-items: flex-end;
            gap: 14px;
            flex-wrap: wrap;
        }

        .agent-office-door {
            width: 104px;
            min-height: 116px;
            display: grid;
            align-content: end;
            gap: 8px;
            padding: 10px 8px;
            border: 0;
            border-radius: 6px 6px 0 0;
            background: #53706a;
            color: #fffef8;
            cursor: pointer;
            box-shadow: inset -8px 0 rgba(27, 50, 45, 0.18);
        }

        .agent-office-door::before {
            content: '';
            justify-self: end;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #e7c25b;
        }

        .agent-office-door span {
            overflow: hidden;
            font-size: 11px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .agent-office-utilities {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            padding-top: 14px;
            border-top: 1px solid rgba(54, 65, 51, 0.18);
        }

        .agent-office-utility {
            min-width: 92px;
            display: grid;
            grid-template-columns: 26px minmax(0, 1fr);
            align-items: center;
            gap: 7px;
            color: #34443f;
            font-size: 11px;
        }

        .agent-office-utility-icon {
            width: 26px;
            height: 26px;
            display: grid;
            place-items: center;
            border-radius: 5px;
            background: #eef2ed;
            border: 1px solid rgba(52, 68, 63, 0.18);
            font-size: 14px;
        }

        .agent-office-utility span:last-child {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .agent-office-inspector {
            min-width: 0;
            overflow-y: auto;
            padding: 16px;
            border-left: 1px solid rgba(32, 48, 44, 0.16);
            background: #f8faf7;
        }

        .agent-office-inspector-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 14px;
        }

        .agent-office-inspector-title {
            min-width: 0;
            display: grid;
            gap: 4px;
        }

        .agent-office-inspector-title strong {
            overflow-wrap: anywhere;
            font-size: 15px;
            font-weight: 600;
        }

        .agent-office-inspector-title span {
            color: var(--office-muted);
            font-size: 11px;
        }

        .agent-office-icon-button {
            width: 32px;
            height: 32px;
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            border: 1px solid rgba(32, 48, 44, 0.18);
            border-radius: 6px;
            background: transparent;
            color: var(--office-ink);
            font-size: 18px;
            cursor: pointer;
        }

        .agent-office-inspector-section {
            display: grid;
            gap: 9px;
            padding: 14px 0;
            border-top: 1px solid rgba(32, 48, 44, 0.13);
        }

        .agent-office-inspector-section h3 {
            margin: 0;
            font-size: 12px;
            font-weight: 600;
        }

        .agent-office-inspector-grid {
            display: grid;
            grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
            gap: 7px 10px;
            margin: 0;
            font-size: 11px;
        }

        .agent-office-inspector-grid dt { color: var(--office-muted); }
        .agent-office-inspector-grid dd {
            min-width: 0;
            margin: 0;
            overflow-wrap: anywhere;
        }

        .agent-office-context-list {
            display: grid;
            gap: 8px;
        }

        .agent-office-context-row {
            display: grid;
            gap: 4px;
            padding: 8px;
            border-radius: 6px;
            background: #eef2ed;
        }

        .agent-office-context-row strong {
            font-size: 11px;
            font-weight: 600;
        }

        .agent-office-context-row code {
            overflow-wrap: anywhere;
            color: #3f5e59;
            font-size: 11px;
            white-space: pre-wrap;
        }

        .agent-office-inspector-action {
            width: 100%;
            min-height: 34px;
            border: 1px solid rgba(39, 123, 120, 0.4);
            border-radius: 6px;
            background: #e3efec;
            color: #225d5a;
            font: inherit;
            font-size: 12px;
            cursor: pointer;
        }

        @keyframes agentOfficeTypeLeft {
            from { transform: rotate(-5deg) translateY(0); }
            to { transform: rotate(4deg) translateY(2px); }
        }

        @keyframes agentOfficeTypeRight {
            from { transform: rotate(4deg) translateY(1px); }
            to { transform: rotate(-5deg) translateY(0); }
        }

        @keyframes agentOfficeScreenPulse {
            from { opacity: 0.38; }
            to { opacity: 1; }
        }

        @keyframes agentOfficeBubble {
            from { transform: translateY(0); }
            to { transform: translateY(-3px); }
        }

        @keyframes agentOfficeBlink {
            0%, 46%, 50%, 100% { transform: scaleY(1); }
            48% { transform: scaleY(0.08); }
        }

        svg.connections {
            position: absolute;
            left: 0;
            top: 0;
            width: 6400px;
            height: 4200px;
            pointer-events: auto;
            overflow: visible;
            z-index: 1;
        }

        .connection {
            fill: none;
            stroke-width: 4;
            stroke-linecap: round;
            stroke-linejoin: round;
            pointer-events: none;
        }

        .connection.data {
            stroke: rgba(47, 126, 145, 0.62);
            stroke-dasharray: 8 10;
        }

        .connection.exec {
            stroke: rgba(212, 92, 44, 0.72);
        }

        .connection.hit-area {
            stroke: rgba(0, 0, 0, 0.001);
            stroke-width: 18;
            cursor: pointer;
            pointer-events: stroke;
        }

        .node {
            position: absolute;
            width: 360px;
            min-height: 120px;
            border-radius: 20px;
            background: rgba(255, 251, 244, 0.94);
            border: 1px solid rgba(86, 63, 35, 0.16);
            box-shadow: var(--shadow);
            backdrop-filter: blur(12px);
            text-rendering: geometricPrecision;
            -webkit-font-smoothing: antialiased;
            user-select: none;
            z-index: 2;
            transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
            overflow: visible;
        }

        .node.is-workflow-node {
            border-color: rgba(184, 139, 45, 0.62);
            box-shadow: 0 0 0 2px rgba(184, 139, 45, 0.14), var(--shadow);
        }

        .node.is-data-only-node {
            border-color: rgba(47, 126, 145, 0.50);
        }

        .node::before,
        .node::after {
            content: "";
            position: absolute;
            inset: -18px;
            border-radius: 30px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.16s ease, transform 0.16s ease;
        }

        .node::before {
            z-index: -2;
            filter: blur(18px);
        }

        .node::after {
            z-index: -1;
            inset: -7px;
            border-radius: 25px;
            filter: blur(2px);
        }

        .node.selected {
            border-color: rgba(212, 92, 44, 0.56);
            box-shadow: 0 0 0 2px rgba(212, 92, 44, 0.24), var(--shadow);
        }

        .node.debug-running {
            border-color: rgba(47, 126, 145, 0.96);
            box-shadow: 0 26px 72px rgba(33, 91, 105, 0.20), var(--shadow);
            animation: node-debug-running-pulse 1.15s ease-in-out infinite;
        }

        .node.debug-running::before {
            opacity: 0.96;
            background:
                radial-gradient(ellipse at center, rgba(79, 210, 235, 0.58), rgba(47, 126, 145, 0.28) 48%, transparent 74%);
            animation: node-debug-glow-pulse 1.15s ease-in-out infinite;
        }

        .node.debug-running::after {
            opacity: 0.98;
            background: linear-gradient(135deg, rgba(106, 225, 246, 0.72), rgba(47, 126, 145, 0.16));
            box-shadow: 0 0 22px rgba(79, 210, 235, 0.64), inset 0 0 0 1px rgba(209, 249, 255, 0.70);
        }

        .node.debug-success {
            border-color: rgba(95, 128, 84, 0.86);
            box-shadow: 0 24px 66px rgba(69, 105, 58, 0.18), var(--shadow);
        }

        .node.debug-success::before {
            opacity: 0.72;
            background:
                radial-gradient(ellipse at center, rgba(157, 209, 117, 0.42), rgba(95, 128, 84, 0.22) 48%, transparent 76%);
        }

        .node.debug-success::after {
            opacity: 0.80;
            background: linear-gradient(135deg, rgba(172, 218, 137, 0.52), rgba(95, 128, 84, 0.12));
            box-shadow: 0 0 18px rgba(139, 191, 103, 0.42), inset 0 0 0 1px rgba(228, 249, 212, 0.56);
        }

        .node.debug-error {
            border-color: rgba(180, 66, 48, 0.96);
            box-shadow: 0 26px 72px rgba(128, 43, 31, 0.22), var(--shadow);
        }

        .node.debug-error::before {
            opacity: 0.92;
            background:
                radial-gradient(ellipse at center, rgba(255, 111, 77, 0.52), rgba(180, 66, 48, 0.26) 48%, transparent 76%);
        }

        .node.debug-error::after {
            opacity: 0.94;
            background: linear-gradient(135deg, rgba(255, 133, 96, 0.60), rgba(180, 66, 48, 0.16));
            box-shadow: 0 0 20px rgba(255, 108, 74, 0.54), inset 0 0 0 1px rgba(255, 226, 215, 0.64);
        }

        @keyframes node-debug-running-pulse {
            0%, 100% {
                transform: translateZ(0) scale(1);
            }
            50% {
                transform: translateZ(0) scale(1.006);
            }
        }

        @keyframes node-debug-glow-pulse {
            0%, 100% {
                transform: scale(0.98);
                opacity: 0.72;
            }
            50% {
                transform: scale(1.08);
                opacity: 1;
            }
        }

        .node-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 16px 12px;
            border-bottom: 1px solid rgba(86, 63, 35, 0.1);
            border-radius: 19px 19px 0 0;
            gap: 10px;
        }

        .node-special-marker {
            display: inline-flex;
            align-items: center;
            flex: 0 0 auto;
            padding: 3px 7px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.04em;
            writing-mode: vertical-rl;
            line-height: 1;
        }

        .node-workflow-marker {
            color: #765816;
            background: rgba(184, 139, 45, 0.18);
            border: 1px solid rgba(184, 139, 45, 0.38);
        }

        .node-data-marker {
            color: #245e6d;
            background: rgba(47, 126, 145, 0.14);
            border: 1px solid rgba(47, 126, 145, 0.30);
        }

        .node.is-agent-node .node-header { background: var(--node-agent-header, #F3DDD4); }
        .node.is-workflow-node .node-header { background: var(--node-workflow-header, #ECE3C8); }
        .node.is-data-only-node .node-header { background: var(--node-data-header, #D8E8E6); }

        .node.variable_get,
        .node.variable_set {
            width: 220px;
            min-height: 72px;
            border-radius: 16px;
        }

        .node.variable_get .node-header,
        .node.variable_set .node-header {
            padding: 10px 12px;
            border-radius: 15px 15px 0 0;
        }

        .node.variable_get .node-body,
        .node.variable_set .node-body {
            padding: 8px 10px 10px;
            gap: 8px;
            overflow: visible;
        }

        .node.variable_get .node-title,
        .node.variable_set .node-title {
            font-size: 16px;
        }

        .mini-node-caption {
            font-size: 11px;
            color: var(--muted);
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .mini-node-ports {
            display: grid;
            gap: 6px;
        }

        .node-footer-ports {
            display: grid;
            gap: 6px;
            padding: 4px 14px 12px;
            border-top: 1px solid rgba(86, 63, 35, 0.08);
            background: rgba(255, 251, 244, 0.78);
            border-radius: 0 0 20px 20px;
        }

        .node-kicker {
            font-size: 11px;
            text-transform: uppercase;
            color: var(--muted);
        }

        .node-title {
            margin: 0;
            font-size: 18px;
            font-weight: bold;
        }

        .node-model {
            font-size: 11px;
            padding: 4px 8px;
            border-radius: 999px;
            background: rgba(255,255,255,0.72);
            border: 1px solid rgba(86, 63, 35, 0.12);
        }

        .node-body {
            padding: 12px 14px;
            display: grid;
            gap: 12px;
            overflow: visible;
        }

        .node-subgrid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 0 4px;
            align-items: start;
        }

        .node-subgrid > :only-child {
            grid-column: 1 / -1;
        }

        .port-column-in,
        .port-column-out {
            min-width: 0;
        }

        .port-column-in {
            margin-left: -14px;
        }

        .port-column-out {
            margin-right: -14px;
        }

        .region {
            border-radius: 14px;
            border: 1px solid rgba(90, 68, 40, 0.12);
            background: rgba(255,255,255,0.6);
            padding: 10px;
            min-width: 0;
        }

        .port-block-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 8px;
            font-size: 11px;
            text-transform: uppercase;
            color: var(--muted);
        }

        .port-list {
            display: grid;
            gap: 10px;
            min-width: 0;
        }

        .port-row {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            line-height: 1.4;
            color: var(--ink);
            min-width: 0;
            min-height: 28px;
        }

        .justify-end { justify-content: flex-end; }
        .text-right { text-align: right; }

        .port-side {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1 1 auto;
            min-width: 0;
            max-width: 100%;
            position: relative;
        }

        .port-hit-area {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: nowrap;
            flex: 1 1 auto;
            min-width: 0;
            max-width: 100%;
            padding: 6px 8px;
            margin: -4px 0;
            border-radius: 12px;
            cursor: crosshair;
            transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
            position: relative;
        }

        .port-hit-area:hover {
            background: rgba(86, 63, 35, 0.08);
        }

        .port-hit-area.is-drag-source {
            background: rgba(184, 139, 45, 0.12);
            box-shadow: inset 0 0 0 1px rgba(184, 139, 45, 0.22);
            cursor: grabbing;
        }

        .port-hit-area.is-valid-target {
            background: rgba(95, 128, 84, 0.14);
            box-shadow: inset 0 0 0 1px rgba(95, 128, 84, 0.28), 0 0 0 3px rgba(95, 128, 84, 0.12);
            cursor: copy;
        }

        .port-hit-area.is-invalid-target {
            background: rgba(212, 92, 44, 0.12);
            box-shadow: inset 0 0 0 1px rgba(212, 92, 44, 0.24);
            cursor: not-allowed;
        }

        .binding-pill,
        .prompt-desc,
        .env-binding,
        .env-meta-row,
        .config-item,
        .panel-note,
        .chip {
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .port-side .port-label {
            flex: 0 1 auto;
            min-width: 0;
            line-height: 1.35;
            white-space: normal;
            word-break: break-word;
            overflow-wrap: anywhere;
            overflow: visible;
            text-overflow: clip;
            position: relative;
            z-index: 11;
        }

        .port-row:not(.justify-end) .port-hit-area {
            justify-content: flex-start;
        }

        .port-row:not(.justify-end) .port-label {
            text-align: left;
        }

        .port-row.justify-end .port-label {
            text-align: right;
        }

        .port-row.justify-end .port-side {
            justify-content: flex-end;
        }

        .port-row.justify-end .port-hit-area {
            flex: 0 0 auto;
            justify-content: flex-end;
        }

        .port-dot {
            width: 14px;
            height: 14px;
            flex: 0 0 auto;
            border-radius: 999px;
            border: 2px solid rgba(255,255,255,0.92);
            box-shadow: 0 0 0 1px rgba(80, 58, 31, 0.14);
        }

        .port-dot.exec { background: var(--accent); }
        .port-dot.data { background: var(--sky); }

        .port-dot.is-array {
            border-radius: 3px;
            transform: rotate(45deg);
        }
        .port-dot.is-array.is-connected {
            transform: rotate(45deg) scale(1.12);
        }
        .port-interactive.is-array:hover,
        .port-hit-area:hover .port-interactive.is-array,
        .port-hit-area.is-valid-target .port-interactive.is-array,
        .port-hit-area.is-invalid-target .port-interactive.is-array,
        .port-hit-area.is-drag-source .port-interactive.is-array { transform: rotate(45deg) scale(1.4); }
        .port-dot.is-array.is-drag-source { transform: rotate(45deg) scale(1.22); }

        .port-dot.is-connected {
            box-shadow: 0 0 0 1px rgba(80, 58, 31, 0.14), 0 0 0 6px rgba(212, 92, 44, 0.10), 0 0 12px rgba(212, 92, 44, 0.34);
            transform: scale(1.12);
        }

        .port-dot.data.is-connected {
            box-shadow: 0 0 0 1px rgba(80, 58, 31, 0.14), 0 0 0 6px rgba(47, 126, 145, 0.12), 0 0 12px rgba(47, 126, 145, 0.36);
        }

        .port-dot.is-idle {
            opacity: 0.76;
        }

        .port-interactive {
            cursor: crosshair;
            transition: transform 0.2s;
            position: relative;
            z-index: 10;
        }

        .port-interactive:hover,
        .port-hit-area:hover .port-interactive,
        .port-hit-area.is-valid-target .port-interactive,
        .port-hit-area.is-invalid-target .port-interactive,
        .port-hit-area.is-drag-source .port-interactive { transform: scale(1.4); }

        .port-dot.is-valid-target {
            box-shadow: 0 0 0 1px rgba(80, 58, 31, 0.18), 0 0 0 7px rgba(95, 128, 84, 0.16), 0 0 14px rgba(95, 128, 84, 0.32);
        }

        .port-dot.is-invalid-target {
            box-shadow: 0 0 0 1px rgba(80, 58, 31, 0.18), 0 0 0 7px rgba(212, 92, 44, 0.14), 0 0 14px rgba(212, 92, 44, 0.26);
            opacity: 0.88;
        }

        .port-dot.is-drag-source {
            box-shadow: 0 0 0 1px rgba(80, 58, 31, 0.18), 0 0 0 8px rgba(184, 139, 45, 0.14), 0 0 14px rgba(184, 139, 45, 0.28);
            transform: scale(1.22);
        }

        .port-binding {
            margin-left: 24px;
            margin-top: 2px;
            margin-bottom: 2px;
            max-width: 100%;
        }

        .prompt-desc {
            font-size: 12px;
            line-height: 1.5;
            color: #473a2e;
            max-height: none;
            overflow: visible;
            white-space: pre-wrap;
        }

        .agent-inline-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }

        .json-node-editor {
            display: grid;
            gap: 8px;
        }

        .json-node-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }

        .json-node-hint {
            font-size: 11px;
            color: var(--muted);
        }

        .json-scalar-input,
        .json-inline-input,
        .json-inline-select {
            width: 100%;
            min-width: 0;
            border: 1px solid rgba(86, 63, 35, 0.14);
            background: rgba(255,255,255,0.88);
            border-radius: 10px;
            padding: 7px 9px;
            font-size: 12px;
            color: var(--ink);
        }

        textarea.json-scalar-input {
            line-height: 1.5;
            resize: vertical;
            white-space: pre-wrap;
            overflow: visible;
        }

        .json-string-input {
            min-height: 96px;
            max-height: none;
        }

        .node.json_string .node-body {
            max-height: none;
            overflow: visible;
        }

        .node.task_pool_config {
            width: 380px;
        }

        .task-pool-config-body {
            gap: 0;
        }

        .task-pool-config-form {
            display: grid;
            gap: 12px;
        }

        .task-pool-config-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
            gap: 10px;
        }

        .task-pool-config-field {
            display: grid;
            gap: 6px;
            min-width: 0;
        }

        .task-pool-config-field > span,
        .task-pool-config-toggle > span {
            font-size: 11px;
            color: var(--muted);
        }

        .task-pool-config-field small {
            font-size: 10px;
            font-weight: 400;
            color: rgba(86, 63, 35, 0.46);
        }

        .task-pool-config-field .workflow-input,
        .task-pool-config-field .workflow-select {
            min-height: 38px;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 12px;
        }

        .task-pool-config-workflow .workflow-select {
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .task-pool-config-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-height: 36px;
            padding-top: 2px;
            border-top: 1px solid rgba(86, 63, 35, 0.08);
        }

        .json-inline-select {
            width: auto;
            min-width: 82px;
            padding-right: 26px;
        }

        .json-inline-input.key {
            max-width: 120px;
        }

        .json-scalar-input:focus,
        .json-inline-input:focus,
        .json-inline-select:focus {
            outline: none;
            border-color: rgba(47, 126, 145, 0.48);
            box-shadow: 0 0 0 3px rgba(47, 126, 145, 0.12);
        }

        .json-list {
            display: grid;
            gap: 7px;
        }

        .json-list-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 6px;
            padding: 8px;
            border-radius: 12px;
            background: rgba(255,255,255,0.62);
            border: 1px solid rgba(86, 63, 35, 0.08);
        }

        .json-list-row.is-drag-target {
            border-color: rgba(47, 126, 145, 0.42);
            box-shadow: 0 0 0 3px rgba(47, 126, 145, 0.12);
            background: rgba(240, 248, 249, 0.92);
        }

        .json-list-row-head,
        .json-list-row-body {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .json-row-handle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 26px;
            height: 26px;
            border-radius: 8px;
            border: 1px solid rgba(86, 63, 35, 0.10);
            background: rgba(255,255,255,0.82);
            color: var(--muted);
            cursor: grab;
            font-size: 14px;
            line-height: 1;
            user-select: none;
        }

        .json-row-handle:active {
            cursor: grabbing;
        }

        .json-list-row-index {
            min-width: 22px;
            font-size: 11px;
            color: var(--muted);
            text-align: center;
        }

        .json-null-pill {
            display: inline-flex;
            align-items: center;
            min-height: 32px;
            padding: 0 10px;
            border-radius: 999px;
            background: rgba(86, 63, 35, 0.08);
            color: var(--muted);
            font-size: 11px;
            white-space: nowrap;
        }

        .json-empty-state {
            padding: 10px 12px;
            border-radius: 12px;
            background: rgba(255,255,255,0.54);
            border: 1px dashed rgba(86, 63, 35, 0.16);
            color: var(--muted);
            font-size: 12px;
        }

        .agent-inline-button,
        .node-port-remove {
            border: 1px solid rgba(86, 63, 35, 0.12);
            background: rgba(255,255,255,0.78);
            border-radius: 999px;
            padding: 5px 9px;
            font-size: 11px;
            color: var(--ink);
            cursor: pointer;
        }

        .node-port-remove {
            padding: 2px 7px;
            line-height: 1;
            flex: 0 0 auto;
            align-self: center;
        }

        .agent-inline-button:hover,
        .node-port-remove:hover {
            background: rgba(212, 92, 44, 0.08);
        }

        .floating-hint {
            position: absolute;
            right: 22px;
            bottom: 22px;
            z-index: 3;
            max-width: 360px;
            padding: 14px 16px;
            border-radius: 18px;
            background: rgba(255, 251, 244, 0.86);
            border: 1px solid rgba(86, 63, 35, 0.14);
            box-shadow: 0 18px 36px rgba(55, 39, 19, 0.12);
            font-size: 13px;
            line-height: 1.6;
            color: var(--muted);
        }

        .selection-box {
            position: absolute;
            z-index: 11;
            border: 1px dashed rgba(212, 92, 44, 0.78);
            background: rgba(212, 92, 44, 0.10);
            pointer-events: none;
        }

        .waypoint-layer {
            position: absolute;
            left: 0;
            top: 0;
            width: 6400px;
            height: 4200px;
            z-index: 2;
            pointer-events: none;
        }

        .waypoint-handle {
            position: absolute;
            width: 12px;
            height: 12px;
            margin-left: -6px;
            margin-top: -6px;
            border-radius: 999px;
            background: #fff7ed;
            border: 2px solid var(--accent);
            box-shadow: 0 0 0 4px rgba(212, 92, 44, 0.12);
            cursor: move;
            pointer-events: auto;
        }

        .waypoint-handle.selected {
            background: var(--accent);
            border-color: #fff7ed;
            box-shadow: 0 0 0 5px rgba(212, 92, 44, 0.22);
        }

        .origin-marker {
            position: absolute;
            left: 0;
            top: 0;
            width: 0;
            height: 0;
            z-index: 3;
            pointer-events: none;
        }

        .origin-marker::before,
        .origin-marker::after {
            content: '';
            position: absolute;
            background: rgba(212, 92, 44, 0.72);
        }

        .origin-marker::before {
            left: -26px;
            top: -1px;
            width: 52px;
            height: 2px;
        }

        .origin-marker::after {
            left: -1px;
            top: -26px;
            width: 2px;
            height: 52px;
        }

        .origin-badge {
            position: absolute;
            left: 10px;
            top: 8px;
            padding: 4px 8px;
            border-radius: 999px;
            background: rgba(255, 251, 245, 0.92);
            border: 1px solid rgba(212, 92, 44, 0.28);
            color: var(--accent);
            font-size: 11px;
            font-weight: 700;
            white-space: nowrap;
        }

        .context-menu {
            position: absolute;
            z-index: 12;
            width: min(420px, calc(100vw - 40px));
            max-height: min(70vh, 720px);
            display: none;
            background: rgba(255, 251, 244, 0.98);
            border: 1px solid rgba(86, 63, 35, 0.16);
            border-radius: 18px;
            box-shadow: 0 26px 50px rgba(55, 39, 19, 0.18);
            overflow: hidden;
            pointer-events: auto;
        }

        .context-menu header {
            padding: 10px 12px;
            background: rgba(255,255,255,0.64);
            border-bottom: 1px solid rgba(86, 63, 35, 0.08);
            font-size: 11px;
            text-transform: uppercase;
            color: var(--muted);
        }

        .context-menu-search {
            padding: 10px 12px 12px;
            background: rgba(255,255,255,0.78);
            border-bottom: 1px solid rgba(86, 63, 35, 0.08);
        }

        .context-menu-search input {
            width: 100%;
            border: 1px solid rgba(86, 63, 35, 0.16);
            border-radius: 10px;
            background: rgba(255, 251, 244, 0.98);
            color: var(--ink);
            padding: 8px 10px;
            font-size: 12px;
            outline: none;
        }

        .context-menu-search input:focus {
            border-color: rgba(212, 92, 44, 0.42);
            box-shadow: 0 0 0 3px rgba(212, 92, 44, 0.10);
        }

        .context-menu button {
            width: 100%;
            border: 0;
            background: transparent;
            padding: 9px 10px;
            text-align: left;
            font-size: 12px;
            color: var(--ink);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            gap: 8px;
        }

        .context-menu button:hover {
            background: rgba(212, 92, 44, 0.08);
        }

        .context-menu .meta {
            font-size: 11px;
            color: var(--muted);
        }

        .context-menu-body {
            max-height: min(62vh, 640px);
            overflow: auto;
            overscroll-behavior: contain;
            padding: 8px;
            display: grid;
            gap: 8px;
            scrollbar-width: thin;
            scrollbar-color: rgba(212, 92, 44, 0.48) rgba(119, 106, 88, 0.12);
        }

        .context-menu-body::-webkit-scrollbar {
            width: 10px;
        }

        .context-menu-body::-webkit-scrollbar-track {
            background: rgba(119, 106, 88, 0.10);
            border-radius: 999px;
        }

        .context-menu-body::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(212, 92, 44, 0.66), rgba(184, 139, 45, 0.52));
            border-radius: 999px;
            border: 2px solid rgba(255, 251, 244, 0.92);
        }

        .context-menu-body::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, rgba(212, 92, 44, 0.82), rgba(184, 139, 45, 0.68));
        }

        .context-menu-section {
            display: grid;
            gap: 6px;
        }

        .context-menu-section-title {
            padding: 0 2px;
            font-size: 11px;
            text-transform: uppercase;
            color: var(--muted);
            letter-spacing: 0.06em;
        }

        .context-menu-group {
            border: 1px solid rgba(86, 63, 35, 0.10);
            border-radius: 12px;
            overflow: hidden;
            background: rgba(255,255,255,0.72);
        }

        .context-menu-group[data-depth='1'] {
            margin-left: 8px;
            border-radius: 11px;
            background: rgba(252, 248, 241, 0.9);
        }

        .context-menu-group[data-depth='2'] {
            margin-left: 14px;
            border-radius: 10px;
            background: rgba(249, 244, 235, 0.96);
        }

        .context-menu-group[data-depth='3'],
        .context-menu-group[data-depth='4'],
        .context-menu-group[data-depth='5'] {
            margin-left: 18px;
            border-radius: 10px;
            background: rgba(246, 239, 229, 0.98);
        }

        .context-menu-group-label {
            width: 100%;
            border: 0;
            text-align: left;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 8px 10px;
            font-size: 11px;
            text-transform: uppercase;
            color: rgba(73, 57, 37, 0.88);
            background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(248, 241, 231, 0.92));
            border-bottom: 1px solid rgba(86, 63, 35, 0.08);
        }

        .context-menu-group.is-collapsed .context-menu-group-label {
            border-bottom: 0;
        }

        .context-menu-group-chevron {
            font-size: 14px;
            line-height: 1;
            color: rgba(86, 63, 35, 0.72);
        }

        .context-menu-group-body {
            display: grid;
            gap: 4px;
            padding: 4px;
        }

        .context-menu-group.is-collapsed .context-menu-group-body {
            display: none;
        }

        .context-menu-group-children {
            display: grid;
            gap: 4px;
        }

        .context-menu-group-items {
            display: grid;
            border-radius: 9px;
            overflow: hidden;
            background: rgba(255,255,255,0.6);
        }

        .context-menu-item + .context-menu-item {
            border-top: 1px solid rgba(86, 63, 35, 0.06);
        }

        .context-menu-item {
            font-size: 13px !important;
            font-weight: 520;
            padding: 10px 12px !important;
            color: var(--ink) !important;
            background: rgba(255,255,255,0.42) !important;
            transition: background 0.12s ease, box-shadow 0.12s ease;
        }

        .context-menu-item:hover:not(:disabled) {
            background: rgba(212, 92, 44, 0.12) !important;
            box-shadow: inset 3px 0 0 rgba(212, 92, 44, 0.52);
        }

        .context-menu-item:active:not(:disabled) {
            background: rgba(212, 92, 44, 0.18) !important;
        }

        .context-variable-entry {
            display: grid;
            gap: 6px;
            padding: 9px 10px;
            background: rgba(255,255,255,0.58);
        }

        .context-variable-entry + .context-variable-entry {
            border-top: 1px solid rgba(86, 63, 35, 0.06);
        }

        .context-variable-meta {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: center;
        }

        .context-variable-title {
            font-size: 13px;
            color: var(--ink);
        }

        .context-variable-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .context-variable-action {
            width: auto !important;
            padding: 5px 9px !important;
            border-radius: 999px;
            border: 1px solid rgba(86, 63, 35, 0.10) !important;
            background: rgba(255,255,255,0.82) !important;
            font-size: 11px !important;
            justify-content: center !important;
        }

        .context-variable-action:hover {
            background: rgba(212, 92, 44, 0.08) !important;
        }

        .context-variable-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .context-variable-action {
            border: 1px solid rgba(86, 63, 35, 0.12);
            background: rgba(255,255,255,0.78);
            border-radius: 999px;
            padding: 7px 10px;
            font-size: 11px;
            text-transform: uppercase;
            color: var(--ink);
            cursor: pointer;
        }

        .context-variable-action:hover {
            background: rgba(212, 92, 44, 0.08);
        }

        .context-menu button.context-menu-item:disabled {
            cursor: not-allowed;
            opacity: 0.58;
        }

        .node-model-select {
            min-width: 132px;
            max-width: 160px;
            border: 1px solid rgba(86, 63, 35, 0.12);
            background: rgba(255,255,255,0.78);
            border-radius: 999px;
            padding: 4px 10px;
            font-size: 11px;
            color: var(--ink);
        }

        /* ── Port tooltip (fast custom tooltip) ── */
        .port-tooltip {
            display: none;
            position: fixed;
            z-index: 99999;
            max-width: 320px;
            padding: 6px 10px;
            font-size: 11.5px;
            line-height: 1.5;
            color: #f5f0e6;
            background: rgba(42, 32, 18, 0.92);
            border-radius: 6px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.22);
            pointer-events: none;
            white-space: pre-wrap;
            word-break: break-word;
        }

        /* ── Config field description hint ── */
        .config-field-hint {
            font-size: 11px;
            line-height: 1.4;
            color: rgba(86, 63, 35, 0.52);
            margin-top: 2px;
            padding: 0 2px;
        }

        @media (max-width: 1320px) {
            .workspace-shell {
                grid-template-columns: minmax(0, 1fr) 340px;
            }
        }

        @media (max-width: 1100px) {
            .menu-bar {
                flex-wrap: wrap;
                height: auto;
                padding: 10px 12px;
            }
            .app-shell { grid-template-columns: 1fr; height: calc(100vh - 76px); }
            .sidebar { display: none; }
            .sidebar-resizer { display: none; }
            .workspace-shell { grid-template-columns: 1fr; }
            .inspector-sidebar { display: none; }
            .agent-office-layout.has-inspector {
                grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
            }
        }

        @media (max-width: 760px) {
            .agent-office-header {
                align-items: flex-start;
                flex-direction: column;
            }
            .agent-office-floor-title {
                grid-template-columns: 1fr;
            }
            .agent-office-status-summary {
                justify-content: flex-start;
                flex-wrap: wrap;
            }
            .agent-office-layout.has-inspector {
                grid-template-columns: 1fr;
                overflow-y: auto;
            }
            .agent-office-inspector {
                border-top: 1px solid rgba(32, 48, 44, 0.16);
                border-left: 0;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .agent-office-workstation,
            .agent-office-hand-left,
            .agent-office-hand-right,
            .agent-office-screen-line,
            .agent-office-eye,
            .agent-office-bubble {
                animation: none !important;
                transition: none !important;
            }
        }

        /* ── Array Builder Node ──────────────────────────────── */
        .node.array_builder {
            min-width: 180px;
        }
        .array-builder-body {
            position: relative;
        }
        .array-builder-empty {
            text-align: center;
        }
        .array-builder-port-list .port-row {
            transition: transform 0.15s ease;
        }

        /* ── Tool Picker ─────────────────────────────────────── */
        .tool-picker-field {
            flex: 1;
            min-height: 0;
        }
        .tool-picker-panel {
            margin-top: 6px;
            font-size: 13px;
            line-height: 1.5;
            overflow: hidden;
        }
        .tool-picker-global {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 0;
            border-bottom: 1px solid var(--border);
            margin-bottom: 6px;
            cursor: pointer;
            font-size: 13px;
        }
        .tool-picker-global strong {
            font-size: 13px;
        }
        .tool-picker-count {
            color: var(--fg-muted);
            font-size: 11px;
            margin-left: auto;
        }
        .tool-picker-group {
            margin-bottom: 2px;
            border: 1px solid var(--border);
            border-radius: 6px;
            overflow: hidden;
        }
        .tool-picker-group-header {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 8px;
            background: var(--bg-elevated, rgba(255,255,255,0.03));
            cursor: pointer;
            user-select: none;
            overflow: hidden;
        }
        .tool-picker-toggle {
            background: none;
            border: none;
            color: var(--fg-muted);
            font-size: 10px;
            padding: 0;
            width: 16px;
            cursor: pointer;
            line-height: 1;
            flex-shrink: 0;
        }
        .tool-picker-group-label {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            flex: 1;
            min-width: 0;
        }
        .tool-picker-group-label strong {
            font-size: 12px;
            letter-spacing: 0.02em;
        }
        .tool-picker-group-body {
            padding: 2px 0;
        }
        .tool-picker-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 4px 10px 4px 28px;
            cursor: pointer;
            transition: background 0.1s;
            overflow: hidden;
        }
        .tool-picker-item:hover {
            background: var(--bg-hover, rgba(255,255,255,0.04));
        }
        .tool-picker-item.checked {
            background: var(--bg-hover, rgba(255,255,255,0.03));
        }
        .tool-picker-item input[type="checkbox"] {
            margin-top: 3px;
            flex-shrink: 0;
        }
        .tool-picker-tool-info {
            display: flex;
            flex-direction: column;
            gap: 1px;
            min-width: 0;
            flex: 1;
            overflow: hidden;
        }
        .tool-picker-tool-name {
            font-weight: 600;
            font-size: 13px;
            color: var(--fg-accent, #7cc5ff);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .tool-picker-tool-desc {
            color: var(--fg-muted);
            font-size: 11px;
            line-height: 1.35;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: block;
            max-width: 100%;
            word-break: break-all;
        }

        /* ── Template Picker (create workflow dialog) ── */
        .template-picker-grid {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 340px;
            overflow-y: auto;
            padding: 2px;
        }
        .template-picker-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .template-picker-group-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--fg-muted);
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding: 0 2px;
        }
        .template-picker-card {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            border: 1.5px solid var(--border-subtle, #333);
            border-radius: 8px;
            cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
            background: var(--bg-input, #1e1e1e);
        }
        .template-picker-card:hover {
            border-color: var(--fg-muted, #888);
            background: var(--bg-hover, #252528);
        }
        .template-picker-card.selected {
            border-color: var(--fg-accent, #7cc5ff);
            background: color-mix(in srgb, var(--fg-accent, #7cc5ff) 8%, var(--bg-input, #1e1e1e));
        }
        .template-picker-card-icon {
            font-size: 22px;
            line-height: 1;
            flex-shrink: 0;
            width: 28px;
            text-align: center;
            padding-top: 1px;
        }
        .template-picker-card-body {
            flex: 1;
            min-width: 0;
        }
        .template-picker-card-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--fg-primary, #e0e0e0);
            line-height: 1.3;
        }
        .template-picker-card-desc {
            font-size: 11px;
            color: var(--fg-muted, #999);
            line-height: 1.4;
            margin-top: 2px;
        }

        /* Agent Office: full-bleed Three.js room with lightweight HTML overlays. */
        .agent-office-view {
            --office-ink: #f4f5ef;
            --office-muted: rgba(235, 240, 235, 0.68);
            --office-teal: #43c8c1;
            --office-green: #74bd80;
            --office-red: #ec756a;
            position: absolute;
            inset: 0;
            z-index: 4;
            display: block;
            min-width: 0;
            min-height: 0;
            overflow: hidden;
            color: var(--office-ink);
            background: #a9b8b4;
        }

        .agent-office-view[hidden],
        .agent-office-inspector[hidden],
        .agent-office-scene-error[hidden] {
            display: none;
        }

        body.is-office-mode .app-shell {
            grid-template-columns: minmax(0, 1fr) !important;
        }

        body.is-office-mode .app-shell > .sidebar,
        body.is-office-mode .app-shell > .sidebar-resizer {
            display: none;
        }

        .agent-office-stage {
            position: absolute;
            inset: 0;
            overflow: hidden;
            isolation: isolate;
        }

        .agent-office-canvas {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            display: block;
            outline: 0;
            cursor: grab;
            touch-action: none;
            user-select: none;
        }

        .agent-office-canvas.is-orbiting,
        .agent-office-canvas.is-panning {
            cursor: grabbing !important;
        }

        .agent-office-atmosphere {
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            box-shadow:
                inset 0 0 110px rgba(24, 37, 37, 0.22),
                inset 0 -70px 100px rgba(38, 28, 21, 0.12);
        }

        .agent-office-header {
            position: absolute;
            z-index: 5;
            top: 18px;
            left: 20px;
            min-height: 0;
            display: block;
            padding: 10px 13px 11px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            background: rgba(22, 31, 31, 0.76);
            box-shadow: 0 12px 32px rgba(17, 25, 24, 0.18);
            backdrop-filter: blur(12px);
        }

        .agent-office-floor-title {
            min-width: 0;
            display: grid;
            grid-template-columns: minmax(0, auto) auto;
            align-items: baseline;
            gap: 3px 10px;
        }

        .agent-office-kicker {
            grid-column: 1 / -1;
            color: rgba(195, 231, 225, 0.72);
            font-size: 10px;
            letter-spacing: 0;
            text-transform: uppercase;
        }

        .agent-office-floor-title strong {
            max-width: min(38vw, 420px);
            overflow: hidden;
            color: #f7f7f2;
            font-size: 14px;
            font-weight: 600;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .agent-office-floor-title > span:last-child {
            color: var(--office-muted);
            font-size: 10px;
            white-space: nowrap;
        }

        .agent-office-status-summary {
            position: absolute;
            z-index: 5;
            top: 20px;
            right: 20px;
            min-height: 0;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            padding: 8px 11px;
            border: 1px solid rgba(255, 255, 255, 0.13);
            border-radius: 6px;
            background: rgba(22, 31, 31, 0.7);
            color: rgba(240, 244, 239, 0.76);
            font-size: 11px;
            box-shadow: 0 10px 28px rgba(17, 25, 24, 0.14);
            backdrop-filter: blur(12px);
        }

        .agent-office-summary-item {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
        }

        .agent-office-summary-dot,
        .agent-office-status-dot {
            width: 7px;
            height: 7px;
            flex: 0 0 auto;
            display: inline-block;
            border-radius: 50%;
            background: #88a1aa;
            box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
        }

        .agent-office-summary-dot.is-running,
        .agent-office-status-dot.is-running { background: var(--office-teal); }
        .agent-office-summary-dot.is-success,
        .agent-office-status-dot.is-success { background: var(--office-green); }
        .agent-office-summary-dot.is-error,
        .agent-office-status-dot.is-error { background: var(--office-red); }

        .agent-office-workstations,
        .agent-office-zone-labels,
        .agent-office-utilities {
            position: absolute;
            inset: 0;
            z-index: 4;
            max-width: none;
            margin: 0;
            padding: 0;
            pointer-events: none;
        }

        .agent-office-hotspot,
        .agent-office-zone-hotspot {
            position: absolute;
            width: auto;
            min-width: 86px;
            min-height: 0;
            display: grid;
            justify-items: center;
            gap: 2px;
            padding: 5px 8px;
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 5px;
            background: rgba(21, 30, 30, 0.76);
            color: rgba(248, 249, 244, 0.92);
            text-align: center;
            box-shadow: 0 8px 22px rgba(15, 24, 23, 0.2);
            transform: translate(-50%, -100%);
            backdrop-filter: blur(9px);
            cursor: pointer;
            pointer-events: auto;
        }

        .agent-office-hotspot[hidden],
        .agent-office-zone-hotspot[hidden] {
            display: none;
        }

        .agent-office-hotspot:hover,
        .agent-office-hotspot.is-selected,
        .agent-office-zone-hotspot:hover,
        .agent-office-zone-hotspot.is-current {
            border-color: rgba(104, 221, 211, 0.72);
            background: rgba(24, 47, 45, 0.9);
        }

        .agent-office-hotspot strong {
            max-width: 146px;
            overflow: hidden;
            font-size: 11px;
            font-weight: 600;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .agent-office-hotspot > span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: rgba(235, 240, 235, 0.64);
            font-size: 9px;
        }

        .agent-office-hotspot.is-remote {
            min-width: 72px;
            padding: 4px 7px;
            background: rgba(27, 37, 36, 0.68);
        }

        .agent-office-hotspot.is-remote strong {
            max-width: 112px;
        }

        .agent-office-zone-hotspot {
            min-width: 96px;
            color: rgba(244, 239, 220, 0.9);
            font-size: 10px;
        }

        .agent-office-zone-hotspot strong {
            max-width: 150px;
            overflow: hidden;
            font-size: 10px;
            font-weight: 600;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .agent-office-zone-hotspot span {
            color: rgba(235, 240, 235, 0.62);
            font-size: 9px;
        }

        .agent-office-scene-error {
            position: absolute;
            z-index: 8;
            left: 50%;
            top: 50%;
            max-width: 360px;
            padding: 12px 14px;
            border: 1px solid rgba(236, 117, 106, 0.56);
            border-radius: 6px;
            background: rgba(45, 25, 24, 0.9);
            color: #ffd8d3;
            font-size: 12px;
            transform: translate(-50%, -50%);
        }

        .agent-office-inspector {
            position: absolute;
            z-index: 7;
            top: 76px;
            right: 18px;
            bottom: 18px;
            width: min(340px, calc(100% - 36px));
            min-width: 0;
            overflow-y: auto;
            padding: 15px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 6px;
            background: rgba(246, 247, 242, 0.94);
            color: #23302e;
            box-shadow: 0 20px 55px rgba(17, 26, 25, 0.28);
            backdrop-filter: blur(18px);
        }

        .agent-office-inspector-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 13px;
        }

        .agent-office-inspector-title {
            min-width: 0;
            display: grid;
            gap: 4px;
        }

        .agent-office-inspector-title strong {
            overflow-wrap: anywhere;
            font-size: 14px;
            font-weight: 600;
        }

        .agent-office-inspector-title span {
            color: #687773;
            font-size: 10px;
        }

        .agent-office-icon-button {
            width: 30px;
            height: 30px;
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            border: 1px solid rgba(32, 48, 44, 0.18);
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.45);
            color: #23302e;
            font-size: 17px;
            cursor: pointer;
        }

        .agent-office-inspector-section {
            display: grid;
            gap: 9px;
            padding: 13px 0;
            border-top: 1px solid rgba(32, 48, 44, 0.13);
        }

        .agent-office-inspector-section h3 {
            margin: 0;
            font-size: 11px;
            font-weight: 600;
        }

        .agent-office-inspector-grid {
            display: grid;
            grid-template-columns: minmax(70px, auto) minmax(0, 1fr);
            gap: 7px 10px;
            margin: 0;
            font-size: 10px;
        }

        .agent-office-inspector-grid dt { color: #71807c; }
        .agent-office-inspector-grid dd {
            min-width: 0;
            margin: 0;
            overflow-wrap: anywhere;
        }

        .agent-office-context-list {
            display: grid;
            gap: 7px;
        }

        .agent-office-context-row {
            display: grid;
            gap: 4px;
            padding: 8px;
            border-radius: 5px;
            background: rgba(223, 229, 224, 0.72);
        }

        .agent-office-context-row strong {
            font-size: 10px;
            font-weight: 600;
        }

        .agent-office-context-row code {
            overflow-wrap: anywhere;
            color: #3f5e59;
            font-size: 10px;
            white-space: pre-wrap;
        }

        .agent-office-inspector-action {
            width: 100%;
            min-height: 32px;
            border: 1px solid rgba(39, 123, 120, 0.4);
            border-radius: 5px;
            background: #dfebe7;
            color: #225d5a;
            font: inherit;
            font-size: 11px;
            cursor: pointer;
        }

        @media (max-width: 760px) {
            body.is-office-mode .menu-bar {
                min-width: 0;
                padding: 8px 10px;
            }

            body.is-office-mode .menu-status,
            body.is-office-mode .toolbar-select,
            body.is-office-mode #session-create-btn,
            body.is-office-mode #workflow-save-btn {
                display: none;
            }

            body.is-office-mode .toolbar-actions {
                width: 100%;
                flex-wrap: nowrap;
                justify-content: flex-start;
            }

            body.is-office-mode .view-mode-switch {
                margin-right: auto;
            }

            .agent-office-header {
                top: 10px;
                left: 10px;
                max-width: calc(100% - 20px);
                padding: 8px 10px;
            }

            .agent-office-floor-title {
                grid-template-columns: minmax(0, 1fr) auto;
            }

            .agent-office-floor-title strong {
                max-width: 56vw;
            }

            .agent-office-status-summary {
                top: auto;
                right: 10px;
                bottom: 10px;
                left: 10px;
                justify-content: center;
                flex-wrap: wrap;
            }

            .agent-office-inspector {
                top: auto;
                right: 10px;
                bottom: 54px;
                left: 10px;
                width: auto;
                max-height: min(54%, 440px);
            }

            .agent-office-hotspot,
            .agent-office-zone-hotspot {
                min-width: 72px;
                padding: 4px 6px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .agent-office-hotspot,
            .agent-office-zone-hotspot,
            .agent-office-inspector {
                transition: none !important;
            }
        }
