:root {
  --bg: #0b0710;
  --panel: #140c1d;
  --ink: #e9d7ff;
  --muted: #9a7fb8;
  --neon: #ff7a18;      /* pumpkin */
  --neon2: #b14bff;     /* witch purple */
  --line: #2a1b3d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 70% -10%, #1b0f2b 0%, var(--bg) 60%),
    var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.noscript { max-width: 640px; margin: 10vh auto; padding: 24px; }
.noscript pre { color: var(--neon); }

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  padding: 18px;
  min-height: 100%;
}
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }

.controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
}
.brand { margin: 0 0 6px; font-size: 20px; color: var(--neon); letter-spacing: 1px; }
.brand .sub { display:block; font-size: 11px; color: var(--muted); letter-spacing: 3px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
label .note { color: var(--muted); opacity: 0.8; font-size: 11px; }
input, select {
  background: #0e0817; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit;
}
input:focus, select:focus, button:focus { outline: 2px solid var(--neon2); outline-offset: 1px; }

.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1; background: #0e0817; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; font: inherit;
}
.seg button[aria-checked="true"] { background: var(--neon); color: #190a02; border-color: var(--neon); font-weight: 700; }

.parts { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.parts legend { color: var(--muted); font-size: 12px; padding: 0 6px; }
.parts label { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.actions button {
  flex: 1 1 auto; background: linear-gradient(180deg, #9a35e8, #7a2bd0);
  color: #fff; border: none; border-radius: 8px; padding: 10px; cursor: pointer; font: inherit; font-weight: 600;
}
.actions button:hover { filter: brightness(1.1); }
.hint { min-height: 1em; font-size: 12px; color: var(--neon); margin: 0; }

.preview { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.art {
  margin: 0;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #060309;
}
.art svg { width: 100%; height: 100%; display: block; }
.alt { color: var(--muted); font-size: 12px; margin: 0; }

.event, .parts { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0; }
.event legend, .parts legend { color: var(--muted); font-size: 12px; padding: 0 6px; }
.event label { margin-bottom: 8px; }
.asset { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; }
.asset label { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
.asset select { width: 96px; padding: 4px; font-size: 12px; }

.preview { position: sticky; top: 18px; align-self: start; }
@media (max-width: 760px) { .preview { position: static; } }

.actions .remix { flex: 1 1 100%; background: linear-gradient(180deg, #ff7a18, #e0590e); color: #190a02; font-weight: 800; }

.pair { display: flex; gap: 8px; }
.pair select { flex: 1; }

.presets { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0; }
.presets legend { color: var(--muted); font-size: 12px; padding: 0 6px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { background: #0e0817; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.preset:hover { border-color: var(--neon2); }
.preset .thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 5px; }
.preset .thumb img { width: 100%; height: 100%; display: block; }
.preset .pname { font-size: 10px; line-height: 1.2; text-align: center; }

.intro { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ics-note { min-height: 0; margin: 0; font-size: 11px; color: var(--muted); }
.actions.top { margin: 0 0 4px; }
.ics-note:empty { display: none; }
