/* Soft, still ambient wash to calm the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 214, 228, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 85% 88%, rgba(214, 232, 240, 0.35) 0%, transparent 45%);
}

main {
  max-width: 44rem;
  animation: fade-in 0.7s ease;
}

.header h1 { font-weight: 500; }

.subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 1.75rem;
  max-width: 30rem;
  line-height: 1.7;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.tool-label {
  font-family: "Fredoka", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tools {
  display: flex;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.3rem;
  border-radius: 14px;
  border: 1.5px solid #f1e3da;
}
/* dark mode: the toolbar pill needs a dark surface so its light button text reads */
html.dark .tools { background: var(--card); border-color: var(--border); }

.tool-btn {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tool-btn:hover { color: var(--ink); }

.tool-btn.is-active {
  background: var(--pick-bg);
  color: var(--primary-dark);
}

/* Sand color swatches */
.swatches { gap: 0.35rem; }

.swatch {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid #e7d9cf;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, box-shadow 0.15s;
}

.swatch:hover { transform: scale(1.1); }

.swatch.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--pick-bg);
}

/* Garden canvases */
.garden-wrap {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(150, 120, 80, 0.18);
  border: 3px solid #e9dcc4;
  line-height: 0;
}

.garden-wrap canvas {
  display: block;
  width: 100%;
  touch-action: none;
}

#stones {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}
