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

:root {
  /* Neutral EDA workbench theme: graphite surfaces with warm amber intent. */
  --bg: #111418;
  --bg-panel: #171d24;
  --bg-toolbar: #202832;
  --bg-hover: #283544;
  --text: #e6e8eb;
  --text-dim: #aeb7c2;
  --accent: #f59e0b;
  --accent-action: #b45309;
  --accent-glow: rgba(245, 158, 11, 0.28);
  --grid: #252b33;
  --grid-major: #343c48;
  --wire: #4da3ff;
  --wire-high: #34d399;
  --wire-low: #fb7185;
  --wire-float: #fbbf24;
  --wire-clock: #a78bfa;
  --pin: #f8fafc;
  --component-bg: #1d2833;
  --component-border: var(--stroke);
  --component-selected: #f59e0b;
  --success: #57e389;
  --warning: #fbbf24;
  --danger: #fb7185;
  --danger-fill: rgba(251, 113, 133, 0.16);
  --breakpoint: #fb7185;
  --watchpoint: #ffd166;
  --bus: #67e8f9;

  --line: #303943;
  --stroke: #4b5c6f;
  --line-deep: #26313b;
  --hover: #344253;
  --deep-bg: #0e1217;
  --raised-bg: #202a35;
  --inset-bg: rgba(7, 11, 16, 0.55);
  --glass-bg: rgba(255,255,255,0.045);
  --glass-line: rgba(255,255,255,0.09);
  --overlay: rgba(0, 0, 0, 0.62);
  --backdrop: rgba(0,0,0,0.42);
  --shadow-soft: 0 4px 12px rgba(0,0,0,0.45);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.36);
  --modal-shadow: 0 8px 32px rgba(0, 0, 0, 0.48);
  --tutorial-shadow: 0 14px 42px rgba(0, 0, 0, 0.40);
  --pop-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
  --tutorial-border: rgba(255, 255, 255, 0.16);
  --tutorial-progress: var(--accent);
  --annotation-badge-bg: var(--glass-bg);
  --annotation-badge-border: var(--glass-line);

  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;

  --fast: 0.12s;
  --dur: 0.15s;
  --panel-dur: 0.25s;
  --tour-dur: 180ms;
  --ease: ease;

  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 14px;
  --fs-lg: 16px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

html { color-scheme: dark; }
html.theme-high-contrast {
  --bg-toolbar: var(--deep-bg);
  --bg-panel: var(--deep-bg);
  --bg-hover: var(--raised-bg);
  --text-dim: var(--text);
  --stroke: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font: 14px var(--font);
  background: var(--bg);
  color: var(--text);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

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

#toolbar {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  min-height: 44px;
  position: relative;
  z-index: 200;
}

.toolbar-group,
.toolbar-section {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
  border-inline-start: 1px solid var(--line);
  flex-wrap: wrap;
  min-width: 0;
}
.toolbar-group:first-child,
.toolbar-section:first-child { border-inline-start: none; padding-inline-start: 0; }
.toolbar-group-label {
  align-self: center;
  color: var(--text-dim);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-inline-end: 2px;
  opacity: 0.82;
  text-transform: uppercase;
}
.toolbar-group[data-group="file"] { flex: 1 1 520px; }
.toolbar-group[data-group="build"] { flex: 1 1 420px; }
.toolbar-group[data-group="run"] { flex: 0 1 360px; }

#toolbar button,
#toolbar .toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  transition: background var(--dur), border-color var(--dur), box-shadow var(--dur), transform var(--dur), color var(--dur);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  touch-action: manipulation;
  text-decoration: none;
}
#toolbar button:hover,
#toolbar .toolbar-link:hover {
  background: var(--hover);
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px var(--accent-glow);
}
#toolbar button:active { transform: scale(0.97); }
.sim-tick {
  display: inline-flex;
  align-items: center;
  min-width: 58px;
  padding: 3px 7px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-pill);
  background: var(--inset-bg);
  color: var(--text-dim);
  font: 600 var(--fs-xs) var(--mono);
  letter-spacing: 0.02em;
  transition: color var(--dur), border-color var(--dur), opacity var(--dur), box-shadow var(--dur);
}
.sim-tick.is-running {
  color: var(--wire-high);
  border-color: var(--wire-high);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--glass-line);
}
.sim-tick.is-paused { opacity: 0.58; }
#toolbar button.active {
  background: var(--accent-action);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px var(--accent-glow), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

.toolbar-menu {
  position: relative;
  display: inline-flex;
}
.toolbar-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 260;
  min-width: 150px;
  padding: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  box-shadow: var(--pop-shadow);
}
.toolbar-dropdown.hidden { display: none; }
#toolbar .toolbar-dropdown button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  border-radius: 4px;
}
#toolbar .toolbar-dropdown button:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.circuit-name-input {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 5px 10px;
  border-radius: 4px;
  font: inherit;
  width: 180px;
  min-width: 0;
}
.circuit-name-input:focus-visible { outline: none; border-color: var(--accent); }

#toolbar select {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 4px 8px;
  border-radius: 4px;
  font: inherit;
}

.resource-bar {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
  padding: 2px 8px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  border-radius: 4px;
  /* The estimate string is long and grows with the target device. Let it take
     its own line inside the Build group instead of overflowing the toolbar and
     colliding with the Run controls. */
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

#main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

#palette {
  width: 180px;
  min-width: 180px;
  background: var(--bg-panel);
  border-inline-end: 1px solid var(--line);
  overflow-y: auto;
  padding: 8px;
  z-index: 50;
}
#palette h2,
#palette h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 4px 8px;
  margin-bottom: 4px;
}
.palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-close-mobile {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
  margin: 4px 6px 4px 0;
  border-radius: 4px;
  cursor: pointer;
  /* Touch target floor: these only render on the mobile breakpoint. */
  min-width: 44px;
  min-height: 44px;
}
.panel-close-mobile:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.palette-group {
  margin-bottom: 8px;
}
.palette-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  overflow: hidden;
}
.palette-section[open] {
  border-color: var(--line-deep);
}
.palette-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 6px 8px;
  cursor: pointer;
  list-style: none;
}
.palette-section-summary::-webkit-details-marker { display: none; }
.palette-section-summary::before {
  content: '▸';
  color: var(--text-dim);
  font-size: var(--fs-xs);
  transition: transform var(--fast) var(--ease);
}
.palette-section[open] > .palette-section-summary::before { transform: rotate(90deg); }
.group-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.palette-section-count {
  color: var(--text-dim);
  font: 10px var(--mono);
  opacity: 0.72;
}
.palette-section-body {
  padding: 0 6px 6px;
}
.palette-item {
  display: block;
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-hover);
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  cursor: grab;
  font-size: 13px;
  text-align: left;
  transition: background var(--fast), transform var(--fast), border-color var(--fast);
  margin-bottom: 2px;
  touch-action: manipulation;
}
.palette-item:hover {
  border-color: var(--accent);
  background: var(--hover);
  transform: translateY(-1px);
}
.palette-item:active { cursor: grabbing; }

#canvas-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  touch-action: none;
  min-width: 0;
  min-height: 0;
}

#canvas-stage {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

#canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

#canvas.panning { cursor: grab; }
#canvas.drawing-wire { cursor: crosshair; }

.panel {
  width: 240px;
  min-width: 240px;
  background: var(--bg-panel);
  border-inline-start: 1px solid var(--line);
  overflow-y: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.panel.hidden { display: none; }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent);
}
.panel-header h2,
.panel-header h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.panel-header button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}
.panel-header button:hover { color: var(--accent); }

#properties { border-inline-start: 1px solid var(--line); border-inline-end: none; }
#props-content { padding: 12px; }
#props-content .hint { color: var(--text-dim); font-style: italic; font-size: 13px; }

.prop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #1a2a4a;
}
.prop-row label {
  font-size: 12px;
  color: var(--text-dim);
}
.prop-row input, .prop-row select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 3px 6px;
  border-radius: 3px;
  font: 12px var(--mono);
  width: 80px;
  text-align: right;
}
.prop-row select { width: auto; }
.annotation-type-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.annotation-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--annotation-badge-border);
  border-radius: var(--radius-pill);
  background: var(--annotation-badge-bg);
  color: var(--text-dim);
  padding: 1px 6px;
  font-size: var(--fs-xs);
  line-height: 1.4;
  font-weight: 600;
}

.bottom-dock {
  flex: 0 0 auto;
  min-height: 160px;
  max-height: min(75vh, 720px);
  background: linear-gradient(180deg, var(--raised-bg), var(--bg-panel));
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 64;
}
.bottom-dock.hidden { display: none; }
.dock-resizer {
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
  z-index: 2;
}
.dock-resizer::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 2px;
  width: 54px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: var(--radius-pill);
  background: var(--glass-line);
}
.dock-resizer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.bottom-dock.is-resizing { cursor: ns-resize; }
.dock-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 var(--space-3);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}
.dock-tablist {
  display: flex;
  align-items: stretch;
  gap: var(--space-1);
}
.dock-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--text-dim);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font: 700 var(--fs-sm) var(--font);
}
.dock-tab:hover { color: var(--text); background: var(--glass-bg); }
.dock-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.dock-tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
  background: rgba(255, 255, 255, 0.035);
}
.dock-badge {
  display: inline-flex;
  align-items: center;
  max-width: 160px;
  padding: 1px 6px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-pill);
  background: var(--inset-bg);
  color: var(--text-dim);
  font: 600 10px var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dock-body,
.dock-panel,
.dock-pane {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
.dock-body {
  display: flex;
  overflow: hidden;
}
.dock-panel {
  display: flex;
  width: 100%;
  overflow: hidden;
}
.dock-panel.hidden { display: none; }
.dock-pane {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: transparent;
  overflow: hidden;
}
#timing-canvas {
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 0;
  cursor: ew-resize;
}
#watchlog-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

#fmap-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: var(--bg-panel);
  border-inline-start: 1px solid var(--line);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
#fmap-panel.hidden { display: none; }
#fmap-content {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
}

#inspector-panel,
#history-panel {
  position: absolute;
  top: 12px;
  right: 252px;
  max-width: calc(100vw - 460px);
  max-height: calc(100% - 24px);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#inspector-panel { width: 360px; z-index: 70; }
#history-panel { width: 320px; z-index: 72; }
#inspector-panel.hidden,
#history-panel.hidden { display: none; }
#inspector-content {
  padding: 10px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
}
.inspector-empty {
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  font-style: italic;
  line-height: 1.35;
}
.inspector-section { margin-bottom: 12px; }
.inspector-section:last-child { margin-bottom: 0; }
.inspector-section h3 {
  margin: 4px 0 6px;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.inspector-component {
  margin-bottom: 8px;
  border: 1px solid var(--line-deep);
  border-radius: 6px;
  background: rgba(10, 18, 36, 0.45);
  overflow: hidden;
}
.inspector-component.flash { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.inspector-component-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: #172846;
  border: none;
  border-bottom: 1px solid var(--line-deep);
  color: var(--text);
  cursor: pointer;
  font: 11px var(--font);
  text-align: left;
}
.inspector-component-header:hover { background: var(--bg-hover); }
.inspector-component-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspector-component-meta { flex: 0 0 auto; color: var(--text-dim); font-family: var(--mono); }
.inspector-mem-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.inspector-mem-table th,
.inspector-mem-table td {
  padding: 3px 6px;
  border-bottom: 1px solid #203456;
  white-space: nowrap;
}
.inspector-mem-table th {
  color: var(--text-dim);
  font-weight: normal;
  text-align: left;
  background: rgba(0, 0, 0, 0.12);
}
.inspector-mem-table tbody tr { cursor: pointer; }
.inspector-mem-table tbody tr:hover { background: rgba(74, 158, 255, 0.12); }
.inspector-mem-table tbody tr.active-addr { background: rgba(233, 69, 96, 0.18); color: #fff; }
.inspector-mem-table .addr { width: 22%; color: var(--text-dim); }
.inspector-mem-table .hex { width: 26%; color: var(--wire-high); }
.inspector-mem-table .binary { width: 52%; color: var(--wire); overflow: hidden; text-overflow: ellipsis; }
.inspector-scalar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
}
.inspector-value { color: var(--wire-high); font-size: 14px; font-weight: bold; }
.inspector-binary { color: var(--wire); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.floorplan {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.floorplan-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
}
.floorplan-device-select {
  margin-inline-start: 6px;
  max-width: 180px;
  background: #0f1a2d;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
}
.floorplan-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.floorplan-summary-item {
  border: 1px solid var(--line-deep);
  border-radius: 6px;
  background: rgba(10, 18, 36, 0.55);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
}
.floorplan-summary-label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 10px;
}
.floorplan-summary-item strong { color: var(--text); font-size: 13px; }
.floorplan-summary-item.lut strong { color: #7db3ff; }
.floorplan-summary-item.ff strong { color: #6ee7a3; }
.floorplan-summary-item.bram strong { color: #fbbf24; }
.floorplan-svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #071120;
}
.floorplan-bg { fill: #071120; }
.floorplan-lut-cell {
  fill: #d8dee9;
  stroke: #243654;
  stroke-width: 0.35;
  shape-rendering: crispEdges;
}
.floorplan-lut-cell.used { fill: #3b82f6; stroke: #60a5fa; }
.floorplan-ff-cell {
  fill: rgba(216, 222, 233, 0.35);
  stroke: rgba(36, 54, 84, 0.65);
  stroke-width: 0.2;
  shape-rendering: crispEdges;
}
.floorplan-ff-cell.used { fill: #22c55e; stroke: #86efac; }
.floorplan-bram {
  fill: #f6d58c;
  stroke: #7c4a03;
  stroke-width: 0.45;
}
.floorplan-bram.used { fill: #f59e0b; stroke: #fbbf24; }
.floorplan-lut-cell:hover,
.floorplan-ff-cell:hover,
.floorplan-bram:hover {
  stroke: #ffffff;
  stroke-width: 1;
}
.floorplan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 11px;
  color: var(--text-dim);
}
.floorplan-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.floorplan-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #d8dee9;
}
.floorplan-swatch.lut { background: #3b82f6; }
.floorplan-swatch.ff { background: #22c55e; }
.floorplan-swatch.bram { background: #f59e0b; }

/* ---- RTL -> PNR chip-layout view ---- */
.floorplan-die {
  fill: #0a1426;
  stroke: #38507a;
  stroke-width: 1.2;
}
.floorplan-die-notch { fill: #5b7bb0; }
.floorplan-tile {
  fill: #0e1c33;
  stroke: #1b2c49;
  stroke-width: 0.3;
  shape-rendering: crispEdges;
}
.floorplan-tile.used { stroke: rgba(255, 255, 255, 0.35); stroke-width: 0.4; }
.floorplan-ff-dot { fill: transparent; shape-rendering: crispEdges; }
.floorplan-ff-dot.used { fill: rgba(255, 255, 255, 0.82); }
.floorplan-bram-lane {
  fill: rgba(245, 158, 11, 0.10);
  stroke: rgba(245, 158, 11, 0.30);
  stroke-width: 0.4;
}
.floorplan-region {
  fill: none;
  stroke-width: 1.3;
  stroke-dasharray: 2.6 1.6;
  opacity: 0.95;
}
.floorplan-route {
  stroke: rgba(150, 220, 255, 0.7);
  stroke-linecap: round;
  fill: none;
}
.floorplan-pad {
  stroke-width: 0.4;
  shape-rendering: crispEdges;
}
.floorplan-pad.in { fill: #38bdf8; stroke: #7dd3fc; }
.floorplan-pad.out { fill: #f472b6; stroke: #f9a8d4; }
.floorplan-pad:hover { stroke: #ffffff; stroke-width: 0.9; }
.floorplan-tile:hover { stroke: #ffffff; stroke-width: 0.8; }
.floorplan-swatch.pad-in { background: #38bdf8; }
.floorplan-swatch.pad-out { background: #f472b6; }
.floorplan-swatch.route { background: linear-gradient(90deg, rgba(125,211,252,0.2), rgba(125,211,252,0.8)); }
.floorplan.pnr .floorplan-legend { max-height: 92px; overflow-y: auto; }
.floorplan-note {
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.35;
}

#statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 12px;
  background: var(--bg-toolbar);
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.save-status {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
}
.save-status.unsaved {
  color: var(--warning);
  background: rgba(255, 170, 0, 0.15);
}
.save-status.saved {
  color: var(--success);
  background: rgba(0, 204, 102, 0.15);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--stroke); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #4a6a9a; }

@media (max-width: 768px) {
  
  #palette {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    min-width: 240px;
    transform: translateX(-100%);
    transition: transform var(--panel-dur) var(--ease);
    z-index: 200;
    box-shadow: 4px 0 12px rgba(0,0,0,0.5);
  }
  #palette.open {
    transform: translateX(0);
  }
  #palette .panel-close-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  
  #properties {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: unset;
    height: 55vh;
    max-height: 360px;
    border-inline-start: none;
    border-top: 1px solid var(--line);
    transform: translateY(100%);
    transition: transform var(--panel-dur) var(--ease);
    z-index: 200;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.5);
    flex-direction: column;
  }
  #properties.open {
    transform: translateY(0);
  }
  #props-content {
    padding: 12px 16px;
  }

  
  #toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px;
    max-height: 34vh;
    min-height: 48px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .toolbar-group,
  .toolbar-section {
    flex: 1 1 100%;
    gap: 4px;
    padding: 4px 0;
    border-inline-start: none;
    border-top: 1px solid var(--line);
  }
  .toolbar-group:first-child,
  .toolbar-section:first-child { border-top: none; }
  #toolbar button {
    padding: 8px 12px;
    font-size: 14px;
    min-width: 44px;
    min-height: 44px;
  }
  #toolbar select {
    padding: 6px 8px;
    font-size: 13px;
  }
  .resource-bar {
    font-size: 11px;
    padding: 2px 6px;
  }

  
  .bottom-dock {
    max-height: 70vh;
  }

  
  #fmap-panel {
    width: 100%;
    height: 70vh;
    top: auto;
    bottom: 0;
    border-inline-start: none;
    border-top: 1px solid var(--line);
  }

  #inspector-panel {
    left: 8px;
    right: 8px;
    top: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100% - 16px);
  }

  
  #statusbar {
    font-size: 10px;
    flex-wrap: wrap;
    gap: 4px;
    padding: 2px 8px;
  }

  
  .panel-backdrop {
    display: block !important;
  }

  
  .palette-item {
    padding: 10px 12px;
    font-size: 15px;
    min-height: 44px;
  }

  
  .pin-label {
    display: none;
  }
}

.panel-backdrop, .mobile-toolbar-only {
  display: none;
}

.panel-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--panel-dur) var(--ease);
}
.panel-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .mobile-toolbar-only {
    display: inline-flex !important;
    align-items: center;
  }
}

.btn,
.btn-primary,
.btn-secondary {
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  transition: background var(--fast), border-color var(--fast), color var(--fast), box-shadow var(--fast), transform var(--fast);
}
.btn-primary {
  background: var(--accent-action);
  color: white;
  border: 1px solid var(--accent-action);
  padding: 6px 16px;
}
.btn-primary:hover { background: #b82d47; }
.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 6px 16px;
}
.btn-secondary:hover { background: var(--hover); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden {
  display: none !important;
}
.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--modal-shadow);
}
@media (max-width: 600px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-box {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    max-height: 92vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2,
.modal-header h3 {
  font-size: 14px;
  color: var(--text);
}
.modal-header button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 18px;
  padding: 2px 6px;
}
.modal-header button:hover { color: var(--accent); }
.modal-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}
.modal-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
#verilog-import-input {
  width: 100%;
  min-height: 200px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 4px;
  padding: 10px;
  font: 13px var(--mono);
  resize: vertical;
  line-height: 1.5;
}
#verilog-import-input:focus-visible {
  outline: none;
  border-color: var(--accent);
}
.modal-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--danger-fill);
  border: 1px solid var(--danger);
  border-radius: 4px;
  color: var(--danger);
  font-size: 13px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.tutorial-modal {
  max-width: 720px;
  border-color: var(--tutorial-border);
  box-shadow: var(--tutorial-shadow);
  transform: translateY(-8px);
}
.tutorial-modal .modal-body {
  padding-top: 0;
}

.shortcuts-box {
  max-width: 720px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 16px;
  align-items: center;
}

.shortcut-row {
  display: contents;
}

kbd {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: var(--bg);
  color: var(--text);
  font: 12px var(--mono);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .shortcuts-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .shortcut-row {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 12px;
    align-items: center;
  }
}

/* Sub-circuit location breadcrumb. Lives above the canvas stage inside
   #canvas-container (a column flex), so it never competes for main-axis width. */
.subcircuit-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 14px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.02));
  border-bottom: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--text-dim);
  font: 12px var(--mono);
  flex: 0 0 auto;
}
.subcircuit-breadcrumb.hidden { display: none; }
.subcircuit-breadcrumb .crumb {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  padding: 3px 7px;
}
.subcircuit-breadcrumb .crumb:hover,
.subcircuit-breadcrumb .crumb:focus-visible {
  color: var(--text);
  border-color: var(--line);
  background: var(--bg-hover);
}
.subcircuit-breadcrumb .crumb[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  cursor: default;
}
.subcircuit-breadcrumb .crumb[aria-current="page"]:hover {
  background: none;
  border-color: transparent;
}
.subcircuit-breadcrumb .crumb-sep {
  color: var(--text-dim);
  opacity: 0.6;
  user-select: none;
}
@media (max-width: 768px) {
  .subcircuit-breadcrumb .crumb { min-height: 44px; }
}

.example-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: linear-gradient(90deg, rgba(0,255,136,0.10), rgba(0,255,136,0.02));
  border-bottom: 1px solid rgba(0,255,136,0.25);
  color: var(--text);
  font-size: 13px;
}
.example-banner.hidden { display: none; }
.example-banner-text strong { color: #00ff88; margin-inline-end: 8px; }
.example-banner-text span { color: var(--text-dim); }
.example-banner-close {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
}
.example-banner-close:hover { color: var(--text); border-color: var(--accent); }

.mem-editor .hint { color: var(--text-dim); font-size: 12px; margin: 0 0 10px; }
.mem-grid { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.mem-cell { display: flex; flex-direction: column; gap: 2px; font: 11px var(--mono); color: var(--text); }
.mem-cell input {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font: 12px var(--mono);
  padding: 3px 6px;
  width: 80px;
  border-radius: 3px;
  text-align: center;
}
.mem-cell input:focus-visible { border-color: var(--accent); outline: none; }

.prop-truth { margin-top: 12px; }
.prop-truth-title { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.truth-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
}
.truth-table th, .truth-table td {
  text-align: center;
  padding: 2px 6px;
  border: 1px solid var(--line);
}
.truth-table th {
  background: #1f2c4a;
  color: var(--accent);
  font-weight: normal;
}
.truth-table tr.cur td { background: rgba(0, 255, 136, 0.18); color: #fff; }
.truth-table tr.cur td strong { color: #00ff88; }

.empty-hint {
  position: absolute;
  top: 34px;
  left: 22px;
  max-width: 320px;
  background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 12px 38px 12px 14px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.45;
  z-index: 40;
  pointer-events: auto;
  animation: emptyHintFade 320ms var(--ease) both;
}
.empty-hint::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 26px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateY(-50%);
  animation: emptyHintPulse 1.6s var(--ease) infinite;
}
.empty-hint::after {
  content: '';
  position: absolute;
  left: -17px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-inline-start: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.empty-hint-text { display: block; }
.empty-hint kbd {
  background: var(--deep-bg);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  color: var(--text);
  font: 12px var(--mono);
  padding: 1px 5px;
}
.empty-hint-dismiss {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.empty-hint-dismiss:hover,
.empty-hint-dismiss:focus-visible {
  color: var(--text);
  border-color: var(--line);
  background: var(--glass-bg);
}
@keyframes emptyHintFade {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes emptyHintPulse {
  0%, 100% { opacity: 0.48; transform: translate(-3px, -50%); }
  50% { opacity: 1; transform: translate(2px, -50%); }
}

.welcome-body { font-size: 14px; line-height: 1.55; color: var(--text); }
.welcome-body h3 { margin: 14px 0 4px; font-size: 14px; color: var(--accent); }
.welcome-body ul { margin: 4px 0 8px 18px; padding: 0; }
.welcome-body li { margin: 2px 0; }
.welcome-body kbd {
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-bottom-width: 2px;
  padding: 1px 6px;
  border-radius: 3px;
  font: 11px var(--mono);
}

.hidden { display: none !important; }

.modal-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 8px;
  white-space: pre-wrap;
}
.modal-input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 4px;
  padding: 8px 10px;
  font: 13px var(--mono);
  margin-top: 4px;
}
.modal-input:focus-visible { outline: none; border-color: var(--accent); }

.modal-field {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  margin: 10px 0;
}
.modal-checklist,
.modal-summary-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--hover);
  border-radius: 6px;
  background: rgba(10, 20, 35, 0.35);
  padding: 8px 10px;
  margin: 10px 0;
}
.modal-check-row {
  display: block;
  color: var(--text);
  font: 13px var(--mono);
  padding: 4px 0;
}
.modal-summary-list {
  color: var(--text);
  font: 13px var(--mono);
  padding-inline-start: 26px;
}

.modal-share-url {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 4px;
  padding: 8px 10px;
  font: 12px var(--mono);
  resize: vertical;
  word-break: break-all;
}
.modal-share-url:focus-visible { outline: none; border-color: var(--accent); }

.modal-size-row {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.modal-size-row.warning { color: var(--warning); }
.modal-size-row.danger  { color: var(--danger); }

.modal-share-fallback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.modal-qr-pane,
.modal-save-pane {
  border: 1px solid var(--hover);
  border-radius: 6px;
  padding: 10px;
  background: rgba(10, 20, 35, 0.35);
}
.modal-fallback-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-qr-box canvas {
  display: block;
  width: 256px;
  height: 256px;
  max-width: 100%;
  image-rendering: pixelated;
  border: 1px solid var(--stroke);
  border-radius: 4px;
  background: #fff;
}
.modal-qr-box canvas[width="512"] {
  width: min(512px, 100%);
  height: auto;
}
.modal-qr-toggle { margin-top: 8px; }
.modal-qr-error { color: var(--danger); }

.modal-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.modal-checkbox input { accent-color: var(--accent); }

.sim-warning {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger-fill);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  z-index: 80;
  pointer-events: none;
  box-shadow: 0 4px 16px var(--backdrop);
}
.sim-warning.hidden { display: none; }

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.tour-spotlight {
  position: fixed;
  border-radius: 8px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.62),
    0 0 0 2px var(--accent),
    0 0 22px 4px rgba(89, 169, 255, 0.55);
  transition: left var(--tour-dur) var(--ease), top var(--tour-dur) var(--ease),
              width var(--tour-dur) var(--ease), height var(--tour-dur) var(--ease);
  pointer-events: none;
}
.tour-tooltip {
  position: fixed;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--component-border);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  font-size: 13px;
  line-height: 1.5;
  max-width: 360px;
}
.tour-tooltip h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.tour-step-count {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-dim);
  margin-inline-start: auto;
}
.tour-tooltip p { margin: 0 0 10px 0; }
.tour-tooltip kbd {
  background: var(--bg);
  border: 1px solid var(--component-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.tour-spacer { flex: 1; }

.tutorial-step-strip {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-2);
  margin: 0 calc(-1 * var(--space-4)) var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(180deg, var(--raised-bg), var(--bg-panel));
  border-bottom: 1px solid var(--tutorial-border);
}
.tutorial-progress {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--inset-bg);
}
.tutorial-progress span {
  display: block;
  height: 100%;
  background: var(--tutorial-progress);
  transition: width var(--tour-dur) var(--ease);
}
.tutorial-step-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: var(--fs-sm);
}
.tutorial-step-dots {
  display: inline-flex;
  gap: var(--space-1);
}
.tutorial-step-dots span {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--glass-line);
}
.tutorial-step-dots span.active {
  background: var(--tutorial-progress);
}
.tutorial-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tutorial-card {
  background: var(--bg-panel);
  border: 1px solid var(--component-border);
  border-radius: 6px;
  padding: 12px 14px;
}
.tutorial-card.active {
  border-color: var(--tutorial-border);
  box-shadow: inset 3px 0 0 var(--tutorial-progress);
}
.tutorial-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tutorial-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.tutorial-card-title {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
}
.tutorial-card-time {
  font-size: 11px;
  color: var(--text-dim);
}
.tutorial-card-desc {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.tutorial-card-actions {
  display: flex;
  gap: 8px;
}
.tutorial-docs-note {
  margin: 10px 0 0 0;
  font-size: 12px;
  color: var(--text-dim);
}
.tutorial-docs-note a {
  color: var(--accent);
}

.timing-readout {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 4px 12px;
  background: linear-gradient(to top, rgba(15, 23, 48, 0.92), rgba(15, 23, 48, 0));
  color: var(--text-dim);
  font: 11px var(--mono);
  letter-spacing: 0.02em;
  pointer-events: none;
}
.timing-readout.live { color: var(--success); }

.signal-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(15, 23, 48, 0.95);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 4px 8px;
  font: 11px var(--mono);
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 500;
  transform: translate(12px, -50%);
  max-width: 280px;
}
.signal-tooltip .st-val-1 { color: var(--success); font-weight: 700; }
.signal-tooltip .st-val-0 { color: var(--text-dim); }
.signal-tooltip .st-val-bus { color: var(--bus); font-weight: 700; }
.signal-tooltip .st-label { color: var(--text-dim); margin-inline-end: 6px; }
.signal-tooltip.hidden { display: none; }

.signal-context-menu {
  position: fixed;
  min-width: 150px;
  padding: 5px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent), rgba(15, 23, 48, 0.98);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--accent-glow);
  z-index: 650;
}
.signal-context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 4px;
  padding: 6px 9px;
  font: 12px var(--font);
  cursor: pointer;
}
.signal-context-menu button:hover,
.signal-context-menu button:focus-visible {
  background: var(--bg-hover);
  outline: none;
  box-shadow: inset 2px 0 0 var(--accent);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.palette-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.circuit-name-input:focus-visible,
.modal-input:focus-visible,
.modal-share-url:focus-visible,
.command-bar-input:focus-visible,
.prop-row input:focus-visible,
.prop-row select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.timing-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.timing-controls button {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  font: 12px var(--mono);
  min-width: 26px;
}
.timing-controls button:hover {
  background: var(--hover);
  border-color: var(--accent);
}


.command-bar-layer {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--command-bar-top, 56px) var(--space-3) 0;
  background: transparent;
}
.command-bar {
  width: min(480px, calc(100vw - (var(--space-5) * 2)));
  max-height: min(520px, 72vh);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--raised-bg) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow), var(--shadow-soft);
  overflow: hidden;
  animation: command-bar-drop var(--tour-dur) var(--ease);
}
.command-bar-prompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--line);
}
.command-bar-search-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--inset-bg);
  color: var(--text-dim);
  font: 13px var(--mono);
}
.command-bar-input {
  min-width: 0;
  padding: 9px 0;
  background: transparent;
  color: var(--text);
  border: 0;
  font: 16px var(--font);
}
.command-bar-input:focus-visible {
  outline: none;
}
.command-bar-input::placeholder {
  color: var(--text-dim);
}
.command-bar kbd {
  padding: 4px 8px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--inset-bg);
  color: var(--text-dim);
  font: 12px var(--mono);
  box-shadow: inset 0 -1px 0 var(--line-deep);
  white-space: nowrap;
}
.command-bar-hint {
  padding: 0 var(--space-3) var(--space-2);
  color: var(--text-dim);
  font-size: var(--fs-sm);
}
.command-bar-results {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0 var(--space-2) var(--space-2);
}
.command-bar-result {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: var(--space-2);
  margin: 2px 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.command-bar-result:hover,
.command-bar-result[aria-selected="true"] {
  background: var(--bg-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.command-bar-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  color: var(--text);
  font-size: 15px;
}
.command-bar-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.command-bar-badge {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  background: var(--inset-bg);
  font-size: var(--fs-xs);
  white-space: nowrap;
}
.command-bar-empty {
  padding: var(--space-5) var(--space-3);
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
}
#quick-open-hint {
  color: var(--text-dim);
  white-space: nowrap;
}
@keyframes command-bar-drop {
  from { opacity: 0; transform: translateY(calc(var(--space-2) * -1)); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .command-bar { animation: none; }
}

@media (max-width: 768px) {
  .command-bar-layer { padding-inline: var(--space-2); }
  .command-bar { width: calc(100vw - (var(--space-2) * 2)); max-height: 76vh; }
  #quick-open-hint { display: none; }
}

.history-content {
  padding: 10px;
  overflow-y: auto;
  font-size: 12px;
}
.history-summary {
  color: var(--text-dim);
  font: 11px var(--mono);
  margin-bottom: 8px;
}
.history-empty {
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.35;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-deep);
  border-radius: 6px;
  background: rgba(26, 42, 74, 0.75);
  color: var(--text);
  padding: 7px 9px;
  cursor: pointer;
  font: 12px var(--font);
}
.history-row:hover,
.history-row:focus-visible {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.history-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.history-row.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}
.history-row.redo-side {
  color: var(--text-dim);
}
.history-marker {
  width: 16px;
  flex: 0 0 16px;
  color: var(--accent);
  font-family: var(--mono);
}
.history-row.redo-side .history-marker { color: var(--wire); }
.history-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #history-panel {
    left: 8px;
    right: 8px;
    top: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100% - 16px);
  }
}

#breakpoints-panel {
  position: absolute;
  right: 252px;
  top: 108px;
  max-width: calc(100vw - 460px);
  max-height: min(520px, calc(100vh - 170px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 36px));
  z-index: 74;
}
#breakpoints-content {
  overflow: auto;
  padding: 10px;
}

@media (max-width: 768px) {
  #breakpoints-panel {
    left: 8px;
    right: 8px;
    top: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100% - 16px);
  }
}
.bp-tabs {
  display: flex;
  gap: var(--space-2);
  padding: 0 0 var(--space-2);
  border-bottom: 1px solid var(--glass-line);
  margin-bottom: var(--space-2);
}
.bp-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  color: var(--text-dim);
  padding: 5px 10px;
  cursor: pointer;
}
.bp-tab[aria-selected="true"] {
  color: var(--text);
  border-color: var(--stroke);
  background: var(--raised-bg);
}
.bp-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.bp-tab-count {
  color: var(--text-dim);
}
.bp-tab-panel[hidden] { display: none; }

.breakpoint-form .prop-row,
.breakpoint-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.breakpoint-form .prop-row {
  margin: 10px 0;
}
.breakpoint-form .prop-row > span:first-child {
  min-width: 120px;
  color: var(--text-dim);
}
.breakpoint-form input[type="text"],
.breakpoint-form input[type="number"],
.breakpoint-form select {
  min-width: 120px;
}
.breakpoint-form .muted {
  opacity: 0.65;
}
.breakpoint-row {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
}
.breakpoint-row.flash {
  border-color: var(--breakpoint);
  box-shadow: 0 0 0 2px rgba(255,92,122,0.22);
}
.breakpoint-main {
  flex: 1;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breakpoint-label,
.breakpoint-condition-summary {
  display: block;
}
.breakpoint-label {
  margin-bottom: 4px;
  color: var(--text);
}
.breakpoint-condition-summary {
  padding-left: 12px;
  color: var(--text-dim);
  white-space: normal;
}
#btn-resume:not(.hidden) {
  border-color: var(--breakpoint);
  box-shadow: 0 0 0 2px rgba(255,92,122,0.18);
}

.panel-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.watchpoint-row {
  border-color: rgba(255,209,102,0.28);
}
.breakpoint-kind {
  width: 22px;
  text-align: center;
  flex: 0 0 auto;
}
.watchlog-row {
  display: block;
  width: 100%;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watchlog-row:hover,
.watchlog-row.flash {
  border-color: var(--watchpoint);
  box-shadow: 0 0 0 2px rgba(255,209,102,0.18);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .empty-hint,
  .empty-hint::before {
    animation: none !important;
  }
  .empty-hint::before { transform: translateY(-50%); }
}

.toast-host {
  position: absolute;
  top: var(--space-4);
  left: 50%;
  z-index: 180;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: min(420px, calc(100% - (var(--space-4) * 2)));
  pointer-events: none;
  transform: translateX(-50%);
}
.toast-host.toast-host-center { top: 18%; }
.toast {
  width: 100%;
  border: 1px solid var(--stroke);
  border-inline-start-width: 4px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-panel) 94%, var(--text) 6%);
  color: var(--text);
  box-shadow: var(--pop-shadow);
  cursor: pointer;
  font: 600 var(--fs-sm) var(--font);
  line-height: 1.35;
  opacity: 0;
  padding: var(--space-3) var(--space-4);
  pointer-events: auto;
  text-align: left;
  transform: translateY(-6px);
  transition: opacity var(--panel-dur) var(--ease), transform var(--panel-dur) var(--ease), border-color var(--dur) var(--ease);
}
.toast:hover { border-color: var(--accent); }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-dismissing { opacity: 0; transform: translateY(-6px); }
.toast-info { border-inline-start-color: var(--accent); }
.toast-success { border-inline-start-color: var(--success); }
.toast-warning { border-inline-start-color: var(--warning); }
.toast-error { border-inline-start-color: var(--danger); }
.toast-near-element {
  align-self: flex-start;
  margin-inline-start: var(--toast-left, 0);
}
@media (prefers-reduced-motion: reduce) {
  .toast { opacity: 1; transform: none; transition: none; }
  .toast.is-dismissing { opacity: 1; transform: none; }
}

.file-modal-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 14px;
  border-bottom: 1px solid var(--line);
}
.file-modal-tab {
  appearance: none;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}
.file-modal-tab[aria-selected="true"] {
  background: var(--inset-bg);
  color: var(--text);
  border-color: var(--stroke);
  box-shadow: 0 -1px 0 var(--accent) inset;
}
.file-modal-tab:focus-visible,
.dropdown-item:focus-visible,
#toolbar .dropdown-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.file-modal-panel {
  display: grid;
  gap: 10px;
}
.file-modal-panel.hidden { display: none; }
.file-modal-share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.dropdown-menu { min-width: 220px; }
#toolbar .toolbar-dropdown .dropdown-item {
  min-height: 32px;
  padding: 6px 10px;
}
.dropdown-separator {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

/* ===== My Circuits gallery ===== */
.gallery-modal .modal-box { max-width: 720px; }
.gallery-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.gallery-intro { flex: 1; color: var(--text-dim); font-size: 13px; line-height: 1.4; }
.gallery-empty { color: var(--text-dim); padding: 24px 12px; text-align: center; font-size: 13px; }
.gallery-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.gallery-row { display: flex; gap: 12px; align-items: center; padding: 8px 10px; background: var(--bg-hover); border: 1px solid #2a3a5a; border-radius: 6px; }
.gallery-row-active { border-color: var(--accent); }
.gallery-row-main { flex: 1; min-width: 0; }
.gallery-row-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-row-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.gallery-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.gallery-row-actions .btn-small { padding: 4px 8px; font-size: 12px; }
.btn-danger { background: #6a2a3a; color: var(--text); border: 1px solid #8a3a4a; border-radius: 4px; padding: 5px 10px; cursor: pointer; }
.btn-danger:hover { background: #8a3a4a; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Challenge launcher + result modal ===== */
.challenge-modal .modal-box { max-width: 760px; }
.challenge-intro { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; line-height: 1.4; }
.challenge-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.challenge-empty { color: var(--text-dim); padding: 24px 12px; text-align: center; font-size: 13px; }
.challenge-row { display: flex; gap: 12px; align-items: center; padding: 8px 10px; background: var(--bg-hover); border: 1px solid #2a3a5a; border-radius: 6px; }
.challenge-row-main { flex: 1; min-width: 0; }
.challenge-row-title { font-weight: 600; font-size: 14px; }
.challenge-row-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; font-family: var(--mono); letter-spacing: 0.04em; }

/* Result modal */
.challenge-result-modal .modal-box { max-width: 760px; }
.challenge-result-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.challenge-result-pass { color: #69d18e; }
.challenge-result-fail { color: #ff8a8a; }
.challenge-result-error { color: #ffb86b; }
.challenge-result-error-body { color: var(--text); margin-bottom: 8px; line-height: 1.45; }
.challenge-hint { color: var(--text-dim); font-size: 12px; line-height: 1.4; }
.challenge-result-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.challenge-result-table th { text-align: left; padding: 6px 8px; border-bottom: 1px solid #2a3a5a; color: var(--text-dim); font-weight: 600; }
.challenge-result-table td { padding: 6px 8px; border-bottom: 1px solid #1a2a4a; }
.challenge-row-pass td { background: rgba(105, 209, 142, 0.08); }
.challenge-row-fail td { background: rgba(255, 138, 138, 0.10); }
.challenge-cell-diff { color: #ff8a8a; font-weight: 600; }
.challenge-result-stats { margin-top: 10px; color: var(--text-dim); font-size: 12px; font-family: var(--mono); }

/* Persistent dock under the canvas */
.challenge-dock { display: none; position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; background: rgba(15, 52, 96, 0.95); border: 1px solid #3a5a8a; border-radius: 6px; gap: 12px; align-items: center; box-shadow: 0 2px 12px rgba(0,0,0,0.5); z-index: 40; backdrop-filter: blur(4px); }
.challenge-dock.challenge-dock-visible { display: flex; }
.challenge-dock-left { flex: 1; min-width: 0; }
.challenge-dock-title { font-weight: 700; font-size: 13px; }
.challenge-dock-contract { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.challenge-dock-desc { font-size: 12px; color: var(--text-dim); margin-top: 4px; line-height: 1.35; }
.challenge-dock-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 768px) {
  .challenge-dock { left: 4px; right: 4px; bottom: 4px; padding: 6px 8px; flex-direction: column; align-items: stretch; gap: 6px; }
  /* Avoid stacking two bottom sheets: Properties owns the bottom edge while open. */
  #main:has(#properties.open) .challenge-dock.challenge-dock-visible { display: none; }
  /* Header dismiss controls are thumb targets on touch, so give them the same
     44px floor as the rest of the mobile chrome. Desktop keeps its compact ✕. */
  .panel-header button,
  .modal-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 4px 8px;
  }
}

/* ===== Mobile top bar refinement (2026-05-25) =====
   Replace the "stack every toolbar group" mobile layout with a single
   compact row of essentials + a "More" sheet for everything else. */
@media (max-width: 768px) {
  #toolbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    max-height: none;
    min-height: 44px;
    overflow: hidden;
  }
  /* Hide every toolbar child by default; show only the marked essentials. */
  #toolbar > .toolbar-group,
  #toolbar > .toolbar-section {
    display: contents;
  }
  #toolbar .toolbar-group-label,
  #toolbar > .toolbar-group > *:not(.mobile-essential),
  #toolbar > .toolbar-section > *:not(.mobile-essential) {
    display: none !important;
  }
  /* Essentials become inline-flex pills in row order. */
  #toolbar .mobile-essential {
    display: inline-flex !important;
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 13px;
    /* Touch target floor — these are the primary one-handed controls. */
    min-width: 44px;
    min-height: 44px;
    border-top: none;
  }
  #toolbar .circuit-name-input.mobile-essential {
    display: none !important;
  }
  #btn-mobile-more {
    margin-inline-start: auto;
  }
}

/* Mobile overflow sheet */
.mobile-overflow-sheet {
  display: none;
  position: absolute;
  top: 48px;
  right: 6px;
  width: min(320px, calc(100vw - 12px));
  max-height: calc(100vh - 80px);
  background: var(--bg-panel);
  border: 1px solid #2a3a5a;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 300;
  overflow: hidden;
  flex-direction: column;
}
.mobile-overflow-sheet:not(.hidden) {
  display: flex;
}
.mobile-overflow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid #2a3a5a;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.mobile-overflow-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 18px;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  cursor: pointer;
}
.mobile-overflow-close:hover { background: var(--bg-hover); }
.mobile-overflow-body {
  overflow-y: auto;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.mobile-overflow-body button,
.mobile-overflow-body a.toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  min-height: 44px;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid #3a5a8a;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.mobile-overflow-body label {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--text-dim);
  font-size: 12px;
}
/* The desktop "⋯" overflow menu is redundant once its contents are already in
   the mobile sheet, and it renders as a stray 31px stub. */
.mobile-overflow-body #overflow-wrap { display: none; }
.mobile-overflow-body label select {
  flex: 1;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid #3a5a8a;
  border-radius: 4px;
  padding: 6px 8px;
  min-height: 44px;
}
.mobile-overflow-body .resource-bar {
  grid-column: span 2;
  padding: 6px 8px;
}
.mobile-overflow-body .mo-section-label {
  grid-column: span 2;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 6px 4px 0;
  font-weight: 700;
}
.mobile-overflow-body #examples-select { display: none; }

.mobile-examples-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(76vh, 640px);
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.65);
  z-index: 360;
  overflow: hidden;
  flex-direction: column;
}
.mobile-examples-sheet:not(.hidden) { display: flex; }
.mobile-examples-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--line);
}
.mobile-examples-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}
.mobile-examples-subtitle {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 2px;
}
.mobile-examples-close {
  background: var(--bg-hover);
  border: 1px solid var(--stroke);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
}
.mobile-examples-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-example-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mobile-example-item small {
  flex: 0 0 auto;
  color: var(--text-dim);
  font: 11px var(--mono);
}
.mobile-example-category {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 10px 2px 0;
  text-transform: uppercase;
}
.mobile-example-family {
  display: grid;
  gap: 6px;
}
.mobile-example-widths {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px 4px 12px;
}
.example-width-chooser {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mobile-example-item:hover,
.mobile-example-item:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 1px var(--accent-glow);
}

/* ===== Resource-estimate honesty pass (Track 4 Phase A) ===== */
.panel-subtitle { font-size: 11px; color: var(--text-dim); padding: 0 14px 8px; font-style: italic; border-bottom: 1px solid #1a2a4a; margin-bottom: 8px; }
.icon-btn { background: transparent; border: 1px solid transparent; color: var(--text-dim); font-size: 16px; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; }
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

.methodology-modal .modal-box { max-width: 760px; }
.methodology-lede { color: var(--text); line-height: 1.45; margin-bottom: 16px; padding: 10px 12px; background: rgba(255, 107, 122, 0.08); border-inline-start: 3px solid var(--accent); border-radius: 4px; }
.methodology-h { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 16px 0 6px; font-weight: 700; }
.methodology-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.methodology-table th { text-align: left; padding: 6px 8px; border-bottom: 1px solid #2a3a5a; color: var(--text-dim); font-weight: 600; }
.methodology-table td { padding: 6px 8px; border-bottom: 1px solid #1a2a4a; vertical-align: top; line-height: 1.35; }
.methodology-cost { font-family: var(--mono); white-space: nowrap; }
.methodology-note { color: var(--text-dim); font-size: 11px; }
.methodology-list { margin: 4px 0 8px 18px; color: var(--text); }
.methodology-list li { margin: 4px 0; line-height: 1.4; }
.methodology-foot { color: var(--text-dim); font-size: 12px; line-height: 1.4; margin-top: 12px; font-style: italic; }

/* ===== Curriculum modal (Track 3) ===== */
.curriculum-modal .modal-box { max-width: 920px; }
.curriculum-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; min-height: 460px; }
.curriculum-sidebar { background: #0e1a2e; border: 1px solid #1a2a4a; border-radius: 4px; padding: 8px; overflow-y: auto; max-height: 60vh; }
.curriculum-sidebar-intro { font-size: 11px; color: var(--text-dim); padding: 4px 6px 8px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid #1a2a4a; margin-bottom: 8px; }
.curriculum-chapter { margin-bottom: 14px; }
.curriculum-chapter-header { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px; margin-bottom: 4px; }
.curriculum-chapter-title { font-size: 13px; color: var(--text); }
.curriculum-chapter-id { font-size: 10px; color: var(--text-dim); font-family: var(--mono); }
.curriculum-lesson-link { display: flex; gap: 8px; width: 100%; align-items: baseline; background: transparent; border: 1px solid transparent; color: var(--text); padding: 5px 8px; border-radius: 4px; font: inherit; text-align: left; cursor: pointer; margin-bottom: 2px; }
.curriculum-lesson-link:hover { background: var(--bg-hover); }
.curriculum-lesson-link.active { background: var(--bg-hover); border-color: var(--accent); color: #fff; }
.curriculum-lesson-id { font-family: var(--mono); font-size: 11px; color: var(--text-dim); width: 28px; flex-shrink: 0; }
.curriculum-lesson-link.active .curriculum-lesson-id { color: #ffd7dd; }
.curriculum-lesson-name { font-size: 12px; line-height: 1.3; }

.curriculum-pane { padding: 4px 8px; overflow-y: auto; max-height: 60vh; }
.curriculum-breadcrumb { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.curriculum-lesson-title { font-size: 18px; color: var(--text); margin-bottom: 4px; }
.curriculum-lesson-meta { font-size: 11px; color: var(--text-dim); font-style: italic; margin-bottom: 10px; }
.curriculum-lesson-summary { font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 14px; }
.curriculum-lesson-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.curriculum-divider { border: none; border-top: 1px solid #1a2a4a; margin: 16px 0; }
.curriculum-chapter-blurb { font-size: 12px; color: var(--text-dim); line-height: 1.4; margin-bottom: 8px; }
.curriculum-chapter-doc { font-size: 12px; color: var(--accent); text-decoration: none; }
.curriculum-chapter-doc:hover { text-decoration: underline; }

.curriculum-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #1a2a4a; }
.curriculum-counter { font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.curriculum-docs-link { margin-left: auto; font-size: 12px; color: var(--text-dim); text-decoration: none; }
.curriculum-docs-link:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 768px) {
  .curriculum-layout { grid-template-columns: 1fr; }
  .curriculum-sidebar { max-height: 30vh; }
  .curriculum-pane { max-height: none; }
}

/* ===== Mobile palette long-press + armed placement (Track 5) ===== */
.palette-item.palette-arming { background: var(--accent) !important; color: #fff !important; transition: background 200ms ease; }
#canvas.armed-placement { cursor: crosshair; }
#armed-placement-chip { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--accent); color: #fff; padding: 8px 12px 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,0.4); z-index: 3000; max-width: calc(100vw - 24px); }
#armed-placement-chip .apc-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#armed-placement-chip .apc-cancel { background: rgba(255,255,255,0.18); color: #fff; border: none; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
#armed-placement-chip .apc-cancel:hover { background: rgba(255,255,255,0.28); }

/* ===== Real synth spike modal (Track 4 Phase B) ===== */
.realsynth-modal .realsynth-status { color: var(--text-dim); margin: 8px 0; font-size: 13px; }
.realsynth-modal .realsynth-output { font-family: ui-monospace, "Cascadia Code", Menlo, monospace; font-size: 12px; max-height: 360px; overflow: auto; background: var(--bg, #0b1224); color: var(--text); padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; }
.realsynth-modal .methodology-lede { color: var(--text-dim); margin-bottom: 8px; }

/* ============================================================
   In-app Manual viewer (FPGA.Manual)
   ============================================================ */
.manual-modal .modal-box {
  width: min(1180px, 95vw);
  max-width: 95vw;
  height: min(820px, 92vh);
  display: flex;
  flex-direction: column;
}
.manual-modal .modal-body { padding: 0; flex: 1; overflow: hidden; min-height: 0; }
.manual-modal .modal-footer { flex: 0 0 auto; }
.manual-body { display: block; height: 100%; min-height: 0; }
.manual-layout {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 0;
  height: 100%;
  min-height: 0;
}
.manual-sidebar {
  background: var(--bg, #0b1224);
  border-right: 1px solid var(--border, #2a3a5a);
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.manual-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-left: 6px;
}
.manual-sidebar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.manual-sidebar-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 7px 10px;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}
.manual-sidebar-link:hover { background: var(--bg-hover, #1a3a6a); }
.manual-sidebar-link.active {
  background: var(--bg-hover, #1a3a6a);
  color: var(--accent, #ff6b7a);
  font-weight: 600;
}
.manual-search { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.manual-search-input {
  background: var(--bg-panel, #16213e);
  color: var(--text);
  border: 1px solid var(--border, #3a5a8a);
  border-radius: 4px;
  padding: 6px 10px;
  font: inherit;
  width: 100%;
}
.manual-search-status { font-size: 11px; color: var(--text-dim); min-height: 14px; }
.manual-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.manual-content-inner {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  min-height: 0;
}
.manual-toc-pane {
  background: var(--bg, #0b1224);
  border-left: 1px solid var(--border, #2a3a5a);
  padding: 16px 12px;
  overflow-y: auto;
  min-height: 0;
}
.manual-toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding-left: 6px;
}
.manual-toc ul { list-style: none; margin: 0; padding: 0; }
.manual-toc li { margin: 0; }
.manual-toc li a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.4;
}
.manual-toc li a:hover { background: var(--bg-hover, #1a3a6a); color: var(--text); }
.manual-toc li.manual-toc-h3 a { padding-left: 22px; font-size: 12px; }
.manual-loading,
.manual-error { color: var(--text-dim); font-style: italic; padding: 16px; }
.manual-error { color: var(--accent, #ff6b7a); }

/* Article typography */
.manual-article {
  color: var(--text);
  line-height: 1.6;
  font-size: 14.5px;
  max-width: 76ch;
}
.manual-article h1 { font-size: 28px; line-height: 1.2; margin: 0 0 18px; color: var(--text); border-bottom: 1px solid var(--border, #2a3a5a); padding-bottom: 10px; }
.manual-article h2 { font-size: 22px; line-height: 1.3; margin: 32px 0 10px; color: var(--text); border-bottom: 1px solid var(--border, #2a3a5a); padding-bottom: 6px; }
.manual-article h3 { font-size: 17px; line-height: 1.35; margin: 24px 0 8px; color: var(--text); }
.manual-article h4 { font-size: 15px; line-height: 1.35; margin: 18px 0 6px; color: var(--text); }
.manual-article p { margin: 0 0 12px; }
.manual-article ul,
.manual-article ol { margin: 0 0 12px; padding-left: 24px; }
.manual-article li { margin: 4px 0; }
.manual-article li > p { margin: 0 0 6px; }
.manual-article a {
  color: var(--accent, #ff6b7a);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 107, 122, 0.4);
}
.manual-article a:hover { border-bottom-style: solid; }
.manual-article strong { color: var(--text); font-weight: 700; }
.manual-article em { font-style: italic; }
.manual-article code {
  font-family: var(--mono, ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
}
.manual-article pre.md-code {
  background: var(--bg-panel, #0b1224);
  border: 1px solid var(--border, #2a3a5a);
  border-radius: 5px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0 0 14px;
}
.manual-article pre.md-code code {
  background: transparent;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre;
}
.manual-article blockquote {
  border-left: 3px solid var(--accent, #ff6b7a);
  background: rgba(255, 107, 122, 0.06);
  padding: 8px 14px;
  margin: 0 0 14px;
  color: var(--text-dim);
  border-radius: 0 4px 4px 0;
}
.manual-article blockquote p:last-child { margin-bottom: 0; }
.manual-article hr {
  border: none;
  border-top: 1px solid var(--border, #2a3a5a);
  margin: 24px 0;
}
.manual-article kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--mono, ui-monospace, "Cascadia Code", monospace);
  font-size: 0.85em;
  line-height: 1.4;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border, #3a5a8a);
  border-bottom-width: 2px;
  border-radius: 3px;
  vertical-align: baseline;
}
.manual-article .md-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.manual-article table.md-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.manual-article table.md-table th,
.manual-article table.md-table td {
  border: 1px solid var(--border, #2a3a5a);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.manual-article table.md-table th {
  background: var(--bg, #0b1224);
  font-weight: 700;
  color: var(--text);
}
.manual-article table.md-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}
.manual-article img { max-width: 100%; height: auto; border-radius: 4px; }
.manual-article mark.manual-find-hit {
  background: rgba(255, 220, 90, 0.55);
  color: #1a1a2e;
  padding: 1px 2px;
  border-radius: 2px;
}

/* Mobile: stack sidebar atop content; hide TOC pane. */
@media (max-width: 900px) {
  .manual-modal .modal-box { width: 96vw; height: 92vh; }
  .manual-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .manual-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border, #2a3a5a);
    padding: 10px;
    gap: 6px;
  }
  .manual-sidebar-title { display: none; }
  .manual-sidebar-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1 1 100%;
  }
  .manual-sidebar-link { padding: 5px 10px; font-size: 13px; }
  .manual-search { flex: 1 1 100%; margin-top: 6px; flex-direction: row; align-items: center; }
  .manual-search-input { flex: 1; }
  .manual-search-status { white-space: nowrap; padding-left: 8px; }
  .manual-toc-pane { display: none; }
  .manual-content-inner { padding: 16px 18px; }
  .manual-article { font-size: 14px; }
  .manual-article h1 { font-size: 22px; }
  .manual-article h2 { font-size: 18px; }
  .manual-article h3 { font-size: 15px; }
}

/* ===== Featured demo banner (Pass 1 of POLISH-PLAN) ===== */
#featured-demo-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9000;
  max-width: min(720px, calc(100vw - 32px));
  background: linear-gradient(135deg, rgba(20, 32, 52, 0.97), rgba(40, 60, 100, 0.97));
  color: #fff;
  border: 1px solid rgba(120, 170, 255, 0.4);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  animation: fdb-slide-in 0.35s ease-out;
}
#featured-demo-banner .fdb-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#featured-demo-banner .fdb-label {
  flex: 1 1 240px;
  min-width: 200px;
}
#featured-demo-banner .fdb-pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #44d77a;
  box-shadow: 0 0 0 0 rgba(68, 215, 122, 0.7);
  animation: fdb-pulse 1.6s ease-out infinite;
  flex: 0 0 auto;
}
#featured-demo-banner .fdb-action {
  background: rgba(120, 170, 255, 0.18);
  border: 1px solid rgba(120, 170, 255, 0.55);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}
#featured-demo-banner .fdb-action:hover {
  background: rgba(120, 170, 255, 0.32);
}
#featured-demo-banner .fdb-action-secondary {
  background: transparent;
}
#featured-demo-banner .fdb-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex: 0 0 auto;
}
#featured-demo-banner .fdb-close:hover {
  color: #fff;
}
@keyframes fdb-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(68, 215, 122, 0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(68, 215, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(68, 215, 122, 0); }
}
@keyframes fdb-slide-in {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 600px) {
  #featured-demo-banner {
    bottom: 12px;
    padding: 10px 12px;
    font-size: 13px;
  }
  #featured-demo-banner .fdb-action { padding: 6px 10px; font-size: 12px; }
}

/* ===== Tour modal (Pass 2 polish) ===== */
.tour-wrap { max-width: 980px; }
.tour-intro {
  margin: 0 0 16px;
  color: var(--muted, #555);
  font-size: 14px;
  line-height: 1.45;
}
.tour-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: start;
}
.tour-section-list {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid var(--border, #e2e2e2);
  max-height: 60vh;
  overflow-y: auto;
}
.tour-section-link {
  display: block;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--fg, #222);
  text-decoration: none;
  border-radius: 4px;
  border-left: 3px solid transparent;
}
.tour-section-link:hover {
  background: rgba(0, 0, 0, 0.04);
  border-left-color: var(--accent, #2c6cdf);
}
.tour-content {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 6px;
}
.tour-section { margin: 0 0 8px; }
.tour-section-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.tour-section-blurb {
  margin: 0 0 12px;
  color: var(--muted, #666);
  font-size: 13px;
}
.tour-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.tour-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 140px;
}
.tour-card:hover {
  border-color: var(--accent, #2c6cdf);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.tour-card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #888);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tour-card-check {
  color: #2a7;
  font-weight: 700;
}
.tour-card-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.tour-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}
.tour-card-head .tour-card-title { margin: 0; }
.tour-card-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 32px;
  color: var(--accent, #2c6cdf);
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tour-card-icon svg { display: block; }
.tour-card-teaser {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg, #333);
  flex: 1;
}
.tour-card-action {
  align-self: flex-start;
  font-size: 13px;
  padding: 6px 12px;
}
.tour-card-visited { opacity: 0.85; }
.tour-section-sep {
  margin: 16px 0;
  border: 0;
  border-top: 1px dashed var(--border, #eee);
}
.tour-browse-all {
  margin: 16px 0 0;
  font-size: 13px;
  text-align: right;
}
.tour-browse-all a {
  color: var(--accent, #2c6cdf);
  text-decoration: none;
}
.tour-browse-all a:hover { text-decoration: underline; }

.tour-back-chip {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9000;
  padding: 6px 12px;
  font-size: 13px;
  background: var(--accent, #2c6cdf);
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.tour-back-chip:hover { filter: brightness(1.08); }

@media (max-width: 720px) {
  .tour-grid { grid-template-columns: 1fr; }
  .tour-section-list {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-right: none;
    border-bottom: 1px solid var(--border, #e2e2e2);
    padding: 0 0 8px;
    max-height: none;
    gap: 4px;
    scrollbar-width: thin;
  }
  .tour-section-link {
    white-space: nowrap;
    flex: 0 0 auto;
    padding: 8px 10px;
    min-height: 36px;
    display: flex;
    align-items: center;
  }
  .tour-content { max-height: none; }
  .tour-cards { grid-template-columns: 1fr; }
  .tour-card-action { min-height: 44px; padding: 10px 16px; font-size: 14px; }
}

/* ===== Pass 4: mobile empty-hint repositioned ===== */
@media (max-width: 768px) {
  .empty-hint {
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    text-align: center;
  }
  .empty-hint::before,
  .empty-hint::after {
    display: none;
  }
}
