/* =============================================================================
   Harpia Games — Heightmap Generator (builds on noise-generator.css)
   ========================================================================== */

.terrain-stage {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--card-edge);
}

.terrain-stage canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  touch-action: none;          /* we handle drag / pinch ourselves */
  cursor: grab;
}
.terrain-stage canvas.is-dragging { cursor: grabbing; }

/* While orbiting: no text selection anywhere (it would auto-scroll the page)
   and no scroll chaining / pull-to-refresh. */
.terrain-dragging,
.terrain-dragging * {
  -webkit-user-select: none;
  user-select: none;
}
.terrain-dragging { overscroll-behavior: none; }
.terrain-stage canvas { -webkit-user-select: none; user-select: none; overscroll-behavior: contain; }

.terrain-hint {
  position: absolute;
  left: .75rem;
  bottom: .7rem;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(20, 19, 31, .55);
  padding: .25rem .55rem;
  pointer-events: none;
}

.terrain-nogl {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.terrain-group {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: -.4rem;
}

.terrain-select {
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--card-edge);
  padding: .5rem .6rem;
  font: inherit;
  cursor: pointer;
}

.terrain-note {
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
}
.terrain-note em { font-style: normal; color: var(--text); }

/* The 3D view benefits from more width than the 2D preview. */
@media (min-width: 901px) {
  .terrain-app { grid-template-columns: minmax(0, 1fr) 320px; }
}
