:root {
  color-scheme: light;
  --ink: #3f3041;
  --muted: #776979;
  --rose: #d95f7d;
  --rose-dark: #b94363;
  --rose-soft: #fff1f4;
  --cream: #fffaf3;
  --blue: #7898c8;
  --shadow: 0 24px 70px rgba(74, 48, 67, .2);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at 16% 14%, rgba(255,255,255,.95) 0 4%, transparent 17%),
    radial-gradient(circle at 84% 78%, rgba(255,221,228,.82) 0 5%, transparent 21%),
    linear-gradient(145deg, #f8dbe3 0%, #faf0e5 48%, #dbe9fa 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 30vh;
  pointer-events: none;
  background: linear-gradient(12deg, rgba(107,137,179,.18), transparent 60%);
  clip-path: polygon(0 75%, 22% 43%, 43% 72%, 66% 24%, 100% 65%, 100% 100%, 0 100%);
}

body::after {
  opacity: .55;
  transform: scaleX(-1);
  background: linear-gradient(12deg, rgba(217,95,125,.18), transparent 62%);
}

button,
input { font: inherit; }

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.login-card {
  position: relative;
  width: min(100%, 520px);
  overflow: hidden;
  padding: 120px clamp(24px, 7vw, 52px) 28px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 32px;
  background: rgba(255,250,243,.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-sky {
  position: absolute;
  inset: 0 0 auto;
  height: 96px;
  background: linear-gradient(100deg, rgba(240,175,193,.78), rgba(189,213,242,.82));
}

.login-sky::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 15px;
  height: 25px;
  border: 3px solid rgba(255,255,255,.83);
  border-width: 3px 0 0;
  border-radius: 50% 50% 0 0;
  transform: perspective(70px) rotateX(48deg);
}

.login-cloud {
  position: absolute;
  width: 72px;
  height: 18px;
  border-radius: 30px;
  background: rgba(255,255,255,.7);
}

.login-cloud::before,
.login-cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.login-cloud::before { left: 12px; width: 28px; height: 28px; }
.login-cloud::after { right: 10px; width: 35px; height: 35px; }
.cloud-one { top: 29px; left: 6%; }
.cloud-two { top: 18px; right: 7%; transform: scale(.72); }

.login-heart {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 24px;
  color: white;
  font-size: 27px;
  filter: drop-shadow(0 3px 8px rgba(115,61,83,.28));
  transform: translateX(-50%);
}

.login-heading { text-align: center; }
.login-eyebrow {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.login-heading > p:last-child {
  max-width: 390px;
  margin: 15px auto 27px;
  color: var(--muted);
  line-height: 1.55;
}

fieldset { margin: 0; padding: 0; border: 0; }
legend {
  width: 100%;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
  text-align: center;
}

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

.identity-option {
  position: relative;
  min-width: 0;
  min-height: 96px;
  padding: 17px 12px;
  border: 2px solid transparent;
  border-radius: 21px;
  color: var(--ink);
  background: white;
  box-shadow: 0 8px 24px rgba(79,55,73,.08);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.identity-option:hover { transform: translateY(-2px); }
.identity-option[aria-pressed="true"] {
  border-color: var(--rose);
  box-shadow: 0 10px 26px rgba(217,95,125,.18);
}

.identity-avatar {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 7px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--rose), #ee9daf);
  line-height: 38px;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.identity-option:nth-child(2) .identity-avatar {
  background: linear-gradient(145deg, var(--blue), #a9c3e3);
}

.identity-name { font-weight: 800; }

.answer-panel {
  margin-top: 21px;
  padding: 17px;
  border-radius: 20px;
  background: var(--rose-soft);
}

.answer-panel label {
  display: block;
  margin-bottom: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.35;
}

.answer-input-wrap { position: relative; }
.answer-input-wrap input {
  width: 100%;
  min-height: 48px;
  padding: 11px 47px 11px 14px;
  border: 1px solid #dfcbd0;
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: white;
}

.answer-input-wrap input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(217,95,125,.14);
}

.reveal-button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.device-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: .75rem;
}

.login-error {
  margin: 13px 0 0;
  color: #a72f4c;
  font-size: .84rem;
  font-weight: 700;
  text-align: center;
}

.login-submit {
  width: 100%;
  min-height: 51px;
  margin-top: 18px;
  border: 0;
  border-radius: 16px;
  color: white;
  background: linear-gradient(120deg, var(--rose-dark), var(--rose));
  box-shadow: 0 10px 24px rgba(185,67,99,.24);
  font-weight: 800;
  cursor: pointer;
}

.login-submit:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.login-language { display: flex; justify-content: center; gap: 5px; margin-top: 21px; }
.login-language button {
  padding: 5px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}
.login-language button.active { color: var(--rose-dark); background: var(--rose-soft); }

@media (max-width: 480px) {
  .login-shell { padding: 0; }
  .login-card { min-height: 100vh; border-radius: 0; padding-top: 126px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
