:root {
  color-scheme: light;
  --bg-top: #dff1ff;
  --bg-mid: #f8fcff;
  --bg-bottom: #d8ecff;
  --ink: #0d3b73;
  --muted: #607d9f;
  --primary: #4d9df4;
  --primary-dark: #2d74d9;
  --surface: rgba(255, 255, 255, 0.9);
  --line: #b9d8f7;
  --danger: #9d2330;
  --danger-bg: #fff0f2;
  --success: #1f6b68;
  --success-bg: #eefcff;
  --shadow: 0 24px 54px rgba(62, 127, 199, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-top);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 27% 13%, rgba(255, 255, 255, 0.9) 0 5px, transparent 6px),
    radial-gradient(circle at 31% 8%, rgba(255, 255, 255, 0.75) 0 4px, transparent 5px),
    radial-gradient(circle at 55% 8%, rgba(255, 255, 255, 0.85) 0 1.5px, transparent 2px),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  left: -8vw;
  right: -8vw;
  bottom: -58px;
  height: 140px;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background: #ffffff;
  border-radius: 48% 55% 0 0 / 48% 55% 0 0;
  transform: rotate(-3deg);
}

body::after {
  bottom: -74px;
  background: rgba(95, 164, 231, 0.42);
  border-radius: 55% 45% 0 0 / 55% 45% 0 0;
  transform: rotate(4deg);
}

.sky {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100vw, 430px);
  height: 250px;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.86);
  filter: blur(0.2px);
}

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

.sun {
  position: absolute;
  top: 34px;
  left: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.92) 0 6px, transparent 7px),
    radial-gradient(circle, #ffe59a 0 42%, #ffd263 43% 68%, rgba(255, 211, 99, 0) 69%);
  box-shadow:
    0 0 0 12px rgba(255, 225, 142, 0.2),
    0 0 38px rgba(255, 202, 79, 0.36);
}

.cloud-left {
  left: -42px;
  top: 28px;
  width: 150px;
  height: 68px;
  border-radius: 999px;
}

.cloud-left::before {
  width: 70px;
  height: 70px;
  left: 20px;
  top: -38px;
}

.cloud-left::after {
  width: 58px;
  height: 58px;
  right: 22px;
  top: -12px;
}

.cloud-right {
  right: -46px;
  top: 18px;
  width: 158px;
  height: 72px;
  border-radius: 999px;
}

.cloud-right::before {
  width: 78px;
  height: 78px;
  left: 28px;
  top: -46px;
}

.cloud-right::after {
  width: 56px;
  height: 56px;
  right: 24px;
  top: -16px;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(154px, env(safe-area-inset-top)) 36px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.mark {
  width: 32px;
  height: 30px;
  position: relative;
}

.mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 14px;
  height: 13px;
  border-radius: 50% 50% 45% 45%;
  background: var(--primary-dark);
  transform: translateX(-50%) rotate(45deg);
}

.mark::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 0;
  height: 9px;
  background:
    radial-gradient(circle at 4px 5px, var(--primary-dark) 0 3.5px, transparent 4px),
    radial-gradient(circle at 12px 2px, var(--primary-dark) 0 3.5px, transparent 4px),
    radial-gradient(circle at 20px 5px, var(--primary-dark) 0 3.5px, transparent 4px);
}

.eyebrow {
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.45em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #103f78;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 11vw, 3.35rem);
  line-height: 0.95;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
}

h2 {
  font-size: 1.35rem;
  line-height: 1.18;
}

.panel {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: 20px 20px 22px;
  border: 1px solid rgba(204, 226, 247, 0.86);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
}

.input-wrap {
  position: relative;
  display: block;
}

input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 46px;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  background: rgba(251, 253, 255, 0.86);
}

input::placeholder {
  color: #6d86a7;
  font-weight: 500;
}

input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(77, 157, 244, 0.18);
}

.input-icon,
.icon-button {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  background-color: var(--primary-dark);
}

.input-icon {
  left: 14px;
  pointer-events: none;
}

.email-icon {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lock-icon {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.icon-button {
  right: 12px;
  min-height: auto;
  width: 24px;
  border: 0;
  padding: 0;
  cursor: pointer;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.icon-button.is-visible {
  opacity: 0.62;
}

button {
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 20px rgba(45, 116, 217, 0.28);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

.secondary {
  color: var(--primary-dark);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: none;
}

.divider-link {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.divider-link span {
  height: 1px;
  background: #c8def6;
}

.link {
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.lock-link::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
  background: var(--primary-dark);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.link:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(77, 157, 244, 0.28);
  outline-offset: 3px;
}

.hint {
  min-height: 42px;
  margin: 2px -4px -4px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(225, 241, 255, 0.95);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.hint::before {
  content: "";
  width: 26px;
  height: 26px;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.24);
}

.hint {
  display: block;
  padding: 8px 10px;
}

.hint strong,
.hint b {
  color: var(--primary-dark);
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(62, 127, 199, 0.12);
}

.error {
  color: var(--danger);
  background: var(--danger-bg);
}

.success {
  color: var(--success);
  background: var(--success-bg);
}

.signed {
  gap: 14px;
}

.status {
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 360px) {
  .shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  .panel {
    padding: 20px 18px 24px;
  }

  .eyebrow {
    letter-spacing: 0.34em;
  }
}

@media (min-height: 760px) {
  .shell {
    padding-top: 170px;
  }
}

@media (min-width: 720px) {
  body {
    display: grid;
    place-items: start center;
  }

  .sky {
    position: fixed;
    height: 244px;
  }

  .shell {
    width: 390px;
    padding-left: 20px;
    padding-right: 20px;
  }
}
