:root {
  --bg: #0a0e17;
  --surface: #111827;
  --border: #243049;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent2: #818cf8;
  --danger: #ef4444;
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.brand-icon { color: var(--accent2); font-size: 1.5rem; line-height: 1; }

h1 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.subtitle { color: var(--muted); font-size: 0.9rem; }

.links { display: flex; gap: 1rem; font-size: 0.9rem; }
.links a { color: var(--accent2); text-decoration: none; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

label { font-size: 0.85rem; color: var(--muted); }

input {
  background: #0a0e17;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
}

.actions { display: flex; gap: 0.75rem; margin-bottom: 1rem; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: white; }
.btn.danger { background: var(--danger); color: white; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.status-grid dt {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-grid dd {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  margin-top: 0.2rem;
  word-break: break-all;
}

.hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

.audio-container { display: flex; flex-direction: column; gap: 0.5rem; }

.audio-track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #0a0e17;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.audio-label { font-size: 0.85rem; color: var(--muted); min-width: 120px; }

.event-log {
  background: #0a0e17;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.8rem;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
}

.error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  color: #fecaca;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.hidden { display: none; }
