:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #15181d;
  --muted: #6b7280;
  --line: #e4e7ec;
  --accent: #1473e6;
  --accent-dark: #0f5fc0;
  --ok: #16845b;
  --warn: #9a6b00;
  --bad: #b42318;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% -10%, #dce8fb 0%, transparent 62%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(20, 35, 60, .14), 0 1px 0 rgba(255, 255, 255, .8) inset;
}
.head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; }
.mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  color: var(--accent); background: #eaf2fe;
}
.mark svg { width: 18px; height: 18px; }
.secure { margin-left: auto; color: var(--muted); font-size: 12px; }
.view { padding: 22px 20px 24px; }
.view[hidden] { display: none; }
h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.muted { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.small { font-size: 12.5px; }
.status {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 7px 11px; border-radius: 999px; background: #eef4ff; color: #175cd3;
  font-size: 12.5px; font-weight: 600;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { background: #e8f7f0; color: var(--ok); }
.status.warn { background: #fff5db; color: var(--warn); }
.status.bad { background: #fdecea; color: var(--bad); }
.qr-wrap {
  display: flex; justify-content: center; margin: 18px 0 12px;
  background: #f7f8fb; border: 1px solid var(--line); border-radius: 18px; padding: 14px;
}
#qr { display: block; width: 260px; height: 260px; background: #fff; border-radius: 10px; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0 16px; }
.primary, .secondary {
  width: 100%; min-height: 52px; border-radius: 14px; font: inherit; font-size: 16px;
  font-weight: 650; cursor: pointer; transition: transform .12s ease, background .16s ease;
}
.primary { border: 0; background: var(--accent); color: #fff; }
.primary:active { transform: scale(.995); background: var(--accent-dark); }
.secondary { margin-top: 10px; background: #fff; color: var(--text); border: 1px solid var(--line); }
.primary:disabled, .secondary:disabled, .link:disabled { opacity: .55; cursor: progress; }
.actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.link { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; padding: 8px; cursor: pointer; }
.copy-status { min-height: 18px; margin: 6px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.foot { margin: 0; padding: 0 20px 18px; color: #8a909a; font-size: 11.5px; line-height: 1.45; }
.result-icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 2px auto 14px;
  border-radius: 50%; background: #e8f7f0; color: var(--ok);
}
.result-icon svg { width: 30px; height: 30px; }
.result-icon.warn { background: #fff5db; color: var(--warn); }
.result-icon.bad { background: #fdecea; color: var(--bad); }
.result-amount { margin: 2px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
#view-result h1, #view-result .result-amount { text-align: center; }
#view-result .muted { text-align: center; }
.spinner {
  width: 34px; height: 34px; margin: 20px auto 8px; border-radius: 50%;
  border: 3px solid #dbe6f8; border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 380px) {
  .view { padding: 18px 16px 20px; }
  #qr { width: 220px; height: 220px; }
  h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
