#prayer-candle{display:grid;grid-template-columns:minmax(9rem,1fr) minmax(0,2.4fr);align-items:center;gap:clamp(1rem,4vw,2.5rem);margin-block:1rem 1.5rem;padding:clamp(1rem,4vw,2rem);border:1px solid #d7bf94;border-radius:1rem;background:linear-gradient(135deg,#fff8e8,#fff);color:#203e4e;scroll-margin-top:7rem}
#prayer-candle h3{margin-block:0 .5rem;color:#703d1d}
#prayer-candle label{display:block;font-weight:700}
#prayer-candle textarea{display:block;width:100%;box-sizing:border-box;margin-block:.35rem;padding:.6rem;border:1px solid #8198a3;border-radius:.55rem;resize:vertical;color:inherit;background:#fff;font:inherit}
.candle-actions{display:flex;flex-wrap:wrap;gap:.4rem}
#prayer-candle-status:empty{display:none}
#prayer-candle{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);background:linear-gradient(130deg,#fff1d6,#fffaf0 70%);border-color:#cfa56b;box-shadow:0 .7rem 2rem #64321116}
#prayer-candle h3{font-size:clamp(1.4rem,3vw,2rem)}
#prayer-candle-light{background:#82411f;color:#fff7e8;border-color:#82411f}
#prayer-candle-status{color:#75431c;font-weight:700}
#prayer-candle .candle-scene{position:relative;isolation:isolate;display:grid;place-items:end center;width:100%;min-height:19rem;overflow:hidden;padding:0 0 2.5rem;border:1px solid #835533;border-radius:1rem;cursor:pointer;background:radial-gradient(ellipse at 50% 25%,#56341f,#1f1816 77%);box-shadow:inset 0 0 2rem #140d0c}
#prayer-candle .candle-scene:focus-visible{outline:3px solid #835022;outline-offset:4px}
.candle-arch{position:absolute;z-index:-1;inset:1.1rem 10% 1.8rem;border-radius:48% 48% .3rem .3rem / 55% 55% .3rem .3rem;border:.35rem double #a6774e66;background:repeating-linear-gradient(0deg,#75523918 0 1px,transparent 1px 2.2rem),radial-gradient(ellipse at 50% 70%,#2d201a,#171211);box-shadow:inset 0 0 1.3rem #100c0a}
.candle-arch::after{content:"";position:absolute;inset:auto 0 0;height:2rem;background:linear-gradient(#6f472d,#3a2219);border-top:1px solid #c18a5377}
.candle-wax{position:relative;width:3.6rem;height:7.3rem;border-radius:.48rem .48rem .6rem .6rem;background:linear-gradient(90deg,#a57442,#e7c48c 23%,#fff0c9 49%,#be8b51);box-shadow:0 .5rem .9rem #170d08a8}
.candle-wax::before{content:"";position:absolute;inset:-.18rem 0 auto;height:.68rem;border-radius:50%;background:radial-gradient(ellipse,#957347,#f5d7a5 72%)}
.candle-wick{position:absolute;bottom:100%;left:calc(50% - .09rem);width:.18rem;height:.48rem;background:#37231a;border-radius:50%}
.candle-flame{position:absolute;bottom:calc(100% + .25rem);left:50%;width:1.75rem;height:3.3rem;opacity:0;transform:translateX(-50%);transform-origin:50% 100%;border-radius:65% 35% 55% 45% / 78% 70% 30% 22%;background:radial-gradient(ellipse at 50% 80%,#fffef0 10%,#fff2a8 38%,#ffc15d 64%,#dc6a25 94%);box-shadow:0 0 .9rem #ffd77a,0 0 2.8rem .7rem #f6a841ad;transition:opacity .35s}
#prayer-candle[data-lit] .candle-flame{opacity:1;animation:candle-flicker 1.9s ease-in-out infinite alternate}
#prayer-candle[data-lit] .candle-arch{background:radial-gradient(ellipse at 50% 40%,#e2a55780,transparent 62%),repeating-linear-gradient(0deg,#9f735329 0 1px,transparent 1px 2.2rem),#2d201a}
@keyframes candle-flicker{0%,100%{transform:translateX(-50%) rotate(-3deg) scale(1,.96)}35%{transform:translateX(-50%) rotate(4deg) scale(.92,1.06)}67%{transform:translateX(-50%) rotate(-1deg) scale(1.05,.91)}}
@media(prefers-reduced-motion:reduce){#prayer-candle[data-lit] .candle-flame{animation:none;transition:none}}
@media(max-width:600px){#prayer-candle{grid-template-columns:minmax(0,1fr)}#prayer-candle .candle-scene{min-height:16rem}}

/* The foreground candle rests on the ledge in the shrine illustration. */
#prayer-candle .candle-scene {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
  min-height: 0;
  max-width: 850px;
  justify-self: center;
  padding: 0;
  container-type: inline-size;
  background: #2b180e url('/assets/annaya-inspired-candle-chapel.webp') center / cover no-repeat;
}
#prayer-candle { grid-template-columns: minmax(0,1fr); }
#prayer-candle > div { width: min(100%, 680px); justify-self: center; }
#prayer-candle .candle-arch { display: none; }
#prayer-candle .candle-wax { position: absolute; bottom: 14.5%; width: 7cqw; height: 18cqw; }
#prayer-candle .candle-flame { width: 3.2cqw; height: 6cqw; }
#prayer-candle .candle-scene::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(ellipse at 50% 50%, #ffb65a4a, transparent 43%);
}
#prayer-candle[data-lit] .candle-scene::before { opacity: 1; }
@media(prefers-reduced-motion:reduce){ #prayer-candle .candle-scene::before { transition:none; } }

#prayer-candle-saint { display:block; width:100%; margin-block:.35rem .9rem; padding:.55rem; border:1px solid #a98a65; border-radius:.55rem; color:inherit; background:#fffdf8; font:inherit; }
#prayer-candle .candle-wax { width:9cqw; height:20cqw; background:transparent url('/assets/natural-votive-candle.webp') center / 100% 100% no-repeat; box-shadow:none; }
#prayer-candle .candle-wax::before,#prayer-candle .candle-wick { display:none; }
#prayer-candle .candle-flame { bottom:98%; }
#prayer-candle-portrait { position:absolute; left:18%; top:31%; width:64%; height:39%; object-fit:cover; object-position:center 25%; border:1px solid #c59a56; border-radius:.16rem; box-shadow:0 0 .16rem #573b25a0; }
#prayer-candle-portrait[hidden] { display:none; }

#prayer-candle .candle-stage { position:relative; width:min(100%,850px); }
#prayer-candle .candle-stage .candle-scene { display:block; }
#prayer-candle .candle-wax { left:50%; transform:translateX(-50%); width:9cqw; height:24cqw; }
#prayer-candle .candle-flame { bottom:99%; width:2.8cqw; height:6.2cqw; }
#prayer-candle-portrait {
  left:50%; transform:translateX(-50%); top:auto; bottom:2.1cqw;
  width:7.2cqw; height:7.2cqw; border-radius:50%; object-position:center 32%;
  border:2px solid #dfb86e; box-shadow:0 0 0 1px #60421f,0 .1rem .3rem #51302088;
}
#prayer-candle-light {
  position:absolute; inset:auto auto 51% 56%; z-index:1; margin:0;
  padding:.45rem .65rem; min-height:44px; display:inline-flex; align-items:center;
  border:1px solid #e6ac65; background:#663514; box-shadow:0 .2rem .8rem #211109ad;
  max-width:41%; white-space:normal; text-align:start;
}
#prayer-candle-light[hidden] { display:none; }
#prayer-candle-light::before { content:"✦"; margin-inline-end:.35rem; color:#ffdf93; }
#prayer-candle[data-lit] .candle-wax { animation:votive-burn-down 150s linear forwards; }
@keyframes votive-burn-down { from { height:24cqw; } to { height:11cqw; } }
@media(prefers-reduced-motion:reduce){#prayer-candle[data-lit] .candle-wax{animation:none}}

/* Blend the devotional print with the wax highlights instead of framing it. */
#prayer-candle .candle-wax { isolation:isolate; }
#prayer-candle-portrait {
  border:0; box-shadow:none;
  width:7.1cqw; height:7.1cqw;
  opacity:.93; mix-blend-mode:multiply;
  mask-image:radial-gradient(ellipse, #000 64%, #000d 76%, transparent 100%);
}
#prayer-candle .candle-wax:has(#prayer-candle-portrait:not([hidden]))::after {
  content:""; position:absolute; left:50%; bottom:2.1cqw; transform:translateX(-50%);
  width:7.1cqw; height:7.1cqw; border-radius:50%; pointer-events:none;
  background:linear-gradient(100deg,transparent 25%,#fff1c930 48%,transparent 75%);
}

/* The glass stays in place when lit; the flame is anchored to the wick. */
#prayer-candle .candle-wax {
  width:17cqw; height:23.5cqw;
  background:transparent url('/assets/amber-devotional-candle.webp') center / contain no-repeat;
}
#prayer-candle[data-lit] .candle-wax { animation:none; }
#prayer-candle .candle-flame { bottom:88%; width:2.8cqw; height:6cqw; }
#prayer-candle-portrait {
  bottom:12%; width:61%; height:53%; border-radius:7% 7% 10% 10%; object-position:center 27%;
  opacity:.97; mix-blend-mode:normal;
  mask-image:radial-gradient(ellipse at center,#000 62%,#000d 83%,transparent 100%);
}
#prayer-candle .candle-wax:has(#prayer-candle-portrait:not([hidden]))::after {
  bottom:12%; width:61%; height:53%; border-radius:8%;
  background:linear-gradient(105deg,#7c3d1c36,transparent 24%,#fff1c72c 65%,#46200e38);
}
#prayer-candle-light { left:60%; bottom:44%; max-width:37%; }

/* A lit taper is the control, with its flame moving to the jar's wick. */
#prayer-candle #prayer-candle-light {
  top:auto; bottom:15%; left:65%; width:32%; max-width:none; min-height:44px;
  display:grid; justify-items:center; gap:.32rem; padding:1.05rem .2rem .2rem;
  border:0; background:transparent; box-shadow:none; color:#fff0cd; text-align:center;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
#prayer-candle #prayer-candle-light[hidden] {display:none}
#prayer-candle #prayer-candle-light::before {content:none}
#prayer-candle #prayer-candle-light:focus-visible {outline:2px solid #ffdf93; outline-offset:3px; border-radius:.5rem}
.candle-taper {
  position:relative; display:block; width:clamp(.45rem,1.25vw,.75rem); height:clamp(2.15rem,6vw,4.1rem);
  border-radius:24% 24% 16% 16%; transform-origin:center top;
  background:#d3a46c url('/assets/natural-votive-candle.webp') center / 100% 100% no-repeat;
  box-shadow:0 .2rem .6rem #1c0f09a8;
}
.candle-taper-flame {
  position:absolute; width:90%; height:22%; left:50%; bottom:96%; transform-origin:center bottom;
  border-radius:72% 31% 53% 47% / 80% 70% 30% 20%;
  background:radial-gradient(at 50% 80%,#fffce2 20%,#ffce65 53%,#ef7929 87%);
  box-shadow:0 0 .6rem #ffd178,0 0 1.2rem .3rem #ffab507d;
  animation:candle-flicker 1.55s ease-in-out infinite alternate;
}
.candle-taper-label {font-size:clamp(.75rem,1.6vw,.95rem); line-height:1.3; font-weight:650; text-shadow:0 1px 4px #140805,0 0 9px #140805;}
#prayer-candle[data-lighting] .candle-taper-label {visibility:hidden}
@media(prefers-reduced-motion:reduce){.candle-taper-flame{animation:none;transform:translateX(-50%)}}
.candle-saint-search{margin-block:.85rem .5rem}
#prayer-candle-search{display:block;box-sizing:border-box;width:min(100%,28rem);min-height:2.75rem;margin-block-start:.3rem;padding:.5rem .75rem;border:1px solid #987952;border-radius:.55rem;background:#fffdf8;color:#36261a;font:inherit}
#prayer-candle-results,.candle-directory-note{font-size:.9rem}
#prayer-candle .candle-prayer-intro,#prayer-candle .candle-prayer-options{grid-column:1/-1;width:min(100%,42rem);margin-inline:auto}
#prayer-candle .candle-stage{grid-column:1/-1}
.candle-prayer-intro p{margin-block:0}
.candle-optional{border-block-start:1px solid #d6bb94}
.candle-optional:last-child{border-block-end:1px solid #d6bb94}
.candle-optional summary{padding:.75rem 0;cursor:pointer;color:#703d1d;font-weight:700}
.candle-optional-body{padding-block:0 .85rem}
.candle-optional-body .candle-saint-search{margin-block-start:0}
