.auth-page {
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 211, 92, .18), transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(139, 198, 165, .17), transparent 25%),
    linear-gradient(135deg, #fffaf0 0%, #fffef9 48%, #f4fbf4 100%);
  color: #3d2c28;
}

.auth-background,
.auth-background *,
.auth-scene,
.auth-scene * {
  pointer-events: none;
  user-select: none;
}

.auth-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.auth-background::before,
.auth-background::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.auth-background::before {
  width: 360px;
  height: 360px;
  top: -170px;
  right: -90px;
  background: rgba(255, 224, 110, .14);
}

.auth-background::after {
  width: 280px;
  height: 280px;
  left: -110px;
  bottom: -120px;
  background: rgba(109, 169, 133, .12);
}

.auth-leaves {
  position: absolute;
  width: min(27vw, 430px);
  opacity: .3;
  animation: auth-leaf-parallax 7s ease-in-out infinite;
  will-change: transform;
}

.auth-leaves-left {
  left: -90px;
  bottom: -42px;
}

.auth-leaves-right {
  right: -100px;
  top: 8%;
  transform: rotate(155deg);
  animation-name: auth-leaf-parallax-right;
  animation-delay: -3.5s;
}

.auth-layout {
  position: relative;
  z-index: 1;
  width: min(100%, 1740px);
  max-width: 1740px;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 62px) clamp(30px, 5vw, 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(390px, 470px);
  align-items: center;
  gap: clamp(42px, 6vw, 96px);
  animation: auth-page-enter .62s cubic-bezier(.2, .75, .25, 1) both;
}

.auth-intro {
  position: relative;
  align-self: stretch;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand {
  position: absolute;
  top: 0;
  left: 0;
  width: 270px;
  height: 116px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #3d2c28;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: .02em;
  text-decoration: none;
}

.auth-brand img {
  display: block;
  width: 100px;
  height: 100%;
  object-fit: contain;
}

.auth-copy {
  position: relative;
  z-index: 3;
  max-width: 690px;
  padding-top: 82px;
}

.auth-copy .eyebrow {
  margin-bottom: 9px;
  color: #7b685f;
  font-size: 13px;
  letter-spacing: .18em;
}

.auth-copy h1 {
  margin: 0;
  max-width: 690px;
  color: #3d2421;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1.14;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.auth-copy h1 span {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  color: #438067;
}

.auth-copy h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 7%;
  right: -1%;
  bottom: .04em;
  height: .18em;
  border-radius: 999px;
  background: #ffd55f;
  transform: rotate(-1.5deg);
  opacity: .75;
}

.auth-tagline {
  margin: 18px 0 0;
  color: #725f56;
  font-size: clamp(15px, 1.4vw, 19px);
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 19px;
}

.auth-benefits span {
  padding: 7px 13px;
  border: 1px solid rgba(92, 118, 95, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 5px 16px rgba(80, 58, 39, .05);
  color: #6f655d;
  font-size: 12px;
  white-space: nowrap;
}

.auth-scene {
  position: relative;
  width: min(100%, 760px);
  height: clamp(320px, 39vh, 440px);
  min-height: 300px;
  margin-top: -14px;
  isolation: isolate;
}

.auth-scene::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 12%;
  bottom: 1%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(98, 124, 95, .17), transparent 68%);
  filter: blur(5px);
  z-index: 1;
}

.auth-scene::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: -7%;
  right: -2%;
  bottom: -1%;
  height: 28%;
  border-radius: 48% 44% 10% 12% / 38% 42% 16% 18%;
  background:
    linear-gradient(180deg, rgba(255, 229, 183, .52), rgba(238, 190, 123, .26)),
    repeating-linear-gradient(90deg, rgba(156, 103, 48, .055) 0 1px, transparent 1px 92px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .72);
}

.auth-mascot {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 2px;
  width: min(52%, 395px);
  transform: translateX(-49%);
  transform-origin: 50% 82%;
  animation: auth-mascot-breathe 3.6s ease-in-out infinite;
  will-change: transform;
}

.auth-cat {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 25px;
  width: min(31%, 220px);
  transform-origin: 50% 100%;
  animation: auth-cat-breathe 4.2s ease-in-out infinite;
  will-change: transform;
}

.auth-zzz {
  position: absolute;
  z-index: 6;
  left: 11%;
  bottom: 40%;
  width: 72px;
  height: 72px;
  overflow: visible;
}

.auth-zzz-letter {
  transform-box: fill-box;
  transform-origin: center;
  animation: auth-zzz-float 2.8s ease-out infinite;
  will-change: transform, opacity;
}

.auth-zzz-two { animation-delay: .35s; }
.auth-zzz-three { animation-delay: .7s; }

.auth-bulb {
  position: absolute;
  z-index: 6;
  right: 1.5%;
  bottom: 23%;
  width: min(19%, 138px);
  transform-origin: 50% 87%;
  animation: auth-bulb-sway 2.6s ease-in-out infinite;
  will-change: transform;
}

.auth-resource-group-wrap {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 52%;
  width: min(50%, 390px);
  transform: translateX(-50%);
}

.auth-resource-group {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 12px rgba(67, 47, 36, .1));
  opacity: 0;
  animation: auth-resource-group-enter .68s cubic-bezier(.2, .8, .3, 1.2) .28s forwards;
  transform-origin: 50% 100%;
}

.auth-side-note {
  position: absolute;
  z-index: 3;
  left: -3%;
  bottom: 25%;
  width: 108px;
  padding: 15px 10px;
  border: 1px solid rgba(184, 123, 70, .18);
  border-radius: 8px;
  background: rgba(255, 250, 238, .84);
  box-shadow: 0 10px 24px rgba(85, 57, 36, .08);
  color: #ad7c58;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
  transform: rotate(-2deg);
}

.auth-side-note::before,
.auth-side-note::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #ff9f83;
  opacity: .72;
}

.auth-side-note::before { left: 9px; }
.auth-side-note::after { right: 9px; background: #ffd45d; }
.auth-side-note span { display: block; color: #e89a77; font-size: 22px; line-height: 1; }

.auth-hand-note {
  position: absolute;
  z-index: 3;
  top: 5%;
  right: 3%;
  color: #a27963;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 17px;
  line-height: 1.32;
  text-align: center;
  transform: rotate(-7deg);
}

.auth-hand-note strong { display: block; font-weight: 500; }
.auth-hand-note span { color: #e78b75; }

.auth-speech {
  position: absolute;
  z-index: 6;
  padding: 13px 17px 12px;
  border: 3px solid #60443b;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #60443b;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 18px rgba(78, 54, 39, .08);
}

.auth-speech::after {
  content: "";
  position: absolute;
  bottom: -11px;
  width: 18px;
  height: 18px;
  border-right: 3px solid #60443b;
  border-bottom: 3px solid #60443b;
  background: #fff;
  transform: rotate(45deg);
}

.auth-speech-left {
  left: 20%;
  bottom: 38%;
  transform: rotate(-6deg);
}

.auth-speech-left::after { right: 20px; }

.auth-speech-right {
  right: 9%;
  bottom: 43%;
  transform: rotate(5deg);
}

.auth-speech-right::after { left: 20px; }

.auth-book-copy {
  position: absolute;
  z-index: 6;
  left: 5%;
  bottom: 12.5%;
  width: min(22%, 164px);
  color: rgba(255, 251, 232, .96);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 3px rgba(61, 45, 37, .58);
  transform: rotate(-2deg);
}

.auth-book-copy span { display: block; }

.auth-treasure-label {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 16.5%;
  width: 150px;
  color: #9b5e2e;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  transform: translateX(-50%) rotate(-1deg);
  text-shadow: 0 1px rgba(255, 241, 171, .75);
}

.auth-flight {
  position: absolute;
  z-index: 2;
  top: -12px;
  right: -2%;
  width: min(55%, 420px);
  height: 150px;
}

.auth-flight-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.auth-flight-path path {
  fill: none;
  stroke: #ffc94a;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 4 28;
  opacity: .85;
  animation: auth-trail-enter 1.4s ease-out both;
}

.auth-plane {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 88px;
  opacity: 0;
  offset-path: path("M 12 121 C 66 55 130 155 182 83 S 292 18 388 52");
  offset-rotate: auto;
  animation: auth-plane-flight 1.7s cubic-bezier(.25, .75, .25, 1) .1s forwards;
}

.auth-sparkles {
  position: absolute;
  z-index: 2;
  width: 96px;
  height: 96px;
  overflow: visible;
}

.auth-sparkles-one {
  right: 8%;
  bottom: 2%;
}

.auth-sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: auth-sparkle 2.8s ease-in-out infinite;
  will-change: transform, opacity;
}

.auth-sparkle-b { animation-delay: -.9s; }
.auth-sparkle-c { animation-delay: -1.8s; }

.auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: clamp(25px, 3vw, 36px);
  border: 1px solid rgba(96, 124, 103, .16);
  border-radius: 26px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 24px 70px rgba(75, 55, 41, .14);
  backdrop-filter: blur(18px);
  animation: auth-card-enter .62s cubic-bezier(.2, .75, .25, 1) .12s both;
}

.auth-speed-badge {
  position: absolute;
  top: 24px;
  right: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 6px;
  border-radius: 999px;
  background: #ffd65f;
  color: #6b4815;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(173, 119, 24, .15);
  pointer-events: none;
}

.auth-speed-icon {
  width: 17px;
  height: 17px;
  fill: rgba(255, 255, 255, .66);
  stroke: #7b5417;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: center;
  animation: auth-speed-breathe 2.2s ease-in-out infinite;
  will-change: transform, opacity;
}

.auth-tabs {
  min-height: 50px;
  padding: 5px;
  border-radius: 14px;
  background: #edf3eb;
}

.auth-tabs button {
  border-radius: 10px;
  color: #6d7f73;
  font-size: 15px;
  font-weight: 650;
}

.auth-tabs button.active {
  color: #32694f;
  box-shadow: 0 5px 16px rgba(49, 87, 59, .1);
}

.auth-card h2 {
  margin: 25px 0 2px;
  color: #26372f;
  font-size: clamp(24px, 2vw, 31px);
  line-height: 1.3;
}

.auth-card-subtitle {
  margin: 0 0 22px;
  color: #7c8981;
  font-size: 13px;
}

.auth-card form {
  gap: 14px;
}

.auth-card label {
  gap: 7px;
  color: #56675d;
  font-size: 13px;
  font-weight: 600;
}

.auth-card input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 15px;
  border: 1px solid #cddad0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  color: #273a31;
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(54, 77, 61, .025);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-card input::placeholder { color: #a1aaa4; }

.auth-card input:focus {
  outline: none;
  border-color: #4e876d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(78, 135, 109, .11);
}

.auth-card .primary-button {
  min-height: 52px;
  margin-top: 2px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4a8668, #317154);
  box-shadow: 0 10px 24px rgba(55, 115, 83, .2);
  font-size: 16px;
  transition: transform .18s, box-shadow .18s, opacity .18s;
}

.auth-card .primary-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 27px rgba(55, 115, 83, .25);
}

.auth-card .primary-button:not(:disabled):active { transform: translateY(0); }

.auth-card .code-row { align-items: stretch; }

.auth-card .code-send {
  min-width: 112px;
  border-radius: 12px;
  background: #f5f8f1;
  color: #466c55;
  font-weight: 650;
}

.auth-card .form-message {
  margin-top: 9px;
  border-radius: 9px;
  font-size: 13px;
}

.auth-card .form-message:not(:empty) {
  padding: 8px 10px;
  background: #f5f7f2;
}

.auth-card .form-message.success { background: #ecf7ef; }
.auth-card .form-message.error { background: #fff0ee; }

.auth-links {
  margin-top: 2px;
  text-align: left;
}

.auth-card .text-link {
  color: #3e765b;
  font-weight: 650;
}

.auth-switch {
  margin-top: 14px;
  color: #7c877e;
}

.auth-signup-gift {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(218, 164, 43, .24);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8dc, #fffdf4);
  color: #72541d;
  text-align: center;
}

.auth-signup-gift strong { font-size: 12px; }
.auth-signup-gift small { color: #9a7a3d; font-size: 11px; }
.auth-signup-gift[hidden] { display: none; }

.motion-paused .auth-animated,
.motion-paused .auth-resource-group,
.motion-paused .auth-flight-path path {
  animation-play-state: paused !important;
}

@keyframes auth-page-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-card-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-mascot-breathe {
  0%, 100% { transform: translateX(-49%) translateY(0) rotate(-.3deg); }
  50% { transform: translateX(-49%) translateY(-4px) rotate(.3deg); }
}

@keyframes auth-cat-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.012); }
}

@keyframes auth-zzz-float {
  0% { opacity: 0; transform: translateY(12px) scale(.86); }
  20% { opacity: .85; }
  75% { opacity: .62; }
  100% { opacity: 0; transform: translateY(-18px) scale(1.04); }
}

@keyframes auth-bulb-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes auth-resource-group-enter {
  from { opacity: 0; transform: translateY(16px) scale(.88); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes auth-speed-breathe {
  0%, 100% { opacity: .72; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.09); }
}

@keyframes auth-plane-flight {
  0% { opacity: 0; offset-distance: 0%; }
  12% { opacity: 1; }
  100% { opacity: 1; offset-distance: 100%; }
}

@keyframes auth-trail-enter {
  from { opacity: 0; stroke-dashoffset: 120; }
  to { opacity: .85; stroke-dashoffset: 0; }
}

@keyframes auth-sparkle {
  0%, 100% { opacity: .45; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes auth-leaf-parallax {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@keyframes auth-leaf-parallax-right {
  0%, 100% { transform: rotate(155deg) translateY(0); }
  50% { transform: rotate(155deg) translateY(3px); }
}

@media (max-width: 1100px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    gap: 35px;
    padding-inline: 34px;
  }

  .auth-copy h1 { font-size: clamp(37px, 5vw, 54px); }
  .auth-benefits span { padding-inline: 10px; }
  .auth-side-note,
  .auth-hand-note { display: none; }
  .auth-speech-left { left: 16%; }
  .auth-speech-right { right: 4%; }
}

@media (max-width: 860px) {
  .auth-page { background: linear-gradient(180deg, #fffaf0 0%, #fbfef9 56%, #f6faf4 100%); }

  .auth-layout {
    display: block;
    width: 100%;
    min-height: 100svh;
    padding: 0;
  }

  .auth-intro {
    min-height: 360px;
    padding: 16px 20px 0;
    align-items: center;
    overflow: hidden;
  }

  .auth-brand {
    position: absolute;
    top: 6px;
    left: 14px;
    width: 72px;
    height: 75px;
  }

  .auth-brand img { width: 72px; }
  .auth-brand span { display: none; }

  .auth-copy {
    width: 100%;
    max-width: 520px;
    padding-top: 70px;
    text-align: center;
  }

  .auth-copy .eyebrow { display: none; }

  .auth-copy h1 {
    max-width: none;
    font-size: clamp(32px, 9vw, 43px);
    line-height: 1.12;
    letter-spacing: -.04em;
  }

  .auth-copy h1 span {
    width: max-content;
    margin: 0 auto;
  }

  .auth-tagline {
    margin-top: 10px;
    font-size: 14px;
  }

  .auth-benefits { display: none; }

  .auth-scene {
    width: min(100%, 520px);
    height: 177px;
    min-height: 177px;
    margin-top: -5px;
  }

  .auth-mascot {
    bottom: -2px;
    width: 205px;
  }

  .auth-cat {
    left: 2%;
    bottom: 15px;
    width: 116px;
  }

  .auth-zzz {
    left: 12%;
    bottom: 52%;
    width: 42px;
    height: 42px;
  }

  .auth-bulb {
    right: 3%;
    bottom: 24%;
    width: 76px;
  }

  .auth-resource-group-wrap {
    bottom: 50%;
    width: min(49%, 235px);
  }

  .auth-side-note,
  .auth-hand-note,
  .auth-speech,
  .auth-book-copy { display: none; }

  .auth-treasure-label {
    bottom: 28%;
    width: 105px;
    font-size: 9px;
  }

  .auth-flight {
    top: -30px;
    right: -8px;
    width: 210px;
    height: 85px;
    transform: scale(.7);
    transform-origin: right top;
  }

  .auth-sparkles-one {
    right: 8%;
    bottom: 0;
    width: 60px;
    height: 60px;
  }

  .auth-card {
    width: min(100% - 24px, 600px);
    margin: -44px auto 24px;
    padding: 20px clamp(18px, 5vw, 28px) 22px;
    border-radius: 27px;
    backdrop-filter: blur(20px);
  }

  .auth-speed-badge {
    top: 17px;
    right: 22px;
  }

  .auth-tabs { min-height: 45px; }
  .auth-card h2 { margin: 18px 0 2px; font-size: 25px; }
  .auth-card-subtitle { margin-bottom: 15px; }
  .auth-card form { gap: 11px; }
  .auth-card label { gap: 5px; }
  .auth-card input { height: 48px; }
  .auth-card .primary-button { min-height: 49px; }
  .auth-signup-gift { flex-wrap: wrap; margin-top: 10px; }
  .auth-leaves { width: 230px; opacity: .25; }
}

@media (max-width: 420px) {
  .auth-intro { min-height: 344px; }
  .auth-copy { padding-top: 66px; }
  .auth-copy h1 { font-size: clamp(31px, 9.5vw, 38px); }
  .auth-tagline { font-size: 13px; }
  .auth-card { margin-top: -42px; }
  .auth-speed-badge { top: -18px; right: 18px; }
  .auth-card .code-row { gap: 6px; }
  .auth-card .code-send { min-width: 100px; padding-inline: 10px; font-size: 13px; }
}

@media (max-width: 860px) and (max-height: 720px) {
  .auth-intro { min-height: 300px; }
  .auth-copy { padding-top: 48px; }
  .auth-brand { width: 58px; height: 61px; }
  .auth-copy h1 { font-size: clamp(29px, 8.3vw, 35px); }
  .auth-tagline { margin-top: 5px; font-size: 12px; }
  .auth-scene { height: 146px; min-height: 146px; }
  .auth-mascot { width: 176px; }
  .auth-cat { width: 98px; }
  .auth-bulb { width: 65px; }
  .auth-resource-group-wrap { width: 208px; }
  .auth-card { margin-top: -38px; padding-top: 17px; }
  .auth-tabs { min-height: 41px; }
  .auth-card h2 { margin-top: 13px; font-size: 22px; }
  .auth-card-subtitle { margin-bottom: 10px; }
  .auth-card input { height: 45px; }
  .auth-card .primary-button { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-layout,
  .auth-card,
  .auth-animated,
  .auth-resource-group,
  .auth-flight-path path,
  .auth-zzz-letter,
  .auth-sparkle {
    animation: none !important;
  }

  .auth-layout,
  .auth-card,
  .auth-resource-group,
  .auth-flight-path path,
  .auth-sparkle,
  .auth-zzz-letter {
    opacity: 1;
  }

  .auth-plane {
    opacity: 1;
    offset-distance: 100%;
  }

  .auth-mascot { transform: translateX(-49%); }
}
