:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #15181d;
  --muted: #5b6472;
  --line: #e3e6eb;
  --accent: #e5322d;
  --accent-ink: #ffffff;
  --ok: #128a4a;
  --warn-bg: #fff4e5;
  --warn-ink: #8a4b00;
  --err: #c0262d;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --card: #181b20;
    --text: #eef0f3;
    --muted: #9aa3b0;
    --line: #2a2f37;
    --accent: #ff4d47;
    --warn-bg: #2b2112;
    --warn-ink: #f3c27a;
    --ok: #3ccf7f;
    --err: #ff6b6b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding-inline: 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.brand { font-size: 17px; }
select, .input {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.hero { padding-block: 28px 12px; }
.hero h1 { font-size: clamp(22px, 5vw, 30px); line-height: 1.25; margin: 0 0 8px; }
.hero-sub { margin: 0; color: var(--muted); }

.pkgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-block: 16px; }
.pkg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.pkg .energy { font-weight: 700; font-size: 17px; }
.pkg .price { font-size: 28px; font-weight: 800; margin: 6px 0 2px; }
.pkg .price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.pkg .use { color: var(--muted); font-size: 13px; }
.pkg .burn { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.badge { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-top: 8px; }
.badge.off { background: var(--muted); }

.tabs { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-top: 8px; }
.tab { flex: 1; font: inherit; font-weight: 600; border: 0; border-radius: 9px; padding: 10px 8px; background: transparent; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--accent); color: var(--accent-ink); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 12px; }
.panel h2 { font-size: 18px; margin: 0 0 12px; }
.steps { padding-left: 20px; margin: 0 0 14px; }
.steps li { margin-bottom: 4px; }
.label { font-size: 13px; color: var(--muted); margin: 12px 0 6px; display: block; }
.addr-box { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; }
.addr-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addr { font-size: 14px; word-break: break-all; flex: 1 1 220px; }
.amount-big { font-size: 26px; font-weight: 800; flex: 1 1 auto; }
.qr { margin-top: 12px; display: flex; justify-content: center; }
.qr svg { width: 180px; height: 180px; background: #fff; border-radius: 8px; }
.amounts { width: 100%; border-collapse: collapse; margin-top: 14px; }
.amounts th, .amounts td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.amounts td:first-child { font-weight: 700; white-space: nowrap; }

.btn, .btn-sm { font: inherit; font-weight: 700; border: 0; border-radius: 10px; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.btn { width: 100%; padding: 13px; margin-top: 16px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; padding: 11px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.choice input { accent-color: var(--accent); }
.choice .right { margin-left: auto; font-weight: 700; }

.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.note { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.error { color: var(--err); font-weight: 600; }
.bandwidth { margin-top: 14px; }
.status { border-radius: 10px; padding: 12px; font-weight: 700; margin-bottom: 8px; background: var(--bg); }
.status.ok { color: var(--ok); }
.status.bad { color: var(--err); }
.status a { color: inherit; }
.countdown { text-align: center; font-weight: 600; }

.faq { margin-block: 24px; }
.faq h2 { font-size: 18px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }
.foot { color: var(--muted); font-size: 12px; padding-block: 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
