:root {
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e6e8ec;
  --bg: #f6f7f9;
  --accent: #07c160;
  --danger: #d64545;
}
* { box-sizing: border-box; }
/* 关键：作者样式里的 display 会覆盖 hidden 属性，必须显式兜住 */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, #f6f7f9 55%, #eef0f3 100%);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.card {
  width: 380px;
  padding: 32px 32px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .18);
  text-align: center;
}
.head { margin-bottom: 22px; }
.mark {
  width: 34px; height: 34px; margin: 0 auto 12px;
  border-radius: 10px;
  background: var(--accent);
  position: relative;
}
.mark::after {
  content: "";
  position: absolute; inset: 9px;
  border-radius: 50%;
  background: #fff;
}
h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: .2px; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.qr-wrap {
  position: relative;
  width: 252px; height: 252px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.qr { display: block; width: 100%; height: 100%; object-fit: contain; }
.placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 10px;
  color: var(--muted); font-size: 13px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mask {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 8px;
  background: rgba(22, 24, 29, .82);
  color: #fff; font-size: 14px;
  backdrop-filter: blur(2px);
  animation: fade .16s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.tick { font-size: 26px; line-height: 1; }

.hint { min-height: 20px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.hint.err { color: var(--danger); }
.btn {
  margin-top: 12px;
  padding: 9px 20px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }

.foot {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #9aa1ac; font-size: 12px;
}
.foot a { color: #9aa1ac; text-decoration: none; }
.foot a:hover { color: var(--muted); }
.dot { margin: 0 6px; }
.build { color: #c2c8d0; font-variant-numeric: tabular-nums; }

@media (max-width: 420px) {
  .card { width: calc(100vw - 32px); padding: 26px 20px 16px; }
  .qr-wrap { width: 220px; height: 220px; }
}
