/* ── LOADING / ERROR ─────────────────────────────────────── */
#loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: var(--z-top);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#loading-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

#error-msg {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: var(--z-top);
}

#error-msg.visible {
  display: flex;
}

#error-msg h2 {
  color: var(--accent);
}

#error-msg p {
  color: var(--text-muted);
  max-width: 420px;
  text-align: center;
  line-height: 1.6;
}

#error-msg button {
  padding: 8px 20px;
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}
