.loginShell button,
.loginShell a,
.loginShell input {
  cursor: var(--cursor-pointer);
}

.loginCharacterVideo {
  position: absolute;
  top: 120px;
  left: -172px;
  z-index: 4;
  width: clamp(360px, 28vw, 520px);
  max-height: 88vh;
  object-fit: contain;
  pointer-events: none;
}

.loginShell {
  position: relative;
  z-index: 3;
  overflow: visible;
}

body.loginPage.loginNightMode::before {
  filter: brightness(0.48);
}

body.loginPage.loginNightMode::after {
  background: rgba(0, 0, 0, 0.10);
}

.loginDragonflySprite {
  position: absolute;
  top: 202px;
  left: calc(50% + 312px);
  z-index: 4;
  width: 144px;
  height: 113px;
  background-image: url("/static/visual/ui/reddragonfly2.png");
  background-repeat: no-repeat;
  background-size: 576px 226px;
  pointer-events: none;
  animation: loginDragonflyFlap 1s steps(1, end) infinite;
  transition:
    left var(--dragonfly-travel-duration, 0.9s) cubic-bezier(0.22, 0.68, 0.28, 1),
    top var(--dragonfly-travel-duration, 0.9s) cubic-bezier(0.22, 0.68, 0.28, 1);
  will-change: left, top;
}

.loginDragonflySprite.isResting {
  animation:
    loginDragonflyFlap 1s steps(1, end) infinite,
    loginDragonflyRestOrbit 4.8s linear infinite,
    loginDragonflyRestDirection 4.8s steps(1, end) infinite;
}

.loginDragonflySprite.isMovingRight {
  background-image: url("/static/visual/ui/reddragonfly.png");
}

.loginDragonflySprite.isMovingDown {
  background-image: url("/static/visual/ui/reddragonfly2.png");
}

.loginDragonflySprite.isMovingLeft {
  background-image: url("/static/visual/ui/reddragonfly3.png");
}

.loginDragonflySprite.isMovingUp {
  background-image: url("/static/visual/ui/reddragonfly4.png");
}

.loginDragonflySprite.isAnchored {
  background-image: url("/static/visual/ui/reddragonfly3.png");
}

@keyframes loginDragonflyRestOrbit {
  0% {
    transform: translate(50px, -44px);
  }

  25% {
    transform: translate(50px, 44px);
  }

  50% {
    transform: translate(-50px, 44px);
  }

  75% {
    transform: translate(-50px, -44px);
  }

  100% {
    transform: translate(50px, -44px);
  }
}

@keyframes loginDragonflyRestDirection {
  0%,
  24.99% {
    background-image: url("/static/visual/ui/reddragonfly2.png");
  }

  25%,
  49.99% {
    background-image: url("/static/visual/ui/reddragonfly3.png");
  }

  50%,
  74.99% {
    background-image: url("/static/visual/ui/reddragonfly4.png");
  }

  75%,
  100% {
    background-image: url("/static/visual/ui/reddragonfly.png");
  }
}

@keyframes loginDragonflyFlap {
  0%,
  9.99% {
    background-position: 0 0;
  }

  10%,
  19.99%,
  90%,
  100% {
    background-position: -144px 0;
  }

  20%,
  29.99%,
  80%,
  89.99% {
    background-position: -288px 0;
  }

  30%,
  39.99%,
  70%,
  79.99% {
    background-position: -432px 0;
  }

  40%,
  49.99%,
  60%,
  69.99% {
    background-position: 0 -113px;
  }

  50%,
  59.99% {
    background-position: -288px -113px;
  }
}

.loginMain {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0 0 52px;
}

.loginRegistryDivider {
  align-self: stretch;
  width: 100%;
  height: 1px;
  margin-bottom: 68px;
  background: rgba(255, 255, 255, 0.18);
}

.loginRegistryPanel {
  position: relative;
  width: min(460px, 100%);
  padding: 28px;
  border: 2px solid rgba(247, 217, 138, 0.52);
  border-radius: 8px;
  color: #f4efe3;
  background:
    linear-gradient(180deg, rgba(39, 32, 22, 0.96), rgba(19, 17, 14, 0.98)),
    url("/static/visual/ui/background_pattern.png");
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 36px rgba(0, 0, 0, 0.28);
}

.loginDayNightToggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: block;
  width: 125px;
  height: 70px;
  margin: 0;
  text-align: center;
  transform: scale(0.4);
  transform-origin: top right;
  user-select: none;
}

.loginDayNightToggle .toggle--checkbox {
  display: none;
}

.loginDayNightToggle .toggle--btn {
  position: relative;
  display: block;
  width: 125px;
  height: 70px;
  margin: 0 auto;
  border: 5px solid #86c3d7;
  border-radius: 70px;
  background-color: #9ee3fb;
  font-size: 1.4em;
  transition: all 350ms ease-in;
}

.loginDayNightToggle .toggle--btn:hover {
  cursor: pointer;
}

.loginDayNightToggle .toggle--btn,
.loginDayNightToggle .toggle--checkbox,
.loginDayNightToggle .toggle--feature,
.loginDayNightToggle .toggle--btn::before,
.loginDayNightToggle .toggle--btn::after,
.loginDayNightToggle .toggle--feature::before,
.loginDayNightToggle .toggle--feature::after {
  transition: all 250ms ease-in;
}

.loginDayNightToggle .toggle--btn::before,
.loginDayNightToggle .toggle--btn::after,
.loginDayNightToggle .toggle--feature::before,
.loginDayNightToggle .toggle--feature::after {
  content: "";
  display: block;
}

.loginDayNightToggle .toggle--btn::before {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 56px;
  height: 56px;
  border: 5px solid #e1c348;
  border-radius: 50%;
  background-color: #ffdf6d;
}

.loginDayNightToggle .toggle--btn::after {
  position: absolute;
  top: 62%;
  left: 39px;
  z-index: 10;
  width: 11.2px;
  height: 11.2px;
  border-radius: 50%;
  opacity: 1;
  background-color: #fff;
  box-shadow:
    #fff 0 0,
    #fff 3px 0,
    #fff 6px 0,
    #fff 9px 0,
    #fff 11px 0,
    #fff 14px 0,
    #fff 16px 0,
    #fff 21px -1px 0 1px,
    #fff 16px -7px 0 -2px,
    #fff 7px -7px 0 1px,
    #d3d3d3 0 0 0 4px,
    #d3d3d3 6px 0 0 4px,
    #d3d3d3 11px 0 0 4px,
    #d3d3d3 16px 0 0 4px,
    #d3d3d3 21px -1px 0 5px,
    #d3d3d3 16px -7px 0 1px,
    #d3d3d3 7px -7px 0 5px;
  transition: opacity 100ms ease-in;
}

.loginDayNightToggle .toggle--feature {
  display: block;
  position: absolute;
  top: 9px;
  left: 52.5%;
  z-index: 20;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow:
    rgba(255, 255, 255, 0.1) 30px -3px 0 0,
    rgba(255, 255, 255, 0.1) 12px 10px 0 -1px,
    #fff 38px 18px 0 1px,
    rgba(255, 255, 255, 0.1) 32px 34px 0 0,
    #fff 20px 24px 0 -1.5px,
    rgba(255, 255, 255, 0.1) 5px 38px 0 1px;
  opacity: 0;
  animation: none;
}

.loginDayNightToggle .toggle--feature::before {
  position: absolute;
  top: -2px;
  left: -25px;
  width: 18px;
  height: 18px;
  border: 5px solid #e3e3c7;
  border-radius: 50%;
  background-color: #fff;
  box-shadow:
    #e3e3c7 -28px 0 0 -3px,
    #e3e3c7 -8px 24px 0 -2px;
  transform-origin: -6px 130%;
}

.loginDayNightToggle .toggle--checkbox:checked + .toggle--btn {
  border: 5px solid #1c1c1c;
  background-color: #3c4145;
}

.loginDayNightToggle .toggle--checkbox:checked + .toggle--btn::before {
  left: 55px;
  border: 5px solid #e3e3c7;
  background-color: #fff;
}

.loginDayNightToggle .toggle--checkbox:checked + .toggle--btn::after {
  opacity: 0;
  animation: none;
}

.loginDayNightToggle .toggle--checkbox:checked + .toggle--btn > .toggle--feature {
  opacity: 1;
  left: 16px;
  box-shadow:
    rgba(255, 255, 255, 0.1) 30px -3px 0 0,
    rgba(255, 255, 255, 0.1) 12px 10px 0 -1px,
    #fff 38px 18px 0 1px,
    rgba(255, 255, 255, 0.1) 32px 34px 0 0,
    #fff 20px 24px 0 -1.5px,
    rgba(255, 255, 255, 0.1) 5px 38px 0 1px;
  animation: loginDayNightStarryStar 5s ease-in-out infinite;
}

.loginDayNightToggle .toggle--checkbox:checked + .toggle--btn > .toggle--feature::before {
  left: 74px;
  width: 13px;
  height: 13px;
  border-width: 4px;
  box-shadow:
    #e3e3c7 -31px 0 0 -3px,
    #e3e3c7 -9px 27px 0 -2px;
  transform: none;
}

@keyframes loginDayNightStarryStar {
  50% {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow:
      #fff 30px -3px 0 0,
      #fff 12px 10px 0 -1px,
      rgba(255, 255, 255, 0.1) 38px 18px 0 1px,
      #fff 32px 34px 0 0,
      rgba(255, 255, 255, 0.1) 20px 24px 0 -1.5px,
      #fff 5px 38px 0 1px;
  }
}

@keyframes loginDayNightBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }

  55% {
    transform: scale(1.1);
  }

  75% {
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.loginRegistryHeader {
  text-align: center;
}

.loginKicker {
  color: #d6ad58;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.loginRegistryHeader h1 {
  margin: 8px 0 22px;
  color: #fff4c8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.loginForm {
  display: grid;
  gap: 14px;
}

.loginForm[hidden] {
  display: none;
}

.loginField {
  display: grid;
  gap: 6px;
}

.loginField > span:first-child {
  color: rgba(247, 237, 216, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.loginInputShell {
  position: relative;
  display: block;
}

.loginField input {
  min-height: 40px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(247, 217, 138, 0.34);
  border-radius: 6px;
  padding: 9px 40px 9px 11px;
  color: #f7edd8;
  background: rgba(8, 7, 6, 0.52);
  font: inherit;
}

.loginField input:focus-visible {
  outline: 2px solid rgba(247, 217, 138, 0.68);
  outline-offset: 2px;
}

.loginField input[type="password"]::-ms-reveal,
.loginField input[type="password"]::-ms-clear {
  display: none;
}

.loginField input[type="password"]::-webkit-credentials-auto-fill-button,
.loginField input[type="password"]::-webkit-caps-lock-indicator {
  visibility: hidden;
  pointer-events: none;
}

.loginInputIcon,
.loginPasswordToggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.loginInputIcon {
  color: #6f4a1c;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.loginPasswordToggle {
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  color: #6f4a1c;
  background: transparent;
  font-size: 16px;
  line-height: 1;
}

.loginPasswordToggle:hover,
.loginPasswordToggle:focus-visible {
  color: #9b6a2a;
}

.loginOptionsRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: rgba(247, 237, 216, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.loginRemember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.loginRemember input {
  width: 14px;
  height: 14px;
  accent-color: #f2d78a;
}

.loginForgotButton {
  border: 0;
  padding: 0;
  color: #f7d98a;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
  -webkit-tap-highlight-color: transparent;
}

.loginForgotButton:hover,
.loginForgotButton:active {
  color: #fff4c8;
  background: transparent;
  box-shadow: none;
  outline: 0;
  text-shadow: 0 0 8px rgba(247, 217, 138, 0.34);
}

.loginForgotButton:focus-visible {
  color: #fff4c8;
  background: transparent;
  box-shadow: none;
}

.loginSubmitButton {
  min-height: 42px;
  margin-top: 2px;
  border: 1px solid rgba(247, 217, 138, 0.48);
  border-radius: 999px;
  color: #111111;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), transparent 42%),
    linear-gradient(135deg, #f2d78a, #b98225 72%, #f5de9a);
  font-weight: 900;
}

.loginSubmitButton:disabled {
  opacity: 0.62;
}

.loginVerificationDivider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 42px 0 14px;
  color: rgba(247, 237, 216, 0.58);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loginVerificationDivider::before,
.loginVerificationDivider::after {
  content: "";
  height: 1px;
  background: rgba(247, 217, 138, 0.26);
}

.loginOauthRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.loginOauthButton {
  min-height: 36px;
  border: 1px solid rgba(247, 217, 138, 0.28);
  border-radius: 999px;
  color: rgba(247, 237, 216, 0.84);
  background: rgba(8, 7, 6, 0.34);
  font-weight: 900;
}

.loginOauthButton i {
  display: inline-flex;
  justify-content: center;
  width: 18px;
  color: #fff4c8;
  font-size: 18px;
}

.loginOauthButton:hover,
.loginOauthButton:focus-visible {
  border-color: rgba(247, 217, 138, 0.48);
  color: #3b2407;
}

.loginOauthButton:hover i,
.loginOauthButton:focus-visible i {
  color: #3b2407;
}

.loginSwitchPrompt {
  color: rgba(247, 237, 216, 0.76);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.loginInlineLink {
  display: inline;
  border: 0;
  padding: 0;
  color: #f7d98a;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
  -webkit-tap-highlight-color: transparent;
}

.loginInlineLink:hover,
.loginInlineLink:active {
  color: #fff4c8;
  background: transparent;
  box-shadow: none;
  outline: 0;
  text-shadow: 0 0 8px rgba(247, 217, 138, 0.34);
}

.loginInlineLink:focus-visible {
  color: #fff4c8;
  background: transparent;
  box-shadow: none;
}

.loginStatus {
  min-height: 18px;
  margin-top: -2px;
  color: rgba(247, 237, 216, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.loginStatus[data-tone="error"] {
  color: #ffb7a8;
}

.loginStatus[data-tone="success"] {
  color: #bde8a0;
}

.loginFooterSlot {
  margin-top: 14px;
}

.loginShell .footerInfoRow {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}

.loginShell .footerVisitorCount {
  grid-column: 1;
  justify-self: start;
}

.loginShell .footerCopyright {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.loginPage .decreeImageFrame {
  display: none;
}

@media (max-width: 900px) {
  body.loginPage {
    overflow-x: hidden;
    overflow-x: clip;
  }

  body.loginPage .hypercarryPageScrollbar {
    right: auto;
    left: calc(100vw - 18px);
  }
}

@media (max-width: 640px) {
  .loginCharacterVideo {
    display: none;
  }

  .loginDragonflySprite {
    display: none;
  }

  .loginMain {
    min-height: 440px;
    padding-top: 18px;
  }

  .loginRegistryPanel {
    padding: 22px;
  }

  .loginField input {
    font-size: 16px;
  }
}
