:root {
  color-scheme: light;
  --ink: #27324b;
  --muted: #78839b;
  --pink: #eb78b7;
  --purple: #a88bdd;
  --blue: #61cbea;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 13%, rgba(255, 223, 241, .86), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(204, 241, 255, .9), transparent 32%),
    linear-gradient(145deg, #fff9fc, #f8f5ff 48%, #f3fbff);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.login-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 38px;
  overflow: hidden;
  place-items: center;
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .3;
  background-image: radial-gradient(rgba(125, 150, 193, .3) .75px, transparent .75px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.ambient {
  position: absolute;
  width: 390px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(20px);
  opacity: .42;
}
.ambient.pink { top: -210px; left: -110px; background: #f796cd; }
.ambient.purple { top: 15%; right: -250px; background: #bea5ec; }
.ambient.blue { bottom: -260px; left: 34%; background: #72d6f4; }

.back-link {
  position: fixed;
  z-index: 5;
  top: 28px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #69758e;
  font-size: 14px;
  text-decoration: none;
}
.back-link span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 12px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 8px 20px rgba(75,93,127,.1);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1120px, 100%);
  min-height: 680px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 36px;
  background: rgba(255,255,255,.4);
  box-shadow: 0 35px 80px rgba(70,87,124,.15), 0 0 0 1px rgba(190,155,220,.12), inset 0 1px #fff;
  backdrop-filter: blur(28px) saturate(1.3);
}
.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(244,145,199,.75), rgba(197,169,234,.42), rgba(111,213,241,.75));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 52px 54px 38px;
  overflow: hidden;
  background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.88), transparent 30%), linear-gradient(150deg, rgba(255,236,247,.7), rgba(240,234,255,.56) 50%, rgba(223,247,255,.68));
}
.brand-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -100px;
  width: 320px;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255,255,255,.13), 0 0 0 64px rgba(255,255,255,.1);
}
.brand-panel > img { position: relative; z-index: 1; width: min(265px, 78%); height: auto; object-fit: contain; }
.brand-copy { position: relative; z-index: 1; margin-top: 44px; }
.brand-copy small, .login-card header small { color: #9c8cb4; font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.brand-copy h1 {
  margin: 16px 0 18px;
  color: transparent;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.16;
  letter-spacing: -.055em;
  background: linear-gradient(110deg, #df70b0, #9d87d2 50%, #45badb);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 18px rgba(168,139,221,.13));
}
.brand-copy p { max-width: 360px; margin: 0; color: #748099; font-size: 15px; line-height: 1.8; }
.music-art { position: relative; z-index: 1; display: flex; min-height: 154px; align-items: center; margin-top: auto; }
.record {
  position: relative;
  display: grid;
  width: 122px;
  aspect-ratio: 1;
  flex: 0 0 122px;
  place-items: center;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 9px, rgba(134,119,170,.13) 10px 11px), linear-gradient(145deg, #fff, #e7dcf9);
  box-shadow: 0 22px 38px rgba(99,90,137,.17), inset 0 1px 2px #fff;
  animation: float 5s ease-in-out infinite;
}
.record::before { content: ""; position: absolute; width: 52px; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(145deg, #ed88c0, #a993df 55%, #65cae7); }
.record i { position: relative; z-index: 1; width: 12px; aspect-ratio: 1; border-radius: 50%; background: white; }
.record b { position: absolute; top: -15px; right: 2px; color: #df76b3; font-size: 27px; }
.wave { display: flex; height: 84px; flex: 1; align-items: center; justify-content: center; gap: 7px; }
.wave i { width: 4px; height: 30%; border-radius: 99px; background: linear-gradient(#e783ba, #a992da, #61c9e7); animation: wave 1.5s ease-in-out infinite alternate; }
.wave i:nth-child(2) { height: 55%; animation-delay: -.5s; } .wave i:nth-child(3) { height: 85%; animation-delay: -.9s; }
.wave i:nth-child(4) { height: 45%; animation-delay: -.2s; } .wave i:nth-child(5) { height: 72%; animation-delay: -1.1s; }
.wave i:nth-child(6) { height: 36%; animation-delay: -.7s; } .wave i:nth-child(7) { height: 58%; animation-delay: -.4s; }
.benefits { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.benefits span { display: flex; flex-direction: column; gap: 3px; color: #8490a8; font-size: 10px; }
.benefits b { color: #6f7897; font-size: 15px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.startup-shell {
  width: min(520px, 100%);
  min-height: clamp(540px, 68svh, 630px);
  grid-template-columns: 1fr;
}
.startup-shell .brand-panel {
  display: flex;
  min-width: 0;
  padding: 48px 48px 34px;
}
.startup-shell .brand-panel > img { width: min(255px, 76%); }
.startup-shell .brand-copy { margin-top: 60px; }
.startup-shell .brand-copy h1 { margin-top: 0; font-size: clamp(35px, 6vw, 44px); }
.startup-shell .music-art { min-height: 140px; }
.startup-shell .record { width: 104px; flex-basis: 104px; }
.startup-shell .record::before { width: 44px; }
.startup-enter {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
}
.startup-enter:focus-visible {
  outline: 3px solid rgba(97, 203, 234, .62);
  outline-offset: -7px;
}
.form-shell {
  width: min(520px, 100%);
  min-height: 630px;
  grid-template-columns: 1fr;
}
.form-shell .form-wrap {
  padding: 48px 56px 40px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.78), transparent 34%),
    linear-gradient(155deg, rgba(255,242,250,.58), rgba(244,239,255,.48) 52%, rgba(226,248,255,.62));
}
.login-only-page .mobile-brand {
  display: block;
  margin-bottom: 36px;
  text-align: center;
}
.login-only-page .mobile-brand img {
  width: min(250px, 72%);
  height: auto;
}
.register-page .form-shell { min-height: 690px; }
.register-page .form-wrap { padding-block: 34px 30px; }
.register-page .mobile-brand { margin-bottom: 24px; }
.register-page .login-card header { margin-bottom: 22px; }

.form-wrap { display: grid; padding: 32px 56px; place-items: center; }
.login-card { width: min(420px, 100%); }
.mobile-brand { display: none; }
.login-card header { margin-bottom: 26px; }
.login-card h2 { margin: 10px 0 8px; font-size: 34px; line-height: 1.2; letter-spacing: -.04em; }
.login-card header p { margin: 0; color: var(--muted); font-size: 14px; }
.field { display: block; margin-top: 16px; }
.field > span:first-child { display: block; margin: 0 0 9px 3px; color: #56627a; font-size: 13px; font-weight: 750; }
.input-shell {
  position: relative;
  display: flex;
  height: 54px;
  align-items: center;
  border: 1px solid rgba(154,160,190,.19);
  border-radius: 17px;
  background: rgba(255,255,255,.67);
  box-shadow: inset 0 1px #fff, 0 9px 24px rgba(84,97,132,.06);
  transition: .18s ease;
}
.input-shell:focus-within { border-color: transparent; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(174,139,218,.23), 0 13px 28px rgba(119,111,161,.11); transform: translateY(-1px); }
.input-shell input { min-width: 0; height: 100%; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.input-shell input::placeholder { color: #abb2c2; }
.field-icon { position: relative; width: 20px; height: 20px; flex: 0 0 20px; margin: 0 13px 0 17px; color: #a58fc8; }
.user-icon::before { content: ""; position: absolute; top: 1px; left: 6px; width: 7px; height: 7px; border: 1.7px solid; border-radius: 50%; }
.user-icon::after { content: ""; position: absolute; bottom: 1px; left: 3px; width: 13px; height: 7px; border: 1.7px solid; border-radius: 9px 9px 4px 4px; }
.lock-icon::before { content: ""; position: absolute; top: 8px; left: 3px; width: 14px; height: 10px; border: 1.7px solid; border-radius: 3px; }
.lock-icon::after { content: ""; position: absolute; top: 1px; left: 6px; width: 8px; height: 9px; border: 1.7px solid; border-bottom: 0; border-radius: 6px 6px 0 0; }
.password-toggle { display: grid; width: 46px; height: 100%; padding: 0; border: 0; place-items: center; cursor: pointer; background: transparent; }
.eye-icon { position: relative; width: 18px; height: 12px; border: 1.6px solid #9aa3b6; border-radius: 50% / 60%; }
.eye-icon::after { content: ""; position: absolute; inset: 3px 6px; border-radius: 50%; background: #9aa3b6; }
.password-toggle[aria-pressed=true] .eye-icon::before { content: ""; position: absolute; z-index: 1; top: 5px; left: -2px; width: 22px; height: 1.5px; background: #9aa3b6; transform: rotate(-38deg); }
.form-options { display: flex; align-items: center; justify-content: space-between; margin: 15px 2px 20px; }
.register-options { justify-content: flex-start; }
.remember { display: flex; align-items: center; gap: 8px; color: #707c93; font-size: 13px; cursor: pointer; }
.remember input { position: absolute; opacity: 0; }
.custom-check { position: relative; width: 18px; height: 18px; border: 1px solid rgba(137,147,173,.34); border-radius: 6px; background: rgba(255,255,255,.74); }
.remember input:focus-visible + .custom-check { outline: 2px solid rgba(97, 203, 234, .68); outline-offset: 3px; }
.remember input:checked + .custom-check { border-color: transparent; background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue)); }
.remember input:checked + .custom-check::after { content: ""; position: absolute; top: 3px; left: 6px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.form-options a, .register a { color: #a477c9; font-size: 13px; font-weight: 750; text-decoration: none; }
.forgot-password {
  padding: 4px 0;
  border: 0;
  color: #9879c4;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  background: transparent;
}
.forgot-password:hover, .forgot-password:focus-visible, .register a:hover, .register a:focus-visible {
  color: #5ebfdf;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-button {
  display: flex;
  width: 100%;
  height: 55px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 17px;
  color: white;
  font-weight: 850;
  cursor: pointer;
  background: linear-gradient(105deg, #ea78b6, #ad8cdb 50%, #59c5e5);
  box-shadow: 0 14px 30px rgba(170,132,207,.28), inset 0 1px rgba(255,255,255,.35);
  transition: .18s ease;
}
.login-button:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 18px 34px rgba(160,128,200,.33); }
.divider { display: flex; align-items: center; gap: 14px; margin: 23px 0 18px; color: #9aa3b5; font-size: 11px; white-space: nowrap; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: linear-gradient(to right, transparent, rgba(146,155,177,.22)); }
.divider::after { background: linear-gradient(to left, transparent, rgba(146,155,177,.22)); }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.social-button {
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(151,159,183,.2);
  border-radius: 16px;
  color: #505c73;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  background: rgba(255,255,255,.61);
  box-shadow: 0 8px 20px rgba(91,105,137,.055), inset 0 1px #fff;
}
.google { color: transparent; font-size: 19px; background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 42%, #fbbc05 0 67%, #ea4335 0); -webkit-background-clip: text; background-clip: text; }
.apple { color: #333b4d; font-size: 15px; }
.register { margin: 20px 0 0; color: #8791a5; font-size: 13px; text-align: center; }
.form-message { min-height: 18px; margin: 10px 0 -8px; color: #8b75bd; font-size: 12px; text-align: center; }

@keyframes float { 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes wave { to { transform: scaleY(.45); opacity: .65; } }

@media (max-width: 820px) {
  .login-page { padding: 78px 20px 28px; }
  .login-shell { width: min(500px, 100%); min-height: 0; grid-template-columns: 1fr; border-radius: 30px; }
  .brand-panel { display: none; }
  .form-wrap { padding: 38px 42px 34px; }
  .mobile-brand { display: block; margin-bottom: 27px; text-align: center; }
  .mobile-brand img { width: min(220px, 68%); height: auto; }
  .login-card header { text-align: center; }
  .startup-shell { width: min(520px, 100%); min-height: clamp(540px, 66svh, 620px); }
  .startup-shell .brand-panel { display: flex; padding: 44px 46px 32px; }
  .startup-shell .brand-copy { margin-top: 54px; }
  .form-shell { width: min(500px, 100%); min-height: 600px; }
  .form-shell .form-wrap { padding: 42px 42px 34px; }
  .login-only-page .mobile-brand { margin-bottom: 30px; }
  .register-page .form-shell { min-height: 680px; }
  .register-page .form-wrap { padding-block: 34px 30px; }
  .register-page .mobile-brand { margin-bottom: 22px; }
}
@media (max-width: 520px) {
  .login-page { display: block; padding: 66px 14px 18px; overflow: auto; }
  .back-link { top: 17px; left: 17px; }
  .back-link b { display: none; }
  .login-shell { border-radius: 26px; }
  .form-wrap { padding: 30px 22px 25px; }
  .mobile-brand { margin-bottom: 21px; }
  .login-card header { margin-bottom: 26px; }
  .login-card h2 { font-size: 29px; }
  .field { margin-top: 17px; }
  .input-shell { height: 52px; border-radius: 16px; }
  .login-button { height: 53px; border-radius: 16px; }
  .startup-shell { min-height: clamp(520px, calc(100svh - 150px), 610px); }
  .startup-shell .brand-panel { padding: 38px 34px 28px; }
  .startup-shell .brand-panel > img { width: min(235px, 78%); }
  .startup-shell .brand-copy { margin-top: 48px; }
  .startup-shell .brand-copy h1 { font-size: clamp(34px, 10vw, 42px); }
  .form-shell { min-height: calc(100svh - 84px); }
  .form-shell .form-wrap { min-height: inherit; padding: 34px 22px 28px; }
  .login-only-page .mobile-brand { margin-bottom: 27px; }
  .register-page .form-shell { min-height: calc(100svh - 84px); }
  .register-page .form-wrap { padding-block: 28px 24px; }
  .register-page .mobile-brand { margin-bottom: 20px; }
}
@media (max-width: 350px) { .form-wrap { padding-inline: 16px; } .form-options a { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Keep the new wide PeerMusic lockup balanced on each auth screen. */
.startup-shell .brand-panel > img {
  width: min(245px, 74%);
  max-height: 86px;
}

.login-only-page .mobile-brand img,
.register-page .mobile-brand img {
  width: min(232px, 70%);
  max-height: 82px;
  object-fit: contain;
}

@media (max-width: 520px) {
  .startup-shell .brand-panel > img {
    width: min(226px, 74%);
    max-height: 80px;
  }

  .login-only-page .mobile-brand img,
  .register-page .mobile-brand img {
    width: min(218px, 68%);
    max-height: 76px;
  }
}
