:root {
  --bg: #14161c; --panel: #1c1f28; --ink: #e7e9ee; --muted: #8b91a1;
  --accent: #5cc8ff; --accent2: #ff7bd0; --line: #2a2e3a;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 24px; max-width: 900px; margin-inline: auto;
  background: var(--bg); color: var(--ink); line-height: 1.45;
}
h1 { margin: 0; font-size: 2rem; letter-spacing: -0.5px; }
h1 span { color: var(--accent2); }
h2 { margin: 0 0 12px; font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
header p { color: var(--muted); max-width: 60ch; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
@media (max-width: 720px) { main { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.image canvas#preview { width: 100%; height: auto; border-radius: 8px; background: #000; display: block; }

.file {
  display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: #04121b; font-weight: 600; cursor: pointer;
}
.file input { display: none; }
.samples-label { margin-top: 10px; font-size: .8rem; color: var(--muted); }
.samples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.samples button, .transport button {
  background: #262a36; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: .82rem;
}
.samples button:hover, .transport button:hover:not(:disabled) { border-color: var(--accent); }

.row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.row label { font-size: .85rem; color: var(--muted); }
.row select, .row input[type=range] { width: 100%; }
.row.slider span { font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; color: var(--accent); }
select, input[type=range] { accent-color: var(--accent); background: #12141a; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px; }

.transport { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.transport button { font-size: .95rem; padding: 9px 16px; }
#play { background: var(--accent2); color: #1a0413; border-color: transparent; font-weight: 700; }
button:disabled { opacity: .45; cursor: not-allowed; }
#music { margin: 10px 0 4px; }
#contour { width: 100%; height: 90px; background: #0e1015; border: 1px solid var(--line); border-radius: 8px; }
footer { margin-top: 20px; font-size: .78rem; text-align: center; }
