.account-portal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 29rem);
  align-items: center;
  gap: min(5vw, 3.2rem);
  padding: clamp(1.1rem, 5vw, 3.8rem);
  border: 1px solid var(--line);
  border-radius: 1.65rem;
  background: linear-gradient(95deg, #0b1527 10%, #11223b70 53%, #121b2e 78%),
    url("../images/horizonte-lunar.webp") left center / cover, #0d1728;
}
.account-orbits {
  position: absolute;
  z-index: -1;
  inset-inline-start: -10%;
  top: calc(50% - 30rem);
  width: max(60rem, 80%);
  height: 60rem;
  pointer-events: none;
  background: radial-gradient(ellipse, #a3c7ff45 10%, #7a9be45e 32%, transparent 72%);
  mask-image: repeating-radial-gradient(circle, transparent 0 35px, #000 35px 36px, transparent 36px 45px);
  transition: transform 240ms var(--ease);
}
.account-orbits::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(transparent 4%, #ffbd66 15%, transparent 18%, transparent 53%, #8bbbff 64%, transparent 70%);
  opacity: .46;
  animation: account-orbit 38s linear infinite;
}
.account-portal[data-offscreen] .account-orbits::after { animation-play-state: paused; }
@keyframes account-orbit { to { transform: rotate(1turn); } }

.account-scene {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .7rem;
  min-width: 0;
  text-align: center;
}
.account-scene img {
  width: min(70%, 290px);
  height: auto;
  filter: drop-shadow(0 13px 24px #020712bb);
}
.account-scene p { max-width: 33ch; color: #e2eaff; text-wrap: balance; }

.moonlight-shop .account-card {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: clamp(1.05rem, 4vw, 2rem);
  gap: .95rem;
  background: linear-gradient(155deg, #1c2b46f7, #111b2df7 57%);
  border-color: #88a8df59;
  border-radius: 1.1rem;
  box-shadow: 0 18px 54px #04091277, inset 0 1px #ffffff17;
}
.account-mark { justify-self: center; object-fit: contain; width: 62px; height: 62px; }
.account-card h2 { font-size: clamp(1.65rem, 5vw, 2.35rem); }
.account-card h2, .account-intro { text-align: center; }
.account-intro { color: var(--muted); max-width: 40ch; justify-self: center; text-wrap: pretty; }
.account-form { gap: .72rem; }
.account-form .account-optional { color: var(--muted); font-weight: 400; }
.account-form [data-signup-field][hidden] { display: none; }
.account-form input { min-height: 44px; font-size: 1rem; }
.account-password { display: grid; gap: .35rem; }
.account-password-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.account-password-wrap .button { min-width: 5.15rem; padding-inline: .5rem; }
.forgot-password { margin: .3rem 0 0; text-align: right; }
.forgot-password a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; font-size: .85rem; }
.forgot-password a:hover { color: var(--accent-hover); }
.account-toggle, .account-order-link { justify-self: center; text-align: center; font-size: .9rem; }
.account-order-link { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.account-divider { display: flex; align-items: center; gap: .75rem; margin: 0; color: var(--muted); font-size: .875rem; }
.account-divider::before, .account-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.account-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.account-social .button { display: flex; gap: .55rem; padding-inline: .45rem; }
.account-social svg { width: 1.2rem; height: 1.2rem; flex: none; }
.account-card .notice { margin: 0; overflow-wrap: anywhere; }
.account-turnstile { justify-self: center; margin: .2rem 0 .4rem; }
#order-history { margin-top: 1.25rem; }

@media (max-width: 840px) {
  .account-portal { grid-template-columns: minmax(0, 29rem); justify-content: center; }
  .account-orbits { inset-inline-start: calc(50% - 30rem); }
  .account-scene { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .account-orbits, .account-orbits::after { animation: none; transition: none; }
}
