:root {
  --frame-w: 1024px;
  --frame-h: 524px;
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #101828;
  --text-muted: #667085;
  --border: #d0d5dd;
  --border-focus: #3b82f6;
  --primary: #101828;
  --primary-hover: #1d2939;
  --accent: #7c3aed;
  --link-blue: #2563eb;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  display: flex;
  flex-direction: column;
}

.page--frame {
  width: 100vw;
  height: 100vh;
  max-width: none;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.page--frame > .main {
  flex: 1 1 auto;
  min-height: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-mark {
  display: flex;
  color: inherit;
}

.brand--on-dark {
  color: #fff;
}

.brand--on-dark:hover {
  color: #fff;
}

.legal {
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legal a:hover {
  color: var(--text);
}

.legal--hero {
  font-size: 0.75rem;
  gap: 1.25rem;
  color: rgba(255, 255, 255, 0.42);
}

.legal--hero a {
  color: inherit;
  text-decoration: none;
}

.legal--hero a:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  max-width: none;
  margin: 0;
  align-items: stretch;
  padding: 0;
  gap: 0;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.panel--hero {
  background: radial-gradient(ellipse 92% 78% at 50% 58%, #4b4b55 0%, #2e2e35 52%, #24242a 100%);
  border-radius: 0;
  border: none;
  border-right: 1px solid #3f3f46;
}

.panel-hero-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  padding: 1.375rem 1.75rem 1.125rem;
  box-sizing: border-box;
}

.hero-bar {
  flex: 0 0 auto;
  text-align: left;
}

.hero-foot {
  flex: 0 0 auto;
  margin-top: auto;
  text-align: left;
}

.hero-crowd {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 0;
}

.blob-crew {
  position: relative;
  width: 220px;
  height: 150px;
  transform: scale(var(--crew-scale, 1));
  transform-origin: center bottom;
  will-change: transform;
}

.blob {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: center;
}

.blob-crew.is-turned-away .blob__face {
  opacity: 0;
  transform: translateY(4px);
}

.blob__body {
  position: relative;
}

.blob__shape {
  display: block;
}

.blob__face {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.blob__face--googly {
  gap: 8px;
}

.blob__eye {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.blob__pupil {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0a0a0a;
  transform: translate(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px)));
  transition: transform 0.08s ease-out;
}

.blob__dot-slot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.blob__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0a0a0a;
  transform: translate(var(--px, 0px), var(--py, 0px));
  transition: transform 0.08s ease-out;
}

.blob.is-blinking .blob__eye,
.blob.is-blinking .blob__dot-slot {
  transform: scaleY(0.14);
}

.blob.is-blinking .blob__pupil,
.blob.is-blinking .blob__dot {
  opacity: 0;
}

.blob__mouth {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 16px;
  height: 2px;
  margin-left: -8px;
  background: #0a0a0a;
  border-radius: 1px;
}

.blob__face--with-mouth {
  padding-bottom: 6px;
}

/* 后排左：紫色平行四边形条 */
.blob--purple {
  left: 16%;
  z-index: 1;
}

.blob--purple .blob__body {
  transform: rotateY(var(--turn-y, 0deg)) skewX(var(--purple-skew, -8deg)) translateX(var(--purple-x, 0px))
    translateY(var(--purple-y, 0px));
  transform-origin: 50% 100%;
  transition: transform 0.25s ease;
}

.blob--purple .blob__shape {
  position: relative;
  width: var(--purple-w, 62px);
  height: var(--purple-h, 144px);
  background: #6d28d9;
  border-radius: 20px 20px 0 0;
  transition: width 0.25s ease, height 0.25s ease;
}

.blob--purple .blob__shape::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 6px;
  width: 20px;
  height: 16px;
  opacity: 0;
  background:
    linear-gradient(#2d1063, #2d1063) 1px 0 / 2px 11px no-repeat,
    linear-gradient(#2d1063, #2d1063) 8px 1px / 2px 12px no-repeat,
    linear-gradient(#2d1063, #2d1063) 15px 0 / 2px 10px no-repeat;
  border-radius: 2px;
  transition: opacity 0.2s ease;
}

.blob--purple .blob__face {
  top: 24px;
  transform: skewX(calc(var(--purple-skew, -8deg) * -1));
}

/* 中间：黑色窄竖条 */
.blob--ink {
  left: 46%;
  z-index: 2;
}

.blob--ink .blob__shape {
  width: 42px;
  height: var(--ink-h, 132px);
  background: #0a0a0a;
  border-radius: 14px 14px 0 0;
  transition: height 0.25s ease;
}

.blob--ink .blob__body {
  transform: rotateY(var(--turn-y, 0deg)) skewX(var(--ink-skew, 0deg)) translateX(var(--ink-x, 0px))
    translateY(var(--ink-y, 0px));
  transform-origin: bottom center;
  transition: transform 0.25s ease;
}

.blob--ink .blob__face {
  top: 22px;
}

/* 前左：橙色半圆顶 */
.blob--orange {
  left: 2%;
  z-index: 3;
}

.blob--orange .blob__shape {
  width: 92px;
  height: 50px;
  background: #f97316;
  border-radius: 999px 999px 0 0;
}

.blob--orange .blob__body {
  transform: rotateY(var(--turn-y, 0deg)) skewX(var(--orange-skew, 0deg)) translateX(var(--orange-x, 0px))
    translateY(var(--orange-y, 0px));
  transform-origin: bottom center;
  transition: transform 0.25s ease;
}

.blob--orange .blob__face {
  top: 12px;
  gap: 10px;
}

/* 前右：暗黄胶囊 /墓碑形 */
.blob--yellow {
  left: auto;
  right: 16%;
  z-index: 4;
}

.blob--yellow .blob__shape {
  position: relative;
  width: 62px;
  height: 102px;
  background: #c9a227;
  border-radius: 31px 31px 0 0;
}

.blob--yellow .blob__shape::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 16px;
  width: 16px;
  height: 16px;
  border: 2px solid #6b5312;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(24deg) scale(0.2);
  transform-origin: left center;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.blob-crew.is-turned-away .blob--purple .blob__shape::after {
  opacity: 1;
}

.blob-crew.is-turned-away .blob--yellow .blob__shape::after {
  opacity: 1;
  transform: rotate(24deg) scale(1);
}

.blob--yellow .blob__body {
  transform: rotateY(var(--turn-y, 0deg)) skewX(var(--yellow-skew, 0deg)) translateX(var(--yellow-x, 0px))
    translateY(var(--yellow-y, 0px));
  transform-origin: bottom center;
  transition: transform 0.25s ease;
}

.blob--yellow .blob__face {
  top: 26px;
  gap: 9px;
}

.blob--yellow .blob__mouth {
  bottom: -14px;
  width: 22px;
  height: 3px;
  margin-left: -11px;
  transform: translate(var(--mouth-x, 0px), var(--mouth-y, 0px)) scaleX(var(--mouth-scale, 1));
  transition: transform 0.08s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .blob__pupil,
  .blob__dot {
    transition: none;
  }

  .blob__eye,
  .blob__dot-slot,
  .blob--purple .blob__shape,
  .blob--purple .blob__body,
  .blob--ink .blob__shape,
  .blob--ink .blob__body,
  .blob--orange .blob__body,
  .blob--yellow .blob__body,
  .blob--yellow .blob__mouth {
    transition: none;
  }
}

.panel--form {
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2.75rem;
  background: #dde1e7;
}

.form-card {
  width: min(360px, 100%);
  padding: 36px 30px 30px;
  background: #dde1e7;
  border-radius: 16px;
  box-shadow: -6px -6px 14px #ffffff8a, 7px 7px 14px rgba(94, 104, 121, 0.26);
}

.login-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

.login-badge img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 8px;
}

.field label {
  position: static;
  font-size: 13px;
  font-weight: 600;
  color: #5f6470;
  padding-left: 10px;
}

.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 50px;
}

.field-input-wrap input {
  padding-right: 44px;
}

.field input {
  width: 100%;
  height: 50px;
  padding-left: 16px;
  padding-right: 16px;
  font: inherit;
  font-size: 15px;
  color: #595959;
  background: #dde1e7;
  border: none;
  border-radius: 25px;
  box-shadow: inset 3px 3px 7px #babecb, inset -6px -6px 12px #ffffff80;
  transition: box-shadow 0.15s ease, color 0.15s ease;
}

.field input::placeholder {
  color: #8b8b8b;
}

.field input:hover {
  border-color: transparent;
}

.field input:focus {
  outline: none;
  color: #3b4251;
  box-shadow: inset 1px 1px 3px #babecb, inset -2px -2px 4px #ffffff80;
}

.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #595959;
  cursor: pointer;
}

.pwd-toggle:hover {
  color: #3498db;
  background: transparent;
}

.pwd-toggle:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

.pwd-toggle__eye-off[hidden],
.pwd-toggle__eye[hidden] {
  display: none;
}

.row--between {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #646b78;
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: #3498db;
  cursor: pointer;
}

.link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.link--form {
  color: var(--link-blue);
}

.link--strong {
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  margin-top: 10px;
  height: 50px;
  background: #dde1e7;
  color: #545d6f;
  border: none;
  border-radius: 25px;
  box-shadow: 4px 4px 10px #babecb, -6px -6px 12px #ffffff85;
  position: relative;
  overflow: hidden;
}

.btn--primary:hover {
  color: #2d79c7;
}

.btn--primary:focus-visible {
  outline: none;
  box-shadow: inset 3px 3px 7px #babecb, inset -5px -5px 9px #ffffff85;
}

.btn__label,
.btn__hover-layer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  pointer-events: none;
}

.btn__label {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn__hover-layer {
  position: absolute;
  inset: 0;
  color: #fff;
  background: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn__arrow {
  flex-shrink: 0;
}

.btn--interactive:hover .btn__label,
.btn--interactive:focus-visible .btn__label {
  transform: translateX(18px);
  opacity: 0;
}

.btn--interactive:hover .btn__hover-layer,
.btn--interactive:focus-visible .btn__hover-layer {
  opacity: 1;
  transform: translateY(0);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn--google {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
  box-shadow: none;
}

.btn--google:hover {
  background: #f9fafb;
  border-color: #b8bfcc;
}

.btn--google:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.google-icon {
  flex-shrink: 0;
}

.signup {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .page--frame {
    width: 100%;
    height: auto;
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  .page--frame > .main {
    flex: 0 1 auto;
  }

  .main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    min-height: 0;
  }

  .panel--hero {
    display: flex;
    min-height: 280px;
    border-right: none;
    border-bottom: 1px solid #3f3f46;
    order: -1;
  }

  .panel-hero-layout {
    padding: 1rem 1.25rem;
  }

  .hero-crowd {
    flex: 0 1 auto;
    padding: 0.5rem 0;
  }

  .blob-crew {
    height: 140px;
  }

  .panel--form {
    padding: 1.5rem 1.25rem 2rem;
    background: #fff;
  }
}

@media (max-width: 480px) {
  .form-title {
    font-size: 1.5rem;
  }
}
