:root {
  --bg: #0d1420;
  --bg2: #111c2e;
  --card: #16233a;
  --line: #24344f;
  --txt: #e8eef7;
  --mut: #9fb0c9;
  --accent: #f5b942;
  --green: #35c77f;
  --red: #e5605e;
  --blue: #5aa9ff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--txt);
  font-family: -apple-system, 'Segoe UI', Roboto, Inter, sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* hero */
.hero {
  background: linear-gradient(160deg, #0d1420 0%, #14263f 60%, #1b3355 100%);
  padding: 64px 0 48px; border-bottom: 1px solid var(--line);
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: .5px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.12; margin: 0 0 16px; }
.accent { color: var(--accent); }
.lede { font-size: 18px; color: var(--mut); max-width: 640px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 30px 0; }
.how-card { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.how-card h3 { margin: 8px 0 6px; font-size: 17px; }
.how-card p { margin: 0; color: var(--mut); font-size: 14px; }
.how-n {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #111;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* buttons */
.btn {
  background: var(--accent); color: #14100a; border: 0; border-radius: 10px;
  padding: 13px 26px; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: transform .08s ease, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.big { font-size: 19px; padding: 16px 36px; margin-top: 6px; }
.btn.ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn-row { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

/* wizard */
.wizard { margin: 34px 0 10px; }
.wdots { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.wdot {
  font-size: 13px; color: var(--mut); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 20px;
}
.wdot.done { color: var(--accent); border-color: var(--accent); }
.step { display: none; }
.step.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.step h2 { font-size: 28px; margin: 0 0 18px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin-bottom: 16px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.ideal-card { border-top: 3px solid var(--accent); }
.backup-card { border-top: 3px solid var(--blue); }
.card h3 { margin: 0 0 12px; font-size: 18px; }
.card h4 { margin: 0 0 6px; color: var(--mut); font-size: 14px; text-transform: uppercase; letter-spacing: .6px; }

label { display: block; margin-bottom: 14px; font-size: 14px; color: var(--mut); }
input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 9px;
  color: var(--txt); font-size: 16px;
}
input:focus { outline: none; border-color: var(--accent); }
code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
  background: var(--bg2); padding: 3px 8px; border-radius: 6px; word-break: break-all;
}
code.hash { display: block; margin-top: 8px; padding: 10px; line-height: 1.7; }

.err {
  background: rgba(229,96,94,.12); border: 1px solid var(--red); color: #ffb3b1;
  border-radius: 10px; padding: 12px 16px; margin: 12px 0; font-size: 14px;
}
.warn {
  background: rgba(245,185,66,.1); border: 1px solid var(--accent); color: #ffd88a;
  border-radius: 10px; padding: 12px 16px; margin: 14px 0; font-size: 14px;
}
.fine { color: var(--mut); font-size: 13.5px; }
.center { text-align: center; }
.hl { font-size: 17px; color: var(--txt); margin: 0; }

/* deal */
.deal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .deal-grid { grid-template-columns: 1fr; } }
.deal-main { border-top: 3px solid var(--green); }
.deal-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; font-size: 16px; }
.deal-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; font-size: 20px; }
.deal-row strong { color: var(--accent); white-space: nowrap; }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 8px; }
@media (max-width: 640px) { .outcomes { grid-template-columns: 1fr; } }
.outcome { border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 600; }
.outcome span { font-weight: 400; color: var(--mut); font-size: 13.5px; }
.outcome.good { background: rgba(53,199,127,.1); border: 1px solid var(--green); }
.outcome.bad { background: rgba(229,96,94,.08); border: 1px solid var(--line); }
.outcome strong { color: var(--txt); }

/* pay */
.pay-card { border-top: 3px solid var(--accent); }
.qr-wrap { display: flex; justify-content: center; margin: 18px 0; }
.qr-wrap canvas { border-radius: 12px; max-width: 100%; }
.addr-label { margin-top: 6px; }
.addr-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; }
.addr-row code { flex: 1; padding: 10px; line-height: 1.6; }

/* draw */
.progress { height: 14px; background: var(--bg2); border-radius: 8px; overflow: hidden; margin: 16px 0; }
#draw-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width 1s ease; }

/* result */
.result-card { text-align: center; border-top: 3px solid var(--green); }
.badge {
  display: inline-block; padding: 8px 22px; border-radius: 24px; font-weight: 800;
  letter-spacing: 1px; font-size: 15px; margin-bottom: 10px;
}
.badge.win { background: var(--green); color: #08130d; }
.badge.backup { background: var(--blue); color: #0a1220; }
.result-card h2 { font-size: 34px; margin: 6px 0 10px; }
.save { color: var(--green); font-weight: 700; }
.extra { color: var(--red); font-weight: 700; }

/* fairness + footer */
.fairness { margin: 50px 0 30px; }
.fairness h2 { font-size: 24px; }
footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--mut); font-size: 14px; }
footer a, .card a { color: var(--accent); }
