:root {
  color-scheme: light dark;
  --bg: #f9f8fc;
  --card: #fffffff0;
  --text: #292334;
  --muted: #6e657b;
  --line: #e5dfea;
  --accent: #7950c4;
  --soft: #f4effa;
  --danger: #ac2848;
  --dot: #a88bbd;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
body:before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 22% 40%, #edd9ef88, transparent 48%),
    radial-gradient(ellipse at 83% 65%, #e3d9f888, transparent 50%);
}
header {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 36px;
}
.back {
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 120px);
  padding: 20px 20px 44px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 750;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 30px;
}
.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #b080df, #7451ba);
  color: white;
  font-size: 27px;
  border-radius: 17px;
  box-shadow: 0 7px 18px #9572ba24;
}
.accent {
  color: var(--accent);
  font-weight: 450;
}
.card {
  width: 100%;
  max-width: 420px;
  padding: 34px 36px 28px;
  background: var(--card);
  border: 1px solid #ffffffcc;
  border-radius: 28px;
  box-shadow:
    0 24px 70px -28px #5c327d40,
    0 2px 10px #5c327d05;
  backdrop-filter: blur(14px);
}
h1 {
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: -0.045em;
  margin: 0 0 10px;
  text-align: center;
  font-weight: 650;
}
.card > p {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 26px;
  line-height: 1.6;
}
form {
  display: grid;
  gap: 19px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}
input,
button {
  font: inherit;
  min-height: 48px;
  border-radius: 13px;
}
input {
  width: 100%;
  padding: 11px 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}
input:hover {
  border-color: #c3acd7;
}
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  padding: 12px 16px;
  background: #8051bb;
  color: #fff;
  font-weight: 600;
  transition:
    background 0.2s,
    transform 0.2s;
}
button:hover {
  background: #7145ab;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.secondary {
  background: var(--soft);
  color: var(--accent);
  border-color: var(--line);
}
.secondary:hover {
  background: var(--line);
}
.text-button {
  padding: 5px 0;
  background: none;
  color: var(--accent);
  min-height: 36px;
  font-size: 0.875rem;
  font-weight: 500;
}
.text-button:hover {
  background: none;
  text-decoration: underline;
}
.actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 17px;
}
.card #message:empty {
  display: none;
}
.card #message {
  padding: 12px;
  background: var(--soft);
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--text);
  text-align: left;
  margin-bottom: 18px;
}
.card #message.error {
  color: var(--danger);
}
.shared {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 28px 0 11px;
}
.sites {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.875rem;
}
.sites span {
  font-weight: 500;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 12px 20px 20px;
}
.session {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.session button {
  margin-top: 8px;
  width: 100%;
}
.account-link {
  display: block;
  text-align: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-decoration: none;
}
#content > .primary,
#content > .secondary {
  width: 100%;
}
.dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
  mask-image: radial-gradient(ellipse, transparent 12%, #000 78%);
}
.dots span {
  position: absolute;
  inset: -50px;
  background-image: radial-gradient(circle, var(--dot) 1.5px, transparent 2px);
  background-size: 36px 36px;
  opacity: 0.27;
  animation: float-dots 24s ease-in-out infinite alternate;
}
.dots span:nth-child(2) {
  background-size: 102px 102px;
  background-position: 17px 29px;
  opacity: 0.22;
  animation: float-dots 32s ease-in-out -8s infinite alternate-reverse;
}
.dots span:nth-child(3) {
  background-size: 193px 193px;
  background-position: 49px 12px;
  opacity: 0.26;
  filter: blur(1px);
  animation: float-dots 28s ease-in-out -16s infinite alternate;
}
@keyframes float-dots {
  0% {
    transform: translate3d(-8px, -14px, 0);
    opacity: 0.16;
  }
  100% {
    transform: translate3d(12px, 16px, 0);
    opacity: 0.36;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1721;
    --card: #28222eef;
    --text: #f6edf9;
    --muted: #c0b3c9;
    --line: #493a53;
    --accent: #cfadf4;
    --soft: #37283f;
    --danger: #ffa6c1;
    --dot: #c69ae3;
  }
  body:before {
    background:
      radial-gradient(ellipse at 22% 40%, #49305255, transparent 48%),
      radial-gradient(ellipse at 83% 65%, #34233f99, transparent 50%);
  }
  .card {
    border-color: #51405666;
    box-shadow: 0 24px 70px -28px #0008;
  }
  button {
    background: #9660ce;
  }
  button:hover {
    background: #a670dc;
  }
  .secondary:hover {
    background: var(--line);
  }
  .text-button:hover {
    background: none;
  }
}
@media (max-width: 500px) {
  header {
    height: 54px;
    padding: 0 22px;
  }
  main {
    min-height: calc(100svh - 105px);
    padding: 20px 20px 30px;
  }
  .brand {
    font-size: 28px;
    margin-bottom: 26px;
  }
  .card {
    padding: 30px 24px 24px;
    border-radius: 25px;
  }
  .dots span {
    background-size: 28px 28px;
  }
  .shared {
    margin-top: 25px;
  }
  .sites {
    gap: 19px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dots span {
    animation: none;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
