:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f8fafc;
  font-synthesis: none;
  --blue: #1461ed;
  --border: #e3e8ef;
  --muted: #758094;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; background: white; color: inherit; text-decoration: none; }
button:hover, .button:hover { background: #f1f5fb; }
button.primary { color: white; background: var(--blue); border-color: var(--blue); }
button.primary:hover { background: #104fc5; }
:focus-visible { outline: 3px solid #90baff; outline-offset: 3px; }
input, select, textarea { width: 100%; border: 1px solid #d7dfe9; border-radius: 8px; padding: 12px; color: inherit; background: white; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; background: #f1f5fc; border-right: 1px solid var(--border); padding: 28px 16px; display: flex; flex-direction: column; }
.brand { color: #15213a; font-size: 25px; font-weight: 750; text-decoration: none; letter-spacing: -1px; padding: 0 12px 36px; }
.brand-icon { color: var(--blue); margin-right: 4px; }
nav { display: grid; gap: 8px; }
nav a { color: #525e72; text-decoration: none; padding: 13px 14px; border-radius: 8px; font-size: 14px; display: flex; gap: 12px; align-items: center; }
nav a span { width: 20px; font-size: 20px; text-align: center; }
nav a.active { background: #e1ebff; color: #125bdf; font-weight: 600; }
nav a:hover { background: #e8eef8; }
.sidebar-note { margin-top: auto; padding: 18px 12px 0; font-size: 12px; color: #52627b; }
.sidebar-note small { display: block; margin: 8px 0 0 12px; color: var(--muted); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3b8c69; margin-right: 5px; }
.workspace { margin-left: 224px; }
.topbar { height: 76px; border-bottom: 1px solid var(--border); background: white; padding: 0 36px; display: flex; align-items: center; gap: 20px; font-size: 13px; color: #68758a; }
.local-badge { margin-left: auto; font-size: 12px; }
.avatar { background: #eaf0fa; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; color: #567099; }
main { padding: 40px 36px; max-width: 1560px; margin: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
h1 { font-size: 30px; letter-spacing: -1px; margin: 0 0 9px; }
h2 { font-size: 19px; margin: 0; }
p { line-height: 1.6; }
.page-heading p, .muted { color: var(--muted); font-size: 14px; margin: 0; }
.toolbar { display: flex; gap: 12px; margin-bottom: 26px; }
.toolbar input { max-width: 400px; }
.platform-tag { display: inline-flex; gap: 7px; align-items: center; color: #39638c; background: #edf5ff; padding: 5px 9px; border-radius: 6px; font-size: 12px; }
.toolbar .platform-tag { padding: 0 16px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 20px; }
.project-card { border: 1px solid var(--border); border-radius: 12px; background: white; padding: 24px; }
.card-top { display: flex; gap: 14px; align-items: center; margin-bottom: 28px; }
.project-icon { background: #edf3ff; color: var(--blue); width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 25px; }
.card-top h2 { margin-bottom: 8px; font-size: 18px; overflow-wrap: anywhere; }
.project-card .muted { font-size: 12px; margin-bottom: 20px; }
.card-actions { display: flex; gap: 8px; }
.card-actions .open { flex: 1; color: var(--blue); background: #f5f8ff; border-color: #d7e3ff; }
.icon-button { padding: 5px 11px; font-size: 22px; }
.empty { border: 1px dashed #cfd9e8; border-radius: 12px; text-align: center; padding: 68px 24px; background: white; }
.empty h2 { margin-bottom: 12px; }
.empty button { margin-top: 24px; }
.stage-note { margin-top: 32px; font-size: 12px; color: var(--muted); }
dialog { width: min(440px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 80px #17203320; }
dialog::backdrop { background: #17203355; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 20px 0 9px; }
dialog .muted { margin-top: 12px; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.builder { display: grid; grid-template-columns: 150px minmax(300px, 1fr) 260px; border: 1px solid var(--border); border-radius: 12px; background: white; overflow: hidden; }
.library, .preview { padding: 18px; }
.library { border-right: 1px solid var(--border); }
.library h2, .preview h2 { font-size: 14px; margin-bottom: 18px; }
.library div { padding: 12px 8px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; margin-bottom: 9px; }
.canvas { min-height: 460px; overflow: auto; background-image: radial-gradient(#dce3ef 1px, transparent 1px); background-size: 18px 18px; padding: 55px 25px; }
.flow { display: flex; align-items: center; gap: 15px; min-width: 370px; }
.node { width: 210px; border: 1px solid #95b8ff; background: white; border-radius: 9px; padding: 16px; box-shadow: 0 3px 10px #17203308; font-size: 13px; }
.node.start { width: 110px; border-color: #a6d3bb; }
.node strong { display: block; margin-bottom: 12px; }
.node p { color: #5d6b80; }
.node span { display: block; border: 1px solid var(--border); border-radius: 5px; padding: 7px; margin-top: 7px; }
.arrow { color: var(--blue); }
.preview { border-left: 1px solid var(--border); background: #f0f6fd; }
.preview small { color: var(--muted); display: block; line-height: 1.5; }
.bubble { padding: 13px; border-radius: 9px; background: white; font-size: 13px; margin-top: 30px; line-height: 1.6; }
.preview .bubble button { padding: 6px; width: 100%; margin-top: 6px; font-size: 12px; }
.placeholder { max-width: 650px; padding: 32px; border: 1px solid var(--border); background: white; border-radius: 12px; }
.placeholder p { color: #6b778b; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #172033; color: white; border-radius: 8px; padding: 12px 20px; max-width: 90%; z-index: 5; }
@media (max-width: 1100px) {
  .sidebar { width: 195px; }
  .workspace { margin-left: 195px; }
  main { padding: 28px 22px; }
  .builder { grid-template-columns: 130px minmax(0, 1fr); }
  .preview { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); }
  .preview .bubble { max-width: 300px; margin-top: 15px; }
}
@media (max-width: 650px) {
  .sidebar { position: static; width: 100%; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 0 4px 15px; font-size: 23px; }
  nav { display: flex; overflow-x: auto; gap: 4px; }
  nav a { white-space: nowrap; padding: 10px; font-size: 12px; }
  nav a span, .sidebar-note { display: none; }
  .workspace { margin-left: 0; }
  .topbar { height: 55px; padding: 0 20px; }
  .local-badge { font-size: 10px; }
  .avatar { display: none; }
  main { padding: 26px 18px; }
  h1 { font-size: 25px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .primary { width: 100%; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .platform-tag { padding: 8px 12px; }
  .builder { display: block; }
  .library { border: 0; border-bottom: 1px solid var(--border); }
  .library div { display: inline-block; margin: 3px; padding: 8px; }
  .canvas { min-height: 300px; }
}
/* Editor controls keep transitions usable with touch and keyboard. */
.sidebar { background: #fff; }
.workspace { min-width: 0; }
.topbar { background: #ffffffdd; }
.project-card { box-shadow: 0 4px 20px #17203304; transition: box-shadow .15s, border-color .15s; }
.project-card:hover { border-color: #a8c6ff; box-shadow: 0 8px 28px #1461ed0c; }
button:disabled { opacity: .45; cursor: default; }
.builder { grid-template-columns: 160px minmax(0, 1fr); }
.library button { display: block; width: 100%; margin: 8px 0; text-align: left; font-size: 13px; padding: 10px; }
.canvas { padding: 28px; min-width: 0; }
.node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; align-items: start; }
.node { width: 100%; text-align: left; min-width: 0; }
.node p, .node span { overflow-wrap: anywhere; white-space: pre-wrap; }
.node.selected { outline: 2px solid var(--blue); outline-offset: 3px; }
.properties { background: white; padding: 24px; border: 1px solid var(--border); border-radius: 12px; margin: 20px 0; }
.properties > button { margin: 8px 8px 0 0; }
.field { display: grid; gap: 8px; font-weight: 500; max-width: 720px; }
.field textarea { min-height: 100px; resize: vertical; }
.button-row, .variable-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.button-row { border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.button-row .field, .variable-row .field { flex: 1; min-width: 150px; }
.check-row { display: flex; align-items: center; gap: 12px; font-weight: 400; }
.check-row input { width: 18px; height: 18px; accent-color: var(--blue); }
@media(max-width:650px) { .builder { display: block; } .library { display: flex; flex-wrap: wrap; gap: 6px; } .library h2 { width: 100%; } .library button { width: auto; margin: 0; } .canvas { padding: 18px; } .node-grid { grid-template-columns: 1fr; } .properties { padding: 18px; } .dialog-actions { flex-wrap: wrap; } .project-grid { grid-template-columns: minmax(0,1fr); } }
/* Figma-like workspace: persistent tools, canvas and inspector. */
:root { --blue: #5266eb; --border: #e6e8ef; }
.sidebar { width: 202px; padding: 24px 12px; }
.workspace { margin-left: 202px; }
.brand { font-size: 24px; padding-bottom: 32px; }
nav { gap: 5px; }
nav a { padding: 12px; font-size: 13px; }
nav a.active { background: #eef0ff; color: #485bd6; }
.topbar { height: 64px; padding: 0 26px; }
.local-badge { background: #f2f7f5; color: #48816c; border-radius: 20px; padding: 7px 12px; }
main.editor-page { max-width: none; padding: 0; }
.editor-page > .page-heading { height: 84px; margin: 0; padding: 18px 24px; background: white; border-bottom: 1px solid var(--border); }
.editor-page h1 { font-size: 21px; letter-spacing: -.5px; margin-bottom: 5px; }
.editor-page .page-heading p { font-size: 12px; }
.editor-actions { display: flex; gap: 8px; }
.editor-actions button { font-size: 13px; padding: 10px 16px; }
.builder.editor-shell { grid-template-columns: 188px minmax(220px, 1fr) 292px; border: 0; border-radius: 0; height: calc(100dvh - 148px); min-height: 500px; overflow: hidden; }
.editor-shell .library { padding: 22px 14px; background: #fff; overflow-y: auto; }
.panel-eyebrow { color: #9a9fae; letter-spacing: 1.4px; font-size: 9px; font-weight: 700; margin-bottom: 14px; }
.editor-shell .library h2 { font-size: 14px; margin-bottom: 8px; }
.editor-shell .library > .muted { font-size: 11px; margin-bottom: 22px; }
.library button.library-block { display: flex; gap: 10px; align-items: center; padding: 10px 8px; font-size: 12px; margin: 9px 0; border-color: #e9ebf2; box-shadow: 0 2px 4px #18264b03; }
.block-symbol { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #eef1ff; color: #5869db; font-size: 14px; font-weight: 650; flex: 0 0 26px; }
.symbol-start, .type-start .block-symbol { background: #e7f6ef; color: #3e9d78; }
.symbol-condition, .type-condition .block-symbol { background: #f5edff; color: #9665ce; }
.symbol-end, .type-end .block-symbol { background: #fff0f0; color: #c57b85; }
.symbol-input, .type-input .block-symbol { background: #fff4e4; color: #c28b3d; }
.add-symbol { margin-left: auto; color: #b1b6c5; }
.library-hint { margin-top: 34px; background: #f7f8fd; border: 1px solid #eef0f8; border-radius: 10px; padding: 12px; font-size: 11px; color: #8a91a5; }
.library-hint strong { color: #606a83; font-size: 11px; }
.library-hint p { margin-bottom: 0; }
.editor-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f8f9fc; }
.canvas-bar { display: flex; justify-content: space-between; padding: 13px 18px; background: #ffffffb8; border-bottom: 1px solid var(--border); font-size: 11px; color: #5f6a83; }
.canvas-bar .muted { font-size: 10px; }
.flow-canvas { flex: 1; min-height: 0; }
.canvas-footer { padding: 10px 16px; color: #9bA1b2; font-size: 10px; background: #fcfcfe; border-top: 1px solid var(--border); }
.inspector { border-left: 1px solid var(--border); padding: 22px 18px; background: white; overflow-y: auto; min-width: 0; }
.inspector > h2 { font-size: 14px; }
.inspector .properties { border: 0; padding: 0; margin: 0; }
.inspector .properties h2 { font-size: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.inspector .field { font-size: 11px; margin-top: 18px; }
.inspector input, .inspector select, .inspector textarea { font-size: 12px; padding: 10px; background: #fcfcfe; border-color: #e4e7f0; }
.inspector .dialog-actions { justify-content: flex-start; gap: 6px; margin-top: 24px; }
.inspector button { font-size: 11px; padding: 8px 10px; }
.inspector .button-row { display: block; }
.inspector-empty { font-size: 34px; color: #b5bde0; padding: 50px 0 12px; text-align: center; }
.inspector h3 { font-size: 13px; text-align: center; }
.inspector > .muted { font-size: 12px; line-height: 1.7; text-align: center; }
.inspector-tip { background: #f7f8fd; padding: 14px; margin-top: 30px; font-size: 11px; color: #8991a5; line-height: 1.7; border-radius: 8px; }
.connections-list { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; color: #737e95; font-size: 12px; }
.connections-list summary { cursor: pointer; }
.connection-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.scenario-node { width: 224px; background: #fff; border: 1px solid #dfe4ef; border-radius: 12px; box-shadow: 0 5px 14px #27345809; color: #26334b; }
.scenario-node.is-selected { border-color: #6b7bf0; box-shadow: 0 0 0 3px #6b7bf020, 0 8px 24px #35408d0b; }
.scenario-node-title { padding: 12px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #f0f2f7; }
.scenario-node-title strong { font-size: 12px; font-weight: 600; }
.node-menu { margin-left: auto; color: #a9b0c2; }
.scenario-node-body { padding: 15px 13px; font-size: 11px; line-height: 1.7; color: #8790a4; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 110px; overflow: hidden; }
.scenario-output { position: relative; margin: 0 12px 9px; background: #f7f8fc; border: 1px solid #edf0f7; border-radius: 5px; font-size: 10px; color: #7b86a2; padding: 7px 10px; }
.scenario-node .react-flow__handle { width: 11px; height: 11px; border: 2px solid white; background: #7e8ceb; box-shadow: 0 0 0 1px #a0aaf1; }
.scenario-output .react-flow__handle { right: -18px; }
.react-flow__edge-path { stroke: #8d9aeb; }
.react-flow__edge.selected .react-flow__edge-path { stroke: #485cde; stroke-width: 3; }
.react-flow__controls { display: flex; border: 1px solid #e1e5ef; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 12px #23345a08; }
.react-flow__controls-button { width: 32px; height: 32px; border: 0; border-right: 1px solid #e9edf5; }
.react-flow__minimap { border: 1px solid #e5e8f2; border-radius: 9px; overflow: hidden; width: 130px; height: 85px; }
.editor-page > #validation { position: fixed; bottom: 20px; right: 20px; max-width: 400px; max-height: 40vh; overflow: auto; z-index: 20; box-shadow: 0 8px 32px #25305020; }
@media (max-width:1200px) { .sidebar { width: 176px; } .workspace { margin-left: 176px; } .builder.editor-shell { grid-template-columns: 154px minmax(180px,1fr) 250px; } .library button.library-block { font-size: 11px; gap: 6px; } .editor-shell .library { padding: 18px 10px; } }
@media (max-width:950px) { .sidebar { width: 68px; padding: 24px 8px; } .brand { font-size: 0; padding: 0 10px 30px; } .brand-icon { font-size: 25px; } nav a { font-size: 0; gap: 0; justify-content: center; } nav a span { font-size: 20px; } .sidebar-note { display: none; } .workspace { margin-left: 68px; } .builder.editor-shell { grid-template-columns: 140px minmax(180px,1fr) 230px; } .inspector { padding: 18px 12px; } }
@media (max-width:650px) { .sidebar { position: static; width: 100%; padding: 12px; } .brand { font-size: 20px; padding: 0 4px 12px; } nav a { font-size: 11px; padding: 8px; } nav a span { display: none; } .workspace { margin-left: 0; } .topbar { height: 48px; padding: 0 16px; } .editor-page > .page-heading { padding: 14px; height: auto; gap: 12px; } .editor-page h1 { font-size: 20px; } .builder.editor-shell { display: grid; grid-template-columns: 1fr; height: auto; min-height: 0; } .editor-shell .library { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--border); padding: 12px; } .library .panel-eyebrow, .library > h2, .library > .muted, .library-hint { display: none; } .library button.library-block { width: auto; margin: 0; padding: 6px; font-size: 10px; } .library-block .block-symbol { width: 20px; height: 20px; flex-basis: 20px; font-size: 11px; } .add-symbol { display: none; } .editor-center { height: 480px; } .inspector { border: 0; border-top: 1px solid var(--border); padding: 20px; } .canvas-footer { font-size: 9px; } .inspector-empty, .inspector-tip { display: none; } .editor-page > #validation { left: 12px; right: 12px; } }
.editor-shell .library > div { border: 0; padding: 0; margin-bottom: 14px; border-radius: 0; }
.editor-shell .library > .panel-eyebrow { font-size: 9px; }
.editor-shell .library > .library-hint { border: 1px solid #eef0f8; border-radius: 10px; padding: 12px; margin-top: 34px; }
/* Product guidance and responsive editor panels. */
:root { --muted: #68758a; }
body { background: #f7f8fc; }
.topbar { gap: 12px; }
#breadcrumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.help-button { font-size: 12px; padding: 8px 12px; white-space: nowrap; }
.eyebrow { color: #6574bb; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.welcome-banner { display: flex; justify-content: space-between; gap: 30px; padding: 28px; border: 1px solid #dfe5fb; border-radius: 16px; margin: 0 0 28px; background: linear-gradient(110deg,#f0f3ff,#fff); }
.welcome-banner h2 { font-size: 22px; margin-top: 10px; letter-spacing: -.5px; }
.welcome-banner p { font-size: 13px; color: #68758a; max-width: 540px; margin-bottom: 0; }
.welcome-actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; flex-shrink: 0; }
.welcome-actions button { font-size: 12px; }
button.text-button { background: transparent; border-color: transparent; color: #5365cf; }
button.text-button:hover { background: #eef1ff; }
.editor-tabs { display: none; }
.builder.editor-shell { height: calc(100dvh - 204px); min-height: 420px; }
.editor-center { position: relative; }
.canvas-welcome { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(340px,90%); padding: 28px; text-align: center; background: #ffffffee; border: 1px solid #e5e9f7; border-radius: 18px; box-shadow: 0 12px 40px #243a7008; }
.welcome-icon { display: grid; place-items: center; margin: 0 auto 18px; width: 48px; height: 48px; border: 1px solid #e1e7ff; border-radius: 14px; background: #f1f3ff; color: #6372dc; font-size: 25px; }
.canvas-welcome h2 { font-size: 18px; line-height: 1.4; }
.canvas-welcome p { font-size: 12px; color: #748098; }
.canvas-welcome button { font-size: 12px; width: 100%; margin-top: 8px; }
.property-tip { font-size: 11px; color: #728098; line-height: 1.7; margin: 14px 0 20px; }
.quick-start { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 20px; background: white; border-top: 1px solid var(--border); font-size: 11px; color: #808ba0; flex-wrap: wrap; }
.quick-start strong { color: #35425c; }
.quick-start .step-done { color: #3b8068; }
.quick-start button { font-size: 11px; padding: 6px 8px; }
#guide-dialog { width: min(540px,calc(100% - 32px)); padding: 28px; }
#guide-dialog .dialog-heading { margin-bottom: 20px; }
.guide-dots { display: flex; gap: 6px; }
.guide-dots span { flex: 1; height: 4px; border-radius: 2px; background: #edf0f7; }
.guide-dots .filled { background: #6676ed; }
.guide-content { min-height: 230px; padding-top: 24px; }
.guide-number { color: #9ca8df; font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.guide-content h2 { font-size: 24px; letter-spacing: -.6px; }
.guide-content p { font-size: 14px; color: #68758a; }
.guide-intro { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 32px; text-align: center; margin-bottom: 24px; }
.guide-intro p { color: #68758a; font-size: 14px; max-width: 540px; margin: 16px auto 24px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 18px; }
.guide-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.guide-index { display: block; color: #8896d8; font-size: 14px; font-weight: 700; margin-bottom: 18px; }
.guide-card h2 { font-size: 17px; }
.guide-card p { color: #68758a; font-size: 13px; margin-bottom: 0; }
.faq { max-width: 800px; margin: 36px auto; }
.faq h2 { margin-bottom: 20px; }
.faq details { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-top: 10px; }
.faq summary { cursor: pointer; font-size: 14px; font-weight: 550; line-height: 1.5; }
.faq p { font-size: 13px; color: #68758a; }
.library button:focus-visible, .react-flow__node:focus-visible { outline: 3px solid #8291ff; outline-offset: 3px; }
#main { min-width: 0; }
@media (max-width:1100px) { .quick-start { justify-content: flex-start; gap: 10px 18px; } .quick-start strong { width: 100%; } .builder.editor-shell { height: calc(100dvh - 232px); } .welcome-banner { flex-direction: column; gap: 20px; } .welcome-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; } }
@media (min-width:651px) and (max-width:1000px) { .builder.editor-shell { grid-template-columns: 128px minmax(200px,1fr) 238px; } .library .block-symbol { display: none; } .editor-shell .library > .muted { font-size: 10px; } }
@media (max-width:650px) {
  .sidebar { padding: 12px 12px 8px; }
  nav { gap: 6px; scrollbar-width: thin; }
  nav a { min-height: 40px; flex-shrink: 0; }
  .topbar { height: 54px; gap: 8px; }
  .local-badge { margin-left: auto; font-size: 10px; padding: 5px 7px; white-space: nowrap; }
  .help-button { font-size: 11px; padding: 8px; }
  #breadcrumb { font-size: 11px; }
  .welcome-banner { padding: 22px; }
  .welcome-banner h2 { font-size: 21px; line-height: 1.35; }
  .welcome-actions { flex-direction: column; }
  .welcome-actions button { min-height: 44px; }
  .editor-page > .page-heading { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 16px; }
  .editor-page .page-heading p { font-size: 11px; line-height: 1.5; }
  .editor-actions { width: 100%; }
  .editor-actions button { flex: 1; min-height: 44px; }
  .editor-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--border); gap: 4px; }
  .editor-tabs button { border: 0; background: transparent; padding: 12px 5px; font-size: 12px; color: #6d7891; }
  .editor-tabs button.active { background: #eef0ff; color: #4c5ed7; font-weight: 600; }
  .builder.editor-shell { display: block; min-height: 420px; height: auto; }
  .editor-shell .library, .editor-shell .inspector, .editor-shell .editor-center { display: none; }
  .editor-shell.tab-blocks .library { display: block; padding: 20px; border: 0; }
  .tab-blocks .library > h2, .tab-blocks .library > .muted { display: block; }
  .tab-blocks .library button.library-block { display: flex; width: 100%; min-height: 48px; padding: 12px; font-size: 13px; margin: 10px 0; }
  .tab-blocks .library-block .block-symbol { display: grid; width: 26px; height: 26px; flex-basis: 26px; }
  .editor-shell.tab-canvas .editor-center { display: flex; height: max(440px,55dvh); }
  .editor-shell.tab-properties .inspector { display: block; border: 0; padding: 22px; }
  .inspector input, .inspector select, .inspector textarea { font-size: 16px; min-height: 44px; }
  .inspector button { min-height: 42px; font-size: 12px; }
  .quick-start { font-size: 11px; padding: 16px; gap: 12px; }
  .quick-start span { width: calc(50% - 6px); }
  .canvas-footer { display: none; }
  .canvas-welcome { padding: 22px; }
  .react-flow__minimap { width: 90px; height: 60px; }
  .guide-intro { padding: 24px; }
  .guide-grid { grid-template-columns: minmax(0,1fr); }
  #guide-dialog { padding: 22px; max-height: calc(100dvh - 40px); overflow-y: auto; }
  .guide-content { min-height: 250px; }
  #guide-dialog button { min-height: 44px; }
  .guide-content h2 { font-size: 23px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
.inspector .block-picker { margin: 0 0 22px; }
.inspector .block-picker select { width: 100%; }
@media(max-width:650px) { .tab-blocks .library > .library-hint { display: none; } }
.scenario-node.is-active { border-color: #37a481; box-shadow: 0 0 0 3px #37a48122; }
.chat-mount { display: flex; flex-direction: column; background: #f2f6fa; border: 1px solid #e3e9f2; border-radius: 12px; overflow: hidden; min-width: 0; height: 660px; max-height: 80dvh; }
.inspector:has(.chat-mount) { padding: 10px; }
.inspector .chat-mount { height: calc(100% - 40px); max-height: none; min-height: 340px; }
.chat-heading { display: flex; align-items: center; gap: 9px; padding: 14px 10px; border-bottom: 1px solid #e6eaf2; background: white; }
.chat-heading strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.chat-heading small { display: block; font-size: 10px; color: #7a8a9f; margin-top: 4px; }
.chat-avatar { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: white; background: #6c8ddc; }
.chat-heading .reset-chat { margin-left: auto; border: 0; background: transparent; font-size: 19px; }
.chat-history { padding: 14px 10px; flex: 1; min-height: 150px; overflow-y: auto; background-image: radial-gradient(#c7d5e33b 1px, transparent 1px); background-size: 16px 16px; }
.chat-message { width: fit-content; max-width: 94%; padding: 10px 12px; border-radius: 12px 12px 12px 3px; background: white; color: #35445c; font-size: 12px; line-height: 1.6; box-shadow: 0 2px 4px #324e6a05; margin-bottom: 10px; overflow-wrap: anywhere; }
.chat-message > span { white-space: pre-wrap; }
.chat-message.role-user { background: #e0edff; margin-left: auto; border-radius: 12px 12px 3px 12px; }
.chat-message.role-error { background: #fff0ef; color: #9d4242; }
.chat-message.role-notice { background: #e9eff7; color: #697993; font-size: 11px; box-shadow: none; }
button.chat-choice, a.chat-choice { display: block; margin-top: 6px; width: 100%; border-radius: 6px; background: #f1f5ff; color: #586fc0; text-align: center; border: 1px solid #e1e9fb; padding: 7px 9px; text-decoration: none; font-size: 12px; }
.chat-form { display: flex; align-items: flex-end; gap: 7px; background: white; padding: 10px; border-top: 1px solid #e5ebf4; }
.chat-form textarea { min-height: 40px; max-height: 100px; font-size: 12px; resize: vertical; padding: 10px; }
.chat-form button { flex-shrink: 0; font-size: 18px; width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.chat-keyboard { display: grid; gap: 6px; padding: 8px; background: #eaf0f6; }
.chat-keyboard button { width: 100%; background: white; }
.chat-state { padding: 10px; border-top: 1px solid #e1e8f2; font-size: 10px; color: #718199; background: #fbfcff; }
.chat-state summary { cursor: pointer; }
.chat-state pre { max-height: 130px; overflow: auto; font-size: 11px; }
.chat-empty { text-align: center; padding: 30px 10px; color: #6e7f97; font-size: 12px; }
.chat-empty strong { color: #40546f; font-size: 14px; }
.chat-warning { background: #fff5de; font-size: 11px; color: #8e7133; padding: 10px; }
.chat-warning p { margin-top: 0; }
.typing-indicator { color: #6b81b2; font-size: 11px; padding: 6px; }
.testing-layout { display: grid; grid-template-columns: minmax(260px,500px) minmax(200px,1fr); gap: 28px; }
.test-help { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 24px; height: fit-content; }
.test-help p { font-size: 13px; color: #6a7990; }
.test-help button { margin: 8px 8px 0 0; font-size: 12px; }
.export-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); border: 1px solid var(--border); background: white; border-radius: 12px; overflow: hidden; }
.export-settings { padding: 22px; border-right: 1px solid var(--border); }
.export-settings h2 { font-size: 16px; }
.export-settings h3 { font-size: 12px; margin-top: 24px; }
.export-settings button { display: block; width: 100%; margin: 12px 0; font-size: 12px; }
.export-settings .muted { font-size: 11px; line-height: 1.7; }
.export-settings .file-button { text-align: left; background: #f8f9fd; margin: 6px 0; padding: 8px; }
.export-settings label { font-size: 12px; }
.export-code { min-width: 0; padding: 22px; }
.export-code > button { margin: 8px; font-size: 12px; }
.export-code .source-title { font-size: 13px; }
.source-view { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 12px; line-height: 1.7; padding: 20px; background: #f7f9fc; border: 1px solid #e7ecf5; border-radius: 8px; overflow: auto; max-height: 560px; tab-size: 2; }
.export-instruction p { font-size: 13px; }
@media(max-width:650px) { .editor-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); } .editor-tabs button { font-size: 11px; } .editor-actions { flex-wrap: wrap; } .editor-actions button { font-size: 11px; padding: 10px; min-width: 0; } .editor-shell.tab-test .inspector { display: block; padding: 12px; } .inspector .chat-mount { height: 65dvh; min-height: 420px; } .chat-form textarea { font-size: 16px; } .chat-keyboard button, .chat-choice { min-height: 42px; } .testing-layout, .export-layout { grid-template-columns: minmax(0,1fr); } .export-settings { border-right: 0; border-bottom: 1px solid var(--border); } .export-code { padding: 14px; } .source-view { font-size: 11px; padding: 12px; } .chat-mount { max-height: none; height: 65dvh; min-height: 440px; } }
.editor-actions { flex-wrap: wrap; }
.editor-actions .ai-trigger { background: #f0edff; border-color: #ded7ff; color: #6f4bc4; font-weight: 600; }
.editor-page > .page-heading { height: auto; min-height: 84px; }
#ai-dialog { width: min(640px,calc(100% - 28px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
#ai-dialog textarea { min-height: 125px; line-height: 1.6; }
.ai-provider { padding: 10px 12px; font-size: 11px; background: #f3f0ff; color: #7353b5; border-radius: 8px; }
.ai-privacy { color: #77849b; font-size: 11px; line-height: 1.7; }
.ai-proposal { padding: 18px; background: #f8f9fd; border: 1px solid #e5e9f4; border-radius: 10px; margin-top: 20px; }
.ai-proposal h3 { font-size: 15px; margin-top: 0; }
.ai-proposal p, .ai-proposal li { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.ai-proposal ol { max-height: 210px; overflow-y: auto; padding-left: 22px; }
.ai-error { padding: 12px; background: #fff0ed; color: #a24740; font-size: 12px; border-radius: 8px; }
@media(max-width:650px) { #ai-dialog { padding: 20px; } #ai-dialog textarea { font-size: 16px; } .editor-actions button { flex: 1 1 28%; } }

/* Editor search and button ordering */
.block-search { margin: 16px 24px; min-width: 0; }
.block-search .field { max-width: 460px; margin: 0; }
.block-search-results { max-height: 220px; overflow-y: auto; display: grid; gap: 6px; margin-top: 8px; }
.block-search-results[hidden] { display: none; }
.block-search-result { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.button-order { display: flex; gap: 8px; margin: 8px 0; }
.button-order button { flex: 1; }
button:disabled { cursor: default; opacity: 0.5; }
.ai-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: #f3f5fb; border-radius: 10px; margin: 18px 0 12px; }
.ai-modes button { background: transparent; border: 0; color: #6b7790; font-size: 12px; }
.ai-modes button.active { background: white; color: #6850b4; box-shadow: 0 2px 5px #2532540a; font-weight: 600; }
.ai-context { font-size: 12px; color: #6f7c92; line-height: 1.7; }
.ai-selected { background: #eef2ff; color: #5c6da5; border-radius: 8px; padding: 10px 12px; font-size: 12px; overflow-wrap: anywhere; }
.ai-examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.ai-examples button { font-size: 11px; text-align: left; background: #f6f5fc; border-color: #edeaf8; padding: 8px 10px; }
.ai-change-counts { border-block: 1px solid #e6eaf3; padding: 8px 0; margin: 14px 0; }
.ai-change-counts p { font-size: 11px; color: #6d7892; margin: 5px 0; }
.ai-change-list { list-style: none; padding: 0; max-height: 260px; overflow-y: auto; }
.ai-change-list li { padding: 9px 12px; margin: 7px 0; border-radius: 7px; background: #eef3ff; }
.ai-change-list li.change-added { background: #edf7f2; }
.ai-change-list li.change-removed { background: #fff0ee; }
.ai-change-list li p { margin: 4px 0 0; }
@media(max-width:650px) { .ai-modes button { font-size: 11px; min-height: 44px; } .ai-examples button { width: 100%; } }

/* Workspace: clear tools around one continuous canvas. */
:root { --blue: #6554d9; --border: #e6e5ed; --muted: #727285; background:#f7f7fa; color:#252436; }
.sidebar { background:#faf9fc; width:188px; padding:22px 12px; }
.brand { font-size:24px; padding:0 10px 30px; }
.workspace { margin-left:188px; }
nav { gap:4px; } nav a { padding:12px; font-size:13px; border-radius:9px; }
nav a.active { background:#ece8fa; color:#5943be; }
.topbar { height:56px; padding:0 24px; }
button.primary { background:#6554d9; border-color:#6554d9; } button.primary:hover { background:#5140bc; }
.welcome-banner { background:linear-gradient(115deg,#f0eafb,#f3f5ff); border:1px solid #e8e0f5; }
.is-editor main.editor-page { max-width:none; padding:0; }
.editor-page > .page-heading { min-height:78px; margin:0; padding:14px 22px; background:white; border-bottom:1px solid var(--border); }
.editor-page .page-heading h1 { font-size:20px; letter-spacing:-.5px; margin-bottom:4px; }
.editor-page .page-heading p { font-size:12px; }
.editor-actions { gap:7px; } .editor-actions button { font-size:12px; min-height:36px; }
.editor-actions .ai-trigger { background:#f1ecff; color:#6244bb; border-color:#dfd4fc; }
.builder.editor-shell { height:calc(100dvh - 174px); min-height:480px; border:0; border-radius:0; grid-template-columns:218px minmax(220px,1fr) 296px; }
.editor-shell .library { padding:22px 16px; border-right:1px solid var(--border); }
.editor-shell .library h2 { font-size:16px; }
.editor-shell .library > .muted { font-size:12px; line-height:1.6; margin-bottom:18px; }
.editor-shell .library > .library-levels { display:flex; background:#f1f0f5; padding:3px; border-radius:8px; gap:2px; }
.library-levels button { flex:1; padding:8px 3px; font-size:11px; border:0; background:transparent; }
.library-levels button.active { background:white; box-shadow:0 1px 4px #302a4412; color:#5843bf; }
.library button.library-block { width:100%; padding:13px 10px; min-height:66px; border:1px solid #e9e7ef; border-radius:10px; gap:10px; margin:10px 0; text-align:left; cursor:grab; }
.library button.library-block:active { cursor:grabbing; }
.library button.library-block:hover { border-color:#b6a8ee; background:#faf8ff; box-shadow:0 4px 12px #6654d910; }
.library-copy { display:flex; flex-direction:column; gap:5px; min-width:0; }
.library-copy strong { font-size:13px; font-weight:600; }
.library-copy small { color:#858194; font-size:10px; }
.library .block-symbol { display:grid; width:30px; height:30px; flex-basis:30px; }
.editor-shell .library > .block-search { margin-top:26px; padding-top:18px; border-top:1px solid var(--border); }
.block-search .field { margin:0; } .block-search input { font-size:12px; padding:10px; }
.block-search-results { max-height:160px; overflow:auto; }
.block-search-results button { font-size:11px; text-align:left; }
.library .library-hint { display:none; }
.canvas-bar { padding:12px 18px; background:#fdfcfe; font-size:12px; }
.canvas-footer { background:#fdfcfe; font-size:11px; padding:10px 16px; }
.editor-center { background:#f5f4f8; position:relative; }
.inspector { padding:16px; }
.inspector-tabs { display:flex; padding:4px; background:#f4f3f7; border-radius:8px; margin-bottom:20px; gap:4px; }
.inspector-tabs button { flex:1; border:0; background:transparent; font-size:12px; min-height:34px; padding:6px; }
.inspector-tabs button.active { background:white; color:#5843bf; box-shadow:0 1px 5px #302a4410; }
.inspector .field { font-size:12px; margin-top:16px; }
.inspector input,.inspector select,.inspector textarea { font-size:13px; background:white; }
.inspector textarea { min-height:110px; }
.inspector .property-tip { font-size:12px; color:#777184; line-height:1.7; }
.scenario-node { border-radius:12px; border-color:#dedbe8; box-shadow:0 3px 12px #2d24410a; }
.scenario-node-title strong { font-size:13px; } .scenario-node-body { font-size:12px; color:#686278; }
.scenario-output { font-size:11px; background:#f6f4fa; }
.scenario-node.is-selected { border-color:#8070d9; box-shadow:0 0 0 3px #8066e71c; }
.scenario-node .react-flow__handle { width:13px; height:13px; background:#8470d9; box-shadow:0 0 0 1px #b6a9e0; }
.react-flow__edge-path { stroke:#9584ce; }
.quick-start { margin:0; padding:10px 20px; min-height:40px; background:white; border-top:1px solid var(--border); font-size:11px; border-radius:0; }
.tour-coach { position:fixed; z-index:100; bottom:20px; left:calc(188px + 234px); width:330px; padding:20px; border:1px solid #e0d7f5; border-radius:16px; background:white; box-shadow:0 12px 60px #33234d2b; }
.tour-heading { display:flex; align-items:center; justify-content:space-between; }
.tour-heading .eyebrow { color:#7056bb; font-size:10px; letter-spacing:1px; }
.tour-coach h2 { font-size:19px; margin:10px 0; }
.tour-coach p { font-size:13px; line-height:1.7; } .tour-coach .dialog-actions { margin-top:14px; }
.tour-success { color:#287957; font-weight:600; }
.tour-target { outline:3px solid #9b74ed !important; outline-offset:5px; animation:tour-glow 1.6s ease-in-out infinite; }
.tour-pointer { position:fixed; z-index:101; font-size:36px; pointer-events:none; filter:drop-shadow(0 3px 4px #6244a538); animation:tour-point 1s ease-in-out infinite; }
@keyframes tour-glow { 50% { outline-color:#c1a3fa; } }
@keyframes tour-point { 50% { transform:translateY(7px); } }
@keyframes build-node { from { opacity:0; transform:translateY(15px) scale(.95); } to { opacity:1; transform:none; } }
.ai-reveal .scenario-node { animation:build-node .5s both; }
.ai-reveal .react-flow__node:nth-child(2n) .scenario-node { animation-delay:.12s; }
.ai-reveal .react-flow__node:nth-child(3n) .scenario-node { animation-delay:.24s; }
.ai-working { display:flex; align-items:center; gap:14px; padding:20px; background:#f6f2ff; border-radius:12px; margin:16px 0; }
.ai-orbit { width:30px; height:30px; border:3px solid #e2d7fa; border-top-color:#7856ce; border-radius:50%; animation:ai-spin 1s linear infinite; flex-shrink:0; }
@keyframes ai-spin { to { transform:rotate(360deg); } }
@media(min-width:651px) and (max-width:1150px) { .sidebar { width:64px; padding:22px 6px; } .workspace { margin-left:64px; } .brand { font-size:0; padding:0 12px 28px; } .brand-icon { font-size:26px; } nav a { font-size:0; padding:12px; } nav a span { font-size:21px; } .sidebar-note { display:none; } .builder.editor-shell { grid-template-columns:184px minmax(200px,1fr) 270px; } .tour-coach { left:264px; } }
@media(max-width:650px) { .sidebar { position:relative; width:100%; padding:10px; } .brand { font-size:21px; padding:0 8px 12px; } .workspace { margin-left:0; } nav a { font-size:12px; padding:8px; } .topbar { padding:0 12px; } .editor-page > .page-heading { padding:14px; } .editor-actions { gap:5px; } .editor-actions button { font-size:11px; min-height:40px; } .builder.editor-shell { display:block; height:auto; min-height:440px; } .editor-shell .library { padding:20px; } .library button.library-block { padding:14px; } .library-copy small { font-size:12px; } .quick-start { display:none; } .editor-shell.tab-canvas .editor-center { height:65dvh; } .tour-coach { left:12px; right:12px; bottom:12px; width:auto; padding:16px; max-height:42dvh; overflow:auto; } .tour-coach p { margin:8px 0; } .tour-coach .dialog-actions { margin-top:8px; } .inspector { padding-bottom:300px !important; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; transition:none !important; } }
.account-button { font-size:11px; max-width:180px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.login-card { max-width:520px; padding:40px; background:white; border:1px solid var(--border); border-radius:20px; box-shadow:0 8px 35px #33234d0a; }
.login-card .button { display:block; text-align:center; margin:24px 0; font-weight:600; }
@media(max-width:650px) { .account-button { max-width:110px; font-size:10px; padding:8px; } .topbar { flex-wrap:wrap; height:auto; min-height:56px; padding-top:8px; padding-bottom:8px; } .login-card { padding:24px; } }
.ai-answer { padding:18px; background:#f6f2ff; border-radius:12px; margin:18px 0; }
.ai-answer p { white-space:pre-wrap; font-size:14px; line-height:1.8; }
.canvas-welcome { pointer-events:none; } .canvas-welcome button { pointer-events:auto; }
.inspector:has(.chat-mount) { padding:12px; display:flex; flex-direction:column; overflow:hidden; }
.inspector:has(.chat-mount) .inspector-tabs { flex-shrink:0; margin-bottom:12px; }
.inspector .chat-mount { flex:1; min-height:0; height:auto; }
@media(max-width:650px) { .editor-shell.tab-test .inspector { height:70dvh; padding:12px !important; } }
.inspector .chat-form textarea { min-height:42px; height:42px; max-height:100px; padding:10px; }
.ai-build-note { position:absolute; top:52px; left:16px; right:16px; z-index:4; padding:14px 16px; border:1px solid #ded4f5; border-radius:10px; background:#fdfbff; box-shadow:0 4px 18px #38254c10; max-height:165px; overflow:auto; }
.ai-build-note strong { font-size:12px; color:#6146a6; } .ai-build-note p { font-size:12px; margin:7px 0; } .ai-build-note button { padding:5px 0; font-size:12px; }
/* BotForge generated brand mark */
.brand { display: flex; align-items: center; gap: 9px; }
.brand-logo { width: 36px; height: 36px; flex: 0 0 36px; object-fit: contain; }
@media (max-width: 650px) { .brand-logo { width: 30px; height: 30px; flex-basis: 30px; } }
.ai-run-options { display:grid; gap:12px; padding:14px; margin:16px 0; background:#f6f4fa; border-radius:10px; }
.ai-run-options label { display:flex; align-items:center; gap:10px; font-size:13px; cursor:pointer; }
.ai-run-options input { width:18px; height:18px; flex:0 0 18px; accent-color:var(--blue); }
.editor-actions { flex-wrap:wrap; justify-content:flex-end; }
