:root {
  color-scheme: dark;
  --bg: #07100d;
  --grid: rgba(91, 132, 111, 0.22);
  --panel: #111e18;
  --panel2: #172720;
  --line: #365445;
  --line2: #5b806b;
  --text: #eff8f0;
  --muted: #b8c8bd;
  --accent: #ffd36e;
  --accent2: #7dd3fc;
  --danger: #ff9e8a;
  --good: #9be7b1;
  --shadow: rgba(0,0,0,.48);
  --editor-width: 390px;
  --minimap-width: 180px;
  --minimap-height: 116px;
  --grid-size: 42px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.aisop-bridge { flex: 0 0 auto; }

button, select, input, textarea {
  font: inherit;
  border: 1px solid #5d7665;
  border-radius: 9px;
}
button, select {
  min-height: 32px;
  background: #e8e0cf;
  color: #111812;
}
button { padding: .34rem .62rem; cursor: pointer; }
button:hover:not(:disabled), select:hover { filter: brightness(1.05); }
button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
button:disabled { opacity: .48; cursor: not-allowed; }
select { padding: .3rem 2rem .3rem .52rem; max-width: min(48vw, 330px); }
input, textarea {
  width: 100%;
  min-height: 32px;
  padding: .36rem .48rem;
  background: #0b1712;
  color: var(--text);
  border-color: #486352;
}
input[type="color"] { padding: 2px; min-height: 34px; }
textarea { min-height: 72px; resize: vertical; }
.topbar {
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  gap: .48rem;
  align-items: center;
  padding: .28rem .55rem;
  background: linear-gradient(180deg, #15241d, #0f1b16);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 18px rgba(0,0,0,.35);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: var(--line2) transparent;
}


.brand { display: inline-flex; align-items: center; gap: .4rem; color: var(--text); text-decoration: none; white-space: nowrap; margin-right: .15rem; }
.brand-logo { width: 29px; height: 29px; border-radius: 8px; box-shadow: 0 0 0 1px #7aa289; background:#07100d; }
.brand-text { font-weight: 760; letter-spacing: .02em; }
.brand-subtitle { color: var(--muted); font-size: .84rem; letter-spacing: .01em; }
.example-picker { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; color: var(--muted); }
.example-picker span { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.toolbar-actions { display: inline-flex; gap: .38rem; align-items: center; white-space: nowrap; }
.popup-toggle { min-width: 92px; }
.popup-toggle.is-off { background:#18281f; color:var(--muted); border-color:#58705f; }
.zoom-controls { display:inline-flex; align-items:center; gap:.28rem; padding:.12rem .28rem; border:1px solid rgba(93,118,101,.7); border-radius:12px; background:rgba(8,18,14,.45); }
.zoom-controls button { min-width:28px; min-height:28px; padding:.05rem .42rem; font-weight:800; }
.zoom-controls input[type="range"] { width:112px; min-height:26px; padding:0; accent-color: var(--accent); }
.zoom-controls span { color:var(--muted); min-width:3.25rem; text-align:right; font-size:.82rem; }
.status-text { margin: 0 0 0 auto; color: var(--muted); white-space: nowrap; font-size: .88rem; }
.app-shell { position: relative; display: flex; flex: 1 1 auto; height: auto; min-height: 0; }
.canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(74,124,98,.18), transparent 32%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--bg);
  background-size: auto, var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), auto;
}
.canvas-wrap.hide-grid { background: radial-gradient(circle at 15% 20%, rgba(74,124,98,.18), transparent 32%), var(--bg); }
#flowCanvas { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; }
.edge { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .88; filter: drop-shadow(0 1px 3px rgba(0,0,0,.55)); }
.edge-hit { fill: none; stroke: transparent; stroke-width: 34; cursor: pointer; }
.edge.is-selected { stroke: var(--accent) !important; opacity: 1; }
.edge-preview { fill: none; stroke: var(--accent); stroke-width: 6; stroke-dasharray: 14 10; opacity: .9; pointer-events: none; }
.edge-label { fill: #f3f7eb; paint-order: stroke; stroke: #07100d; stroke-width: 5px; stroke-linejoin: round; pointer-events: none; }
.node { cursor: grab; }
.node.dragging { cursor: grabbing; }
.node-shape { filter: drop-shadow(0 8px 14px rgba(0,0,0,.42)); }
.node.is-selected .node-shape, .node.edge-source .node-shape { stroke: var(--accent) !important; stroke-width: 8 !important; }
.node-title { fill: var(--text); paint-order: stroke; stroke: #07100d; stroke-width: 6px; stroke-linejoin: round; font-weight: 760; pointer-events: none; }
.node-subtitle { fill: #ecf4e8; paint-order: stroke; stroke: #07100d; stroke-width: 4px; pointer-events: none; }
.annotation-box { fill: rgba(15, 27, 22, .92); stroke: #6b8f78; stroke-width: 2; }
.annotation-text { fill: #dbeadf; font-size: 20px; pointer-events: none; }
.annotation-box, .metadata-popup, .resource-card, .empty-state, .warning, .drawer, .editor-fields { box-sizing: border-box; }
.resource-card, .empty-state, .warning, .drawer-note, .field .hint, .sop-viewer, .kv span, td, th { overflow-wrap: anywhere; word-break: normal; }
.minimap { position: absolute; right: .75rem; bottom: .75rem; width: var(--minimap-width); height: var(--minimap-height); min-width: 140px; min-height: 90px; max-width: 25%; max-height: 25%; border: 1px solid #6f8a77; border-radius: 12px; background: rgba(17,30,24,.88); box-shadow: 0 12px 34px var(--shadow); overflow: hidden; pointer-events: auto; display: grid; grid-template-rows: 24px 1fr; }
#minimapSvg { width: 100%; height: 100%; display: block; min-height: 0; }
.legend { position: absolute; left: .75rem; bottom: .75rem; display: flex; gap: .62rem; align-items: center; padding: .38rem .5rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(17,30,24,.86); box-shadow: 0 12px 34px var(--shadow); color: var(--muted); font-size: .84rem; }
.dot { display: inline-block; width: .72rem; height: .72rem; border-radius: 50%; margin-right: .25rem; vertical-align: -1px; }
.dot.process { background: #a5baf7; } .dot.decision { background: #ffd37a; } .dot.rework { background: #ff9e8a; }
.metadata-popup { position: absolute; z-index: 30; width: min(390px, calc(100vw - 1.5rem)); max-height: min(54vh, 460px); display: none; overflow: auto; padding: .74rem; border: 1px solid var(--line2); border-radius: 15px; background: rgba(17,30,24,.97); box-shadow: 0 18px 54px var(--shadow); backdrop-filter: blur(4px); }
.metadata-popup.open { display: block; }
.popup-head, .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .45rem; }
.popup-head h2, .drawer h2 { margin: 0; font-size: 1rem; }
.popup-head button, .drawer-head button { min-width: 32px; padding: .05rem .52rem; font-size: 1.3rem; line-height: 1; }
.details { display: grid; gap: .45rem; }
.kv { display: grid; grid-template-columns: minmax(5.8rem, 8.2rem) minmax(0, 1fr); gap: .5rem; border-bottom: 1px solid rgba(91,128,107,.35); padding: .31rem 0; }
.kv b { color: #dff4e5; min-width:0; overflow-wrap:anywhere; } .kv span { color: var(--muted); min-width:0; overflow-wrap: anywhere; }
.popup-actions { display:flex; gap:.45rem; margin-top:.55rem; }
.editor-panel { position: relative; flex: 0 0 var(--editor-width); width: var(--editor-width); min-width: 280px; max-width: min(52vw, 560px); height: 100%; background: rgba(17,30,24,.98); border-left: 1px solid var(--line); box-shadow: -10px 0 35px rgba(0,0,0,.32); display: flex; flex-direction: column; z-index: 22; }
.editor-panel.collapsed { flex-basis: 42px; width: 42px; min-width: 42px; overflow: hidden; }
.panel-resizer { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: ew-resize; }
.editor-panel.collapsed .panel-resizer, .editor-panel.collapsed .editor-tabs, .editor-panel.collapsed .editor-fields, .editor-panel.collapsed #editorSubhead, .editor-panel.collapsed .editor-head h2 { display:none; }
.editor-head { display:flex; justify-content:space-between; align-items:flex-start; gap:.6rem; padding:.8rem .8rem .55rem; border-bottom:1px solid rgba(91,128,107,.35); }
.editor-head h2 { margin:0; font-size:1.05rem; }
.editor-head p { margin:.2rem 0 0; color:var(--muted); font-size:.86rem; }
#togglePanel { min-width:30px; min-height:30px; padding:.08rem .42rem; font-size:1.2rem; }
.editor-panel.collapsed #togglePanel { transform: rotate(180deg); margin:.45rem auto; }
.editor-tabs { display:flex; gap:.35rem; padding:.55rem .65rem; border-bottom:1px solid rgba(91,128,107,.35); }
.editor-tabs .tab { flex:1; padding:.28rem .25rem; min-height:30px; font-size:.86rem; background:#13241c; color:var(--muted); }
.editor-tabs .tab.active { background:#e8e0cf; color:#111812; }
.editor-fields { overflow:auto; padding:.7rem .8rem 1.2rem; }
.field-grid { display:grid; gap:.58rem; }
.field { display:grid; gap:.24rem; }
.field label { color:#dff4e5; font-weight:680; font-size:.86rem; }
.field .hint { color:var(--muted); font-size:.78rem; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
.editor-actions { display:flex; flex-wrap:wrap; gap:.45rem; margin:.65rem 0 .25rem; }
.editor-actions button.danger { background:#ffd0c8; border-color:#b66456; }
.empty-state { color:var(--muted); border:1px dashed var(--line2); border-radius:12px; padding:.8rem; }
.drawer { background: rgba(17,30,24,.97); border: 1px solid var(--line); box-shadow: 0 18px 54px var(--shadow); overflow: auto; padding: .82rem; backdrop-filter: blur(4px); }
.drawer-note { margin: 0 0 .55rem; color: var(--muted); font-size: .9rem; }
.data-drawer { position: absolute; z-index: 26; left: .75rem; right: calc(var(--editor-width) + .75rem); bottom: .75rem; max-height: 36vh; display: none; border-radius: 16px; }
.editor-panel.collapsed ~ .data-drawer, .app-shell.panel-collapsed .data-drawer { right: .75rem; }
.data-drawer.open { display: block; }
.table-host { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 760px; }
th, td { text-align: left; border-bottom: 1px solid rgba(91,128,107,.38); padding: .42rem .5rem; vertical-align: top; }
th { color: #e8f8e8; background: rgba(32,53,43,.72); position: sticky; top: 0; }
td { color: var(--muted); }
body.mode-add-node .canvas-wrap { cursor: crosshair; }
body.mode-add-edge .canvas-wrap { cursor: cell; }
@media (max-width: 960px) {
  .status-text { display: none; }
  .brand-subtitle { display:none; }
  .app-shell { display:block; }
  .canvas-wrap { position:absolute; inset:0; }
  .editor-panel { position:absolute; z-index:28; left:.65rem; right:.65rem; bottom:.65rem; top:auto; width:auto; max-width:none; min-width:0; height:min(48vh, 430px); border:1px solid var(--line); border-radius:16px; }
  .editor-panel.collapsed { width:auto; height:42px; min-width:0; }
  .panel-resizer { display:none; }
  .metadata-popup { left: .65rem !important; right: .65rem !important; top: auto !important; bottom: .65rem !important; width: auto; max-height: 46vh; }
  .data-drawer { left: .65rem; right: .65rem; bottom: .65rem; max-height: 48vh; }
  .minimap { position: absolute; right: .75rem; bottom: .75rem; width: var(--minimap-width); height: var(--minimap-height); min-width: 140px; min-height: 90px; max-width: 25%; max-height: 25%; border: 1px solid #6f8a77; border-radius: 12px; background: rgba(17,30,24,.88); box-shadow: 0 12px 34px var(--shadow); overflow: hidden; pointer-events: auto; display: grid; grid-template-rows: 24px 1fr; }
  .legend { right: .65rem; left: .65rem; justify-content: center; bottom: .55rem; }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .topbar { height: 92px; align-content: flex-start; flex-wrap: wrap; gap: .32rem; padding: .34rem .45rem; }
  .app-shell { height: auto; }
  .brand-text { display: inline; }
  .brand-subtitle { display:none; }
  .brand-logo { width:24px; height:24px; }
  .zoom-controls { padding:.06rem .18rem; gap:.18rem; }
  .zoom-controls input[type="range"] { width:82px; }
  .zoom-controls span { display:none; }
  .example-picker { width: calc(100vw - 58px); }
  .example-picker select { flex: 1; max-width: none; }
  .toolbar-actions { width: 100%; overflow-x: auto; padding-bottom: .15rem; }
  .legend { font-size:.78rem; }
  .field-row { grid-template-columns:1fr; }
}

.minimap-head { display:flex; align-items:center; justify-content:space-between; gap:.35rem; padding:.15rem .4rem; color:#d8eadc; font-size:.72rem; border-bottom:1px solid rgba(111,138,119,.55); background:rgba(8,18,14,.55); user-select:none; }
.minimap-head button { min-height:18px; min-width:22px; padding:0 .25rem; border-radius:6px; font-size:.8rem; }
.minimap-resize { position:absolute; left:0; top:24px; width:22px; height:22px; cursor: nwse-resize; background:linear-gradient(315deg, transparent 0 43%, rgba(255,211,110,.95) 44% 58%, transparent 59% 100%); border-top:1px solid rgba(255,211,110,.35); border-left:1px solid rgba(255,211,110,.35); border-bottom-right-radius:8px; }
.editor-tabs { flex-wrap: wrap; }
.editor-tabs .tab { flex: 1 1 auto; min-width: 82px; }
.resource-section { display:grid; gap:.55rem; }
.resource-group { border:1px solid rgba(91,128,107,.55); border-radius:13px; padding:.55rem; background:rgba(8,18,14,.45); }
.resource-group h3 { margin:.05rem 0 .45rem; font-size:.92rem; color:#ecf7ed; }
.resource-cards { display:grid; gap:.45rem; }
.resource-card { display:grid; grid-template-columns:2rem 1fr auto; gap:.5rem; align-items:start; padding:.48rem; border:1px solid rgba(111,138,119,.45); border-radius:11px; background:rgba(23,39,32,.82); }
.resource-icon { width:1.8rem; height:1.8rem; display:grid; place-items:center; border-radius:9px; background:rgba(255,211,110,.14); border:1px solid rgba(255,211,110,.38); font-size:1.05rem; }
.resource-card b { display:block; font-size:.9rem; }
.resource-card p { margin:.16rem 0 0; color:var(--muted); font-size:.78rem; }
.resource-card small { color:#9bb6a4; }
.resource-card button { min-height:26px; padding:.15rem .42rem; white-space:nowrap; font-size:.8rem; }
.sop-viewer { display:grid; gap:.6rem; }
.sop-viewer h3 { margin:0; font-size:1.05rem; }
.sop-meta { color:var(--muted); font-size:.84rem; }
.sop-list { margin:.2rem 0 0 1.1rem; padding:0; color:#dfeee2; }
.sop-list li { margin:.24rem 0; }
.warning-list { display:grid; gap:.3rem; }
.warning { border:1px solid rgba(255,211,110,.42); background:rgba(255,211,110,.10); border-radius:10px; padding:.42rem; color:#ffe6a1; font-size:.82rem; }
.mode-add-edge .canvas-wrap { cursor: crosshair; }
.mode-add-node .canvas-wrap { cursor: copy; }
.edge-source .node-shape { stroke: var(--accent) !important; stroke-width: 8 !important; }
@media (max-width: 960px) {
  .minimap { display:none !important; }
  .editor-tabs .tab { min-width: 74px; font-size:.82rem; }
}

/* 20260531_02 uFlow mobile usability pass: scoped to uFlow only. */
.mobile-actionbar,
.mobile-more-sheet { display: none; }
body.uflow-page {
  min-height: 100vh;
  min-height: 100dvh;
}
body.uflow-page button.active,
body.uflow-page .mobile-action.active {
  background: linear-gradient(135deg, var(--accent), #ffe8a9);
  color: #0f160f;
  border-color: rgba(255, 211, 110, .92);
  box-shadow: 0 0 0 1px rgba(255, 211, 110, .22), 0 8px 22px rgba(0,0,0,.28);
}
body.uflow-page.mobile-more-open .mobile-more-sheet {
  display: block;
}
body.uflow-page .canvas-wrap { min-height: 0; }
body.uflow-page .edge-hit { stroke-width: 42; }

@media (max-width: 760px) {
  body.uflow-page .aisop-bridge { position: static; flex: 0 0 auto; }
  body.uflow-page .aisop-bridge__inner {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    max-width: none;
    overflow: hidden;
  }
  body.uflow-page .aisop-bridge__brand { flex: 0 0 auto; }
  body.uflow-page .aisop-bridge__mark { width: 25px; height: 25px; border-radius: 9px; }
  body.uflow-page .aisop-bridge__brand strong { font-size: .82rem; }
  body.uflow-page .aisop-bridge__brand span:last-child { display: none; }
  body.uflow-page .aisop-bridge__nav {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    gap: 5px;
    padding: 0 2px 2px;
  }
  body.uflow-page .aisop-bridge__nav::-webkit-scrollbar { display: none; }
  body.uflow-page .aisop-bridge__nav a {
    white-space: nowrap;
    font-size: .74rem;
    padding: 7px 9px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 700px) {
  body.uflow-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  body.uflow-page .topbar {
    flex: 0 0 auto;
    height: auto;
    min-height: 54px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .36rem .45rem;
    padding: .32rem .45rem;
    overflow: visible;
  }
  body.uflow-page .brand {
    min-width: 0;
    margin: 0;
  }
  body.uflow-page .brand-logo { width: 24px; height: 24px; border-radius: 7px; }
  body.uflow-page .brand-text { font-size: .94rem; }
  body.uflow-page .brand-subtitle { display: none; }
  body.uflow-page .example-picker {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
    gap: .32rem;
  }
  body.uflow-page .example-picker span { font-size: .67rem; letter-spacing: .06em; }
  body.uflow-page .example-picker select {
    width: 100%;
    max-width: 100%;
    min-height: 36px;
    font-size: 16px;
  }
  body.uflow-page .toolbar-actions,
  body.uflow-page .status-text { display: none; }

  body.uflow-page .mobile-actionbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    padding: 5px 6px 6px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(17,30,24,.98), rgba(10,19,15,.98));
    box-shadow: 0 8px 22px rgba(0,0,0,.24);
    z-index: 60;
  }
  body.uflow-page .mobile-actionbar button,
  body.uflow-page .mobile-more-sheet button {
    min-height: 39px;
    padding: .28rem .2rem;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 760;
  }
  body.uflow-page .mobile-actionbar button { width: 100%; }
  body.uflow-page .mobile-more-sheet {
    position: fixed;
    z-index: 12000;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    max-height: min(58dvh, 430px);
    overflow: auto;
    padding: .72rem;
    border: 1px solid rgba(255, 211, 110, .46);
    border-radius: 17px;
    background: rgba(12, 22, 17, .98);
    box-shadow: 0 26px 72px rgba(0,0,0,.58);
    backdrop-filter: blur(8px);
  }
  body.uflow-page .mobile-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .58rem;
  }
  body.uflow-page .mobile-more-head strong { font-size: .98rem; }
  body.uflow-page #mobileMoreCloseBtn {
    width: 40px;
    min-width: 40px;
    font-size: 1.25rem;
    line-height: 1;
  }
  body.uflow-page .mobile-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
  }
  body.uflow-page .mobile-status-text {
    margin: .62rem 0 0;
    color: var(--muted);
    font-size: .8rem;
    overflow-wrap: anywhere;
  }

  body.uflow-page .app-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    display: block;
    position: relative;
  }
  body.uflow-page .canvas-wrap {
    position: absolute;
    inset: 0;
    min-height: 0;
  }
  body.uflow-page #flowCanvas {
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  body.uflow-page .legend {
    left: .45rem;
    right: .45rem;
    bottom: .45rem;
    justify-content: center;
    gap: .36rem;
    flex-wrap: wrap;
    padding: .32rem .42rem;
    border-radius: 13px;
    font-size: .72rem;
    pointer-events: none;
  }
  body.uflow-page .minimap {
    display: none !important;
    right: .5rem;
    top: .5rem;
    bottom: auto;
    width: min(40vw, 150px) !important;
    height: 92px !important;
    min-width: 124px;
    min-height: 82px;
    max-width: none;
    max-height: none;
  }
  body.uflow-page.mobile-map-open .minimap {
    display: grid !important;
  }
  body.uflow-page .minimap-resize { display: none; }

  body.uflow-page .editor-panel {
    position: absolute;
    z-index: 90;
    left: .5rem;
    right: .5rem;
    bottom: .5rem;
    top: auto;
    width: auto;
    max-width: none;
    min-width: 0;
    height: min(62dvh, 500px);
    max-height: calc(100dvh - 170px);
    border: 1px solid var(--line2);
    border-radius: 17px;
    box-shadow: 0 -18px 52px rgba(0,0,0,.48);
  }
  body.uflow-page .editor-panel.collapsed {
    height: 43px;
    min-height: 43px;
    overflow: hidden;
  }
  body.uflow-page .editor-head {
    min-height: 42px;
    padding: .52rem .64rem .44rem;
    cursor: default;
  }
  body.uflow-page .editor-head h2 { font-size: .98rem; }
  body.uflow-page .editor-head p { display: none; }
  body.uflow-page #togglePanel {
    min-width: 38px;
    min-height: 34px;
    font-size: 1.05rem;
  }
  body.uflow-page .editor-panel.collapsed #togglePanel {
    transform: rotate(270deg);
    margin: 0;
  }
  body.uflow-page .editor-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: .35rem;
    padding: .45rem .55rem;
    -webkit-overflow-scrolling: touch;
  }
  body.uflow-page .editor-tabs .tab {
    flex: 0 0 auto;
    min-width: 96px;
    min-height: 38px;
    font-size: .8rem;
  }
  body.uflow-page .editor-fields {
    padding: .58rem .64rem 1rem;
    overscroll-behavior: contain;
  }
  body.uflow-page .field-row { grid-template-columns: 1fr; gap: .48rem; }
  body.uflow-page .field label { font-size: .82rem; }
  body.uflow-page input,
  body.uflow-page select,
  body.uflow-page textarea {
    min-height: 40px;
    font-size: 16px;
  }
  body.uflow-page textarea { min-height: 92px; }
  body.uflow-page .editor-actions button { flex: 1 1 130px; min-height: 42px; }

  body.uflow-page .metadata-popup {
    position: absolute;
    left: .5rem !important;
    right: .5rem !important;
    top: auto !important;
    bottom: .5rem !important;
    width: auto;
    max-height: 46dvh;
    border-radius: 17px;
  }
  body.uflow-page .data-drawer {
    left: .5rem;
    right: .5rem;
    bottom: .5rem;
    max-height: 60dvh;
    border-radius: 17px;
    z-index: 100;
  }
  body.uflow-page .drawer-head h2 { font-size: .98rem; }
  body.uflow-page .table-host { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body.uflow-page table { font-size: .78rem; min-width: 720px; }
  body.uflow-page th,
  body.uflow-page td { padding: .34rem .4rem; }
  body.uflow-page .resource-card { grid-template-columns: 1.8rem minmax(0, 1fr); }
  body.uflow-page .resource-card button { grid-column: 1 / -1; width: 100%; min-height: 38px; }
  body.uflow-page .kv { grid-template-columns: minmax(4.8rem, 6.4rem) minmax(0, 1fr); gap: .38rem; }
}

@media (max-width: 430px) {
  body.uflow-page .aisop-bridge__nav a { font-size: .7rem; padding: 6px 8px; }
  body.uflow-page .topbar { grid-template-columns: 1fr; min-height: 80px; }
  body.uflow-page .brand { justify-content: center; }
  body.uflow-page .example-picker { justify-content: stretch; }
  body.uflow-page .example-picker span { display: none; }
  body.uflow-page .mobile-actionbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body.uflow-page .mobile-actionbar button { min-height: 37px; font-size: .75rem; }
  body.uflow-page .legend { display: none; }
  body.uflow-page .editor-panel { max-height: calc(100dvh - 178px); }
}

