:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111c30;
  background: #edf5ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; }
a { color: inherit; }

.landing-page {
  background: linear-gradient(180deg, #edf6ff 0%, #f5f8fc 100%);
  padding: 34px 16px 42px;
}

.landing-shell {
  width: min(100%, 580px);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 16px 42px rgba(55, 86, 122, .13);
}

.landing-title {
  min-height: 90px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #edf0f4;
  color: #1d5fc9;
  font-size: clamp(1.55rem, 6vw, 2rem);
  font-weight: 800;
}

.landing-content {
  background: linear-gradient(180deg, #f5f8fc 0%, #f1f5fa 100%);
  padding: 28px 20px 42px;
}

.promo-crop {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #f22;
  box-shadow: 0 5px 18px rgba(35, 45, 72, .08);
  -webkit-tap-highlight-color: transparent;
}

.promo-first { aspect-ratio: 1067 / 762; }
.promo-second { aspect-ratio: 1067 / 772; }
.promo-crop img {
  position: absolute;
  width: 114.72%;
  max-width: none;
  left: -7.31%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.promo-first img { top: -74.54%; }
.promo-second img { top: -207.90%; }
.promo-crop.is-custom img {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  object-fit: cover;
}
.promo-crop:focus-visible { outline: 4px solid #2563eb; outline-offset: 4px; }
.promo-crop:active { transform: scale(.992); }

.recommendation {
  margin: 22px 0;
  padding: 28px 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(31, 45, 65, .08);
  color: #222c3d;
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  font-weight: 700;
}

.landing-footer {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: #687181;
  font-size: .95rem;
}

.gradient-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 5%, rgba(158, 86, 255, .8), transparent 40%),
    linear-gradient(155deg, #7c3aed 0%, #4438df 48%, #174bdd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px calc(28px + env(safe-area-inset-bottom));
}

.verify-card {
  width: min(100%, 560px);
  min-height: 390px;
  padding: 58px 28px;
  border-radius: 38px;
  background: rgba(255, 255, 255, .96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 24px 55px rgba(18, 17, 90, .24);
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbe5ff;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.verify-card h1 { margin: 34px 0 6px; font-size: 2.4rem; }
.verify-card p { margin: 0; color: #70798b; font-size: 1.2rem; }
.fallback-link { margin-top: 36px; color: #2364d2; font-weight: 700; }

.phone-login-card { min-height: 520px; }
.phone-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, #2563eb, #7c3aed);
  font-size: 2rem;
  box-shadow: 0 12px 30px rgba(74, 66, 210, .28);
}
.phone-login-card h1 { margin-top: 24px; }
.phone-form {
  width: min(100%, 390px);
  margin-top: 30px;
  display: grid;
  gap: 11px;
  text-align: left;
}
.phone-form label { color: #334155; font-size: .95rem; font-weight: 700; }
.phone-form input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #d9e0ec;
  border-radius: 14px;
  padding: 0 16px;
  color: #172033;
  background: #fff;
  font: inherit;
  font-size: 1.08rem;
  outline: none;
}
.phone-form input:focus { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.phone-form button {
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #6546db);
  font: inherit;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
}
.phone-form button:disabled { opacity: .45; cursor: not-allowed; }
.phone-input-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid #d9e0ec;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.phone-input-row:focus-within { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.phone-input-row span { padding: 0 14px; border-right: 1px solid #e3e8f1; color: #475569; font-weight: 700; }
.phone-input-row input { border: 0; border-radius: 0; box-shadow: none !important; }
.login-alert {
  width: min(100%, 390px);
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #1e3a5f;
  background: #e8f2ff;
  font-size: .95rem;
  font-weight: 700;
}
.login-alert.error { color: #991b1b; background: #fee2e2; }
.login-alert.success { color: #166534; background: #dcfce7; }
.pending-phone { margin-top: 20px !important; font-size: 1rem !important; }
.change-phone { margin-top: 22px; color: #2563eb; font-weight: 700; }
.config-hint { margin-top: 16px !important; color: #b45309 !important; font-size: .92rem !important; }

.retry-screen {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 56px);
  align-items: center;
  justify-content: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.failed-mark {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #ef4444;
  font-size: 2.5rem;
  font-weight: 800;
}
.failed-card h1 { margin-top: 24px; }
.tap-retry {
  margin-top: 46px;
  padding: 14px 24px;
  border-radius: 999px;
  color: #fff;
  background: #2563eb;
  font-weight: 800;
}

.result-page {
  min-height: 100svh;
  flex-direction: column;
  justify-content: space-between;
  gap: 42px;
  padding-top: clamp(110px, 18vh, 210px);
}
.result-card {
  width: min(100%, 570px);
  padding: 52px 24px 38px;
  border-radius: 42px;
  text-align: center;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 65px rgba(24, 15, 99, .22);
}
.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 26px rgba(28, 38, 80, .2);
}
.avatar-fallback {
  margin: 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #222, #58667d);
  font-size: 2.4rem;
  font-weight: 800;
}
.result-card h1 { margin: 22px 0 5px; font-size: clamp(2rem, 8vw, 2.8rem); }
.verified-name { margin: 0; color: #737c8d; font-size: 1.18rem; }
.qr-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 38px;
}
.qr-item {
  display: block;
  border: 1px solid #e6e9f0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 9px 22px rgba(33, 45, 88, .1);
}
.qr-item img { display: block; width: 100%; aspect-ratio: 1; }
.qr-tip { margin-top: 22px !important; font-size: 1rem !important; }
.group-button {
  display: inline-flex;
  min-height: 64px;
  padding: 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #2361c5;
  background: #fff;
  text-decoration: none;
  font-size: 1.24rem;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(18, 18, 87, .22);
}
.result-footer { color: #fff; font-size: 1.12rem; font-weight: 700; }

@media (max-width: 430px) {
  .landing-page { padding: 16px 10px 26px; }
  .landing-title { min-height: 76px; }
  .landing-content { padding: 20px 14px 30px; }
  .recommendation { padding: 22px 18px; }
  .landing-footer { min-height: 90px; }
  .result-card { padding: 42px 16px 32px; border-radius: 34px; }
  .avatar { width: 92px; height: 92px; }
  .qr-list { gap: 8px; }
  .qr-item { border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.8s; }
  .promo-crop:active { transform: none; }
}
