.bloom-stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, #87ceeb 0%, #bfe7ff 24%, #7ccf6a 24%, #5faa4b 100%);
  color: #102a13;
  font-family: Inter, system-ui, sans-serif;
  user-select: none;
  touch-action: manipulation;
}

.bloom-stage * {
  box-sizing: border-box;
}

.bloom-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #16351a;
}

.bloom-bank {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.bloom-chip {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.bloom-board {
  position: absolute;
  top: 58px;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  width: min(96vw, 520px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(71, 125, 51, .45);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.18),
    0 20px 40px rgba(0,0,0,.18);
}

.bloom-cell {
  position: relative;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(166,226,120,.82), rgba(110,186,72,.92));
  overflow: hidden;
}

.bloom-cell:nth-child(odd) {
  filter: brightness(.98);
}

.bloom-cell.selected {
  outline: 3px solid #fde047;
  outline-offset: -3px;
}

.bloom-lawn-line {
  position: absolute;
  inset: auto 0 8px 0;
  height: 3px;
  background: rgba(255,255,255,.18);
}

.bloom-plant,
.bloom-enemy,
.bloom-pea,
.bloom-sun {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bloom-plant {
  font-size: 34px;
  z-index: 6;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.12));
}

.bloom-enemy {
  font-size: 34px;
  z-index: 7;
}

.bloom-pea {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9f99d, #65a30d 72%);
  box-shadow: 0 0 10px rgba(101,163,13,.45);
  z-index: 8;
}

.bloom-sun {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff7bf 0%, #fde047 55%, #f59e0b 100%);
  box-shadow: 0 0 18px rgba(245,158,11,.35);
  z-index: 8;
}

.bloom-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .28);
  text-align: center;
}

.bloom-overlay.hidden {
  display: none;
}

.bloom-overlay-card {
  max-width: 360px;
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  color: #1f2937;
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
}

.bloom-overlay-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.bloom-overlay-card p {
  margin: 0 0 14px;
}

.bloom-overlay-card button {
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #22c55e, #15803d);
}

.bloom-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.bloom-btn {
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: rgba(30, 41, 59, .92);
}

.bloom-btn.primary {
  background: linear-gradient(180deg, #16a34a, #166534);
}

.bloom-btn.secondary {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.bloom-cell .emoji-center {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
}

@media (max-width: 420px) {
  .bloom-board {
    width: 98vw;
  }

  .bloom-plant,
  .bloom-enemy {
    font-size: 30px;
  }
}
