:root {
  --bg: #f4f2f8;
  --card: #ffffff;
  --ink: #1c1b22;
  --muted: #6d6a78;
  --line: #eceaf2;
  --accent: #6d5efc;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --radius: 22px;
  --shadow: 0 16px 40px rgba(40, 32, 72, 0.06);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  padding:
    calc(20px + env(safe-area-inset-top))
    16px
    calc(24px + env(safe-area-inset-bottom));
}

.shell {
  width: min(100%, 440px);
  margin: 0 auto;
}

.top { margin-bottom: 18px; }

.brand {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.steps {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  flex: 1;
  padding: 7px 0;
  border-radius: 999px;
  background: #ebe8f2;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.steps li.is-current,
.steps li.is-done {
  background: #ece9ff;
  color: #4c3fd4;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px 22px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 650;
}

.lead, .privacy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.privacy {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f6fb;
}

.field {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.input {
  width: 100%;
  height: 52px;
  margin-bottom: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafc;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.input:focus {
  outline: 2px solid rgba(109, 94, 252, 0.35);
  border-color: transparent;
}

.btn, .link {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-ghost {
  background: #f3f1f8;
  color: var(--ink);
}

.row {
  display: flex;
  gap: 10px;
}

.row .btn { margin-top: 0; }

.msg {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}

.msg.is-ok { color: #067647; }

.picker {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin-bottom: 12px;
  border: 1.5px dashed #d9d4e8;
  border-radius: 18px;
  background: #fafafc;
  color: var(--muted);
  overflow: hidden;
}

.preview, .result {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.preview { max-height: 360px; object-fit: contain; background: #f4f2f8; }

.result { margin: 8px 0 16px; background: #f7f6fb; }

.pulse {
  width: 54px;
  height: 54px;
  margin: 28px auto;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 35%, #d9d3ff 36% 100%);
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  50% { transform: scale(0.86); opacity: 0.7; }
}

.foot { margin-top: 18px; text-align: center; }

.link {
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
}

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (min-width: 840px) {
  body { padding-top: 48px; }
  .card { padding: 36px 32px 28px; }
}
