:root {
  color-scheme: dark;
  font: 13px system-ui, sans-serif;
  background: #ad9384;
}

* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
#world, #world canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#world canvas { touch-action: none; cursor: grab; }
#world canvas:active { cursor: grabbing; }

.controls, .hint {
  position: fixed;
  color: #fff5e6;
  background: #30231edb;
  border: 1px solid #ffe3bb38;
  border-radius: 12px;
  box-shadow: 0 4px 20px #39251b26;
}

.controls {
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto minmax(76px, 112px);
  align-items: center;
  column-gap: 10px;
  padding: 6px 11px;
}

.controls input { width: 100%; height: 22px; margin: 0; accent-color: #ffca7e; cursor: pointer; }
.controls input:focus-visible { outline: 2px solid #fff5e6; outline-offset: 2px; border-radius: 5px; }
.hint { bottom: max(14px, env(safe-area-inset-bottom)); right: max(14px, env(safe-area-inset-right)); margin: 0; padding: 6px 10px; font-size: 11px; pointer-events: none; }
.touch { display: none; }
@media (pointer: coarse) { .touch { display: inline; } .mouse { display: none; } }
@media (max-width: 550px) {
  .controls { grid-template-columns: auto minmax(65px, 27vw); bottom: max(12px, env(safe-area-inset-bottom)); }
  .controls input { height: 28px; }
  .hint { top: max(12px, env(safe-area-inset-top)); bottom: auto; }
}
