* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8edf4;
}

body {
  --bg-top-left: #17191d;
  --bg-top-right: #23262b;
  --bg-bottom-left: #1c1f24;
  --bg-bottom-right: #101216;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #14161a;
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  inset: -20%;
  content: "";
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(90deg, var(--bg-side-left, #17191d), transparent 42%, transparent 58%, var(--bg-side-right, #17191d)),
    radial-gradient(ellipse at top left, var(--bg-top-left), transparent 60%),
    radial-gradient(ellipse at top right, var(--bg-top-right), transparent 60%),
    radial-gradient(ellipse at bottom left, var(--bg-bottom-left), transparent 60%),
    radial-gradient(ellipse at bottom right, var(--bg-bottom-right), transparent 60%);
  filter: blur(48px);
  animation: drift 18s ease-in-out infinite alternate;
}

body::after {
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .58) 0%, rgba(0, 0, 0, .34) 9%, rgba(0, 0, 0, .12) 22%, transparent 38%, transparent 62%, rgba(0, 0, 0, .12) 78%, rgba(0, 0, 0, .34) 91%, rgba(0, 0, 0, .58) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .32), transparent 22%, transparent 78%, rgba(0, 0, 0, .32)),
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, .14) 72%, rgba(0, 0, 0, .38) 100%);
}

.start-screen {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity .55s ease, visibility .55s ease;
}

.start-screen:not(.is-dismissed) ~ .account-ambient,
.start-screen:not(.is-dismissed) ~ .account-wheel {
  visibility: hidden;
}

.start-screen.is-dismissed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.start-button {
  padding: 12px 18px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: clamp(18px, 2.5vw, 24px);
  letter-spacing: .08em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  text-shadow: 0 0 8px rgba(255, 255, 255, .95), 0 0 22px rgba(220, 232, 248, .75);
  cursor: pointer;
  animation: prompt-glow 2.4s ease-in-out infinite alternate;
}

.start-button:hover,
.start-button:focus-visible {
  outline: none;
  text-shadow: 0 0 12px #fff, 0 0 32px rgba(220, 232, 248, .95);
}

.account-ambient {
  position: fixed;
  z-index: 1;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.account-ambient::before,
.account-ambient::after {
  position: absolute;
  top: -8%;
  bottom: -8%;
  width: 34%;
  content: "";
  background-image: var(--ambient-image);
  background-repeat: no-repeat;
  background-size: 300% 100%;
  filter: blur(34px);
  opacity: .52;
}

.account-ambient::before {
  left: -8%;
  background-position: left center;
  -webkit-mask-image: linear-gradient(to right, #000 50%, transparent 100%);
  mask-image: linear-gradient(to right, #000 50%, transparent 100%);
}

.account-ambient::after {
  right: -8%;
  background-position: right center;
  -webkit-mask-image: linear-gradient(to left, #000 50%, transparent 100%);
  mask-image: linear-gradient(to left, #000 50%, transparent 100%);
}

.ambient-glow {
  position: absolute;
  inset: 8%;
  background: var(--ambient-color, #8abaff);
  opacity: .28;
  filter: blur(90px);
  animation: ambient-pulse 5s ease-in-out infinite alternate;
}

.ambient-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .42;
  filter: grayscale(20%) blur(3px);
  transform: scale(1.08);
  animation: ambient-image-zoom 28s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.account-wheel {
  position: relative;
  z-index: 3;
  display: block;
  width: min(440px, 100vw);
  min-height: 100vh;
  padding: 36px clamp(22px, 5vw, 64px);
}

.account-heading {
  position: fixed;
  z-index: 4;
  top: clamp(20px, 4vh, 44px);
  right: clamp(20px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0;
  color: #f2f5f9;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
  animation: heading-glow 2.8s ease-in-out infinite alternate;
}

.heading-brand {
  color: #f2f5f9;
  font-size: clamp(34px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: .02em;
}

.heading-title {
  font-size: clamp(22px, 3vw, 30px);
}

.heading-credit {
  margin-top: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  text-align: right;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(255, 255, 255, .8), 0 0 14px rgba(255, 255, 255, .45);
}

.account-option {
  position: absolute;
  top: 50%;
  left: clamp(22px, 5vw, 64px);
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  opacity: 1;
  transform: translateY(calc(-50% + var(--wheel-y, 0px))) scale(.82);
  transform-origin: left center;
  transition: opacity .35s ease, transform .65s cubic-bezier(.2, .8, .2, 1), filter .35s ease;
}

.account-option:hover,
.account-option:focus-visible {
  opacity: 1;
  outline: none;
  filter: drop-shadow(0 8px 18px rgba(80, 123, 158, .16));
}

.account-option.selected {
  z-index: 2;
  opacity: 1;
  transform: translateY(calc(-50% + var(--wheel-y, 0px))) scale(1);
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 20px rgba(160, 205, 255, .42), 0 0 42px rgba(90, 155, 225, .2);
  animation: avatar-breathe 4.5s ease-in-out infinite;
  transition: width .35s ease, height .35s ease, box-shadow .35s ease;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.account-option.selected .avatar {
  animation: avatar-select .55s cubic-bezier(.2, .8, .2, 1) both, avatar-breathe 4.5s ease-in-out infinite;
}

.avatar-small {
  width: 78px;
  height: 78px;
}

.avatar-large {
  width: 128px;
  height: 128px;
  background: transparent;
  box-shadow: 0 0 28px rgba(190, 225, 255, .62), 0 0 64px rgba(90, 155, 225, .34);
}

.avatar-large img {
  width: 100%;
  height: 100%;
}

.avatar-alt img {
  opacity: 1;
}

.account-label {
  color: #c0c8d2;
  font-size: 18px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.selected-label {
  color: #f2f5f9;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}

@keyframes ambient-pulse {
  from { transform: scale(.88); opacity: .2; }
  to { transform: scale(1.08); opacity: .36; }
}

@keyframes ambient-image-zoom {
  from { transform: scale(1.08); }
  to { transform: scale(1.2); }
}

@keyframes prompt-glow {
  from { opacity: .78; }
  to { opacity: 1; }
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 1%, 0) scale(1.06); }
}

@keyframes heading-glow {
  from {
    text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
  }
  to {
    text-shadow:
      0 0 8px rgba(255, 255, 255, .85),
      0 0 24px rgba(235, 240, 248, .7),
      0 0 44px rgba(225, 232, 242, .42),
      0 2px 20px rgba(0, 0, 0, .9);
  }
}

@keyframes avatar-select {
  0% { transform: translateY(0) scale(.92); }
  45% { transform: translateY(-16px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes avatar-breathe {
  0%, 100% { filter: drop-shadow(0 0 7px rgba(205, 225, 255, .2)); }
  50% { filter: drop-shadow(0 0 19px rgba(205, 225, 255, .58)); }
}

@media (max-width: 600px) {
  .account-heading {
    top: 18px;
    right: 18px;
    font-size: 20px;
  }

  .heading-brand {
    font-size: 32px;
  }

  .heading-title {
    font-size: 21px;
  }

  .account-option {
    gap: 16px;
  }

  .avatar-large {
    width: 104px;
    height: 104px;
  }

  .avatar-small {
    width: 66px;
    height: 66px;
  }

  .selected-label {
    font-size: 18px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.start-button {
  text-shadow: 0 0 8px rgba(var(--theme-glow, 138, 186, 255), .75), 0 0 22px rgba(var(--theme-glow, 138, 186, 255), .55);
}

.start-button:hover,
.start-button:focus-visible,
.account-heading,
.heading-credit,
.account-option.selected .avatar,
.avatar {
  text-shadow: 0 0 16px rgba(var(--theme-glow, 138, 186, 255), .55);
}

.account-option.selected .avatar,
.avatar {
  box-shadow: 0 0 24px rgba(var(--theme-glow, 138, 186, 255), .42), 0 0 52px rgba(var(--theme-glow, 138, 186, 255), .24);
}

.avatar-large {
  box-shadow: 0 0 30px rgba(var(--theme-glow, 138, 186, 255), .62), 0 0 68px rgba(var(--theme-glow, 138, 186, 255), .38);
}

.account-option:hover,
.account-option:focus-visible {
  filter: drop-shadow(0 8px 18px rgba(var(--theme-glow, 138, 186, 255), .32));
}

@keyframes avatar-breathe {
  0%, 100% { filter: drop-shadow(0 0 7px rgba(var(--theme-glow, 138, 186, 255), .28)); }
  50% { filter: drop-shadow(0 0 19px rgba(var(--theme-glow, 138, 186, 255), .68)); }
}

@keyframes heading-glow {
  from { text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }
  to {
    text-shadow:
      0 0 8px rgba(var(--theme-glow, 138, 186, 255), .8),
      0 0 24px rgba(var(--theme-glow, 138, 186, 255), .65),
      0 0 44px rgba(var(--theme-glow, 138, 186, 255), .4),
      0 2px 20px rgba(0, 0, 0, .9);
  }
}
