:root {
  --bg: #0b0a10;
  --bg-2: #13111b;
  --surface: #1a1724;
  --surface-2: #231f30;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f3fa;
  --muted: #a39db3;
  --dim: #6d6780;
  --accent: #ffb547;      /* spotlight amber */
  --accent-2: #ff4f8b;    /* stage magenta */
  --ok: #3ddc97;
  --danger: #ff6b6b;
  --radius: 16px;
  --font: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }

/* ---------- brand ---------- */
.wordmark {
  font-weight: 700;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  text-decoration: none;
  color: var(--text);
}
.wordmark .beam {
  width: 0.9em; height: 0.9em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6e0, var(--accent) 45%, var(--accent-2) 100%);
  box-shadow: 0 0 24px rgba(255, 181, 71, 0.55);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}
.spot-bg {
  background:
    radial-gradient(60% 50% at 50% -10%, rgba(255, 181, 71, 0.18), transparent 70%),
    radial-gradient(40% 40% at 90% 110%, rgba(255, 79, 139, 0.14), transparent 70%),
    var(--bg);
}

/* ---------- controls ---------- */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.7em 1.2em;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.2); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0d12;
  border: 0;
}
.btn.ghost { background: transparent; }
.btn.icon { width: 2.4em; height: 2.4em; padding: 0; }
.btn.sm { padding: 0.45em 0.85em; font-size: 0.85rem; }

.input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8em 1em;
  outline: none;
  transition: border-color 0.15s ease;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--dim); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.toast-wrap {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px);
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: rise 0.2s ease;
}
.toast.error { border-left-color: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- song rows ---------- */
.songs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.song {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.song img {
  width: 72px; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 8px; background: var(--surface-2); display: block;
}
.song .meta { min-width: 0; }
.song .title {
  font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.song .sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song .singer { color: var(--accent); font-weight: 600; }
.song .actions { display: flex; gap: 4px; }
.song.mine { border-color: rgba(255, 181, 71, 0.35); }
.pos {
  font-variant-numeric: tabular-nums; color: var(--dim); font-weight: 700; min-width: 1.4em; text-align: center;
}
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }

.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--dim); display: inline-block;
}
.live-dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 0.85rem;
}
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.12em; }

/* ---------- cast sheet ---------- */
.cast-sheet {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5, 4, 8, 0.7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px;
  animation: rise 0.18s ease;
}
.cast-panel { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; }
.cast-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cast-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; }
.cast-opt { border-top: 1px solid var(--line); padding: 16px 0 4px; }
.cast-label { font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.cast-ico { color: var(--accent); width: 1.2em; text-align: center; }
.steps-list { margin: 0; padding-left: 1.2em; color: var(--muted); line-height: 1.55; font-size: 0.92rem; }
.steps-list b { color: var(--text); font-weight: 600; }
.steps-list a { word-break: break-all; }
.cast-sheet .hint { color: var(--dim); font-size: 0.82rem; margin: 8px 0 0; line-height: 1.4; }
@media (max-width: 520px) { .cast-sheet { place-items: end center; padding: 0; } .cast-panel { border-radius: 20px 20px 0 0; } }
