.crystalized-ball {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
}

.future-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 36px 48px;
  align-items: center;
}

.future-stage.is-ritual {
  grid-template-columns: 1fr;
  justify-items: center;
}

.future-stage.is-ritual .future-shell {
  order: 2;
  max-width: 640px;
  text-align: center;
}

.future-stage.is-ritual .future-shell h2 {
  max-width: none;
}

.future-stage.is-ritual .future-orb-wrap {
  order: 1;
  width: min(560px, 86vw);
}

.future-orb-wrap {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1;
  height: auto;
  min-height: 0;
  justify-self: center;
  isolation: isolate;
}

.orb-glass,
.orb-fallback,
.future-orb,
.orb-wish {
  position: absolute;
  inset: 0;
  margin: auto;
}

.orb-glass {
  width: min(100%, 100%);
  height: min(100%, 100%);
  pointer-events: none;
  z-index: 3;
}

.orb-glass-bowl,
.orb-glass-rim,
.orb-glass-shine,
.orb-glass-aura {
  position: absolute;
  border-radius: 50%;
}

.orb-glass-aura {
  inset: 4%;
  background: radial-gradient(circle, rgba(242, 91, 208, 0.22), transparent 68%);
  filter: blur(18px);
  animation: orb-breathe 4.6s ease-in-out infinite;
}

.orb-glass-bowl {
  inset: 11%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.28), transparent 26%),
    radial-gradient(circle at 50% 72%, rgba(242, 91, 208, 0.16), rgba(159, 227, 223, 0.08) 42%, rgba(7, 9, 13, 0.08) 70%);
  box-shadow:
    inset 0 -28px 48px rgba(7, 9, 13, 0.35),
    inset 0 18px 32px rgba(255, 255, 255, 0.12);
}

.orb-glass-rim {
  inset: 10%;
  border: 2px solid rgba(255, 214, 244, 0.55);
  box-shadow:
    0 0 0 1px rgba(159, 227, 223, 0.22),
    0 0 28px rgba(242, 91, 208, 0.45),
    0 0 64px rgba(159, 227, 223, 0.18),
    inset 0 0 24px rgba(242, 91, 208, 0.18);
}

.orb-glass-shine {
  inset: 16% 38% auto 18%;
  height: 22%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent);
  filter: blur(2px);
  opacity: 0.7;
}

.future-orb-wrap.is-lit .orb-glass-aura {
  background: radial-gradient(circle, rgba(255, 211, 110, 0.28), rgba(242, 91, 208, 0.2), transparent 70%);
}

.future-orb-wrap.is-lit .orb-glass-rim {
  border-color: rgba(255, 236, 176, 0.8);
  box-shadow:
    0 0 0 1px rgba(159, 227, 223, 0.35),
    0 0 36px rgba(242, 91, 208, 0.7),
    0 0 80px rgba(255, 211, 110, 0.28),
    inset 0 0 28px rgba(159, 227, 223, 0.22);
}

.orb-fallback {
  inset: 11%;
  width: 78%;
  height: 78%;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
}

.future-orb {
  inset: 11%;
  width: 78%;
  height: 78%;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
}

.future-orb canvas {
  pointer-events: auto;
  border-radius: 50%;
}

.orb-wish {
  inset: 22%;
  z-index: 4;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 8%;
  text-align: center;
  pointer-events: none;
  overflow: hidden;
  clip-path: circle(48% at 50% 50%);
  font-family: "Caveat", cursive;
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #fff8f2;
  opacity: 0;
  transform: scale(0.86);
  filter: blur(8px);
  transition: opacity 0.8s var(--ease, ease), transform 0.9s var(--ease, ease), filter 0.9s ease;
}

.orb-wish-line {
  display: block;
  max-width: 11em;
}

.orb-word {
  display: inline-block;
  white-space: nowrap;
}

.orb-wish.is-on {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.orb-wish span {
  display: inline-block;
  animation: wish-glyph 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.07s);
  text-shadow:
    0 0 8px currentColor,
    0 0 22px color-mix(in srgb, currentColor 70%, #F25BD0);
}

.orb-wish .orb-space {
  display: inline;
  animation: none;
  text-shadow: none;
}

@keyframes wish-glyph {
  0%, 100% {
    color: #ffd6f4;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  25% {
    color: #9fe3df;
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.25);
  }
  50% {
    color: #ffd36e;
    transform: translateY(0) scale(1);
    filter: brightness(1.15);
  }
  75% {
    color: #c9b4ff;
    transform: translateY(-1px) scale(1.03);
    filter: brightness(1.2);
  }
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

.wish-sheet {
  position: fixed;
  z-index: 48;
  width: min(320px, 78vw);
  padding: 22px 24px 26px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.97), rgba(244, 240, 232, 0.96));
  color: #3a241c;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(192, 122, 58, 0.18);
  transform-origin: center center;
  transition:
    transform 1.15s cubic-bezier(0.22, 0.84, 0.28, 1),
    opacity 0.85s ease 0.2s,
    filter 1.15s ease;
}

.wish-sheet[hidden] {
  display: none;
}

.wish-sheet-kicker {
  margin: 0 0 10px;
  font-family: "Geologica", sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(192, 122, 58, 0.82);
}

.wish-sheet-body {
  margin: 0;
  font-family: "Caveat", cursive;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
}

.wish-sheet.is-fly {
  opacity: 0;
  filter: blur(10px) saturate(1.4);
}

@media (max-width: 980px) {
  .future-stage {
    grid-template-columns: 1fr;
  }

  .future-orb-wrap {
    order: -1;
    width: min(420px, 92vw);
  }
}

@media (max-width: 640px) {
  .future-orb-wrap {
    width: min(340px, 92vw);
  }

  .orb-wish {
    inset: 24%;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb-wish span,
  .orb-glass-aura {
    animation: none;
  }

  .orb-wish,
  .wish-sheet {
    transition: none;
  }
}
