:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #061018;
  color: #eaffff;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input, select { font: inherit; }
button, select { color: inherit; }

.shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 105%, rgba(25, 211, 225, .16), transparent 44%),
    linear-gradient(180deg, #08151f 0%, #050b11 100%);
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.hero {
  position: absolute;
  z-index: 2;
  top: clamp(20px, 4vw, 44px);
  left: clamp(20px, 5vw, 70px);
  right: clamp(20px, 5vw, 70px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: #70f7ff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: .94;
  letter-spacing: -.055em;
  text-shadow: 0 0 40px rgba(112, 247, 255, .12);
}

.lede {
  max-width: 590px;
  margin: 14px 0 0;
  color: #a9bdc8;
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  line-height: 1.55;
}

.status {
  flex: none;
  border: 1px solid rgba(112, 247, 255, .22);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(3, 15, 22, .54);
  color: #bceef1;
  font-size: .75rem;
  letter-spacing: .04em;
  backdrop-filter: blur(12px);
}

.panel {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(42px, 6vh, 68px);
  width: min(1060px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) auto auto;
  gap: 18px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(185, 237, 242, .13);
  border-radius: 22px;
  background: rgba(6, 16, 24, .72);
  box-shadow: 0 22px 80px rgba(0, 0, 0, .34);
  backdrop-filter: blur(20px) saturate(130%);
}

.control label, .palette legend {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #94acb8;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

output { color: #d8feff; }
input[type="range"] { width: 100%; accent-color: #70f7ff; cursor: pointer; }
select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  padding: 0 10px;
  background: #0a1a25;
}

.palette { min-width: 140px; margin: 0; padding: 0; border: 0; }
.palette legend { padding: 0; }
.swatch {
  width: 27px;
  height: 27px;
  margin-right: 4px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 16px color-mix(in srgb, var(--swatch) 45%, transparent);
  cursor: pointer;
}
.swatch.active { border-color: #fff; transform: scale(1.12); }

.actions { display: flex; gap: 8px; }
.actions button {
  min-height: 38px;
  border: 1px solid rgba(112, 247, 255, .26);
  border-radius: 11px;
  padding: 0 13px;
  background: rgba(18, 92, 100, .28);
  font-size: .8rem;
  font-weight: 760;
  cursor: pointer;
  white-space: nowrap;
}
.actions button:hover, .actions button:focus-visible { background: rgba(40, 145, 153, .35); outline: 2px solid #70f7ff; outline-offset: 2px; }
.actions .quiet { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }

.hint {
  position: absolute;
  z-index: 2;
  right: clamp(20px, 5vw, 70px);
  bottom: 13px;
  margin: 0;
  color: #607985;
  font-size: .71rem;
}
.hint span { color: #aac5ce; }

@media (max-width: 900px) {
  .hero { display: block; }
  .status { display: inline-block; margin-top: 14px; }
  .panel { grid-template-columns: repeat(2, 1fr); gap: 13px; bottom: 34px; padding: 14px; }
  .palette, .actions { grid-column: span 1; }
  .hint { display: none; }
}

@media (max-width: 560px) {
  .shell { min-height: 640px; }
  .lede { max-width: 90%; }
  .panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions { grid-column: 1 / -1; }
  .actions button { flex: 1; padding: 0 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .swatch { transition: none; }
}
