:root {
  --green: #00D632;
  --bg: #0b0b0c;
  --card: #ffffff;
  --ink: #111;
  --muted: #8a8a8e;
  --line: #ececee;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Screen / sheet ── */
.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.screen.active { display: flex; }

.sheet {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 28px;
  padding: 28px 24px 32px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: up .28s ease;
}
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.handle {
  width: 44px; height: 5px; border-radius: 3px;
  background: #d7d7db; margin: 0 auto 22px;
}

/* ── Brand ── */
.brand { text-align: center; }
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; }
.name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.sub { margin: 2px 0 0; color: var(--muted); font-weight: 600; }

.secure {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 16px 0 20px; font-size: .82rem; color: #3c3c43; font-weight: 600;
}

/* ── Amount grid ── */
.label { font-size: .72rem; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin: 0 0 12px; text-align: center; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amt {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 15px 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.amt:active { transform: scale(.97); }
.amt.selected { background: #eafaf0; border-color: var(--green); color: #06732e; }

.custom {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  margin-top: 12px;
}
.dollar { font-size: 1.2rem; font-weight: 800; color: var(--muted); }
.custom input {
  border: none; outline: none; flex: 1;
  font-family: inherit; font-size: 1.05rem; font-weight: 700;
  color: var(--ink); background: transparent;
}
.custom input::placeholder { color: #b9b9be; font-weight: 500; }

.err { color: #ff3b30; font-size: .86rem; min-height: 1.2em; text-align: center; margin: 12px 0 0; font-weight: 600; }

/* ── Pay button ── */
.pay {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  border: none; border-radius: 16px;
  background: var(--green);
  color: #fff;
  padding: 17px 20px;
  margin-top: 18px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,214,50,.32);
  transition: all .15s ease;
}
.pay:active { transform: scale(.98); }
.pay:disabled { opacity: .6; cursor: default; }

/* ── Step 2 ── */
.header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.back {
  border: none; background: #f2f2f4; border-radius: 12px;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink);
}

.amt-display { text-align: center; margin: 8px 0 4px; }
.usd { display: block; font-size: 2.6rem; font-weight: 900; letter-spacing: -0.03em; }
.sats { display: block; color: var(--muted); font-weight: 600; font-size: .95rem; }

.expires {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: #8a8a8e; font-size: .85rem; margin: 10px 0 16px;
}

.qr-box {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 20px; padding: 14px; margin: 0 auto;
  width: fit-content;
}
.qr-box img { display: block; border-radius: 8px; }

.copy {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink);
  padding: 14px; margin-top: 12px;
  font-family: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
  transition: all .15s ease;
}
.copy:active { background: #f5f5f7; }

.status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; font-size: .9rem; color: #3c3c43; font-weight: 600;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #ffcc00; box-shadow: 0 0 0 0 rgba(255,204,0,.5); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,204,0,.5); } 70% { box-shadow: 0 0 0 8px rgba(255,204,0,0); } 100% { box-shadow: 0 0 0 0 rgba(255,204,0,0); } }

.hint { text-align: center; color: var(--muted); font-size: .8rem; margin: 12px 0 0; }

.us-note { text-align: center; color: var(--muted); font-size: .75rem; margin: 10px 0 0; font-weight: 600; }

/* In-app browser banner */
.iab-banner {
  background: #fff3cd;
  border: 1.5px solid #ffe08a;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  color: #7a5a00;
  font-size: .85rem;
  line-height: 1.4;
}
.iab-banner strong { display: block; margin-bottom: 4px; font-size: .9rem; color: #5a4200; }
.iab-banner p { margin: 0; }
.iab-banner .copy { margin-top: 8px; }

@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .amt { padding: 13px 0; }
}
