:root {
  --sky-top: #b8e7ff;
  --sky-bottom: #dfffea;
  --ground: #d6f7d1;
  --grass-h: 250px; /* Switched to fixed height */
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -10;
  background: var(--ground); /* Fallback */
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom) 85%, var(--ground) 100%);
}

/* Grass container, now in document flow */
#grass-wrap {
  position: relative;
  height: var(--grass-h);
  overflow: hidden; /* To contain absolute children */
  /* Negative margin pulls the footer up over this element */
  margin-bottom: -250px;
}

#grass-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Floating config button, now absolute to wrap */
.config-fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  border: none;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  color: #0a3a1f;
  cursor: pointer;
  pointer-events: auto;
}
.config-fab:hover { background: rgba(255,255,255,0.95); }
.config-fab:active { transform: translateY(1px); }
.hidden { display: none !important; }

/* Simple settings panel, now absolute to wrap */
.grass-panel {
  position: absolute;
  bottom: 16px;
  right: 76px; /* 16px from button + 44px button width + 16px spacing */
  z-index: 10;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  width: min(360px, 92vw);
  color: #0a3a1f;
}
.grass-controls { display:flex; flex-direction:column; gap:10px; }
.grass-control { display:flex; align-items:center; gap:8px; }
.grass-control input[type="range"] { flex:1; }
.grass-pill {
  display:inline-block; min-width:3.2ch; padding:.1rem .4rem; border-radius:.5rem;
  background:#eaf6ef; font-variant-numeric: tabular-nums;
}