:root {
  --ink: #121212;
  --ink-3: #2a2a2a;
  --white: #ffffff;

  --yellow: #ffc83d;
  --orange: #ff6b2c;
  --pink: #ff8ad0;
  --teal: #1ec8b4;
  --lilac: #b9a2ff;
  --blue: #7fb2ff;
  --lime: #c8f169;

  --line: 2.5px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Theme tokens: light */
  color-scheme: light;
  --bg: #f6f3ec;
  --surface: #ffffff;
  --surface-2: #f6f3ec;
  --text: #121212;
  --text-muted: #8c8a85;
  --stroke: #121212;
  --stroke-soft: #121212;
  --shadow: #121212;
  --btn-shadow: #121212;
  --node-shadow-tint: 0%;
  --divider: #121212;
  --grid-dot: rgba(18, 18, 18, .17);
  --hover-border: rgba(18, 18, 18, .15);
  --flow: #ffc83d;
  --primary-bg: #121212;
  --primary-text: #ffffff;
  --toast-bg: #121212;
  --toast-text: #ffffff;
  --sidebar-bg: #121212;
  --sidebar-border: transparent;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141414;
    --surface: #1e1e1e;
    --surface-2: #151515;
    --text: #f2efe8;
    --text-muted: #8a8780;
    --stroke: #f2efe8;
    --stroke-soft: #3d3d3d;
    --shadow: #000000;
    --btn-shadow: #ffc83d;
    --node-shadow-tint: 100%;
    --divider: #2b2b2b;
    --grid-dot: rgba(255, 255, 255, .09);
    --hover-border: rgba(255, 255, 255, .15);
    --flow: #ff6b2c;
    --primary-bg: #f2efe8;
    --primary-text: #121212;
    --toast-bg: #f2efe8;
    --toast-text: #121212;
    --sidebar-bg: #0c0c0c;
    --sidebar-border: #232323;
    --chip-bg: #f2efe8;
    --chip-icon: #121212;
    --chip-icon-accent: #ff6b2c;
  }
}

:root {
  --chip-bg: var(--surface);
  --chip-icon: var(--text);
  --chip-icon-accent: var(--orange);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --surface: #1e1e1e;
  --surface-2: #151515;
  --text: #f2efe8;
  --text-muted: #8a8780;
  --stroke: #f2efe8;
  --stroke-soft: #3d3d3d;
  --shadow: #000000;
  --btn-shadow: #ffc83d;
  --node-shadow-tint: 100%;
  --divider: #2b2b2b;
  --grid-dot: rgba(255, 255, 255, .09);
  --hover-border: rgba(255, 255, 255, .15);
  --flow: #ff6b2c;
  --primary-bg: #f2efe8;
  --primary-text: #121212;
  --toast-bg: #f2efe8;
  --toast-text: #121212;
  --sidebar-bg: #0c0c0c;
  --sidebar-border: #232323;
  --chip-bg: #f2efe8;
  --chip-icon: #121212;
  --chip-icon-accent: #ff6b2c;
}

/* Circular reveal when switching theme (View Transitions API). */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

#app {
  display: flex;
  height: 100vh;
}

/* ---------- Sidebar ---------- */
#sidebar {
  width: 248px;
  flex: 0 0 auto;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  color: var(--white);
  overflow: hidden;
  transition: width .4s var(--ease);
  z-index: 30;
}
#sidebar.collapsed { width: 0; border-right-width: 0; }

.sidebar-inner {
  width: 248px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  overflow-y: auto;
  transition: opacity .25s var(--ease), transform .4s var(--ease);
}
#sidebar.collapsed .sidebar-inner {
  opacity: 0;
  transform: translateX(-28px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.03em;
  margin: 0 4px 30px;
  cursor: default;
}
.logo-thin { font-weight: 600; color: var(--yellow); }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 17px;
  transform: rotate(-8deg);
  transition: transform .5s var(--spring);
}
.logo:hover .logo-mark { transform: rotate(10deg) scale(1.1); }

.side-section { margin-bottom: 28px; }
.side-section h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #9a9a9a;
  margin: 0 0 12px 6px;
}

.palette {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #e6e6e6;
  cursor: grab;
  user-select: none;
  transition: background .2s, color .2s, transform .3s var(--spring);
}
.palette-item:hover {
  background: var(--ink-3);
  color: var(--white);
  transform: translateX(4px);
}
.palette-item:active { cursor: grabbing; transform: scale(.97); }
.pal-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--c);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex: none;
  transition: transform .4s var(--spring);
}
.palette-item:hover .pal-icon { transform: rotate(-10deg) scale(1.1); }
.pal-grip {
  margin-left: auto;
  color: #5a5a5a;
  font-size: 12px;
  letter-spacing: -2px;
  opacity: 0;
  transition: opacity .2s;
}
.palette-item:hover .pal-grip { opacity: 1; }

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--ink-3);
  border-radius: 999px;
  padding: 4px;
}
.zoom-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 17px;
  cursor: pointer;
  transition: background .2s, transform .25s var(--spring);
}
.zoom-btn:hover { background: #3c3c3c; }
.zoom-btn:active { transform: scale(.85); }
#zoomLevel {
  font-size: 13px;
  font-weight: 600;
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #e6e6e6;
  cursor: pointer;
  padding-left: 4px;
}
.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  background: #3c3c3c;
  border-radius: 999px;
  transition: background .25s;
}
.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform .35s var(--spring), background .25s;
}
.switch input:checked + .slider { background: var(--yellow); }
.switch input:checked + .slider::before { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible + .slider { outline: 2px solid var(--white); outline-offset: 2px; }

.hint {
  font-size: 12.5px;
  color: #9a9a9a;
  line-height: 1.55;
  margin: 12px 4px 0;
}
.hint code {
  background: var(--ink-3);
  color: #e6e6e6;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 11px;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 12px;
  color: #7a7a7a;
  line-height: 2;
  padding: 0 6px;
}
.sidebar-footer kbd {
  font-family: inherit;
  font-size: 11px;
  background: var(--ink-3);
  color: #cfcfcf;
  border-radius: 6px;
  padding: 2px 7px;
  margin-right: 4px;
}

/* ---------- Content / Topbar ---------- */
#content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#topbar {
  height: 70px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  background: var(--bg);
  border-bottom: var(--line) solid var(--divider);
  z-index: 20;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.round-btn {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: var(--chip-bg);
  color: var(--chip-icon);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .3s var(--spring), filter .2s;
}
.round-btn:hover { transform: rotate(-6deg); filter: brightness(1.12); }
.round-btn:active { transform: scale(.92); }
.round-btn svg.spin-in { animation: spin-in .55s var(--spring); }
@keyframes spin-in {
  from { transform: rotate(-120deg) scale(.4); opacity: 0; }
}

.board-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 4px 10px;
  min-width: 0;
  width: 320px;
  transition: border-color .2s, background .2s;
}
.board-name:hover { border-color: var(--hover-border); }
.board-name:focus { border-color: var(--stroke); background: var(--surface); outline: none; }

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--stroke);
  white-space: nowrap;
}
.save-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background .2s;
}
.save-status.saved::before { background: var(--teal); }
.save-status.saving::before { background: var(--orange); animation: pulse .9s ease-in-out infinite; }
.save-status.error::before { background: #e11d48; }

@keyframes pulse {
  50% { transform: scale(1.6); opacity: .5; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--spring), filter .2s, background .2s, color .2s;
}
.pill-light {
  background: var(--surface);
  color: var(--text);
}
.pill-light:hover { filter: brightness(1.12); }
.pill-dark {
  background: var(--primary-bg);
  color: var(--primary-text);
}
.pill-dark:hover { filter: brightness(1.12); }
.pill-dark svg { transition: transform .3s var(--spring); }
.pill-dark:hover svg { transform: translateX(3px); }
.pill-light:active, .pill-dark:active { transform: scale(.96); }
.pill-ghost {
  background: var(--chip-bg);
  border-color: var(--chip-bg);
  color: var(--chip-icon);
}
.pill-ghost:hover { background: var(--chip-icon-accent); border-color: var(--chip-icon-accent); color: var(--chip-bg); }

/* ---------- Canvas ---------- */
#canvasWrapper {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--grid-dot) 1.4px, transparent 1.7px);
  background-size: 24px 24px;
  transition: box-shadow .25s;
}
#canvasWrapper.panning { cursor: grabbing; }
#canvasWrapper.drop-active { box-shadow: inset 0 0 0 4px var(--yellow); }
#canvasWrapper.animate-zoom {
  transition: background-position .32s var(--ease), background-size .32s var(--ease);
}
#canvasWrapper.animate-zoom #canvas { transition: transform .32s var(--ease); }

#canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 6000px;
  height: 4000px;
  transform-origin: 0 0;
  will-change: transform;
}

#connectionsLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* Must not intercept clicks meant for the canvas (pan) or connections. */
#nodesLayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#emptyHint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
#emptyHint.hidden { opacity: 0; transform: scale(.96); }
.empty-card { text-align: center; }
.empty-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}
.empty-sub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-muted);
}

/* ---------- Nodes ---------- */
.node {
  --node-shadow: color-mix(in srgb, var(--node-color) var(--node-shadow-tint), var(--shadow));
  position: absolute;
  pointer-events: auto;
  background: var(--surface);
  color: var(--text);
  border: var(--line) solid var(--stroke);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--node-shadow);
  user-select: none;
  cursor: grab;
  outline: 3px solid transparent;
  outline-offset: 4px;
  transition: box-shadow .22s var(--ease), transform .35s var(--spring), outline-color .2s;
}
.node:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--node-shadow); }
.node.selected { outline-color: var(--orange); }
.node.dragging {
  cursor: grabbing;
  z-index: 50;
  transform: rotate(-1.5deg) scale(1.03);
  box-shadow: 12px 12px 0 var(--node-shadow);
  transition: box-shadow .2s var(--ease), transform .25s var(--spring);
}
#canvasWrapper.connecting .node:hover { outline-color: var(--yellow); }

.node-enter { animation: node-pop .55s var(--spring) both; animation-delay: var(--delay, 0ms); }
@keyframes node-pop {
  0%   { opacity: 0; transform: scale(.6) rotate(-6deg); }
  60%  { opacity: 1; transform: scale(1.04) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}
.node-leaving { animation: node-out .2s var(--ease) forwards; pointer-events: none; }
@keyframes node-out {
  to { opacity: 0; transform: scale(.7) rotate(4deg); }
}

.node-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--node-color);
  border-bottom: var(--line) solid var(--stroke);
  border-radius: 15.5px 15.5px 0 0;
}
.node-icon {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--ink);
  color: var(--node-color);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  transition: transform .4s var(--spring);
}
.node:hover .node-icon { transform: rotate(-10deg); }
.node-title {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 2px 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.015em;
  outline: none;
  transition: background .2s;
}
.node-title:focus { background: rgba(255, 255, 255, .55); }

.node-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}
.node-tag {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 2px solid var(--stroke-soft);
  border-radius: 999px;
}
.node-body textarea {
  width: 100%;
  min-height: 54px;
  background: var(--surface-2);
  border: 2px solid var(--stroke-soft);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 10px;
  resize: vertical;
  outline: none;
  transition: box-shadow .2s var(--ease), border-color .2s;
}
.node-body textarea::placeholder { color: var(--text-muted); }
.node-body textarea:focus { box-shadow: 3px 3px 0 var(--node-color); border-color: var(--stroke); }
.node-metric-value {
  width: 100%;
  background: var(--surface-2);
  border: 2px solid var(--stroke-soft);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.03em;
  text-align: center;
  padding: 6px 8px;
  outline: none;
  transition: box-shadow .2s var(--ease), border-color .2s;
}
.node-metric-value:focus { box-shadow: 3px 3px 0 var(--node-color); border-color: var(--stroke); }

/* ---------- Link widget ---------- */
.link-widget {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.link-url-input {
  width: 100%;
  background: var(--surface-2);
  border: 2px solid var(--stroke-soft);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 7px 9px;
  outline: none;
  transition: box-shadow .2s var(--ease), border-color .2s;
}
.link-url-input::placeholder { color: var(--text-muted); }
.link-url-input:focus { box-shadow: 3px 3px 0 var(--node-color); border-color: var(--stroke); }

.link-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 14px;
}
.link-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex: none;
}
.link-status.ok { color: var(--teal); }
.link-status.ok::before { background: var(--teal); }
.link-status.warn { color: #b8860b; }
.link-status.warn::before { background: var(--yellow); }
.link-status.error { color: #e11d48; }
.link-status.error::before { background: #e11d48; }
.link-status.loading::before { background: var(--orange); animation: pulse .9s ease-in-out infinite; }

.link-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.link-stat {
  background: var(--surface-2);
  border: 2px solid var(--stroke-soft);
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
}
.link-stat-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.link-stat-label {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Ports ---------- */
.port {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: var(--line) solid var(--stroke);
  cursor: crosshair;
  z-index: 5;
  transform: translateY(-50%);
  transition: transform .3s var(--spring), background .2s;
}
.port.out { right: -10px; }
.port.in { left: -10px; }
.port:hover { background: var(--yellow); transform: translateY(-50%) scale(1.35); }
#canvasWrapper.connecting .port.in {
  background: var(--yellow);
  animation: port-pulse 1s ease-in-out infinite;
}
@keyframes port-pulse {
  50% { box-shadow: 0 0 0 6px rgba(255, 200, 61, .45); }
}

/* ---------- Resize handle ---------- */
.resize-handle {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 6;
  opacity: 0;
  transition: opacity .2s;
}
.node:hover .resize-handle,
.node.resizing .resize-handle { opacity: 1; }
.resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 9px;
  height: 9px;
  border-right: 3px solid var(--stroke);
  border-bottom: 3px solid var(--stroke);
  border-radius: 0 0 4px 0;
}
.node.resizing { transition: none; }

/* ---------- Connections ---------- */
.conn { cursor: pointer; }
.conn-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  pointer-events: stroke;
}
.conn-line {
  fill: none;
  stroke: var(--stroke);
  stroke-width: 3.5;
  pointer-events: none;
  transition: stroke .2s;
}
.conn-flow {
  fill: none;
  stroke: var(--flow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1 14;
  pointer-events: none;
  animation: flow 1s linear infinite;
}
.conn:hover .conn-line { stroke: var(--orange); }
.conn-arrow { fill: var(--stroke); }
.conn-temp {
  fill: none;
  stroke: var(--stroke);
  stroke-width: 2.5;
  stroke-dasharray: 6 6;
  pointer-events: none;
  animation: flow-temp .6s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -15; } }
@keyframes flow-temp { to { stroke-dashoffset: -12; } }

/* ---------- Context menu ---------- */
/* ---------- Hidden (kept functional, not shown) ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Marquee selection ---------- */
.marquee {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  border: 2px dashed var(--orange);
  background: color-mix(in srgb, var(--orange) 12%, transparent);
  border-radius: 4px;
  pointer-events: none;
  z-index: 40;
  display: none;
}
.marquee.active { display: block; }

#canvasWrapper.space-pan { cursor: grab; }
#canvasWrapper.space-pan.panning { cursor: grabbing; }

.context-menu {
  position: fixed;
  min-width: 190px;
  padding: 6px;
  background: var(--surface);
  color: var(--text);
  border: var(--line) solid var(--stroke);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--btn-shadow);
  z-index: 100;
  transform-origin: top left;
}
.context-menu:not(.hidden) { animation: menu-in .25s var(--spring); }
.context-menu.hidden { display: none; }
@keyframes menu-in {
  from { opacity: 0; transform: scale(.85); }
}
.ctx-item {
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ctx-item:hover { background: var(--yellow); color: var(--ink); }
.ctx-item.danger:hover { background: var(--orange); color: var(--white); }

.ctx-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px 6px;
}
.ctx-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  cursor: pointer;
  transition: transform .15s var(--spring);
  padding: 0;
}
.ctx-swatch:hover { transform: scale(1.15); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--toast-bg);
  color: var(--toast-text);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 4px 4px 0 var(--yellow);
  opacity: 0;
  transform: translate(-50%, 24px);
  pointer-events: none;
  z-index: 200;
  transition: opacity .3s var(--ease), transform .45s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 760px) {
  .save-status, .pill-ghost { display: none; }
  .board-name { width: 160px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
