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

html, body { height: 100%; overflow: hidden; background: #0b0e14; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #e8eaee;
  user-select: none;
}

#app, #app canvas { position: fixed; inset: 0; display: block; touch-action: none; }

/* --- control panel ------------------------------------------------------ */
#panel {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 250px;
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: rgba(14, 18, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

#panel h1 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f0a878;
  margin-bottom: 12px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
}

.row label { font-size: 12px; color: #aab2c0; }
.row .value { font-size: 12px; color: #fff; font-variant-numeric: tabular-nums; }

input[type="range"] {
  width: 100%;
  margin: 6px 0 4px;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f0a878;
  cursor: pointer;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f0a878;
  cursor: pointer;
  border: none;
}

.presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}

.presets button {
  padding: 6px 4px;
  font-size: 11.5px;
  color: #dde3ec;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.presets button:hover { background: rgba(255, 255, 255, 0.18); }

.toggles {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: #aab2c0;
}

.toggles label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.toggles input { accent-color: #f0a878; }

/* --- overlays ----------------------------------------------------------- */
#hint {
  position: fixed;
  left: 16px;
  bottom: 14px;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(232, 234, 238, 0.75);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

#hint b { color: #fff; font-weight: 600; }

#readout {
  position: fixed;
  right: 18px;
  bottom: 14px;
  font-size: 11.5px;
  color: rgba(232, 234, 238, 0.65);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

#splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12vh;
  pointer-events: none;
  transition: opacity 0.3s;
}

#splash.hidden { opacity: 0; }

#splash .card {
  padding: 14px 30px;
  text-align: center;
  border-radius: 14px;
  background: rgba(14, 18, 26, 0.66);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#splash .card h2 { font-size: 17px; font-weight: 600; }
#splash .card p { font-size: 12px; color: #aab2c0; margin-top: 4px; }
