/* The account entry has its own stylesheet so stale dashboard CSS cannot restore the old light card. */
html:has(#authScreen:not([hidden])),
body:has(#authScreen:not([hidden])) {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0a0a0b;
}

#authScreen {
  position: fixed;
  z-index: 100;
  inset: 0;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  color: #f4f4f5;
  background: #0a0a0b;
  isolation: isolate;
}

#authScreen::after {
  position: fixed;
  z-index: 1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, #0a0a0b 0 31%, rgba(10,10,11,.96) 37%, rgba(10,10,11,.46) 49%, rgba(10,10,11,.05) 67%),
    radial-gradient(circle at 66% 48%, rgba(100,0,8,.12), transparent 35%);
  pointer-events: none;
}

#authScreen .life-canvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: .98;
  image-rendering: pixelated;
  pointer-events: none;
}

#authScreen .auth-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  min-height: 100svh;
  margin: 0;
  padding: clamp(96px, 17vh, 160px) 32px 48px clamp(58px, 8.6vw, 124px);
  align-items: flex-start;
}

#authScreen .auth-card {
  width: min(390px, calc(100vw - 48px));
  padding: 0;
  color: #f4f4f5;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#authScreen .auth-return {
  display: inline-flex;
  margin: 0 0 26px;
  color: #77777d;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

#authScreen .auth-return:hover {
  color: #fff;
}

#authScreen .auth-brand {
  margin: 0 0 42px;
}

#authScreen .auth-brand .brand-logo {
  display: block;
  width: 128px;
  height: 34px;
  background: #fff;
}

#authScreen .auth-brand p {
  display: none;
}

#authScreen .auth-card h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

#authScreen .auth-card .step {
  margin: 0;
  color: #ef2638;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

#authScreen .auth-card .muted {
  margin: 0;
  color: #77777d;
  font-size: 14px;
  line-height: 1.5;
}

#authScreen .auth-card form {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

#authScreen .auth-card label,
#authScreen .auth-card fieldset,
#authScreen .auth-card legend {
  color: #dadadd;
  font-size: 13px;
  font-weight: 650;
}

#authScreen .auth-card input,
#authScreen .auth-card select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: #f7f7f8;
  background: #171719;
  border: 1px solid #242427;
  border-radius: 2px;
  outline: 0;
  box-shadow: none;
}

#authScreen .auth-card input:focus,
#authScreen .auth-card select:focus {
  border-color: #ef2638;
  box-shadow: 0 0 0 2px rgba(239,38,56,.13);
}

#authScreen .auth-card form > button {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  padding: 0 14px;
  color: #101012;
  background: #fff;
  border: 0;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 750;
}

#authScreen .auth-card form > button:hover {
  color: #fff;
  background: #ef2638;
}

#authScreen .auth-switch {
  margin: 10px 0 0;
  color: #68686e;
  font-size: 11px;
  text-align: center;
}

#authScreen .auth-card .text-button {
  min-height: 24px;
  padding: 0;
  color: #8e8e94;
  background: transparent;
  font-size: 12px;
}

#authScreen .auth-card .text-button:hover {
  color: #fff;
  background: transparent;
}

#authScreen .choice-grid {
  gap: 7px;
}

#authScreen .choice {
  padding: 10px;
  background: #111113;
  border-color: #27272b;
  border-radius: 2px;
}

#authScreen .choice:has(input:checked) {
  background: rgba(239,38,56,.09);
  border-color: #ef2638;
}

#authScreen .choice small,
#authScreen .plan-note {
  color: #77777d;
  font-size: 11px;
}

#authScreen .plan-note {
  background: #121214;
  border-color: #242428;
  border-radius: 2px;
}

#authScreen .code-input {
  font-size: 22px;
}

#authScreen .form-notice {
  min-height: 18px;
  margin: 12px 0 0;
  color: #ff5b68;
  font-size: 12px;
}

@media (max-width: 700px) {
  html:has(#authScreen:not([hidden])),
  body:has(#authScreen:not([hidden])) {
    overflow-y: auto;
  }

  #authScreen {
    position: relative;
    overflow-y: auto;
  }

  #authScreen::after {
    position: fixed;
    background: linear-gradient(90deg, rgba(10,10,11,.98), rgba(10,10,11,.84));
  }

  #authScreen .life-canvas {
    position: fixed;
    opacity: .45;
  }

  #authScreen .auth-wrap {
    width: min(100%, 390px);
    min-height: 100svh;
    margin: auto;
    padding: 72px 24px 48px;
    align-items: flex-start;
  }

  #authScreen .auth-card {
    width: 100%;
  }

  #authScreen .auth-brand {
    margin-bottom: 38px;
  }

  #authScreen .choice-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  #authScreen .life-canvas {
    opacity: .78;
  }
}
