:root{
  --bg:#07070c;
  --card: rgba(255,255,255,.04);
  --card2: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.10);
  --stroke2: rgba(147,81,255,.30);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --mint: #25e3a6;
  --purple: #8f63ff;
  --shadow: 0 12px 50px rgba(0,0,0,.55);
  --col: 980px;
  --gut: clamp(14px, 4vw, 22px);
  --r: 22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{overflow-x:hidden;}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x:hidden;
}

.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(900px 550px at 50% 10%, rgba(143,99,255,.20), transparent 60%),
    radial-gradient(700px 500px at 20% 30%, rgba(37,227,166,.10), transparent 60%),
    radial-gradient(900px 650px at 80% 55%, rgba(143,99,255,.12), transparent 62%);
  pointer-events:none;
  z-index:-1;
}

.container{
  width: min(var(--col), 100%);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.section{
  padding: 22px 0 28px;
}
.section__title{
  text-align:center;
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing:-.03em;
  margin: 10px 0 16px;
}

.topbar{
  position:sticky; top:0; z-index:20;
  background: linear-gradient(to bottom, rgba(7,7,12,.92), rgba(7,7,12,.55));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:54px;
}
.brand{display:flex; gap:10px; align-items:center;}
.brand__dot{
  width:10px;height:10px;border-radius:999px;
  background: radial-gradient(circle at 30% 30%, var(--mint), var(--purple));
  box-shadow: 0 0 18px rgba(143,99,255,.45);
}
.brand__text{font-weight:800; letter-spacing:.08em}
.nav{display:flex; gap:14px; align-items:center}
.nav a{color:var(--muted); text-decoration:none; font-weight:600; font-size:13px}
.nav a:hover{color:var(--text)}

/* Mobile nav: prevent overflow / weird clipping */
@media (max-width: 760px){
  .topbar__inner{height:auto; padding:10px 0; flex-wrap:wrap; gap:10px; justify-content:center;}
  .nav{flex-wrap:wrap; justify-content:center;}
  .nav a{padding:8px 6px;}
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.hero__card{overflow:hidden}
.hero__img{
  display:block; width:100%; height:auto;
  max-height: 300px;
  object-fit:cover;
}
.hero__copy{padding: 18px 18px 20px}
.hero__copy h1{
  margin:0;
  font-size: clamp(16px, 2.7vw, 22px);
  line-height:1.35;
  font-weight:800;
  letter-spacing:-.02em;
  text-align:center;
}
.hero__cta{display:flex; gap:12px; justify-content:center; margin-top:14px; flex-wrap:wrap}
.hero__btn{width:min(520px,100%); padding:18px 24px; font-size:20px; display:flex; align-items:center; justify-content:center; gap:10px; text-align:center;}

.grid2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:14px;
}

@media (max-width: 900px){
  .grid2{grid-template-columns:1fr}
}

/* Links (premium) */
.linkGrid{
  padding: 10px 14px 16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.linkBtn{
  width:100%;
  border-radius: 16px;
  padding: 14px 14px;
  justify-content:flex-start;
  gap:12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .08s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}

.linkBtn:hover{
  filter: brightness(1.06);
  border-color: rgba(143,99,255,.45);
}

.linkIcon{
  width:34px;
  height:34px;
  border-radius: 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(180deg, rgba(143,99,255,.22), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.14);
  flex: 0 0 34px;
}

.linkIcon svg{ width:18px; height:18px; opacity:.95; }

.linkText{ font-weight: 900; letter-spacing: -.01em; }

.linkHint{
  margin-left:auto;
  color: rgba(255,255,255,.78);
  font-weight:800;
  font-size: 13px;
}

.linkFoot{ padding: 0 14px 16px; }
.linkFoot .btn{ width:100%; border-radius: 16px; padding: 14px 14px; }

.media{
  width:100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  display:block;
  height:auto;
}

.card__title{margin:14px 14px 8px; font-size:22px}
.muted{color:var(--muted)}
.tiny{font-size:12px}
.center{text-align:center}

.btn{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 999px;
  font-weight:800;
  letter-spacing:.02em;
  cursor:pointer;
  user-select:none;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
  white-space:nowrap;
}
.btn:active{transform: scale(.98)}
.btn--primary{
  background: linear-gradient(180deg, rgba(143,99,255,.95), rgba(143,99,255,.70));
  border-color: rgba(143,99,255,.55);
}
.btn--mint{
  background: linear-gradient(180deg, rgba(37,227,166,.95), rgba(37,227,166,.72));
  border-color: rgba(37,227,166,.55);
  color: rgba(0,0,0,.85);
}
.btn--ghost{
  background: rgba(255,255,255,.04);
}
.btn--sm{padding:8px 12px; font-size:12px; font-weight:700}

.row{display:flex; gap:10px; align-items:center}
.row--between{justify-content:space-between}
.row--center{justify-content:center}
.row--wrap{flex-wrap:wrap}

.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px; border-radius:999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(143,99,255,.08);
  color: var(--text);
  font-weight:800;
}

  padding: 16px 16px 18px;
  display:flex; flex-direction:column; gap:8px;
  text-align:center;
}

.game{padding: 14px}
.game__head{display:flex; align-items:flex-start; justify-content:space-between}
.game__title{margin:0; font-size:22px}
.form{margin-top:10px}
.label{display:block; font-size:12px; color:var(--muted); margin:10px 0 6px}
.input{
  flex:1;
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
  min-height: 44px;
  font-size: 16px; /* iOS no-zoom */
}
.input::placeholder{color: rgba(255,255,255,.35)}

.cards{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
  margin-top: 12px;
}
.cardSlot{
  padding: 12px;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.slotTitle{font-weight:800; margin-bottom:10px}

.playingCard{
  width: 96px; height: 136px;
  position:relative;
  perspective: 800px;
}
.playingCard .pc__face{
  position:absolute; inset:0;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  backface-visibility:hidden;
  display:flex; align-items:center; justify-content:center;
  font-weight:900;
  font-size: 30px;
  letter-spacing:-.02em;
}
.pc__back{
  background: radial-gradient(circle at 30% 30%, rgba(143,99,255,.55), rgba(0,0,0,.5));
  transform: rotateY(180deg);
}
.pc__front{
  background: rgba(255,255,255,.92);
  color:#0b0b12;
}
.playingCard.flip .pc__front{transform: rotateY(0deg)}
.playingCard.flip .pc__back{transform: rotateY(180deg)}
.playingCard .pc__front{transform: rotateY(180deg)}
.playingCard .pc__back{transform: rotateY(0deg)}
.playingCard.anim .pc__front,
.playingCard.anim .pc__back{
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.status{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(143,99,255,.28);
  background: rgba(143,99,255,.08);
  color: rgba(255,255,255,.85);
}

.bjTable{margin-top:12px; display:grid; gap:10px}
.bjHand{padding:12px; border-radius:18px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03)}
.bjLabel{display:flex; justify-content:space-between; font-weight:900}
.bjRow{display:flex; gap:10px; flex-wrap:wrap; margin-top:10px}
.miniCard{
  width: 52px; height: 72px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.92);
  color:#0b0b12;
  display:flex; align-items:center; justify-content:center;
  font-weight:900;
}
.bjTotal{font-weight:800; color:var(--muted)}

.wl{padding: 14px}
.wlResult{
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(143,99,255,.22);
  color: rgba(255,255,255,.86);
  text-align:center;
  word-break: break-word;
}
.wlResult.good{border-color: rgba(37,227,166,.45); background: rgba(37,227,166,.10)}
.wlResult.bad{border-color: rgba(255,92,92,.35); background: rgba(255,92,92,.08)}

.socials{display:flex; justify-content:center; gap:14px; margin-top:14px}
.social{
  width: 54px; height: 54px; border-radius:999px;
  background: radial-gradient(circle at 30% 30%, rgba(143,99,255,.35), rgba(37,227,166,.18));
  border: 1px solid rgba(255,255,255,.12);
  display:flex; align-items:center; justify-content:center;
}
.social svg{width: 26px; height: 26px; fill: rgba(0,0,0,.80)}

.footer{padding: 24px 0 40px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 10px}
.footer__inner{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap}

.reveal{opacity:0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease}
.reveal.is-in{opacity:1; transform: translateY(0)}



/* --- Whitepaper (protocol-grade) --- */
.wp { padding-top: clamp(18px, 3vw, 28px); }
.wp__grid{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(18px, 3vw, 28px);
  align-items:start;
}
.wp__toc{
  position: sticky;
  top: 88px;
}
.wp__tocBox{
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border-radius: 18px;
  padding: 16px 14px;
  box-shadow: var(--shadow);
}
.wp__tocTitle{
  font-weight: 800;
  letter-spacing: .2px;
  margin-bottom: 10px;
}
.wp__toc a{
  display:block;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration:none;
  border:1px solid transparent;
}
.wp__toc a:hover{
  color: var(--text);
  border-color: rgba(147,81,255,.25);
  background: rgba(147,81,255,.10);
}
.wp__tocHint{ margin-top: 10px; }

.wp__doc{
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border-radius: 22px;
  padding: clamp(18px, 3.2vw, 34px);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.wp__meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom: 18px;
}
.chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(147,81,255,.30);
  background: rgba(147,81,255,.12);
  color: var(--text);
  letter-spacing: .2px;
}

.wp__doc h1{
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  margin: 0 0 10px 0;
  letter-spacing: -.6px;
}
.wp__doc h2{
  margin-top: 28px;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: -.2px;
}
.wp__doc h3{
  margin-top: 18px;
  font-size: 16px;
  letter-spacing: .1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
}
.wp__doc p{
  margin: 12px 0;
  color: rgba(255,255,255,.86);
  line-height: 1.75;
  max-width: 76ch;
}
.wp__doc ul{
  margin: 10px 0 16px 18px;
  padding:0;
  max-width: 76ch;
}
.wp__doc li{
  margin: 8px 0;
  color: rgba(255,255,255,.86);
  line-height: 1.7;
}
.wp__doc blockquote{
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 3px solid rgba(147,81,255,.55);
  background: rgba(147,81,255,.10);
  border-radius: 14px;
  color: rgba(255,255,255,.92);
  max-width: 78ch;
}
.wp__doc a{ color: #c7b1ff; }
.wp__doc a:hover{ color: #ffffff; }

.wp__footerNote{
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  max-width: 76ch;
}

@media (max-width: 920px){
  .wp__grid{ grid-template-columns: 1fr; }
  .wp__toc{ position: static; }
  .wp__tocBox{ box-shadow:none; }
}


/* CTA card */
.card--cta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
@media (max-width: 640px){
  .card--cta{ flex-direction:column; align-items:stretch; }
}

/* CTA alignment fixes (mobile Safari looked "off-center" because these were
   default block elements that left-aligned). */
.card--cta .ctaActions,
.card--cta .btnrow{
  display:flex;
  justify-content:flex-end;
}

@media (max-width: 640px){
  .card--cta{ text-align:center; }
  .card--cta .ctaActions,
  .card--cta .btnrow{
    justify-content:center;
    width:100%;
  }
  .card--cta .btn{ width:min(340px, 100%); }
}


/* Trust & Security */
.trustGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:16px;
  margin-top:16px;
}
.trustList{
  list-style:none;
  padding:0;
  margin:12px 0 0;
  display:grid;
  gap:10px;
}
.trustList li{
  position:relative;
  padding-left:22px;
  color:var(--text-dim);
  line-height:1.45;
}
.trustList li::before{
  content:"✓";
  position:absolute;
  left:0;
  top:0;
  color:rgba(113, 255, 197, 0.9);
  font-weight:800;
}
.trustCTA{
  display:flex;
  gap:12px;
  justify-content:center;
  margin-top:18px;
  flex-wrap:wrap;
}
@media (max-width: 860px){
  .trustGrid{ grid-template-columns: 1fr; }
}

/* -------- Wallet Modal -------- */
.modal-open { overflow: hidden; }

.wallet-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  /* Defensive: never block taps unless explicitly opened (prevents "nothing clickable" bugs) */
  pointer-events: none;
}

.wallet-modal.is-open{ display:block; pointer-events: auto; }

.wallet-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}

.wallet-modal__panel{
  position: relative;
  width: min(520px, calc(100vw - 32px));
  margin: 14vh auto 0;
  border-radius: 18px;
  padding: 16px;
  background: rgba(18,18,22,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.wallet-modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.wallet-modal__title{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.wallet-modal__close{
  border: 0;
  background: rgba(255,255,255,0.08);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
}

.wallet-modal__grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wallet-option{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 14px;
  padding: 14px 12px;
  font-weight: 800;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.wallet-option:hover{
  transform: translateY(-1px);
  background: rgba(155, 89, 255, 0.12);
  border-color: rgba(155, 89, 255, 0.35);
}

.wallet-option--wc{
  grid-column: 1 / -1;
}

.wallet-modal__note{
  margin-top: 12px;
  opacity: 0.85;
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 420px){
  .wallet-modal__grid{ grid-template-columns: 1fr; }
  .wallet-modal__panel{ margin-top: 10vh; }
}


/* Wallet modal mobile guidance */
.wallet-modal__hint{
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: rgba(255,255,255,.85);
}
.wallet-modal__deeplinks{
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wallet-deeplink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  text-decoration:none;
}
.wallet-deeplink:active{ transform: scale(.98); }

.wallet-option.is-disabled, .wallet-option:disabled{
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}


/* ---------- Swap (Pancake-ish styling, original code) ---------- */
.swapWrap{ width:100%; }
.swapHeader{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom: 14px; }
.swapHeader h1{ margin:0; font-size: 22px; letter-spacing: -0.02em; }
.swapSub{ font-size: 0.95rem; color: rgba(255,255,255,.75); margin-top: 6px; line-height: 1.35; }
.swapWrap .grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
@media (max-width: 900px){ .swapWrap .grid{ grid-template-columns: 1fr; } }

.swapWrap .card{ background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; overflow:hidden; }
.swapWrap .cardHd{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.swapWrap .cardHd h2{ margin:0; font-size: 18px; }
.swapWrap .cardBd{ padding: 14px 16px; }

.btnGhost{ background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.95); border-radius: 14px; padding: 10px 12px; font-weight: 800; cursor:pointer; }
.btnGhost:active{ transform: scale(.98); }
.btnPrimary{ background: linear-gradient(135deg, rgba(140,82,255,1), rgba(98,35,255,1)); border: 0; color: #fff; border-radius: 14px; padding: 12px 14px; font-weight: 900; cursor:pointer; width: 100%; }
.btnPrimary:disabled{ opacity:.45; cursor:not-allowed; }

.pill{ background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.9); border-radius: 999px; padding: 8px 10px; font-weight: 800; font-size: .9rem; }
.chip{ background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.9); border-radius: 999px; padding: 8px 12px; font-weight: 800; text-decoration:none; cursor:pointer; }
.chip:active{ transform: scale(.98); }

.field{ margin-top: 12px; }
.field label{ display:block; font-weight: 900; margin-bottom: 8px; color: rgba(255,255,255,.92); }
.inputRow{ display:flex; gap:10px; align-items:center; }
.inputRow input{ flex: 1 1 auto; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 14px; padding: 12px 12px; font-size: 16px; }

.swapSelect{ width:100%; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 14px; padding: 12px 12px; font-size: 16px; margin-bottom: 10px; }

.mini{ font-size: .9rem; color: rgba(255,255,255,.75); margin-top: 8px; }
.hr{ height: 1px; background: rgba(255,255,255,.10); margin: 14px 0; }

.ok{ background: rgba(0,255,160,.06); border: 1px solid rgba(0,255,160,.18); border-radius: 16px; padding: 12px; }
.warn{ background: rgba(255,200,0,.07); border: 1px solid rgba(255,200,0,.22); border-radius: 16px; padding: 12px; }
.kvs{ display:grid; grid-template-columns: 1fr auto; gap: 8px 10px; }
.k{ color: rgba(255,255,255,.7); }

.tokenList{ display:flex; flex-wrap:wrap; gap: 8px; }
.tokenPill{ border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: rgba(255,255,255,.92); padding: 8px 10px; font-weight: 900; cursor:pointer; }
.tokenPill:active{ transform: scale(.98); }


/* --- PancakeSwap-like token picker --- */
.tokenSelHidden{ display:none !important; }
.tokenBtn{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(20,20,30,0.65);
  color: #fff;
}
.tokenBtn:active{ transform: translateY(1px); }
.tokenBtn__icon{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}
.tokenBtn__icon.hasLogo{ border: none; }
.tokenBtn__label{ flex: 1; text-align:left; font-weight: 800; letter-spacing: .02em; }
.tokenBtn__chev{ opacity: .8; }

.tokenModal{
  position: fixed;
  inset: 0;
  display:none;
  z-index: 9999;
  /* Defensive: never block taps unless explicitly opened */
  pointer-events: none;
}
.tokenModal.isOpen{ display:block; pointer-events: auto; }
.tokenModal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.65);
}
.tokenModal__panel{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(520px, calc(100vw - 24px));
  max-height: min(78vh, 720px);
  overflow:hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(18,18,26,0.96);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.tokenModal__hd{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tokenModal__title{ font-weight: 900; }
.tokenModal__close{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}
.tokenModal__search{ padding: 12px 16px; }
.tokenModal__search input{
  width:100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}
.tokenModal__tabs{
  display:flex;
  gap:10px;
  padding: 0 16px 12px 16px;
}
.tokenModal__list{
  overflow:auto;
  max-height: calc(78vh - 160px);
  padding: 0 10px 12px 10px;
}
.tokenRow{
  width:100%;
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color:#fff;
  margin: 8px 6px;
}
.tokenRow:active{ transform: translateY(1px); }
.tokenRow__icon{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(255,255,255,0.10);
  background-size: cover;
  background-position:center;
  flex: 0 0 auto;
}
.tokenRow__meta{ flex: 1; text-align:left; }
.tokenRow__sym{ font-weight: 900; }
.tokenRow__name{ opacity: .75; font-size: 13px; margin-top: 2px; }
.tokenRow__addr{ opacity: .65; font-size: 12px; }
.tokenEmpty{ padding: 18px 16px; opacity: .8; text-align:center; }

.tokenPill--ghost{
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}


/* --- PancakeSwap-like swap (DYOOR theme) --- */
.swapShell{display:flex;flex-direction:column;gap:14px}
.swapShell__titleRow{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.swapCard{background:rgba(20,18,28,.9);border:1px solid rgba(255,255,255,.08);border-radius:22px;padding:14px;box-shadow:0 10px 40px rgba(0,0,0,.35)}
.swapCard__top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.swapTabs{display:flex;gap:8px}
.swapTab{border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);color:#fff;padding:10px 14px;border-radius:14px;font-weight:800}
.swapTab--active{background:linear-gradient(180deg, rgba(128,92,255,.35), rgba(128,92,255,.12));border-color:rgba(128,92,255,.55)}
.swapActions{display:flex;align-items:center;gap:10px}
.iconBtn{width:42px;height:42px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff}
.swapPanel{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px;margin-bottom:10px}
.swapPanel__row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.swapPanel__row--bottom{margin-top:10px;margin-bottom:0}
.swapLabel{font-weight:900;color:rgba(255,255,255,.9)}
.swapMini{color:rgba(255,255,255,.7);font-size:12px}
.swapPanel__inputRow{display:grid;grid-template-columns: 1fr 1fr;gap:10px;align-items:center}
@media (max-width:520px){.swapPanel__inputRow{grid-template-columns: 1fr}}
.tokenBtn--big{width:100%;justify-content:space-between;padding:14px 14px;border-radius:16px}
.amtInput{width:100%;padding:14px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.25);color:#fff;font-size:18px;font-weight:800}
.miniBtn{padding:8px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;font-weight:800}
.swapFlip{display:block;margin:-4px auto 8px auto;width:44px;height:44px;border-radius:16px;border:1px solid rgba(128,92,255,.45);background:rgba(128,92,255,.18);color:#fff;font-size:18px}
.swapMeta{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.swapMeta__row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.swapMeta__spacer{flex:1}
.slipChip{padding:8px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;font-weight:800}
.slipChip--active{border-color:rgba(128,92,255,.55);background:rgba(128,92,255,.18)}
.slipInput{width:84px;padding:8px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.25);color:#fff;font-weight:800}
.swapStatus{min-height:18px;color:rgba(255,255,255,.8);font-weight:700}
.issuesBox,.warnBox{margin-top:10px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);font-size:13px;line-height:1.35}
.warnBox{background:rgba(255,194,64,.08);border-color:rgba(255,194,64,.28);color:rgba(255,255,255,.92)}
.issuesBox .chip{margin-left:8px}
.swapSafety{color:rgba(255,255,255,.68);font-size:12px;line-height:1.35}
.topTokensCard{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px}
.topTokensCard__row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.topTokensList{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.tokenPill{padding:8px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;font-weight:800}
.tokenPill--ghost{background:rgba(128,92,255,.12);border-color:rgba(128,92,255,.35)}

/* ---- SAFETY PATCH: iOS wallet webviews sometimes break taps with backdrop-filter/sticky layers ---- */
.topbar{ -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.wallet-modal__backdrop{ -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* Ensure anchors styled as buttons are centered and not underlined */
.btnPrimary, .btnGhost, .btn{ text-decoration:none; -webkit-tap-highlight-color: transparent; }
.btnPrimary{ display:inline-flex; align-items:center; justify-content:center; text-align:center; }

/* Make taps more reliable on mobile */
button, a{ touch-action: manipulation; }

/* Hard override: nothing inside swap card should be non-interactive */
.swapCard, .swapCard *{ pointer-events: auto; }

/* ---- SAFETY PATCH: iOS/OKX webviews tap reliability ---- */
/* Some wallet webviews have issues with backdrop-filter + sticky layers capturing taps. */
.topbar{ -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.wallet-modal__backdrop{ -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* Ensure anchors styled as buttons behave like buttons */
a.btn, a.btnPrimary, a.btnGhost{ text-decoration: none !important; }
.btnPrimary, .btnGhost{ display:inline-flex; align-items:center; justify-content:center; text-align:center; }

/* Make taps more responsive on mobile */
button, a, input, select{ touch-action: manipulation; }

/* Hard-force swap UI to be interactive even if a parent gets pointer-events toggled */
#swap, #swap *{ pointer-events: auto; }

/* Whitepaper Treasury Box */

.treasury-box{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  padding:18px 18px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  background:rgba(255,255,255,0.04);
  max-width:100%;
  box-sizing:border-box;
}
.treasury-box code{
  display:block;
  flex:1 1 100%;
  min-width:0;
  max-width:100%;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(0,0,0,0.25);
  border:1px solid rgba(255,255,255,0.10);
  font-size:0.95rem;
  word-break:break-word;
  overflow-wrap:anywhere;
  white-space:normal;
  box-sizing:border-box;
}
.btn--small{
  padding:8px 10px;
  font-size:0.9rem;
  line-height:1;
}


/* If Lore is followed by Trust, reduce excess whitespace */
#lore + #trust{
  padding-top: 0;
  margin-top: -12px;
}


/* Whitepaper layout tweaks */
#whitepaper-hero .hero__copy h1{
  margin-bottom: 8px;
}
#whitepaper-hero .hero__copy .muted{
  margin-top: 0;
}


/* Premium Treasury Upgrade */

.treasuryBox {
  width: 100%;
  overflow: hidden;
  padding: 20px;
  border-radius: 16px;
}

.treasuryAddress {
  word-break: break-all;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  margin-bottom: 14px;
}

.treasuryActions {
  display: flex;
  gap: 16px;
  align-items: center;
}


/* v23 HARD Overflow Fix */
.treasuryBox,
.treasuryBox * {
  box-sizing: border-box;
}

.treasuryBox {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 24px;
  border-radius: 18px;
}

.treasuryAddress {
  display: block;
  max-width: 100%;
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  padding: 16px 18px;
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
}

.treasuryActions {
  flex-wrap: wrap;
}

/* ---------- Collection preview marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 14px 0;
  /* subtle fade at edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  will-change: transform;
  animation: marqueeScroll 38s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

.marquee__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}


/* ---------- Soft Staking Page ---------- */
.stake-hero{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px){
  .stake-hero{ grid-template-columns: 1fr; }
}

.stake-actions{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top: 12px; }
.stake-stats{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 720px){
  .stake-stats{ grid-template-columns: 1fr; }
}
.stat{
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.stat .label{ font-size: 12px; color: rgba(255,255,255,0.7); }
.stat .value{ font-weight: 800; font-size: 20px; margin-top: 6px; }
.pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}
.pill.is-on{
  border-color: rgba(186,255,141,0.42);
  background: rgba(186,255,141,0.10);
}

.stake-cta{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 14px; }

.stake-amount{ margin-top: 12px; }
.stake-amount__label{ font-size: 12px; color: rgba(255,255,255,0.72); margin-bottom: 6px; }
.stake-amount__row{ display:flex; align-items:center; gap: 10px; flex-wrap:wrap; }
.stake-amount__input{
  width: 110px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
  font-weight: 800;
}
.note{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.86);
}

.nft-panel{
  border-radius: 18px;
  padding: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.10);
}
.nft-panel__head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.nft-panel__title{ font-weight: 800; }
.nft-panel__sub{ font-size: 12px; }

.nft-grid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
@media (max-width: 980px){
  .nft-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 520px){
  /* Mobile: keep 3-per-row like the user asked; tighten spacing */
  .nft-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .nft-meta{ padding: 8px; }
  .nft-meta .name{ font-size: 12px; }
  .nft-meta .sub{ font-size: 11px; }
}
@media (max-width: 360px){
  /* Very small screens: fall back to 2 columns so cards stay tappable */
  .nft-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Simple holdings chart (no external libs) */
.stake-chart{ margin-top: 12px; display:grid; gap: 10px; }
.stake-chart__row{ display:grid; grid-template-columns: 86px 1fr 44px; align-items:center; gap: 10px; }
.stake-chart__label{ font-size: 12px; color: rgba(255,255,255,0.72); }
.stake-chart__bar{ height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow:hidden; border: 1px solid rgba(255,255,255,0.10); }
.stake-chart__fill{ height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(163,94,255,0.95), rgba(88,160,255,0.85)); width: 0%; }
.stake-chart__value{ font-weight: 800; text-align:right; }

/* Leaderboard */
.leaderboard{ margin-top: 14px; display:grid; gap: 10px; }
.lb-row{ display:grid; grid-template-columns: 36px 1fr 120px; gap: 10px; align-items:center; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.10); background: rgba(0,0,0,0.18); }
.lb-rank{ font-weight: 900; opacity: 0.85; }
.lb-addr{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; opacity: 0.9; }
.lb-pts{ text-align:right; font-weight: 900; }

.nft-card{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(18,18,22,0.60);
  transform: translateZ(0);
}
.nft-thumb{
  aspect-ratio: 1 / 1;
  width: 100%;
  background: rgba(255,255,255,0.06);
  position: relative;
}
.nft-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.nft-meta{
  padding: 10px;
}
.nft-meta .name{
  font-weight: 800;
  font-size: 14px;
}
.nft-meta .sub{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.68);
}

.nft-card--skeleton .nft-thumb,
.nft-card--skeleton .line{
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  background-size: 240% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.nft-card--skeleton .line{
  height: 10px; border-radius: 999px; margin-top: 8px;
}
.nft-card--skeleton .line.small{ width: 66%; height: 9px; opacity: 0.8; }
@keyframes shimmer{
  0%{ background-position: 120% 0; }
  100%{ background-position: -120% 0; }
}
.nft-more{
  grid-column: 1 / -1;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.70);
  text-align:center;
}

