:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --card: #ffffff;
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --danger: #ff3b30;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 50% -20%, rgba(0, 113, 227, 0.10), transparent 55%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 48%, #eef0f3 100%);
}

.phone {
  width: min(420px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 22px calc(32px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.hero {
  padding: 12px 8px 22px;
}

.brand {
  font-size: clamp(1.9rem, 8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
}

h1 {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}

.tip {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--muted);
}

.card {
  margin-top: 4px;
  padding: 26px 20px 22px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.qr-img {
  width: 176px;
  height: 176px;
  border-radius: 20px;
  background: #fff;
  padding: 12px;
  object-fit: contain;
  border: 1px solid var(--line);
}

.qr-img-sm {
  width: 152px;
  height: 152px;
}

.qr-caption {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfbfd;
  color: var(--ink);
  font: inherit;
  font-size: 1.08rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

input::placeholder {
  letter-spacing: 0.02em;
  text-transform: none;
  color: #a1a1a6;
}

input:focus {
  outline: none;
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.btn, .btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 14px;
  border: 0;
  border-radius: 980px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active, .btn-cta:active { transform: scale(0.98); }

.btn-cta {
  margin-top: 16px;
  height: 54px;
}

.btn-cta[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.btn-text {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.device {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.note {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 0.9rem;
}

.foot {
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (min-width: 560px) {
  body {
    display: grid;
    place-items: center;
  }
  .phone {
    min-height: min(860px, 100vh);
  }
}
