:root{
  --bg0:#070812;
  --bg1:#0b0d1a;
  --card: rgba(17, 24, 39, .72);
  --cardSolid:#111827;
  --border: rgba(148, 163, 184, .18);
  --text:#e5e7eb;
  --muted:#94a3b8;
  --primary:#a855f7;
  --primary2:#7c3aed;
  --success:#22c55e;
  --danger:#ef4444;
  --shadow: 0 24px 70px rgba(0,0,0,.45);
  --radius:18px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(900px 420px at 30% 0%, rgba(168,85,247,.28) 0%, transparent 60%),
    radial-gradient(900px 420px at 70% 0%, rgba(34,197,94,.14) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 55%, #050612);
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding: 42px 16px 56px;
}

.wrap{ width:min(1040px, 100%); position:relative; }

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin: 0 auto 18px auto;
  width: min(900px, 100%);
}

.brand{
  display:flex;align-items:center;gap:12px;
}

.brand .logo{
  width:44px;height:44px;border-radius:14px;
  background: rgba(2,6,23,.35);
  border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  letter-spacing:-.03em;
  box-shadow: 0 16px 45px rgba(168,85,247,.22);
  overflow:hidden;
}
.brand .logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.brand .logo span{
  display:none;
  font-weight: 950;
}
.brand .logo:not(:has(img)) span{ display:block; }

.titleRow{
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.titleIcon{
  width:24px;
  height:24px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.16);
  background: rgba(2,6,23,.35);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: rgba(226,232,240,.95);
}
.btnIcon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: rgba(226,232,240,.9);
}

.inlineLink{
  color: rgba(192,132,252,.95);
  text-decoration: none;
}
.inlineLink:hover{
  text-decoration: underline;
}

.brand .meta{ line-height:1.1; }
.brand .meta .name{ font-weight:900; font-size:15px; letter-spacing:-.02em; }
.brand .meta .sub{ color:var(--muted); font-size:12px; margin-top:3px; }

.hero{
  width: min(900px, 100%);
  margin: 0 auto 18px auto;
  text-align:center;
}

.heroMascot{
  margin: 0 auto 16px auto;
  width: min(200px, 100%);
  display:flex;
  align-items:center;
  justify-content:center;
}
.heroMascot img{
  max-width: 100%;
  height: auto;
  display:block;
}

.title{
  margin: 0 0 8px 0;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -.04em;
}
.subtitle{
  margin:0 auto;
  color:var(--muted);
  font-size: 14px;
  line-height:1.6;
  width:min(720px, 100%);
}

.banner{
  width: min(900px, 100%);
  margin: 16px auto 18px auto;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(34,197,94,.35);
  background: rgba(34,197,94,.08);
  color: #bbf7d0;
  display:flex;
  align-items:center;
  gap:10px;
}
.banner.error{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
  color: #fecaca;
}
.banner .dot{
  width:22px;height:22px;border-radius:999px;
  background: rgba(34,197,94,.85);
  display:inline-flex;align-items:center;justify-content:center;
  color:#052e16;
  font-weight:900;
  flex:0 0 auto;
}
.banner.error .dot{
  background: rgba(239,68,68,.85);
  color: #1f0a0a;
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: min(900px, 100%);
  margin: 0 auto;
}
@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
  .title{ font-size: 30px; }
}

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(10px);
}

.card h3{
  margin:0 0 14px 0;
  font-size: 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.check{
  width:28px;height:28px;border-radius:999px;
  border:1px solid rgba(34,197,94,.35);
  background: rgba(34,197,94,.12);
  color: rgba(34,197,94,.95);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  flex:0 0 auto;
}
.check.off{
  opacity:.35;
  border-color: var(--border);
  background: rgba(2,6,23,.35);
  color: var(--muted);
}

.row{
  border: 1px solid var(--border);
  background: rgba(2,6,23,.35);
  border-radius: 14px;
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.id{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width:0;
}

.avatar{
  width:38px;height:38px;border-radius:12px;
  background: rgba(148,163,184,.10);
  border:1px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;color:#e2e8f0;
  flex:0 0 auto;
  overflow:hidden;
}
.avatarDiscord{
  padding:0;
  background: rgba(88,101,242,.12);
  border-color: rgba(88,101,242,.25);
}
.avatarDiscord svg{
  color:#5865F2;
  display:block;
  margin:0;
  flex-shrink:0;
}

.id .name{
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 420px;
}
.id .sub{
  color:var(--muted);
  font-size: 12px;
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 420px;
}

.btn{
  appearance:none;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.35);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: transform .05s ease, border-color .15s ease, box-shadow .15s ease;
  user-select:none;
  white-space:nowrap;
}
.btn:hover{
  border-color: rgba(148,163,184,.35);
  box-shadow: 0 16px 34px rgba(0,0,0,.35);
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: linear-gradient(180deg, rgba(168,85,247,.95), rgba(124,58,237,.92));
  color:#0b1020;
  border-color: transparent;
  padding: 12px 16px;
}
.btn-primary:hover{
  box-shadow: 0 20px 45px rgba(168,85,247,.25);
}

.center{
  width: min(900px, 100%);
  margin: 18px auto 0 auto;
  display:flex;
  justify-content:center;
}

#finishLinkingContainer{
  margin-top: 24px;
  margin-bottom: 12px;
}

#btnFinishLinking{
  min-width: 200px;
  font-size: 16px;
  padding: 14px 24px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.error, .ok{
  width: min(900px, 100%);
  margin: 12px auto 0 auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.35);
  display:none;
}
.error{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
  color: #fecaca;
}
.ok{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.08);
  color: #bbf7d0;
}

code{
  background: rgba(148,163,184,.12);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.18);
  font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  font-size: 12px;
  color:#e2e8f0;
}

.footer{
  width: min(900px, 100%);
  margin: 20px auto 0 auto;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.35);
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
}
.footer h4{
  margin:0 0 10px 0;
  font-size:14px;
  display:flex;
  align-items:center;
  gap:10px;
}
.footer ul{
  margin:0;
  padding-left: 18px;
  color:var(--muted);
  line-height:1.7;
  font-size: 13px;
}

/* Mascots (optional PNGs) */
/* (removed: no corner mascots / strips) */

/* Modal (wallet picker) */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.modalOverlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(6px);
}
.modalCard{
  position: relative;
  width: min(440px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(17, 24, 39, .92);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  overflow: hidden;
}
.modalHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.modalTitle{
  font-weight: 900;
  letter-spacing: -.02em;
}
.modalClose{
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(2,6,23,.35);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}
.modalBody{
  padding: 14px;
}
.walletChoice{
  width: 100%;
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(2,6,23,.35);
  color: var(--text);
  cursor: pointer;
}
.walletChoice:hover{
  border-color: rgba(148,163,184,.30);
}
.walletChoiceIcon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  padding: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(148,163,184,.14);
}
.walletChoiceText{ text-align:left; }
.walletChoiceName{ font-weight: 900; }
.walletChoiceSub{ color: var(--muted); font-size: 12px; margin-top: 2px; }
.modalHint{
  margin-top: 12px;
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

