:root {
  color-scheme: dark;
  --panel-bg: rgba(8, 12, 10, 0.72);
  --panel-border: rgba(210, 255, 220, 0.16);
  --text: rgba(235, 255, 240, 0.95);
  --muted: rgba(215, 245, 220, 0.68);
  --accent: rgba(159, 255, 184, 0.95);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(42, 73, 49, 0.35), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(44, 63, 49, 0.35), transparent 34%),
    #07100b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}

#world {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none;
}

.panel {
  position: fixed;
  left: 14px;
  top: 14px;
  width: min(400px, calc(100vw - 28px));
  z-index: 10;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
}

button, select, input {
  font: inherit;
}

button, select {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

button {
  padding: 7px 11px;
  cursor: pointer;
  white-space: nowrap;
}

select {
  width: 100%;
  padding: 9px 10px;
  outline: none;
  color: #eefcf0;
  background-color: rgba(18, 31, 22, 0.96);
}

select option {
  color: #0b140e;
  background-color: #eefcf0;
}

@media (prefers-color-scheme: dark) {
  select option {
    color: #eefcf0;
    background-color: #142018;
  }
}

.controls {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.control-block {
  display: grid;
  gap: 7px;
}

label, output {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  touch-action: auto;
}

.hint {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(215, 245, 220, 0.6);
}

.panel.is-collapsed .controls { display: none; }

@media (max-width: 560px) {
  .panel {
    left: 10px;
    top: 10px;
    width: calc(100vw - 20px);
    padding: 10px;
  }
}
