:root {
    font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    color: #202337;
    background: #f7f8fc;
    font-synthesis: none;
    --ink: #202337;
    --muted: #677086;
    --subtle: #8790a3;
    --line: #e7e8f0;
    --primary: #6545d8;
    --primary-dark: #5435c0;
    --primary-soft: #f0ebff;
    --header-height: 66px;
    --palette-width: 228px;
    --inspector-width: 304px;
}

body { margin: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
:where(button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid #7857e3; outline-offset: 3px; }
#blazor-error-ui { display: none; position: fixed; z-index: 50; bottom: 0; width: 100%; padding: 12px 20px; background: #fff0ec; }
#blazor-error-ui a { text-decoration: underline; }
.app-loading { min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--primary); font-weight: 650; }
.spinner { display: inline-block; width: 21px; height: 21px; border: 2px solid #e4d9ff; border-top-color: var(--primary); border-radius: 50%; animation: spin .75s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.studio { height: 100dvh; min-height: 470px; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: var(--header-height); padding: 0 24px; gap: 17px; background: #fff; border-bottom: 1px solid var(--line); flex: none; z-index: 10; }
.brand { color: #242138; flex: none; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #6949dc; color: #fff; box-shadow: 0 2px 5px #6545d846; }
.brand-text { font-size: 25px; font-weight: 780; letter-spacing: -.085em; line-height: 1; padding-bottom: 2px; }
.brand-text span { color: #7654df; }
.brand-type { color: #736495; font-size: 9px; letter-spacing: .14em; font-weight: 750; border: 1px solid #eae5f5; background: #f8f6fc; padding: 4px 6px; border-radius: 5px; margin-left: -4px; }
.top-divider { height: 24px; width: 1px; background: var(--line); margin-left: 3px; flex: none; }
.breadcrumb-arrow { color: #a2a9ba; flex: none; margin-left: -9px; }
.breadcrumb { margin: 0; font-size: 12px; font-weight: 650; min-width: 0; }
.top-actions { flex: none; }
.save-status { display: flex; align-items: center; gap: 6px; color: #2b765f; border: 1px solid #e2f2eb; background: #f2faf6; padding: 5px 8px; border-radius: 6px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.save-status span { width: 6px; height: 6px; border-radius: 50%; background: #399b7d; flex: none; }
.save-status.is-dirty { border-color: #f8edce; background: #fff9e9; color: #8e641e; }
.save-status.is-dirty span { background: #c68b31; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 8px; min-height: 35px; padding: 0 12px; color: #495168; font-size: 12px; font-weight: 640; white-space: nowrap; background: transparent; transition: background .15s, border-color .15s, color .15s; }
.button svg { flex: none; }
.button:hover { background: #f5f4fa; color: var(--primary-dark); }
.button-outline { border-color: #e5e5ee; background: #fff; }
.button-outline:hover { border-color: #d8cafa; background: #faf8ff; }
.button-quiet { padding: 0 8px; color: #626a80; }
.button-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px #4021953b; padding: 0 14px; }
.button-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.icon-button { width: 35px; padding: 0; }
.mobile-palette, .mobile-inspector { display: none; }
.dropdown { position: absolute; right: 0; top: 43px; min-width: 184px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 26px #2520401c; z-index: 15; }
.menu-flow-name { display: none; max-width: 210px; margin: 0 0 4px; padding: 6px 9px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 700; }
.dropdown button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px; border-radius: 5px; text-align: left; color: #424861; font-size: 12px; }
.dropdown button:hover { background: var(--primary-soft); color: var(--primary-dark); }

.studio-body { display: grid; grid-template-columns: var(--palette-width) minmax(0, 1fr) var(--inspector-width); flex: 1; min-height: 0; position: relative; }
.palette, .inspector { display: flex; flex-direction: column; background: #fff; min-height: 0; min-width: 0; z-index: 2; }
.palette { border-right: 1px solid var(--line); }
.inspector { border-left: 1px solid var(--line); }
.palette-heading { padding: 20px 16px 13px; }
.panel-heading { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 730; letter-spacing: -.015em; color: var(--ink); }
.panel-heading svg { color: #7765b3; flex: none; }
.search-box { display: flex; align-items: center; gap: 8px; color: #858da1; margin-top: 15px; padding: 0 10px; height: 34px; border: 1px solid #e9eaf1; border-radius: 7px; background: #f8f9fc; }
.search-box:focus-within { border-color: #aa94f0; box-shadow: 0 0 0 2px #e9dfff; }
.search-box input { width: 100%; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; font-size: 12px; color: var(--ink); outline: none; }
.search-box input::placeholder { color: #798197; }
.palette-list { overflow: auto; flex: 1; padding: 4px 12px 12px; scrollbar-width: thin; }
.palette-group + .palette-group { margin-top: 16px; }
.palette-group h2 { padding-left: 5px; margin: 0 0 7px; color: #767d92; font-size: 9px; font-weight: 760; letter-spacing: .105em; text-transform: uppercase; }
.palette-item { width: 100%; display: flex; align-items: center; gap: 9px; height: 39px; margin-bottom: 4px; padding: 3px 7px; border: 1px solid #eeeff5; border-radius: 7px; background: #fff; text-align: left; color: #343a51; cursor: grab; touch-action: none; user-select: none; }
.palette-item:hover { background: #f8f6ff; border-color: #ddd1fc; }
.palette-item:active { cursor: grabbing; }
.palette-item-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 630; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drag-grip { width: 9px; height: 13px; color: #a5abc0; flex: none; background: radial-gradient(circle, currentColor 1px, transparent 1.15px) left top / 4px 4px; margin-right: 2px; opacity: .75; }
.palette-footer { margin-top: auto; display: flex; align-items: center; gap: 7px; min-height: 45px; padding: 9px 16px; color: #767d91; border-top: 1px solid #eff0f6; background: #fbfbfe; font-size: 11px; }
.palette-footer svg { color: #897ab0; }
.palette-empty { padding: 10px; color: var(--muted); font-size: 12px; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 60; width: 172px; pointer-events: none; box-shadow: 0 7px 20px #2a24442b; border-color: #b9a5f8; }

.tone-mint { --tone: #167e68; --tone-bg: #e7f7f1; --tone-edge: #6cc2ab; }
.tone-violet { --tone: #6842c8; --tone-bg: #f0eaff; --tone-edge: #a589eb; }
.tone-amber { --tone: #9a6410; --tone-bg: #fff3db; --tone-edge: #dfae55; }
.tone-blue { --tone: #3269ad; --tone-bg: #eaf3ff; --tone-edge: #85afdf; }
.tone-rose { --tone: #ad4567; --tone-bg: #fcecf2; --tone-edge: #e0a0b4; }
.node-icon { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px; background: var(--tone-bg, #f0ebff); color: var(--tone, var(--primary)); }

.workspace { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }

.canvas { min-height: 200px; position: relative; flex: 1; overflow: hidden; isolation: isolate; background: #f7f8fc; }
.canvas-surface { position: absolute; inset: 0; overflow: hidden; background-image: radial-gradient(circle, #cfd2e3 1.03px, transparent 1.24px); background-size: 22px 22px; touch-action: none; user-select: none; }
.canvas.drag-over .canvas-surface { background-color: #f2eeff; box-shadow: inset 0 0 0 2px #b8a5f9; }
.canvas.pan-mode .canvas-surface, .canvas.pan-mode .flow-node-content { cursor: grab; }
.canvas.panning .canvas-surface, .canvas.panning .flow-node-content { cursor: grabbing; }
.canvas-world { position: absolute; inset: 0; transform-origin: 0 0; }
.selection-box { position: absolute; border: 1px solid #8b6ce4; background: #8b6ce420; pointer-events: none; }
.flow-wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.wire { stroke: #a4a5bf; stroke-width: 2.3; fill: none; stroke-linecap: round; }
.wire.wire-true { stroke: #69ad9a; }
.wire.wire-false { stroke: #bd90a4; }
.wire.wire-error { stroke: #b84860; }
.wire.wire-removed:not(.selected) { stroke: #b84860; stroke-dasharray: 4 5; }
.wire.visited { stroke: #529e87; stroke-width: 3; }
.wire.wire-error.visited:not(.selected) { stroke: #b84860; }
.wire.selected { stroke: #7658e4; stroke-width: 3.5; }
.wire-hit { stroke: transparent; stroke-width: 15; fill: none; pointer-events: stroke; cursor: pointer; }
.wire-hit:hover, .wire-hit:focus-visible { stroke: #8b6ce254; outline: 0; }
.wire-draft { stroke: #8b6ce2; stroke-width: 2.4; fill: none; stroke-dasharray: 6 5; stroke-linecap: round; }
.alignment-guides { stroke: #007e9b; stroke-width: 0.5px; stroke-dasharray: 4 3; }
.rewiring { visibility: hidden; }
.wire-label-layer, .flow-block-layer { position: absolute; inset: 0; pointer-events: none; }
.wire-label { position: absolute; transform: translate(-50%, -130%); color: #64677c; border: 1px solid #e2e4f0; background: #fafbff; border-radius: 6px; padding: 2px 5px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.wire-label.wire-true { color: #26705e; border-color: #d8efe6; background: #f0fbf7; }
.wire-label.wire-false { color: #995772; border-color: #f3e2ea; background: #fff7fa; }
.wire-label.wire-error { color: #9d324b; border-color: #f3d5dd; background: #fff2f5; }
.wire-label.wire-removed { color: #9d324b; border-color: #f3d5dd; background: #fff2f5; }
.flow-node { position: absolute; width: 166px; height: 64px; border: 1px solid #e1e3ef; border-radius: 10px; background: #fff; box-shadow: 0 3px 8px #2d24470c; pointer-events: auto; }
.flow-node:hover { z-index: 2; border-color: var(--tone-edge); }
.flow-node.selected { z-index: 1; border-color: #8b6ce4; box-shadow: 0 0 0 3px #d9ccfb9e, 0 5px 10px #4c28a612; }
.flow-node.run-success .flow-node-copy small { color: #24816b; }
.flow-node.run-error { border-color: #cb5570; box-shadow: 0 0 0 3px #fad8e2; }
.flow-node.run-error.selected { box-shadow: 0 0 0 3px #d9ccfb9e, 0 5px 10px #4c28a612; }
.flow-node-content { display: flex; align-items: center; gap: 7px; width: 100%; height: 100%; padding: 8px; border-radius: 9px; text-align: left; cursor: grab; }
.flow-node-content:active { cursor: grabbing; }
.flow-node-content .node-icon { width: 33px; height: 33px; border-radius: 7px; }
.flow-node-copy { display: grid; gap: 2px; min-width: 0; overflow: hidden; }
.flow-node-copy strong, .flow-node-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-node-copy strong { font-size: 12px; font-weight: 730; color: #292941; }
.flow-node-copy small { font-size: 10px; color: #747b91; }
.flow-port { position: absolute; z-index: 3; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; transform: translate(-50%, -50%); cursor: crosshair; }
.flow-port.inputs { left: 0; }
.flow-port.connected-input { cursor: grab; }
.flow-port.outputs { left: 100%; }
.flow-port.dense-port { height: 15px; }
.flow-port::after { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #9895b1; background: #fff; transition: scale .12s, border-color .12s; }
.flow-port.port-true::after { border-color: #5d9e8d; }
.flow-port.port-false::after { border-color: #b97a93; }
.flow-port.port-error::after { border-color: #b84860; }
.flow-port:hover::after, .flow-port:focus-visible::after, .connecting .flow-port:hover::after { scale: 1.36; border-color: #7651d3; background: #ede5ff; }
.canvas-tools, .zoom-control { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid #e2e4ef; border-radius: 8px; background: #fff; box-shadow: 0 2px 5px #3627540b; }
.canvas-tools { position: absolute; left: 16px; top: 16px; max-width: calc(100% - 32px); flex-wrap: wrap; }
.canvas-tool, .zoom-label { display: inline-flex; align-items: center; justify-content: center; height: 29px; min-width: 29px; border-radius: 5px; color: #676e87; }
.canvas-tool:hover, .zoom-label:hover { background: #f2effd; color: var(--primary-dark); }
.canvas-tool.active { color: var(--primary); background: #eee8fd; }
.canvas-tool-text { gap: 5px; padding-inline: 7px; font-size: 11px; font-weight: 690; white-space: nowrap; }
.tool-separator { height: 17px; width: 1px; background: #e8e8f1; margin: 0 2px; }
.canvas-bottom { position: absolute; inset: auto 15px 14px; display: flex; align-items: end; justify-content: space-between; gap: 8px; pointer-events: none; }
.canvas-count { display: flex; align-items: center; gap: 7px; padding: 6px 8px; color: #68718b; font-size: 10px; font-weight: 640; background: #fafbffd9; border: 1px solid #e9ebf4; border-radius: 6px; white-space: nowrap; }
.canvas-count i { width: 3px; height: 3px; border-radius: 50%; background: #a4a8be; }
.canvas-nav { display: grid; justify-items: end; gap: 7px; pointer-events: auto; }
.minimap { width: 134px; height: 72px; border: 1px solid #e0e3f0; border-radius: 8px; background: #fffffff2; box-shadow: 0 2px 5px #3627540b; cursor: crosshair; }
.minimap-viewport { fill: #8864e10e; stroke: #aa94e9; stroke-width: 1; }
.zoom-label { min-width: 43px; font-size: 11px; color: #535b72; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty-canvas, .inspector-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.empty-canvas { position: absolute; left: 50%; top: 45%; width: min(240px, 80%); transform: translate(-50%, -50%); pointer-events: none; text-align: center; }
.empty-icon { display: grid; place-items: center; color: #785acb; background: #f0ebfb; border: 1px solid #e8e0fa; width: 42px; height: 42px; border-radius: 10px; }
.empty-canvas strong, .inspector-empty strong { font-size: 14px; color: #37364e; }

.console { flex: none; height: 169px; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--line); background: #fff; }
.console-collapsed { height: 43px; }
.console-bar, .inspector-tabs { display: flex; gap: 16px; flex: none; align-items: stretch; border-bottom: 1px solid var(--line); }
.console-bar { min-height: 43px; padding: 0 13px; }
.tab-button { display: flex; align-items: center; gap: 6px; padding: 0 3px; border-bottom: 2px solid transparent; color: #676f87; font-size: 12px; font-weight: 640; white-space: nowrap; }
.tab-button:hover { color: var(--primary); }
.tab-button.active { border-bottom-color: #805ce5; color: var(--primary-dark); }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 16px; padding: 0 4px; background: #f0ebfa; color: #6e54a7; border-radius: 4px; font-size: 9px; font-weight: 730; }
.console-toggle { margin: auto 0 auto auto; min-height: 30px; width: 30px; }
.console-body { flex: 1; overflow: auto; scrollbar-width: thin; }
.console-empty { min-height: 91px; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 10px; color: #7c8297; font-size: 11px; }
.console-empty-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 8px; background: #f3f1fa; color: #8a77b8; }
.console-empty strong, .console-empty div span { display: block; }
.console-empty strong { color: #454661; font-size: 12px; margin-bottom: 2px; font-weight: 700; }
.run-status { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 690; white-space: nowrap; margin: auto 0 auto auto; }
.run-status + .console-toggle { margin-left: 0; }
.success { color: #25876e; }
.failure { color: #a93d58; }
.run-status .duration { color: #717991; padding-left: 3px; }
.run-row { width: 100%; padding: 7px 14px; display: grid; grid-template-columns: 16px minmax(72px, 1.1fr) minmax(80px, 2.4fr) auto 14px; gap: 8px; align-items: center; color: #747b91; font-size: 11px; text-align: left; }
.run-row:hover { background: #f8f6fe; }
.run-row strong, .run-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-row strong { color: var(--ink); font-weight: 650; }
.run-row time { font-variant-numeric: tabular-nums; }
.run-item + .run-item { border-top: 1px solid #f0eff6; }
.run-output { padding: 8px 13px; margin: 0 14px 8px; border-radius: 6px; background: #f7f6fc; border: 1px solid #ebe9f5; font-size: 11px; color: #4c4469; white-space: pre-wrap; overflow-wrap: anywhere; }
.run-error { padding: 8px 12px; background: #fff4f6; color: #9e3b58; display: flex; align-items: center; gap: 7px; font-size: 12px; }
.test-input { height: 100%; padding: 8px 13px; display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; }
.test-input textarea { flex: 1; min-height: 40px; resize: none; }

.inspector-heading { height: 55px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 17px; border-bottom: 1px solid var(--line); }
.inspector-heading .icon-button { color: #8489a0; min-height: 30px; width: 30px; }
.inspector-node { margin: 18px 16px 12px; padding: 10px; display: flex; align-items: center; gap: 10px; min-width: 0; border: 1px solid #edecf5; border-radius: 9px; background: #fbfbfd; }
.inspector-node .node-icon { width: 37px; height: 37px; border-radius: 8px; }
.inspector-node h2 { margin: 0 0 1px; font-size: 13px; color: #303148; font-weight: 740; }
.inspector-node div > span { display: block; color: #767c93; font-size: 11px; overflow-wrap: anywhere; }
.inspector-tabs { min-height: 37px; padding: 0 16px; }
.inspector-body { flex: 1; padding: 17px 16px; overflow: auto; scrollbar-width: thin; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span, .field > label { color: #43485e; font-size: 11px; font-weight: 720; }
.field input, .field select, .field textarea, .test-input textarea { width: 100%; border: 1px solid #e4e6f0; border-radius: 6px; padding: 8px 9px; color: #333850; background: #fff; font-size: 12px; }
.field input, .field select { min-height: 34px; }
.field select { padding-right: 4px; }
.field textarea { min-height: 87px; resize: vertical; }
.field .code-field, .test-input textarea { font-family: "Cascadia Mono", Consolas, monospace; }
.field input:focus, .field select:focus, .field textarea:focus, .test-input textarea:focus { outline: 2px solid #e8defc; outline-offset: 0; border-color: #a68be8; }
.field small { font-size: 10px; line-height: 1.45; color: #777d93; }
.node-note { color: #6c6685; border: 1px solid #ebe6f6; background: #f8f6fe; border-radius: 7px; padding: 9px 10px; font-size: 11px; line-height: 1.55; }
.port-summary { margin-top: 17px; border-top: 1px solid #eeedf5; padding-top: 13px; }
.port-summary h3 { margin: 0 0 8px; color: #555a72; font-size: 11px; font-weight: 730; }
.port-summary div { display: flex; align-items: center; gap: 7px; margin: 5px 0; color: #636a82; font-size: 11px; }
.port-dot { width: 8px; height: 8px; border-radius: 50%; background: #a889dc; }
.port-dot.port-true { background: #5aab93; }
.port-dot.port-false { background: #c6819a; }
.port-dot.port-error { background: #b84860; }
.connection-row { display: flex; justify-content: space-between; align-items: center; gap: 3px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.connection-name { display: flex; align-items: center; text-align: left; gap: 7px; font-size: 11px; color: #4d4d6a; }
.connection-name svg { flex: none; color: var(--primary); }
.connection-name:hover { color: var(--primary-dark); }
.inspector-footer { flex: none; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); background: #fbfbfe; }
.danger-icon { color: #b34c69; }
.danger-icon:hover { background: #fff2f5; color: #9b304e; }
.inspector-empty { padding: 32px 20px; text-align: center; }

.toast { display: flex; align-items: center; gap: 8px; position: fixed; z-index: 11; right: 17px; bottom: 15px; max-width: min(410px, calc(100vw - 34px)); padding: 5px 6px 5px 11px; background: #f6fdf9; border: 1px solid #dceee4; color: #237259; box-shadow: 0 5px 18px #29233a18; border-radius: 8px; font-size: 12px; font-weight: 650; }
.toast > svg { flex: none; }
.toast-error { background: #fff8fa; border-color: #f3d9e1; color: #9f3d59; }
.toast .icon-button { min-height: 29px; width: 27px; flex: none; }
.dialog-scrim { position: fixed; z-index: 20; inset: 0; padding: 12px; display: grid; place-items: center; background: #20173552; }
.dialog { width: min(475px, 100%); max-height: 80dvh; display: flex; flex-direction: column; background: #fff; border: 1px solid #eae7f2; border-radius: 12px; box-shadow: 0 15px 55px #24173e50; overflow: hidden; }
.dialog-heading, .dialog-footer { display: flex; align-items: center; padding: 12px 15px; gap: 9px; }
.dialog-heading { border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 17px; font-weight: 740; margin: 0; }
.dialog-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 9px; border: 1px solid #ece7fb; color: var(--primary); background: #f7f4fe; flex: none; }
.dialog-form { padding: 14px 15px; }
.dialog-list { padding: 9px 12px; min-height: 90px; overflow: auto; }
.library-row { display: flex; gap: 9px; align-items: center; text-align: left; width: 100%; padding: 7px; border-radius: 7px; color: var(--muted); }
.library-row > span:nth-child(2) { flex: 1; }
.library-row:hover { background: #f8f5ff; }
.library-row strong, .library-row small { display: block; }
.library-row strong { color: var(--ink); font-size: 13px; font-weight: 690; }
.library-row small { font-size: 10px; }
.dialog-footer { justify-content: flex-end; border-top: 1px solid var(--line); }

@media (max-width: 1320px) {
    :root { --palette-width: 204px; --inspector-width: 278px; }
}
@media (max-width: 1050px) {
    :root { --palette-width: 184px; --inspector-width: 246px; }
}
@media (max-width: 850px) {
    .studio-body { grid-template-columns: var(--palette-width) minmax(0, 1fr); }
    .inspector { display: none; position: absolute; right: 0; top: 0; bottom: 0; width: min(295px, 87vw); box-shadow: -10px 0 25px #34314d17; }
    .inspector.mobile-open { display: flex; }
    .mobile-inspector { display: inline-flex; }
}
@media (max-width: 610px) {
    :root { --header-height: 56px; }
    .studio-body { display: flex; }
    .workspace { flex: 1; }
    .palette { display: none; position: absolute; left: 0; top: 0; bottom: 0; width: 190px; box-shadow: 10px 0 25px #34314d17; }
    .palette.mobile-open { display: flex; }
    .mobile-palette { display: inline-flex; width: 29px; }
    .topbar { padding: 0 10px; gap: 5px; }
    .brand { gap: 6px; }
    .brand-mark { width: 31px; height: 31px; }
    .brand-text { font-size: 21px; }
    .brand-type, .top-divider, .breadcrumb-arrow, .breadcrumb { display: none; }
    .menu-flow-name { display: block; }
    .top-actions { gap: 4px; }
    .save-button { width: 32px; padding: 0; }
    .save-button span { display: none; }
    .console-bar { gap: 7px; padding: 0 8px; }
    .tab-button { gap: 4px; font-size: 10px; }
    .duration { display: none; }
    .minimap { display: none; }
}
@media (max-width: 500px) {
    .topbar { padding-inline: 6px; gap: 3px; }
    .top-actions { gap: 3px; }
    .brand-mark { width: 28px; height: 28px; }
    .brand-mark svg { width: 21px; height: 21px; }
    .library-button, .mobile-palette, .mobile-inspector, .save-button, .run-button, .top-actions .icon-button { width: 28px; min-height: 32px; padding: 0; }
    .library-button span, .run-button span { display: none; }
    .save-status { gap: 4px; padding-inline: 4px; }
}
@media (max-width: 400px) {
    .brand-text { display: none; }
    .canvas-tools { left: 10px; top: 10px; max-width: calc(100% - 20px); }
    .canvas-tool-text { padding-inline: 5px; }
}
@media (max-height: 680px) {
    .console { height: 134px; }
    .console-collapsed { height: 43px; }
    .minimap { height: 56px; width: 108px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
