:root {
  --bg: #0b0e16;
  --surface: #13171f;
  --surface-2: #1a1f2e;
  --border: #1f2937;
  --border-soft: #374151;
  --indigo: #6366f1;
  --indigo-dim: #4f46e5;
  --indigo-text: #a5b4fc;
  --indigo-bg: rgba(30, 27, 75, .3);
  --amber: #f59e0b;
  --amber-text: #fef9ee;
  --green: #22c55e;
  --green-text: #86efac;
  --red: #f87171;
  --muted: #6b7280;
  --text: #e2e8f0;
  --font: -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
}

/* Note: --amber, --amber-text, --indigo-dim are used by app.js SVG rendering via inline styles */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

button {
  font: inherit;
  cursor: pointer;
}

/* ===== APP SHELL ===== */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ===== TOPBAR ===== */

.topbar {
  height: 52px;
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.topbar::-webkit-scrollbar { display: none; }

.topbar-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  white-space: nowrap;
  margin-right: 3px;
  user-select: none;
  cursor: default;
  line-height: 1;
  gap: 2px;
}

.topbar-logo-name {
  font-size: .88rem;
  font-weight: 800;
  color: var(--indigo-text);
  letter-spacing: .02em;
}

.topbar-logo-tag {
  font-size: .55rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.topbar-logo-version {
  font-size: .5rem;
  font-weight: 500;
  color: var(--muted);
  opacity: .55;
  letter-spacing: .05em;
}

.topbar-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 3px;
}

.topbar-spacer {
  flex: 1;
  min-width: 8px;
}

.topbar-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ===== TOOL GROUP ===== */

.tool-group {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.tool-btn {
  width: 44px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, color .12s;
  position: relative;
}

.tool-btn kbd {
  position: absolute;
  bottom: 3px;
  right: 4px;
  font-size: .45rem;
  font-family: monospace;
  background: none;
  border: none;
  padding: 0;
  color: var(--border-soft);
}

.tool-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.tool-btn.active {
  background: #1e1b4b;
  color: var(--indigo-text);
}

/* ===== ACTION PILLS ===== */

.action-pill {
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: border-color .12s, color .12s, background .12s;
}

.action-pill:hover:not(:disabled) {
  border-color: var(--border-soft);
  color: var(--text);
}

.action-pill.primary {
  border-color: rgba(99, 102, 241, .35);
  background: rgba(30, 27, 75, .3);
  color: var(--indigo-text);
}

.action-pill.primary:hover:not(:disabled) {
  border-color: var(--indigo);
  background: rgba(30, 27, 75, .6);
}

.action-pill.success {
  border-color: rgba(34, 197, 94, .25);
  background: rgba(3, 26, 13, .35);
  color: var(--green-text);
}

.action-pill.success:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green-text);
}

.action-pill.warning {
  border-color: rgba(245, 158, 11, .28);
  background: rgba(120, 53, 15, .2);
  color: var(--amber);
}

.action-pill.warning:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber-text);
}

.action-pill.danger {
  border-color: rgba(248, 113, 113, .2);
  color: rgba(248, 113, 113, .65);
}

.action-pill.danger:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
}

.action-pill:disabled {
  opacity: .35;
  cursor: default;
}

/* ===== MAIN AREA (explorer + workspace) ===== */

.main-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ===== PROJECT EXPLORER ===== */

.project-explorer {
  width: 230px;
  min-width: 140px;
  max-width: 520px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: width .2s ease;
}

.project-explorer.resizing { transition: none; user-select: none; }

.pe-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  z-index: 20;
  transition: background .15s;
}

.pe-resize-handle:hover,
.pe-resize-handle.dragging { background: rgba(99, 102, 241, .4); }

.project-explorer.collapsed .pe-resize-handle { display: none; }

.project-explorer.collapsed {
  width: 36px;
  min-width: 36px;
}

.project-explorer.collapsed .pe-search-wrap,
.project-explorer.collapsed .tab-bar-vertical,
.project-explorer.collapsed .pe-footer,
.project-explorer.collapsed .pe-title,
.project-explorer.collapsed .pe-icon-btn {
  display: none;
}

.project-explorer.collapsed .pe-header {
  padding: 0;
  justify-content: center;
}

.project-explorer.collapsed .pe-toggle {
  transform: scaleX(-1);
  margin: 0;
}

.pe-header {
  height: 36px;
  padding: 0 6px 0 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pe-header-btns {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.pe-icon-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  border-radius: 4px;
  padding: 0;
  line-height: 1;
  transition: color .12s, background .12s;
}

.pe-icon-btn:hover { color: var(--indigo-text); background: rgba(99, 102, 241, .15); }

.pe-new-goal-btn {
  height: 22px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .02em;
  transition: color .12s, background .12s, border-color .12s;
}

.pe-new-goal-btn:hover {
  color: var(--indigo-text);
  background: rgba(99, 102, 241, .15);
  border-color: rgba(99, 102, 241, .4);
}

.project-explorer.collapsed .pe-new-goal-btn { display: none; }

.pe-title {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}

.pe-toggle {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: .95rem;
  border-radius: 4px;
  padding: 0;
  transition: color .12s, background .12s;
  line-height: 1;
}

.pe-toggle:hover { color: var(--text); background: var(--surface-2); }

/* Search box */
.pe-search-wrap {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pe-search {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: .75rem;
  color: var(--text);
  outline: none;
  transition: border-color .12s;
}

.pe-search::placeholder { color: var(--border-soft); }
.pe-search:focus { border-color: var(--indigo); }
.pe-search::-webkit-search-cancel-button { filter: invert(.4); cursor: pointer; }

/* File list */
.tab-bar-vertical {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tab-bar-vertical::-webkit-scrollbar { width: 3px; }
.tab-bar-vertical::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.pe-empty {
  padding: 12px 12px;
  font-size: .73rem;
  color: var(--border-soft);
  font-style: italic;
}

/* File-list item style */
.tab-chip {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 0 8px 0 0;
  height: 28px;
  border: none;
  border-left: 2px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .08s;
  user-select: none;
  min-width: 0;
}

.tab-chip:hover { background: rgba(255, 255, 255, .04); }

.tab-chip.active {
  background: rgba(99, 102, 241, .12);
  border-left-color: var(--indigo);
}

.tc-icon {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  color: var(--muted);
}

.tab-chip.active .tc-icon { color: var(--indigo-text); }
.tab-chip.closed .tc-icon { color: var(--green); }

.tc-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
}

.tab-chip.active .tc-name { color: var(--text); font-weight: 600; }
.tab-chip:hover:not(.active) .tc-name { color: var(--text); }
.tab-chip.closed .tc-name { color: var(--green-text); }

.tc-meta {
  flex-shrink: 0;
  font-size: .62rem;
  color: var(--border-soft);
  margin-left: 6px;
  white-space: nowrap;
}

.tab-chip.closed .tc-meta { color: rgba(34, 197, 94, .55); }

/* ===== TREE VIEW (closed tabs) ===== */

.tc-tree {
  margin: 0 0 4px 14px;
  border-left: 1.5px solid rgba(34, 197, 94, .25);
  padding: 3px 0 3px;
  background: rgba(34, 197, 94, .03);
}

.tc-tree.open {
  border-left-color: rgba(99, 102, 241, .3);
  background: rgba(99, 102, 241, .03);
}

.tc-tree-empty {
  padding: 4px 10px;
  font-size: .68rem;
  color: var(--border-soft);
  font-style: italic;
}

.tc-tree-row {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  height: 22px;
  min-width: 0;
  padding-right: 8px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .08s;
}

.tc-tree-row:hover { background: rgba(34, 197, 94, .07); }

.tc-tree-row.goal .tc-tree-icon { color: var(--green); }
.tc-tree-row.goal .tc-tree-label { color: var(--green-text); font-weight: 600; }
.tc-tree-row.done .tc-tree-label { text-decoration: line-through; opacity: .6; }

.tc-tree-row.match .tc-tree-label {
  color: #fde68a;
  font-weight: 600;
}

.tc-tree-icon {
  flex-shrink: 0;
  font-size: .65rem;
  color: rgba(34, 197, 94, .4);
  width: 12px;
  text-align: center;
}

.tc-tree-row.done .tc-tree-icon { color: var(--green); opacity: .7; }

.tc-tree-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .72rem;
  color: rgba(134, 239, 172, .65);
}

/* ===== EXPLORER FOOTER ===== */

.pe-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.new-goal-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--indigo);
  background: rgba(99, 102, 241, .14);
  color: var(--indigo-text);
  font-size: .7rem;
  font-weight: 600;
  transition: background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}

.new-goal-btn:hover {
  background: rgba(99, 102, 241, .28);
  border-color: var(--indigo-text);
  box-shadow: 0 0 12px rgba(99, 102, 241, .25);
}

.new-goal-icon {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 400;
}

/* ===== WORKSPACE + CANVAS ===== */

.workspace {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.canvas-frame {
  position: absolute;
  inset: 0;
  overflow: auto;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(99, 102, 241, .07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 75%, rgba(59, 130, 246, .05) 0%, transparent 50%),
    radial-gradient(circle, #ffffff13 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
}

.canvas-frame {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, .25) transparent;
}

.canvas-frame.panning { cursor: grabbing !important; }

.canvas-frame::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.canvas-frame::-webkit-scrollbar-track {
  background: transparent;
}

.canvas-frame::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, .25);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.canvas-frame::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, .5);
  background-clip: content-box;
}

.canvas-frame::-webkit-scrollbar-corner {
  background: transparent;
}

#graph-canvas {
  display: block;
  touch-action: none;
  user-select: none;
}

/* ===== FLOAT PANEL ===== */

/* Info overlay — intentionally non-interactive; pointer-events restored if interactive children are added */
.float-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
  transition: opacity .18s ease, transform .18s ease;
}

.float-panel.hidden {
  opacity: 0;
  transform: translateX(10px);
}

.fp-header {
  padding: 9px 14px 7px;
  border-bottom: 1px solid var(--border);
}

.fp-title {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--muted);
  font-weight: 700;
}

.fp-body { padding: 10px 14px 12px; }

.fp-row {
  font-size: .77rem;
  color: var(--muted);
  margin-bottom: 5px;
  line-height: 1.4;
}

.fp-row strong { color: var(--text); }

.fp-list {
  margin: 8px 0 0;
  padding: 0 0 0 14px;
  font-size: .74rem;
  color: var(--muted);
  line-height: 1.55;
}

.fp-list li { margin-bottom: 4px; }

/* ===== STATUS BAR ===== */

.statusbar {
  height: 28px;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 20px;
}

.statusbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.statusbar-center {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.statusbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .64rem;
  color: var(--border-soft);
  flex-shrink: 0;
}

.sb-label {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--border-soft);
}

.sb-value {
  font-size: .72rem;
  font-weight: 700;
  color: var(--green-text);
}

.sb-info {
  font-size: .67rem;
  color: var(--border-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-zoom {
  font-size: .62rem;
  font-weight: 700;
  color: var(--indigo-text);
  letter-spacing: .04em;
  min-width: 34px;
  text-align: right;
  margin-right: 4px;
  padding-right: 6px;
  border-right: 1px solid var(--border);
}

.statusbar-right kbd {
  font-family: monospace;
  font-size: .58rem;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 1px 4px;
  color: var(--border-soft);
}

/* ===== SVG: EDGES ===== */

.edge-group { cursor: default; }

.edge {
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: stroke;
  cursor: pointer;
}

.edge-hit {
  pointer-events: stroke;
  cursor: pointer;
}

.edge-handle {
  fill: var(--surface);
  stroke: var(--indigo-text);
  stroke-width: 2;
  cursor: grab;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: all;
  filter: drop-shadow(0 0 3px rgba(99,102,241,.5));
}

.edge-group:hover .edge-handle { opacity: 1; }
.edge-group.selected-group .edge-handle { opacity: 0.7; }
.edge-group.selected-group:hover .edge-handle { opacity: 1; }

.edge-dragging .edge-handle,
.edge-dragging { cursor: grabbing !important; }

/* ===== CONTEXT ACTION PILLS ===== */

.ctx-bubble {
  cursor: pointer;
  pointer-events: all;
  animation: ctx-appear .13s ease-out;
}

.ctx-bubble rect {
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.55));
  transition: filter .12s;
}

.ctx-bubble:hover rect {
  filter: drop-shadow(0 3px 14px rgba(0,0,0,.6)) brightness(1.4);
}

.ctx-icon {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  user-select: none;
}

.ctx-label {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: auto;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
  user-select: none;
}

.ctx-bubble:hover .ctx-label { opacity: 1; }

@keyframes ctx-appear {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ctx-hide {
  to { opacity: 0; }
}

.ctx-bubble {
  animation:
    ctx-appear .13s ease-out,
    ctx-hide   .25s ease-in 2s forwards;
}

.edge-drag-preview {
  stroke: #a5b4fc;
  stroke-width: 2;
  stroke-dasharray: 7 4;
  fill: none;
  pointer-events: none;
}

.edge-drag-cursor {
  fill: #a5b4fc;
  pointer-events: none;
}

/* ===== SVG: LAYER GUIDES ===== */

.layer-guide { pointer-events: none; }

.layer-guide line {
  stroke: rgba(99, 102, 241, .1);
  stroke-width: 1;
  stroke-dasharray: 3 14;
  shape-rendering: crispEdges;
}

.layer-guide.depth-0 line {
  stroke: rgba(245, 158, 11, .14);
}

.layer-guide text {
  font-family: var(--font);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  fill: rgba(99, 102, 241, .3);
  user-select: none;
  pointer-events: none;
}

.layer-guide.depth-0 text {
  fill: rgba(245, 158, 11, .38);
}

/* ===== SVG: NODES ===== */

.node { cursor: grab; }
.node:active { cursor: grabbing; }

.node-body { transition: filter .15s; }

.node-halo {
  fill: none;
  pointer-events: none;
}

.node-label {
  font-family: var(--font);
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  user-select: none;
}

.node-done-badge {
  font-family: var(--font);
  font-size: 8px;
  text-anchor: middle;
  dominant-baseline: auto;
  pointer-events: none;
  user-select: none;
  fill: rgba(34, 197, 94, .65);
}

/* ===== MISC ===== */

.file-input {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ===== EDIT MODAL ===== */

.edit-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-modal.hidden { display: none; }

.edit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(3px);
}

.edit-modal-box {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px 24px 20px;
  width: 360px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(99, 102, 241, .15);
}

.edit-modal-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.edit-modal-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 10px 14px;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  outline: none;
  margin-bottom: 16px;
  transition: border-color .12s, box-shadow .12s;
  display: block;
}

.edit-modal-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.edit-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.edit-modal-btn {
  height: 36px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  background: var(--bg);
  color: var(--muted);
  transition: border-color .12s, color .12s, background .12s;
}

.edit-modal-btn:hover { border-color: var(--text); color: var(--text); }

.edit-modal-btn.primary {
  border-color: var(--indigo);
  background: rgba(99, 102, 241, .18);
  color: var(--indigo-text);
}

.edit-modal-btn.primary:hover {
  background: rgba(99, 102, 241, .32);
  border-color: var(--indigo-text);
}

.edit-modal-btn.danger {
  border-color: #dc2626;
  background: rgba(220, 38, 38, .15);
  color: #fca5a5;
}

.edit-modal-btn.danger:hover {
  background: rgba(220, 38, 38, .28);
  border-color: #fca5a5;
  color: #fecaca;
}

.confirm-modal-message {
  font-size: .9rem;
  color: var(--text);
  margin: 0 0 20px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .topbar { padding: 0 8px; gap: 3px; }
  .action-pill { padding: 0 8px; font-size: .68rem; }
  .statusbar-right { display: none; }
}
