:root {
  --bg: #08090b;
  --panel: #121417;
  --line: #262b30;
  --ink: #e8e4da;
  --muted: #8b9198;
  --muted-dim: #5d6469;
  --teal: #55b8ac;
  --crimson: #b3453a;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.top .tag {
  font-size: 0.72rem;
  color: var(--muted);
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  padding: 28px;
  align-items: start;
}

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.dropzone {
  width: 100%;
  max-width: 640px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 64px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--teal);
  background: rgba(85, 184, 172, 0.05);
}

.dropzone p { margin: 0 0 8px; }

.dropzone .muted { color: var(--muted); font-size: 0.82rem; }

.canvas-wrap {
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.canvas-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel[hidden] { display: none; }

.panel-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-block label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.panel-block input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-actions button {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 11px 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.panel-actions button:hover { border-color: var(--teal); }

.panel-actions button.primary {
  background: var(--teal);
  color: #06100f;
  border-color: var(--teal);
}

.panel-actions button.primary:hover { background: #6fcabd; }

.panel-actions button.quiet {
  color: var(--muted);
  border-color: var(--line);
}

.fine-print {
  font-size: 0.68rem;
  color: var(--muted-dim);
  line-height: 1.5;
  margin: 0;
}

.credit {
  text-align: center;
  padding: 18px;
  font-size: 0.72rem;
  color: var(--muted-dim);
  border-top: 1px solid var(--line);
}

.credit a { color: var(--teal); text-decoration: none; }
.credit a:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; }
}
