:root {
  --bg: #0b0c10;
  --panel: #12141b;
  --ink: #f4efe6;
  --muted: #9a9386;
  --gold: #e2b15a;
  --red: #c44536;
  --line: #2a2d36;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background: var(--bg);
  color: var(--ink);
}

#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#intro {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 48px 56px 40px;
  background: linear-gradient(180deg, transparent 62%, rgba(11, 12, 16, 0.88) 100%);
  pointer-events: none;
  z-index: 2;
}
#intro.hidden { display: none; }
.intro-copy { pointer-events: auto; max-width: 560px; }
.intro-copy h1 {
  margin: 0 0 10px;
  font-size: 64px;
  line-height: 0.95;
}
.intro-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
}
#enter {
  appearance: none;
  border: 1px solid var(--gold);
  background: #2a1f14;
  color: var(--gold);
  font: inherit;
  font-size: 18px;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
}
#enter:hover { background: #3a2a18; }
.music-toggle {
  margin-left: 16px;
  color: var(--muted);
}
.songs-link {
  margin-left: 16px;
  color: var(--gold);
}

#app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  pointer-events: none;
  z-index: 3;
}
#app.hidden { display: none; }

#panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  pointer-events: auto;
}

#panel header {
  padding: 22px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 4px;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
}

h1 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 600;
}

#search {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d0f14;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

#groups {
  overflow: auto;
  padding: 12px 14px 24px;
}

.group { margin-bottom: 18px; }
.group h2 {
  margin: 8px 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.moves {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

button.move {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: #171a22;
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

button.move:hover { border-color: var(--gold); }
button.move.active {
  background: #2a1f14;
  border-color: var(--gold);
  color: var(--gold);
}

.hud {
  position: absolute;
  left: 340px;
  right: 20px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  pointer-events: none;
  text-shadow: 0 1px 8px #000;
}

.hud-toggles {
  display: flex;
  gap: 14px;
  pointer-events: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.hud label { color: var(--muted); }
.hud select, .hud input[type="range"] {
  vertical-align: middle;
  margin-left: 6px;
}
.hud select {
  max-width: 180px;
  background: #171a22;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit;
}
#now-playing { display: block; font-size: 22px; }
#clip-count { color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; grid-template-rows: 1fr 42vh; }
  #stage { order: 1; }
  #panel { order: 2; border-right: 0; border-top: 1px solid var(--line); }
}
