/* Layout: sticky top bar, one centred column (max 1180px) of tab views, fullscreen overlay for pack openings.
   Single deliberate dark look: night-blue binder, gold foil accent, rarity-coded glows. */
:root {
  color-scheme: dark;
  --ink: #0a0c1a;
  --panel: #141834;
  --panel-2: #1c2147;
  --line: #2a3066;
  --text: #eef0ff;
  --muted: #9ba1cc;
  --gold: #ffcf3a;
  --gold-ink: #241a00;
  --hot: #ff4f7b;
  --ok: #3ee08f;

  --r-C: #a3a9d1;
  --r-R: #4fc3ff;
  --r-SR: #b98bff;
  --r-UR: #ffcf3a;
  --r-SEC: #ff6fd1;

  --f-display: 'Lilita One', 'Arial Black', Impact, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius: 14px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 207, 58, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(79, 195, 255, 0.10), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--ink);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ink);
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; letter-spacing: 0.01em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--gold); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); font-weight: 700; cursor: pointer; text-decoration: none; color: var(--text);
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-gold { background: var(--gold); color: var(--gold-ink); border-color: transparent; box-shadow: 0 6px 0 #b8901c; }
.btn-gold:hover { background: #ffd95e; border-color: transparent; }
.btn-gold:active { box-shadow: 0 3px 0 #b8901c; transform: translateY(3px); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 17px; }
.x-logo { width: 16px; height: 16px; flex: none; fill: currentColor; }
.coin {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 55%, #c49416);
  color: var(--gold-ink); font: 900 10px/1 var(--f-body); flex: none;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(10, 12, 26, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(180deg, var(--hot) 0 46%, var(--ink) 46% 54%, #f4f4f6 54%);
  box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 2px var(--gold);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #f4f4f6; box-shadow: 0 0 0 3px var(--ink);
}
.brand-icon { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); }
.brand-name { font: 22px/1 var(--f-display); letter-spacing: 0.04em; color: var(--gold); text-shadow: 0 2px 0 #7a5a00; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: end; min-width: 0; }
.uh { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.balance {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-weight: 700;
}
.balance .num { font-size: 15px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--r-R), var(--r-SR)); font-weight: 800; font-size: 13px; color: #fff; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.mode-pill { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px dashed var(--muted); color: var(--muted); }

/* ---------- Generic panels ---------- */
main { padding-block: 28px 80px; }
.view { display: grid; gap: 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 28px; }

/* ---------- Landing (gate) ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding-block: 24px 8px; }
.hero h1 { font-size: clamp(42px, 7vw, 82px); color: var(--text); }
.hero h1 .gold { color: var(--gold); text-shadow: 0 4px 0 #7a5a00; }
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.hero-copy .lede { font-size: 18px; color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fan { position: relative; height: 380px; display: grid; place-items: center; }
.fan .card { position: absolute; width: 210px; }
.fan .card:nth-child(1) { transform: translateX(-120px) rotate(-14deg) translateY(20px); }
.fan .card:nth-child(2) { transform: translateY(-10px); z-index: 2; }
.fan .card:nth-child(3) { transform: translateX(120px) rotate(14deg) translateY(20px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { display: grid; gap: 8px; align-content: start; }
.step .n { font: 26px/1 var(--f-display); color: var(--gold); }
.step h3 { font-size: 20px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- Rates table ---------- */
.rates { width: 100%; border-collapse: collapse; font-size: 14px; }
.rates th, .rates td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.rates th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.rates td.num, .rates th.num { text-align: right; }
.table-scroll { overflow-x: auto; }
.rbadge { display: inline-block; min-width: 38px; text-align: center; padding: 2px 8px; border-radius: 6px; font: 800 12px/1.5 var(--f-mono); color: var(--ink); background: var(--rc, var(--r-C)); }
.rbadge.r-SEC { background: linear-gradient(90deg, #ff6fd1, #ffcf3a, #4fc3ff); }

/* ---------- Packs view ---------- */
.daily-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(100deg, #2a1b55, #14183a 55%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.daily-bar h2 { font-size: 24px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); margin-right: 6px; box-shadow: 0 0 0 0 rgba(255, 79, 123, 0.7); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255, 79, 123, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 79, 123, 0); } }
/* Pack grid */
.pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pack-tile {
  --h: 48;
  position: relative; display: grid; grid-template-columns: 38% 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); cursor: pointer; text-align: left;
  background: linear-gradient(150deg, hsl(var(--h) 70% 45% / 0.30), hsl(var(--h) 50% 18% / 0.40) 70%), var(--panel);
  border: 2px solid var(--line); min-width: 0; color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease;
}
.pack-tile.static { cursor: default; }
button.pack-tile:hover { border-color: hsl(var(--h) 90% 65% / 0.7); transform: translateY(-2px); }
.pack-tile[aria-pressed="true"] { border-color: hsl(var(--h) 95% 65%); box-shadow: 0 0 0 4px hsl(var(--h) 95% 60% / 0.2); }
.pack-tile .tag { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: hsl(var(--h) 90% 60%); color: #111; z-index: 2; }
.pt-body { display: grid; gap: 4px; min-width: 0; }
.pt-game { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pt-name { font: 19px/1.05 var(--f-display); }
.pt-hit { font-size: 12px; color: var(--muted); }
.pt-hit b { color: var(--text); }
.pt-meta { font-size: 12px; color: var(--muted); }

/* Pull stage */
.pull-stage { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 28px; align-items: start; }
.stage-pack { position: sticky; top: 90px; }
.pull-info { display: grid; gap: 18px; min-width: 0; }
.pull-info h2 { font-size: clamp(30px, 4vw, 44px); }
.pity-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.chase-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.mini-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.daily-right { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Landing marquee */
.hits-band { display: grid; gap: 12px; overflow: hidden; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 70s linear infinite; padding-block: 10px 16px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-card { width: 150px; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Zoom modal */
.modal.zoom { max-width: 760px; grid-template-columns: minmax(0, 320px) 1fr; align-items: start; gap: 24px; }
.zoom-card .card { width: 100%; }
.zoom-info { display: grid; gap: 12px; min-width: 0; }
.zoom-info h2 { font-size: 30px; }
.zoom-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.zoom-info dt { color: var(--muted); }
.zoom-info dd { margin: 0; font-weight: 700; }
.modal-title { display: flex; align-items: center; gap: 10px; }
.modal-title .x-logo { width: 22px; height: 22px; }

.small { font-size: 13px; }
.page-title { font-size: 36px; }
.gold-note { color: var(--gold); border-color: var(--gold); }
.done-txt { color: var(--ok); font-weight: 800; }
.pl-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pl-row h2 { font-size: 26px; }
.binder-groups { display: grid; gap: 10px; }
.binder-tabs .grp { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); align-self: center; min-width: 76px; }
.chip-btn.sm { padding: 6px 12px; font-size: 13px; }
.empty { text-align: center; color: var(--muted); }
.rates td.lbl { color: var(--muted); font-size: 13px; }
.pull-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.pull-buttons .btn { flex-direction: column; gap: 2px; min-height: 64px; padding: 8px 26px; border-radius: 16px; }
.pull-buttons .btn small { font-size: 12px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.pity { display: grid; gap: 6px; }
.bar { height: 10px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--r-SR), var(--gold)); transition: width 0.4s ease; }
.daily { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Card (shared shell) ---------- */
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --glow: transparent;
  position: relative; aspect-ratio: 63 / 88; max-width: 100%; width: 100%; border-radius: 4.5% / 3.3%;
  transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  container-type: inline-size; user-select: none; overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  font-family: var(--f-body); color: #15161a; line-height: 1.15;
}
.card.t-SR { --glow: rgba(185, 139, 255, 0.55); }
.card.t-UR { --glow: rgba(255, 207, 58, 0.6); }
.card.t-SEC { --glow: rgba(255, 111, 209, 0.7); }
.card.holo { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 22px var(--glow); }
.card .foil { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 6; mix-blend-mode: color-dodge; opacity: 0; transition: opacity 0.2s; }
.card.holo .foil {
  opacity: 0.4;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.6), transparent 42%),
    repeating-linear-gradient(115deg, rgba(255, 0, 140, 0.3) 0 5%, rgba(0, 220, 255, 0.3) 10%, rgba(255, 230, 0, 0.3) 15%, rgba(110, 255, 140, 0.3) 20%, rgba(255, 0, 140, 0.3) 25%);
  background-size: 100% 100%, 320% 320%;
  background-position: center, var(--mx) var(--my);
}
.card.t-SEC .foil { opacity: 0.55; }
.card .real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 5; opacity: 0; transition: opacity 0.3s; border-radius: inherit; }
.card .real.ok { opacity: 1; }
/* Over an official scan the foil only adds a soft sheen; color-dodge at full strength bleached the scan. */
.card .real.ok ~ .foil { opacity: 0.14; mix-blend-mode: soft-light; }
.card .real.ok ~ .foil:hover, .card.holo:hover .real.ok ~ .foil { opacity: 0.28; }
.card .count { position: absolute; top: 2.5%; right: 3%; z-index: 8; background: var(--hot); color: #fff; font: 800 clamp(9px, 7cqi, 13px)/1 var(--f-mono); padding: 0.35em 0.5em; border-radius: 999px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5); }
.card .new-tag { position: absolute; top: 48%; left: 6%; z-index: 8; background: var(--ok); color: #04210f; font: 900 clamp(8px, 6cqi, 11px)/1 var(--f-body); letter-spacing: 0.08em; padding: 0.4em 0.6em; border-radius: 999px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5); }
.ico { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%; flex: none; background: var(--ec, #ccc); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.25); }
.ico svg { width: 72%; height: 72%; fill: #fff; }
.ico.dark svg { fill: #2a2a2a; }

/* ---------- Pokémon card ---------- */
.pk { background: linear-gradient(135deg, #f1f2f5, #c9cdd6 40%, #eef0f4 60%, #b9bec9); padding: 3.6%; }
.pk .pk-in { position: relative; height: 100%; border-radius: 3%; background: var(--tb); display: flex; flex-direction: column; padding: 2.8% 3.4% 2.2%; overflow: hidden; }
.pk .pk-head { display: flex; align-items: center; gap: 2%; min-width: 0; }
.pk .stage { font: 800 clamp(5px, 3.6cqi, 8px)/1 var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; background: linear-gradient(#e9eaee, #a9aeb8); color: #222; padding: 0.35em 0.5em; border-radius: 0.6em 0.1em 0.6em 0.1em; flex: none; }
.pk .nm { font: 800 clamp(8px, 7.6cqi, 17px)/1.05 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; letter-spacing: -0.01em; }
.pk .hp { display: flex; align-items: center; gap: 0.25em; font: 900 clamp(8px, 7.6cqi, 17px)/1 var(--f-body); flex: none; }
.pk .hp small { font-size: 0.5em; font-weight: 800; }
.pk .art { position: relative; margin-top: 2.4%; height: 46%; border-radius: 1.5%; overflow: hidden; background: var(--ab); box-shadow: 0 0 0 2px #d8b84a, 0 0 0 3px #8b6d16; display: grid; place-items: center; }
.pk .art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.55), transparent 60%), repeating-conic-gradient(from 0deg at 50% 120%, rgba(255, 255, 255, 0.10) 0 6deg, transparent 6deg 12deg); }
.pk .art img { position: relative; max-width: 82%; max-height: 90%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); }
.pk .art .ph-ico { position: absolute; width: 58%; height: auto; aspect-ratio: 1; opacity: 0.22; box-shadow: none; }
.pk .art .ph-ico svg { fill: #fff; }
.pk.full.trainer .art .ph, .pk.full .art .ph { font-size: clamp(10px, 10cqi, 24px); opacity: 0.55; }
.pk .art .ph { position: relative; font: 400 clamp(14px, 16cqi, 40px)/1 var(--f-display); color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); text-align: center; padding: 0 6%; }
.pk .meta { font: italic 700 clamp(5px, 3.4cqi, 8px)/1.2 var(--f-body); background: linear-gradient(90deg, #c9a43a, #f3df8c, #c9a43a); color: #3b2a00; text-align: center; margin: 1.6% 6% 0; padding: 0.3em; border-radius: 0 0 0.6em 0.6em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk .moves { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4%; padding: 2% 0; min-height: 0; }
.pk .ability { font: 900 clamp(6px, 4.6cqi, 11px)/1.1 var(--f-body); color: #b32020; display: flex; gap: 0.4em; align-items: center; }
.pk .ability b { background: #b32020; color: #fff; font-size: 0.75em; padding: 0.15em 0.4em; border-radius: 0.3em; font-style: italic; }
.pk .move { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5em; align-items: center; font-size: clamp(6px, 5.2cqi, 12px); }
.pk .cost { display: flex; gap: 0.15em; min-width: 2.2em; }
.pk .cost .ico { width: 1.05em; height: 1.05em; }
.pk .move .mn { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk .move .dmg { font: 900 1.25em/1 var(--f-body); }
.pk .fx { font-size: clamp(5px, 4.3cqi, 10px); line-height: 1.3; padding: 2% 1%; }
.pk .foot { border-top: 1px solid rgba(0, 0, 0, 0.18); padding-top: 1.6%; display: flex; justify-content: space-between; align-items: center; gap: 0.4em; font: 700 clamp(5px, 3.5cqi, 8px)/1.2 var(--f-body); }
.pk .foot .wk { display: flex; align-items: center; gap: 0.3em; }
.pk .foot .wk .ico { width: 1.25em; height: 1.25em; }
.pk .foot .setno { display: flex; align-items: center; gap: 0.4em; font-family: var(--f-mono); }
.pk .foot .rc { background: #15161a; color: #fff; padding: 0.1em 0.35em; border-radius: 0.25em; }
.pk .illus { font: italic 600 clamp(4px, 3cqi, 7px)/1 var(--f-body); opacity: 0.7; margin-top: 1%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Full art (IR, SIR, UR, HR...) */
.pk.full .pk-in { background: var(--ab); color: #fff; }
.pk.full .pk-in::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.45), transparent 55%), repeating-conic-gradient(from 10deg at 50% 45%, rgba(255, 255, 255, 0.12) 0 5deg, transparent 5deg 10deg); }
.pk.full .art { position: absolute; inset: 0; height: auto; margin: 0; box-shadow: none; background: transparent; place-items: start center; padding-top: 16%; }
.pk.full .art::before { display: none; }
.pk.full .art img { max-width: 94%; max-height: 62%; }
.pk.full .pk-head, .pk.full .moves, .pk.full .foot, .pk.full .illus, .pk.full .meta { position: relative; z-index: 1; }
.pk.full .meta { display: none; }
.pk.full .moves { justify-content: flex-end; margin-top: auto; flex: 0 0 auto; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55) 30%); margin-left: -4%; margin-right: -4%; padding: 14% 4% 2%; }
.pk.full .head-spacer { flex: 1; }
.pk.full .foot { border-color: rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.55); margin: 0 -4% -2.4%; padding: 1.6% 4% 2.4%; }
.pk.full .foot .rc { background: #fff; color: #15161a; }
.pk.full .ability { color: #ffd3d3; }
.pk.full .nm, .pk.full .hp { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.pk.full.gold { background: linear-gradient(135deg, #fff1b8, #d4a62a 35%, #fff4c4 55%, #b9870f); }
.pk.full.gold .pk-in { background: linear-gradient(160deg, #f7d778, #b5860f 55%, #f6dd8b); color: #3b2600; }
.pk.full.gold .nm, .pk.full.gold .hp { text-shadow: none; }
/* Black White Rare: black chrome frame with a silver etch, drawn art in full colour. */
.pk.full.bwr { background: linear-gradient(135deg, #f4f4f6, #6d6f78 30%, #16171c 52%, #9a9ca6 75%, #f4f4f6); }
.pk.full.bwr .pk-in { background: radial-gradient(110% 75% at 50% 32%, #f1f2f6, #b9bcc7 45%, #5d606c 85%); color: #15161b; }
.pk.full.bwr .nm, .pk.full.bwr .hp { color: #15161b; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.pk.trainer .pk-in { background: linear-gradient(180deg, #e8ecf1, #cfd6df); }
.pk.trainer .art { background: linear-gradient(135deg, #7d8fa9, #c5d0de); }
.pk.trainer .tt { font: 900 clamp(6px, 4.5cqi, 10px)/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: #3d4f6b; padding: 0.3em 0.6em; border-radius: 0.3em; }
.pk.energy .pk-in { background: radial-gradient(circle at 50% 45%, #fff, var(--ab) 70%); }
.pk.energy .art { background: transparent; box-shadow: none; height: 60%; }
.pk.energy .art::before { display: none; }
.pk.energy .big-ico { width: 62%; height: auto; aspect-ratio: 1; font-size: clamp(30px, 60cqi, 140px); }

/* Card placeholder in binder */
.slot { position: relative; }
.slot.missing .card { filter: grayscale(1) brightness(0.45); opacity: 0.35; box-shadow: none; }
.slot.missing::after { content: attr(data-no); position: absolute; inset: auto 0 6% 0; text-align: center; font: 700 12px/1 var(--f-mono); color: var(--muted); }
.slot button { all: unset; display: block; width: 100%; box-sizing: border-box; cursor: zoom-in; border-radius: 4.5% / 3.3%; }
.slot button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Binder ---------- */
.binder-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.chip-btn[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: transparent; }
.chip-btn .num { font-size: 12px; opacity: 0.75; }
.binder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.binder-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.binder-head .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: end; }
.progress-line { display: grid; gap: 6px; min-width: 0; }

/* ---------- Stats ---------- */
.stat { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.stat b { font: 700 22px/1.1 var(--f-mono); }
.stat span { font-size: 12px; color: var(--muted); }
.demo-note { font-size: 13px; color: var(--muted); border-left: 3px dashed var(--muted); padding-left: 10px; }

/* ---------- Leaderboard ---------- */
.lb { width: 100%; border-collapse: collapse; }
.lb th, .lb td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.lb th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.lb td.num, .lb th.num { text-align: right; }
.lb tr.me td { background: rgba(255, 207, 58, 0.08); }
.lb .who { display: flex; align-items: center; gap: 10px; }
.lb .rank { font: 20px/1 var(--f-display); color: var(--muted); width: 36px; }
.lb tr:nth-child(1) .rank { color: var(--gold); }
.sample { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; }

/* ---------- Opening overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top, 0px)) var(--gutter-r) max(20px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: radial-gradient(circle at 50% 40%, rgba(40, 30, 90, 0.95), rgba(5, 6, 14, 0.97));
}
.open-stage { width: 100%; max-width: 1000px; display: grid; gap: 22px; justify-items: center; text-align: center; }
.open-stage h2 { font-size: 30px; }
.big-pack { width: min(260px, 70vw); cursor: pointer; border: 0; padding: 0; background: none; animation: wobble 1.4s ease-in-out infinite; }
.big-pack .booster { width: 100%; }
.big-pack.tearing { animation: tear 0.6s ease-in forwards; }
@keyframes wobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-6px); } }
@keyframes tear { 30% { transform: scale(1.08) rotate(-3deg); filter: brightness(1.4); } 100% { transform: scale(1.4) translateY(-40px); opacity: 0; filter: brightness(3); } }
.reveal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; width: 100%; }
.reveal-grid.single { grid-template-columns: minmax(0, 260px); justify-content: center; }
.flip { perspective: 900px; cursor: pointer; border: 0; padding: 0; background: none; aspect-ratio: 63 / 88; animation: deal 0.4s ease-out backwards; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.flip.revealed .flip-inner { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .front { transform: rotateY(180deg); }
.flip .front .card { width: 100%; height: 100%; }
.card-back {
  height: 100%; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(circle, #2b2f6a 0 30%, transparent 31%), repeating-conic-gradient(from 0deg, #1d2050 0 15deg, #262a63 15deg 30deg);
  box-shadow: inset 0 0 0 5px #3a3f86, 0 10px 24px rgba(0, 0, 0, 0.5);
}
.card-back .brand-mark { width: 44%; height: auto; aspect-ratio: 1; }
.card-back .brand-mark::after { inset: 32%; }
.flip.hint-UR .card-back, .flip.hint-SEC .card-back { box-shadow: inset 0 0 0 5px #3a3f86, 0 0 26px rgba(255, 207, 58, 0.75); animation: glow 1s ease-in-out infinite alternate; }
.flip.hint-SR .card-back { box-shadow: inset 0 0 0 5px #3a3f86, 0 0 20px rgba(185, 139, 255, 0.7); }
@keyframes glow { to { box-shadow: inset 0 0 0 5px #3a3f86, 0 0 40px rgba(255, 111, 209, 0.9); } }
@keyframes deal { from { transform: translateY(40px) scale(0.8); opacity: 0; } }
.open-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.summary { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; color: var(--muted); }
.summary b { color: var(--text); }
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: 0; }
.flash.go { animation: flash 0.7s ease-out; }
@keyframes flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }

/* ---------- Modal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 70; background: rgba(5, 6, 14, 0.8); display: grid; place-items: center; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 16px; }
.modal h2 { font-size: 26px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.input-at { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--ink); padding-left: 14px; }
.input-at span { color: var(--muted); font-weight: 700; }
.input-at input { flex: 1; min-width: 0; min-height: 48px; border: 0; background: transparent; color: var(--text); font: 16px var(--f-body); padding: 0 12px 0 4px; outline: none; }
.input-at:focus-within { border-color: var(--gold); }
.err { color: var(--hot); font-size: 13px; min-height: 1.2em; }
.modal-actions { display: flex; gap: 10px; justify-content: end; flex-wrap: wrap; }
.toasts { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--text); color: var(--ink); padding: 12px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: toast-in 0.25s ease-out; }
.toast.bad { background: var(--hot); color: #fff; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

footer { border-top: 1px solid var(--line); padding-block: 20px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chase-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal.zoom { grid-template-columns: 1fr; max-width: 420px; }
  .zoom-card { max-width: 260px; margin: 0 auto; width: 100%; }
  .hero { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .fan { height: 320px; }
  .fan .card { width: 170px; }
  .fan .card:nth-child(1) { transform: translateX(-95px) rotate(-14deg) translateY(16px); }
  .fan .card:nth-child(3) { transform: translateX(95px) rotate(14deg) translateY(16px); }
}
@media (max-width: 720px) {
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .pull-stage { grid-template-columns: 1fr; }
  .stage-pack { position: static; max-width: 200px; margin: 0 auto; width: 100%; }
  .pack-grid { grid-template-columns: 1fr; }
  .reveal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .binder-head { grid-template-columns: 1fr; }
  .binder-head .actions { justify-content: start; }
  .binder-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
}
@media (max-width: 460px) {
  .chase-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mq-card { width: 120px; }
  .steps { grid-template-columns: 1fr; }
    .fan .card { width: 140px; }
  .fan { height: 270px; }
  .fan .card:nth-child(1) { transform: translateX(-80px) rotate(-14deg) translateY(14px); }
  .fan .card:nth-child(3) { transform: translateX(80px) rotate(14deg) translateY(14px); }
  .brand-name { font-size: 19px; }
  .bal-label { display: none; }
  .uh { max-width: 11ch; }
  .user-chip { padding-right: 4px; }
    }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Pokémon-only pricing & odds ---------- */
.card.rev .foil {
  opacity: 0.32;
  background: repeating-linear-gradient(125deg, rgba(255, 70, 160, 0.5) 0 4%, rgba(70, 220, 255, 0.5) 8%, rgba(255, 235, 90, 0.5) 12%, rgba(120, 255, 150, 0.5) 16%, rgba(255, 70, 160, 0.5) 20%);
  -webkit-mask-image: radial-gradient(ellipse 46% 26% at 50% 34%, transparent 92%, #000 100%);
  mask-image: radial-gradient(ellipse 46% 26% at 50% 34%, transparent 92%, #000 100%);
}
.rev-tag { position: absolute; z-index: 8; bottom: 9%; left: 50%; transform: translateX(-50%); white-space: nowrap; background: linear-gradient(90deg, #ff6fd1, #4fc3ff); color: #fff; font: 900 clamp(6px, 5cqi, 10px)/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; padding: 0.4em 0.7em; border-radius: 999px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45); }
.pull-buttons .btn.buy { display: grid; justify-items: start; gap: 2px; min-height: 76px; padding: 10px 22px; border-radius: 16px; text-align: left; }
.buy-name { font-size: 14px; font-weight: 800; }
.buy-usd { font: 400 28px/1 var(--f-display); }
.pull-buttons .btn.buy small { font-size: 12px; font-weight: 700; display: flex; gap: 6px; align-items: center; opacity: 0.85; }
.odds-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.odds-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font: 700 13px/1 var(--f-mono); }
.odds-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.pack-layout { display: grid; gap: 10px; background: var(--panel-2); border-radius: 12px; padding: 16px; }
.pack-layout ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pack-layout li { display: flex; gap: 10px; align-items: baseline; font-weight: 700; font-size: 14px; }
.slot-n { color: var(--gold); min-width: 2.2em; }
@media (max-width: 720px) {
  .odds-grid { grid-template-columns: 1fr; }
  .pull-buttons .btn.buy { flex: 1 1 140px; }
}

/* ---------- Gacha packs, vault, buyback ---------- */
.stat-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 4px; }
.schip { display: grid; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.schip small { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.schip b { font: 700 20px/1.1 var(--f-mono); }
.pt-price { font: 400 24px/1 var(--f-display); color: var(--gold); }
.slot { display: grid; gap: 6px; align-content: start; }
.slot-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13px; }
.slot-cap b { font: 700 14px/1 var(--f-mono); }
.slot-cap span { color: var(--muted); font: 600 12px/1 var(--f-mono); }
.vault-item .sell { width: 100%; }
.vault-stats { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 10px; }
.vault-stats .stat b { font-size: 20px; }
.nav-count { display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 11px; text-align: center; margin-left: 4px; }
.linkish { all: unset; cursor: pointer; font-weight: 700; color: var(--text); }
.linkish:hover { color: var(--gold); text-decoration: underline; }
.linkish:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mq-card { display: grid; gap: 6px; }
.mq-val { font: 700 13px/1 var(--f-mono); color: var(--gold); text-align: center; }
.reveal-grid.single { grid-template-columns: minmax(0, 300px); justify-content: center; }
.reveal-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rip-slot { display: grid; gap: 8px; align-content: start; }
.rip-slot .flip { width: 100%; }
.rip-cap { display: flex; justify-content: center; gap: 8px; align-items: baseline; }
.rip-cap b { font: 700 20px/1 var(--f-mono); }
.rip-cap span { color: var(--muted); font: 600 12px/1 var(--f-mono); }
.rip-cap.win b { color: var(--ok); }
.sold-tag { text-align: center; font-size: 13px; font-weight: 800; color: var(--muted); padding: 8px 0; }
.flip.sold { opacity: 0.45; }
.summary .up { color: var(--ok); font-weight: 800; }
.summary .down { color: var(--hot); font-weight: 800; }
@media (max-width: 720px) {
  .stat-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reveal-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vault-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
}

/* ---------- Booster wrapper (pack cover) ---------- */
.booster { --f1: #ffe14d; --f2: #f7a51c; --f3: #c4560f; --ink: #3a1d00; position: relative; width: 100%; max-width: 100%; aspect-ratio: 5 / 8.4; container-type: inline-size; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55)); }
.bw { position: absolute; inset: 0; overflow: hidden; border-radius: 3% / 2%;
  background:
    radial-gradient(120% 60% at 50% 46%, color-mix(in srgb, var(--f1) 70%, #fff) 0%, transparent 55%),
    linear-gradient(165deg, var(--f1) 0%, var(--f2) 42%, var(--f3) 100%);
}
.bw-rays { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.16) 0 5deg, transparent 5deg 13deg); -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 72%); mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 72%); }
.bw-holo { position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: 0.35;
  background:
    repeating-linear-gradient(120deg, rgba(255, 0, 150, 0.35) 0 3%, rgba(0, 220, 255, 0.35) 6%, rgba(255, 240, 0, 0.35) 9%, rgba(0, 255, 140, 0.35) 12%, rgba(255, 0, 150, 0.35) 15%),
    radial-gradient(rgba(255, 255, 255, 0.5) 0.6px, transparent 0.8px) 0 0 / 4% 2.5%;
}
.bw-crimp { position: absolute; left: 0; right: 0; height: 7.5%; z-index: 3;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 1.2%, rgba(0, 0, 0, 0.18) 1.2% 2.4%),
    linear-gradient(180deg, #f4f4f8, #b9bccb 60%, #e9eaf0);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.bw-crimp.top { top: 0; }
.bw-crimp.bottom { bottom: 0; }
.bw-tear { position: absolute; z-index: 4; top: 8.6%; left: 4%; font: 900 clamp(4px, 3.4cqi, 9px)/1 var(--f-body); letter-spacing: 0.14em; color: var(--ink); opacity: 0.55; }
.bw-logo { position: absolute; z-index: 4; top: 11%; left: 0; right: 0; display: grid; justify-items: center; gap: 0.2em; }
.bw-logo span { font: 400 clamp(12px, 12.5cqi, 40px)/1 var(--f-display); letter-spacing: 0.02em; color: #ffd84a; -webkit-text-stroke: 0.06em #1d2a6b; paint-order: stroke fill; text-shadow: 0 0.08em 0 #1d2a6b, 0 0.16em 0.2em rgba(0, 0, 0, 0.35); transform: rotate(-3deg); }
.bw-logo small { font: 900 clamp(4px, 3.6cqi, 10px)/1 var(--f-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); opacity: 0.8; }
.bw-stage { position: absolute; z-index: 2; left: 0; right: 0; top: 24%; height: 52%; }
.bw-ring { position: absolute; left: 50%; top: 52%; width: 74%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 28%, rgba(255, 255, 255, 0.35) 46%, transparent 66%);
  box-shadow: 0 0 0 0.6cqi rgba(255, 255, 255, 0.55), 0 0 6cqi rgba(255, 255, 255, 0.6);
}
.bw-hero { position: absolute; left: 50%; top: 50%; width: 82%; max-height: 108%; object-fit: contain; transform: translate(-50%, -50%); filter: drop-shadow(0 1.6cqi 1.8cqi rgba(0, 0, 0, 0.45)); z-index: 2; }
.bw-side { position: absolute; top: 18%; width: 38%; max-height: 60%; object-fit: contain; opacity: 0.85; filter: drop-shadow(0 1cqi 1.2cqi rgba(0, 0, 0, 0.35)) saturate(0.9); z-index: 1; }
.bw-side.l { left: -4%; transform: rotate(-10deg); }
.bw-side.r { right: -4%; transform: rotate(10deg) scaleX(-1); }
.bw-ribbon { position: absolute; z-index: 4; left: -3%; right: -3%; top: 75%; display: grid; place-items: center; padding: 1.8% 0 2.2%;
  background: linear-gradient(90deg, #121a46, #26318a 50%, #121a46); box-shadow: 0 0.8cqi 1.6cqi rgba(0, 0, 0, 0.4), inset 0 0.4cqi 0 rgba(255, 255, 255, 0.25); transform: rotate(-4deg); }
.bw-ribbon span { font: 400 clamp(10px, 10cqi, 30px)/1 var(--f-display); letter-spacing: 0.04em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff6c8, var(--f1) 50%, var(--f2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bw-stars { position: absolute; z-index: 4; top: 84.5%; left: 0; right: 0; display: flex; justify-content: center; gap: 1.5%; font-size: clamp(6px, 6cqi, 16px); line-height: 1; }
.bw-stars i { font-style: normal; color: rgba(0, 0, 0, 0.25); }
.bw-stars i.on { color: #fff; text-shadow: 0 0 1.4cqi rgba(255, 255, 255, 0.9), 0 0.2cqi 0 rgba(0, 0, 0, 0.35); }
.bw-foot { position: absolute; z-index: 4; bottom: 9%; left: 0; right: 0; text-align: center; font: 800 clamp(4px, 3.8cqi, 10px)/1 var(--f-mono); letter-spacing: 0.08em; color: var(--ink); }
.bw-sheen { position: absolute; inset: 0; z-index: 5; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.75) 44%, transparent 56%) -150% 0 / 250% 100% no-repeat;
  animation: sheen 4.5s ease-in-out infinite; }
@keyframes sheen { 0%, 55% { background-position: -150% 0; } 100% { background-position: 250% 0; } }
.bw-price { position: absolute; z-index: 6; top: 25%; right: -6%; width: 26%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; transform: rotate(12deg);
  background: radial-gradient(circle at 35% 30%, #ff8aa8, #ff3d6e 55%, #b3123d); box-shadow: 0 0 0 0.8cqi #fff, 0 1cqi 2cqi rgba(0, 0, 0, 0.4); }
.bw-price b { font: 400 clamp(8px, 8cqi, 24px)/1 var(--f-display); color: #fff; text-shadow: 0 0.1em 0 rgba(0, 0, 0, 0.3); }
button.pack-tile:hover .bw-sheen, .big-pack .bw-sheen { animation-duration: 1.8s; }
.stage-pack .booster { max-width: 260px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { .bw-sheen { animation: none; } }

/* ---------- Wallet sign-in ---------- */
.chain-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none; vertical-align: -4px; margin-right: 4px; }
.chain-dot.sol { background: linear-gradient(135deg, #9945ff, #19fb9b); }
.chain-dot.near { background: #00ec97 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 90'%3E%3Cpath fill='black' d='M72.2,4.6L53.4,32.5c-1.3,1.9,1.2,4.2,3,2.6L74.9,19c0.5-0.4,1.2-0.1,1.2,0.6v50.3c0,0.7-0.9,1-1.3,0.5l-56-67C17,1.2,14.4,0,11.5,0h-2C4.3,0,0,4.3,0,9.6v70.8C0,85.7,4.3,90,9.6,90c3.3,0,6.4-1.7,8.2-4.6l18.8-27.9c1.3-1.9-1.2-4.2-3-2.6l-18.5,16c-0.5,0.4-1.2,0.1-1.2-0.6V20.1c0-0.7,0.9-1,1.3-0.5l56,67c1.8,2.2,4.5,3.4,7.3,3.4h2c5.3,0,9.6-4.3,9.6-9.6V9.6c0-5.3-4.3-9.6-9.6-9.6C77.1,0,74,1.7,72.2,4.6z'/%3E%3C/svg%3E") center / 58% no-repeat; }
.user-chip { padding: 6px 12px 6px 8px; }
.user-chip .chain-dot { margin-right: 0; }
.lb .who .chain-dot { width: 26px; height: 26px; }
.modal.wallet-modal { max-width: 640px; }
.wallet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wallet-cols section { display: grid; gap: 10px; align-content: start; min-width: 0; }
.wallet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wallet-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); min-height: 52px; }
.wallet-row.muted, .wallet-row:has(.err) { grid-template-columns: 1fr; }
.wallet-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 900 16px/1 var(--f-body); color: #fff; background: var(--wc, #3a3f86); object-fit: cover; }
.wallet-name { display: grid; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-name small { font-size: 11px; color: var(--ok); font-weight: 700; }
.demo-wallet { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
@media (max-width: 620px) { .wallet-cols { grid-template-columns: 1fr; } }
.card-back img { width: 46%; height: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }

/* ---------- On-chain rip ---------- */
.chain-stage { max-width: 520px; }
.chain-pack { width: 150px; }
.chain-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; text-align: left; }
.cs { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.cs b { display: block; }
.cs small { color: var(--muted); font-size: 13px; }
.cs-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; border: 2px solid var(--line); }
.cs.done .cs-dot { background: var(--ok); border-color: var(--ok); color: #04210f; }
.cs.error .cs-dot { background: var(--hot); border-color: var(--hot); color: #fff; }
.cs.active { border-color: var(--gold); }
.cs.active .cs-dot { border-color: var(--gold); border-top-color: transparent; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seed-line { margin: 0; }
.proof { width: 100%; max-width: 640px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; font-size: 13px; }
.proof-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.proof-src { color: var(--text); }
.proof-ok { color: var(--ok); }
.proof-bad { color: var(--hot); }
.proof dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.proof dt { color: var(--muted); }
.proof dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; }
.proof-links { display: flex; gap: 14px; flex-wrap: wrap; }
.open-rip { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border-color: var(--gold); }
.zoom-info .proof { max-width: none; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.doc-toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.doc-toc a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; }
.doc-toc a:hover { color: var(--text); background: var(--panel); }
.doc-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.doc-sec { scroll-margin-top: 84px; line-height: 1.6; }
.doc-sec h2 { margin: 0 0 10px; font-size: 22px; }
.doc-sec h3 { margin: 16px 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.doc-sec p { margin: 0 0 10px; }
.doc-sec a { color: var(--gold); }
.doc-list { margin: 0 0 10px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc-sec code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.doc-sec code.break { word-break: break-all; }
.doc-code { margin: 0 0 10px; padding: 14px 16px; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.doc-box { background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.doc-box h3 { margin-top: 0; }
.doc-box p { margin: 0; font-size: 14px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
.doc-table th, .doc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.doc-table .num { text-align: right; white-space: nowrap; }
.doc-faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
.doc-faq:last-child { border-bottom: 0; }
.doc-faq summary { cursor: pointer; font-weight: 700; }
.doc-faq p { margin: 8px 0 0; color: var(--muted); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.foot-links a:hover { color: var(--gold); }
.section-head .btn svg { flex: none; }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; }
  .doc-toc { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .doc-toc a { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
  .doc-cols { grid-template-columns: 1fr; }
}

/* ---------- admin ---------- */
.admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-steps { display: grid; gap: 14px; }
.admin-step { display: grid; gap: 12px; }
.admin-step.done { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.admin-head { display: flex; align-items: center; gap: 12px; }
.admin-head h3 { margin: 0; font-size: 19px; flex: 1; min-width: 0; }
.admin-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); font-weight: 900; }
.admin-step.done .admin-n { background: var(--ok); border-color: var(--ok); color: #04210f; }
.admin-pill { flex: none; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.admin-pill.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.admin-pill.todo { background: var(--panel-2); color: var(--muted); }
.admin-step p { margin: 0; }
.admin-step code { font-family: var(--f-mono); font-size: 0.9em; word-break: break-all; }
.admin-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.admin-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.admin-form input, .ref-row input { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink); color: var(--text); font: 14px var(--f-mono); min-width: 0; }
.ref-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ref-row input { flex: 1 1 260px; }
.admin-step .btn { justify-self: start; }
@media (max-width: 720px) {
  .admin-summary { grid-template-columns: 1fr; }
  .admin-form { grid-template-columns: 1fr; }
}

/* ---------- official CA chip ---------- */
.ca-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 8px 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: 700 14px/1 var(--f-body); }
.ca-chip:hover { border-color: var(--gold); }
.ca-chip .ca-label { color: var(--gold); font-weight: 900; letter-spacing: 0.06em; }
.ca-chip code { font: 600 14px/1.2 var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-chip .ca-copy { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--gold); color: #1a1300; font-size: 12px; font-weight: 800; }
.hero .ca-chip { justify-self: start; align-self: flex-start; }
.ca-chip.small { padding: 4px 4px 4px 10px; font-size: 12px; }
.ca-chip.small code { font-size: 12px; }
.ca-chip.small .ca-copy { padding: 4px 8px; font-size: 11px; }
