#theme-fade-overlay {
  position: fixed;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2147483647;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background-color: rgba(0, 0, 0, 0.9) !important;
  background-image: none !important;
  transition: opacity 2200ms cubic-bezier(0.22, 0.72, 0.18, 1), visibility 0s linear 2200ms;
  will-change: opacity;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.codex-theme-transitioning #theme-fade-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 800ms ease-in, visibility 0s linear;
}

.theme-fade-message {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  color: rgba(255, 244, 220, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 2.35vw, 24px);
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-align: center;
  text-shadow:
    0 0 12px rgba(255, 226, 172, 0.34),
    0 0 38px rgba(245, 214, 160, 0.2),
    0 2px 10px rgba(0, 0, 0, 0.84);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 720ms ease-in, transform 800ms ease-out;
  pointer-events: none;
}

body.codex-theme-transitioning .theme-fade-message {
  opacity: 1;
  transform: translateY(0);
  animation: themeFadeMessagePulse 3.2s ease-in-out infinite;
}

@keyframes themeFadeMessagePulse {
  0%, 100% {
    opacity: 0.82;
    text-shadow:
      0 0 10px rgba(255, 226, 172, 0.28),
      0 0 32px rgba(245, 214, 160, 0.14),
      0 2px 10px rgba(0, 0, 0, 0.84);
  }
  50% {
    opacity: 1;
    text-shadow:
      0 0 16px rgba(255, 232, 188, 0.44),
      0 0 48px rgba(245, 214, 160, 0.24),
      0 2px 10px rgba(0, 0, 0, 0.84);
  }
}

body[data-theme-transitioning="true"] [data-codex-theme-menu="true"] {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 80ms linear, visibility 0s linear 80ms !important;
}

body[data-theme-transitioning="true"] button[data-codex-theme] {
  pointer-events: none !important;
}

body.codex-theme-night,
body.codex-theme-night #root,
body.codex-theme-night #root > div {
  background-color: #000114 !important;
}

body.codex-theme-summer .summer-waiting-dim {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(20, 35, 22, 0.12) 0%, rgba(9, 22, 16, 0.24) 48%, rgba(2, 8, 6, 0.34) 100%),
    linear-gradient(180deg, rgba(0, 18, 10, 0.18), rgba(0, 10, 7, 0.32));
  mix-blend-mode: multiply;
}

@media (max-width: 820px), (pointer: coarse) {
  body.codex-theme-summer,
  body.codex-theme-summer #root,
  body.codex-theme-summer #root > div {
    background-color: #173528 !important;
  }

  body.codex-theme-summer [data-codex-theme-background="true"],
  body[data-current-theme="여름 녹음"] [data-codex-theme-background="true"],
  body.codex-theme-summer #root div[style*="back_woods7"],
  body[data-current-theme="여름 녹음"] #root div[style*="back_woods7"] {
    top: -18px !important;
    height: calc(100% + 18px) !important;
    background-position: center top !important;
    background-size: cover !important;
    filter: brightness(1.08) saturate(1.04);
  }

  body.codex-theme-summer .summer-waiting-dim {
    background:
      radial-gradient(ellipse at 50% 32%, rgba(28, 58, 34, 0.05) 0%, rgba(12, 32, 20, 0.12) 48%, rgba(3, 12, 7, 0.2) 100%),
      linear-gradient(180deg, rgba(0, 18, 10, 0.05), rgba(0, 10, 7, 0.2));
  }
}

@keyframes codexSlowShootingStar {
  0%, 70%, 100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--star-rot));
  }
  77% {
    opacity: 0.48;
  }
  94% {
    opacity: 0.16;
    transform: translate3d(-360px, 145px, 0) rotate(var(--star-rot));
  }
  98% {
    opacity: 0;
    transform: translate3d(-480px, 198px, 0) rotate(var(--star-rot));
  }
}

.darknight-waiting-dim,
.night-praying-depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.darknight-waiting-dim {
  z-index: 2;
  background: transparent;
  mix-blend-mode: normal;
}

.night-praying-depth {
  z-index: 10;
  background: transparent !important;
}

.night-shooting-stars {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  background: none !important;
  animation: none !important;
}

.night-shooting-stars::before,
.night-shooting-stars::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 1px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(245, 252, 255, 0.84), rgba(155, 190, 255, 0.16), transparent);
  box-shadow: 0 0 12px rgba(200, 224, 255, 0.34);
  transform: translate3d(0, 0, 0) rotate(var(--star-rot));
  animation: codexSlowShootingStar var(--star-duration) cubic-bezier(0.42, 0, 0.2, 1) infinite !important;
}

.night-shooting-stars::before {
  --star-rot: 28deg;
  --star-duration: 44s;
  top: 18%;
  left: 72%;
  animation-delay: -5s !important;
}

.night-shooting-stars::after {
  --star-rot: 31deg;
  --star-duration: 58s;
  top: 35%;
  left: 84%;
  width: 140px;
  animation-delay: -18s !important;
}

body.codex-theme-mark .night-shooting-stars,
body.codex-theme-jonah .night-shooting-stars,
body.codex-theme-sinal .night-shooting-stars,
body.codex-theme-gethsemane .night-shooting-stars,
body[data-current-theme="마가 다락방"] .night-shooting-stars,
body[data-current-theme="요나의 고래뱃속"] .night-shooting-stars,
body[data-current-theme="모세의 시내산"] .night-shooting-stars,
body[data-current-theme="겟세마네 동산"] .night-shooting-stars,
body.codex-theme-gethsemane .gethsemane-star-layer,
body[data-current-theme="겟세마네 동산"] .gethsemane-star-layer {
  display: none !important;
  animation: none !important;
}

body.codex-theme-mark .night-shooting-stars::before,
body.codex-theme-mark .night-shooting-stars::after,
body.codex-theme-jonah .night-shooting-stars::before,
body.codex-theme-jonah .night-shooting-stars::after,
body.codex-theme-sinal .night-shooting-stars::before,
body.codex-theme-sinal .night-shooting-stars::after,
body.codex-theme-gethsemane .night-shooting-stars::before,
body.codex-theme-gethsemane .night-shooting-stars::after,
body[data-current-theme="마가 다락방"] .night-shooting-stars::before,
body[data-current-theme="마가 다락방"] .night-shooting-stars::after,
body[data-current-theme="요나의 고래뱃속"] .night-shooting-stars::before,
body[data-current-theme="요나의 고래뱃속"] .night-shooting-stars::after,
body[data-current-theme="모세의 시내산"] .night-shooting-stars::before,
body[data-current-theme="모세의 시내산"] .night-shooting-stars::after,
body[data-current-theme="겟세마네 동산"] .night-shooting-stars::before,
body[data-current-theme="겟세마네 동산"] .night-shooting-stars::after {
  content: none !important;
  animation: none !important;
}

body .codex-altar-stage,
body.codex-theme-desert .codex-altar-stage,
body.codex-theme-gethsemane .codex-altar-stage,
body.codex-theme-night .codex-altar-stage,
body.codex-theme-summer .codex-altar-stage,
body.codex-theme-mark .codex-altar-stage,
body.codex-theme-jonah .codex-altar-stage,
body.codex-theme-sinal .codex-altar-stage,
body[data-current-theme] .codex-altar-stage,
body[data-theme] .codex-altar-stage,
body[data-extra-theme] .codex-altar-stage,
body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) {
  position: absolute !important;
  top: 72% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  width: clamp(760px, 48vw, 900px) !important;
  min-width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  aspect-ratio: 900 / 291 !important;
  translate: none !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center center !important;
  transition: none !important;
  animation: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
}

body .codex-altar-stage > div,
body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) > div {
  width: 100% !important;
  min-width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  aspect-ratio: 900 / 291 !important;
  translate: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  opacity: 1 !important;
}

body img[alt="altar"],
body.codex-theme-desert img[alt="altar"],
body.codex-theme-gethsemane img[alt="altar"],
body.codex-theme-night img[alt="altar"],
body.codex-theme-summer img[alt="altar"],
body.codex-theme-mark img[alt="altar"],
body.codex-theme-jonah img[alt="altar"],
body.codex-theme-sinal img[alt="altar"],
body[data-current-theme] img[alt="altar"],
body[data-theme] img[alt="altar"],
body[data-extra-theme] img[alt="altar"],
body.night-theme-active img[alt="altar"] {
  display: block !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  aspect-ratio: auto !important;
  translate: none !important;
  transform: translateY(-4px) !important;
  transform-origin: center bottom !important;
  transition: none !important;
  animation: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  will-change: auto !important;
  clip-path: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  background: transparent !important;
  overflow: visible !important;
}

body.codex-theme-desert img[alt="altar"][src*="g_dessert"],
body.codex-theme-gethsemane img[alt="altar"][src*="g_dessert"],
body.codex-theme-summer img[alt="altar"][src*="b_woods"],
body[data-current-theme="사막의 제단"] img[alt="altar"][src*="g_dessert"],
body[data-current-theme="겟세마네 동산"] img[alt="altar"][src*="g_dessert"],
body[data-current-theme="여름 녹음"] img[alt="altar"][src*="b_woods"] {
  width: 90.1% !important;
}

@media (min-width: 1600px) {
  body .codex-altar-stage,
  body.codex-theme-desert .codex-altar-stage,
  body.codex-theme-gethsemane .codex-altar-stage,
  body.codex-theme-night .codex-altar-stage,
  body.codex-theme-summer .codex-altar-stage,
  body.codex-theme-mark .codex-altar-stage,
  body.codex-theme-jonah .codex-altar-stage,
  body.codex-theme-sinal .codex-altar-stage,
  body[data-current-theme] .codex-altar-stage,
  body[data-theme] .codex-altar-stage,
  body[data-extra-theme] .codex-altar-stage,
  body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) {
    width: clamp(900px, 52vw, 1200px) !important;
    aspect-ratio: 900 / 291 !important;
  }

  body .codex-altar-stage > div,
  body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) > div {
    width: 100% !important;
    aspect-ratio: 900 / 291 !important;
  }
}

@media (max-width: 900px) {
  body .codex-altar-stage,
  body.codex-theme-desert .codex-altar-stage,
  body.codex-theme-gethsemane .codex-altar-stage,
  body.codex-theme-night .codex-altar-stage,
  body.codex-theme-summer .codex-altar-stage,
  body.codex-theme-mark .codex-altar-stage,
  body.codex-theme-jonah .codex-altar-stage,
  body.codex-theme-sinal .codex-altar-stage,
  body[data-current-theme] .codex-altar-stage,
  body[data-theme] .codex-altar-stage,
  body[data-extra-theme] .codex-altar-stage,
  body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) {
    width: clamp(700px, 96vw, 820px) !important;
    aspect-ratio: 900 / 291 !important;
  }

  body .codex-altar-stage > div,
  body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) > div {
    width: 100% !important;
    aspect-ratio: 900 / 291 !important;
  }
}

@media (max-width: 600px) {
  body .codex-altar-stage,
  body.codex-theme-desert .codex-altar-stage,
  body.codex-theme-gethsemane .codex-altar-stage,
  body.codex-theme-night .codex-altar-stage,
  body.codex-theme-summer .codex-altar-stage,
  body.codex-theme-mark .codex-altar-stage,
  body.codex-theme-jonah .codex-altar-stage,
  body.codex-theme-sinal .codex-altar-stage,
  body[data-current-theme] .codex-altar-stage,
  body[data-theme] .codex-altar-stage,
  body[data-extra-theme] .codex-altar-stage,
  body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) {
    width: clamp(620px, 115vw, 760px) !important;
    aspect-ratio: 900 / 291 !important;
  }

  body .codex-altar-stage > div,
  body div[class*="left-1/2"][class*="z-10"]:has(img[alt="altar"]) > div {
    width: 100% !important;
    aspect-ratio: 900 / 291 !important;
  }
}

body[data-theme="jonah"][data-prayer-state="waiting"] img[alt="altar"] {
  filter: brightness(0.72) saturate(0.92) !important;
}

body[data-theme="jonah"][data-prayer-state="praying"] img[alt="altar"] {
  filter: none !important;
}

body.codex-theme-jonah [data-codex-theme-background="true"],
body[data-theme="jonah"] [data-codex-theme-background="true"],
body[data-extra-theme="jonah"] [data-codex-theme-background="true"],
body[data-current-theme="요나의 고래뱃속"] [data-codex-theme-background="true"] {
  transition: filter 1000ms ease-in-out !important;
}

body.codex-theme-jonah[data-prayer-state="waiting"] [data-codex-theme-background="true"],
body[data-theme="jonah"][data-prayer-state="waiting"] [data-codex-theme-background="true"],
body[data-extra-theme="jonah"][data-prayer-state="waiting"] [data-codex-theme-background="true"],
body[data-current-theme="요나의 고래뱃속"][data-prayer-state="waiting"] [data-codex-theme-background="true"] {
  filter: brightness(0.82) saturate(0.92) blur(1.8px) !important;
}

body.codex-theme-jonah[data-prayer-state="praying"] [data-codex-theme-background="true"],
body[data-theme="jonah"][data-prayer-state="praying"] [data-codex-theme-background="true"],
body[data-extra-theme="jonah"][data-prayer-state="praying"] [data-codex-theme-background="true"],
body[data-current-theme="요나의 고래뱃속"][data-prayer-state="praying"] [data-codex-theme-background="true"] {
  filter: none !important;
}

body[data-theme="sinal"][data-prayer-state="waiting"] img[alt="altar"] {
  filter: brightness(0.72) saturate(0.92) blur(0.1px) !important;
  transition: filter 1000ms ease-in-out !important;
}

body[data-theme="sinal"][data-prayer-state="praying"] img[alt="altar"] {
  filter: none !important;
  transition: filter 1000ms ease-in-out !important;
}

body.codex-theme-night[data-prayer-state="waiting"] img[alt="altar"],
body.night-theme-active[data-prayer-state="waiting"] img[alt="altar"],
body[data-current-theme="어두운 밤"][data-prayer-state="waiting"] img[alt="altar"] {
  opacity: 1 !important;
  display: block !important;
  filter: brightness(0.72) saturate(0.92) !important;
  transition: filter 1000ms ease-in-out !important;
}

body.codex-theme-night[data-prayer-state="praying"] img[alt="altar"],
body.night-theme-active[data-prayer-state="praying"] img[alt="altar"],
body[data-current-theme="어두운 밤"][data-prayer-state="praying"] img[alt="altar"] {
  opacity: 1 !important;
  display: block !important;
  filter: none !important;
  transition: filter 1000ms ease-in-out !important;
}

body.codex-theme-night [data-codex-theme-background="true"],
body.night-theme-active [data-codex-theme-background="true"],
body[data-current-theme="어두운 밤"] [data-codex-theme-background="true"] {
  transition: filter 1000ms ease-in-out !important;
}

body.codex-theme-night[data-prayer-state="waiting"] [data-codex-theme-background="true"],
body.night-theme-active[data-prayer-state="waiting"] [data-codex-theme-background="true"],
body[data-current-theme="어두운 밤"][data-prayer-state="waiting"] [data-codex-theme-background="true"] {
  filter: brightness(0.70) saturate(0.94) !important;
}

body.codex-theme-night[data-prayer-state="praying"] [data-codex-theme-background="true"],
body.night-theme-active[data-prayer-state="praying"] [data-codex-theme-background="true"],
body[data-current-theme="어두운 밤"][data-prayer-state="praying"] [data-codex-theme-background="true"] {
  filter: none !important;
}

body.codex-theme-night .darknight-waiting-dim,
body.night-theme-active .darknight-waiting-dim,
body[data-current-theme="어두운 밤"] .darknight-waiting-dim {
  transition: opacity 1000ms ease-in-out !important;
}

body.codex-theme-night[data-prayer-state="waiting"] .darknight-waiting-dim,
body.night-theme-active[data-prayer-state="waiting"] .darknight-waiting-dim,
body[data-current-theme="어두운 밤"][data-prayer-state="waiting"] .darknight-waiting-dim {
  display: block !important;
  opacity: 1 !important;
}

body.codex-theme-night[data-prayer-state="praying"] .darknight-waiting-dim,
body.night-theme-active[data-prayer-state="praying"] .darknight-waiting-dim,
body[data-current-theme="어두운 밤"][data-prayer-state="praying"] .darknight-waiting-dim {
  opacity: 0 !important;
}

@media (max-width: 820px), (pointer: coarse) {
  body[data-theme="sinal"]::before,
  body[data-current-theme="모세의 시내산"]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 15;
    pointer-events: none;
    background:
      radial-gradient(ellipse at 52% 26%, rgba(50, 64, 78, 0.08), rgba(22, 29, 38, 0.30) 60%, rgba(10, 14, 20, 0.42) 100%),
      rgba(12, 16, 22, 0.14);
    opacity: 0.46;
    transition: opacity 1000ms ease-in-out;
  }

  body[data-theme="sinal"][data-prayer-state="praying"]::before,
  body[data-current-theme="모세의 시내산"][data-prayer-state="praying"]::before {
    opacity: 0.18;
  }

  body[data-theme="sinal"] [data-codex-theme-background="true"],
  body[data-current-theme="모세의 시내산"] [data-codex-theme-background="true"],
  body[data-theme="sinal"] #root div[style*="back_sinal"],
  body[data-current-theme="모세의 시내산"] #root div[style*="back_sinal"] {
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }

  body[data-theme="sinal"] img[alt="altar"],
  body[data-current-theme="모세의 시내산"] img[alt="altar"],
  body[data-theme="sinal"][data-prayer-state="waiting"] img[alt="altar"],
  body[data-theme="sinal"][data-prayer-state="praying"] img[alt="altar"],
  body[data-current-theme="모세의 시내산"][data-prayer-state="waiting"] img[alt="altar"],
  body[data-current-theme="모세의 시내산"][data-prayer-state="praying"] img[alt="altar"] {
    filter: none !important;
    transition: none !important;
  }

  body[data-theme="sinal"][data-prayer-state="waiting"] .sinal-top-cloud,
  body[data-current-theme="모세의 시내산"][data-prayer-state="waiting"] .sinal-top-cloud {
    filter: none !important;
  }
}
