:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  background: #ad968c;
}

* { box-sizing: border-box; }

html, body, main {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

main {
  position: relative;
  background: radial-gradient(ellipse at 29% 33%, #cbb0a0 0%, #bda296 39%, #a28e87 100%);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

canvas:active { cursor: grabbing; }

.controls {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 9px 13px 5px;
  width: min(212px, calc(100% - 32px));
  border: 1px solid #fff3e27a;
  border-radius: 12px;
  background: #f5e7d9de;
  color: #44332a;
  box-shadow: 0 2px 6px #49332514, 0 10px 24px #49332517;
}

.controls label {
  display: grid;
  min-width: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .025em;
}

.controls input {
  width: 100%;
  height: 23px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
  --track: #bfaa97;
  --knob: #a4612d;
}

.controls #wind { --knob: #567363; }

.controls input::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--track);
  border-radius: 8px;
}

.controls input::-moz-range-track {
  height: 3px;
  background: var(--track);
  border-radius: 8px;
}

.controls input::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: none;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 0 0 2px #f7ede3;
}

.controls input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 0 0 2px #f7ede3;
}

.controls input:focus-visible {
  outline: 2px solid #644c3b;
  outline-offset: 3px;
  border-radius: 4px;
}

#status {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: 85%;
  margin: 0;
  padding: 12px 16px;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  background: #f5e7d9;
  color: #44332a;
  font-size: 14px;
}

@media (orientation: portrait) {
  .controls {
    left: 50%;
    transform: translateX(-50%);
  }
}
