/* ============================================================
   ASTRAEA — cinematic landing
   ============================================================ */

:root {
  --void: #07040f;
  --ivory: #f3ead8;
  --gold: #e4c36a;
  --gold-dim: rgba(228, 195, 106, 0.45);
  --teal: #5ff0e0;
  --ink: #0b0714;
  --font-brand: "Cinzel", "Noto Serif SC", serif;
  --font-serif: "Noto Serif SC", "Cinzel", serif;
  --font-mincho: "Noto Serif SC", "Cinzel", serif;
  --font-ui: "Noto Sans SC", "Hiragino Sans", sans-serif;
  --orb-size: min(38vh, 32vw, 340px);
  --rx: 36vw;
  --ry: 40vh;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--ivory);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scrollbar-width: none; }
body::-webkit-scrollbar { display: none; }

img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }

button, input, a {
  font-family: inherit;
}

:focus { outline: none; }
:focus-visible {
  outline: 1.5px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Stage ---------- */

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  animation: stageIn 1.4s var(--ease-out) both;
}

@keyframes stageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bg {
  position: absolute;
  inset: -6%;
  background: var(--void) url("../assets/bg-isekai.webp") center / cover no-repeat;
  transform-origin: 52% 46%;
  animation: kenburns 36s ease-in-out infinite alternate;
  z-index: 0;
  will-change: transform;
}

@keyframes kenburns {
  from { transform: scale(1.04) translate(0.4%, 0); }
  to   { transform: scale(1.14) translate(-1.6%, -1.1%); }
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 52% at 50% 48%,
      rgba(7, 4, 15, 0.08) 0%,
      rgba(7, 4, 15, 0.28) 38%,
      rgba(7, 4, 15, 0.72) 68%,
      rgba(7, 4, 15, 0.92) 86%,
      #07040f 100%),
    linear-gradient(to bottom, rgba(7,4,15,0.55) 0%, transparent 18%, transparent 82%, rgba(7,4,15,0.75) 100%);
}

#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.9'/></svg>");
  background-size: 180px 180px;
}

/* ---------- Brand ---------- */

.brand {
  position: absolute;
  top: 2.6vh;
  left: 0;
  right: 0;
  z-index: 30;
  text-align: center;
  pointer-events: none;
  animation: fadeDown 1.3s var(--ease-out) 0.15s both;
}

.brand-en {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  letter-spacing: 0.62em;
  color: var(--ivory);
  text-indent: 0.62em;
  line-height: 1;
  text-shadow:
    0 0 24px rgba(228, 195, 106, 0.35),
    0 2px 18px rgba(0, 0, 0, 0.8);
}

.brand-zh {
  font-family: var(--font-mincho);
  font-weight: 400;
  font-size: clamp(0.62rem, 1.05vw, 0.82rem);
  letter-spacing: 0.82em;
  text-indent: 0.82em;
  color: var(--gold);
  margin-top: 0.45em;
  opacity: 0.88;
}

/* ---------- Hero copy (near orb, below it) ---------- */

.hero-copy {
  position: absolute;
  left: 50%;
  top: calc(50% + (var(--orb-size) * 0.56) + 1.6vh);
  transform: translateX(-50%);
  z-index: 22;
  text-align: center;
  pointer-events: none;
  width: min(22.5em, 38vw);
  animation: fadeUpCenter 1.4s var(--ease-out) 0.45s both;
}

.tagline {
  font-family: var(--font-mincho);
  font-weight: 500;
  font-size: clamp(0.98rem, 1.85vw, 1.48rem);
  letter-spacing: 0.18em;
  line-height: 1.45;
  color: var(--ivory);
  text-shadow: 0 2px 16px rgba(0,0,0,0.85), 0 0 30px rgba(7,4,15,0.6);
}

.gold-rule {
  width: 4.6rem;
  height: 1px;
  margin: 0.7em auto 0.75em;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.9;
  box-shadow: 0 0 8px rgba(228, 195, 106, 0.45);
}

.gold-rule--sm { width: 3.2rem; margin: 0.45em auto 1.1em; }

.tagline-sub {
  font-family: var(--font-mincho);
  font-weight: 400;
  font-size: clamp(0.58rem, 0.82vw, 0.72rem);
  letter-spacing: 0.08em;
  line-height: 1.75;
  color: rgba(243, 234, 216, 0.72);
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}

/* ---------- Constellation ---------- */

.constellation {
  position: absolute;
  inset: 0;
  z-index: 10;
  --cx: 50%;
  --cy: 50%;
}

/* ===== Crystal ball ===== */

.orb {
  --orb: var(--orb-size);
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: var(--orb);
  height: var(--orb);
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  animation: orbIn 1.6s var(--ease-out) 0.2s both;
}

@keyframes orbIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.72); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.orb-glow,
.orb-glow-gold,
.orb-flare,
.orb-ring,
.orb-ring-2 {
  pointer-events: none;
}

.orb-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 210%;
  height: 210%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(95, 240, 224, 0.42) 0%,
    rgba(95, 240, 224, 0.16) 28%,
    rgba(80, 140, 180, 0.06) 52%,
    transparent 70%);
  animation: glowPulse 4.8s ease-in-out infinite;
  z-index: 0;
}

.orb-glow-gold {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 170%;
  height: 170%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(228, 195, 106, 0.18) 0%,
    rgba(228, 195, 106, 0.05) 40%,
    transparent 65%);
  animation: glowPulse 6.2s ease-in-out infinite reverse;
  z-index: 0;
}

.orb-flare {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, rgba(95,240,224,0.25) 22%, transparent 58%);
  opacity: 0;
  z-index: 1;
  animation: flare 6.2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.07); }
}

@keyframes flare {
  0%, 78%, 100% { opacity: 0; transform: scale(0.85); }
  84% { opacity: 0.55; transform: scale(1.05); }
  90% { opacity: 0.12; transform: scale(1.18); }
}

.orb-ring,
.orb-ring-2 {
  position: absolute;
  left: 50%;
  top: 50%;
  overflow: visible;
}

.orb-ring {
  width: 148%;
  height: 148%;
  transform: translate(-50%, -50%);
  animation: spin 42s linear infinite;
  z-index: 3;
  filter: drop-shadow(0 0 4px rgba(95, 240, 224, 0.35));
}

.orb-ring-2 {
  width: 168%;
  height: 168%;
  transform: translate(-50%, -50%);
  animation: spin-rev 56s linear infinite;
  z-index: 3;
  filter: drop-shadow(0 0 3px rgba(228, 195, 106, 0.4));
}

.rune-text {
  fill: rgba(243, 234, 216, 0.72);
  font-size: 6.2px;
  letter-spacing: 2.4px;
  font-family: var(--font-brand);
}

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

.orb-glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  z-index: 4;
  isolation: isolate;
  background: transparent;
  box-shadow:
    inset 0 0 36px rgba(95, 240, 224, 0.28),
    inset 14px 18px 40px rgba(0, 0, 0, 0.62),
    inset -12px -16px 32px rgba(228, 195, 106, 0.12),
    inset 0 -28px 36px rgba(8, 4, 22, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 0 1.5px rgba(180, 230, 220, 0.22),
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(95, 240, 224, 0.28);
  animation: breathe 5.5s ease-in-out infinite;
  will-change: transform;
}

.orb-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 104%;
  height: 104%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: 50% 50%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

.orb-core {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 40%,
      rgba(95, 240, 224, 0.22) 0%,
      rgba(70, 90, 180, 0.12) 35%,
      rgba(20, 10, 50, 0.0) 70%);
  filter: blur(10px);
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
}

.orb-nebula,
.orb-nebula-2 {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
}

.orb-nebula {
  background: conic-gradient(from 20deg,
    transparent 0deg,
    rgba(95, 240, 224, 0.38) 40deg,
    transparent 80deg,
    rgba(140, 90, 255, 0.28) 130deg,
    transparent 175deg,
    rgba(228, 195, 106, 0.22) 220deg,
    transparent 270deg,
    rgba(60, 180, 220, 0.3) 320deg,
    transparent 360deg);
  filter: blur(14px);
  animation: swirl 12s linear infinite;
  mix-blend-mode: screen;
  opacity: 0.38;
}

.orb-nebula-2 {
  background: conic-gradient(from 200deg,
    transparent 0deg,
    rgba(255, 180, 220, 0.18) 50deg,
    transparent 100deg,
    rgba(95, 240, 224, 0.22) 160deg,
    transparent 220deg,
    rgba(180, 140, 255, 0.2) 290deg,
    transparent 360deg);
  filter: blur(18px);
  animation: swirl-rev 18s linear infinite;
  mix-blend-mode: overlay;
  opacity: 0.32;
}

@keyframes swirl { to { transform: rotate(360deg); } }
@keyframes swirl-rev { to { transform: rotate(-360deg); } }

.orb-galaxy {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background-image:
    radial-gradient(1.1px 1.1px at 18% 28%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 72% 22%, var(--teal), transparent),
    radial-gradient(1px 1px at 44% 16%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 82% 48%, var(--gold), transparent),
    radial-gradient(0.9px 0.9px at 30% 62%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 60% 70%, var(--teal), transparent),
    radial-gradient(1px 1px at 12% 52%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.1px 1.1px at 88% 32%, #fff, transparent),
    radial-gradient(0.8px 0.8px at 52% 40%, var(--gold), transparent),
    radial-gradient(1.2px 1.2px at 38% 78%, var(--teal), transparent),
    radial-gradient(1px 1px at 68% 14%, #fff, transparent),
    radial-gradient(0.9px 0.9px at 24% 44%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 76% 66%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 48% 88%, var(--gold), transparent);
  opacity: 0.5;
  animation: galaxyTwinkle 5.4s ease-in-out infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes galaxyTwinkle {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

.orb-equator {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 46%;
  height: 16%;
  border-radius: 50%;
  background: linear-gradient(to bottom,
    transparent,
    rgba(0, 0, 0, 0.16) 48%,
    transparent);
  filter: blur(5px);
  opacity: 0.45;
  pointer-events: none;
}

.orb-caustic {
  position: absolute;
  width: 52%;
  height: 22%;
  left: 28%;
  bottom: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(95, 240, 224, 0.28) 0%, transparent 70%);
  filter: blur(6px);
  mix-blend-mode: screen;
}

.orb-specular {
  position: absolute;
  width: 42%;
  height: 28%;
  top: 10%;
  left: 16%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.38) 32%,
    transparent 70%);
  filter: blur(1.2px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.orb-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 10px 18px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.orb-label {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -42%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78%;
  pointer-events: none;
  opacity: 1;
  transition: transform 0.4s var(--ease-out), opacity 0.35s ease;
}

.orb-label-scrim {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 118%;
  height: 4.6em;
  border-radius: 50%;
  background: radial-gradient(ellipse 70% 58% at 50% 50%,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.28) 48%,
    transparent 72%);
  z-index: 0;
  pointer-events: none;
  transition: background 0.35s ease, opacity 0.35s ease;
}

.orb-label-rule {
  position: relative;
  z-index: 1;
  width: 3.6em;
  height: 1px;
  margin-bottom: 0.42em;
  background: linear-gradient(90deg, transparent, #ffe9a0, transparent);
  box-shadow: 0 0 8px rgba(228, 195, 106, 0.85);
}

.orb-label-word {
  position: relative;
  z-index: 1;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.1vw, 1.75rem);
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  color: #ffe9a0;
  white-space: nowrap;
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(228, 195, 106, 0.95), 0 2px 8px #000;
  transition: transform 0.35s var(--ease-out), text-shadow 0.35s ease;
}

.orb-label-cap {
  position: relative;
  z-index: 1;
  margin-top: 0.38em;
  font-family: var(--font-mincho);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: #f3ead8;
  opacity: 0.92;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(228, 195, 106, 0.45), 0 2px 6px #000;
}

.orb:hover .orb-label,
.orb:focus-visible .orb-label {
  transform: translate(-50%, -42%) scale(1.07);
}

.orb:hover .orb-label-scrim,
.orb:focus-visible .orb-label-scrim {
  background: radial-gradient(ellipse 78% 64% at 50% 50%,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 74%);
}

.orb:hover .orb-label-word,
.orb:focus-visible .orb-label-word {
  text-shadow:
    0 0 26px rgba(228, 195, 106, 1),
    0 0 42px rgba(255, 233, 160, 0.55),
    0 2px 8px #000;
}

.orb:hover .orb-glass,
.orb:focus-visible .orb-glass {
  animation: breathe 2.4s ease-in-out infinite;
  box-shadow:
    inset 0 0 42px rgba(95, 240, 224, 0.42),
    inset 14px 18px 40px rgba(0, 0, 0, 0.55),
    inset -12px -16px 32px rgba(228, 195, 106, 0.2),
    inset 0 -28px 36px rgba(8, 4, 22, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 1.5px rgba(200, 255, 245, 0.4),
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(95, 240, 224, 0.5);
}

.orb:hover .orb-glow,
.orb:focus-visible .orb-glow { opacity: 1; filter: brightness(1.35); }

.orb:hover .orb-nebula,
.orb:focus-visible .orb-nebula { animation-duration: 6s; }

.orb:hover .orb-nebula-2,
.orb:focus-visible .orb-nebula-2 { animation-duration: 9s; }

.orb:focus-visible {
  outline: none;
}
.orb:focus-visible .orb-glass {
  box-shadow:
    inset 0 0 42px rgba(95, 240, 224, 0.42),
    0 0 0 2px var(--gold),
    0 0 80px rgba(95, 240, 224, 0.5);
}

/* Portal open */
.orb.is-opening { pointer-events: none; }
.orb.is-opening .orb-glass {
  animation: portalFlash 0.85s ease-out forwards;
}
.orb.is-opening .orb-ring {
  animation: ringExpand 0.9s var(--ease-out) forwards;
}
.orb.is-opening .orb-ring-2 {
  animation: ringExpand2 0.95s var(--ease-out) forwards;
}
.orb.is-opening .orb-glow,
.orb.is-opening .orb-glow-gold {
  animation: glowBurst 0.8s ease-out forwards;
}
.orb.is-opening .orb-label { opacity: 0; }

@keyframes portalFlash {
  0%   { filter: brightness(1) saturate(1); transform: scale(1); opacity: 1; }
  35%  { filter: brightness(2.8) saturate(0.55); transform: scale(1.08); }
  100% { filter: brightness(4) saturate(0.2); transform: scale(1.45); opacity: 0; }
}
@keyframes ringExpand {
  to { transform: translate(-50%, -50%) rotate(50deg) scale(2.35); opacity: 0; }
}
@keyframes ringExpand2 {
  to { transform: translate(-50%, -50%) rotate(-40deg) scale(2.6); opacity: 0; }
}
@keyframes glowBurst {
  50% { opacity: 1; filter: brightness(2); transform: translate(-50%, -50%) scale(1.35); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7); }
}

.stage.is-receding .orb:not(.is-opening) {
  opacity: 0.15;
  filter: blur(8px);
  transition: opacity 0.7s ease, filter 0.7s ease;
}
.stage.is-receding .orb.is-opening { opacity: 0; }

/* ---------- Mirrors ---------- */

.mirror {
  --size: clamp(108px, 13.2vw, 188px);
  --rot: 0deg;
  --x: 0px;
  --y: 0px;
  --accent: var(--gold);
  --accent-2: var(--teal);
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: var(--size);
  height: var(--size);
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--rot));
  z-index: 8;
  pointer-events: auto;
  cursor: default;
  opacity: 0;
  animation: shardIn 1.15s var(--ease-out) calc(0.35s + var(--i) * 0.1s) forwards;
  transition: transform 0.55s var(--ease-out), filter 0.45s ease, z-index 0s;
}

@keyframes shardIn {
  from { opacity: 0; filter: blur(8px); }
  to   { opacity: 1; filter: blur(0); }
}

.mirror-float {
  width: 100%;
  height: 100%;
  animation: floatDrift 9s ease-in-out infinite;
}

@keyframes floatDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(4px, -12px) rotate(0.7deg); }
  50% { transform: translate(-5px, -6px) rotate(-0.55deg); }
  75% { transform: translate(3px, -14px) rotate(0.35deg); }
}

.mirror-shard {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: transparent;
  transform-style: preserve-3d;
}
.mirror-plate {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform: translate(8px, 10px);
  background:
    linear-gradient(155deg,
      rgba(210, 225, 235, 0.38) 0%,
      rgba(70, 85, 105, 0.7) 42%,
      rgba(18, 22, 32, 0.92) 100%);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.5),
    2px 3px 0 rgba(160, 185, 200, 0.18);
  filter: brightness(0.62) saturate(0.7);
}
.mirror-cut {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(12, 10, 20, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -10px 18px rgba(0, 0, 0, 0.28),
    inset 8px 0 14px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.16),
    2px 3px 0 rgba(190, 210, 220, 0.28),
    5px 7px 0 rgba(80, 100, 120, 0.22),
    8px 12px 22px rgba(0, 0, 0, 0.45),
    0 0 22px color-mix(in srgb, var(--accent) 38%, transparent);
}

.mirror-img {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: brightness(0.88) contrast(1.08) saturate(0.82);
  transition: filter 0.5s ease;
}

.mirror-glass {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(155deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.12) 22%,
      transparent 42%),
    linear-gradient(320deg,
      transparent 50%,
      rgba(180, 220, 255, 0.12) 78%,
      rgba(255, 255, 255, 0.18) 100%),
    linear-gradient(to top, rgba(7, 4, 15, 0.4) 0%, transparent 42%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.4s ease;
}

.mirror-shimmer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 32%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 68%);
  transform: translateX(-130%) skewX(-18deg);
  animation: shimmer 10s ease-in-out infinite;
  mix-blend-mode: overlay;
}

@keyframes shimmer {
  0%, 62% { transform: translateX(-130%) skewX(-18deg); }
  82%, 100% { transform: translateX(130%) skewX(-18deg); }
}

.mirror figcaption {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: -2.05em;
  z-index: 12;
  width: max-content;
  padding: 0.12em 0.45em;
  font-family: var(--font-mincho);
  font-size: clamp(0.68rem, 0.95vw, 0.86rem);
  letter-spacing: 0.1em;
  text-align: center;
  color: #fff6e4;
  text-shadow: 0 1px 8px rgba(0,0,0,0.95), 0 0 14px rgba(7,4,15,1), 0 0 2px #000;
  pointer-events: none;
  white-space: nowrap;
  transform: translateX(-50%) rotate(calc(var(--rot) * -1));
}

.mirror:hover {
  z-index: 16;
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--rot)) scale(1.08);
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 70%, transparent));
}

.mirror:hover .mirror-img {
  filter: brightness(1.05) contrast(1.1) saturate(1.15);
}

.mirror:hover .mirror-glass { opacity: 0.45; }

.mirror:hover .mirror-cut {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 55%, white 20%),
    0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 32px color-mix(in srgb, var(--accent) 65%, transparent);
}

.stage.is-receding .mirror {
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.78);
  opacity: 0.32;
  filter: blur(7px);
  pointer-events: none;
  transition: transform 0.8s var(--ease-out), opacity 0.8s ease, filter 0.8s ease;
}

/* Unique shard silhouettes */
.mirror--western .mirror-cut,
.mirror--western .mirror-plate {
  clip-path: polygon(10% 16%, 46% 3%, 94% 20%, 99% 62%, 74% 97%, 16% 90%, 2% 50%);
}
.mirror--oudo .mirror-cut,
.mirror--oudo .mirror-plate {
  clip-path: polygon(24% 2%, 80% 9%, 98% 46%, 84% 95%, 30% 99%, 3% 64%, 10% 26%);
}
.mirror--school .mirror-cut,
.mirror--school .mirror-plate {
  clip-path: polygon(8% 24%, 40% 2%, 90% 14%, 100% 55%, 72% 96%, 14% 92%, 0% 58%, 4% 36%);
}
.mirror--cyberpunk .mirror-cut,
.mirror--cyberpunk .mirror-plate {
  clip-path: polygon(4% 10%, 58% 0%, 100% 30%, 90% 78%, 46% 100%, 0% 70%, 16% 36%);
}
.mirror--mystery .mirror-cut,
.mirror--mystery .mirror-plate {
  clip-path: polygon(28% 0%, 74% 5%, 96% 38%, 88% 86%, 40% 100%, 6% 76%, 4% 30%);
}
.mirror--wa .mirror-cut,
.mirror--wa .mirror-plate {
  clip-path: polygon(14% 8%, 64% 0%, 96% 28%, 92% 70%, 58% 100%, 6% 86%, 0% 42%);
}
.mirror--healing .mirror-cut,
.mirror--healing .mirror-plate {
  clip-path: polygon(18% 6%, 54% 0%, 88% 12%, 100% 46%, 90% 82%, 52% 100%, 10% 88%, 0% 50%, 6% 22%);
}
.mirror--mecha .mirror-cut,
.mirror--mecha .mirror-plate {
  clip-path: polygon(8% 16%, 38% 0%, 86% 10%, 100% 44%, 90% 88%, 48% 100%, 6% 92%, 0% 54%, 4% 28%);
}

/* Side columns — four shards LEFT, four RIGHT. Clear vertical channel for orb + tagline. */
.mirror--wa {
  --x: calc(-0.88 * var(--rx));
  --y: calc(-0.86 * var(--ry));
  --rot: 4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #c45c5c;
  --accent-2: #e4c36a;
  z-index: 7;
}
.mirror--wa .mirror-img { object-position: 50% 30%; animation: kbF 21s ease-in-out infinite alternate; }
.mirror--wa .mirror-float { animation-duration: 9.8s; animation-delay: -1.8s; }
.mirror--wa .mirror-shimmer { animation-duration: 10s; animation-delay: -6s; }

.mirror--mystery {
  --x: calc(-1.06 * var(--rx));
  --y: calc(-0.30 * var(--ry));
  --rot: -4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #6b7cff;
  --accent-2: #e4c36a;
  z-index: 8;
}
.mirror--mystery .mirror-img { object-position: 48% 38%; animation: kbE 28s ease-in-out infinite alternate; }
.mirror--mystery .mirror-float { animation-duration: 8.9s; animation-delay: -4.2s; }
.mirror--mystery .mirror-shimmer { animation-duration: 11.5s; animation-delay: -3s; }

.mirror--cyberpunk {
  --x: calc(-1.06 * var(--rx));
  --y: calc(0.30 * var(--ry));
  --rot: 4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #ff3cac;
  --accent-2: #2de2e6;
  z-index: 9;
}
.mirror--cyberpunk .mirror-img { object-position: 60% 45%; animation: kbD 22s ease-in-out infinite alternate; }
.mirror--cyberpunk .mirror-float { animation-duration: 7.8s; animation-delay: -3.1s; }
.mirror--cyberpunk .mirror-shimmer { animation-duration: 8.5s; animation-delay: -5s; }

.mirror--healing {
  --x: calc(-0.88 * var(--rx));
  --y: calc(0.86 * var(--ry));
  --rot: -4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #d4c07a;
  --accent-2: #9cba8a;
  z-index: 6;
}
.mirror--healing .mirror-img { object-position: 45% 55%; animation: kbG 25s ease-in-out infinite alternate; }
.mirror--healing .mirror-float { animation-duration: 6.8s; animation-delay: -2.8s; }
.mirror--healing .mirror-shimmer { animation-duration: 9s; animation-delay: -2.5s; }

.mirror--western {
  --x: calc(0.88 * var(--rx));
  --y: calc(-0.86 * var(--ry));
  --rot: -4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #e4c36a;
  --accent-2: #f3ead8;
  z-index: 9;
}
.mirror--western .mirror-img { object-position: 28% 42%; animation: kbA 24s ease-in-out infinite alternate; }
.mirror--western .mirror-float { animation-duration: 7.4s; animation-delay: -1.2s; }
.mirror--western .mirror-shimmer { animation-duration: 11s; animation-delay: -2s; }

.mirror--oudo {
  --x: calc(1.06 * var(--rx));
  --y: calc(-0.30 * var(--ry));
  --rot: 4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #8fe08a;
  --accent-2: #7ec8ff;
  z-index: 8;
}
.mirror--oudo .mirror-img { object-position: 50% 40%; animation: kbB 20s ease-in-out infinite alternate; }
.mirror--oudo .mirror-float { animation-duration: 8.6s; animation-delay: -2.4s; }
.mirror--oudo .mirror-shimmer { animation-duration: 9.5s; animation-delay: -4s; }

.mirror--school {
  --x: calc(1.06 * var(--rx));
  --y: calc(0.30 * var(--ry));
  --rot: -4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #f4a0c0;
  --accent-2: #ffb07a;
  z-index: 7;
}
.mirror--school .mirror-img { object-position: 55% 35%; animation: kbC 26s ease-in-out infinite alternate; }
.mirror--school .mirror-float { animation-duration: 9.2s; animation-delay: -0.6s; }
.mirror--school .mirror-shimmer { animation-duration: 12s; animation-delay: -1s; }

.mirror--mecha {
  --x: calc(0.88 * var(--rx));
  --y: calc(0.86 * var(--ry));
  --rot: 4deg;
  --size: clamp(84px, 9.6vw, 128px);
  --accent: #5ff0e0;
  --accent-2: #e4c36a;
  z-index: 8;
}
.mirror--mecha .mirror-img { object-position: 48% 38%; animation: kbH 23s ease-in-out infinite alternate; }
.mirror--mecha .mirror-float { animation-duration: 8.2s; animation-delay: -3.6s; }
.mirror--mecha .mirror-shimmer { animation-duration: 10.5s; animation-delay: -1.4s; }

@keyframes kbA { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-5%, 3%); } }
@keyframes kbB { from { transform: scale(1.06) translate(-3%, 2%); } to { transform: scale(1) translate(3%, -2%); } }
@keyframes kbC { from { transform: scale(1) translate(2%, 0); } to { transform: scale(1.14) translate(-2%, 4%); } }
@keyframes kbD { from { transform: scale(1.08) translate(0, -2%); } to { transform: scale(1) translate(-4%, 3%); } }
@keyframes kbE { from { transform: scale(1) translate(0, 2%); } to { transform: scale(1.1) translate(4%, -3%); } }
@keyframes kbF { from { transform: scale(1.04) translate(-2%, 0); } to { transform: scale(1.12) translate(3%, 3%); } }
@keyframes kbG { from { transform: scale(1) translate(0, -3%); } to { transform: scale(1.1) translate(-3%, 2%); } }
@keyframes kbH { from { transform: scale(1.05) translate(2%, 0); } to { transform: scale(1.14) translate(-3%, 4%); } }

/* ---------- Footer ---------- */

.site-foot {
  position: absolute;
  bottom: 1.4vh;
  left: 0;
  right: 0;
  z-index: 30;
  text-align: center;
  font-family: var(--font-brand);
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: rgba(243, 234, 216, 0.38);
  pointer-events: none;
}

/* ---------- Login overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s;
}

.overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.overlay-dim {
  position: absolute;
  inset: 0;
  background: rgba(7, 4, 15, 0.62);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  cursor: pointer;
}

.overlay-card {
  position: relative;
  z-index: 2;
  width: min(26.5rem, 90vw);
  padding: 2.4rem 2.2rem 2rem;
  background:
    linear-gradient(180deg, rgba(28, 20, 42, 0.72) 0%, rgba(11, 7, 20, 0.82) 100%);
  border: 1px solid rgba(228, 195, 106, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(95, 240, 224, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.55s ease;
  clip-path: polygon(0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
}

.overlay.is-open .overlay-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.overlay-close {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  background: none;
  border: 0;
  color: rgba(243, 234, 216, 0.55);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2em 0.35em;
  transition: color 0.2s;
}
.overlay-close:hover { color: var(--gold); }

.mini-orb {
  position: relative;
  width: 46px;
  height: 46px;
  margin: 0.2rem auto 1.05rem;
}
.mini-orb-glow {
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95,240,224,0.5) 0%, rgba(95,240,224,0.12) 45%, transparent 70%);
  animation: glowPulse 3.6s ease-in-out infinite;
}
.mini-orb-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 50%;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow:
    inset 0 0 10px rgba(95, 240, 224, 0.5),
    inset 4px 6px 10px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.2),
    0 0 18px rgba(95, 240, 224, 0.4);
}

.login-kicker {
  font-family: var(--font-mincho);
  font-size: 1.35rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--ivory);
}

.login-title {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  color: var(--gold);
  margin-top: 0.35em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  text-align: left;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: rgba(243, 234, 216, 0.55);
}

.field input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(228, 195, 106, 0.32);
  color: var(--ivory);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  padding: 0.55em 0.15em 0.5em;
  border-radius: 0;
  caret-color: var(--gold);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.field input:focus {
  outline: none;
  background: transparent;
  border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 var(--gold), 0 5px 18px -8px rgba(228, 195, 106, 0.85);
}
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ivory);
  caret-color: var(--gold);
  border-bottom: 1px solid rgba(228, 195, 106, 0.32);
  box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 99999s ease-out;
  background-color: transparent !important;
}

.btn-enter {
  position: relative;
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid rgba(228, 195, 106, 0.55);
  background: linear-gradient(180deg, rgba(228, 195, 106, 0.18), rgba(228, 195, 106, 0.05));
  color: var(--gold);
  font-family: var(--font-mincho);
  font-size: 0.95rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  transition: background 0.25s, box-shadow 0.25s, color 0.25s;
}

.btn-enter:hover,
.btn-enter:focus-visible {
  background: linear-gradient(180deg, rgba(228, 195, 106, 0.32), rgba(228, 195, 106, 0.1));
  box-shadow: 0 0 24px rgba(228, 195, 106, 0.28);
  color: var(--ivory);
}

.btn-enter.is-busy {
  pointer-events: none;
  letter-spacing: 0.18em;
  text-indent: 0;

}

.btn-spinner {
  display: none;
  width: 1.05em;
  height: 1.05em;
  border: 1.5px solid rgba(228, 195, 106, 0.25);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spinBtn 0.8s linear infinite;
  flex-shrink: 0;
}

.btn-enter.is-busy .btn-spinner { display: block; }

@keyframes spinBtn { to { transform: rotate(360deg); } }

.login-alt {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(243, 234, 216, 0.5);
}

.login-alt a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(228, 195, 106, 0.35);
  transition: color 0.2s, border-color 0.2s;
}
.login-alt a:hover { color: var(--ivory); border-bottom-color: var(--ivory); }

.login-success {
  text-align: center;
  font-family: var(--font-mincho);
  letter-spacing: 0.28em;
  color: var(--teal);
  font-size: 0.95rem;
  text-shadow: 0 0 18px rgba(95, 240, 224, 0.45);
  animation: fadeUp 0.6s var(--ease-out) both;
}

.login-form.is-done .field,
.login-form.is-done .btn-enter,
.login-form.is-done .login-alt { display: none; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUpCenter {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Short / mid viewports ---------- */

@media (max-height: 820px) {
  :root {
    --orb-size: min(32vh, 28vw, 280px);
    --ry: 39vh;
  }
  .brand { top: 1.6vh; }
  .tagline-sub { font-size: 0.62rem; }
  .hero-copy { width: min(40em, 72vw); }
}

@media (max-width: 1100px) {
  :root {
    --rx: 34vw;
    --ry: 38vh;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .bg,
  .mirror-img,
  .orb-nebula,
  .orb-nebula-2,
  .orb-ring,
  .orb-ring-2,
  .orb-glow,
  .orb-glow-gold,
  .orb-flare,
  .orb-galaxy,
  .orb-glass,
  .mirror-float,
  .mirror-shimmer,
  .mini-orb-glow,
  .stage,
  .brand,
  .hero-copy,
  .orb,
  .mirror {
    animation: none !important;
  }
  .bg { transform: none; inset: 0; }
  .mirror { opacity: 1; }
  .orb { animation: none; opacity: 1; transform: translate(-50%, -50%); }
  .orb-glass { transform: none; }
  .orb-label { opacity: 1; transform: translate(-50%, -42%); }
  .orb-glow { opacity: 0.85; }
  .overlay,
  .overlay-card { transition: opacity 0.2s ease; }
}

/* ---------- Loading page ---------- */

.page-loading .hero-copy {
  display: none !important;
}

.page-loading .orb,
.page-loading .orb.is-loading {
  cursor: default;
  pointer-events: none;
  --p: 1;
}

.page-loading .orb:hover .orb-label,
.page-loading .orb:focus-visible .orb-label {
  transform: translate(-50%, -42%);
}

.page-loading .orb:hover .orb-label-scrim,
.page-loading .orb:focus-visible .orb-label-scrim {
  background: radial-gradient(ellipse 70% 58% at 50% 50%,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.28) 48%,
    transparent 72%);
}

.page-loading .orb:hover .orb-label-word,
.page-loading .orb:focus-visible .orb-label-word {
  text-shadow: 0 0 18px rgba(228, 195, 106, 0.95), 0 2px 8px #000;
}

.page-loading .orb:hover .orb-glass,
.page-loading .orb:focus-visible .orb-glass {
  animation: breatheLoad 3.6s ease-in-out infinite;
  box-shadow:
    inset 0 0 42px rgba(95, 240, 224, 0.42),
    inset 14px 18px 40px rgba(0, 0, 0, 0.55),
    inset -12px -16px 32px rgba(228, 195, 106, 0.2),
    inset 0 -28px 36px rgba(8, 4, 22, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1.5px rgba(180, 230, 220, 0.28),
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 72px rgba(95, 240, 224, 0.48);
}

.page-loading .orb:hover .orb-glow,
.page-loading .orb:focus-visible .orb-glow {
  opacity: 1;
  filter: none;
}

.page-loading .orb:hover .orb-nebula,
.page-loading .orb:focus-visible .orb-nebula,
.page-loading .orb:hover .orb-nebula-2,
.page-loading .orb:focus-visible .orb-nebula-2 {
  animation-duration: inherit;
}

.page-loading .orb:focus-visible .orb-glass {
  box-shadow:
    inset 0 0 42px rgba(95, 240, 224, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1.5px rgba(180, 230, 220, 0.28),
    0 0 72px rgba(95, 240, 224, 0.48);
}

/* Faster swirl, stronger pulse, quicker rune rings */
.page-loading .orb.is-loading .orb-ring {
  animation-duration: 8s;
  filter: drop-shadow(0 0 6px rgba(95, 240, 224, 0.55));
}

.page-loading .orb.is-loading .orb-ring-2 {
  animation-duration: 12s;
  filter: drop-shadow(0 0 5px rgba(228, 195, 106, 0.6));
}

.page-loading .orb.is-loading .orb-nebula {
  animation-duration: 4s;
  opacity: 0.52;
}

.page-loading .orb.is-loading .orb-nebula-2 {
  animation-duration: 5.5s;
  opacity: 0.42;
}

.page-loading .orb.is-loading .orb-glow {
  animation: glowPulseLoad 2.4s ease-in-out infinite;
}

.page-loading .orb.is-loading .orb-glow-gold {
  animation: glowPulseLoad 3.1s ease-in-out infinite reverse;
}

.page-loading .orb.is-loading .orb-flare {
  animation: flareLoad 3.4s ease-in-out infinite;
}

.page-loading .orb.is-loading .orb-glass {
  animation: breatheLoad 3.6s ease-in-out infinite;
  box-shadow:
    inset 0 0 42px rgba(95, 240, 224, 0.38),
    inset 14px 18px 40px rgba(0, 0, 0, 0.62),
    inset -12px -16px 32px rgba(228, 195, 106, 0.16),
    inset 0 -28px 36px rgba(8, 4, 22, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 1.5px rgba(180, 230, 220, 0.28),
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 68px rgba(95, 240, 224, 0.42);
}

@keyframes glowPulseLoad {
  0%, 100% { opacity: 0.78; transform: translate(-50%, -50%) scale(1.02); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.16); }
}

@keyframes breatheLoad {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.055); }
}

@keyframes flareLoad {
  0%, 62%, 100% { opacity: 0; transform: scale(0.85); }
  72% { opacity: 0.62; transform: scale(1.08); }
  82% { opacity: 0.16; transform: scale(1.22); }
}

/* Inner scan-line */
.orb-scan {
  display: none;
}

.page-loading .orb.is-loading .orb-scan {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 233, 160, 0.08) 30%,
    rgba(95, 240, 224, 0.22) 50%,
    rgba(255, 233, 160, 0.1) 70%,
    transparent
  );
  mix-blend-mode: screen;
  animation: orbScan 2.6s ease-in-out infinite;
}

@keyframes orbScan {
  0%   { top: -24%; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 0.85; }
  100% { top: 104%; opacity: 0; }
}

/* Circular progress around the orb */
.orb-progress-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 122%;
  height: 122%;
  transform: translate(-50%, -50%) rotate(-90deg);
  z-index: 4;
  pointer-events: none;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(228, 195, 106, 0.5));
}

.orb-progress-track {
  stroke: rgba(243, 234, 216, 0.14);
  stroke-width: 2.1;
}

.orb-progress-arc {
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 1));
  transition: none;
}

/* Loading label stack inside the orb */
.orb-label--loading {
  top: 50%;
  transform: translate(-50%, -50%);
  gap: 0;
  width: 82%;
}

.page-loading .orb-label-scrim {
  width: 130%;
  height: 6.4em;
  background: radial-gradient(ellipse 74% 62% at 50% 50%,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.32) 48%,
    transparent 74%);
}

.load-word {
  position: relative;
  z-index: 1;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.9vw, 1.55rem);
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: #ffe9a0;
  white-space: nowrap;
  line-height: 1.15;
  text-shadow:
    0 0 18px rgba(228, 195, 106, 0.95),
    0 0 36px rgba(255, 233, 160, 0.45),
    0 2px 8px #000;
}

.load-bar {
  position: relative;
  z-index: 1;
  width: 58%;
  height: 5.5px;
  margin: 0.62em auto 0.42em;
  border-radius: 999px;
  background: rgba(8, 4, 22, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(228, 195, 106, 0.32),
    0 0 8px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.load-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a24a 0%, #ffe9a0 52%, #e4c36a 100%);
  transform: scaleX(0.01);
  transform-origin: left center;
  box-shadow: 0 0 10px rgba(228, 195, 106, 0.9);
  will-change: transform;
}

.load-pct {
  position: relative;
  z-index: 1;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  color: #ffe9a0;
  opacity: 0.92;
  text-shadow: 0 0 10px rgba(228, 195, 106, 0.55), 0 2px 6px #000;
  line-height: 1;
}

/* Dimmer genre shards */
.page-loading .mirror {
  animation-name: shardInLoad;
}

@keyframes shardInLoad {
  from { opacity: 0; filter: blur(8px); }
  to   { opacity: 0.85; filter: blur(0); }
}

/* Complete: glow settles, rings slow */
.page-loading .orb.is-loading.is-complete .orb-glow,
.page-loading .orb.is-loading.is-complete .orb-glow-gold {
  animation-duration: 6.4s;
}

.page-loading .orb.is-loading.is-complete .orb-ring {
  animation-duration: 28s;
}

.page-loading .orb.is-loading.is-complete .orb-ring-2 {
  animation-duration: 36s;
}

.page-loading .orb.is-loading.is-complete .orb-nebula {
  animation-duration: 14s;
  opacity: 0.38;
}

.page-loading .orb.is-loading.is-complete .orb-nebula-2 {
  animation-duration: 18s;
  opacity: 0.32;
}

.page-loading .orb.is-loading.is-complete .orb-glass {
  animation: breathe 5.5s ease-in-out infinite;
}

.page-loading .orb.is-loading.is-complete .orb-scan {
  animation: none;
  opacity: 0;
}

.page-loading .orb.is-loading.is-complete .load-word {
  display: none;
  text-shadow:
    0 0 22px rgba(228, 195, 106, 1),
    0 0 40px rgba(95, 240, 224, 0.35),
    0 2px 8px #000;
}

@media (prefers-reduced-motion: reduce) {
  .page-loading .orb.is-loading .orb-ring,
  .page-loading .orb.is-loading .orb-ring-2,
  .page-loading .orb.is-loading .orb-nebula,
  .page-loading .orb.is-loading .orb-nebula-2,
  .page-loading .orb.is-loading .orb-glow,
  .page-loading .orb.is-loading .orb-glow-gold,
  .page-loading .orb.is-loading .orb-flare,
  .page-loading .orb.is-loading .orb-glass,
  .page-loading .orb.is-loading .orb-scan,
  .page-loading .mirror {
    animation: none !important;
  }
  .page-loading .orb.is-loading .orb-scan { opacity: 0; display: none; }
  .page-loading .mirror { opacity: 0.85; }
  .page-loading .orb.is-loading .orb-glass { transform: none; }
}
