:root {
  --bg: #05060d;
  --ink: #e9edff;
  --muted: #8b93b8;
  --accent: #6ad7ff;
  --panel: rgba(14, 17, 32, 0.82);
  --line: rgba(120, 140, 200, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#stage { position: fixed; inset: 0; display: block; }

.hud {
  position: fixed;
  top: 22px; left: 26px;
  pointer-events: none;
  text-shadow: 0 2px 18px #000;
}
.hud h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.hud .tag { color: var(--muted); font-size: 14px; margin-top: 2px; }

.panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 280px;
  padding: 24px 22px 20px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  transition: transform 0.32s cubic-bezier(.4,.1,.2,1);
}
.panel.hidden { transform: translateX(calc(100% - 0px)); }

.collapse {
  position: absolute;
  left: -34px; top: 18px;
  width: 34px; height: 44px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: var(--panel);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
.panel.hidden .collapse { transform: rotate(180deg); border-radius: 0 10px 10px 0; }

.panel section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.panel section:last-of-type { border-bottom: none; }

h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent);
  margin-bottom: 12px;
}

label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 6px;
}
label span { color: var(--ink); font-variant-numeric: tabular-nums; }
section > label:first-child { margin-top: 0; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #2a3056);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border: none; border-radius: 50%;
  background: #fff; cursor: pointer;
}

.toggles { display: flex; flex-direction: column; gap: 12px; }
.chk {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  cursor: pointer;
}
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }

.hint { font-size: 12px; color: var(--muted); margin-top: 16px; }
.hint em { color: var(--accent); font-style: normal; }

@media (max-width: 640px) {
  .panel { width: 84vw; }
  .hud h1 { font-size: 24px; }
}
