@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/assets/inter-tight.woff2") format("woff2");
}
@font-face {
  font-family: "Bebas Neue"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/assets/bebas-neue.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/assets/jetbrains-mono.woff2") format("woff2");
}

:root {
  --bg: #06070b; --bg-2: #08090e;
  --surface: #0c0e14; --surface-2: #10131b;
  --ink: #dbe1e1; --paper: #cbd1d1; --muted: #8e989b; --muted-2: #6f7a7f;
  --line: rgba(202,215,215,.14); --line-strong: rgba(219,230,230,.30);
  --yellow: #f4c400; --yellow-2: #ffdd35; --yellow-dim: rgba(244,196,0,.14);
  --danger: #e5484d; --danger-dim: rgba(229,72,77,.13);
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh; color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; letter-spacing: .1px;
  background:
    radial-gradient(ellipse 120% 90% at 50% -10%, rgba(244,196,0,.05), transparent 55%),
    radial-gradient(ellipse 130% 100% at 52% 30%, rgba(22,28,36,.35), transparent 60%),
    linear-gradient(180deg, #06070b 0%, #05060a 58%, #04050a 100%);
  background-attachment: fixed;
}
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 1; max-width: 468px; margin: 0 auto; padding: 30px 18px 40px; }

/* header / brand lockup */
.hd { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 26px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: auto; opacity: .92; filter: drop-shadow(0 0 12px rgba(244,196,0,.12)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 27px; letter-spacing: 1.5px; color: var(--paper); }
.brand-sub { font-size: 10px; letter-spacing: 3.2px; text-transform: uppercase; color: var(--muted-2); margin-top: 4px; }

/* cards */
.card {
  position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.03);
}
.card::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244,196,0,.5), transparent);
}
h1 { font-family: var(--font-display); font-weight: 400; font-size: 34px; letter-spacing: 1px;
  text-transform: uppercase; margin: 0 0 6px; color: var(--ink); }
h2 { font-family: var(--font-display); font-weight: 400; font-size: 25px; letter-spacing: .6px;
  text-transform: uppercase; margin: 4px 0 12px; color: var(--ink); }
.lede { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }

/* forms */
label, .field { display: block; margin: 0 0 16px; font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--muted-2); }
input, select {
  display: block; width: 100%; margin-top: 8px; padding: 12px 13px;
  background: #090b11; color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: 9px; font-family: var(--font-body); font-size: 15px; letter-spacing: normal;
  text-transform: none; outline: none; transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238e989b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
input:focus, select:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-dim); }
input::placeholder { color: var(--muted-2); opacity: .6; }
.code-in { font-size: 22px; letter-spacing: 8px; text-align: center; }

/* buttons */
button { font-family: var(--font-body); cursor: pointer; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; transition: background .15s, border-color .15s, color .15s, transform .05s; }
button:active { transform: translateY(1px); }
.primary { width: 100%; padding: 13px; background: var(--yellow); color: #0a0a06;
  font-weight: 600; letter-spacing: .3px; }
.primary:hover { background: var(--yellow-2); }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); padding: 9px 14px; }
.ghost:hover { color: var(--ink); border-color: var(--muted); }
.ghost.sm { padding: 6px 11px; font-size: 12.5px; }
.danger { padding: 12px 16px; background: var(--danger); color: #fff; font-weight: 600; }
.danger:hover { background: #f05a5f; }
.danger:disabled { opacity: .4; cursor: not-allowed; }

.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: var(--font-mono); }
.err { color: var(--danger); font-size: 12.5px; min-height: 17px; margin: 9px 0 2px; }
.hidden { display: none !important; }

/* status */
.statusbox { display: flex; align-items: center; gap: 11px; margin: 20px 0 22px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--muted); background: #0a0c12; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.ok { color: var(--yellow); border-color: rgba(244,196,0,.45); background: var(--yellow-dim); }
.badge.no { color: var(--muted-2); }
.actions { display: flex; gap: 10px; }
.actions button { flex: 1; }

/* steps + qr */
.steps { margin: 0 0 18px; padding-left: 20px; color: var(--muted); font-size: 13px; }
.steps li { margin: 5px 0; }
.steps b { color: var(--ink); font-weight: 600; }
.qrwrap { position: relative; width: 300px; max-width: 100%; aspect-ratio: 1; margin: 6px auto 16px;
  background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 0 0 1px var(--line-strong), 0 10px 40px -12px rgba(244,196,0,.18); }
.qrwrap img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qrwrap img:not([src]) { visibility: hidden; }
.qr-overlay { position: absolute; inset: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(6,7,11,.94); color: var(--yellow); border-radius: 8px; text-align: center; padding: 12px;
  font-family: var(--font-display); font-size: 26px; letter-spacing: 1px; }
.pairstatus { text-align: center; color: var(--muted); font-size: 12.5px; margin: 4px 0 14px; min-height: 17px; }
#btn-cancel { display: block; margin: 0 auto; }

.ft { text-align: center; color: var(--muted-2); font-size: 10.5px; letter-spacing: 2px;
  text-transform: uppercase; margin: 26px 0 6px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(3,4,7,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-card { position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(229,72,77,.4); border-radius: 16px; padding: 26px 24px; max-width: 430px; width: 100%;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); }
.modal-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--danger-dim);
  border: 1px solid rgba(229,72,77,.5); color: var(--danger); display: flex; align-items: center;
  justify-content: center; font-family: var(--font-display); font-size: 26px; margin-bottom: 14px; }
.modal-card h2 { color: var(--danger); margin-top: 0; }
.modal-card p { color: var(--paper); font-size: 13.5px; }
.modal-card b { color: var(--ink); }
.typehint { color: var(--muted); }
.modal code, .modal .mono { background: #090b11; padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--line-strong); color: var(--yellow); font-family: var(--font-mono); font-size: 13px; }
#modal-confirm { margin-top: 4px; letter-spacing: 3px; text-transform: uppercase; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

@media (max-width: 400px) { .card { padding: 26px 18px; } h1 { font-size: 30px; } }
