:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #006aff;
  --error-bg: #fdecec;
  --error: #b42318;
  --ok-bg: #e8f7ee;
  --ok: #067647;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}
body.mode-popup { background: var(--card); padding: 20px 16px; }
.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}
body.mode-popup .card { border: 0; box-shadow: none; padding: 0; }
/* Embedded: the store page sizes the iframe to our content, so no viewport-based height. */
body.mode-iframe { background: var(--card); padding: 20px 16px; min-height: 0; display: block; }
body.mode-iframe .card { border: 0; box-shadow: none; padding: 0; margin: 0 auto; }
body.mode-iframe header { margin-bottom: 18px; }
header { text-align: center; margin-bottom: 24px; }
.store { font-weight: 600; font-size: 15px; }
.order { color: var(--muted); font-size: 13px; margin-top: 4px; }
.amount { font-size: 32px; font-weight: 700; margin-top: 12px; }
.amount span { font-size: 16px; color: var(--muted); font-weight: 500; }
h1 { font-size: 20px; margin: 0 0 12px; }
#card-container { min-height: 90px; }
.btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  margin-top: 8px;
}
.btn:hover:not(:disabled) { filter: brightness(.92); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.msg { margin-top: 14px; font-size: 14px; line-height: 1.4; }
.msg:empty { display: none; }
.msg.error { background: var(--error-bg); color: var(--error); padding: 10px 12px; border-radius: 8px; }
.msg.success { background: var(--ok-bg); color: var(--ok); padding: 10px 12px; border-radius: 8px; }
.secure { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }
