/* ===== Detail panel (sidebar on desktop) ===== */
aside#panel {
  width: 300px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  padding: 18px;
  overflow-y: auto;
  display: none;
  flex-shrink: 0;
}
aside#panel.open { display: block; }

/* ===== Panel inputs ===== */
.panel-edit {
  display: block;
  width: 100%;
  height: 32px;
  border: 1px solid var(--node-border);
  border-radius: 6px;
  padding: 0 9px;
  margin-bottom: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .12s;
}
.panel-edit:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

/* ===== Sections ===== */
.panel-section { margin-bottom: 18px; }
.panel-section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
}

/* ===== Dependency rows ===== */
.dep-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.dep-item:last-child { border-bottom: none; }
.dep-name  { font-size: 13px; }
.dep-rel   { font-size: 11px; color: var(--muted); margin-left: 4px; }

/* ===== Readout blocks ===== */
.readout {
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  line-height: 1.55;
  margin-bottom: 8px;
}
.readout:last-child { margin-bottom: 0; }
.readout strong { font-weight: 600; }

/* ===== Empty state ===== */
.panel-empty {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin: 2px 0;
}

/* ===== Color palette ===== */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .1s, border-color .1s;
  outline-offset: 2px;
}
.swatch:hover {
  transform: scale(1.15);
  border-color: rgba(0, 0, 0, .18);
}
.swatch:focus-visible {
  outline: 2px solid var(--accent);
}
.swatch--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.swatch--none {
  background: var(--surface) !important;
  border-color: var(--node-border);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
}
.swatch--none.swatch--active {
  border-color: var(--accent);
}

/* ===== Panel actions ===== */
.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
