#test-config {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

#mode-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.mode-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mode-group label {
  font-size: 0.8rem;
  color: var(--muted);
}

.mode-group select {
  background: var(--panel-bg);
  color: var(--text);
  border: 1px solid var(--muted);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* [hidden] and .mode-group{display:flex} have equal specificity, and the
 * flex rule comes later in the cascade, so without this the attribute loses
 * and a "hidden" group stays visible. This wins on specificity instead of
 * relying on source order. */
.mode-group[hidden] {
  display: none;
}

#restart-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

#restart-btn:hover {
  filter: brightness(1.1);
}

#debug-panel {
  margin-top: 1.5rem;
}

#debug-panel h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.schema-info {
  margin-bottom: 0.75rem;
  background: var(--panel-bg);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}

.schema-info summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--accent);
  user-select: none;
}

.schema-info-list {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.schema-info-list dt {
  font-family: var(--mono);
  color: var(--accent);
  margin-top: 0.6rem;
}

.schema-info-list dt:first-child {
  margin-top: 0;
}

.schema-info-list dd {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.schema-info-list code {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}

#raw-state-panel {
  background: #0d0f12;
  color: #7dffa0;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 1rem;
  border-radius: 8px;
  max-height: 320px;
  overflow: auto;
  white-space: pre;
  margin: 0;
}
