:root {
  --bg: #191110;
  --fg: #f2eee9;
  --muted: #bed4c7;
  --line: #4d413d;
  --accent: #ad6b4c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.45 system-ui, sans-serif;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

h1 { font-size: 1.15rem; margin: 0; }
header p, .hint { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.85rem; }

.stage { position: relative; justify-self: center; }

canvas {
  display: block;
  height: min(62vh, 640px);
  aspect-ratio: 128 / 160;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--line);
  background: var(--bg);
  image-rendering: auto;
  touch-action: none;
  cursor: crosshair;
}

/* Brush ring while dragging, green for wind as in the Experience. */
.brush {
  position: absolute;
  border: 2px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.brush[hidden] { display: none; }

#status {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 8px;
  text-align: center;
  font-size: 0.85rem;
  background: rgb(25 17 16 / 0.8);
}

#status:empty { display: none; }

nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }

button, select {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 14px;
}

button:hover:not(:disabled), select:hover:not(:disabled) { border-color: var(--muted); }
button:disabled, select:disabled { opacity: 0.5; }
#gust { border-color: var(--accent); }

.stats { margin: 0; text-align: center; font: 12px/1.4 ui-monospace, monospace; color: var(--muted); min-height: 4.2em; }

.grids { margin: 0; text-align: center; font-size: 0.85rem; color: var(--muted); }
.grids a { color: var(--fg); }
