:root {
  --bg-deep: #070605;
  --bg-mid: #14100c;
  --ink: #f3ebe0;
  --muted: #a89884;
  --wax: #e8d7b8;
  --wax-deep: #c4a878;
  --wax-shadow: #8a6e45;
  --flame-outer: #ff7a18;
  --flame-mid: #ffb347;
  --flame-inner: #ffe29a;
  --flame-core: #fff6d8;
  --glow: rgba(255, 150, 40, 0.42);
  --holder: #2a2218;
  --holder-edge: #4a3a28;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 72%, #2a1a0c 0%, transparent 58%),
    radial-gradient(ellipse 100% 80% at 50% 100%, #120c08 0%, var(--bg-deep) 70%),
    linear-gradient(180deg, #050403 0%, #0c0907 45%, #120e0a 100%);
  transition: filter 1.2s var(--ease);
}

.haze {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 180, 90, 0.05), transparent 35%),
    radial-gradient(circle at 70% 30%, rgba(255, 120, 40, 0.04), transparent 40%);
  opacity: 0.35;
  transition: opacity 1.4s var(--ease);
}

.sparks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: 28%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffcc77;
  box-shadow: 0 0 8px #ff9a3a;
  opacity: 0;
  animation: rise var(--dur, 4s) linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes rise {
  0% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  100% {
    transform: translate(calc(-50% + var(--drift, 0px)), -46vh) scale(0.2);
    opacity: 0;
  }
}

.stage {
  position: relative;
  z-index: 1;
  display: block;
}

.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: 0.75rem;
  padding:
    max(0.85rem, env(safe-area-inset-top))
    clamp(0.85rem, 2.5vw, 2rem)
    max(1.25rem, env(safe-area-inset-bottom));
}

.brand {
  text-align: center;
  flex: 0 0 auto;
}

.rite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(36rem, 92vw);
}

.altar {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  column-gap: clamp(2rem, 6vw, 3.5rem);
  align-items: end;
  width: max-content;
  max-width: 100%;
  animation: brandIn 1.2s var(--ease) 0.16s both;
}

.brand__mark {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #f7efe4;
  text-shadow: 0 0 40px rgba(255, 170, 70, 0.15);
  animation: brandIn 1.2s var(--ease) both;
}

.brand__line {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  max-width: 28rem;
  animation: brandIn 1.2s var(--ease) 0.12s both;
}

@keyframes brandIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.candle-unit {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  text-align: center;
  width: max-content;
}

.dedication {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f0e4d4;
}

.unit-meta {
  margin: 0;
  min-height: 1em;
  font-size: 0.72rem;
  color: var(--muted);
}

.candle-scene {
  position: relative;
  width: 120px;
  height: 210px;
  display: grid;
  place-items: end center;
  isolation: isolate;
  overflow: visible;
}

.glow {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 200px;
  height: 200px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, rgba(255, 120, 30, 0.18) 35%, transparent 70%);
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  z-index: 0;
}

.glow--soft {
  width: 260px;
  height: 260px;
  bottom: 4%;
  background: radial-gradient(circle, rgba(255, 170, 70, 0.22) 0%, rgba(255, 110, 30, 0.08) 40%, transparent 72%);
  filter: blur(18px);
}

.halo {
  position: absolute;
  left: 50%;
  bottom: 48%;
  width: 120px;
  height: 120px;
  transform: translateX(-50%) scale(0.4);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 240, 190, 0.55) 0%, rgba(255, 180, 70, 0.18) 28%, transparent 62%);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 0.7s ease, transform 0.7s var(--ease);
}

.halo::before,
.halo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  height: 2px;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 230, 170, 0.55),
    transparent
  );
  filter: blur(0.4px);
  opacity: 0.65;
}

.halo::after {
  transform: translate(-50%, -50%) rotate(90deg);
  width: 110%;
}

.glints {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.glints span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff6d8;
  box-shadow: 0 0 8px 2px rgba(255, 210, 120, 0.85);
  opacity: 0;
  animation: glintTwinkle 2.8s ease-in-out infinite;
}

.glints span:nth-child(1) {
  left: 42%;
  top: 28%;
  animation-delay: 0.1s;
}

.glints span:nth-child(2) {
  left: 58%;
  top: 22%;
  width: 2px;
  height: 2px;
  animation-delay: 0.7s;
}

.glints span:nth-child(3) {
  left: 36%;
  top: 40%;
  animation-delay: 1.3s;
}

.glints span:nth-child(4) {
  left: 62%;
  top: 36%;
  width: 2px;
  height: 2px;
  animation-delay: 1.9s;
}

.glints span:nth-child(5) {
  left: 50%;
  top: 18%;
  width: 4px;
  height: 4px;
  animation-delay: 0.4s;
}

@keyframes glintTwinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
  40% {
    opacity: 1;
    transform: scale(1.15);
  }
  55% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.candle {
  position: relative;
  width: 64px;
  height: 185px;
  cursor: pointer;
  outline: none;
  z-index: 2;
  transform-origin: 50% 100%;
  animation: candleSway 5.5s ease-in-out infinite;
  transition: filter 0.6s ease;
}

.candle-unit:nth-child(2) .candle {
  animation-delay: -2.4s;
}

.candle:focus-visible {
  filter: drop-shadow(0 0 0 transparent);
}

.candle:focus-visible .wax__body {
  outline: 2px solid rgba(255, 200, 120, 0.55);
  outline-offset: 6px;
}

@keyframes candleSway {
  0%,
  100% {
    transform: rotate(-0.6deg);
  }
  50% {
    transform: rotate(0.7deg);
  }
}

.flame {
  position: absolute;
  left: 50%;
  bottom: 140px;
  width: 30px;
  height: 52px;
  transform: translateX(-50%) scale(0.15);
  opacity: 0;
  transform-origin: 50% 100%;
  transition: opacity 0.35s ease, transform 0.55s var(--ease);
  z-index: 5;
  filter: drop-shadow(0 0 12px rgba(255, 160, 40, 0.75)) drop-shadow(0 0 28px rgba(255, 140, 40, 0.45));
}

.flame__aura {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 48px;
  height: 72px;
  transform: translateX(-50%);
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 160, 50, 0.55), transparent 70%);
  filter: blur(6px);
  animation: auraPulse 1.6s ease-in-out infinite;
  opacity: 0.85;
}

.flame__outer,
.flame__mid,
.flame__inner,
.flame__core {
  position: absolute;
  left: 50%;
  bottom: 0;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  transform: translateX(-50%);
}

@keyframes auraPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(0.95);
  }
  50% {
    opacity: 0.95;
    transform: translateX(-50%) scale(1.08);
  }
}

.flame__outer {
  width: 28px;
  height: 54px;
  background: radial-gradient(ellipse at 50% 80%, var(--flame-outer), transparent 70%);
  animation: flicker 0.18s infinite alternate;
  opacity: 0.9;
}

.flame__mid {
  width: 18px;
  height: 42px;
  background: linear-gradient(180deg, var(--flame-mid), #ff8a20 80%);
  animation: flicker 0.14s infinite alternate-reverse;
  filter: blur(0.3px);
}

.flame__inner {
  width: 10px;
  height: 28px;
  background: linear-gradient(180deg, var(--flame-inner), #ffb24a);
  animation: flicker 0.11s infinite alternate;
}

.flame__core {
  width: 5px;
  height: 14px;
  bottom: 2px;
  background: var(--flame-core);
  border-radius: 50%;
  box-shadow: 0 0 10px 3px rgba(255, 245, 200, 0.85);
  animation: corePulse 1.1s ease-in-out infinite;
}

.flame__wick-glow {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255, 210, 120, 0.85);
  filter: blur(3px);
}

@keyframes flicker {
  from {
    transform: translateX(-50%) scaleX(1) scaleY(1) rotate(-1deg);
  }
  to {
    transform: translateX(calc(-50% + 0.6px)) scaleX(0.94) scaleY(1.05) rotate(1.2deg);
  }
}

@keyframes corePulse {
  0%,
  100% {
    opacity: 0.85;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.15);
  }
}

.wick {
  position: absolute;
  left: 50%;
  bottom: 134px;
  width: 3px;
  height: 13px;
  transform: translateX(-50%);
  z-index: 4;
}

.wick__stem {
  display: block;
  width: 3px;
  height: 14px;
  margin: 0 auto;
  border-radius: 2px;
  background: linear-gradient(180deg, #2a2218, #5a4630);
}

.wick__tip {
  display: block;
  width: 4px;
  height: 4px;
  margin: -1px auto 0;
  border-radius: 50%;
  background: #1a1410;
  box-shadow: 0 0 0 transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.wax {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 52px;
  height: 120px;
  transform: translateX(-50%);
  z-index: 3;
}

.wax__rim {
  position: absolute;
  top: 0;
  left: 50%;
  width: 56px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #f2e4c8, var(--wax-deep));
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.25);
  z-index: 3;
}

.wax__pool {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 42px;
  height: 10px;
  transform: translateX(-50%) scale(0.4);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #fff2c8, #e0a84a 70%, transparent);
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
  z-index: 4;
  filter: blur(0.4px);
}

.wax__sheen {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 18px;
  height: 70%;
  transform: translateX(-120%);
  border-radius: 40%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0.05) 55%,
    transparent
  );
  opacity: 0.25;
  z-index: 5;
  pointer-events: none;
  filter: blur(0.5px);
  transition: opacity 0.7s ease;
}

.wax__body {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 44px;
  height: 112px;
  transform: translateX(-50%);
  border-radius: 8px 8px 18px 18px / 6px 6px 28px 28px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.22)),
    linear-gradient(180deg, var(--wax) 0%, var(--wax-deep) 55%, var(--wax-shadow) 100%);
  box-shadow:
    inset 4px 0 10px rgba(255, 255, 255, 0.18),
    inset -6px 0 14px rgba(80, 50, 10, 0.25),
    0 18px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.wax__body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 11px,
    rgba(255, 255, 255, 0.03) 11px,
    rgba(255, 255, 255, 0.03) 12px
  );
  opacity: 0.55;
  pointer-events: none;
}

.wax__drip {
  position: absolute;
  top: 18px;
  width: 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f0dfb8, #c9a56a);
  opacity: 0.85;
  z-index: 2;
}

.wax__drip--a {
  left: 8px;
  height: 34px;
  transform: rotate(4deg);
}

.wax__drip--b {
  right: 10px;
  height: 22px;
  transform: rotate(-6deg);
  opacity: 0.7;
}

.wax__shadow {
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 90px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45), transparent 70%);
  z-index: 1;
}

.holder {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 92px;
  height: 38px;
  transform: translateX(-50%);
  z-index: 1;
}

.holder__shine {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 64px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 200, 120, 0.35), transparent 70%);
  opacity: 0;
  filter: blur(3px);
  transition: opacity 0.8s ease;
  z-index: 2;
  pointer-events: none;
}

.holder__plate {
  position: absolute;
  left: 50%;
  top: 0;
  width: 84px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #5a4632, var(--holder));
  box-shadow: inset 0 2px 3px rgba(255, 220, 160, 0.12), 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.8s ease;
}

.holder__base {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 46px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, var(--holder-edge), #1a140f);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 120, 0.06);
}

.smoke {
  position: absolute;
  left: 50%;
  bottom: 58%;
  width: 40px;
  height: 90px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}

.smoke::before,
.smoke::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  height: 70px;
  border-radius: 40%;
  background: linear-gradient(180deg, transparent, rgba(180, 180, 180, 0.35), transparent);
  filter: blur(4px);
  transform: translateX(-50%);
}

.smoke.is-puffing {
  animation: puff 1.6s ease-out forwards;
}

.smoke.is-puffing::before {
  animation: smokeDrift 1.6s ease-out forwards;
}

.smoke.is-puffing::after {
  animation: smokeDrift 1.6s ease-out 0.08s forwards;
  width: 10px;
}

@keyframes puff {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

@keyframes smokeDrift {
  from {
    transform: translateX(-50%) translateY(0) scaleX(1);
  }
  to {
    transform: translateX(calc(-50% + 18px)) translateY(-70px) scaleX(1.8);
  }
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  max-width: 28rem;
  min-height: 0;
}

.meta:empty {
  display: none;
}

.prayer {
  position: relative;
  width: min(36rem, 92vw);
  margin: 0.15rem auto 0;
  padding: 0.95rem 1.15rem 1.1rem;
  text-align: center;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
  opacity: 0.78;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), background 1.1s var(--ease);
  animation: prayerFloatIn 1.35s var(--ease) 0.28s both;
  background:
    radial-gradient(ellipse 80% 90% at 50% 40%, rgba(255, 170, 70, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(18, 12, 8, 0.28), rgba(10, 7, 5, 0.12));
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  border-radius: 1.35rem;
  box-shadow:
    0 0 0 1px rgba(255, 200, 130, 0.06),
    0 18px 40px rgba(0, 0, 0, 0.22);
}

.prayer::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.prayer--burning {
  opacity: 0.95;
  background:
    radial-gradient(ellipse 80% 90% at 50% 35%, rgba(255, 170, 70, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(24, 16, 10, 0.34), rgba(12, 8, 5, 0.16));
  box-shadow:
    0 0 0 1px rgba(255, 200, 130, 0.1),
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 36px rgba(255, 150, 50, 0.08);
}

.prayer__veil {
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 180, 90, 0.1),
    transparent 55%
  );
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  transition: opacity 1.2s var(--ease);
}

.prayer--burning .prayer__veil {
  opacity: 0.8;
}

.prayer__whisper {
  position: relative;
  z-index: 1;
  margin: 0 0 0.55rem;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(168, 152, 132, 0.75);
}

.prayer__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.38rem;
  width: 100%;
}

.prayer__verse,
.prayer__amen {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.8rem, 1.7vw, 0.95rem);
  line-height: 1.42;
  text-wrap: pretty;
}

.prayer__amen {
  margin-top: 0.25rem;
  font-style: normal;
  font-weight: 600;
  font-size: clamp(0.92rem, 1.9vw, 1.05rem);
  letter-spacing: 0.06em;
}

@keyframes prayerFloatIn {
  from {
    transform: translateY(16px);
    filter: blur(3px);
  }
  to {
    transform: translateY(0);
    filter: blur(0);
  }
}

.prayer__word {
  display: inline-block;
  color: rgba(120, 100, 78, 0.22);
  text-shadow: none;
  filter: blur(0.6px);
  opacity: 0.25;
  animation: wordIgnite 1.4s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

.prayer__body--burning .prayer__word {
  animation-name: wordIgniteHot;
}

.prayer__amen .prayer__word {
  animation-name: wordIgniteAmen;
}

@keyframes wordIgnite {
  0% {
    opacity: 0.15;
    filter: blur(1px);
    color: rgba(90, 70, 50, 0.18);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    color: rgba(190, 175, 155, 0.72);
    text-shadow: none;
  }
}

@keyframes wordIgniteHot {
  0% {
    opacity: 0.12;
    filter: blur(1.2px);
    color: rgba(60, 40, 20, 0.15);
  }
  45% {
    opacity: 1;
    filter: blur(0);
    color: rgba(236, 214, 170, 0.9);
    text-shadow: 0 0 10px rgba(255, 170, 70, 0.22);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    color: rgba(220, 205, 180, 0.82);
    text-shadow: 0 0 6px rgba(255, 170, 70, 0.12);
  }
}

@keyframes wordIgniteAmen {
  0% {
    opacity: 0.1;
    filter: blur(1.2px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    color: rgba(210, 180, 130, 0.85);
    text-shadow: 0 0 10px rgba(255, 170, 70, 0.18);
  }
}


.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.25s ease, color 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.btn--primary {
  background: linear-gradient(180deg, #f0c27a, #d0893a);
  color: #2a1a0c;
  box-shadow: 0 10px 28px rgba(208, 120, 40, 0.28);
}

.btn--primary:hover {
  background: linear-gradient(180deg, #f6d29a, #db9748);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(168, 152, 132, 0.35);
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: rgba(243, 235, 224, 0.35);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translate(-50%, 120%);
  z-index: 20;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: rgba(24, 18, 12, 0.92);
  border: 1px solid rgba(255, 190, 110, 0.18);
  color: #f3ebe0;
  font-size: 0.85rem;
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
  pointer-events: none;
  max-width: min(90vw, 360px);
  text-align: center;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Lit state — room ambient */
.stage:not([data-lit="false"]) .haze {
  opacity: 0.85;
}

.stage:not([data-lit="false"]) .sparks {
  opacity: 1;
}

.stage:not([data-lit="false"]) .brand__mark {
  text-shadow: 0 0 48px rgba(255, 170, 70, 0.35);
}

.stage[data-lit="1"] .atmosphere {
  filter: brightness(1.05) saturate(1.05);
}

.stage[data-lit="2"] .atmosphere {
  filter: brightness(1.1) saturate(1.1);
}

/* Lit state — per candle */
.candle-unit[data-lit="true"] .glow {
  opacity: 1;
  animation: glowBreath 2.8s ease-in-out infinite;
}

.candle-unit[data-lit="true"] .glow--soft {
  opacity: 0.9;
  animation: glowBreath 3.6s ease-in-out infinite reverse;
}

.candle-unit[data-lit="true"] .halo {
  opacity: 0.85;
  transform: translateX(-50%) scale(1);
  animation: haloSpin 12s linear infinite;
}

.candle-unit[data-lit="true"] .glints {
  opacity: 1;
}

.candle-unit[data-lit="true"] .flame {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.candle-unit[data-lit="true"] .wax__pool {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: poolShimmer 2.4s ease-in-out infinite;
}

.candle-unit[data-lit="true"] .wax__sheen {
  opacity: 0.7;
  animation: sheenSweep 3.8s ease-in-out infinite;
}

.candle-unit[data-lit="true"] .wax__body {
  box-shadow:
    inset 4px 0 10px rgba(255, 255, 255, 0.22),
    inset -6px 0 14px rgba(80, 50, 10, 0.25),
    0 18px 30px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(255, 160, 60, 0.18);
}

.candle-unit[data-lit="true"] .wax__rim {
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 14px rgba(255, 190, 100, 0.35);
}

.candle-unit[data-lit="true"] .holder__shine {
  opacity: 1;
  animation: platePulse 2.6s ease-in-out infinite;
}

.candle-unit[data-lit="true"] .holder__plate {
  box-shadow:
    inset 0 2px 3px rgba(255, 220, 160, 0.28),
    0 4px 10px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(255, 160, 60, 0.22);
}

.candle-unit[data-lit="true"] .dedication {
  text-shadow: 0 0 18px rgba(255, 180, 90, 0.35);
}

.candle-unit[data-lit="true"] .wick__tip {
  background: #3a2a18;
  box-shadow: 0 0 8px 2px rgba(255, 180, 80, 0.7);
}

@keyframes haloSpin {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(18deg);
  }
}

@keyframes poolShimmer {
  0%,
  100% {
    filter: blur(0.4px) brightness(1);
  }
  50% {
    filter: blur(0.4px) brightness(1.25);
  }
}

@keyframes sheenSweep {
  0%,
  100% {
    transform: translateX(-130%) skewX(-8deg);
    opacity: 0.35;
  }
  50% {
    transform: translateX(-70%) skewX(-8deg);
    opacity: 0.8;
  }
}

@keyframes platePulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.candle-unit[data-lit="true"] .btn--primary {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(168, 152, 132, 0.35);
  box-shadow: none;
}

.candle-unit[data-lit="true"] .btn--primary:hover {
  color: var(--ink);
  border-color: rgba(243, 235, 224, 0.35);
  background: transparent;
}

.candle-unit.is-igniting .flame {
  animation: ignite 0.7s var(--ease) forwards;
}

@keyframes ignite {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.2) translateY(8px);
  }
  55% {
    opacity: 1;
    transform: translateX(-50%) scale(1.12) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
  }
}

@keyframes glowBreath {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translateX(-50%) scale(1.08);
    opacity: 1;
  }
}

.halo {
  width: 80px;
  height: 80px;
  bottom: 42%;
}

@media (max-width: 760px) {
  .hero {
    justify-content: flex-start;
    min-height: auto;
    padding-top: max(0.7rem, env(safe-area-inset-top));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    gap: 0.55rem;
  }

  .rite {
    width: min(100%, 92vw);
    gap: 0.65rem;
  }

  .altar {
    column-gap: 1.75rem;
  }

  .candle-scene {
    width: 100px;
    height: 175px;
  }

  .candle {
    width: 56px;
    height: 160px;
  }

  .flame {
    bottom: 120px;
  }

  .wick {
    bottom: 114px;
  }

  .wax {
    width: 46px;
    height: 105px;
    bottom: 24px;
  }

  .wax__body {
    width: 40px;
    height: 98px;
  }

  .prayer {
    width: 100%;
    padding: 0.85rem 0.95rem 1rem;
  }

  .prayer__verse {
    font-size: 0.8rem;
    line-height: 1.38;
  }
}

@media (max-height: 720px) {
  .brand__mark {
    font-size: clamp(2.1rem, 6vw, 3rem);
  }

  .candle-scene {
    height: 170px;
  }

  .prayer__body {
    gap: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .candle,
  .flame__outer,
  .flame__mid,
  .flame__inner,
  .flame__core,
  .flame__aura,
  .glow,
  .halo,
  .glints span,
  .wax__pool,
  .wax__sheen,
  .holder__shine,
  .prayer__word,
  .ember {
    animation: none !important;
  }

  .prayer__word {
    opacity: 1;
    filter: none;
    transform: none;
    color: rgba(200, 185, 165, 0.8);
    text-shadow: none;
  }
}
