:root {
  --ink: #3b2414;
  --deep: #22100d;
  --temple-red: #8f3929;
  --gold: #f3c766;
  --gold-soft: #ffe6a8;
  --rice: #f7ead1;
  --rice-deep: #dac091;
  --jade: #467b66;
  --sky: #f7dca7;
  --shadow: rgba(42, 22, 12, 0.28);
  --panel: rgba(255, 242, 208, 0.9);
  font-family:
    "Microsoft JhengHei",
    "PingFang TC",
    "Noto Sans TC",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: #5f2d1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 231, 172, 0.22), rgba(115, 55, 28, 0.78)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat fixed;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell.route-enter {
  animation: page-soft-enter 720ms steps(8, end) both;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 211, 116, 0.12), transparent 24%),
    rgba(8, 6, 9, 0.72);
  opacity: 0;
}

body.page-transitioning::after {
  animation: soft-black-field 620ms steps(7, end) both;
}

body.app-loading::before {
  content: "入殿中";
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  color: #ffe7ad;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 213, 105, 0.18), transparent 22%),
    rgba(15, 10, 12, 0.92);
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(255, 218, 128, 0.68);
  animation: loading-breath 720ms steps(5, end) both;
}

.screen {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}

.hero-screen {
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding-bottom: 9vh;
}

.hero-content {
  width: min(660px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: 28px 18px;
  border: 4px solid rgba(72, 36, 18, 0.38);
  background: linear-gradient(180deg, rgba(255, 238, 188, 0.84), rgba(241, 196, 111, 0.72));
  box-shadow:
    0 24px 70px rgba(57, 26, 11, 0.42),
    0 0 70px rgba(255, 227, 151, 0.46);
}

.seal {
  width: 86px;
  height: 86px;
  margin: 0 auto 12px;
  image-rendering: pixelated;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0;
  color: #70401e;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 8vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  margin: 0 auto 28px;
  max-width: 520px;
  color: #5b351d;
  line-height: 1.8;
}

.primary-button,
.secondary-button,
.nav-button,
.danger-button {
  border: 0;
  cursor: pointer;
  color: var(--ink);
  min-height: 48px;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.86;
  transform: none;
}

.primary-button {
  min-width: min(100%, 240px);
  padding: 16px 22px;
  background: var(--gold);
  border: 4px solid #6e3818;
  box-shadow:
    0 8px 0 #7d3f1d,
    0 0 30px rgba(255, 221, 120, 0.68);
  font-weight: 800;
}

.secondary-button,
.danger-button {
  padding: 12px 16px;
  border: 3px solid rgba(67, 35, 18, 0.78);
  background: rgba(255, 234, 178, 0.92);
  font-weight: 700;
}

.danger-button {
  background: rgba(239, 178, 126, 0.92);
}

.primary-button:hover,
.secondary-button:hover,
.nav-button:hover,
.danger-button:hover,
.practice-button:hover,
.sound-button:hover,
.record-toggle:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.primary-button:active,
.secondary-button:active,
.nav-button:active,
.danger-button:active,
.practice-button:active,
.sound-button:active,
.record-toggle:active {
  transform: translateY(2px);
  box-shadow: none;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.nav-button:focus-visible,
.danger-button:focus-visible,
.practice-button:focus-visible,
.sound-button:focus-visible,
.record-toggle:focus-visible {
  outline: 3px solid rgba(255, 231, 170, 0.9);
  outline-offset: 3px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand img,
.brand svg {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.dragon-seal-mark {
  display: block;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sound-button {
  min-height: 48px;
  padding: 10px 12px;
  color: #fff0c5;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 221, 130, 0.22), transparent 48%),
    rgba(82, 42, 25, 0.82);
  border: 3px solid rgba(214, 158, 80, 0.56);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow:
    inset 0 0 0 2px rgba(63, 31, 18, 0.5),
    0 0 22px rgba(255, 210, 104, 0.16);
}

.sound-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.nav-button {
  padding: 10px 12px;
  background: rgba(255, 238, 196, 0.86);
  border: 3px solid rgba(73, 36, 18, 0.45);
  font-weight: 800;
}

.nav-button.active {
  background: var(--gold);
  border-color: #6e3818;
}

.temple-stage {
  min-height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: stretch;
}

.scene {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 5px solid rgba(67, 34, 18, 0.66);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 224, 142, 0.54), transparent 24%),
    radial-gradient(circle at 18% 70%, rgba(255, 172, 78, 0.18), transparent 18%),
    radial-gradient(circle at 82% 72%, rgba(255, 172, 78, 0.16), transparent 18%),
    linear-gradient(180deg, #2a2438 0%, #5c332f 46%, #2b1716 100%);
  box-shadow: 0 24px 50px var(--shadow);
}

.time-whisper {
  position: absolute;
  left: 50%;
  top: 24px;
  z-index: 3;
  width: min(420px, calc(100% - 32px));
  translate: -50% 0;
  padding: 12px 14px;
  color: #f8e7bc;
  text-align: center;
  line-height: 1.7;
  font-weight: 800;
  background: rgba(24, 25, 39, 0.46);
  border: 3px solid rgba(232, 198, 128, 0.38);
  box-shadow: 0 0 34px rgba(255, 220, 145, 0.18);
  text-shadow: 0 0 18px rgba(255, 228, 168, 0.35);
  animation: whisper-arrive 1200ms steps(8, end) both;
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle, rgba(255, 221, 142, 0.46) 0 2px, transparent 3px) 8% 20% / 180px 180px,
    linear-gradient(180deg, rgba(15, 17, 31, 0.22), rgba(31, 16, 16, 0.32));
  pointer-events: none;
}

.scene > * {
  z-index: 1;
}

.pixel-sun {
  position: absolute;
  left: 50%;
  top: 62px;
  width: 112px;
  height: 112px;
  translate: -50% 0;
  background: #ffe6a2;
  box-shadow:
    0 0 0 12px rgba(255, 222, 120, 0.25),
    0 0 0 28px rgba(255, 222, 120, 0.16),
    0 0 80px rgba(255, 231, 148, 0.72);
  animation: lantern-breath 4600ms steps(7, end) infinite;
}

.pixel-cloud {
  position: absolute;
  width: 132px;
  height: 28px;
  background: rgba(255, 236, 188, 0.65);
  box-shadow:
    32px -18px 0 rgba(255, 236, 188, 0.65),
    72px -6px 0 rgba(255, 236, 188, 0.65);
}

.cloud-left {
  left: 12%;
  top: 120px;
}

.cloud-right {
  right: 18%;
  top: 176px;
  scale: 0.8;
}

.earth-breath {
  position: fixed;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  animation: earth-breath-presence 16000ms steps(12, end) both;
}

.earth-veil {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.earth-particles {
  position: absolute;
  inset: 0;
}

.earth-particles span {
  position: absolute;
  left: calc((var(--i) * 19% + 7%) - 100%);
  top: -10%;
  opacity: 0;
}

.earth-rain .earth-veil {
  background:
    linear-gradient(180deg, rgba(48, 58, 78, 0.18), rgba(255, 231, 171, 0.04)),
    radial-gradient(circle at 50% 22%, rgba(255, 236, 180, 0.09), transparent 28%);
}

.earth-rain {
  animation-duration: 18000ms;
}

.earth-rain .earth-particles span {
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, rgba(224, 232, 226, 0), rgba(224, 232, 226, 0.44), rgba(224, 232, 226, 0));
  transform: rotate(14deg);
  animation: earth-rain-fall 1350ms linear infinite;
  animation-delay: calc(var(--i) * -140ms);
}

.earth-fog .earth-veil {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(224, 217, 192, 0.12) 28%, transparent 48%),
    linear-gradient(90deg, transparent 38%, rgba(238, 224, 190, 0.1) 58%, transparent 78%);
  filter: blur(2px);
  animation: earth-fog-drift 22000ms steps(14, end) both;
}

.earth-fog {
  animation-duration: 22000ms;
}

.earth-fog .earth-particles span {
  display: none;
}

.earth-leaves .earth-veil {
  background: radial-gradient(circle at 50% 18%, rgba(255, 203, 117, 0.1), transparent 32%);
}

.earth-leaves {
  animation-duration: 17000ms;
}

.earth-leaves .earth-particles span {
  width: 10px;
  height: 7px;
  background: rgba(196, 126, 58, 0.48);
  box-shadow: 0 0 10px rgba(255, 190, 105, 0.14);
  animation: earth-leaf-drift 6200ms steps(12, end) infinite;
  animation-delay: calc(var(--i) * -420ms);
}

.earth-wind .earth-veil {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 235, 180, 0.08) 36%, transparent 56%),
    linear-gradient(90deg, transparent 44%, rgba(210, 225, 218, 0.06) 64%, transparent 86%);
  filter: blur(1.5px);
  animation: earth-wind-move 14000ms steps(12, end) both;
}

.earth-wind {
  animation-duration: 14000ms;
}

.earth-wind .earth-particles span {
  width: 28px;
  height: 2px;
  top: calc(var(--i) * 7%);
  background: rgba(255, 235, 180, 0.18);
  animation: earth-wind-line 4200ms steps(8, end) infinite;
  animation-delay: calc(var(--i) * -230ms);
}

.earth-light .earth-veil {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 231, 157, 0.22), transparent 28%),
    radial-gradient(circle at 72% 34%, rgba(255, 215, 132, 0.12), transparent 18%);
  animation: earth-light-breathe 16000ms steps(10, end) both;
}

.earth-light {
  animation-duration: 16000ms;
}

.earth-light .earth-particles span {
  width: 5px;
  height: 5px;
  top: calc(18% + var(--i) * 4%);
  background: rgba(255, 230, 160, 0.42);
  box-shadow: 0 0 14px rgba(255, 222, 140, 0.38);
  animation: particle-drift 7600ms steps(10, end) infinite;
  animation-delay: calc(var(--i) * -360ms);
}

.black-dragon-presence {
  position: fixed;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  animation: dragon-field-fade 5200ms steps(10, end) both;
}

.dragon-wind-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 54% 24%, rgba(35, 42, 58, 0.3), transparent 26%),
    linear-gradient(90deg, transparent, rgba(255, 232, 166, 0.08), transparent);
  filter: blur(1px);
  animation: dragon-wind-pass 5200ms steps(12, end) both;
}

.dragon-silhouette {
  position: absolute;
  left: -36vw;
  top: 16vh;
  width: min(620px, 82vw);
  height: 130px;
  opacity: 0.18;
  filter:
    blur(0.7px)
    drop-shadow(0 0 22px rgba(255, 220, 150, 0.2))
    drop-shadow(0 0 36px rgba(22, 24, 34, 0.42));
  animation: dragon-cross-sky 5200ms steps(16, end) both;
}

.dragon-cloud .dragon-silhouette {
  top: 20vh;
  opacity: 0.14;
  filter: blur(1.4px) drop-shadow(0 0 34px rgba(255, 226, 164, 0.16));
}

.dragon-wind .dragon-silhouette {
  top: 28vh;
  opacity: 0.12;
  scale: 1.08;
}

.dragon-silhouette span {
  position: absolute;
  display: block;
  background: rgba(9, 12, 18, 0.86);
  box-shadow: inset 0 0 0 2px rgba(255, 232, 170, 0.05);
}

.dragon-head {
  right: 72px;
  top: 28px;
  width: 82px;
  height: 50px;
  clip-path: polygon(0 22%, 58% 0, 100% 20%, 82% 48%, 100% 76%, 52% 100%, 8% 74%);
}

.dragon-head::before,
.dragon-head::after {
  content: "";
  position: absolute;
  top: -14px;
  width: 16px;
  height: 26px;
  background: rgba(9, 12, 18, 0.86);
}

.dragon-head::before {
  right: 18px;
  rotate: 26deg;
}

.dragon-head::after {
  right: 44px;
  rotate: -22deg;
}

.dragon-body {
  height: 34px;
  border-radius: 999px;
}

.body-one {
  right: 126px;
  top: 50px;
  width: 154px;
  rotate: -8deg;
}

.body-two {
  right: 246px;
  top: 42px;
  width: 154px;
  rotate: 9deg;
}

.body-three {
  right: 368px;
  top: 58px;
  width: 118px;
  rotate: -12deg;
}

.dragon-tail {
  left: 38px;
  top: 52px;
  width: 132px;
  height: 26px;
  clip-path: polygon(0 50%, 100% 0, 82% 50%, 100% 100%);
}

.dragon-whisker {
  right: 54px;
  width: 92px;
  height: 3px;
  opacity: 0.62;
  background: rgba(10, 13, 20, 0.72);
}

.whisker-one {
  top: 42px;
  rotate: -13deg;
}

.whisker-two {
  top: 62px;
  rotate: 11deg;
}

.temple-building {
  position: absolute;
  left: 50%;
  bottom: 118px;
  width: min(520px, 86%);
  height: 310px;
  translate: -50% 0;
  image-rendering: pixelated;
}

.roof {
  position: absolute;
  left: 5%;
  right: 5%;
  height: 52px;
  background: var(--temple-red);
  border: 5px solid #592211;
  box-shadow:
    -36px 20px 0 #6b2918,
    36px 20px 0 #6b2918,
    0 10px 0 #d59a48;
}

.roof.top {
  top: 28px;
  left: 17%;
  right: 17%;
  height: 46px;
}

.roof.mid {
  top: 104px;
}

.pillars {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 0;
  height: 190px;
  background:
    linear-gradient(90deg, transparent 0 8%, #bf5b39 8% 17%, transparent 17% 41%, #bf5b39 41% 50%, transparent 50% 74%, #bf5b39 74% 83%, transparent 83%),
    linear-gradient(180deg, #f0c36b 0 26%, #8f3929 26% 100%);
  border: 5px solid #592211;
}

.gate {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 122px;
  height: 142px;
  translate: -50% 0;
  background: #2b1512;
  border: 5px solid #d59a48;
  box-shadow: inset 0 0 26px rgba(255, 202, 88, 0.22);
}

.lantern {
  position: absolute;
  bottom: 72px;
  width: 38px;
  height: 50px;
  background: #f3b65f;
  border: 4px solid #6b2918;
  box-shadow: 0 0 30px rgba(255, 207, 101, 0.66);
  animation: lantern-breath 2600ms steps(4, end) infinite;
}

.lantern.left {
  left: 17%;
}

.lantern.right {
  right: 17%;
}

.stone-path {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(360px, 74%);
  height: 150px;
  translate: -50% 0;
  clip-path: polygon(39% 0, 61% 0, 100% 100%, 0 100%);
  background:
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(77, 46, 25, 0.22) 38px 42px),
    repeating-linear-gradient(0deg, #d7b783 0 28px, #b79264 28px 32px);
}

.oracle-altar {
  position: absolute;
  left: 50%;
  bottom: 38px;
  translate: -50% 0;
  width: min(310px, 78%);
  padding: 18px;
  text-align: center;
  background: rgba(75, 38, 21, 0.72);
  border: 4px solid rgba(255, 217, 130, 0.76);
  box-shadow: 0 0 40px rgba(255, 211, 109, 0.56);
}

.oracle-altar p {
  margin-bottom: 14px;
  color: #fff0c5;
  line-height: 1.7;
  font-weight: 700;
}

.ritual-altar {
  width: min(390px, 88%);
  padding: 20px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 222, 121, 0.26), transparent 38%),
    rgba(75, 38, 21, 0.78);
}

.ritual-prompt {
  font-size: 17px;
}

.jiao-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  min-height: 118px;
  margin: 2px auto 14px;
}

.jiao-stage::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 213, 105, 0.18);
  box-shadow:
    0 0 38px rgba(255, 218, 111, 0.38),
    0 0 80px rgba(255, 232, 160, 0.18);
  animation: ritual-aura 5200ms steps(7, end) infinite;
}

.jiao-cup {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 42px;
  border: 4px solid #5b2a16;
  border-radius: 38px 38px 18px 18px;
  image-rendering: pixelated;
  box-shadow:
    inset 0 -8px 0 rgba(98, 47, 24, 0.18),
    0 10px 0 rgba(43, 22, 12, 0.22),
    0 0 28px rgba(255, 215, 111, 0.36);
}

.jiao-cup span {
  position: absolute;
  left: 18px;
  top: 8px;
  width: 28px;
  height: 10px;
  background: rgba(255, 245, 213, 0.52);
  border-radius: 999px;
}

.jiao-cup.left {
  rotate: -16deg;
}

.jiao-cup.right {
  rotate: 16deg;
}

.jiao-cup.front {
  background:
    linear-gradient(180deg, #ffe6a8 0 46%, #c87839 46% 100%);
}

.jiao-cup.back {
  background:
    linear-gradient(180deg, #8f3929 0 44%, #5b2a16 44% 100%);
}

.jiao-stage.is-casting .jiao-cup.left {
  animation: cast-left 1500ms steps(7, end) both;
}

.jiao-stage.is-casting .jiao-cup.right {
  animation: cast-right 1500ms steps(7, end) both;
}

.jiao-result {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  padding: 12px;
  color: #fff6d4;
  border: 3px solid rgba(255, 229, 156, 0.7);
  background: rgba(48, 24, 14, 0.7);
  line-height: 1.55;
  animation: omen-reveal 760ms steps(7, end) both;
}

.jiao-result strong {
  font-size: 22px;
  color: var(--gold-soft);
}

.jiao-result.allowed {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 233, 166, 0.28), transparent 42%),
    rgba(48, 24, 14, 0.7);
  box-shadow:
    0 0 34px rgba(255, 219, 111, 0.58),
    0 0 76px rgba(255, 229, 149, 0.24);
}

.jiao-result.pause {
  border-color: rgba(255, 210, 116, 0.64);
  background:
    linear-gradient(180deg, rgba(91, 57, 31, 0.72), rgba(48, 24, 14, 0.72));
}

.jiao-result.closed {
  border-color: rgba(216, 176, 123, 0.7);
  background:
    linear-gradient(180deg, rgba(70, 50, 38, 0.76), rgba(48, 24, 14, 0.72));
}

.daily-notice {
  display: grid;
  margin: 0 0 14px;
  padding: 13px 12px;
  color: #fff6d4;
  border: 3px solid rgba(255, 229, 156, 0.72);
  background:
    linear-gradient(90deg, rgba(143, 57, 41, 0.48), rgba(69, 35, 18, 0.72)),
    rgba(48, 24, 14, 0.78);
  box-shadow: 0 0 30px rgba(255, 218, 111, 0.36);
}

.daily-notice strong {
  color: var(--gold-soft);
  font-size: 19px;
  line-height: 1.6;
}

.altar-link-button {
  margin-top: 10px;
  width: min(100%, 240px);
}

.blessing-altar {
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 233, 166, 0.18), transparent 38%),
    rgba(48, 24, 14, 0.44);
}

.blessing-light {
  position: absolute;
  width: 156px;
  height: 156px;
  background: #ffe6a8;
  box-shadow:
    0 0 0 18px rgba(255, 221, 120, 0.18),
    0 0 0 42px rgba(255, 221, 120, 0.1),
    0 0 96px rgba(255, 229, 154, 0.78);
  animation: blessing-pulse 1000ms steps(5, end) both;
}

.blessing-smoke {
  position: absolute;
  bottom: 24px;
  width: 74px;
  height: 150px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 246, 212, 0.22), transparent 32%),
    radial-gradient(circle at 44% 48%, rgba(255, 226, 160, 0.16), transparent 42%);
  filter: blur(2px);
  opacity: 0.72;
  animation: smoke-rise 2600ms steps(8, end) infinite;
}

.smoke-one {
  left: 22%;
}

.smoke-two {
  right: 22%;
  animation-delay: 720ms;
}

.blessing-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blessing-particles span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffe6a8;
  box-shadow: 0 0 14px rgba(255, 224, 140, 0.86);
  animation: blessing-dust 2200ms steps(7, end) infinite;
}

.blessing-particles span:nth-child(1) {
  left: 22%;
  top: 62%;
}

.blessing-particles span:nth-child(2) {
  left: 38%;
  top: 46%;
  animation-delay: 260ms;
}

.blessing-particles span:nth-child(3) {
  left: 54%;
  top: 66%;
  animation-delay: 520ms;
}

.blessing-particles span:nth-child(4) {
  left: 68%;
  top: 50%;
  animation-delay: 780ms;
}

.blessing-particles span:nth-child(5) {
  left: 78%;
  top: 68%;
  animation-delay: 1040ms;
}

.blessing-text {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 16px 14px;
  color: #fff8d8;
  font-size: 22px;
  font-weight: 900;
  text-shadow:
    0 2px 0 #5b2a16,
    0 0 24px rgba(255, 238, 177, 0.8);
}

@keyframes cast-left {
  0% {
    transform: translate(0, 0) rotate(0deg) scaleX(1);
  }
  18% {
    transform: translate(-18px, -42px) rotate(-72deg) scaleX(0.7);
  }
  38% {
    transform: translate(22px, -70px) rotate(128deg) scaleX(1.05);
  }
  62% {
    transform: translate(-8px, -34px) rotate(244deg) scaleX(0.62);
  }
  82% {
    transform: translate(10px, -12px) rotate(318deg) scaleX(1);
  }
  100% {
    transform: translate(0, 0) rotate(360deg) scaleX(1);
  }
}

@keyframes cast-right {
  0% {
    transform: translate(0, 0) rotate(0deg) scaleX(1);
  }
  18% {
    transform: translate(18px, -38px) rotate(82deg) scaleX(0.68);
  }
  38% {
    transform: translate(-24px, -72px) rotate(-138deg) scaleX(1.08);
  }
  62% {
    transform: translate(8px, -34px) rotate(-238deg) scaleX(0.62);
  }
  82% {
    transform: translate(-10px, -12px) rotate(-318deg) scaleX(1);
  }
  100% {
    transform: translate(0, 0) rotate(-360deg) scaleX(1);
  }
}

@keyframes blessing-pulse {
  0% {
    transform: scale(0.82);
    opacity: 0.42;
  }
  45% {
    transform: scale(1.04);
    opacity: 0.94;
  }
  100% {
    transform: scale(1);
    opacity: 0.76;
  }
}

@keyframes smoke-rise {
  0% {
    transform: translateY(26px) scaleX(0.8);
    opacity: 0;
  }
  35% {
    opacity: 0.62;
  }
  100% {
    transform: translateY(-56px) scaleX(1.32);
    opacity: 0;
  }
}

@keyframes blessing-dust {
  0% {
    transform: translateY(22px) scale(0.8);
    opacity: 0;
  }
  42% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-54px) scale(1);
    opacity: 0;
  }
}

@keyframes whisper-arrive {
  0% {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
  }
  64% {
    opacity: 0.86;
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes scroll-unfurl {
  0% {
    opacity: 0.64;
    transform: scaleY(0.46) translateY(-18px);
    filter: brightness(1.08) blur(1px);
  }
  42% {
    opacity: 0.86;
    transform: scaleY(0.72) translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: scaleY(1) translateY(0);
    filter: brightness(1) blur(0);
  }
}

@keyframes scroll-body-reveal {
  0% {
    opacity: 0;
    transform: translateY(-12px);
  }
  55% {
    opacity: 0.52;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes archive-scroll-open {
  0% {
    opacity: 0;
    transform: scaleY(0.82) translateY(-8px);
    filter: blur(1px);
  }
  62% {
    opacity: 0.78;
  }
  100% {
    opacity: 1;
    transform: scaleY(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes listening-breath {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

@keyframes page-soft-enter {
  0% {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
  }
  55% {
    opacity: 0.72;
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes soft-black-field {
  0% {
    opacity: 0;
  }
  36% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
  }
}

@keyframes loading-breath {
  0% {
    opacity: 1;
    filter: brightness(0.88);
  }
  70% {
    opacity: 1;
    filter: brightness(1.08);
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes ritual-aura {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.74;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes omen-reveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }
  55% {
    opacity: 0.74;
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes practice-glow {
  0% {
    box-shadow:
      inset 0 0 0 5px rgba(255, 248, 220, 0.4),
      0 0 18px rgba(255, 213, 105, 0.12);
  }
  50% {
    box-shadow:
      inset 0 0 0 5px rgba(255, 248, 220, 0.58),
      0 0 54px rgba(255, 224, 138, 0.52);
  }
  100% {
    box-shadow:
      inset 0 0 0 5px rgba(255, 248, 220, 0.46),
      0 0 30px rgba(255, 224, 138, 0.28);
  }
}

@keyframes particle-drift {
  0% {
    transform: translate3d(0, 14px, 0);
    opacity: 0;
  }
  25% {
    opacity: 0.72;
  }
  100% {
    transform: translate3d(12px, -52px, 0);
    opacity: 0;
  }
}

@keyframes earth-breath-presence {
  0%,
  100% {
    opacity: 0;
  }
  18%,
  78% {
    opacity: 1;
  }
}

@keyframes earth-rain-fall {
  0% {
    transform: translate3d(0, -18vh, 0) rotate(14deg);
    opacity: 0;
  }
  18%,
  76% {
    opacity: 0.54;
  }
  100% {
    transform: translate3d(34vw, 112vh, 0) rotate(14deg);
    opacity: 0;
  }
}

@keyframes earth-fog-drift {
  0% {
    transform: translateX(-8%);
    opacity: 0;
  }
  30%,
  70% {
    opacity: 0.62;
  }
  100% {
    transform: translateX(8%);
    opacity: 0;
  }
}

@keyframes earth-leaf-drift {
  0% {
    transform: translate3d(0, -12vh, 0) rotate(0deg);
    opacity: 0;
  }
  24% {
    opacity: 0.56;
  }
  100% {
    transform: translate3d(124vw, 98vh, 0) rotate(180deg);
    opacity: 0;
  }
}

@keyframes earth-wind-move {
  0% {
    transform: translateX(-18%);
    opacity: 0;
  }
  34%,
  70% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(18%);
    opacity: 0;
  }
}

@keyframes earth-wind-line {
  0% {
    transform: translateX(-20vw);
    opacity: 0;
  }
  35% {
    opacity: 0.45;
  }
  100% {
    transform: translateX(120vw);
    opacity: 0;
  }
}

@keyframes earth-light-breathe {
  0%,
  100% {
    opacity: 0;
    filter: brightness(0.92);
  }
  38%,
  72% {
    opacity: 0.66;
    filter: brightness(1.08);
  }
}

@keyframes dragon-field-fade {
  0%,
  100% {
    opacity: 0;
  }
  18%,
  74% {
    opacity: 1;
  }
}

@keyframes dragon-cross-sky {
  0% {
    transform: translate3d(-4vw, 18px, 0) scale(0.92);
    opacity: 0;
  }
  18% {
    opacity: 0.12;
  }
  44% {
    opacity: 0.22;
  }
  72% {
    opacity: 0.1;
  }
  100% {
    transform: translate3d(138vw, -36px, 0) scale(1.06);
    opacity: 0;
  }
}

@keyframes dragon-wind-pass {
  0% {
    transform: translateX(-18%);
    opacity: 0;
  }
  30% {
    opacity: 0.42;
  }
  100% {
    transform: translateX(18%);
    opacity: 0;
  }
}

.side-panel,
.result-panel,
.records-list {
  background: var(--panel);
  border: 4px solid rgba(67, 35, 18, 0.54);
  box-shadow: 0 16px 36px var(--shadow);
}

.side-panel {
  padding: 22px;
  align-self: start;
}

.side-panel h2,
.result-panel h2,
.records-heading h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.side-panel p {
  line-height: 1.8;
  color: #5d3a22;
}

.omen-strip {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.practice-card {
  position: relative;
  margin: 18px 0 4px;
  padding: 18px 16px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(122, 72, 30, 0.12), transparent 14% 86%, rgba(122, 72, 30, 0.12)),
    repeating-linear-gradient(0deg, rgba(116, 73, 32, 0.04) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #fff2c9, #edd19a);
  border: 4px solid rgba(112, 68, 26, 0.48);
  box-shadow:
    inset 0 0 0 5px rgba(255, 248, 220, 0.4),
    0 0 28px rgba(255, 213, 105, 0.18);
}

.practice-card::before,
.practice-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, #8f3929 0 18px, #d09a4c 18px 36px);
}

.practice-card::before {
  top: 0;
}

.practice-card::after {
  bottom: 0;
}

.practice-card.is-complete {
  animation: practice-glow 1200ms steps(7, end) both;
}

.practice-label {
  display: inline-block;
  margin-bottom: 10px;
  color: #8f3929;
  font-size: 14px;
  font-weight: 900;
}

.practice-card strong {
  display: block;
  margin-bottom: 8px;
  color: #6f2d22;
  font-size: 22px;
}

.practice-card p {
  margin-bottom: 14px;
  color: #4d2d19;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 900;
}

.practice-button {
  width: 100%;
  min-height: 46px;
  color: #3b2414;
  background: rgba(243, 199, 102, 0.72);
  border: 3px solid rgba(91, 42, 22, 0.74);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow:
    0 5px 0 rgba(91, 42, 22, 0.64),
    0 0 22px rgba(255, 213, 105, 0.24);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.practice-button:disabled {
  cursor: default;
  background: rgba(255, 231, 171, 0.78);
  box-shadow: 0 0 28px rgba(255, 224, 138, 0.34);
}

.practice-link {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  color: #6f3c1d;
  background: rgba(255, 247, 217, 0.46);
  border: 2px solid rgba(103, 62, 28, 0.38);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.practice-link:hover {
  filter: brightness(1.04);
}

.practice-streak {
  margin-top: 12px;
  color: #6a4224;
  font-weight: 800;
  line-height: 1.6;
}

.daily-practice-screen {
  position: relative;
  min-height: calc(100vh - 116px);
  display: grid;
  place-items: center;
  padding: 34px 0 54px;
  overflow: hidden;
}

.practice-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 223, 144, 0.28), transparent 34%),
    radial-gradient(circle at 18% 62%, rgba(255, 205, 105, 0.12), transparent 22%);
  opacity: 0.9;
}

.practice-ambient span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 226, 151, 0.76);
  box-shadow: 0 0 14px rgba(255, 221, 132, 0.64);
  animation: particle-drift 8s steps(10, end) infinite;
}

.practice-ambient span:nth-child(1) {
  left: 22%;
  top: 18%;
}

.practice-ambient span:nth-child(2) {
  left: 72%;
  top: 32%;
  animation-delay: 900ms;
}

.practice-ambient span:nth-child(3) {
  left: 48%;
  top: 74%;
  animation-delay: 1700ms;
}

.daily-practice-scroll {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 48px 34px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(118, 66, 28, 0.16), transparent 13% 87%, rgba(118, 66, 28, 0.16)),
    repeating-linear-gradient(0deg, rgba(96, 55, 24, 0.045) 0 2px, transparent 2px 20px),
    linear-gradient(180deg, rgba(255, 244, 203, 0.98), rgba(233, 202, 140, 0.96));
  border: 5px solid rgba(101, 56, 26, 0.58);
  box-shadow:
    inset 0 0 0 7px rgba(255, 250, 225, 0.42),
    0 0 42px rgba(255, 213, 105, 0.24),
    0 22px 48px rgba(45, 23, 14, 0.24);
}

.daily-practice-scroll::before,
.daily-practice-scroll::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-linear-gradient(90deg, #73351f 0 20px, #cf9650 20px 40px, #f0c96d 40px 60px);
}

.daily-practice-scroll::before {
  top: 0;
}

.daily-practice-scroll::after {
  bottom: 0;
}

.daily-practice-scroll.is-complete {
  animation: practice-glow 1200ms steps(7, end) both;
}

.practice-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #8f3929;
  font-size: 15px;
  font-weight: 900;
}

.daily-practice-scroll h1 {
  margin-bottom: 24px;
  color: #5d271b;
  font-size: 36px;
}

.practice-section {
  width: min(540px, 100%);
  margin: 0 auto 18px;
  padding: 18px;
  background: rgba(255, 248, 221, 0.46);
  border: 3px solid rgba(126, 75, 34, 0.24);
  text-align: left;
}

.practice-section strong {
  display: block;
  margin-bottom: 8px;
  color: #8f3929;
  font-size: 15px;
}

.practice-section p {
  color: #4d2d19;
  font-size: 21px;
  line-height: 1.8;
  font-weight: 900;
}

.daily-practice-button {
  width: min(360px, 100%);
  margin: 14px auto 0;
}

.practice-complete-note {
  width: min(520px, 100%);
  margin: 20px auto 0;
  padding: 14px 16px;
  color: #5b2a16;
  background: rgba(255, 232, 167, 0.58);
  border: 3px solid rgba(143, 57, 41, 0.24);
  font-weight: 900;
  line-height: 1.8;
  box-shadow: 0 0 24px rgba(255, 222, 129, 0.22);
}

.practice-page-streak {
  margin-top: 18px;
}

.omen-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  background: rgba(248, 218, 146, 0.68);
  border: 3px solid rgba(99, 56, 25, 0.28);
  font-weight: 800;
}

.result-screen {
  min-height: calc(100vh - 116px);
  display: grid;
  place-items: center;
}

.result-panel {
  width: min(760px, 100%);
  padding: 26px;
}

.oracle-result-screen {
  position: relative;
  padding: 18px 0 48px;
}

.oracle-result-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 229, 149, 0.44), transparent 32%),
    radial-gradient(circle at 50% 72%, rgba(255, 198, 83, 0.18), transparent 42%);
  pointer-events: none;
}

.oracle-scroll {
  position: relative;
  width: min(780px, 100%);
  padding: 54px 38px;
  border: 0;
  background:
    linear-gradient(90deg, rgba(156, 104, 48, 0.12), transparent 10% 90%, rgba(156, 104, 48, 0.12)),
    repeating-linear-gradient(0deg, rgba(116, 73, 32, 0.045) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #fff4cf 0%, #f7dfaa 52%, #ead09a 100%);
  box-shadow:
    inset 0 0 0 5px rgba(111, 67, 27, 0.45),
    inset 0 0 0 12px rgba(255, 246, 210, 0.54),
    0 28px 70px rgba(49, 23, 12, 0.42),
    0 0 64px rgba(255, 217, 112, 0.34);
}

.oracle-scroll.scroll-waiting {
  width: min(640px, 100%);
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 18px;
  animation: whisper-arrive 900ms steps(8, end) both;
}

.oracle-scroll.scroll-open {
  transform-origin: 50% 8%;
  animation: scroll-unfurl 1250ms steps(10, end) both;
}

.oracle-scroll.scroll-settled {
  transform-origin: 50% 8%;
  opacity: 1;
  transform: scaleY(1) translateY(0);
  filter: brightness(1) blur(0);
}

.oracle-scroll::before,
.oracle-scroll::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  height: 12px;
  background: repeating-linear-gradient(90deg, #7c3f1e 0 18px, #9e5b2a 18px 36px);
  box-shadow: 0 0 22px rgba(255, 218, 120, 0.36);
}

.oracle-scroll::before {
  top: 22px;
}

.oracle-scroll::after {
  bottom: 22px;
}

.scroll-cap {
  position: absolute;
  left: 50%;
  width: min(520px, calc(100% - 84px));
  height: 24px;
  translate: -50% 0;
  background: linear-gradient(90deg, #7c3f1e, #d09a4c 18% 82%, #7c3f1e);
  border: 4px solid #5b2a16;
  box-shadow: 0 0 24px rgba(255, 213, 105, 0.36);
}

.scroll-cap.top {
  top: -10px;
}

.scroll-cap.bottom {
  bottom: -10px;
}

.result-block {
  position: relative;
  margin: 0 0 18px;
  padding: 18px 20px;
  border-left: 6px solid rgba(143, 57, 41, 0.72);
  background: rgba(255, 249, 228, 0.52);
  box-shadow: inset 0 0 0 3px rgba(183, 129, 54, 0.15);
}

.scroll-body {
  animation: scroll-body-reveal 1180ms steps(9, end) both;
}

.scroll-body.scroll-body-settled {
  animation: none;
  opacity: 1;
  transform: translateY(0);
}

.whisper-block {
  border-left-color: rgba(243, 199, 102, 0.86);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 229, 149, 0.28), transparent 48%),
    rgba(255, 249, 228, 0.62);
}

.is-whispering .name-block {
  text-align: center;
  border-left: 0;
  background: transparent;
  box-shadow: none;
}

.is-whispering .fortune-meta {
  justify-content: center;
}

.is-whispering .whisper-block {
  margin: 0 auto;
  max-width: 520px;
  text-align: center;
  animation: whisper-arrive 1120ms steps(8, end) both;
}

.temple-listening {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #7c4821;
  font-weight: 900;
  animation: listening-breath 1600ms steps(6, end) infinite;
}

.temple-listening span {
  width: 42px;
  height: 8px;
  background: #d29a4c;
  box-shadow:
    0 0 18px rgba(255, 218, 120, 0.74),
    0 0 42px rgba(255, 218, 120, 0.32);
}

.temple-listening p {
  margin: 0;
  line-height: 1.7;
}

.result-block h2 {
  margin: 8px 0 0;
  color: #5b2a16;
  font-size: 30px;
  line-height: 1.28;
}

.fortune-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fortune-meta span,
.record-level {
  display: inline-block;
  padding: 5px 8px;
  color: #6b3519;
  background: rgba(243, 199, 102, 0.42);
  border: 2px solid rgba(143, 57, 41, 0.32);
  font-size: 13px;
  font-weight: 900;
}

.result-block p,
.result-block blockquote {
  margin: 8px 0 0;
  color: #4d2d19;
  line-height: 1.9;
}

.block-label {
  display: inline-block;
  color: #8f3929;
  font-size: 14px;
  font-weight: 900;
}

.poem-block {
  background: rgba(255, 238, 188, 0.64);
  border-left-color: var(--gold);
}

.poem-block blockquote {
  font-size: 24px;
  font-weight: 900;
}

.result-actions {
  justify-content: center;
  margin-top: 28px;
}

.empty-result {
  background: var(--panel);
}

.fortune-name {
  display: inline-block;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #8f3929;
  color: #fff0c5;
  border: 3px solid #512313;
  font-weight: 900;
}

.poem {
  margin: 0 0 20px;
  padding: 18px;
  background: rgba(255, 247, 223, 0.7);
  border-left: 6px solid var(--gold);
  font-size: 22px;
  line-height: 1.9;
  font-weight: 800;
}

.result-section {
  margin-top: 18px;
}

.result-section h3 {
  margin-bottom: 8px;
  color: #74411e;
}

.result-section p {
  line-height: 1.8;
  margin-bottom: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.records-screen {
  padding-bottom: 88px;
}

.scroll-archive-screen {
  position: relative;
}

.records-screen::before {
  content: "";
  position: absolute;
  inset: 82px 18px auto;
  height: 160px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 150, 0.2), transparent 46%),
    linear-gradient(90deg, transparent, rgba(255, 231, 176, 0.08), transparent);
  filter: blur(1px);
}

.records-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.archive-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #f7d999;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(255, 220, 140, 0.28);
}

.records-heading h2 {
  color: #fff0c5;
  text-shadow: 0 0 18px rgba(255, 213, 110, 0.28);
}

.records-heading p {
  max-width: 560px;
  line-height: 1.7;
  color: #f0d49c;
}

.records-list {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 4px solid rgba(214, 158, 80, 0.34);
  background:
    linear-gradient(90deg, rgba(88, 48, 24, 0.2), transparent 8% 92%, rgba(88, 48, 24, 0.2)),
    repeating-linear-gradient(90deg, rgba(86, 46, 22, 0.14) 0 8px, transparent 8px 68px),
    linear-gradient(180deg, rgba(255, 238, 195, 0.86), rgba(232, 198, 137, 0.82));
  box-shadow:
    inset 0 0 0 6px rgba(92, 50, 24, 0.24),
    inset 0 0 46px rgba(83, 43, 19, 0.2),
    0 24px 48px rgba(31, 15, 8, 0.22);
}

.record-item {
  padding: 16px;
  background: rgba(255, 248, 225, 0.82);
  border: 3px solid rgba(97, 54, 22, 0.32);
}

.scroll-record {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 4px solid rgba(112, 68, 26, 0.46);
  background:
    linear-gradient(90deg, rgba(122, 72, 30, 0.12), transparent 12% 88%, rgba(122, 72, 30, 0.12)),
    repeating-linear-gradient(0deg, rgba(116, 73, 32, 0.04) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #fff2c9, #edd19a);
  box-shadow:
    inset 0 0 0 5px rgba(255, 248, 220, 0.4),
    0 14px 28px rgba(58, 28, 13, 0.22),
    0 0 34px rgba(255, 218, 120, 0.12);
  transform-origin: 50% 0;
}

.scroll-record::before,
.scroll-record::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, #8f3929 0 18px, #d09a4c 18px 36px);
}

.scroll-record::before {
  top: 0;
}

.scroll-record::after {
  bottom: 0;
}

.record-toggle {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  width: 100%;
  padding: 22px 20px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    transform 140ms ease,
    filter 140ms ease;
}

.record-date {
  grid-column: 1 / -1;
  color: #8b5d33;
  font-size: 13px;
  font-weight: 900;
  white-space: normal;
}

.record-title {
  grid-column: 1 / 2;
  font-size: 20px;
  font-weight: 900;
}

.record-time {
  justify-self: end;
  display: inline-block;
  padding: 5px 8px;
  color: #76502b;
  background: rgba(255, 238, 188, 0.5);
  border: 2px solid rgba(143, 57, 41, 0.24);
  font-size: 13px;
  font-weight: 900;
}

.record-summary {
  grid-column: 1 / -1;
  color: #604028;
  line-height: 1.65;
  font-weight: 700;
}

.record-level {
  grid-column: 2 / 3;
  justify-self: start;
}

.record-hint {
  grid-column: 1 / -1;
  color: #8f3929;
  font-weight: 900;
}

.record-full {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 0 20px 24px;
  animation: archive-scroll-open 900ms steps(8, end) both;
}

.record-full div {
  padding: 14px 16px;
  background: rgba(255, 249, 228, 0.5);
  border-left: 5px solid rgba(143, 57, 41, 0.62);
}

.record-full strong {
  display: inline-block;
  margin-bottom: 6px;
  color: #8f3929;
}

.record-full p {
  margin-bottom: 0;
  line-height: 1.8;
}

.record-share-row {
  background: transparent !important;
  border-left: 0 !important;
  padding: 4px 0 0 !important;
}

.share-card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 224, 150, 0.18), transparent 32%),
    rgba(10, 8, 12, 0.82);
}

.share-card-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(420px, 100%);
}

.share-card-preview {
  position: relative;
  width: min(360px, calc(100vw - 40px));
  aspect-ratio: 2 / 3;
  overflow: hidden;
  padding: 0;
  background: #f7dfaa;
  border: 6px solid rgba(111, 67, 27, 0.72);
  box-shadow:
    inset 0 0 0 6px rgba(255, 246, 210, 0.54),
    0 24px 60px rgba(2, 5, 14, 0.48),
    0 0 54px rgba(255, 217, 112, 0.24);
}

.share-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
}

.share-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.share-card-note {
  margin: 0;
  color: #f7d999;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.record-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-weight: 900;
}

.record-date {
  color: #7c5530;
  white-space: nowrap;
}

.empty-state {
  padding: 42px 16px;
  text-align: center;
  line-height: 1.8;
  color: #674328;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  display: none;
  width: min(520px, calc(100% - 24px));
  translate: -50% 0;
  background: rgba(55, 28, 16, 0.82);
  border: 3px solid rgba(255, 226, 154, 0.45);
  padding: 8px;
  backdrop-filter: blur(10px);
}

.bottom-nav .nav-button {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
}

@media (max-width: 820px) {
  .screen {
    padding: 16px 16px 92px;
  }

  .topbar {
    gap: 10px;
  }

  .brand span {
    max-width: 132px;
    line-height: 1.25;
  }

  .topbar .nav {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .bottom-nav {
    display: flex;
    gap: 6px;
  }

  .temple-stage {
    grid-template-columns: 1fr;
  }

  .scene {
    min-height: 560px;
  }

  .side-panel {
    order: -1;
    padding: 18px;
  }

  .records-heading {
    display: block;
  }
}

@media (max-width: 520px) {
  .hero-content {
    padding: 22px 14px;
  }

  .hero-content h1 {
    font-size: 31px;
  }

  .hero-content .subtitle {
    font-size: 18px;
  }

  .courtyard-actions {
    grid-template-columns: 1fr;
  }

  .hero-content .courtyard-actions .primary-button,
  .hero-content .courtyard-actions .secondary-button,
  .courtyard-status-button {
    min-height: 56px;
  }

  .courtyard-fortune {
    grid-template-columns: 1fr;
  }

  .courtyard-status,
  .courtyard-fortune {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand img,
  .brand svg {
    width: 34px;
    height: 34px;
  }

  .sound-button {
    min-height: 42px;
    padding: 8px 10px;
  }

  .scene {
    min-height: 520px;
  }

  .dragon-silhouette {
    top: 18vh;
    width: 520px;
    scale: 0.72;
  }

  .temple-building {
    width: 96%;
    bottom: 126px;
  }

  .poem {
    font-size: 19px;
  }

  .record-top {
    display: block;
  }

  .record-toggle {
    grid-template-columns: 1fr;
  }

  .record-date {
    white-space: normal;
  }

  .button-row > * {
    width: 100%;
  }

  .share-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .share-card-actions > * {
    width: 100%;
  }

  .oracle-scroll {
    padding: 48px 18px;
  }

  .daily-practice-screen {
    padding-top: 16px;
  }

  .daily-practice-scroll {
    padding: 42px 18px;
  }

  .daily-practice-scroll h1 {
    font-size: 30px;
  }

  .practice-section {
    padding: 15px 14px;
  }

  .practice-section p {
    font-size: 19px;
  }

  .result-block {
    padding: 15px 14px;
  }

  .result-block h2 {
    font-size: 25px;
  }

  .poem-block blockquote {
    font-size: 20px;
  }
}

/* World atmosphere pass */
body {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 205, 105, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(21, 18, 29, 0.94), rgba(56, 28, 24, 0.9)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat fixed;
}

.screen {
  position: relative;
}

.hero-screen {
  position: relative;
  isolation: isolate;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(223, 205, 162, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(17, 24, 38, 0.4), rgba(37, 41, 50, 0.28) 44%, rgba(30, 25, 24, 0.44)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat;
}

.hero-distance {
  position: absolute;
  left: 50%;
  bottom: 38%;
  z-index: -1;
  width: min(640px, 82vw);
  height: 280px;
  translate: -50% 0;
  pointer-events: none;
  opacity: 0.72;
  filter:
    saturate(0.78)
    brightness(0.86)
    drop-shadow(0 0 46px rgba(210, 196, 150, 0.2));
}

.hero-distance::before,
.hero-distance::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
}

.hero-distance::before {
  bottom: -44vh;
  width: min(420px, 54vw);
  height: 56vh;
  translate: -50% 0;
  background:
    linear-gradient(90deg, transparent, rgba(168, 154, 125, 0.18) 45% 55%, transparent),
    linear-gradient(180deg, rgba(169, 151, 111, 0.18), rgba(78, 74, 67, 0.08) 45%, transparent);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  filter: blur(0.4px);
}

.hero-distance::after {
  bottom: -62px;
  width: min(720px, 86vw);
  height: 130px;
  translate: -50% 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(210, 201, 176, 0.16), transparent 52%),
    linear-gradient(90deg, transparent 0 12%, rgba(220, 220, 207, 0.08) 32%, transparent 52%, rgba(214, 209, 190, 0.06) 72%, transparent 100%);
  filter: blur(6px);
  animation: courtyard-mist 16000ms steps(12, end) infinite;
}

.distant-gate {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(250px, 28vw, 420px);
  height: clamp(170px, 20vw, 270px);
  translate: -50% 0;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(77, 60, 45, 0.76) 18% 28%, transparent 28% 72%, rgba(77, 60, 45, 0.76) 72% 82%, transparent 82%),
    linear-gradient(180deg, rgba(155, 124, 82, 0.58) 0 22%, rgba(49, 43, 40, 0.74) 22% 100%);
  border: 4px solid rgba(47, 43, 38, 0.72);
  image-rendering: pixelated;
}

.distant-gate::before,
.distant-gate::after {
  content: "";
  position: absolute;
  left: -38px;
  right: -38px;
  height: 28px;
  background: rgba(86, 62, 48, 0.8);
  border: 4px solid rgba(48, 42, 37, 0.74);
  box-shadow: 0 7px 0 rgba(151, 123, 79, 0.42);
}

.distant-gate::before {
  top: -34px;
}

.distant-gate::after {
  top: 18px;
  left: -18px;
  right: -18px;
}

.distant-light {
  position: absolute;
  bottom: 30px;
  width: 12px;
  height: 18px;
  background: #ddbd78;
  box-shadow:
    0 0 20px rgba(221, 189, 120, 0.54),
    0 0 56px rgba(202, 174, 121, 0.18);
  animation: lantern-breath 4200ms steps(6, end) infinite;
}

.light-one {
  left: 24%;
}

.light-two {
  right: 24%;
  animation-delay: 600ms;
}

.courtyard-architecture {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.courtyard-pillar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(34px, 5vw, 78px);
  background:
    linear-gradient(90deg, rgba(28, 24, 24, 0.88), rgba(105, 65, 39, 0.56) 40%, rgba(31, 27, 26, 0.9)),
    repeating-linear-gradient(0deg, rgba(225, 194, 124, 0.16) 0 8px, transparent 8px 36px);
  border-inline: 3px solid rgba(184, 148, 85, 0.34);
  box-shadow:
    inset 0 0 28px rgba(0, 0, 0, 0.42),
    0 0 44px rgba(211, 176, 99, 0.08);
}

.pillar-left {
  left: clamp(10px, 5vw, 84px);
}

.pillar-right {
  right: clamp(10px, 5vw, 84px);
}

.courtyard-banner {
  position: absolute;
  top: 12vh;
  width: clamp(34px, 5vw, 62px);
  height: min(34vh, 360px);
  background:
    linear-gradient(180deg, rgba(22, 24, 30, 0.96), rgba(15, 17, 24, 0.9)),
    radial-gradient(circle, rgba(203, 168, 87, 0.32) 0 2px, transparent 3px) center / 24px 34px;
  border: 3px solid rgba(175, 142, 75, 0.48);
  box-shadow:
    inset 0 0 0 4px rgba(210, 176, 98, 0.08),
    0 18px 48px rgba(7, 8, 14, 0.36);
  opacity: 0.72;
}

.banner-left {
  left: clamp(52px, 9vw, 148px);
}

.banner-right {
  right: clamp(52px, 9vw, 148px);
}

.courtyard-steps {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(980px, 82vw);
  height: 48vh;
  translate: -50% 0;
  background:
    repeating-linear-gradient(0deg, rgba(166, 151, 123, 0.16) 0 2px, transparent 2px 44px),
    linear-gradient(90deg, transparent 0 16%, rgba(198, 183, 143, 0.12) 32%, rgba(220, 204, 153, 0.22) 50%, rgba(198, 183, 143, 0.12) 68%, transparent 84%);
  clip-path: polygon(39% 0, 61% 0, 100% 100%, 0 100%);
  filter: blur(0.2px);
  opacity: 0.72;
}

.courtyard-incense {
  position: absolute;
  left: 50%;
  bottom: 25vh;
  width: 118px;
  height: 70px;
  translate: -50% 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(232, 198, 118, 0.42), transparent 54%),
    linear-gradient(180deg, rgba(100, 76, 48, 0.96), rgba(38, 34, 28, 0.98));
  border: 5px solid rgba(171, 134, 75, 0.66);
  border-radius: 0 0 28px 28px;
  box-shadow:
    inset 0 0 0 4px rgba(235, 197, 111, 0.08),
    0 0 36px rgba(211, 174, 92, 0.24),
    0 20px 34px rgba(7, 8, 12, 0.42);
}

.courtyard-incense::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: -12px;
  height: 18px;
  border: 4px solid rgba(173, 138, 76, 0.72);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.courtyard-incense i {
  position: absolute;
  bottom: 58px;
  width: 4px;
  height: 46px;
  background: rgba(96, 47, 34, 0.88);
  transform-origin: bottom center;
}

.courtyard-incense i:nth-child(1) {
  left: 48px;
  rotate: -6deg;
}

.courtyard-incense i:nth-child(2) {
  left: 58px;
}

.courtyard-incense i:nth-child(3) {
  left: 68px;
  rotate: 6deg;
}

.courtyard-incense::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 88px;
  width: 88px;
  height: 180px;
  translate: -50% 0;
  background:
    linear-gradient(90deg, transparent 0 25%, rgba(233, 229, 211, 0.2) 36%, transparent 48%, rgba(236, 231, 212, 0.16) 62%, transparent 78%),
    radial-gradient(ellipse at 50% 80%, rgba(229, 219, 190, 0.24), transparent 42%);
  filter: blur(2px);
  animation: incense-drift 9200ms steps(10, end) infinite;
}

.courtyard-floor-mark {
  position: absolute;
  left: 50%;
  bottom: 16vh;
  width: min(260px, 56vw);
  aspect-ratio: 1;
  translate: -50% 0;
  border: 3px solid rgba(190, 155, 87, 0.34);
  border-radius: 50%;
  opacity: 0.55;
  box-shadow:
    inset 0 0 0 14px rgba(190, 155, 87, 0.05),
    inset 0 0 0 28px rgba(190, 155, 87, 0.04),
    0 0 30px rgba(209, 177, 101, 0.16);
}

.entrance-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 223, 151, 0.16), transparent 22%),
    rgba(10, 8, 12, 0.78);
  opacity: 1;
}

.entrance-overlay.entrance-silence p {
  opacity: 0;
}

.entrance-overlay.entrance-whisper p {
  animation: entrance-whisper-in 1200ms steps(10, end) both;
}

.entrance-overlay.entrance-leaving {
  animation: entrance-field-out 900ms steps(8, end) both;
}

.entrance-overlay.entrance-leaving p {
  animation: entrance-whisper-out 900ms steps(8, end) both;
}

.entrance-overlay p {
  margin: 0;
  color: #ffe7ad;
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 900;
  line-height: 1.8;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(74, 35, 20, 0.72),
    0 0 30px rgba(255, 224, 150, 0.52);
  opacity: 0;
}

.hero-screen.is-entering-temple .hero-content {
  filter: brightness(0.9);
}

.hero-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(226, 204, 154, 0.3), transparent 20%),
    radial-gradient(ellipse at 50% 74%, rgba(153, 129, 91, 0.14), transparent 28%),
    linear-gradient(180deg, #152034 0%, #263246 42%, #342f2c 72%, #1d1c20 100%);
  animation: temple-breath 7600ms steps(10, end) infinite;
}

.hero-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.7;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(207, 210, 197, 0.1) 26%, transparent 42%),
    linear-gradient(90deg, transparent 54%, rgba(210, 204, 184, 0.08) 68%, transparent 84%),
    radial-gradient(circle, rgba(231, 216, 169, 0.34) 0 1px, transparent 2px) 18% 18% / 230px 260px,
    radial-gradient(circle, rgba(225, 224, 205, 0.2) 0 1px, transparent 2px) 80% 12% / 260px 300px;
  animation: courtyard-air-drift 18000ms steps(14, end) infinite;
  pointer-events: none;
}

.hero-content {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 28px 22px 30px;
  color: #fff1c8;
  background:
    linear-gradient(180deg, rgba(55, 52, 45, 0.34), rgba(29, 29, 31, 0.54)),
    rgba(35, 33, 31, 0.42);
  border: 3px solid rgba(174, 153, 108, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(230, 216, 176, 0.12),
    0 30px 90px rgba(10, 14, 22, 0.46),
    0 0 76px rgba(204, 184, 132, 0.14);
  backdrop-filter: blur(3px);
}

.hero-content::before,
.hero-content::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-content::before {
  left: 50%;
  bottom: calc(100% - 18px);
  width: 150px;
  height: 170px;
  translate: -50% 0;
  background:
    radial-gradient(ellipse at 52% 82%, rgba(221, 211, 180, 0.22), transparent 34%),
    linear-gradient(90deg, transparent 0 28%, rgba(225, 220, 196, 0.13) 28% 34%, transparent 34% 48%, rgba(221, 216, 194, 0.1) 48% 54%, transparent 54% 70%, rgba(225, 220, 196, 0.12) 70% 76%, transparent 76%);
  filter: blur(1.4px);
  animation: incense-drift 9000ms steps(10, end) infinite;
}

.hero-content::after {
  left: 24px;
  right: 24px;
  bottom: -16px;
  height: 7px;
  background: repeating-linear-gradient(90deg, rgba(86, 62, 48, 0.78) 0 18px, rgba(139, 119, 84, 0.74) 18px 36px);
  box-shadow: 0 0 22px rgba(201, 182, 128, 0.18);
}

.hero-content .eyebrow {
  min-height: 20px;
  color: transparent;
  font-size: 0;
}

.hero-content .eyebrow::after {
  content: "夜入神庙 · 静问本心";
  color: #f6d695;
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1 {
  color: #efe4c5;
  text-shadow:
    0 2px 0 rgba(44, 38, 32, 0.72),
    0 0 28px rgba(206, 193, 151, 0.32);
}

.hero-content .subtitle {
  color: transparent;
  font-size: 0;
}

.hero-content .subtitle::after {
  content: "请静心，再进入神庙。";
  display: block;
  color: #ffe7ad;
  font-size: 22px;
  line-height: 1.8;
  font-weight: 800;
  text-shadow: 0 0 22px rgba(255, 221, 130, 0.35);
}

.hero-content .seal {
  opacity: 0.78;
  filter: saturate(0.72) drop-shadow(0 0 22px rgba(211, 192, 135, 0.28));
  animation: seal-glow 6200ms steps(7, end) infinite;
}

.hero-content .primary-button {
  position: relative;
  width: min(280px, 100%);
  min-height: 66px;
  padding: 17px 24px;
  color: #fff0be;
  background:
    linear-gradient(180deg, #71604a 0%, #4b4338 52%, #292b2b 100%);
  border: 4px solid rgba(180, 156, 102, 0.76);
  box-shadow:
    inset 0 0 0 3px rgba(41, 36, 30, 0.62),
    0 7px 0 rgba(24, 25, 26, 0.86),
    0 0 30px rgba(199, 180, 120, 0.24);
  text-shadow: 0 2px 0 rgba(39, 34, 29, 0.84);
}

.hero-content .primary-button::before,
.hero-content .primary-button::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 15px;
  height: 15px;
  translate: 0 -50%;
  background: #d9c07b;
  box-shadow: 0 0 16px rgba(218, 195, 124, 0.48);
}

.hero-content .primary-button::before {
  left: 14px;
}

.hero-content .primary-button::after {
  right: 14px;
}

.hero-content .eyebrow,
.hero-content .subtitle {
  color: inherit;
  font-size: inherit;
}

.hero-content .eyebrow {
  margin-bottom: 8px;
  color: #d9c894;
  font-size: 13px;
  font-weight: 900;
}

.hero-content .eyebrow::after,
.hero-content .subtitle::after {
  content: none;
}

.hero-content .subtitle {
  color: #dfd4b2;
  font-size: 21px;
  line-height: 1.8;
  font-weight: 800;
  text-shadow: 0 0 22px rgba(210, 195, 148, 0.22);
}

.courtyard-status,
.courtyard-fortune {
  margin: 20px auto 0;
  padding: 16px;
  width: min(520px, 100%);
  text-align: left;
  background:
    linear-gradient(90deg, rgba(213, 204, 172, 0.08), transparent 16% 84%, rgba(213, 204, 172, 0.08)),
    rgba(29, 31, 33, 0.36);
  border: 2px solid rgba(169, 151, 111, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(222, 214, 184, 0.08),
    0 0 28px rgba(198, 181, 126, 0.08);
}

.courtyard-status span {
  display: block;
  margin-bottom: 6px;
  color: #c9b678;
  font-size: 13px;
  font-weight: 900;
}

.courtyard-status strong,
.courtyard-fortune strong {
  display: block;
  color: #ece2c5;
  font-size: 22px;
  line-height: 1.4;
}

.courtyard-status p,
.courtyard-fortune p {
  margin-top: 8px;
  color: #dcd0ae;
  line-height: 1.8;
  font-weight: 800;
}

.courtyard-actions {
  width: min(520px, 100%);
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
}

.hero-content .courtyard-actions .primary-button,
.hero-content .courtyard-actions .secondary-button,
.courtyard-status-button {
  width: 100%;
  min-width: 0;
}

.hero-content .courtyard-actions .secondary-button,
.courtyard-status-button {
  min-height: 58px;
  color: #fff0c5;
  background:
    linear-gradient(180deg, rgba(82, 72, 56, 0.86), rgba(41, 39, 35, 0.9));
  border: 3px solid rgba(171, 148, 97, 0.56);
  box-shadow:
    inset 0 0 0 2px rgba(39, 35, 30, 0.48),
    0 5px 0 rgba(24, 25, 25, 0.76),
    0 0 22px rgba(199, 180, 120, 0.1);
  text-shadow: 0 2px 0 rgba(38, 33, 28, 0.78);
}

.courtyard-fortune {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: center;
}

.courtyard-status-button {
  padding: 12px 14px;
}

.topbar,
.side-panel,
.records-list,
.result-panel,
.oracle-altar,
.bottom-nav {
  border-color: rgba(214, 158, 80, 0.54);
  box-shadow:
    inset 0 0 0 3px rgba(94, 48, 24, 0.28),
    0 16px 42px rgba(36, 18, 12, 0.28),
    0 0 32px rgba(255, 208, 105, 0.12);
}

.topbar {
  padding: 10px 12px;
  background: rgba(48, 25, 20, 0.54);
  border: 3px solid rgba(214, 158, 80, 0.38);
}

.brand {
  color: #fff0c5;
  text-shadow: 0 0 18px rgba(255, 213, 110, 0.26);
}

.nav-button {
  color: #fff0c5;
  background: rgba(82, 42, 25, 0.82);
  border-color: rgba(214, 158, 80, 0.52);
}

.nav-button.active {
  color: #3b2414;
  background: var(--gold);
}

.side-panel,
.records-list {
  background:
    linear-gradient(180deg, rgba(255, 238, 195, 0.92), rgba(232, 198, 137, 0.9));
}

body.time-deep-night {
  --shadow: rgba(6, 10, 22, 0.42);
  background:
    radial-gradient(circle at 50% 16%, rgba(199, 207, 232, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(9, 14, 28, 0.96), rgba(24, 24, 39, 0.94)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat fixed;
}

body.time-deep-night .hero-screen {
  background:
    linear-gradient(180deg, rgba(7, 12, 26, 0.72), rgba(22, 23, 38, 0.68)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat;
}

body.time-deep-night .hero-screen::before {
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 224, 155, 0.18), transparent 18%),
    radial-gradient(circle at 22% 72%, rgba(151, 166, 205, 0.15), transparent 14%),
    radial-gradient(circle at 78% 72%, rgba(221, 187, 118, 0.12), transparent 14%),
    linear-gradient(180deg, #071024 0%, #17172b 48%, #2a2131 100%);
  animation-duration: 7600ms;
}

body.time-deep-night .hero-screen::after {
  opacity: 0.32;
  background:
    radial-gradient(circle, rgba(239, 225, 174, 0.42) 0 1px, transparent 2px) 16% 18% / 260px 300px,
    radial-gradient(circle, rgba(214, 224, 255, 0.24) 0 1px, transparent 2px) 76% 16% / 310px 330px;
  animation-duration: 15000ms;
}

body.time-deep-night .hero-content,
body.time-deep-night .side-panel,
body.time-deep-night .records-list {
  background:
    linear-gradient(180deg, rgba(39, 35, 50, 0.86), rgba(24, 22, 34, 0.9));
  border-color: rgba(218, 185, 120, 0.42);
  box-shadow:
    inset 0 0 0 4px rgba(29, 25, 38, 0.66),
    0 24px 70px rgba(2, 5, 14, 0.58),
    0 0 62px rgba(255, 220, 145, 0.14);
}

body.time-deep-night .scene {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 224, 150, 0.2), transparent 22%),
    radial-gradient(circle at 18% 72%, rgba(130, 146, 190, 0.14), transparent 18%),
    radial-gradient(circle at 82% 72%, rgba(205, 173, 104, 0.1), transparent 18%),
    linear-gradient(180deg, #071126 0%, #17182d 50%, #231c2b 100%);
  box-shadow:
    0 24px 54px rgba(4, 8, 18, 0.56),
    inset 0 0 70px rgba(11, 15, 28, 0.42);
}

body.time-deep-night .scene::before {
  opacity: 0.42;
  background:
    radial-gradient(circle, rgba(246, 226, 172, 0.28) 0 1px, transparent 2px) 8% 20% / 260px 300px,
    linear-gradient(180deg, rgba(7, 11, 23, 0.22), rgba(11, 12, 22, 0.42));
}

body.time-deep-night .pixel-sun {
  background: #f3d999;
  box-shadow:
    0 0 0 10px rgba(255, 222, 150, 0.12),
    0 0 0 24px rgba(255, 222, 150, 0.08),
    0 0 58px rgba(255, 225, 160, 0.34);
  opacity: 0.62;
}

body.time-deep-night .pixel-cloud {
  background: rgba(210, 217, 235, 0.28);
  box-shadow:
    32px -18px 0 rgba(210, 217, 235, 0.26),
    72px -6px 0 rgba(210, 217, 235, 0.24);
}

body.time-deep-night .dragon-silhouette {
  opacity: 0.22;
  filter:
    blur(0.9px)
    drop-shadow(0 0 26px rgba(255, 222, 160, 0.16))
    drop-shadow(0 0 42px rgba(12, 16, 26, 0.5));
}

body.time-deep-night .dragon-wind-field {
  background:
    radial-gradient(ellipse at 54% 24%, rgba(24, 31, 48, 0.38), transparent 28%),
    linear-gradient(90deg, transparent, rgba(226, 211, 176, 0.07), transparent);
}

body.time-deep-night .lantern {
  box-shadow:
    0 0 18px rgba(255, 207, 115, 0.44),
    0 0 42px rgba(255, 207, 115, 0.16);
  opacity: 0.82;
}

body.time-deep-night .oracle-altar,
body.time-deep-night .ritual-altar {
  background: rgba(28, 25, 36, 0.8);
  border-color: rgba(255, 225, 160, 0.5);
  box-shadow:
    0 0 28px rgba(255, 218, 145, 0.24),
    inset 0 0 34px rgba(14, 15, 28, 0.32);
}

body.time-deep-night .jiao-stage::before {
  opacity: 0.56;
}

body.time-deep-night .blessing-light {
  opacity: 0.62;
  box-shadow:
    0 0 0 16px rgba(255, 221, 150, 0.12),
    0 0 0 38px rgba(255, 221, 150, 0.06),
    0 0 76px rgba(255, 229, 170, 0.48);
}

body.time-deep-night .blessing-particles span {
  opacity: 0.42;
}

body.time-dawn {
  --shadow: rgba(22, 26, 38, 0.34);
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 231, 175, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(38, 45, 66, 0.82), rgba(119, 78, 62, 0.78)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat fixed;
}

body.time-dawn .hero-screen::before,
body.time-dawn .scene {
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 226, 168, 0.36), transparent 22%),
    radial-gradient(circle at 18% 72%, rgba(190, 202, 216, 0.18), transparent 18%),
    linear-gradient(180deg, #30384f 0%, #77524e 52%, #3c2c32 100%);
}

body.time-dawn .hero-screen::after,
body.time-dawn .scene::before {
  opacity: 0.46;
}

body.time-dawn .pixel-sun {
  background: #ffe1a8;
  box-shadow:
    0 0 0 12px rgba(255, 226, 168, 0.18),
    0 0 0 30px rgba(236, 218, 190, 0.11),
    0 0 82px rgba(255, 232, 176, 0.46);
}

body.time-dawn .scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(240, 231, 207, 0.14) 28%, transparent 42%),
    linear-gradient(90deg, transparent 42%, rgba(240, 231, 207, 0.1) 56%, transparent 72%);
  filter: blur(2px);
  animation: incense-drift 9000ms steps(9, end) infinite;
}

body.time-day {
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 222, 142, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(71, 55, 42, 0.74), rgba(109, 59, 34, 0.76)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat fixed;
}

body.time-day .scene {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 224, 142, 0.62), transparent 24%),
    radial-gradient(circle at 18% 70%, rgba(255, 191, 95, 0.22), transparent 18%),
    radial-gradient(circle at 82% 72%, rgba(134, 184, 126, 0.14), transparent 18%),
    linear-gradient(180deg, #45405a 0%, #704238 46%, #332018 100%);
}

body.time-day .scene::before {
  opacity: 0.86;
  background:
    radial-gradient(circle, rgba(255, 229, 154, 0.62) 0 2px, transparent 3px) 8% 20% / 150px 160px,
    linear-gradient(180deg, rgba(255, 230, 174, 0.08), rgba(44, 24, 20, 0.24));
}

body.time-day .pixel-sun {
  opacity: 1;
  box-shadow:
    0 0 0 14px rgba(255, 222, 120, 0.28),
    0 0 0 34px rgba(255, 222, 120, 0.18),
    0 0 92px rgba(255, 231, 148, 0.78);
}

body.time-dusk {
  --shadow: rgba(49, 22, 18, 0.38);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 178, 88, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(45, 31, 48, 0.88), rgba(111, 52, 35, 0.84)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat fixed;
}

body.time-dusk .hero-screen::before,
body.time-dusk .scene {
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 177, 85, 0.46), transparent 23%),
    radial-gradient(circle at 20% 74%, rgba(255, 124, 74, 0.18), transparent 18%),
    radial-gradient(circle at 80% 70%, rgba(255, 214, 135, 0.16), transparent 20%),
    linear-gradient(180deg, #2a243b 0%, #704035 50%, #2a1b22 100%);
}

body.time-dusk .scene::before,
body.time-dusk .hero-screen::after {
  opacity: 0.55;
}

body.time-dusk .pixel-sun {
  background: #ffc069;
  box-shadow:
    0 0 0 12px rgba(255, 179, 91, 0.22),
    0 0 0 30px rgba(255, 152, 86, 0.12),
    0 0 84px rgba(255, 188, 102, 0.58);
}

body.time-dusk .time-whisper {
  background: rgba(65, 38, 35, 0.5);
  border-color: rgba(255, 199, 122, 0.42);
}

@keyframes temple-breath {
  0%,
  100% {
    opacity: 0.92;
    filter: saturate(0.96);
  }
  50% {
    opacity: 1;
    filter: saturate(1.12);
  }
}

@keyframes ember-fall {
  0% {
    background-position: 12% -20%, 86% -12%, 44% -8%;
    opacity: 0.4;
  }
  50% {
    opacity: 0.78;
  }
  100% {
    background-position: 12% 120%, 86% 110%, 44% 116%;
    opacity: 0.42;
  }
}

@keyframes courtyard-air-drift {
  0% {
    background-position: 0 0, 0 0, 18% -20%, 80% -12%;
    opacity: 0.5;
  }
  50% {
    opacity: 0.78;
  }
  100% {
    background-position: 8% 0, -8% 0, 18% 115%, 80% 108%;
    opacity: 0.52;
  }
}

@keyframes courtyard-mist {
  0%,
  100% {
    transform: translateX(-18px);
    opacity: 0.36;
  }
  50% {
    transform: translateX(18px);
    opacity: 0.62;
  }
}

@keyframes incense-drift {
  0% {
    transform: translateY(20px) scaleX(0.9);
    opacity: 0.18;
  }
  45% {
    opacity: 0.52;
  }
  100% {
    transform: translateY(-36px) scaleX(1.12);
    opacity: 0.08;
  }
}

@keyframes entrance-field-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes entrance-whisper-in {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }
  70% {
    opacity: 0.86;
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes entrance-whisper-out {
  0% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px);
    filter: blur(2px);
  }
}

@keyframes seal-glow {
  0%,
  100% {
    opacity: 0.9;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes lantern-breath {
  0%,
  100% {
    filter: brightness(0.92);
    opacity: 0.86;
  }
  50% {
    filter: brightness(1.12);
    opacity: 1;
  }
}

body.time-dawn .hero-screen,
body.time-day .hero-screen,
body.time-dusk .hero-screen,
body.time-deep-night .hero-screen {
  background:
    radial-gradient(ellipse at 50% 34%, rgba(223, 205, 162, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(17, 24, 38, 0.4), rgba(37, 41, 50, 0.28) 44%, rgba(30, 25, 24, 0.44)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat;
}

body.time-dawn .hero-screen::before {
  background:
    radial-gradient(ellipse at 50% 31%, rgba(226, 219, 190, 0.28), transparent 21%),
    radial-gradient(ellipse at 50% 72%, rgba(195, 202, 197, 0.12), transparent 30%),
    linear-gradient(180deg, #24314a 0%, #465161 46%, #56504a 74%, #27282b 100%);
}

body.time-day .hero-screen::before {
  background:
    radial-gradient(ellipse at 50% 32%, rgba(221, 204, 157, 0.3), transparent 22%),
    radial-gradient(ellipse at 50% 72%, rgba(148, 136, 103, 0.13), transparent 30%),
    linear-gradient(180deg, #25324a 0%, #4b554f 44%, #5a5346 74%, #292622 100%);
}

body.time-dusk .hero-screen::before {
  background:
    radial-gradient(ellipse at 50% 33%, rgba(216, 174, 112, 0.24), transparent 22%),
    radial-gradient(ellipse at 50% 72%, rgba(126, 105, 82, 0.16), transparent 30%),
    linear-gradient(180deg, #202943 0%, #3d414d 42%, #5a4a3d 74%, #252229 100%);
}

body.time-deep-night .hero-screen::before {
  background:
    radial-gradient(ellipse at 50% 33%, rgba(204, 197, 169, 0.18), transparent 22%),
    radial-gradient(ellipse at 50% 72%, rgba(102, 111, 132, 0.12), transparent 30%),
    linear-gradient(180deg, #071326 0%, #142039 44%, #252b38 74%, #151923 100%);
}

body.time-dawn .hero-screen::after,
body.time-day .hero-screen::after,
body.time-dusk .hero-screen::after,
body.time-deep-night .hero-screen::after {
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(207, 210, 197, 0.1) 26%, transparent 42%),
    linear-gradient(90deg, transparent 54%, rgba(210, 204, 184, 0.08) 68%, transparent 84%),
    radial-gradient(circle, rgba(231, 216, 169, 0.34) 0 1px, transparent 2px) 18% 18% / 230px 260px,
    radial-gradient(circle, rgba(225, 224, 205, 0.2) 0 1px, transparent 2px) 80% 12% / 260px 300px;
}

@media (max-width: 820px) {
  .hero-screen {
    padding: 18px 16px 6vh;
  }

  .hero-content {
    padding: 24px 18px 28px;
  }

  .hero-distance {
    bottom: 42%;
    width: min(560px, 92vw);
    opacity: 0.5;
  }

  .courtyard-pillar {
    width: 30px;
    opacity: 0.58;
  }

  .courtyard-banner {
    display: none;
  }

  .courtyard-incense {
    bottom: 10vh;
    scale: 0.82;
    opacity: 0.72;
  }

  .courtyard-floor-mark {
    bottom: 4vh;
    opacity: 0.36;
  }
}

@media (max-width: 520px) {
  .hero-screen {
    padding-bottom: 4vh;
  }

  .hero-distance {
    bottom: 50%;
    scale: 0.86;
  }

  .courtyard-pillar,
  .courtyard-incense,
  .courtyard-floor-mark {
    opacity: 0.34;
  }

  .courtyard-steps {
    width: 110vw;
    opacity: 0.46;
  }
}

/* Courtyard spatial pass */
.hero-content {
  background:
    linear-gradient(180deg, rgba(28, 31, 38, 0.24), rgba(27, 24, 23, 0.38)),
    rgba(22, 23, 27, 0.28);
  border-color: rgba(193, 171, 122, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(230, 216, 176, 0.08),
    0 38px 110px rgba(7, 9, 14, 0.38),
    0 0 92px rgba(210, 188, 125, 0.1);
  backdrop-filter: blur(1.5px);
}

.courtyard-status,
.courtyard-fortune {
  background:
    linear-gradient(90deg, rgba(222, 211, 174, 0.06), transparent 18% 82%, rgba(222, 211, 174, 0.05)),
    rgba(24, 23, 24, 0.34);
  border-color: rgba(180, 158, 108, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(235, 222, 185, 0.06),
    0 16px 40px rgba(7, 9, 14, 0.18);
}

.hero-content .courtyard-actions .primary-button,
.hero-content .courtyard-actions .secondary-button,
.courtyard-status-button {
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(88, 70, 48, 0.78), rgba(42, 37, 31, 0.9)),
    repeating-linear-gradient(90deg, rgba(235, 205, 125, 0.08) 0 2px, transparent 2px 18px);
  border-color: rgba(187, 154, 85, 0.48);
  box-shadow:
    inset 0 0 0 2px rgba(38, 33, 27, 0.38),
    0 6px 0 rgba(20, 19, 18, 0.66),
    0 20px 34px rgba(8, 9, 12, 0.2),
    0 0 20px rgba(204, 178, 108, 0.08);
}

.hero-content .courtyard-actions .primary-button {
  background:
    linear-gradient(180deg, rgba(104, 76, 45, 0.84), rgba(48, 38, 29, 0.96)),
    repeating-linear-gradient(90deg, rgba(238, 201, 108, 0.1) 0 3px, transparent 3px 20px);
}

/* Courtyard reference pass */
.hero-content {
  width: min(980px, 100%);
  min-height: 100vh;
  padding: clamp(28px, 5vh, 58px) 24px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  grid-template-rows: auto auto auto minmax(260px, 1fr) auto auto;
  gap: 12px 20px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-content::before {
  top: 78px;
  bottom: auto;
  width: 170px;
  height: 220px;
  opacity: 0.55;
}

.hero-content::after {
  inset: 0;
  z-index: -1;
  height: auto;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(230, 210, 158, 0.25), transparent 18%),
    radial-gradient(ellipse at 50% 50%, rgba(232, 188, 98, 0.1), transparent 20%),
    linear-gradient(180deg, rgba(5, 9, 16, 0.22), transparent 28%, transparent 64%, rgba(5, 5, 8, 0.42));
  box-shadow: none;
}

.hero-content .seal {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  width: 88px;
  height: 88px;
}

.hero-content .eyebrow {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  margin: 0;
}

.hero-content h1 {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: center;
  margin: 0;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-content .subtitle {
  grid-column: 1 / -1;
  grid-row: 4;
  justify-self: center;
  align-self: start;
  margin: 0;
}

.courtyard-status {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
  align-self: end;
  justify-self: start;
  width: min(330px, 100%);
  margin: 0 0 16px;
}

.courtyard-actions {
  grid-column: 1 / -1;
  grid-row: 5;
  width: min(760px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.courtyard-fortune {
  grid-column: 1 / -1;
  grid-row: 6;
  width: min(800px, 100%);
  justify-self: center;
  margin: 0 auto;
}

.courtyard-status,
.courtyard-fortune {
  background:
    linear-gradient(90deg, rgba(226, 212, 169, 0.08), transparent 18% 82%, rgba(226, 212, 169, 0.06)),
    rgba(18, 18, 20, 0.34);
  border: 1px solid rgba(190, 165, 103, 0.26);
  box-shadow:
    inset 0 0 0 1px rgba(237, 219, 174, 0.06),
    0 18px 44px rgba(3, 5, 9, 0.24);
  backdrop-filter: blur(1.5px);
}

.hero-content .courtyard-actions .primary-button,
.hero-content .courtyard-actions .secondary-button,
.courtyard-status-button {
  border-radius: 0;
  color: #f5dfaa;
  background:
    linear-gradient(180deg, rgba(92, 68, 43, 0.76), rgba(38, 32, 27, 0.92)),
    repeating-linear-gradient(90deg, rgba(235, 205, 125, 0.08) 0 2px, transparent 2px 18px);
  border: 1px solid rgba(199, 163, 86, 0.48);
  box-shadow:
    inset 0 0 0 2px rgba(38, 31, 25, 0.36),
    0 5px 0 rgba(17, 15, 14, 0.62),
    0 20px 34px rgba(6, 8, 12, 0.24),
    0 0 20px rgba(206, 174, 96, 0.08);
}

.hero-content .courtyard-actions .primary-button {
  background:
    linear-gradient(180deg, rgba(111, 78, 43, 0.82), rgba(48, 37, 28, 0.96)),
    repeating-linear-gradient(90deg, rgba(238, 201, 108, 0.1) 0 3px, transparent 3px 20px);
}

.hero-content .primary-button::before,
.hero-content .primary-button::after {
  width: 10px;
  height: 18px;
  opacity: 0.82;
}

@media (max-width: 820px) {
  .hero-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto minmax(190px, 1fr) auto auto;
    padding: 24px 16px 26px;
  }

  .hero-content .subtitle {
    grid-row: 4;
  }

  .courtyard-status {
    grid-column: 1;
    grid-row: 5;
    align-self: end;
    width: min(330px, 92%);
    margin-bottom: 10px;
  }

  .courtyard-actions {
    grid-column: 1;
    grid-row: 6;
  }

  .courtyard-fortune {
    grid-column: 1;
    grid-row: 7;
  }
}

@media (max-width: 520px) {
  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content .seal {
    width: 72px;
    height: 72px;
  }

  .courtyard-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Courtyard depth refinement */
.hero-screen {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(226, 196, 121, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(8, 15, 26, 0.18), rgba(16, 18, 24, 0.24) 44%, rgba(11, 10, 10, 0.52)),
    url("./assets/temple-pixel.svg") center bottom / cover no-repeat;
}

.hero-screen::before {
  z-index: -5;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(231, 192, 104, 0.28), transparent 17%),
    radial-gradient(ellipse at 50% 62%, rgba(209, 177, 109, 0.13), transparent 24%),
    radial-gradient(ellipse at 18% 60%, rgba(204, 211, 198, 0.16), transparent 20%),
    radial-gradient(ellipse at 82% 58%, rgba(204, 211, 198, 0.14), transparent 20%),
    linear-gradient(180deg, #071326 0%, #142035 42%, #282a2d 72%, #0c0c10 100%);
}

.hero-screen::after {
  z-index: -1;
  opacity: 0.82;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 0 30%, rgba(3, 5, 8, 0.18) 58%, rgba(2, 3, 5, 0.68) 100%),
    linear-gradient(90deg, rgba(2, 3, 5, 0.48), transparent 18% 82%, rgba(2, 3, 5, 0.5)),
    radial-gradient(circle, rgba(230, 215, 166, 0.34) 0 1px, transparent 2px) 18% 16% / 230px 260px,
    radial-gradient(circle, rgba(224, 220, 202, 0.17) 0 1px, transparent 2px) 80% 12% / 260px 300px;
}

.hero-distance {
  bottom: 35%;
  z-index: -3;
  width: min(760px, 88vw);
  height: 330px;
  opacity: 0.9;
  filter:
    saturate(0.72)
    brightness(0.82)
    drop-shadow(0 0 72px rgba(225, 191, 105, 0.24));
}

.hero-distance::before {
  bottom: -42vh;
  width: min(500px, 58vw);
  background:
    linear-gradient(90deg, transparent, rgba(213, 192, 137, 0.22) 45% 55%, transparent),
    repeating-linear-gradient(0deg, rgba(196, 178, 135, 0.14) 0 2px, transparent 2px 32px),
    linear-gradient(180deg, rgba(169, 151, 111, 0.2), rgba(78, 74, 67, 0.08) 45%, transparent);
}

.hero-distance::after {
  opacity: 0.72;
}

.distant-gate {
  width: clamp(310px, 36vw, 520px);
  height: clamp(190px, 22vw, 310px);
  background:
    linear-gradient(90deg, transparent 0 15%, rgba(73, 57, 43, 0.78) 15% 25%, transparent 25% 75%, rgba(73, 57, 43, 0.78) 75% 85%, transparent 85%),
    radial-gradient(ellipse at 50% 72%, rgba(221, 180, 89, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(132, 106, 74, 0.54) 0 22%, rgba(41, 38, 37, 0.76) 22% 100%);
  border-color: rgba(42, 39, 36, 0.68);
  box-shadow:
    inset 0 0 0 8px rgba(226, 186, 98, 0.04),
    0 0 86px rgba(214, 176, 89, 0.12);
}

.distant-light {
  bottom: 58px;
  opacity: 0.92;
}

.courtyard-architecture {
  z-index: -2;
}

.courtyard-pillar {
  width: clamp(42px, 7vw, 92px);
  opacity: 0.72;
  border-inline-color: rgba(176, 139, 76, 0.24);
}

.pillar-left {
  left: clamp(0px, 4.8vw, 70px);
}

.pillar-right {
  right: clamp(0px, 4.8vw, 70px);
}

.courtyard-banner {
  opacity: 0.46;
  height: min(31vh, 330px);
  border-color: rgba(178, 143, 75, 0.32);
}

.courtyard-incense {
  bottom: 30vh;
  opacity: 0.8;
}

.courtyard-floor-mark {
  bottom: 18vh;
  opacity: 0.38;
}

.hero-content {
  position: relative;
  z-index: 1;
}

body.time-dawn .hero-content,
body.time-day .hero-content,
body.time-dusk .hero-content,
body.time-deep-night .hero-content {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-content::after {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(235, 213, 158, 0.22), transparent 15%),
    radial-gradient(ellipse at 50% 48%, rgba(228, 180, 87, 0.1), transparent 21%),
    linear-gradient(180deg, rgba(4, 7, 12, 0.06), transparent 30%, transparent 70%, rgba(5, 5, 7, 0.18));
}

.courtyard-status,
.courtyard-fortune {
  background:
    linear-gradient(90deg, rgba(226, 212, 169, 0.06), transparent 18% 82%, rgba(226, 212, 169, 0.05)),
    rgba(13, 15, 17, 0.26);
  border-color: rgba(209, 177, 103, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(237, 219, 174, 0.04),
    0 18px 44px rgba(3, 5, 9, 0.18);
  backdrop-filter: blur(1px);
}

.hero-content .courtyard-actions .primary-button,
.hero-content .courtyard-actions .secondary-button,
.courtyard-status-button {
  min-height: 68px;
  background:
    linear-gradient(180deg, rgba(98, 74, 47, 0.64), rgba(36, 31, 27, 0.74)),
    linear-gradient(90deg, rgba(235, 201, 128, 0.08), transparent 26% 74%, rgba(235, 201, 128, 0.07)),
    repeating-linear-gradient(90deg, rgba(239, 214, 149, 0.06) 0 2px, transparent 2px 18px);
  border-color: rgba(205, 169, 92, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(235, 210, 151, 0.06),
    inset 0 -12px 20px rgba(20, 16, 13, 0.18),
    0 4px 0 rgba(14, 13, 12, 0.5),
    0 16px 28px rgba(4, 6, 10, 0.2);
}

.hero-content .courtyard-actions .primary-button {
  background:
    radial-gradient(ellipse at 18% 50%, rgba(245, 215, 126, 0.16), transparent 16%),
    radial-gradient(ellipse at 82% 50%, rgba(245, 215, 126, 0.14), transparent 16%),
    linear-gradient(180deg, rgba(115, 80, 43, 0.72), rgba(42, 32, 25, 0.84)),
    repeating-linear-gradient(90deg, rgba(238, 201, 108, 0.09) 0 3px, transparent 3px 20px);
}

@media (max-width: 820px) {
  .hero-distance {
    bottom: 40%;
    width: min(620px, 106vw);
    opacity: 0.82;
  }

  .courtyard-pillar,
  .courtyard-banner {
    opacity: 0.28;
  }

  .courtyard-incense {
    bottom: 33vh;
    scale: 0.82;
  }
}

@media (max-width: 520px) {
  .hero-distance {
    bottom: 43%;
    width: 116vw;
  }

  .courtyard-status,
  .courtyard-fortune {
    background: rgba(13, 15, 17, 0.34);
  }

  .hero-content .courtyard-actions .primary-button,
  .hero-content .courtyard-actions .secondary-button,
  .courtyard-status-button {
    min-height: 58px;
  }
}

/* Courtyard image integration */
.hero-screen {
  background:
    linear-gradient(180deg, rgba(5, 9, 16, 0.02), transparent 36%, rgba(3, 3, 4, 0.18)),
    url("./assets/home-temple-full-day.png") center top / auto 100% no-repeat,
    url("./assets/home-temple-full-day.png") center center / cover no-repeat;
}

body.time-dawn .hero-screen,
body.time-day .hero-screen,
body.time-dusk .hero-screen {
  background:
    linear-gradient(180deg, rgba(5, 9, 16, 0.02), transparent 36%, rgba(3, 3, 4, 0.18)),
    url("./assets/home-temple-full-day.png") center top / auto 100% no-repeat,
    url("./assets/home-temple-full-day.png") center center / cover no-repeat;
}

body.time-deep-night .hero-screen {
  background:
    linear-gradient(180deg, rgba(3, 6, 12, 0.04), transparent 38%, rgba(2, 2, 3, 0.2)),
    url("./assets/home-temple-full-night.png") center top / auto 100% no-repeat,
    url("./assets/home-temple-full-night.png") center center / cover no-repeat;
}

.hero-screen::before {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(242, 199, 102, 0.05), transparent 22%),
    linear-gradient(180deg, rgba(7, 14, 24, 0.04), transparent 34%, transparent 68%, rgba(3, 3, 4, 0.12));
}

body.time-dawn .hero-screen::before,
body.time-day .hero-screen::before,
body.time-dusk .hero-screen::before,
body.time-deep-night .hero-screen::before {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(242, 199, 102, 0.05), transparent 22%),
    linear-gradient(180deg, rgba(7, 14, 24, 0.04), transparent 34%, transparent 68%, rgba(3, 3, 4, 0.12));
}

.hero-screen::after {
  background:
    radial-gradient(ellipse at 50% 43%, transparent 0 40%, rgba(2, 3, 5, 0.1) 72%, rgba(1, 1, 2, 0.4) 100%),
    linear-gradient(90deg, rgba(1, 1, 2, 0.22), transparent 18% 82%, rgba(1, 1, 2, 0.24)),
    radial-gradient(circle, rgba(229, 213, 164, 0.2) 0 1px, transparent 2px) 18% 16% / 230px 260px,
    radial-gradient(circle, rgba(224, 220, 202, 0.12) 0 1px, transparent 2px) 80% 12% / 260px 300px;
}

body.time-dawn .hero-screen::after,
body.time-day .hero-screen::after,
body.time-dusk .hero-screen::after,
body.time-deep-night .hero-screen::after {
  background:
    radial-gradient(ellipse at 50% 43%, transparent 0 40%, rgba(2, 3, 5, 0.1) 72%, rgba(1, 1, 2, 0.4) 100%),
    linear-gradient(90deg, rgba(1, 1, 2, 0.22), transparent 18% 82%, rgba(1, 1, 2, 0.24)),
    radial-gradient(circle, rgba(229, 213, 164, 0.2) 0 1px, transparent 2px) 18% 16% / 230px 260px,
    radial-gradient(circle, rgba(224, 220, 202, 0.12) 0 1px, transparent 2px) 80% 12% / 260px 300px;
}

.hero-distance,
.courtyard-pillar,
.courtyard-banner,
.courtyard-incense,
.courtyard-floor-mark {
  opacity: 0;
}

.hero-content::after {
  display: none;
}

.hero-content {
  grid-template-rows: auto auto auto minmax(330px, 1fr) auto auto;
}

.hero-content .seal {
  background: rgba(64, 28, 21, 0.38);
  box-shadow:
    0 0 0 1px rgba(238, 207, 140, 0.22),
    0 0 36px rgba(236, 200, 114, 0.28);
}

.hero-content h1 {
  text-shadow:
    0 2px 0 rgba(42, 26, 17, 0.68),
    0 0 34px rgba(246, 222, 168, 0.22);
}

.hero-content .subtitle {
  text-shadow:
    0 1px 0 rgba(20, 14, 10, 0.72),
    0 0 22px rgba(245, 220, 164, 0.18);
}

.courtyard-status,
.courtyard-fortune {
  background:
    linear-gradient(90deg, rgba(241, 220, 159, 0.08), transparent 18% 82%, rgba(241, 220, 159, 0.06)),
    rgba(10, 12, 13, 0.28);
  border: 1px solid rgba(225, 190, 111, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(246, 222, 168, 0.05),
    0 14px 42px rgba(0, 0, 0, 0.18);
}

.courtyard-actions {
  width: min(760px, 92%);
}

.hero-content .courtyard-actions .primary-button,
.hero-content .courtyard-actions .secondary-button,
.courtyard-status-button {
  background:
    linear-gradient(180deg, rgba(91, 65, 38, 0.62), rgba(29, 25, 20, 0.74)),
    linear-gradient(90deg, rgba(235, 201, 128, 0.1), transparent 28% 72%, rgba(235, 201, 128, 0.08)),
    repeating-linear-gradient(90deg, rgba(239, 214, 149, 0.06) 0 2px, transparent 2px 20px);
  border-color: rgba(224, 184, 98, 0.32);
  color: #f8e4b6;
  text-shadow: 0 2px 0 rgba(38, 22, 12, 0.58);
}

.hero-content .courtyard-actions .primary-button:hover,
.hero-content .courtyard-actions .secondary-button:hover,
.courtyard-status-button:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 203, 119, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(250, 225, 158, 0.08),
    inset 0 -12px 20px rgba(20, 16, 13, 0.14),
    0 5px 0 rgba(14, 13, 12, 0.5),
    0 18px 34px rgba(4, 6, 10, 0.24),
    0 0 24px rgba(231, 188, 92, 0.12);
}

@media (max-width: 820px) {
  .hero-screen,
  body.time-dawn .hero-screen,
  body.time-day .hero-screen,
  body.time-dusk .hero-screen,
  body.time-deep-night .hero-screen {
    background-position: center top;
  }

  .hero-content {
    grid-template-rows: auto auto auto minmax(300px, 1fr) auto auto;
  }
}

@media (max-width: 520px) {
  .hero-screen,
  body.time-dawn .hero-screen,
  body.time-day .hero-screen,
  body.time-dusk .hero-screen,
  body.time-deep-night .hero-screen {
    background-size: auto 100%, cover;
    background-position: center top;
  }

  .hero-content {
    min-height: 100svh;
    grid-template-rows: auto auto auto minmax(280px, 1fr) auto auto;
  }

  .courtyard-status {
    width: min(310px, 92%);
  }
}

/* Full original temple background pass */
.hero-content {
  padding: clamp(18px, 3.5vh, 40px) 24px 28px;
  grid-template-rows: auto auto auto minmax(420px, 1fr) auto auto;
}

.hero-content .seal {
  width: 62px;
  height: 62px;
}

.hero-content h1 {
  font-size: clamp(34px, 5.8vw, 56px);
}

.courtyard-status {
  width: min(310px, 100%);
  margin: 0 0 14px;
}

.courtyard-fortune {
  width: min(760px, 100%);
}

.courtyard-status,
.courtyard-fortune {
  background:
    linear-gradient(90deg, rgba(241, 220, 159, 0.05), transparent 18% 82%, rgba(241, 220, 159, 0.04)),
    rgba(8, 9, 10, 0.16);
  border-color: rgba(225, 190, 111, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(246, 222, 168, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.14);
}

.hero-content .courtyard-actions .primary-button,
.hero-content .courtyard-actions .secondary-button,
.courtyard-status-button {
  min-height: 58px;
  background:
    linear-gradient(180deg, rgba(91, 65, 38, 0.48), rgba(29, 25, 20, 0.58)),
    linear-gradient(90deg, rgba(235, 201, 128, 0.08), transparent 28% 72%, rgba(235, 201, 128, 0.07)),
    repeating-linear-gradient(90deg, rgba(239, 214, 149, 0.05) 0 2px, transparent 2px 20px);
  border-color: rgba(224, 184, 98, 0.26);
}

@media (max-width: 820px) {
  .hero-content {
    grid-template-rows: auto auto auto minmax(390px, 1fr) auto auto;
  }
}

@media (max-width: 520px) {
  .hero-content {
    grid-template-rows: auto auto auto minmax(360px, 1fr) auto auto;
    padding-inline: 14px;
  }
}
