.wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}

.stage {
  position: relative;
  width: 120px;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* candle body */
.candleBody {
  width: 54px;
  height: 120px;
  border-radius: 8px 8px 4px 4px;
  background:
    linear-gradient(90deg, rgba(120, 70, 40, 0.18) 0%, transparent 18% 82%, rgba(120, 70, 40, 0.18) 100%),
    linear-gradient(180deg, #fff6e6 0%, #f3e2c4 60%, #e6cfa6 100%);
  box-shadow: inset 0 6px 12px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(120, 80, 45, 0.25);
}
.candleBody::before {
  content: "";
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #e6cfa6 0%, #d8bd92 70%, #cdb086 100%);
}

/* wick */
.wick {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 12px;
  background: #3a2a1c;
  border-radius: 2px;
}

/* flame */
.flame {
  position: absolute;
  bottom: 128px;
  left: 50%;
  width: 22px;
  height: 46px;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 78%, #fff6c4 0%, #ffd34d 38%, #ff8b2e 70%, #e8551f 100%);
  box-shadow: 0 -2px 26px 8px rgba(255, 160, 60, 0.55), 0 0 60px 18px rgba(255, 190, 90, 0.35);
  transform-origin: 50% 100%;
  animation: flicker 2.2s ease-in-out infinite;
}
.flame::after {
  content: "";
  position: absolute;
  inset: 4px 5px 8px 5px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 50% 80%, #fff 0%, #ffe9a8 45%, rgba(255, 233, 168, 0) 75%);
}
@keyframes flicker {
  0%, 100% { transform: translateX(-50%) scale(1) rotate(-1deg); }
  25% { transform: translateX(-50%) scale(1.04, 0.98) rotate(1.5deg); }
  50% { transform: translateX(-51%) scale(0.97, 1.05) rotate(-1.5deg); }
  75% { transform: translateX(-49%) scale(1.03, 0.99) rotate(1deg); }
}

/* unlit state */
.candleBody[data-lit="false"] { filter: saturate(0.9) brightness(0.97); }

.count {
  font-size: clamp(30px, 5vw, 48px);
  color: var(--garnet);
  line-height: 1;
}
.countLabel { color: var(--muted); font-style: italic; font-size: 1.05rem; }
.memory { color: var(--gold); letter-spacing: 0.2em; text-transform: uppercase; font-size: 12px; }

.litMsg {
  color: var(--garnet-bright);
  font-style: italic;
  font-size: 1.1rem;
  min-height: 1.4em;
}

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