html, body {
  margin: 0;
  height: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: #14171c;
  color: #d7dce3;
  /* Kill the browser's two-finger-swipe back/forward navigation over the
   * whole app (sidebar included), not just the canvas — a stray horizontal
   * swipe over the menu would otherwise navigate away and lose the session. */
  overscroll-behavior: none;
}

#app-shell {
  display: grid;
  grid-template-columns: 340px 1fr 300px;
  height: 100vh;
}

#sidebar {
  border-right: 1px solid #2a3038;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#rightbar {
  border-left: 1px solid #2a3038;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#viewport {
  width: 100%;
  height: 100vh;
  display: block;
  background: #0c0e11;
}

button {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
}
button:disabled {
  background: #3a4250;
  cursor: default;
}
button.secondary {
  background: #374151;
}

.row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.wall-list {
  border: 1px solid #2a3038;
  border-radius: 4px;
  max-height: 220px;
  overflow-y: auto;
}
.wall-row {
  padding: 4px 8px;
  cursor: pointer;
  border-bottom: 1px solid #22272f;
}
.wall-row:hover {
  background: #1d232c;
}
.wall-row.selected {
  background: #1e3a5f;
}

#log {
  border: 1px solid #2a3038;
  border-radius: 4px;
  padding: 8px;
  white-space: pre-wrap;
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  font-size: 12px;
  color: #9fb0c3;
}

#inspector {
  border: 1px solid #2a3038;
  border-radius: 4px;
  padding: 8px;
  white-space: pre-wrap;
  font-size: 12px;
  color: #c8d4e3;
  background: #181d24;
}

.ctx-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.ctx-menu {
  position: fixed;
  z-index: 50;
  background: #1e242d;
  border: 1px solid #2a3038;
  border-radius: 6px;
  padding: 4px;
  min-width: 190px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.ctx-item {
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #d7dce3;
}
.ctx-item:hover {
  background: #2a3442;
}

h3 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7f8b9b;
}
