:root {
  color-scheme: dark;
  --bg: #11110f;
  --panel: #211c18;
  --panel-2: #2b2621;
  --text: #f4eee6;
  --muted: #b8ada2;
  --line: rgba(244, 238, 230, 0.14);
  --gold: #d8a657;
  --gold-2: #f2c46f;
  --green: #83b88b;
  --blue: #9bbad2;
  --red: #d9826b;
  --shadow: 0 22px 68px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(216, 166, 87, 0.2), transparent 30rem),
    radial-gradient(circle at 82% 0%, rgba(155, 186, 210, 0.15), transparent 28rem),
    linear-gradient(135deg, #11110f 0%, #201916 48%, #101314 100%);
  color: var(--text);
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  position: relative;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 88px;
}

.app-shell::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 0;
  z-index: -1;
  width: min(820px, 82vw);
  height: 100vh;
  background:
    linear-gradient(180deg, transparent, rgba(255, 241, 176, 0.18) 18%, rgba(242, 196, 111, 0.09) 44%, transparent 78%),
    radial-gradient(ellipse at 50% 50%, rgba(242, 196, 111, 0.08), transparent 60%);
  opacity: 0.22;
  filter: blur(34px);
  transform: translateX(-50%);
  pointer-events: none;
}

.fate-thread {
  position: fixed;
  right: max(14px, calc((100vw - 1440px) / 2 + 18px));
  top: 50%;
  z-index: 26;
  display: grid;
  gap: 18px;
  transform: translateY(-50%);
  pointer-events: none;
}

.fate-thread-line {
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(242, 196, 111, 0.38), transparent);
  transform: translateX(-50%);
}

.fate-thread span:not(.fate-thread-line) {
  position: relative;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(242, 196, 111, 0.28);
  border-radius: 50%;
  background: rgba(9, 9, 10, 0.78);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.34);
  transition:
    transform 240ms ease,
    border-color 240ms ease,
    background-color 240ms ease,
    box-shadow 240ms ease;
}

.fate-thread span.is-awake {
  border-color: rgba(255, 241, 176, 0.72);
  background: rgba(242, 196, 111, 0.62);
  box-shadow:
    0 0 0 5px rgba(242, 196, 111, 0.08),
    0 0 24px rgba(242, 196, 111, 0.44);
}

.fate-thread span.is-current {
  transform: scale(1.42);
  border-color: rgba(255, 241, 176, 0.96);
  background: #fff1b0;
  box-shadow:
    0 0 0 6px rgba(242, 196, 111, 0.12),
    0 0 36px rgba(255, 241, 176, 0.64);
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 56px);
  min-height: calc(100vh - 64px);
  padding: 48px 0 34px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -32px calc(50% - 50vw);
  background:
    linear-gradient(180deg, rgba(17, 17, 15, 0.02), rgba(17, 17, 15, 0.08) 58%, rgba(17, 17, 15, 0.42)),
    radial-gradient(circle at 50% 42%, rgba(242, 196, 111, 0.07), transparent 38rem),
    url("/assets/hero/tarot-ritual-bg.png") center / cover no-repeat;
  opacity: 1;
  filter: saturate(1.1) contrast(1.04);
}

.hero > div:not(.hero-sundial) {
  position: relative;
  z-index: 2;
}

.meteor-field {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.meteor-field span {
  position: absolute;
  left: 78%;
  top: 14%;
  width: clamp(92px, 13vw, 190px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.94) 58%, rgba(255, 255, 255, 0.96));
  box-shadow:
    0 0 14px rgba(242, 196, 111, 0.7),
    0 0 34px rgba(242, 196, 111, 0.24);
  opacity: 0;
  transform: rotate(111deg) translateX(0);
  transform-origin: right center;
  animation: meteor-sweep 7.2s ease-in-out infinite;
}

.meteor-field span::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff4c4;
  box-shadow:
    0 0 16px rgba(255, 241, 176, 0.86),
    0 0 34px rgba(242, 196, 111, 0.42);
  transform: translateY(-50%);
}

.meteor-field span:nth-child(2) {
  left: 86%;
  top: 28%;
  width: clamp(74px, 10vw, 140px);
  opacity: 0;
  filter: brightness(0.82);
  animation-delay: 2.4s;
  animation-duration: 8.6s;
}

.meteor-field span:nth-child(3) {
  left: 70%;
  top: 4%;
  width: clamp(54px, 8vw, 112px);
  opacity: 0;
  filter: brightness(0.7);
  animation-delay: 4.9s;
  animation-duration: 9.8s;
}

.hero-sundial {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 55%;
  width: min(82vw, 980px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.34;
  transform: translate(-50%, -54%) rotate(-12deg);
  background:
    radial-gradient(circle, transparent 0 18%, rgba(242, 196, 111, 0.11) 18.2% 18.6%, transparent 18.8% 34%),
    radial-gradient(circle, transparent 0 47%, rgba(242, 196, 111, 0.14) 47.2% 47.8%, transparent 48% 62%),
    radial-gradient(circle, transparent 0 71%, rgba(242, 196, 111, 0.1) 71.2% 71.8%, transparent 72%),
    repeating-conic-gradient(from -10deg, rgba(242, 196, 111, 0.2) 0deg 0.65deg, transparent 0.7deg 15deg),
    conic-gradient(from 190deg, transparent 0deg 38deg, rgba(242, 196, 111, 0.14) 42deg 48deg, transparent 52deg 360deg);
  filter: blur(0.2px);
  pointer-events: none;
}

.hero-sundial::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 241, 176, 0.86), rgba(216, 166, 87, 0.08));
  box-shadow: 0 0 28px rgba(242, 196, 111, 0.28);
  transform: translate(-50%, -92%) rotate(28deg);
  transform-origin: 50% 100%;
}

.hero-sundial::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 196, 111, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 241, 176, 0.36) 0 5%, transparent 6%),
    radial-gradient(circle, rgba(216, 166, 87, 0.08), transparent 68%);
  box-shadow:
    0 0 44px rgba(242, 196, 111, 0.12),
    inset 0 0 28px rgba(242, 196, 111, 0.08);
  transform: translate(-50%, -50%);
}

@keyframes meteor-sweep {
  0%,
  54% {
    opacity: 0;
    transform: rotate(111deg) translateX(0);
  }

  59% {
    opacity: 0.86;
  }

  70% {
    opacity: 0;
    transform: rotate(111deg) translateX(520px);
  }

  100% {
    opacity: 0;
    transform: rotate(111deg) translateX(520px);
  }
}

.eyebrow {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border: 1px solid rgba(242, 196, 111, 0.34);
  border-radius: 50%;
  background: rgba(216, 166, 87, 0.1);
  color: var(--gold-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  box-shadow:
    0 0 24px rgba(242, 196, 111, 0.24),
    inset 0 0 18px rgba(242, 196, 111, 0.08);
}

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

h1 {
  max-width: 800px;
  margin: 0 auto 18px;
  font-size: clamp(3rem, 7.4vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro {
  max-width: 690px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

.module {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(33, 28, 24, 0.78);
  box-shadow: var(--shadow);
}

.hero-cards {
  position: relative;
  width: min(520px, 86vw);
  min-height: clamp(230px, 34vw, 390px);
  margin-top: 0;
}

.hero-cards span,
.empty-spread span::before {
  background:
    radial-gradient(circle at 50% 28%, rgba(242, 196, 111, 0.36), transparent 18%),
    linear-gradient(145deg, rgba(216, 166, 87, 0.38), rgba(155, 186, 210, 0.18)),
    #211c18;
}

.hero-cards span {
  position: absolute;
  top: 12px;
  left: 50%;
  width: clamp(122px, 15vw, 190px);
  aspect-ratio: 2 / 3.35;
  border: 1px solid rgba(242, 196, 111, 0.38);
  border-radius: 8px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
  transform-origin: center 110%;
}

.hero-cards span::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(244, 238, 230, 0.2);
  border-radius: 6px;
}

.hero-cards span:nth-child(1) {
  transform: translateX(-82%) rotate(-12deg);
}

.hero-cards span:nth-child(2) {
  z-index: 1;
  transform: translateX(-50%) translateY(-14px);
}

.hero-cards span:nth-child(3) {
  transform: translateX(-18%) rotate(12deg);
}

.module-flow {
  position: absolute;
  left: 50%;
  top: -34px;
  z-index: 3;
  width: min(520px, 62vw);
  height: 68px;
  opacity: 0.18;
  transform: translateX(-50%);
  pointer-events: none;
}

.module-flow::before,
.module-flow::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.module-flow::before {
  top: 0;
  width: 1px;
  height: 68px;
  background: linear-gradient(180deg, transparent, rgba(255, 241, 176, 0.76), rgba(242, 196, 111, 0.2), transparent);
  box-shadow: 0 0 18px rgba(242, 196, 111, 0.4);
}

.module-flow::after {
  bottom: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 241, 176, 0.78);
  box-shadow:
    0 0 16px rgba(255, 241, 176, 0.74),
    0 0 34px rgba(242, 196, 111, 0.36);
}

.hero-flow {
  top: auto;
  bottom: -34px;
  opacity: 0.32;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}

.workspace::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  bottom: -38px;
  z-index: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(242, 196, 111, 0.34), rgba(255, 241, 176, 0.09) 45%, rgba(242, 196, 111, 0.24));
  box-shadow: 0 0 18px rgba(242, 196, 111, 0.18);
  transform: translateX(-50%);
  pointer-events: none;
}

.module {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 24px;
  padding: clamp(28px, 5vw, 72px);
}

.module.is-current {
  border-color: rgba(242, 196, 111, 0.32);
  box-shadow:
    0 0 0 1px rgba(255, 241, 176, 0.035),
    0 0 48px rgba(242, 196, 111, 0.08),
    var(--shadow);
}

.module.is-awake .module-heading span,
.hero.is-awake .eyebrow {
  border-color: rgba(255, 241, 176, 0.52);
  background:
    radial-gradient(circle, rgba(255, 241, 176, 0.32), rgba(216, 166, 87, 0.14) 58%, rgba(0, 0, 0, 0.14));
  box-shadow:
    0 0 0 5px rgba(242, 196, 111, 0.07),
    0 0 34px rgba(242, 196, 111, 0.24),
    inset 0 0 18px rgba(242, 196, 111, 0.08);
}

.module.is-current .module-flow,
.module.is-awake .module-flow,
.hero.is-awake .module-flow {
  opacity: 0.72;
  animation: fate-flow-pulse 1700ms ease-in-out infinite alternate;
}

.question-module,
.camera-module {
  grid-column: auto;
}

.deck-module,
.reading-module,
.calendar-module {
  grid-column: auto;
}

.deck-module {
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 74%, rgba(242, 196, 111, 0.16), transparent 28rem),
    radial-gradient(circle at 18% 18%, rgba(155, 186, 210, 0.07), transparent 24rem),
    linear-gradient(180deg, rgba(7, 8, 13, 0.9), rgba(28, 22, 16, 0.82)),
    rgba(33, 28, 24, 0.78);
}

.deck-module::before,
.deck-module::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.deck-module::before {
  left: 50%;
  bottom: 8%;
  width: min(980px, 104vw);
  height: min(360px, 46vw);
  border-radius: 50%;
  border: 1px solid rgba(242, 196, 111, 0.16);
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0 40%, rgba(242, 196, 111, 0.1) 40.4% 41%, transparent 41.4%),
    linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.11), transparent);
  box-shadow:
    inset 0 0 58px rgba(242, 196, 111, 0.05),
    0 0 72px rgba(242, 196, 111, 0.08);
  transform: translateX(-50%) perspective(900px) rotateX(62deg);
}

.deck-module::after {
  left: 50%;
  right: auto;
  bottom: 34%;
  width: min(720px, 72vw);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.85), rgba(242, 196, 111, 0.38), transparent);
  opacity: 0;
  box-shadow: 0 0 28px rgba(242, 196, 111, 0.44);
  transform: translateX(-50%) scaleX(0.2);
  transform-origin: center;
}

body[data-ritual-phase="cards"] .deck-module::after,
body[data-ritual-phase="reading"] .deck-module::after,
body[data-ritual-phase="journal"] .deck-module::after {
  animation: spread-constellation-line 920ms ease both;
}

.deck-module > * {
  position: relative;
  z-index: 1;
}

.reading-module {
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 241, 176, 0.08), transparent 22rem),
    radial-gradient(circle at 82% 20%, rgba(155, 186, 210, 0.07), transparent 28rem),
    linear-gradient(180deg, rgba(10, 12, 18, 0.9), rgba(28, 23, 18, 0.84)),
    rgba(33, 28, 24, 0.78);
}

.reading-module::before,
.reading-module::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.reading-module::before {
  right: max(-260px, -16vw);
  top: 50%;
  width: min(880px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 16%, rgba(242, 196, 111, 0.08) 16.2% 16.8%, transparent 17% 32%),
    radial-gradient(circle, transparent 0 48%, rgba(242, 196, 111, 0.1) 48.2% 48.8%, transparent 49% 64%),
    radial-gradient(circle, transparent 0 76%, rgba(255, 241, 176, 0.09) 76.2% 76.7%, transparent 77%),
    repeating-conic-gradient(from -11deg, rgba(242, 196, 111, 0.28) 0deg 0.6deg, transparent 0.8deg 10deg),
    conic-gradient(from 20deg, transparent, rgba(242, 196, 111, 0.12), transparent 38%, rgba(155, 186, 210, 0.08), transparent 72%);
  opacity: 0.42;
  filter: drop-shadow(0 0 42px rgba(242, 196, 111, 0.14));
  transform: translateY(-50%) rotate(-14deg);
}

.reading-module::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(242, 196, 111, 0.16) 8.2% 8.35%, transparent 8.6% 24%, rgba(242, 196, 111, 0.12) 24.2% 24.35%, transparent 24.6% 100%),
    linear-gradient(115deg, transparent 0 36%, rgba(242, 196, 111, 0.13) 36.1% 36.28%, transparent 36.45% 100%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 241, 176, 0.08), transparent 56%),
    linear-gradient(180deg, transparent, rgba(3, 4, 6, 0.52) 42%, rgba(4, 4, 5, 0.82));
  opacity: 0.74;
}

.reading-module > * {
  position: relative;
  z-index: 1;
}

.module-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.module-heading span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(216, 166, 87, 0.16);
  color: var(--gold-2);
  font-size: 0.92rem;
  font-weight: 800;
}

.module-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.98;
}

.camera-ritual-hint {
  margin: -8px 0 18px;
  color: rgba(247, 214, 154, 0.76);
  font-size: 0.92rem;
  line-height: 1.6;
  text-shadow: 0 0 18px rgba(216, 166, 87, 0.2);
}

.camera-gate-note {
  position: relative;
  width: fit-content;
  max-width: 680px;
  margin: -8px 0 18px;
  border: 1px solid rgba(242, 196, 111, 0.22);
  border-radius: 999px;
  padding: 8px 14px 8px 34px;
  background:
    linear-gradient(90deg, rgba(242, 196, 111, 0.12), transparent 74%),
    rgba(8, 9, 12, 0.32);
  color: rgba(244, 238, 230, 0.68);
  font-size: 0.82rem;
  line-height: 1.5;
}

.camera-gate-note::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(242, 196, 111, 0.88);
  box-shadow: 0 0 16px rgba(242, 196, 111, 0.48);
  transform: translateY(-50%);
}

.wechat-camera-note {
  position: relative;
  width: fit-content;
  max-width: 720px;
  margin: -6px 0 18px;
  border: 1px solid rgba(155, 186, 210, 0.22);
  border-radius: 999px;
  padding: 8px 15px;
  background:
    linear-gradient(90deg, rgba(155, 186, 210, 0.12), transparent 76%),
    rgba(8, 9, 12, 0.34);
  color: rgba(225, 233, 238, 0.74);
  font-size: 0.8rem;
  line-height: 1.5;
}

.question-module {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(420px, 1.22fr);
  align-items: center;
  gap: clamp(22px, 5vw, 72px);
  border-color: rgba(242, 196, 111, 0.18);
  background:
    radial-gradient(ellipse at 70% 74%, rgba(255, 241, 176, 0.1), transparent 29rem),
    radial-gradient(circle at 17% 31%, rgba(242, 196, 111, 0.12), transparent 30rem),
    radial-gradient(circle at 84% 14%, rgba(155, 186, 210, 0.09), transparent 25rem),
    linear-gradient(145deg, rgba(10, 10, 12, 0.98), rgba(21, 17, 16, 0.96) 48%, rgba(7, 9, 12, 0.96));
}

.question-module::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(162deg, rgba(255, 255, 255, 0.07), transparent 12%, rgba(255, 255, 255, 0.018) 39%, transparent 69%),
    repeating-linear-gradient(116deg, transparent 0 38px, rgba(255, 255, 255, 0.028) 39px, transparent 42px),
    repeating-linear-gradient(17deg, transparent 0 72px, rgba(242, 196, 111, 0.025) 73px, transparent 75px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(0, 0, 0, 0.32));
  opacity: 0.82;
}

.question-module::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 7%;
  right: 7%;
  bottom: 0;
  height: 43%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(242, 196, 111, 0.18), transparent 48%),
    linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.08), transparent),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.34));
  opacity: 0.86;
  pointer-events: none;
}

.question-module .module-heading {
  grid-column: 1;
  align-self: center;
  max-width: 520px;
  position: relative;
  z-index: 2;
  padding-top: 30px;
}

.question-module .module-heading span {
  align-self: flex-start;
  margin-top: 0.28em;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(242, 196, 111, 0.28);
  background:
    radial-gradient(circle, rgba(242, 196, 111, 0.25), rgba(216, 166, 87, 0.1) 58%, rgba(0, 0, 0, 0.14));
  box-shadow:
    0 0 34px rgba(242, 196, 111, 0.14),
    inset 0 0 18px rgba(242, 196, 111, 0.08);
}

.question-module .module-heading::after {
  content: "";
  position: absolute;
  left: 86px;
  top: 62px;
  width: min(270px, 46vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 241, 176, 0.84), rgba(242, 196, 111, 0.18), transparent);
  box-shadow: 0 0 18px rgba(242, 196, 111, 0.26);
}

.ritual-heading {
  gap: 22px;
}

.ritual-heading h2 {
  text-shadow: 0 0 30px rgba(242, 196, 111, 0.12);
}

.ritual-heading p {
  max-width: 420px;
  margin: 16px 0 0;
  color: rgba(247, 214, 154, 0.72);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.8;
}

.ritual-sundial {
  position: absolute;
  z-index: -1;
  left: -18%;
  top: 45%;
  width: min(68vw, 920px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.19;
  transform: translateY(-50%) rotate(-16deg);
  background:
    radial-gradient(circle, transparent 0 15%, rgba(242, 196, 111, 0.24) 15.2% 15.7%, transparent 16% 31%, rgba(242, 196, 111, 0.14) 31.2% 31.7%, transparent 32% 45%),
    radial-gradient(circle, transparent 0 55%, rgba(242, 196, 111, 0.22) 55.2% 55.8%, transparent 56%),
    repeating-conic-gradient(from -12deg, rgba(242, 196, 111, 0.52) 0deg 0.58deg, transparent 0.86deg 8deg),
    conic-gradient(from 20deg, transparent 0deg 22deg, rgba(242, 196, 111, 0.24) 24deg 26deg, transparent 28deg 360deg);
  filter: blur(0.2px);
  pointer-events: none;
}

.ritual-sundial::before,
.ritual-sundial::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(242, 196, 111, 0.28);
  border-radius: 50%;
}

.ritual-sundial::before {
  inset: 18%;
}

.ritual-sundial::after {
  inset: 35%;
}

.ritual-circuit {
  position: absolute;
  z-index: 1;
  left: 47%;
  right: 7%;
  bottom: 10px;
  height: 174px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 22px rgba(242, 196, 111, 0.36));
}

.ritual-circuit::before,
.ritual-circuit::after {
  content: "";
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 1), rgba(242, 196, 111, 0.62), transparent);
  box-shadow:
    0 0 16px rgba(255, 241, 176, 0.52),
    0 0 34px rgba(242, 196, 111, 0.28);
}

.ritual-circuit::before {
  left: 0;
  right: 9%;
  top: 20px;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
}

.ritual-circuit::after {
  right: 9%;
  top: 20px;
  width: 3px;
  height: 156px;
  background: linear-gradient(180deg, rgba(255, 241, 176, 1), rgba(242, 196, 111, 0.58), transparent);
  transform: scaleY(0);
  transform-origin: top center;
}

.question-module.question-submitted .ritual-circuit {
  opacity: 1;
}

.question-module.question-submitted .ritual-circuit::before {
  animation: ritual-line-flow 1050ms ease both;
}

.question-module.question-submitted .ritual-circuit::after {
  animation: ritual-drop-flow 740ms ease 740ms both;
}

.ritual-desk {
  grid-column: 2;
  position: relative;
  z-index: 2;
  display: grid;
  gap: 22px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(242, 196, 111, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 25% 0%, rgba(255, 241, 176, 0.13), transparent 17rem),
    radial-gradient(circle at 86% 96%, rgba(155, 186, 210, 0.09), transparent 15rem),
    linear-gradient(118deg, rgba(255, 255, 255, 0.045), transparent 20%, rgba(255, 255, 255, 0.018) 44%, transparent 70%),
    linear-gradient(145deg, rgba(5, 6, 9, 0.9), rgba(30, 25, 22, 0.78));
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.06),
    inset 0 0 92px rgba(0, 0, 0, 0.42),
    0 44px 105px rgba(0, 0, 0, 0.34);
}

.ritual-desk::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(242, 196, 111, 0.12);
  border-radius: 6px;
  background:
    radial-gradient(circle at 18% 40%, rgba(255, 241, 176, 0.045), transparent 12rem),
    linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.055) 28%, transparent 39%),
    repeating-linear-gradient(18deg, transparent 0 42px, rgba(255, 255, 255, 0.028) 43px, transparent 45px),
    repeating-linear-gradient(102deg, transparent 0 86px, rgba(242, 196, 111, 0.03) 87px, transparent 89px);
  pointer-events: none;
}

.ritual-desk::after {
  content: "✦  ♄  ☉  ♃  ✧";
  position: absolute;
  right: clamp(18px, 3vw, 34px);
  top: 14px;
  color: rgba(255, 241, 176, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.question-field {
  position: relative;
  display: grid;
  gap: 12px;
}

.question-field::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 36px 0 0;
  border-radius: 8px;
  border: 1px solid transparent;
  pointer-events: none;
}

.question-field:focus-within::before {
  border-color: rgba(255, 241, 176, 0.28);
  clip-path: inset(0 100% 0 0);
  animation: inscription-edge-sweep 1100ms ease both;
  box-shadow: 0 0 34px rgba(242, 196, 111, 0.18);
}

.question-field span {
  color: rgba(244, 238, 230, 0.78);
  font-size: 1.04rem;
  font-weight: 800;
}

.question-field span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgba(242, 196, 111, 0.84);
  box-shadow: 0 0 18px rgba(242, 196, 111, 0.52);
}

.question-field::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.95), transparent);
  opacity: 0;
  transform: scaleX(0);
  pointer-events: none;
}

.question-module.question-submitted .question-field::after {
  animation: inscription-flow 900ms ease both;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 230px;
  border: 1px solid rgba(242, 196, 111, 0.34);
  border-radius: 8px;
  padding: 20px 22px;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(242, 196, 111, 0.035) 12.2% 12.7%, transparent 13% 100%),
    radial-gradient(circle at 50% 0%, rgba(255, 241, 176, 0.1), transparent 15rem),
    repeating-linear-gradient(156deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 34px),
    linear-gradient(145deg, rgba(6, 7, 10, 0.92), rgba(25, 22, 20, 0.8));
  color: rgba(244, 238, 230, 0.94);
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.04),
    inset 0 18px 56px rgba(0, 0, 0, 0.32),
    inset 0 -14px 30px rgba(255, 241, 176, 0.035),
    0 24px 54px rgba(0, 0, 0, 0.28);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(1.12rem, 1.55vw, 1.42rem);
  line-height: 1.65;
  caret-color: var(--gold-2);
}

textarea::placeholder {
  color: rgba(244, 238, 230, 0.42);
}

textarea:focus {
  border-color: rgba(242, 196, 111, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.14),
    inset 0 18px 56px rgba(0, 0, 0, 0.3),
    inset 0 -14px 30px rgba(255, 241, 176, 0.04),
    0 0 0 1px rgba(242, 196, 111, 0.22),
    0 0 52px rgba(242, 196, 111, 0.2);
  animation: inscription-focus 1180ms ease;
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 0;
}

.prompt-suggestions button {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  border: 1px solid rgba(242, 196, 111, 0.44);
  border-radius: 8px;
  padding: 0 clamp(18px, 1.8vw, 26px);
  background:
    linear-gradient(180deg, rgba(255, 241, 176, 0.08), transparent 42%),
    linear-gradient(145deg, rgba(242, 196, 111, 0.1), rgba(0, 0, 0, 0.1)),
    rgba(28, 22, 17, 0.82);
  color: var(--text);
  cursor: pointer;
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  font-weight: 800;
  box-shadow:
    inset 0 -9px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 241, 176, 0.08),
    0 14px 28px rgba(0, 0, 0, 0.16);
  transition:
    transform 150ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.prompt-suggestions button::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(242, 196, 111, 0.12);
  border-radius: 5px;
  pointer-events: none;
}

.prompt-suggestions button::after {
  content: "";
  position: absolute;
  inset: auto 14px 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.5), transparent);
  opacity: 0.4;
  pointer-events: none;
}

.prompt-suggestions button:hover,
.prompt-suggestions button.active {
  border-color: var(--gold-2);
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 241, 176, 0.26), transparent 68%),
    linear-gradient(180deg, rgba(216, 166, 87, 0.24), rgba(30, 24, 18, 0.82));
  box-shadow:
    inset 0 4px 12px rgba(0, 0, 0, 0.34),
    inset 0 -10px 18px rgba(255, 241, 176, 0.035),
    0 0 0 3px rgba(216, 166, 87, 0.11),
    0 16px 34px rgba(0, 0, 0, 0.25);
  transform: translateY(1px);
}

.prompt-suggestions button.active {
  animation: seal-press 540ms ease;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.primary-button,
.secondary-button {
  border: 0;
  padding: 0 18px;
}

.primary-button {
  flex: 1;
  background: var(--gold);
  color: #1b1208;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(216, 166, 87, 0.18);
}

.secondary-button,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.primary-button.submitted {
  background: var(--gold-2);
  box-shadow:
    0 0 0 4px rgba(242, 196, 111, 0.18),
    0 20px 42px rgba(216, 166, 87, 0.34),
    inset 0 2px 4px rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.question-module .primary-button {
  position: relative;
  overflow: hidden;
  min-height: 58px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 241, 176, 0.55), transparent 70%),
    linear-gradient(135deg, #f2c46f, #d8a657 58%, #b9813f);
  box-shadow:
    0 18px 34px rgba(216, 166, 87, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.question-module .primary-button.submitted::before {
  content: "";
  position: absolute;
  inset: -24px;
  border: 1px solid rgba(255, 241, 176, 0.44);
  border-radius: inherit;
  opacity: 0;
  animation: ritual-submit-aura 820ms ease both;
}

.question-module .primary-button.submitted::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -24%;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: skewX(-18deg);
  animation: ritual-button-sweep 760ms ease both;
}

.question-status {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(244, 238, 230, 0.62);
  text-align: center;
}

.question-module.question-submitted .question-status {
  color: rgba(255, 241, 176, 0.84);
  text-shadow: 0 0 18px rgba(242, 196, 111, 0.24);
}

body[data-ritual-phase="question"] .camera-module {
  border-color: rgba(242, 196, 111, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 241, 176, 0.035),
    0 0 52px rgba(242, 196, 111, 0.08),
    var(--shadow);
}

body[data-ritual-phase="question"] .camera-stage::before {
  opacity: 0.42;
  animation: zodiac-drift 22s linear infinite;
}

body[data-ritual-phase="question"] .camera-readout {
  border-color: rgba(242, 196, 111, 0.42);
  color: rgba(255, 241, 176, 0.88);
}

body[data-ritual-phase="cards"] .reading-module,
body[data-ritual-phase="reading"] .reading-module {
  border-color: rgba(242, 196, 111, 0.34);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 241, 176, 0.12), transparent 20rem),
    radial-gradient(circle at 80% 0%, rgba(155, 186, 210, 0.08), transparent 28rem),
    linear-gradient(180deg, rgba(9, 11, 16, 0.86), rgba(26, 21, 17, 0.9)),
    rgba(33, 28, 24, 0.82);
  box-shadow:
    0 0 0 1px rgba(255, 241, 176, 0.04),
    0 0 58px rgba(242, 196, 111, 0.1),
    var(--shadow);
}

body[data-ritual-phase="reading"] .calendar-module,
body[data-ritual-phase="journal"] .calendar-module {
  border-color: rgba(242, 196, 111, 0.34);
  box-shadow:
    0 0 0 1px rgba(255, 241, 176, 0.04),
    0 0 58px rgba(242, 196, 111, 0.1),
    var(--shadow);
}

.primary-button.casting {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f4cf7d, #d8a657 48%, #fff1b0);
  box-shadow:
    0 0 0 4px rgba(242, 196, 111, 0.16),
    0 0 42px rgba(242, 196, 111, 0.38),
    0 18px 42px rgba(0, 0, 0, 0.28);
  cursor: wait;
}

.primary-button.casting::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -28%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: skewX(-18deg);
  animation: button-oracle-sweep 860ms ease-in-out infinite;
}

@keyframes button-oracle-sweep {
  to {
    transform: translateX(420%) skewX(-18deg);
  }
}

@keyframes fate-flow-pulse {
  from {
    filter: brightness(0.82);
    transform: translateX(-50%) translateY(-3px);
  }

  to {
    filter: brightness(1.2);
    transform: translateX(-50%) translateY(3px);
  }
}

.camera-stage {
  position: relative;
  min-width: 0;
  min-height: min(760px, 76vh);
  overflow: hidden;
  border: 1px solid rgba(242, 196, 111, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 32%, rgba(255, 241, 176, 0.16), transparent 18rem),
    radial-gradient(circle at 50% 45%, rgba(216, 166, 87, 0.13), transparent 22rem),
    radial-gradient(circle at 18% 22%, rgba(155, 186, 210, 0.08), transparent 20rem),
    radial-gradient(circle at 84% 26%, rgba(242, 196, 111, 0.08), transparent 22rem),
    linear-gradient(180deg, #07090f 0%, #0d1019 48%, #080806 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.06),
    inset 0 -150px 190px rgba(216, 166, 87, 0.09),
    0 34px 86px rgba(0, 0, 0, 0.28);
}

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

.camera-stage::before {
  z-index: 0;
  left: 50%;
  top: -34%;
  width: min(980px, 112vw);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.34;
  transform: translateX(-50%) rotate(-12deg);
  background:
    radial-gradient(circle, transparent 0 36%, rgba(242, 196, 111, 0.22) 36.2% 36.7%, transparent 37% 54%, rgba(242, 196, 111, 0.18) 54.2% 54.8%, transparent 55%),
    repeating-conic-gradient(from -18deg, rgba(242, 196, 111, 0.5) 0deg 0.5deg, transparent 0.8deg 7deg),
    conic-gradient(from 12deg, transparent 0deg 18deg, rgba(255, 241, 176, 0.28) 20deg 22deg, transparent 24deg 360deg);
  mask-image: linear-gradient(180deg, #000 0 58%, transparent 78%);
}

.camera-stage::after {
  z-index: 1;
  left: -7%;
  right: -7%;
  bottom: -18%;
  height: 42%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 241, 176, 0.3), transparent 42%),
    linear-gradient(180deg, rgba(242, 196, 111, 0.18), transparent 23%),
    linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.08), transparent),
    rgba(0, 0, 0, 0.28);
  box-shadow:
    0 -1px 0 rgba(242, 196, 111, 0.22),
    0 -34px 70px rgba(242, 196, 111, 0.08);
}

.camera-stage.camera-on::before {
  animation: zodiac-drift 18s linear infinite;
}

.camera-stage.hand-detected::before {
  opacity: 0.34;
  animation-duration: 5.4s;
}

#camera-feed {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 160px;
  height: 120px;
  opacity: 0.001;
  pointer-events: none;
  object-fit: cover;
  transform: scaleX(-1);
  z-index: 1;
}

.camera-orbit {
  position: absolute;
  inset: 0 0 12%;
  z-index: 2;
  overflow: hidden;
  opacity: 0.92;
  pointer-events: none;
  transition: opacity 320ms ease, filter 320ms ease;
}

.grip-meter {
  position: absolute;
  left: 50%;
  top: 49%;
  z-index: 6;
  width: clamp(176px, 20vw, 286px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg) scale(0.82);
  transition:
    opacity 220ms ease,
    transform 280ms ease;
  pointer-events: none;
}

.grip-meter::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 60%, rgba(255, 241, 176, 0.22) 61%, transparent 63%),
    repeating-conic-gradient(from 0deg, rgba(255, 241, 176, 0.68) 0deg 1.2deg, transparent 1.4deg 14deg),
    conic-gradient(from 0deg, rgba(255, 241, 176, 0.34), rgba(242, 196, 111, 0.16), rgba(255, 241, 176, 0.34));
  filter: drop-shadow(0 0 18px rgba(242, 196, 111, 0.48));
  mask-image: radial-gradient(circle, transparent 0 62%, #000 64% 69%, transparent 71%);
}

.grip-meter span {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  opacity: calc(0.35 + var(--grab-strength, 0) * 0.65);
  background:
    conic-gradient(from -90deg, rgba(255, 241, 176, 0.98) 0deg var(--grab-angle, 0deg), transparent var(--grab-angle, 0deg) 360deg);
  filter:
    drop-shadow(0 0 16px rgba(255, 241, 176, 0.62))
    drop-shadow(0 0 32px rgba(242, 196, 111, 0.28));
  mask-image: radial-gradient(circle, transparent 0 66%, #000 68% 71%, transparent 73%);
}

.grip-meter::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff1b0;
  box-shadow:
    0 0 18px rgba(255, 241, 176, 0.88),
    0 0 42px rgba(242, 196, 111, 0.42);
  transform: translateX(-50%);
}

.camera-stage.hand-detected .grip-meter,
.camera-stage.capture-ready .grip-meter {
  opacity: 0.94;
  transform: translate(-50%, -50%) rotate(-90deg) scale(1);
}

.camera-stage.capturing .grip-meter {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-90deg) scale(1.14);
  animation: grip-ring-collapse 540ms ease both;
}

.capture-tether {
  position: absolute;
  left: var(--tether-x, 50%);
  bottom: 122px;
  z-index: 7;
  width: min(660px, 72vw);
  height: 42vh;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.capture-tether::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 241, 176, 0.96), rgba(242, 196, 111, 0.42), transparent);
  box-shadow:
    0 0 18px rgba(255, 241, 176, 0.68),
    0 0 44px rgba(242, 196, 111, 0.34);
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
}

.capture-tether::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff1b0;
  box-shadow:
    0 0 16px rgba(255, 241, 176, 0.96),
    0 0 38px rgba(242, 196, 111, 0.44);
  opacity: 0;
  transform: translate(-50%, -18px) scale(0.7);
}

.camera-stage.draw-1 .capture-tether,
.camera-stage.draw-2 .capture-tether,
.camera-stage.draw-3 .capture-tether {
  opacity: 1;
}

.camera-stage.draw-1 {
  --tether-x: 34%;
}

.camera-stage.draw-2 {
  --tether-x: 50%;
}

.camera-stage.draw-3 {
  --tether-x: 66%;
}

.camera-stage.draw-1 .capture-tether::before,
.camera-stage.draw-2 .capture-tether::before,
.camera-stage.draw-3 .capture-tether::before {
  animation: tether-flow 980ms ease 700ms both;
}

.camera-stage.draw-1 .capture-tether::after,
.camera-stage.draw-2 .capture-tether::after,
.camera-stage.draw-3 .capture-tether::after {
  animation: tether-star-drop 980ms ease 760ms both;
}

.camera-orbit::before,
.camera-orbit::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
}

.camera-orbit::before {
  top: 10%;
  width: min(780px, 82vw);
  height: 76%;
  border-radius: 50%;
  border: 1px solid rgba(242, 196, 111, 0.28);
  background:
    radial-gradient(ellipse at 50% 43%, transparent 0 36%, rgba(242, 196, 111, 0.13) 36.4% 37%, transparent 37.4%),
    linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.12), transparent);
  transform: translateX(-50%) perspective(900px) rotateX(64deg);
  box-shadow: 0 0 46px rgba(242, 196, 111, 0.1);
}

.camera-orbit::after {
  top: 18%;
  width: clamp(92px, 13vw, 150px);
  height: min(410px, 52vh);
  background: linear-gradient(180deg, transparent, rgba(255, 241, 176, 0.54) 28%, rgba(242, 196, 111, 0.24) 62%, transparent);
  filter: blur(4px);
  opacity: 0.74;
  mix-blend-mode: screen;
}

.camera-stage.camera-starting .camera-orbit,
.camera-stage.camera-on .camera-orbit {
  opacity: 1;
}

.camera-stage.camera-starting .camera-orbit {
  filter: saturate(1.08) brightness(1.04);
}

.camera-stage.hand-detected .camera-orbit {
  filter: saturate(1.42) brightness(1.18);
}

.camera-stage.time-freeze .camera-orbit {
  filter: saturate(0.76) brightness(0.66) contrast(1.15);
}

.camera-stage.orbit-hold .camera-orbit {
  opacity: 0.28;
  filter: saturate(0.72) brightness(0.54) contrast(1.12);
  transition:
    opacity 420ms ease,
    filter 420ms ease;
}

.camera-stage.orbit-returning .camera-orbit {
  opacity: 1;
  filter: saturate(1.18) brightness(1.04);
  animation: orbit-return 620ms cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.camera-stage.time-freeze .camera-orbit::before {
  border-color: rgba(255, 241, 176, 0.68);
  box-shadow:
    0 0 0 1px rgba(255, 241, 176, 0.12),
    0 0 68px rgba(255, 241, 176, 0.28);
}

.camera-stage.spread-complete .camera-orbit {
  opacity: 0.34;
  filter: grayscale(0.18) brightness(0.72);
}

.camera-stage.hand-detected .camera-orbit::after,
.camera-stage.capture-ready .camera-orbit::after {
  opacity: 0.88;
  filter: blur(3px) saturate(1.25);
}

.camera-stage.capture-ready .camera-orbit::after {
  opacity: 1;
  background: linear-gradient(180deg, transparent, rgba(255, 241, 176, 0.78) 28%, rgba(242, 196, 111, 0.38) 62%, transparent);
}

.camera-stage.capture-disabled .camera-orbit {
  opacity: 0.46;
  filter: grayscale(0.22) brightness(0.78);
}

.camera-readout {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 6;
  max-width: min(88%, 560px);
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(242, 196, 111, 0.28);
  border-radius: 999px;
  background: rgba(8, 9, 18, 0.62);
  color: rgba(247, 214, 154, 0.86);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 0 14px rgba(216, 166, 87, 0.22);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.orbit-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(76px, 8.4vw, 126px);
  aspect-ratio: 2 / 3.3;
  border: 1px solid rgba(242, 196, 111, 0.5);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, rgba(242, 196, 111, 0.46), transparent 18%),
    linear-gradient(150deg, rgba(26, 26, 48, 0.96), rgba(45, 36, 28, 0.86)),
    #191716;
  box-shadow:
    -42px 0 42px rgba(242, 196, 111, 0.12),
    -72px 4px 36px rgba(242, 196, 111, 0.06),
    18px 0 28px rgba(242, 196, 111, 0.05),
    0 0 24px rgba(216, 166, 87, 0.2),
    0 28px 58px rgba(0, 0, 0, 0.52);
  opacity: var(--opacity);
  filter: blur(calc((1 - var(--scale)) * 7px));
  transform: translate(-50%, -50%) perspective(760px) rotateY(calc(var(--tilt) * -0.42)) rotateZ(var(--tilt)) scale(var(--scale));
  transition:
    left 38ms linear,
    top 38ms linear,
    transform 38ms linear,
    opacity 38ms linear,
    filter 38ms linear,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.camera-stage.camera-on .orbit-card:not(.center) {
  border-color: rgba(242, 196, 111, 0.36);
  filter:
    blur(calc((1 - var(--scale)) * 8px))
    saturate(1.14);
}

.camera-stage.hand-detected .orbit-card:not(.center) {
  opacity: calc(var(--opacity) * 0.88);
  filter:
    blur(calc((1 - var(--scale)) * 10px))
    saturate(1.22)
    brightness(1.08);
}

.camera-stage.time-freeze .orbit-card:not(.center) {
  opacity: 0.22;
  filter: blur(7px) saturate(0.72) brightness(0.58);
  transition:
    left 520ms cubic-bezier(0.12, 0.72, 0.2, 1),
    top 520ms cubic-bezier(0.12, 0.72, 0.2, 1),
    transform 520ms cubic-bezier(0.12, 0.72, 0.2, 1),
    opacity 420ms ease,
    filter 420ms ease;
}

.camera-stage.orbit-hold .orbit-card:not(.center) {
  opacity: 0.12;
  filter: blur(10px) saturate(0.6) brightness(0.48);
}

.camera-stage.orbit-returning .orbit-card {
  transition:
    left 220ms ease,
    top 220ms ease,
    transform 520ms cubic-bezier(0.18, 0.78, 0.24, 1),
    opacity 520ms ease,
    filter 520ms ease;
}

.camera-stage.time-freeze .orbit-card.center {
  z-index: 6;
  border-color: rgba(255, 241, 176, 1);
  filter: blur(0) saturate(1.24) brightness(1.28);
  transform: translate(-50%, calc(-50% - 26px)) perspective(760px) rotateY(0deg) rotateZ(0deg) scale(calc(var(--scale) + 0.18));
  transition:
    left 420ms cubic-bezier(0.12, 0.72, 0.2, 1),
    top 420ms cubic-bezier(0.12, 0.72, 0.2, 1),
    transform 420ms cubic-bezier(0.12, 0.72, 0.2, 1),
    box-shadow 260ms ease,
    filter 260ms ease;
  box-shadow:
    0 0 0 2px rgba(255, 241, 176, 0.28),
    0 0 0 20px rgba(242, 196, 111, 0.08),
    0 0 110px rgba(255, 241, 176, 0.72),
    0 46px 96px rgba(0, 0, 0, 0.64);
}

.orbit-card::before,
.orbit-card::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.orbit-card::before {
  inset: 10px;
  border: 1px solid rgba(242, 196, 111, 0.34);
  box-shadow: -22px 0 22px rgba(242, 196, 111, 0.06);
}

.orbit-card::after {
  left: 50%;
  top: 50%;
  width: 34%;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 196, 111, 0.66);
  background: rgba(242, 196, 111, 0.12);
  transform: translate(-50%, -50%);
}

.orbit-card.center {
  border-color: rgba(242, 196, 111, 0.9);
  filter: blur(0);
  box-shadow:
    0 0 0 2px rgba(242, 196, 111, 0.16),
    0 0 0 10px rgba(242, 196, 111, 0.04),
    0 0 64px rgba(242, 196, 111, 0.48),
    0 38px 82px rgba(0, 0, 0, 0.58);
  transform: translate(-50%, calc(-50% - 9px)) perspective(760px) rotateY(0deg) rotateZ(0deg) scale(var(--scale));
}

.camera-stage.capture-ready .orbit-card.center {
  border-color: rgba(255, 241, 176, 0.98);
  box-shadow:
    0 0 0 2px rgba(255, 241, 176, 0.22),
    0 0 0 14px rgba(242, 196, 111, 0.08),
    0 0 84px rgba(255, 241, 176, 0.64),
    0 42px 92px rgba(0, 0, 0, 0.62);
}

.camera-stage.capture-ready .orbit-card.center::before {
  animation: center-lock-ring 980ms ease-in-out infinite alternate;
}

.orbit-card.center::before {
  inset: 8px;
  border-color: rgba(255, 241, 176, 0.62);
  box-shadow:
    0 0 0 1px rgba(255, 241, 176, 0.1),
    0 0 28px rgba(242, 196, 111, 0.18);
}

.orbit-card.center::after {
  box-shadow:
    0 0 24px rgba(255, 241, 176, 0.72),
    0 0 58px rgba(242, 196, 111, 0.34);
}

.camera-stage.capturing .orbit-card.center {
  animation: center-capture 520ms cubic-bezier(0.16, 0.82, 0.2, 1) both;
}

.camera-stage.capturing {
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.18),
    inset 0 -150px 190px rgba(216, 166, 87, 0.16),
    0 0 80px rgba(242, 196, 111, 0.18),
    0 34px 86px rgba(0, 0, 0, 0.28);
}

.camera-stage.hand-detected .orbit-card {
  box-shadow:
    0 0 30px rgba(242, 196, 111, 0.28),
    0 24px 48px rgba(0, 0, 0, 0.5);
}

.camera-stage.hand-detected .orbit-card:not(.center) {
  box-shadow:
    -64px 0 46px rgba(242, 196, 111, 0.15),
    -108px 3px 44px rgba(242, 196, 111, 0.08),
    0 0 26px rgba(242, 196, 111, 0.2),
    0 28px 58px rgba(0, 0, 0, 0.56);
}

.camera-stage.draw-1 .selected-card-reveal {
  filter: drop-shadow(0 0 18px rgba(242, 196, 111, 0.26));
}

.camera-stage.draw-2 .selected-card-reveal {
  filter: drop-shadow(0 0 26px rgba(255, 241, 176, 0.34));
}

.camera-stage.draw-3 .selected-card-reveal {
  filter: drop-shadow(0 0 38px rgba(255, 241, 176, 0.48));
}

@keyframes center-capture {
  0% {
    transform: translate(-50%, -50%) rotate(var(--tilt)) scale(var(--scale));
  }

  70% {
    transform: translate(-50%, calc(-50% - 28px)) rotate(0deg) scale(calc(var(--scale) + 0.18));
  }

  100% {
    transform: translate(-50%, calc(-50% - 18px)) rotate(0deg) scale(calc(var(--scale) + 0.08));
  }
}

@keyframes orbit-return {
  0% {
    opacity: 0.12;
    transform: translateY(12px) scale(0.96);
  }

  64% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes grip-ring-collapse {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-90deg) scale(1);
  }

  58% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.72);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.44);
  }
}

@keyframes tether-flow {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes tether-star-drop {
  0% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(0.7);
  }

  26% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 28px) scale(1.18);
  }
}

@keyframes center-lock-ring {
  from {
    box-shadow:
      0 0 0 1px rgba(255, 241, 176, 0.12),
      0 0 22px rgba(242, 196, 111, 0.18);
  }

  to {
    box-shadow:
      0 0 0 4px rgba(255, 241, 176, 0.16),
      0 0 42px rgba(255, 241, 176, 0.38);
  }
}

.selected-card-reveal {
  position: absolute;
  left: 50%;
  top: 39%;
  width: clamp(150px, 16vw, 220px);
  aspect-ratio: 2 / 3.3;
  z-index: 8;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.selected-card-reveal[hidden] {
  display: none;
}

.selected-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 1;
  transform: translateY(0) rotateY(0deg) scale(0.88);
  transform-style: preserve-3d;
  transition:
    opacity 520ms ease,
    transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.selected-card-reveal.revealed .selected-card-inner {
  transform: rotateY(180deg) scale(1.08);
}

.selected-card-reveal.exiting .selected-card-inner {
  opacity: 0;
  transform: translate(var(--exit-x, 0), 34vh) rotateY(180deg) rotateZ(0deg) scale(0.52);
  transition:
    opacity 620ms ease,
    transform 880ms cubic-bezier(0.18, 0.78, 0.24, 1);
}

.selected-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(242, 196, 111, 0.86);
  border-radius: 10px;
  backface-visibility: hidden;
  box-shadow:
    0 0 0 3px rgba(242, 196, 111, 0.12),
    0 0 64px rgba(242, 196, 111, 0.42),
    0 36px 86px rgba(0, 0, 0, 0.56);
}

.selected-card-back {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 34%, rgba(242, 196, 111, 0.5), transparent 18%),
    linear-gradient(150deg, rgba(30, 28, 76, 0.98), rgba(48, 36, 25, 0.88)),
    #191716;
}

.selected-card-reveal.revealed .selected-card-back {
  opacity: 1;
}

.selected-card-back::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(242, 196, 111, 0.42);
  border-radius: 8px;
}

.selected-card-front {
  z-index: 3;
  background: #efe7d8;
  transform: rotateY(180deg);
  transition: box-shadow 640ms cubic-bezier(0.18, 0.78, 0.24, 1);
}

.selected-card-reveal.revealed .selected-card-front {
  box-shadow:
    0 0 0 3px rgba(242, 196, 111, 0.16),
    0 0 82px rgba(255, 241, 176, 0.48),
    0 36px 86px rgba(0, 0, 0, 0.56);
}

.selected-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 1;
}

.selected-card-image.is-reversed {
  transform: rotate(180deg);
}

.selected-card-reveal.image-missing .selected-card-front {
  background:
    radial-gradient(circle at 50% 36%, rgba(242, 196, 111, 0.34), transparent 18%),
    linear-gradient(150deg, rgba(30, 28, 76, 0.98), rgba(48, 36, 25, 0.88)),
    #191716;
}

.selected-card-reveal.image-missing .selected-card-front::before {
  content: "牌面图案加载失败";
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 196, 111, 0.32);
  border-radius: 8px;
  color: rgba(247, 214, 154, 0.86);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.selected-card-front::after {
  content: "";
  position: absolute;
  top: 12%;
  left: -35%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff3b0;
  box-shadow:
    0 0 18px rgba(255, 243, 176, 0.95),
    42px 14px 0 -8px rgba(255, 243, 176, 0.75),
    84px -8px 0 -10px rgba(255, 243, 176, 0.65);
  opacity: 0;
}

.selected-card-reveal.revealed .selected-card-front::after {
  animation: star-sweep 920ms ease 520ms both;
}

.camera-slots {
  position: absolute;
  left: 50%;
  bottom: 72px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
  width: min(680px, calc(100% - 56px));
  transform: translateX(-50%);
  pointer-events: none;
}

.camera-slot {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: start;
  gap: 2px 12px;
  min-height: 94px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 196, 111, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 241, 176, 0.1), transparent 72%),
    rgba(8, 9, 12, 0.58);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.22),
    0 18px 44px rgba(0, 0, 0, 0.24);
  color: rgba(247, 214, 154, 0.68);
  backdrop-filter: blur(10px);
}

.camera-slot::before {
  content: "";
  grid-row: 1 / 3;
  grid-column: 1;
  width: 38px;
  aspect-ratio: 2 / 3.3;
  border: 1px solid rgba(242, 196, 111, 0.28);
  border-radius: 3px;
  background: rgba(242, 196, 111, 0.06);
}

.camera-slot::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(242, 196, 111, 0.08);
  border-radius: 5px;
}

.camera-slot i {
  grid-column: 2;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.camera-slot b {
  grid-column: 2;
  max-width: calc(100% - 14px);
  min-height: 1.2em;
  overflow: hidden;
  color: rgba(244, 238, 230, 0.86);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-slot img {
  position: relative;
  z-index: 1;
  grid-row: 1 / 3;
  grid-column: 1;
  width: 42px;
  aspect-ratio: 2 / 3.3;
  border: 1px solid rgba(255, 241, 176, 0.62);
  border-radius: 4px;
  object-fit: cover;
  background: #191716;
  box-shadow:
    0 0 18px rgba(242, 196, 111, 0.24),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

.camera-slot img.is-reversed {
  transform: rotate(180deg);
}

.camera-slot.filled {
  border-color: rgba(242, 196, 111, 0.62);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 241, 176, 0.28), transparent 72%),
    linear-gradient(180deg, rgba(216, 166, 87, 0.17), rgba(8, 9, 12, 0.62));
  box-shadow:
    inset 0 0 26px rgba(242, 196, 111, 0.08),
    0 0 34px rgba(242, 196, 111, 0.22),
    0 18px 44px rgba(0, 0, 0, 0.28);
  color: rgba(255, 241, 176, 0.88);
  animation: slot-lit 820ms cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.camera-slot.filled::before {
  opacity: 0;
}

.camera-slot.image-missing img {
  opacity: 0;
}

.camera-slot.image-missing::before {
  opacity: 1;
  border-color: rgba(255, 241, 176, 0.68);
  background:
    radial-gradient(circle, rgba(255, 241, 176, 0.38), transparent 58%),
    rgba(216, 166, 87, 0.16);
  box-shadow: 0 0 22px rgba(242, 196, 111, 0.28);
}

@keyframes star-sweep {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(260px, 190px) scale(1);
  }
}

@keyframes zodiac-drift {
  to {
    transform: translateX(-50%) rotate(348deg);
  }
}

@keyframes slot-lit {
  0% {
    filter: brightness(1);
    transform: translateY(0);
  }

  48% {
    filter: brightness(1.28);
    transform: translateY(-6px);
  }

  100% {
    filter: brightness(1);
    transform: translateY(0);
  }
}

.app-toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 30;
  max-width: min(280px, calc(100vw - 32px));
  border: 1px solid rgba(131, 184, 139, 0.42);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(19, 34, 24, 0.92);
  color: var(--text);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  font-size: 0.9rem;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 180ms ease both;
}

.app-toast[data-tone="warn"] {
  border-color: rgba(217, 130, 107, 0.5);
  background: rgba(54, 28, 22, 0.94);
}

.wechat-camera-guide {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 38%, rgba(242, 196, 111, 0.18), transparent 24rem),
    rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(16px);
}

.wechat-camera-guide[hidden] {
  display: none;
}

.wechat-camera-guide-panel {
  position: relative;
  isolation: isolate;
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid rgba(242, 196, 111, 0.26);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(circle at 20% 6%, rgba(255, 241, 176, 0.13), transparent 14rem),
    radial-gradient(circle at 82% 100%, rgba(155, 186, 210, 0.1), transparent 15rem),
    linear-gradient(145deg, rgba(18, 15, 13, 0.98), rgba(8, 9, 12, 0.98));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 241, 176, 0.08);
}

.wechat-camera-guide-panel::before {
  content: "";
  position: absolute;
  inset: -34%;
  z-index: -1;
  opacity: 0.28;
  background:
    radial-gradient(circle, transparent 0 24%, rgba(242, 196, 111, 0.16) 24.2% 24.8%, transparent 25% 42%),
    repeating-conic-gradient(from -18deg, rgba(242, 196, 111, 0.16) 0deg 0.8deg, transparent 1deg 18deg);
  transform: rotate(-10deg);
}

.wechat-guide-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(242, 196, 111, 0.22);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(244, 238, 230, 0.78);
  cursor: pointer;
}

.wechat-camera-guide h2 {
  margin: 0 0 10px;
  max-width: 420px;
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.wechat-camera-guide p {
  margin: 0;
  color: rgba(244, 238, 230, 0.74);
  line-height: 1.68;
}

.wechat-guide-steps {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 22px 0;
}

.wechat-guide-steps span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(242, 196, 111, 0.38);
  border-radius: 50%;
  background: rgba(242, 196, 111, 0.1);
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.wechat-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.wechat-guide-actions a {
  text-decoration: none;
}

.wechat-guide-status {
  margin-top: 14px !important;
  color: rgba(247, 214, 154, 0.7) !important;
  font-size: 0.86rem;
}

.cursor-trail-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

.cursor-trail-spark {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 244, 196, 0.95) 0 12%, rgba(242, 196, 111, 0.6) 13% 32%, transparent 68%);
  box-shadow:
    0 0 16px rgba(242, 196, 111, 0.54),
    0 0 34px rgba(216, 166, 87, 0.24);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  mix-blend-mode: screen;
  animation: cursor-trail-fade 760ms ease-out forwards;
}

.cursor-trail-spark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.72), transparent);
  transform: translate(-50%, -50%) rotate(-18deg);
}

.cursor-trail-spark.is-bright {
  filter: saturate(1.25) brightness(1.18);
}

@keyframes cursor-trail-fade {
  0% {
    opacity: 0.88;
    transform: translate(-50%, -50%) scale(0.45);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) scale(1.24);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.module-note,
.deck-summary {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.deck-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.empty-spread {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.empty-spread[hidden] {
  display: none;
}

.empty-spread span {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 280px;
  border: 1px dashed rgba(242, 196, 111, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 241, 176, 0.08), transparent 72%),
    rgba(8, 9, 12, 0.28);
  color: rgba(247, 214, 154, 0.72);
  font-weight: 800;
}

.empty-spread span::before {
  content: "";
  width: min(132px, 38%);
  aspect-ratio: 2 / 3.35;
  border: 1px solid rgba(242, 196, 111, 0.26);
  border-radius: 7px;
  opacity: 0.72;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.cards-grid.projecting .tarot-card {
  animation: card-project-pulse 1420ms cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.cards-grid.projecting .tarot-card:nth-child(2) {
  animation-delay: 120ms;
}

.cards-grid.projecting .tarot-card:nth-child(3) {
  animation-delay: 240ms;
}

.tarot-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(136px, 0.66fr) minmax(0, 1fr);
  gap: clamp(14px, 1.8vw, 22px);
  min-height: 306px;
  border: 1px solid rgba(242, 196, 111, 0.22);
  border-radius: 8px;
  padding: clamp(14px, 1.8vw, 20px);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 241, 176, 0.1), transparent 13rem),
    linear-gradient(180deg, rgba(255, 241, 176, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(8, 9, 12, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.035),
    0 22px 54px rgba(0, 0, 0, 0.22);
}

.tarot-card::after {
  content: "";
  position: absolute;
  left: 84px;
  right: 18px;
  top: 48%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 241, 176, 0.92), rgba(242, 196, 111, 0.42), transparent);
  box-shadow: 0 0 26px rgba(242, 196, 111, 0.52);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0) scaleX(0.2);
  transform-origin: left center;
}

.cards-grid.projecting .tarot-card::after {
  animation: card-light-beam 1260ms ease both;
}

body[data-ritual-phase="cards"] .cards-grid .tarot-card {
  border-color: rgba(242, 196, 111, 0.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 241, 176, 0.16), transparent 13rem),
    linear-gradient(180deg, rgba(216, 166, 87, 0.09), rgba(8, 9, 12, 0.38));
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.055),
    0 0 36px rgba(242, 196, 111, 0.11),
    0 26px 62px rgba(0, 0, 0, 0.3);
}

.card-visual {
  position: relative;
  width: min(100%, 178px);
  aspect-ratio: 2 / 3.48;
  justify-self: center;
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 7px;
  transition:
    opacity 360ms ease,
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.card-back {
  border: 1px solid rgba(242, 196, 111, 0.42);
  background: linear-gradient(145deg, #4f3920, #172023 54%, #806035);
}

.card-front {
  z-index: 2;
  opacity: 0;
  transform: scale(0.96);
  background: #efe7d8;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-front.missing-image {
  background:
    radial-gradient(circle at 50% 36%, rgba(242, 196, 111, 0.34), transparent 18%),
    linear-gradient(150deg, rgba(30, 28, 76, 0.98), rgba(48, 36, 25, 0.88)),
    #191716;
}

.tarot-card.revealed .card-back {
  opacity: 0;
  transform: scale(0.96);
}

.tarot-card.revealed .card-front {
  opacity: 1;
  transform: scale(1);
}

.tarot-card.reversed .card-front img {
  transform: rotate(180deg);
}

.card-reading {
  min-width: 0;
  align-self: center;
}

.position {
  margin-bottom: 10px;
  color: rgba(255, 241, 176, 0.78);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.card-reading h3 {
  margin-bottom: 8px;
  font-size: clamp(1.18rem, 1.6vw, 1.48rem);
  line-height: 1.2;
}

.orientation,
.keywords {
  margin-bottom: 10px;
  color: var(--gold-2);
  font-size: 0.92rem;
}

.meaning {
  color: rgba(244, 238, 230, 0.64);
  font-size: 0.92rem;
  line-height: 1.72;
}

.meaning {
  margin-bottom: 0;
}

.reading-output {
  position: relative;
  min-height: clamp(340px, 45vw, 520px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(242, 196, 111, 0.34);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 46px);
  background:
    radial-gradient(ellipse at 50% 58%, rgba(255, 255, 255, 0.035), transparent 17rem),
    radial-gradient(ellipse at 50% 56%, transparent 0 45%, rgba(242, 196, 111, 0.12) 45.4% 46%, transparent 46.4%),
    linear-gradient(90deg, rgba(242, 196, 111, 0.08) 0 1px, transparent 1px 100%) 0 0 / 72px 72px,
    linear-gradient(180deg, rgba(242, 196, 111, 0.06) 0 1px, transparent 1px 100%) 0 0 / 72px 72px,
    radial-gradient(circle at 17% 22%, rgba(255, 241, 176, 0.18), transparent 19rem),
    radial-gradient(circle at 86% 78%, rgba(155, 186, 210, 0.1), transparent 21rem),
    radial-gradient(ellipse at 50% 100%, rgba(242, 196, 111, 0.08), transparent 42rem),
    linear-gradient(145deg, rgba(6, 7, 11, 0.96), rgba(18, 14, 12, 0.9) 58%, rgba(7, 8, 11, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.07),
    inset 0 0 110px rgba(0, 0, 0, 0.5),
    0 32px 78px rgba(0, 0, 0, 0.3);
  color: var(--muted);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(1rem, 1.18vw, 1.18rem);
  line-height: 1.88;
}

.reading-output::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(940px, 102vw);
  aspect-ratio: 1;
  background:
    radial-gradient(circle, transparent 0 12%, rgba(255, 241, 176, 0.08) 12.2% 12.8%, transparent 13% 27%),
    radial-gradient(circle, transparent 0 39%, rgba(242, 196, 111, 0.12) 39.2% 39.7%, transparent 40% 57%),
    radial-gradient(circle, transparent 0 71%, rgba(242, 196, 111, 0.13) 71.2% 71.7%, transparent 72%),
    repeating-conic-gradient(from -8deg, rgba(242, 196, 111, 0.28) 0deg 0.65deg, transparent 0.8deg 7.5deg),
    conic-gradient(from 0deg, transparent, rgba(255, 241, 176, 0.12), transparent 25%, rgba(155, 186, 210, 0.08), transparent 60%, rgba(242, 196, 111, 0.11), transparent);
  opacity: 0.32;
  transform: translate(-50%, -50%) rotate(-8deg);
  transform-origin: center;
  pointer-events: none;
}

.reading-output.is-loading::before,
.reading-output.is-revealed::before {
  animation: oracle-astrolabe 14s linear infinite;
}

.reading-output::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255, 241, 176, 0.28), transparent 18rem),
    linear-gradient(110deg, transparent 16%, rgba(255, 241, 176, 0.2) 48%, transparent 74%);
  opacity: 0;
  transform: translateX(-74%);
  pointer-events: none;
}

.reading-output.is-receiving::after,
.reading-output.is-revealed::after {
  animation: reading-sweep 1280ms ease both;
}

.reading-output.is-loading {
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.12),
    inset 0 0 140px rgba(0, 0, 0, 0.48),
    0 0 58px rgba(242, 196, 111, 0.16),
    0 32px 78px rgba(0, 0, 0, 0.3);
}

.reading-output.is-loading .oracle-ritual::before,
.reading-output.is-loading .oracle-ritual::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.reading-output.is-loading .oracle-ritual::before {
  width: min(540px, 78vw);
  aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(255, 241, 176, 0.14), transparent 18%),
    repeating-radial-gradient(circle, transparent 0 28px, rgba(242, 196, 111, 0.08) 29px, transparent 31px);
  opacity: 0.58;
  filter: blur(2px);
  animation: mirror-ripple 1600ms ease-in-out infinite;
}

.reading-output.is-loading .oracle-ritual::after {
  width: min(700px, 88vw);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 35% 42%, rgba(255, 255, 255, 0.12), transparent 9rem),
    radial-gradient(circle at 64% 58%, rgba(242, 196, 111, 0.13), transparent 11rem);
  opacity: 0.34;
  filter: blur(18px);
  animation: mirror-mist 2200ms ease-in-out infinite alternate;
}

.reading-placeholder {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  border: 1px solid rgba(242, 196, 111, 0.2);
  border-radius: 8px;
  padding: 18px 20px;
  background: rgba(7, 8, 11, 0.46);
  color: rgba(244, 238, 230, 0.76);
  box-shadow:
    inset 0 0 28px rgba(242, 196, 111, 0.035),
    0 18px 44px rgba(0, 0, 0, 0.2);
}

.reading-loading {
  position: relative;
  z-index: 1;
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.oracle-ring {
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 196, 111, 0.46);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 18%, rgba(255, 241, 176, 0.56) 18.4% 19%, transparent 19.4%),
    repeating-conic-gradient(from 0deg, rgba(242, 196, 111, 0.72) 0deg 1deg, transparent 1.2deg 18deg),
    conic-gradient(from 0deg, rgba(242, 196, 111, 0.06), rgba(242, 196, 111, 0.82), rgba(155, 186, 210, 0.18), rgba(242, 196, 111, 0.06));
  box-shadow:
    0 0 34px rgba(242, 196, 111, 0.36),
    inset 0 0 24px rgba(242, 196, 111, 0.16);
  animation: oracle-spin 1.5s linear infinite;
}

.oracle-core {
  position: absolute;
  width: 36px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff4c4 0 12%, rgba(242, 196, 111, 0.42) 28%, transparent 68%);
  box-shadow:
    0 0 20px rgba(255, 241, 176, 0.9),
    0 0 62px rgba(242, 196, 111, 0.34);
  animation: oracle-core-pulse 1.2s ease-in-out infinite alternate;
}

.reading-loading strong {
  color: var(--gold-2);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: 0;
}

.reading-loading em {
  color: rgba(244, 238, 230, 0.66);
  font-style: normal;
}

.reading-paragraph {
  position: relative;
  display: grid;
  gap: 12px;
  z-index: 1;
  border-bottom: 1px solid rgba(244, 238, 230, 0.1);
  padding: 0 0 17px 18px;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(12px);
  animation: reading-rise 560ms ease var(--delay) forwards;
}

.reading-paragraph::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 18px rgba(242, 196, 111, 0.72);
}

.reading-label {
  color: var(--gold-2);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reading-paragraph p {
  margin: 0;
  color: rgba(244, 238, 230, 0.84);
}

.reading-summary {
  overflow: hidden;
  gap: 20px;
  border: 1px solid rgba(242, 196, 111, 0.34);
  border-radius: 8px;
  padding: clamp(24px, 3.4vw, 42px);
  margin-bottom: 0;
  background:
    radial-gradient(ellipse at 50% 54%, rgba(255, 255, 255, 0.05), transparent 19rem),
    radial-gradient(ellipse at 50% 54%, transparent 0 52%, rgba(255, 241, 176, 0.12) 52.2% 52.8%, transparent 53.2%),
    linear-gradient(90deg, rgba(255, 241, 176, 0.06) 0 1px, transparent 1px 100%) 0 0 / 56px 56px,
    radial-gradient(circle at 18% 0%, rgba(255, 241, 176, 0.14), transparent 19rem),
    radial-gradient(circle at 86% 100%, rgba(155, 186, 210, 0.08), transparent 20rem),
    linear-gradient(135deg, rgba(242, 196, 111, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.022));
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 176, 0.04),
    inset 0 0 46px rgba(242, 196, 111, 0.055),
    0 24px 62px rgba(0, 0, 0, 0.32);
}

.reading-summary::before {
  left: 13px;
  top: 27px;
}

.reading-summary .reading-label {
  font-size: 0.88rem;
}

.reading-summary::after {
  content: "";
  position: absolute;
  right: -96px;
  top: -124px;
  width: min(390px, 52vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 36%, rgba(242, 196, 111, 0.11) 36.4% 37%, transparent 37.5% 61%),
    repeating-conic-gradient(from 12deg, rgba(242, 196, 111, 0.18) 0deg 1deg, transparent 1.2deg 20deg);
  opacity: 0.5;
  pointer-events: none;
}

.reading-output.is-revealed .reading-summary {
  animation:
    reading-rise 560ms ease var(--delay) forwards,
    mirror-focus 1400ms ease both;
}

.reading-dossier-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(242, 196, 111, 0.2);
  padding-bottom: 14px;
}

.reading-dossier-subtitle {
  color: rgba(244, 238, 230, 0.54);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: right;
}

.reading-evidence {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.reading-evidence span {
  min-width: 0;
  border: 1px solid rgba(242, 196, 111, 0.22);
  border-radius: 6px;
  padding: 9px 10px;
  background:
    linear-gradient(180deg, rgba(255, 241, 176, 0.075), rgba(3, 4, 6, 0.2)),
    rgba(7, 8, 11, 0.32);
  color: rgba(244, 238, 230, 0.72);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  line-height: 1.48;
}

.reading-evidence b {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 241, 176, 0.86);
  font-size: 0.68rem;
  font-weight: 800;
}

.reading-summary p {
  position: relative;
  z-index: 1;
  color: rgba(244, 238, 230, 0.9);
  font-size: clamp(1.04rem, 1.44vw, 1.18rem);
  line-height: 2.08;
  text-align: left;
}

.oracle-copy,
.oracle-action {
  letter-spacing: 0;
}

.oracle-action {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(242, 196, 111, 0.26);
  border-radius: 8px;
  background: rgba(242, 196, 111, 0.06);
  color: rgba(255, 241, 176, 0.94);
  opacity: 0;
  transform: translateY(12px);
  animation: oracle-action-arrive 520ms ease forwards;
  animation-delay: var(--action-delay);
}

.oracle-action b {
  display: inline-block;
  margin-right: 12px;
  color: var(--gold-2);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
}

.oracle-line {
  position: relative;
  display: block;
  opacity: 0;
  filter: blur(9px);
  text-shadow: 0 0 18px rgba(255, 241, 176, 0.6);
  transform: translateY(10px);
  animation: oracle-line-reveal 640ms ease forwards;
  animation-delay: var(--line-delay);
}

.oracle-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.8), transparent);
  opacity: 0;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  animation: oracle-line-spark 540ms ease forwards;
  animation-delay: var(--line-delay);
}

.reading-saved {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(242, 196, 111, 0.34);
  border-radius: 6px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 241, 176, 0.18), transparent 9rem),
    rgba(216, 166, 87, 0.1);
  color: rgba(255, 241, 176, 0.92);
  box-shadow:
    inset 0 0 24px rgba(242, 196, 111, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.18);
  animation: sealed-to-journal 920ms ease both;
}

.reading-saved::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -20%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 176, 0.5), transparent);
  transform: skewX(-18deg);
  animation: gold-dust-seal 920ms ease both;
}

.auto-save-consent {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin-top: 14px;
  border: 1px solid rgba(242, 196, 111, 0.2);
  border-radius: 8px;
  padding: 11px 14px;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 241, 176, 0.12), transparent 8rem),
    rgba(8, 9, 12, 0.3);
  color: rgba(244, 238, 230, 0.76);
  cursor: pointer;
  box-shadow:
    inset 0 0 22px rgba(242, 196, 111, 0.03),
    0 14px 34px rgba(0, 0, 0, 0.14);
}

.auto-save-consent input {
  position: relative;
  appearance: none;
  width: 42px;
  height: 24px;
  border: 1px solid rgba(242, 196, 111, 0.32);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.auto-save-consent input::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(244, 238, 230, 0.72);
  box-shadow: 0 0 12px rgba(244, 238, 230, 0.18);
  transform: translateY(-50%);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.auto-save-consent input:checked {
  border-color: rgba(255, 241, 176, 0.72);
  background: rgba(216, 166, 87, 0.32);
  box-shadow:
    inset 0 0 12px rgba(242, 196, 111, 0.12),
    0 0 22px rgba(242, 196, 111, 0.16);
}

.auto-save-consent input:checked::after {
  background: #fff1b0;
  box-shadow:
    0 0 12px rgba(255, 241, 176, 0.64),
    0 0 24px rgba(242, 196, 111, 0.28);
  transform: translate(17px, -50%);
}

.auto-save-consent b,
.auto-save-consent small {
  display: block;
}

.auto-save-consent b {
  color: rgba(255, 241, 176, 0.9);
  font-size: 0.88rem;
}

.auto-save-consent small {
  margin-top: 2px;
  color: rgba(244, 238, 230, 0.54);
  font-size: 0.76rem;
  line-height: 1.45;
}

.reading-output p:last-child {
  margin-bottom: 0;
}

@keyframes reading-sweep {
  0% {
    opacity: 0;
    transform: translateX(-70%);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(72%);
  }
}

@keyframes oracle-astrolabe {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes oracle-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes oracle-core-pulse {
  from {
    opacity: 0.62;
    transform: scale(0.84);
  }

  to {
    opacity: 1;
    transform: scale(1.16);
  }
}

@keyframes oracle-line-reveal {
  0% {
    opacity: 0;
    filter: blur(9px);
    transform: translateY(10px);
  }

  55% {
    opacity: 1;
    text-shadow:
      0 0 12px rgba(255, 241, 176, 0.9),
      0 0 32px rgba(242, 196, 111, 0.36);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    text-shadow: 0 0 0 transparent;
  }
}

@keyframes oracle-line-spark {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
  }

  36% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-50%) scaleX(1);
  }
}

@keyframes oracle-action-arrive {
  0% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(14px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes seal-press {
  0% {
    filter: brightness(1);
    transform: translateY(0);
  }

  34% {
    filter: brightness(1.22);
    transform: translateY(3px) scale(0.985);
  }

  100% {
    filter: brightness(1);
    transform: translateY(1px);
  }
}

@keyframes ritual-submit-aura {
  0% {
    opacity: 0.86;
    transform: scale(0.82);
  }

  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes ritual-button-sweep {
  0% {
    opacity: 0;
    transform: translateX(0) skewX(-18deg);
  }

  24% {
    opacity: 0.86;
  }

  100% {
    opacity: 0;
    transform: translateX(430%) skewX(-18deg);
  }
}

@keyframes inscription-focus {
  0% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.12);
  }

  100% {
    filter: brightness(1);
  }
}

@keyframes inscription-flow {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

@keyframes inscription-edge-sweep {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    clip-path: inset(0);
  }
}

@keyframes ritual-line-flow {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes ritual-drop-flow {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0.96;
    transform: scaleY(1);
  }
}

@keyframes card-project-pulse {
  0% {
    filter: brightness(1);
    transform: translateY(0);
  }

  36% {
    filter: brightness(1.24) saturate(1.22);
    transform: translateY(-8px);
    box-shadow:
      0 0 0 1px rgba(242, 196, 111, 0.28),
      0 0 46px rgba(242, 196, 111, 0.32);
  }

  100% {
    filter: brightness(1);
    transform: translateY(0);
  }
}

@keyframes card-light-beam {
  0% {
    opacity: 0;
    transform: translateX(0) scaleX(0.18);
  }

  24% {
    opacity: 1;
  }

  78% {
    opacity: 0.72;
    transform: translateX(42px) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: translateX(120px) scaleX(0.2);
  }
}

@keyframes reading-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spread-constellation-line {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.08);
  }

  34% {
    opacity: 1;
  }

  100% {
    opacity: 0.92;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes mirror-ripple {
  0% {
    opacity: 0.32;
    transform: translate(-50%, -50%) scale(0.86);
  }

  50% {
    opacity: 0.72;
  }

  100% {
    opacity: 0.32;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes mirror-mist {
  from {
    opacity: 0.24;
    transform: translate(-51%, -50%) scale(0.96);
  }

  to {
    opacity: 0.42;
    transform: translate(-49%, -51%) scale(1.05);
  }
}

@keyframes mirror-focus {
  0% {
    filter: blur(6px) brightness(0.84);
  }

  100% {
    filter: blur(0) brightness(1);
  }
}

@keyframes sealed-to-journal {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gold-dust-seal {
  0% {
    opacity: 0;
    transform: translateX(0) skewX(-18deg);
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(520%) skewX(-18deg);
  }
}

@keyframes journal-page-turn {
  0% {
    opacity: 0;
    transform: perspective(700px) rotateX(7deg) translateY(10px);
    transform-origin: top center;
  }

  100% {
    opacity: 1;
    transform: perspective(700px) rotateX(0) translateY(0);
  }
}

.calendar-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-head strong {
  text-align: center;
}

.calendar-module {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 16%, rgba(242, 196, 111, 0.12), transparent 30rem),
    radial-gradient(circle at 18% 86%, rgba(155, 186, 210, 0.08), transparent 26rem),
    linear-gradient(180deg, rgba(10, 10, 13, 0.9), rgba(38, 27, 17, 0.82)),
    rgba(33, 28, 24, 0.78);
}

.calendar-module::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 0;
  width: min(1040px, 110vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 46%, rgba(242, 196, 111, 0.08) 46.2% 46.7%, transparent 47% 66%),
    repeating-conic-gradient(from -6deg, rgba(242, 196, 111, 0.18) 0deg 0.7deg, transparent 0.9deg 18deg);
  opacity: 0.26;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.calendar-module .module-heading {
  position: relative;
  z-index: 3;
}

.journal-book {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  height: clamp(150px, 24vw, 260px);
  margin: 0 auto clamp(22px, 4vw, 40px);
  perspective: 1000px;
}

.book-shadow,
.book-page,
.book-cover,
.book-spine {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.book-shadow {
  width: 74%;
  height: 22%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  filter: blur(22px);
  transform: translate(-50%, 92%);
  animation: book-shadow-open 1200ms ease both;
}

.book-page {
  width: 38%;
  height: 70%;
  border: 1px solid rgba(242, 196, 111, 0.2);
  background:
    linear-gradient(90deg, rgba(68, 47, 29, 0.18), transparent 18%),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(89, 69, 45, 0.18) 18px),
    linear-gradient(135deg, #efe4cf, #c9ad7a);
  box-shadow:
    inset 0 0 24px rgba(79, 57, 32, 0.26),
    0 22px 42px rgba(0, 0, 0, 0.26);
  opacity: 0;
  transform-origin: center;
  animation: book-page-glow 980ms ease 260ms both;
}

.book-page-left {
  border-radius: 12px 3px 3px 12px;
  transform: translate(-100%, -50%) rotateY(10deg) rotateZ(-2deg);
}

.book-page-right {
  border-radius: 3px 12px 12px 3px;
  transform: translate(0, -50%) rotateY(-10deg) rotateZ(2deg);
}

.book-cover {
  width: 39%;
  height: 74%;
  border: 1px solid rgba(242, 196, 111, 0.24);
  background:
    radial-gradient(circle at 50% 28%, rgba(242, 196, 111, 0.26), transparent 20%),
    linear-gradient(145deg, #59401f, #171b1c 56%, #8a6734);
  box-shadow:
    inset 0 0 20px rgba(242, 196, 111, 0.12),
    0 26px 46px rgba(0, 0, 0, 0.34);
  transform-style: preserve-3d;
}

.book-cover::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 241, 176, 0.24);
  border-radius: 7px;
}

.book-cover-left {
  border-radius: 12px 4px 4px 12px;
  transform-origin: right center;
  animation: book-left-open 1200ms cubic-bezier(0.2, 0.7, 0.22, 1) both;
}

.book-cover-right {
  border-radius: 4px 12px 12px 4px;
  transform-origin: left center;
  animation: book-right-open 1200ms cubic-bezier(0.2, 0.7, 0.22, 1) both;
}

.book-spine {
  z-index: 3;
  width: 10px;
  height: 74%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 241, 176, 0.55), rgba(128, 96, 53, 0.28));
  box-shadow: 0 0 22px rgba(242, 196, 111, 0.32);
  transform: translate(-50%, -50%) scaleY(0);
  animation: book-spine-rise 900ms ease 420ms both;
}

.calendar-book-pages {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(242, 196, 111, 0.18);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 30px);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 241, 176, 0.09), transparent 22rem),
    linear-gradient(90deg, rgba(109, 82, 49, 0.16), transparent 11%, transparent 89%, rgba(109, 82, 49, 0.13)),
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(89, 69, 45, 0.12) 27px, transparent 28px),
    linear-gradient(135deg, rgba(242, 196, 111, 0.08), transparent 30%),
    rgba(239, 228, 207, 0.08);
  box-shadow:
    inset 0 0 44px rgba(242, 196, 111, 0.05),
    0 22px 54px rgba(0, 0, 0, 0.22);
  animation: book-content-rise 780ms ease 520ms both;
}

body[data-ritual-phase="journal"] .journal-book {
  filter: drop-shadow(0 0 34px rgba(242, 196, 111, 0.22));
}

body[data-ritual-phase="journal"] .calendar-book-pages {
  animation:
    book-content-rise 780ms ease 520ms both,
    journal-page-glow 1400ms ease both;
}

.icon-button {
  padding: 0;
  font-size: 1.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.weekday {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-height: 48px;
  border: 1px solid rgba(244, 238, 230, 0.12);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 241, 176, 0.04), transparent 62%),
    rgba(255, 255, 255, 0.035);
  transition:
    transform 140ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.calendar-day.has-entry {
  border-color: rgba(216, 166, 87, 0.58);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 241, 176, 0.2), transparent 64%),
    rgba(216, 166, 87, 0.1);
  box-shadow:
    inset 0 0 18px rgba(242, 196, 111, 0.07),
    0 0 20px rgba(242, 196, 111, 0.1);
}

.calendar-day:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 196, 111, 0.5);
}

.calendar-day i {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(255, 241, 176, 0.82);
  background:
    radial-gradient(circle at 70% 35%, transparent 0 34%, rgba(255, 241, 176, 0.94) 36% 100%);
  box-shadow:
    0 0 12px rgba(255, 241, 176, 0.48),
    0 0 24px rgba(242, 196, 111, 0.26);
  transform: translateX(-50%) rotate(-18deg);
}

.journal-list {
  margin-top: 14px;
  color: var(--muted);
}

.journal-list article {
  position: relative;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(242, 196, 111, 0.18);
  padding: 20px 0 18px 26px;
  animation: journal-page-turn 520ms ease both;
}

.journal-list article::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 241, 176, 0.88);
  box-shadow:
    0 0 14px rgba(255, 241, 176, 0.66),
    0 0 30px rgba(242, 196, 111, 0.3);
}

.journal-list strong {
  color: var(--text);
  font-size: clamp(1.12rem, 1.6vw, 1.45rem);
}

.journal-list p {
  max-width: 780px;
  margin: 0;
  color: rgba(244, 238, 230, 0.78);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(1rem, 1.15vw, 1.16rem);
  line-height: 1.75;
}

.journal-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journal-list div span {
  border: 1px solid rgba(242, 196, 111, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(216, 166, 87, 0.08);
  color: rgba(244, 238, 230, 0.72);
  font-size: 0.82rem;
}

@keyframes book-left-open {
  0% {
    transform: translate(-50%, -50%) rotateY(0deg) rotateZ(0deg);
  }

  100% {
    transform: translate(-99%, -50%) rotateY(30deg) rotateZ(-4deg);
  }
}

@keyframes book-right-open {
  0% {
    transform: translate(-50%, -50%) rotateY(0deg) rotateZ(0deg);
  }

  100% {
    transform: translate(0, -50%) rotateY(-30deg) rotateZ(4deg);
  }
}

@keyframes book-page-glow {
  0% {
    opacity: 0;
    filter: brightness(0.7);
  }

  100% {
    opacity: 0.9;
    filter: brightness(1);
  }
}

@keyframes book-spine-rise {
  to {
    transform: translate(-50%, -50%) scaleY(1);
  }
}

@keyframes book-shadow-open {
  0% {
    opacity: 0.18;
    transform: translate(-50%, 74%) scaleX(0.42);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, 92%) scaleX(1);
  }
}

@keyframes book-content-rise {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes journal-page-glow {
  0% {
    box-shadow:
      inset 0 0 44px rgba(242, 196, 111, 0.05),
      0 22px 54px rgba(0, 0, 0, 0.22);
  }

  45% {
    box-shadow:
      inset 0 0 54px rgba(242, 196, 111, 0.12),
      0 0 54px rgba(242, 196, 111, 0.18),
      0 22px 54px rgba(0, 0, 0, 0.22);
  }

  100% {
    box-shadow:
      inset 0 0 44px rgba(242, 196, 111, 0.05),
      0 22px 54px rgba(0, 0, 0, 0.22);
  }
}

@media (max-width: 980px) {
  .workspace,
  .question-module,
  .camera-module,
  .deck-module,
  .reading-module,
  .calendar-module,
  .cards-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-cards {
    grid-column: auto;
    min-height: 240px;
    width: min(420px, 100%);
    margin: 8px auto 0;
  }

  .meteor-field span {
    left: 86%;
    top: 16%;
    width: clamp(70px, 22vw, 130px);
  }

  .question-module,
  .camera-module,
  .deck-module,
  .reading-module,
  .calendar-module {
    grid-column: auto;
  }

  .module {
    min-height: calc(100vh - 36px);
  }

  .question-module {
    grid-template-columns: 1fr;
  }

  .question-module .module-heading,
  .question-field,
  .ritual-desk,
  .prompt-suggestions,
  .question-module .actions,
  .question-status {
    grid-column: auto;
  }

  .ritual-sundial {
    left: -38%;
    top: 30%;
    width: 120vw;
  }

  .ritual-circuit {
    left: 12%;
    right: 12%;
    bottom: 30px;
  }

  .reading-module::before {
    right: -42vw;
    top: 34%;
    width: 116vw;
    opacity: 0.28;
  }

  .reading-evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .meteor-field span,
  .camera-stage.camera-on::before,
  .ritual-circuit::before,
  .ritual-circuit::after,
  .book-cover-left,
  .book-cover-right,
  .book-page,
  .book-shadow,
  .book-spine,
  .calendar-book-pages,
  .cards-grid.projecting .tarot-card,
  .cards-grid.projecting .tarot-card::after,
  .deck-module::after,
  .reading-output.is-loading .oracle-ritual::before,
  .reading-output.is-loading .oracle-ritual::after,
  .reading-output.is-revealed .reading-summary,
  .oracle-line,
  .oracle-line::after,
  .oracle-action,
  .camera-slot.filled,
  .reading-saved,
  .reading-saved::after,
  .journal-list article {
    animation: none;
  }

  .meteor-field span {
    display: none;
  }

  .oracle-line {
    opacity: 1;
    filter: none;
    transform: none;
    text-shadow: none;
  }

  .oracle-action {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 14px;
  }

  .hero,
  .module {
    min-height: auto;
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .camera-stage {
    min-height: 74vh;
  }

  #camera-feed {
    height: 68vh;
  }

  .orbit-card {
    width: clamp(46px, 15vw, 70px);
  }

  .camera-slots {
    bottom: 68px;
    width: min(96%, 420px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .camera-slot {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 74px;
    gap: 2px 7px;
    padding: 9px 8px;
  }

  .camera-slot::before,
  .camera-slot img {
    width: 30px;
  }

  .camera-slot i {
    font-size: 0.68rem;
  }

  .camera-slot b {
    display: block;
    max-width: 100%;
    font-size: 0.66rem;
  }

  .camera-readout {
    bottom: 16px;
    max-width: calc(100% - 24px);
    font-size: 0.78rem;
  }

  .reading-output {
    padding: 16px;
  }

  .reading-summary {
    gap: 14px;
    padding: 18px 16px 20px 18px;
  }

  .reading-dossier-head {
    align-items: start;
    gap: 8px;
  }

  .reading-dossier-subtitle {
    text-align: left;
  }

  .reading-evidence {
    grid-template-columns: 1fr;
  }

  .reading-summary::before {
    left: 9px;
    top: 24px;
  }

  .reading-summary p {
    font-size: 1rem;
    line-height: 1.92;
  }

  .oracle-action {
    padding: 12px;
  }

  .auto-save-consent {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .auto-save-consent input {
    width: 38px;
    height: 22px;
  }

  .auto-save-consent input::after {
    width: 14px;
    height: 14px;
  }

  .auto-save-consent input:checked::after {
    transform: translate(16px, -50%);
  }

  h1 {
    font-size: 3.05rem;
  }

  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-cards {
    min-height: 210px;
  }

  .hero-cards span {
    width: 122px;
  }

  .empty-spread {
    grid-template-columns: 1fr;
  }

  .empty-spread span {
    min-height: 150px;
    grid-template-columns: 84px 1fr;
    justify-items: start;
    padding: 16px;
  }

  .empty-spread span::before {
    width: 72px;
  }

  .tarot-card {
    grid-template-columns: minmax(104px, 122px) minmax(0, 1fr);
    gap: 12px;
    min-height: 226px;
  }

  .card-visual {
    width: min(31vw, 122px);
  }

  .card-reading h3 {
    font-size: 1.08rem;
  }

  .orientation,
  .keywords,
  .meaning {
    font-size: 0.8rem;
  }

  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 42px;
    padding: 0;
  }

  .journal-list article {
    padding-left: 20px;
  }
}
