/* Returning-user polish, loading framing, and lightweight referral rewards. */

.legend-landing .landing-account-cta {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid color-mix(in srgb, var(--landing-accent) 55%, transparent);
  border-radius: 16px;
  color: inherit;
  background: color-mix(in srgb, #fff 58%, transparent);
  font-weight: 850;
  cursor: pointer;
}
.landing-future .landing-account-cta { color: #f5f9ff; background: rgba(5, 18, 42, 0.68); }

.legend-landing .auth-journey[data-returning-login="true"] {
  display: grid;
  place-items: start center;
  min-height: calc(100dvh - 78px);
  padding-top: clamp(20px, 5vh, 46px);
}
.legend-landing .auth-journey[data-returning-login="true"] .auth-card { width: min(100%, 470px); padding-top: 28px; }
.legend-landing .auth-journey[data-returning-login="true"] .auth-back { margin-bottom: 12px; }
.legend-landing .auth-journey[data-returning-login="true"] .auth-glyph { width: 48px; height: 48px; margin-bottom: 14px; }
.legend-landing .auth-journey[data-returning-login="true"] .auth-card h1 { margin-top: 7px; }

/* Referral milestone artifacts. The entitlement is server-side through the
   unlocked referral badge; only the cosmetic equip preference is local, just
   like the existing hero customization. */
.referral-artifact-unlock {
  margin: 16px 0 4px;
  padding: 14px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  border: 1px solid color-mix(in srgb, #c99b42 54%, var(--line, rgba(201,155,66,.25)));
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, #c99b42 10%, var(--panel, #fff)), color-mix(in srgb, #7762a4 8%, var(--panel, #fff)));
}
.referral-artifact-unlock > div { min-width: 0; }
.referral-artifact-unlock small { display: block; color: #a97725; font-size: 9px; font-weight: 900; letter-spacing: 1.2px; }
.referral-artifact-unlock b { display: block; margin: 4px 0; font-size: 16px; }
.referral-artifact-unlock p { margin: 0 0 9px !important; font-size: 11px !important; line-height: 1.42 !important; }
.referral-artifact-unlock button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #b88a38;
  border-radius: 12px;
  background: rgba(201, 155, 66, .12);
  color: var(--text, #18293d);
  font-weight: 850;
}
.referral-artifact-unlock button.is-equipped { color: #0b6659; border-color: #73ad9d; background: rgba(77, 157, 134, .12); }
.referral-artifact-visual { position: relative; width: 68px; height: 76px; display: grid; place-items: center; }
.referral-artifact-visual.medallion::before {
  content: "";
  position: absolute;
  top: 3px;
  width: 32px;
  height: 42px;
  border: 2px solid #b98a37;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  opacity: .75;
}
.referral-artifact-visual.medallion::after {
  content: "∞";
  position: absolute;
  bottom: 6px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #d3aa5b;
  border-radius: 50%;
  color: #8f6728;
  background: radial-gradient(circle at 36% 28%, #fff4cf, #d6ad5c 42%, #7b5b2a 100%);
  box-shadow: 0 4px 12px rgba(105, 70, 23, .24), inset 0 0 0 4px rgba(255,255,255,.22);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}
.referral-artifact-visual.aura::before,
.referral-artifact-visual.aura::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid #d3aa5b;
}
.referral-artifact-visual.aura::before { width: 58px; height: 58px; box-shadow: 0 0 18px rgba(211,170,91,.48), inset 0 0 18px rgba(116,91,172,.26); }
.referral-artifact-visual.aura::after { width: 37px; height: 65px; transform: rotate(52deg); border-color: #8e78ba; }
.referral-artifact-visual.aura > i { width: 15px; height: 15px; border-radius: 50%; background: #f2d790; box-shadow: 0 0 17px #d3aa5b; }

.hero-render .referral-medallion-overlay,
.hero-render .referral-guide-aura-overlay { pointer-events: none; position: absolute; }
.hero-render .referral-medallion-overlay {
  z-index: 11;
  left: 50%;
  top: 19%;
  width: 34px;
  height: 54px;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(61, 40, 12, .34));
}
.hero-render .referral-medallion-overlay::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  width: 18px;
  height: 30px;
  border: 1.5px solid #d3aa5b;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}
.hero-render .referral-medallion-overlay::after {
  content: "∞";
  position: absolute;
  left: 4px;
  bottom: 1px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1.5px solid #e1bb67;
  border-radius: 50%;
  color: #6f4d1d;
  background: radial-gradient(circle at 35% 28%, #fff0bd, #c99b42 50%, #6c4d24);
  box-shadow: 0 0 7px rgba(211,170,91,.44);
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 800;
}
.hero-render .referral-guide-aura-overlay {
  z-index: 1;
  inset: 5% 6% 3%;
  border: 1px solid rgba(211,170,91,.65);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(211,170,91,.34), inset 0 0 30px rgba(120,90,174,.18);
  animation: referral-guide-aura 3.8s ease-in-out infinite alternate;
}
.hero-render .referral-guide-aura-overlay::before,
.hero-render .referral-guide-aura-overlay::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(137,110,187,.52);
  border-radius: 50%;
  transform: rotate(47deg);
}
.hero-render .referral-guide-aura-overlay::after { inset: 17% 3%; transform: rotate(-38deg); border-color: rgba(211,170,91,.42); }
.hero-render[data-referral-guide-aura="true"] .hero-equipped-visuals .wearable-aura { display: none !important; }
@keyframes referral-guide-aura { to { opacity: .68; transform: scale(1.025); filter: brightness(1.08); } }

@media (max-width: 760px) {
  .realm-photo-loading .loading-photo-image {
    top: 0 !important;
    bottom: auto !important;
    height: 88dvh !important;
    min-height: 0 !important;
    object-fit: cover !important;
    transform: none !important;
    animation: loading-photo-fade 0.62s ease-out both !important;
    will-change: opacity !important;
  }
  .realm-photo-loading .loading-photo-image.loading-photo-image-focused { transform: none !important; animation: loading-photo-fade 0.62s ease-out both !important; }
  .realm-photo-loading .loading-photo-shade { background: linear-gradient(180deg, rgba(3,9,16,.10) 0%, rgba(3,9,16,.06) 34%, rgba(3,9,16,.70) 72%, #07101a 90%, #07101a 100%), linear-gradient(90deg, rgba(3,9,16,.16), transparent 44%, rgba(3,9,16,.06)); }
  .legend-landing .landing-login { min-height: 42px; padding-inline: 14px; font-weight: 850; }
  .legend-landing .auth-journey[data-returning-login="true"] { min-height: calc(100dvh - 68px); padding: 12px 12px calc(26px + env(safe-area-inset-bottom)); }
  .legend-landing .auth-journey[data-returning-login="true"] .auth-back { min-height: 38px; margin-bottom: 8px; }
  .legend-landing .auth-journey[data-returning-login="true"] .auth-card { padding: 22px 19px; border-radius: 24px; }
  .legend-landing .auth-journey[data-returning-login="true"] .auth-card > p { margin-bottom: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-render .referral-guide-aura-overlay { animation: none !important; }
}