:root {
  color-scheme: dark;
  --bg: #0a0f1d;
  --panel: #111829;
  --panel-2: #0f172a;
  --line: #25324a;
  --text: #e5eefc;
  --muted: #95a3bf;
  --green: #4ade80;
  --blue: #60a5fa;
  --red: #f87171;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #07111f, #0c1324);
  color: var(--text);
}
.shell {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}
.panel {
  padding: 20px;
}
.left {
  border-right: 1px solid var(--line);
  background: rgba(8, 14, 28, 0.86);
}
.right {
  background: rgba(12, 18, 34, 0.92);
}
.brand, .stage-header, .actions-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--blue);
}
h1 { margin: 6px 0 0; font-size: 28px; }
button {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}
button.secondary { background: #1d2940; }
textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 14px;
  font-size: 15px;
}
.hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.chat-log, .meta-box, pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.chat-log {
  min-height: 220px;
  margin: 18px 0;
  overflow: auto;
}
.message { margin-bottom: 14px; }
.message .role { color: var(--muted); font-size: 12px; margin-bottom: 4px; text-transform: uppercase; }
.label { display: block; color: var(--muted); margin: 12px 0 8px; }
.meta-box { margin-top: 12px; line-height: 1.7; }
.game-title { font-size: 24px; font-weight: 800; }
.game-description { color: var(--muted); max-width: 700px; }
.badges { display: flex; gap: 8px; }
.badge {
  background: #16233a;
  color: #cfe2ff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}
canvas {
  width: 100%;
  max-width: 100%;
  margin-top: 18px;
  background: #0b1020;
  border-radius: 16px;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
pre {
  min-height: 220px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d7e3fb;
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .left { border-right: none; border-bottom: 1px solid var(--line); }
  .bottom-grid { grid-template-columns: 1fr; }
}
