/* ==========================================================================
   Свечница — Telegram Mini App
   Тёмная сцена, свечи на CSS, без внешних зависимостей.
   ========================================================================== */

:root {
  --bg: #0B0A08;
  --bg-soft: #14120E;
  --line: rgba(255, 226, 170, 0.10);
  --text: #F3E9D6;
  --text-dim: #A2957D;
  --accent: #E8B65A;
  --accent-deep: #C2762A;
  --danger: #C74A3A;

  --flame-outer: #FF9A2E;
  --flame-inner: #7FB2FF;

  --tabbar-h: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* Заполняется из JS: 0..1 в зависимости от числа горящих свечей. */
  --scene-intensity: 0;
}

* { box-sizing: border-box; }

/* Свои display: block/flex перебивают браузерный [hidden] — возвращаем приоритет */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

button, select, textarea, input {
  font: inherit;
  color: inherit;
}

/* ==========================  Экраны  ====================================== */

.screen {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
}
.screen.is-active { display: flex; }

.scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 18px 28px;
}

.altar-head {
  padding: 14px 18px 6px;
  text-align: center;
}
.altar-title {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.altar-count {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}

.sub-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--line);
}
.sub-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:active { background: rgba(255, 255, 255, 0.06); }

/* ==========================  Сцена свечницы  ============================== */

.altar-scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 46% at 50% 58%,
      rgba(255, 176, 74, calc(0.03 + 0.10 * var(--scene-intensity))) 0%,
      rgba(0, 0, 0, 0) 70%),
    radial-gradient(120% 90% at 50% 46%, #14110C 0%, var(--bg) 62%);
}

/* Виньетка по краям */
.altar-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%,
    rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.75) 100%);
}

.scene-glow {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 62vw;
  height: 40vw;
  max-width: 330px;
  max-height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse at center,
    rgba(255, 168, 66, calc(0.16 * var(--scene-intensity))) 0%,
    rgba(255, 138, 40, 0) 70%);
  animation: scene-breathe 4.2s ease-in-out infinite alternate;
}

.altar-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px 20px;
  width: 100%;
}

/* Ряды: дальний мельче, ближний крупнее — так читается глубина. */
.altar-row {
  --scale: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: calc(10px * var(--scale));
  padding-bottom: calc(9px * var(--scale));
  width: 100%;
}
.altar-row[data-row="0"] { --scale: 0.70; transform: translateX(-9px); }
.altar-row[data-row="1"] { --scale: 0.81; transform: translateX(7px); }
.altar-row[data-row="2"] { --scale: 0.91; transform: translateX(-5px); }
.altar-row[data-row="3"] { --scale: 1.00; }

/* Пустой ряд не притягивает взгляд, но свечница остаётся целой */
.altar-row.is-empty::after { opacity: 0.22; }

/* Латунная полка под рядом */
.altar-row::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: calc(7px * var(--scale));
  border-radius: 3px;
  background: linear-gradient(180deg,
    #6B5326 0%, #A8863F 22%, #E0BE73 45%, #8B6C31 72%, #3D2F16 100%);
  box-shadow:
    0 1px 0 rgba(255, 226, 170, 0.18) inset,
    0 calc(6px * var(--scale)) calc(12px * var(--scale)) rgba(0, 0, 0, 0.55);
}

.slot {
  position: relative;
  width: calc(34px * var(--scale));
  height: calc(96px * var(--scale));
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ==========================  Свеча  ======================================= */

.candle {
  --burn-progress: 0;      /* 0 = только зажгли, 1 = догорела */
  --wax: #F2E3C0;
  --w: 13px;
  --h: 74px;

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: calc(var(--h) * var(--scale, 1));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.candle[data-type="small"]   { --w: 10px; --h: 62px; --wax: #F2E3C0; }
.candle[data-type="wax"]     { --w: 12px; --h: 70px; --wax: #7E5122; }
.candle[data-type="medium"]  { --w: 13px; --h: 74px; --wax: #F0DDB0; }
.candle[data-type="temple"]  { --w: 17px; --h: 86px; --wax: #E8CE9A; }
.candle[data-type="lampada"] { --w: 22px; --h: 52px; --wax: #C74A3A; }

/* Тело свечи: укорачивается по мере горения, но не ниже огарка в 12%. */
.candle__stick {
  position: relative;
  width: calc(var(--w) * var(--scale, 1));
  height: max(12%, calc(100% - var(--burn-progress) * 100%));
  border-radius: calc(2px * var(--scale, 1)) calc(2px * var(--scale, 1)) 1px 1px;
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.30) 0%,
      rgba(255, 255, 255, 0.16) 26%,
      rgba(255, 255, 255, 0.05) 55%,
      rgba(0, 0, 0, 0.34) 100%),
    var(--wax);
  box-shadow:
    0 0 calc(9px * var(--scale, 1)) rgba(255, 168, 66, 0.28),
    0 2px 4px rgba(0, 0, 0, 0.5);
  transition: height 1s linear;
}

/* Оплывшая верхушка */
.candle__stick::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -2px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--wax) 82%, #fff);
  opacity: 0.85;
}

/* Восковая — натуральный воск: матовый, тёплый, с медовым просветом у пламени */
.candle[data-type="wax"] .candle__stick {
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.50) 0%,
      rgba(255, 196, 120, 0.20) 28%,
      rgba(255, 170, 90, 0.04) 58%,
      rgba(0, 0, 0, 0.52) 100%),
    linear-gradient(180deg,
      #96622A 0%, var(--wax) 34%, #563616 100%);
  box-shadow:
    0 0 calc(10px * var(--scale, 1)) rgba(255, 140, 50, 0.26),
    0 2px 4px rgba(0, 0, 0, 0.6);
}
.candle[data-type="wax"] .candle__stick::before {
  background: #A87233;
  opacity: 0.95;
}
.candle[data-type="wax"] .candle__glow {
  background: radial-gradient(circle,
    rgba(255, 158, 60, 0.44) 0%, rgba(230, 120, 40, 0.13) 45%, rgba(230, 120, 40, 0) 72%);
}

/* Лампада — свеча в стакане */
.candle[data-type="lampada"] .candle__stick {
  border-radius: 3px 3px 8px 8px;
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(255, 255, 255, 0.30) 30%,
      rgba(255, 255, 255, 0.08) 60%,
      rgba(0, 0, 0, 0.40) 100%),
    var(--wax);
  box-shadow:
    0 0 calc(16px * var(--scale, 1)) rgba(210, 70, 50, 0.55),
    0 2px 5px rgba(0, 0, 0, 0.55);
}

.candle__flame {
  position: relative;
  width: calc(9px * var(--scale, 1));
  height: calc(17px * var(--scale, 1));
  margin-bottom: calc(-2px * var(--scale, 1));
  border-radius: 50% 50% 20% 20%;
  background: radial-gradient(ellipse at 50% 78%,
    #FFE7A8 0%, var(--flame-outer) 42%, rgba(255, 120, 20, 0.85) 74%, rgba(255, 90, 0, 0) 100%);
  filter: blur(1px);
  transform-origin: 50% 100%;
  animation: flicker 0.9s ease-in-out infinite alternate;
  animation-delay: var(--flicker-delay, 0s);
  z-index: 2;
}

.candle__core {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 45%;
  height: 42%;
  transform: translateX(-50%);
  border-radius: 50% 50% 30% 30%;
  background: radial-gradient(ellipse at 50% 80%,
    var(--flame-inner) 0%, rgba(127, 178, 255, 0.35) 65%, rgba(127, 178, 255, 0) 100%);
  filter: blur(0.6px);
}

/* Тёплый ореол вокруг пламени */
.candle__glow {
  position: absolute;
  left: 50%;
  bottom: max(12%, calc(100% - var(--burn-progress) * 100%));
  width: calc(56px * var(--scale, 1));
  height: calc(56px * var(--scale, 1));
  transform: translate(-50%, 40%);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle,
    rgba(255, 176, 74, 0.42) 0%, rgba(255, 140, 40, 0.12) 45%, rgba(255, 140, 40, 0) 72%);
  animation: glow-pulse 2.4s ease-in-out infinite alternate;
  animation-delay: var(--flicker-delay, 0s);
  transition: bottom 1s linear;
  z-index: 0;
}

.candle[data-type="lampada"] .candle__glow {
  background: radial-gradient(circle,
    rgba(255, 110, 70, 0.48) 0%, rgba(220, 70, 40, 0.14) 45%, rgba(220, 70, 40, 0) 72%);
}

/* Своя свеча — золотая точка на полке под ней */
.slot.is-mine::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-5px * var(--scale, 1));
  width: calc(4px * var(--scale, 1));
  height: calc(4px * var(--scale, 1));
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(232, 182, 90, 0.9);
}

/* Тушение */
.candle.is-out .candle__flame {
  animation: none;
  transform: scale(0);
  transition: transform 400ms ease-in;
}
.candle.is-out .candle__glow {
  opacity: 0;
  transition: opacity 500ms ease-out;
}

.smoke {
  position: absolute;
  left: 50%;
  bottom: 55%;
  width: calc(8px * var(--scale, 1));
  height: calc(24px * var(--scale, 1));
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(210, 205, 195, 0.42), rgba(210, 205, 195, 0));
  filter: blur(3px);
  transform: translateX(-50%);
  pointer-events: none;
  animation: smoke-rise 3s ease-out forwards;
  z-index: 3;
}

@keyframes flicker {
  0%   { transform: scale(1, 1) skewX(0deg)   translateX(0); }
  25%  { transform: scale(0.96, 1.05) skewX(-3deg) translateX(-0.6px); }
  50%  { transform: scale(1.05, 0.95) skewX(2deg)  translateX(0.5px); }
  75%  { transform: scale(0.98, 1.04) skewX(-2deg) translateX(-0.3px); }
  100% { transform: scale(1.04, 0.97) skewX(4deg)  translateX(0.7px); }
}

@keyframes glow-pulse {
  from { opacity: 0.72; transform: translate(-50%, 40%) scale(0.94); }
  to   { opacity: 1;    transform: translate(-50%, 40%) scale(1.06); }
}

@keyframes scene-breathe {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}

@keyframes smoke-rise {
  0%   { opacity: 0.55; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0;    transform: translate(-50%, -40px) scale(1.9); }
}

.altar-empty {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  text-align: center;
  z-index: 2;
}
.altar-empty.is-visible { display: flex; }
.altar-empty__icon { font-size: 40px; opacity: 0.7; }
.altar-empty p { margin: 0; font-size: 14px; line-height: 1.5; }

.altar-actions {
  padding: 10px 18px 12px;
}

/* ==========================  Кнопки и поля  =============================== */

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: default; }

.btn--primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #241703;
  box-shadow: 0 6px 18px rgba(200, 130, 40, 0.28);
}
.btn--ghost {
  background: rgba(255, 226, 170, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn--danger {
  background: rgba(199, 74, 58, 0.16);
  color: #F09A8C;
  border: 1px solid rgba(199, 74, 58, 0.45);
}
.btn--plain {
  background: transparent;
  color: var(--text-dim);
  font-weight: 500;
  padding: 12px;
}

.field {
  display: block;
  position: relative;
  margin: 18px 0 0;
}
.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--text-dim);
}
.field__counter {
  position: absolute;
  right: 2px;
  bottom: -18px;
  font-size: 12px;
  color: var(--text-dim);
}

.select, .textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: right 18px center, right 12px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.textarea { resize: none; line-height: 1.45; }
.select:focus, .textarea:focus { border-color: rgba(232, 182, 90, 0.5); }

.switch {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 0;
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__text { flex: 1; font-size: 15px; }
.switch__text small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-dim);
}
.switch__track {
  flex: none;
  width: 50px;
  height: 30px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 180ms ease;
  position: relative;
}
.switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #EFE6D4;
  transition: transform 180ms ease;
}
.switch input:checked + .switch__track { background: var(--accent-deep); }
.switch input:checked + .switch__track .switch__knob { transform: translateX(20px); }

.hint {
  min-height: 18px;
  margin: 16px 0 10px;
  font-size: 13px;
  color: #E0A08C;
  text-align: center;
}

/* Своя кнопка — запасной вариант, когда MainButton недоступен (браузер). */
.btn--fallback { margin-top: 6px; }
body.has-mainbutton .btn--fallback { display: none; }

/* ==========================  Карусель типов  ============================== */

.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 0 4px;
}
.carousel__arrow {
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 226, 170, 0.05);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.carousel__arrow:active { background: rgba(255, 226, 170, 0.12); }

.carousel__stage {
  flex: 1;
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  border-radius: 18px;
  background: radial-gradient(70% 60% at 50% 78%,
    rgba(255, 168, 66, 0.13) 0%, rgba(0, 0, 0, 0) 70%), var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.preview-candle { --scale: 1.35; }
.preview-candle .candle { transition: opacity 180ms ease; }
.preview-candle.is-swapping .candle { opacity: 0; }

.carousel__caption { text-align: center; padding-top: 12px; }
.carousel__name { font-size: 18px; font-weight: 600; }
.carousel__hint {
  margin-top: 2px;
  font-size: 12px;
  font-style: italic;
  color: rgba(162, 149, 125, 0.8);
}
.carousel__burn { margin-top: 5px; font-size: 13px; color: var(--accent); }
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.carousel__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.carousel__dots span.is-active { background: var(--accent); }

/* ==========================  История  ===================================== */

.history { list-style: none; margin: 12px 0 0; padding: 0; }
.history__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.history__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: none;
}
.history__dot.is-burning {
  background: var(--flame-outer);
  box-shadow: 0 0 10px rgba(255, 154, 46, 0.8);
}
.history__body { flex: 1; min-width: 0; }
.history__title { font-size: 15px; }
.history__meta { margin-top: 3px; font-size: 12px; color: var(--text-dim); }
.history__note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history__empty {
  padding: 40px 10px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}
#history-more { margin: 16px 0 0; }

.version {
  margin: 26px 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(162, 149, 125, 0.65);
}

/* ==========================  Таббар  ====================================== */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(11, 10, 8, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
}
.tab.is-active { color: var(--accent); }
body.hide-tabbar .tabbar { display: none; }

/* ==========================  Модалка  ===================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  animation: fade-in 180ms ease;
}
.modal__sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 10px 18px calc(18px + var(--safe-bottom));
  border-radius: 20px 20px 0 0;
  background: #15130F;
  border-top: 1px solid var(--line);
  animation: sheet-up 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal__grip {
  width: 38px;
  height: 4px;
  margin: 2px auto 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}
.modal__user { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, #3A3125, #1D1913);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--line);
}
.modal__name { font-size: 16px; font-weight: 600; }
.modal__intent { margin-top: 2px; font-size: 13px; color: var(--accent); }
.modal__note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 226, 170, 0.05);
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.modal__note.is-private { color: var(--text-dim); font-style: italic; }

.progress { margin: 16px 0 4px; }
.progress__bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}
.progress__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-deep), var(--flame-outer));
  transition: width 1s linear;
}
.progress__left {
  margin-top: 7px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: right;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ==========================  Тост  ======================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  z-index: 60;
  max-width: 88vw;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(32, 28, 22, 0.97);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  text-align: center;
  transform: translateX(-50%);
  animation: fade-in 160ms ease;
}
.toast[hidden] { display: none; }

/* ==========================  Доступность  ================================= */

@media (prefers-reduced-motion: reduce) {
  .candle__flame,
  .candle__glow,
  .scene-glow {
    animation: none !important;
  }
  .candle__flame { transform: none; }
  .smoke { animation-duration: 0.8s; }
  .modal__sheet, .modal__backdrop { animation: none; }
  .candle__stick, .candle__glow, .progress__bar span { transition: none; }
}

@media (min-width: 520px) {
  .altar-grid { max-width: 520px; margin: 0 auto; }
}
