html.advance-flow-editor-page,
html.advance-flow-editor-page body {
    overflow: hidden;
    overscroll-behavior: none;
}

.flow-page-shell {
    --flow-editor-height: calc(100dvh - 120px);
    --flow-workspace-height: calc(100dvh - 220px);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    height: var(--flow-editor-height);
    max-height: var(--flow-editor-height);
    min-height: 0;
    overflow: hidden;
}

.flow-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.flow-page-title-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.flow-page-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.flow-page-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.flow-page-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.flow-name-card {
    min-width: min(420px, 100%);
    padding: 0.85rem 1rem;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.flow-name-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.flow-name-input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.15rem 0.2rem;
    background: transparent;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    min-width: 0;
}

.flow-name-input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.flow-name-input.is-invalid {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.flow-name-help {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #64748b;
}

.flow-device-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
    font-size: 0.82rem;
    font-weight: 600;
}

.flow-page-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.flow-workspace {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 280px;
    gap: 0.75rem;
    height: var(--flow-workspace-height);
    min-height: 0;
    overflow: hidden;
}

.flow-components-panel,
.flow-properties-panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.flow-components-panel {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.flow-panel-heading,
.flow-properties-head h5 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.flow-panel-copy,
.flow-properties-head p {
    font-size: 0.74rem;
    color: #64748b;
    margin: 0;
}

.flow-component-search {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.flow-component-search i {
    position: absolute;
    left: 0.62rem;
    color: #94a3b8;
    font-size: 0.82rem;
    pointer-events: none;
}

.flow-component-search input {
    width: 100%;
    min-height: 34px;
    padding: 0.44rem 0.65rem 0.44rem 1.9rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.76rem;
    outline: none;
}

.flow-component-search input:focus {
    border-color: rgba(37, 99, 235, 0.38);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.flow-component-empty {
    padding: 0.7rem;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 12px;
    color: #64748b;
    font-size: 0.74rem;
    text-align: center;
}

.flow-panel-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.flow-panel-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}

.node-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #fff;
    cursor: grab;
    user-select: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.node-item.is-hidden,
.flow-panel-section.is-empty-filtered {
    display: none;
}

.node-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}

.node-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.node-item-trigger {
    background: linear-gradient(135deg, #effaf6 0%, #ffffff 100%);
}

.node-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.88rem;
}

.node-item-trigger .node-item-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.node-item-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.node-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
}

.node-desc {
    font-size: 0.66rem;
    line-height: 1.25;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flow-canvas-column {
    min-width: 0;
    min-height: 0;
}

.flow-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.24) 1px, transparent 0),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.96));
    background-size: 22px 22px, 100% 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 20px 60px rgba(15, 23, 42, 0.08);
    touch-action: none;
    overscroll-behavior: contain;
}

.flow-canvas-wrapper.is-panning {
    cursor: grabbing;
}

.flow-canvas {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
}

.flow-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}

.flow-connection {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    opacity: 0.95;
}

.flow-connection-temp {
    stroke-dasharray: 10 5;
    opacity: 0.7;
}

.flow-connection-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 18;
    pointer-events: stroke;
    cursor: pointer;
}

.flow-mini-map {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 130px;
    height: 90px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    z-index: 3;
}

.mini-map-node {
    width: 14px;
    height: 36px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.26);
}

.mini-map-node-lg {
    width: 18px;
    height: 52px;
    background: rgba(14, 165, 233, 0.3);
}

.mini-map-node-sm {
    width: 10px;
    height: 26px;
    background: rgba(148, 163, 184, 0.35);
}

.flow-zoom-controls {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.flow-zoom-controls button {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.flow-zoom-level {
    min-width: 36px;
    padding: 0.35rem 0.45rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.flow-zoom-controls button:hover {
    border-color: rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.flow-node {
    --node-accent: #2563eb;
    position: absolute;
    width: 216px;
    min-height: 58px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    overflow: visible;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    z-index: 2;
}

.flow-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.flow-node.fn-dragging {
    cursor: grabbing;
    transform: scale(1.015);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

.flow-node.fn-selected {
    border-color: rgba(37, 99, 235, 0.38);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 18px 44px rgba(37, 99, 235, 0.14);
}

.fn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.58rem 0.68rem 0.52rem;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.fn-header-main {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-width: 0;
}

.fn-header-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--node-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.fn-header-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fn-delete-btn {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fn-delete-btn:hover {
    background: rgba(239, 68, 68, 0.14);
}

.fn-body {
    padding: 0 0.68rem 0.68rem;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.fn-trigger-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.fn-trigger-chip {
    padding: 0.38rem 0.64rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
}

.fn-trigger-meta,
.fn-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.fn-trigger-meta span,
.fn-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.56rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 0.68rem;
    font-weight: 600;
}

.fn-preview-text {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #0f172a;
    white-space: pre-wrap;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.fn-preview-footer {
    font-size: 0.64rem;
    color: #64748b;
    font-style: italic;
}

.fn-preview-image {
    width: 100%;
    height: 76px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
}

.fn-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fn-preview-sticker img {
    object-fit: contain;
    padding: 0.6rem;
    background: linear-gradient(135deg, #fdf2f8, #fff7ed);
}

.fn-divider {
    height: 1px;
    margin: 0 0.68rem;
    background: rgba(148, 163, 184, 0.18);
}

.fn-preview-buttons,
.fn-preview-list-section {
    padding: 0 0.68rem 0.68rem;
}

.fn-preview-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.fn-preview-btn,
.fn-preview-list-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.46rem 0.62rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
    min-height: 36px;
}

.fn-preview-btn i {
    color: var(--node-accent);
}

.btn-label-text,
.row-info {
    min-width: 0;
    flex: 1;
}

.btn-type-badge {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.fn-preview-list-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.55rem;
}

.row-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--node-accent);
    flex-shrink: 0;
}

.row-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
}

.row-desc {
    font-size: 0.7rem;
    color: #64748b;
}

.fn-preview-list-btn {
    margin: 0 1rem 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 16px;
    border: 1px dashed rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 700;
}

.fn-preview-media {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.fn-preview-media-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
}

.fn-preview-location,
.fn-preview-vcard,
.fn-preview-product {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.62rem;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.88);
}

.fn-preview-location i,
.fn-preview-vcard-avatar,
.fn-preview-product-img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fn-preview-location i {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.fn-preview-vcard-avatar {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.fn-preview-product-img {
    overflow: hidden;
    background: #f1f5f9;
}

.fn-preview-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fn-preview-product-info,
.fn-preview-vcard-info {
    min-width: 0;
    flex: 1;
}

.vcard-name,
.p-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.vcard-phone,
.p-company,
.p-price,
.fn-preview-product-message {
    font-size: 0.74rem;
    color: #64748b;
}

.fn-hint {
    font-size: 0.76rem;
    color: #94a3b8;
    font-style: italic;
}

.fn-port-in-area {
    position: absolute;
    top: -9px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 4;
}

.fn-output-ports {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 0.68rem 0.56rem;
}

.fn-port {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 3px solid #fff;
    background: var(--node-accent);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    cursor: crosshair;
    pointer-events: all;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.fn-port:hover {
    transform: scale(1.08);
}

.fn-port-active {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.14);
    background: #10b981;
}

.fn-preview-btn-connectable,
.fn-preview-row-connectable {
    padding-right: 2.3rem;
}

.fn-preview-btn-connectable .fn-port,
.fn-preview-row-connectable .fn-port {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
}

.flow-properties-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: contain;
}

.flow-properties-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1.05rem 1.15rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.flow-properties-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.85rem 0.9rem;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.flow-properties-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.flow-properties-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.flow-properties-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.84rem;
}

.flow-properties-empty i {
    font-size: 2rem;
}

.property-section,
.property-field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.property-section-title,
.property-label {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.property-help {
    display: block;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #64748b;
}

.property-input-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.property-picker-btn {
    min-width: 42px;
}

.property-textarea {
    min-height: 126px;
    resize: vertical;
}

.formatting-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: #fff;
}

.format-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.format-btn:hover {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.property-media-preview {
    width: 100%;
    min-height: 118px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-media-preview.has-media {
    border-style: solid;
}

.property-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-media-preview.is-file-preview {
    padding: 1rem;
}

.property-media-placeholder {
    color: #cbd5e1;
    font-size: 1.8rem;
}

.property-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #0f172a;
    max-width: 100%;
}

.property-file-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.response-grid,
.config-grid {
    display: grid;
    gap: 0.8rem;
}

.config-grid.two-column,
.response-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
    font-size: 0.84rem;
    color: #334155;
}

.config-card {
    padding: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
    margin-bottom: 0.75rem;
}

.config-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
    font-size: 0.84rem;
    color: #0f172a;
}

.config-card-title-wrap,
.config-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cfg-drag-handle {
    cursor: grab;
    color: #94a3b8;
}

.is-dragging-config {
    opacity: 0.58;
}

.config-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr auto auto auto;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.property-empty-state {
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.86);
    color: #94a3b8;
    font-size: 0.8rem;
}

.keyword-editor {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.keyword-chip-list {
    min-height: 46px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.65rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.68rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 700;
}

.keyword-chip-remove {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.keyword-chip-placeholder {
    color: #94a3b8;
    font-size: 0.78rem;
}

.keyword-input {
    min-height: 42px;
}

.product-preview {
    display: none;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.product-preview.visible {
    display: flex;
}

.product-preview img,
.product-preview-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-preview-placeholder {
    background: #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.product-preview-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.product-preview-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
}

.product-preview-company,
.product-preview-price {
    font-size: 0.76rem;
    color: #64748b;
}

.location-map-wrap {
    width: 100%;
    height: 240px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.flow-context-menu {
    position: fixed;
    min-width: 160px;
    padding: 0.45rem 0;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    z-index: 20;
}

.ctx-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.95rem;
    font-size: 0.84rem;
    color: #334155;
    cursor: pointer;
}

.ctx-item:hover {
    background: rgba(248, 250, 252, 0.92);
}

@media (max-width: 1399px) {
    .flow-workspace {
        grid-template-columns: 176px minmax(0, 1fr) 260px;
    }

    .flow-name-input {
        min-width: 220px;
    }
}

@media (max-width: 1199px) {
    .flow-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) minmax(180px, 31vh);
    }

    .flow-components-panel {
        flex-direction: row;
        align-items: stretch;
        height: auto;
        min-height: 74px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.55rem;
        touch-action: pan-x;
    }

    .flow-component-search {
        flex: 0 0 188px;
        align-self: center;
    }

    .flow-panel-heading,
    .flow-panel-copy,
    .flow-panel-label {
        display: none;
    }

    .flow-panel-section {
        flex-direction: row;
        align-items: center;
        gap: 0.45rem;
        padding-right: 0.55rem;
        border-right: 1px solid rgba(148, 163, 184, 0.18);
        flex: 0 0 auto;
    }

    .flow-panel-section:last-child {
        border-right: 0;
        padding-right: 0;
    }

    .node-item {
        flex: 0 0 136px;
        align-items: center;
    }

    .node-desc {
        display: none;
    }

    .flow-properties-panel {
        min-height: 0;
    }
}

@media (max-width: 767px) {
    .flow-page-shell {
        gap: 0.55rem;
    }

    .flow-page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 0.6rem;
    }

    .flow-page-actions {
        justify-content: flex-end;
    }

    .flow-name-input {
        min-width: 0;
        width: 100%;
    }

    .flow-device-badge,
    .flow-page-subcopy {
        display: none;
    }

    .flow-workspace {
        gap: 0.55rem;
        grid-template-rows: auto minmax(0, 1fr) minmax(160px, 30vh);
    }

    .flow-components-panel {
        min-height: 64px;
    }

    .flow-component-search {
        flex-basis: 160px;
    }

    .node-item {
        flex-basis: 112px;
        padding: 0.48rem;
    }

    .config-grid.two-column,
    .response-grid,
    .config-row {
        grid-template-columns: 1fr;
    }

    .flow-mini-map {
        display: none;
    }

    .flow-zoom-controls {
        right: 0.55rem;
        bottom: 0.55rem;
    }
}

@media (max-width: 575px) {
    .flow-page-icon,
    .flow-page-kicker,
    .flow-name-help {
        display: none;
    }

    .flow-name-card {
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .flow-workspace {
        grid-template-rows: auto minmax(0, 1fr) minmax(150px, 28vh);
    }

    .flow-component-search {
        flex-basis: 138px;
    }

    .node-item {
        flex-basis: 46px;
        justify-content: center;
    }

    .node-item-text {
        display: none;
    }
}
