:root {
  --bg: #121212; --panel: #1e1e1f; --tile: #262627; --line: #39393b; --text: #f2f2f3; --muted: #9a9aa0;
  --accent: #c46cf0; --accent-bg: #2a1f33; --ok: #2fd27a; --ok-bg: #12261b; --warn: #f5b84a; --err: #ff6b6b;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.wrap { max-width: 600px; margin: 0 auto; padding: 20px 16px 140px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.accent { color: var(--accent); }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }

.head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; flex: 1; min-width: 0; }
.logo { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #c46cf0, #6c7cf0); color: #fff; font-weight: 800; letter-spacing: -.5px; }
.sum { text-align: right; }
.amount { font-size: 24px; font-weight: 700; }
.timer { font: 600 14px ui-monospace, monospace; background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.card h1 { font-size: 20px; margin: 4px 0 8px; }
.title { font-size: 17px; margin: 0 0 12px; }
.banner { border-color: #2c6b45; background: var(--ok-bg); }
.banner-amount { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.banner-amount strong { font: 700 26px ui-monospace, monospace; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }
.checks span::first-letter { color: var(--ok); }

.step h2 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--tile); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; font: inherit; }
.tile:hover { border-color: #55555a; }
.tile.on { border-color: var(--accent); background: var(--accent-bg); }
.tile.on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tile b { display: block; font-size: 16px; }
.tile small { color: var(--muted); }
.badge { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: 13px; color: #fff; }

.wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 10px; }
.wallets .tile { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 16px 8px; }
.wallets .tile em, .manual em { font-style: normal; color: var(--accent); font-size: 13px; font-weight: 600; }
.manual { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 18px; }

.manual-box { display: flex; gap: 18px; margin-top: 10px; }
.qr { flex: none; background: #fff; padding: 10px; border-radius: 10px; width: 160px; height: 160px; }
.qr img, .qr canvas { width: 140px !important; height: 140px !important; }
.manual-box label { display: block; margin-top: 6px; }
.copyrow { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.copyrow > :first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
code.big { font-size: 20px; font-weight: 700; }
code.addr { font-size: 13px; }
.warn { color: var(--warn); }
.msg { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--tile); border: 1px solid var(--line); }
.msg.err { color: var(--err); }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); padding-top: 6px; }
.kv dd { margin: 0; }
.form-inline { display: flex; gap: 10px; }
input[type=text] { flex: 1; min-width: 0; background: var(--tile); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; padding: 11px 16px; font: 600 15px system-ui, sans-serif;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--accent); color: #1a0f22; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.big { padding: 14px 22px; font-size: 16px; margin-top: 8px; }

.status { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(600px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px;
  background: #18211b; border: 1px solid #2c6b45; border-radius: var(--r); padding: 14px 16px; box-shadow: 0 10px 30px #0008; }
.status .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px #2fd27a33; animation: pulse 1.6s infinite; }
.status[data-state=paid] .dot { animation: none; }
.status[data-state=expired], .status[data-state=canceled] { background: #261c14; border-color: #6b4c2c; }
.status[data-state=expired] .dot, .status[data-state=canceled] .dot { background: var(--warn); animation: none; box-shadow: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px #2fd27a11; } }
.foot { text-align: center; margin-top: 24px; }

@media (max-width: 520px) {
  .wallets { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .manual-box { flex-direction: column; align-items: center; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { padding-top: 8px; }
  .form-inline { flex-direction: column; }
  .amount { font-size: 22px; }
  .head .sum { order: 3; width: 100%; text-align: left; }
}

.b-usdt { background: #26a17b; } .b-usdc { background: #2775ca; } .b-x { background: #555; }
.b-bsc { background: #f0b90b; color: #222; } .b-opbnb { background: #d9a40a; color: #222; font-size: 11px; } .b-polygon { background: #8247e5; }
.b-arbitrum { background: #28a0f0; } .b-ethereum { background: #627eea; } .b-tron { background: #eb0029; }
.b-metamask { background: #f6851b; } .b-trust { background: #3375bb; } .b-binance { background: #f0b90b; color: #222; }
.b-walletconnect { background: #3b99fc; } .b-tronlink { background: #2c6be5; font-size: 11px; }
