.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(63, 60, 86, 0.6);
  padding: 24px;
}

.overlay[hidden] {
  display: none;
}

.overlay-card {
  width: min(100%, 310px);
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(63, 60, 86, 0.15);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overlay-card h1 {
  font-size: 18px;
  line-height: 1.35;
}

.overlay-card p,
.state-output {
  color: #595675;
  font-size: 12px;
  line-height: 1.55;
}

.overlay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.state-output {
  color: #595675;
  font-size: 12px;
  line-height: 1.55;
}

.state-output {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow: auto;
  background: var(--color-primary-bg);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.debug-panel {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 112px;
  width: 250px;
  max-height: 260px;
  overflow: auto;
  z-index: 12;
  padding: 10px;
  background: rgba(247, 246, 251, 0.95);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-light);
  font-size: 10px;
  white-space: pre-wrap;
}

body.debug-mode .debug-panel {
  display: block;
}
