:root {
  --bg: #06080f;
  --panel: #0d1119;
  --panel-2: #131a26;
  --panel-3: #0a0e16;
  --border: #232c3d;
  --border-soft: #222b3d;
  --text: #f2f5fa;
  --dim: #aabdd5;
  --faint: #8b9cb6;
  --green: #4ade80;
  --red: #ff6f67;
  --blue: #6cb6ff;
  --amber: #e8b64a;
  --purple: #c89bff;
  --cyan: #5ad2dd;
  --violet: #94a3ff;
  /* Play carries the UI voice; mono is reserved for data (ids, times, code). */
  --sans: 'Play', 'Helvetica Neue', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Cascadia Mono',
    'Roboto Mono', monospace;
  /* Surface gradient shared by cards and panels — one recipe, everywhere. */
  --surface: linear-gradient(180deg, #10141f 0%, #0b0f18 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  /* Deep space with a faint violet/cyan aurora — fixed so scrolling glides over it. */
  background:
    radial-gradient(1100px 700px at 8% -10%, rgba(148, 163, 255, 0.09), transparent 62%),
    radial-gradient(1000px 720px at 102% 108%, rgba(90, 210, 221, 0.07), transparent 60%),
    linear-gradient(180deg, #06080f 0%, #090d17 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  /* Readability floor: nothing in the app renders below 16px. */
  font-size: 16px;
  line-height: 1.5;
}

#app {
  min-height: 100vh;
}

a {
  color: var(--blue);
  text-decoration: none;
}

pre {
  margin: 0;
  padding: 12px 14px;
  background: var(--panel-3);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
  color: #cfdded;
  white-space: pre-wrap;
  word-break: break-word;
}

/* JSON token colors — spans emitted by lib/highlight.ts */
.j-key {
  color: var(--purple);
}

.j-str {
  color: var(--green);
}

.j-num {
  color: var(--amber);
}

.j-bool {
  color: var(--cyan);
}

.j-null {
  color: var(--red);
}

.dim {
  color: var(--dim);
}

.faint {
  color: var(--faint);
}

.error-bar {
  margin: 12px 24px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 111, 103, 0.5);
  background: rgba(255, 111, 103, 0.1);
  color: var(--red);
  border-radius: 8px;
  font-size: 16px;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--dim);
  font-size: 16px;
}

/* Rendered-markdown blocks (compiled prompts) — global because the content is
   injected via v-html and scoped styles can't reach it. */
.md {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.md h1 {
  font-size: 20px;
  margin: 14px 0 8px;
}

.md h2 {
  font-size: 18px;
  margin: 14px 0 8px;
}

.md h3,
.md h4 {
  font-size: 17px;
  margin: 12px 0 6px;
}

.md h1:first-child,
.md h2:first-child,
.md h3:first-child {
  margin-top: 0;
}

.md p {
  margin: 8px 0;
  white-space: pre-wrap;
}

.md code {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 16px;
}

.md pre.md-code {
  margin: 10px 0;
  white-space: pre;
}

.md pre.md-code code {
  background: transparent;
  border: none;
  padding: 0;
}

.md ul,
.md ol {
  margin: 8px 0;
  padding-left: 28px;
}

.md li {
  margin: 3px 0;
}

.md blockquote {
  margin: 10px 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--border);
  color: var(--dim);
  white-space: pre-wrap;
}

.md hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
