/* ============ PokéVolt — Apple × Airbnb design system ============
   Copyright © 2026 One Durian Ltd. All rights reserved.
   Proprietary and confidential — unauthorized copying, modification,
   distribution, or use is prohibited without written permission. ============ */
:root {
  --ink: #1d1d1f;
  --ink-2: #515154;
  --ink-3: #86868b;
  --bg: #f5f5f7;
  --card: #ffffff;
  --accent: #ff385c;          /* Airbnb rausch */
  --accent-2: #e31c5f;
  --blue: #0a84ff;
  --gold: #ffd60a;
  --green: #34c759;
  --purple: #bf5af2;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
  --ease: cubic-bezier(.22,1,.36,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --coin-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.35' cy='.3' r='.85'%3E%3Cstop offset='0' stop-color='%23fff6c9'/%3E%3Cstop offset='.45' stop-color='%23ffd23f'/%3E%3Cstop offset='1' stop-color='%23e8960c'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='20' cy='20' r='19' fill='url(%23g)' stroke='%23a85f00' stroke-width='2'/%3E%3Ccircle cx='20' cy='20' r='14' fill='none' stroke='%23a85f00' stroke-width='1.4' opacity='.5' stroke-dasharray='2.4 2.2'/%3E%3Cpath d='M20 10.5l2.7 5.4 6 .9-4.3 4.2 1 6-5.4-2.8-5.4 2.8 1-6-4.3-4.2 6-.9z' fill='%23a85f00' opacity='.9'/%3E%3Cellipse cx='13.5' cy='11.5' rx='5' ry='2.6' fill='%23fff' opacity='.55' transform='rotate(-28 13.5 11.5)'/%3E%3C/svg%3E");
  --cardback: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 63 88'%3E%3Crect width='63' height='88' rx='4.5' fill='%231a4796'/%3E%3Crect x='3' y='3' width='57' height='82' rx='3' fill='%230f3277'/%3E%3Cpath d='M-5 25 Q 31 2 68 28' stroke='%232a63c9' stroke-width='7' fill='none' opacity='.45'/%3E%3Cpath d='M-5 70 Q 31 88 68 66' stroke='%232a63c9' stroke-width='7' fill='none' opacity='.45'/%3E%3Cpath d='M8 -5 Q -2 44 12 93' stroke='%233b74d8' stroke-width='6' fill='none' opacity='.3'/%3E%3Cpath d='M55 -5 Q 66 44 51 93' stroke='%233b74d8' stroke-width='6' fill='none' opacity='.3'/%3E%3Ccircle cx='31.5' cy='44' r='17' fill='%23f5c400'/%3E%3Ccircle cx='31.5' cy='44' r='14.5' fill='%23e8433f'/%3E%3Cpath d='M17 44 a14.5 14.5 0 0 0 29 0 z' fill='%23f4f6ff'/%3E%3Crect x='17' y='42.6' width='29' height='2.8' fill='%2320242e'/%3E%3Ccircle cx='31.5' cy='44' r='4.6' fill='%2320242e'/%3E%3Ccircle cx='31.5' cy='44' r='2.6' fill='%23f4f6ff'/%3E%3Cellipse cx='24' cy='36' rx='6' ry='3.4' fill='%23fff' opacity='.35' transform='rotate(-30 24 36)'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; width: 100%; overflow-x: hidden; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh;
  width: 100%; max-width: 100%;
  /* viewport-fit=cover: keep content out of the notch / curved edges (iPhone) */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
img { user-select: none; -webkit-user-drag: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: var(--font); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 8px;
  padding: 10px clamp(14px, 4vw, 40px);
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nav .logo {
  display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px;
  letter-spacing: -.4px; cursor: pointer; margin-right: 8px;
}
.logo-ball {
  width: 26px; height: 26px; border-radius: 50%; position: relative; flex: none;
  background: linear-gradient(180deg, var(--accent) 0 46%, #16151a 46% 54%, #fff 54%);
  box-shadow: 0 2px 8px rgba(255,56,92,.4);
}
.logo-ball::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px;
  background: #fff; border: 2.5px solid #16151a; border-radius: 50%;
}
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-links button {
  padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: all .25s var(--ease);
}
.nav-links button:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.nav-links button.active { background: var(--ink); color: #fff; }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.credit-pill {
  display: flex; align-items: center; gap: 7px; padding: 7px 14px 7px 10px;
  background: linear-gradient(135deg, #1d1d1f, #3a3a3e); color: #fff;
  border-radius: 99px; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.credit-pill:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
/* negative balance (a refunded purchase pulled its credits back) — a red, urgent pill */
.credit-pill.negative { background: linear-gradient(135deg, #7a0010, #d70015); box-shadow: 0 2px 12px rgba(215,0,21,.5); }
.credit-pill.negative .plus { background: rgba(255,255,255,.9); }
/* inline icon inside a button (Send, etc.) — the emoji sweep left these blank */
.btn-ico { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-ico svg { width: 15px; height: 15px; flex: none; }
.topup-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.credit-pill .coin { width: 20px; height: 20px; flex: none;
  background: var(--coin-img) center/contain no-repeat;
  filter: drop-shadow(0 1px 3px rgba(245,184,0,.5)); }
/* the plus: a real SVG, dead-center by construction */
.credit-pill .plus { background: var(--accent); border-radius: 50%; width: 17px; height: 17px;
  display: grid; place-items: center; margin-left: 2px; flex: none; }
.credit-pill .plus svg { width: 11px; height: 11px; display: block; }
/* centering audit: every small icon renders as a block, centered by its box */
.icon-btn svg, .bn-ico svg, .sb-ico svg, .a-icon svg, .vp-ava svg { display: block; margin: auto; }
.mail-badge { line-height: 1; display: grid; place-items: center; }
.credit-pill.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.14); } }

.avatar-btn { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid #fff;
  box-shadow: var(--shadow); background: #e8e8ed; flex: none; transition: transform .25s var(--ease); }
.avatar-btn:hover { transform: scale(1.08); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 17px; background: rgba(0,0,0,.05); transition: all .25s var(--ease); }
.icon-btn:hover { background: rgba(0,0,0,.1); transform: scale(1.08); }
.signin-btn { padding: 9px 18px; border-radius: 99px; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 14px; transition: all .25s var(--ease); box-shadow: 0 3px 12px rgba(255,56,92,.35); }
.signin-btn:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,56,92,.45); }
.shop-btn { padding: 9px 16px; border-radius: 99px; color: #5c4400; font-weight: 900; font-size: 14px; white-space: nowrap;
  background: linear-gradient(120deg, #ffd60a, #ffb300); background-size: 160% 100%;
  box-shadow: 0 3px 14px rgba(245,184,0,.5); transition: all .3s var(--ease);
  animation: shopGlow 2.6s ease-in-out infinite; }
.shop-btn:hover { transform: translateY(-1px) scale(1.04); background-position: 100% 0; box-shadow: 0 6px 20px rgba(245,184,0,.65); }
@keyframes shopGlow { 50% { box-shadow: 0 3px 22px rgba(245,184,0,.8); } }
.bottom-nav .bn-shop { color: #d99e00; }
.bottom-nav .bn-shop.active { color: #d99e00; }

/* ---------- Live ticker ---------- */
.ticker { overflow: hidden; background: #101013; color: #fff; font-size: 13px; position: relative; }
.ticker-track { display: flex; gap: 34px; padding: 9px 0; width: max-content; will-change: transform; }
.tick-item { display: flex; align-items: center; gap: 7px; white-space: nowrap; opacity: .92; }
.tick-item img { width: 20px; height: 20px; object-fit: contain; }
.tick-item .tk-rar { font-weight: 700; }
.tick-live { display: inline-flex; align-items: center; gap: 5px; color: #ff453a; font-weight: 800; }
.tick-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff453a; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(14px, 4vw, 40px) 110px; }
.view { display: none; animation: viewIn .5s var(--ease); }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

.section-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.8px; margin: 40px 0 6px; position: relative; }
.section-title::after { content: ''; display: block; width: 46px; height: 4px; border-radius: 99px; margin-top: 7px;
  background: linear-gradient(90deg, var(--accent), #ffd60a); }
.section-sub { color: var(--ink-3); font-size: 15px; margin-bottom: 22px; font-weight: 500; }

/* the background Pokéball pattern is the single league-themed one (body[data-league]::after).
   The old grey main::before grid was removed — it overlapped the league grid and looked noisy. */
main { position: relative; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: clamp(48px, 8vw, 96px) 0 30px; position: relative; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  background:
    linear-gradient(180deg, rgba(255,56,92,.14) 0 46%, rgba(29,29,31,.12) 46% 54%, rgba(255,255,255,0) 54%);
  border: 3px solid rgba(29,29,31,.05); }
.hero::before { width: 190px; height: 190px; right: -40px; top: 4px; transform: rotate(18deg); }
.hero::after { width: 110px; height: 110px; left: -20px; bottom: 30px; transform: rotate(-14deg); opacity: .75; }
.hero h1 {
  font-size: clamp(40px, 7.2vw, 84px); font-weight: 800; letter-spacing: -2.5px; line-height: 1.02;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--accent), #ff8a00 45%, var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: clamp(16px, 2.2vw, 21px); color: var(--ink-2); margin: 18px auto 30px; max-width: 620px; font-weight: 500; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 14px 28px; border-radius: 99px; font-size: 16px; font-weight: 700;
  transition: all .3s var(--ease); display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn-primary { background: linear-gradient(135deg, #ff5c7c, var(--accent) 55%, var(--accent-2)); color: #fff; box-shadow: 0 6px 20px rgba(255,56,92,.35); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)); transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 28px rgba(255,56,92,.45); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-ghost { background: rgba(0,0,0,.05); color: var(--ink); }
.btn-ghost:hover { background: rgba(0,0,0,.1); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

.hero-stats { display: flex; gap: clamp(20px, 5vw, 60px); justify-content: center; margin-top: 46px; flex-wrap: wrap; }
.hstat b { display: block; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.5px; }
.hstat span { color: var(--ink-3); font-size: 13px; font-weight: 600; }

/* ---------- Pack cards ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
/* shopping view: ~1.5× smaller tiles so far more packs fit side by side */
.pack-grid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
/* generation accordion: horizontal bars that drop their packs down when tapped */
.pack-accordion { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 20px; }
.pk-acc { border: 1.5px solid rgba(0,0,0,.1); border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.pk-acc-bar { width: 100%; display: flex; align-items: center; gap: 12px; padding: 17px 20px; background: none; border: none;
  cursor: pointer; font-family: var(--font); text-align: left; color: var(--ink); }
.pk-acc-bar:hover { background: rgba(0,0,0,.03); }
.pk-acc-name { font-size: 18px; font-weight: 800; flex: 1; letter-spacing: -.3px; }
.pk-acc-yr { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 7px; }
.pk-acc-meta { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.pk-acc-chev { display: inline-grid; place-items: center; color: var(--ink-3); transition: transform .3s var(--ease); }
.pk-acc.open .pk-acc-chev { transform: rotate(180deg); }
.pk-acc-body { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
/* tall enough for the Classic tab's ~60 packs on a 2-column phone grid — 6000px
   clipped the bottom rows behind an invisible line */
.pk-acc.open .pk-acc-body { max-height: 30000px; }
.pk-acc-body .pack-grid { padding: 4px 16px 18px; }
@media (prefers-color-scheme: dark) { .pk-acc { border-color: rgba(255,255,255,.1); } .pk-acc-bar:hover { background: rgba(255,255,255,.04); } }
/* portfolio collectibles: collector coins + card sleeves from boxes */
.collectible-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.coin-stack { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid rgba(0,0,0,.08);
  border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); }
.coin-disc { width: 46px; height: 46px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle at 34% 30%, #ffe98a, #f5b800 60%, #b47e00);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.25), 0 3px 8px rgba(245,184,0,.4); }
.coin-disc::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); }
.coin-stack b { font-size: 20px; display: block; } .coin-stack span { font-size: 11.5px; color: var(--ink-3); font-weight: 700; }
.sleeve-item { position: relative; width: 96px; }
.sleeve-art { height: 128px; border-radius: 10px; position: relative; overflow: hidden;
  background: linear-gradient(155deg, var(--s1, #888), var(--s2, #555));
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,.25); }
.sleeve-art::before { content: ''; position: absolute; left: 50%; top: 46%; width: 44px; height: 44px; transform: translate(-50%,-50%);
  border-radius: 50%; border: 3px solid rgba(255,255,255,.5); background: linear-gradient(180deg, rgba(255,255,255,.3) 0 50%, transparent 50%); }
.sleeve-art::after { content: ''; position: absolute; left: 50%; top: 46%; width: 12px; height: 12px; transform: translate(-50%,-50%);
  border-radius: 50%; border: 3px solid rgba(255,255,255,.5); background: var(--card); }
.sleeve-name { font-size: 11px; font-weight: 700; text-align: center; margin-top: 6px; line-height: 1.2; }
.sleeve-n { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 99px; padding: 1px 7px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pack-grid.small .pack-body { padding: 12px 12px 14px; }
.pack-grid.small .pack-body h3 { font-size: 15px; }
.pack-grid.small .pack-body p { font-size: 11.5px; }
.pack-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .4s var(--ease), box-shadow .4s var(--ease); position: relative;
}
.pack-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.pack-art { height: 235px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(165deg, color-mix(in srgb, var(--pk-c1, #dcd7ee) 26%, #fff), color-mix(in srgb, var(--pk-c2, #b9b2d8) 40%, #fff)); }
.pack-art::before { content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(255,255,255,.16), transparent 60%); }
/* the OFFICIAL wrapper product shot */
.pack-art .pack-real { position: relative; z-index: 1; width: auto !important; height: 88% !important; max-width: 72%;
  object-fit: contain; filter: drop-shadow(0 16px 26px rgba(0,0,0,.32)); transition: transform .5s var(--ease); }
.pack-art .pack-real.is-jpg { border-radius: 10px;
  box-shadow: 0 14px 26px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); filter: none; } /* tight wrapper scans need no white card behind them */
.pack-card:hover .pack-art .pack-real { transform: translateY(-7px) rotate(-3.5deg) scale(1.05); }
.pack-art img { width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0,0,0,.35));
  transition: transform .5s var(--ease); position: relative; }
.pack-card:hover .pack-art img { transform: scale(1.1) translateY(-5px) rotate(-3deg); }
/* auto packs (no curated booster photo): official set-logo hero + mascot artwork behind, on the themed gradient */
.pack-art .pack-cover { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.pack-art .bo-art-bg { position: absolute; width: 66% !important; height: 66% !important; object-fit: contain; opacity: .32; z-index: 0;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.28)); transition: transform .5s var(--ease); }
.pack-card:hover .pack-art .bo-art-bg { transform: scale(1.1) rotate(-3deg); }
.pack-art .pack-pkmn-mark { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 44% !important; height: auto !important;
  object-fit: contain; opacity: .92; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.pack-art .pack-logo { position: relative; z-index: 2; width: auto !important; max-width: 84%; height: auto !important; max-height: 54%;
  object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); transition: transform .5s var(--ease); }
.pack-card:hover .pack-art .pack-logo { transform: translateY(-6px) scale(1.05); }
.pack-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 48%, transparent 60%);
  transform: translateX(-120%); transition: transform .8s var(--ease); }
/* .pack-peek styling lives with the booster block below (slides from behind) */
.pack-card:hover .pack-shine { transform: translateX(120%); }
.pack-body { padding: 16px 18px 18px; }
.pack-body h3 { font-size: 19px; letter-spacing: -.4px; font-weight: 800; }
.pack-body p { color: var(--ink-3); font-size: 13px; margin: 5px 0 12px; line-height: 1.45; min-height: 37px; }
/* admin-only id chip on pack/box cards — copy this token into packprice/boxprice */
.admin-id { display: inline-block; margin: 4px 0 2px; padding: 1px 7px; border-radius: 6px; background: rgba(120,90,255,.14); color: #6a4dff; border: 1px solid rgba(120,90,255,.3); font: 600 11px/1.5 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .2px; user-select: all; cursor: text; }
.pack-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.price .coin-s, .coin-s { width: 16px; height: 16px; display: inline-block; flex: none; vertical-align: -2px;
  background: var(--coin-img) center/contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(245,184,0,.4)); }
.odds-link { font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-decoration: underline; }
.badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 11px; border-radius: 99px;
  font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.badge.hot { background: var(--accent); color: #fff; }
.badge.ltd { background: var(--gold); color: #5c4a00; }

/* ---------- Cards & odds sheet ---------- */
.odds-list { display: flex; flex-direction: column; gap: 8px; }
.odds-card { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 13px;
  background: var(--bg); }
.odds-card img { width: 44px; border-radius: 4px; flex: none; }
.odds-card .oc-info { flex: 1; min-width: 0; }
.odds-card .oc-info b { display: block; font-size: 14px; letter-spacing: -.2px; }
.odds-card .oc-info span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.odds-card .oc-right { text-align: right; }
.odds-card .oc-right .price { font-size: 14px; justify-content: flex-end; }
.odds-card .oc-odds { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 700; margin-top: 2px;
  font-variant-numeric: tabular-nums; }
/* pack-contents preview: just the cards, no odds/text — a tidy scrollable grid, tap to zoom */
.odds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 9px;
  max-height: 58vh; overflow-y: auto; padding: 2px; }
.odds-thumb { padding: 0; border: 1.5px solid transparent; border-radius: 7px; background: none; cursor: pointer;
  line-height: 0; transition: transform .12s var(--ease); }
.odds-thumb:hover { transform: translateY(-2px) scale(1.04); }
.odds-thumb img { width: 100%; border-radius: 5px; display: block; }
/* packs-tab demo switch */
.demo-toggle { display: flex; align-items: center; gap: 11px; margin: 0 0 16px; padding: 10px 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, background .2s; }
.demo-toggle.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--card)); }
.demo-switch { position: relative; flex: none; width: 44px; height: 26px; }
.demo-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.demo-slider { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-3); transition: background .2s; }
.demo-slider::before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.demo-switch input:checked + .demo-slider { background: var(--gold); }
.demo-switch input:checked + .demo-slider::before { transform: translateX(18px); }
.demo-label { font-size: 13.5px; line-height: 1.35; }

/* ---------- Box cards ---------- */
.box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; }
.box-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); position: relative; }
.box-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.box-art { height: 170px; display: flex; align-items: center; justify-content: center; gap: 0; position: relative; overflow: hidden; }
.box-art img { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(0,0,0,.4)) drop-shadow(0 0 24px rgba(255,214,10,.4)); position: relative; z-index: 1; }
.box-pattern { position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 12px, transparent 12px 30px),
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.06) 0 2px, transparent 2px 26px); }
.box-crest { position: relative; width: 100px; height: 100px; display: grid; place-items: center; z-index: 1; }
.box-crest::before { content: ''; position: absolute; inset: 12px; transform: rotate(45deg);
  border: 3px solid rgba(255,255,255,.7); border-radius: 16px; background: rgba(255,255,255,.12);
  box-shadow: 0 10px 26px rgba(0,0,0,.35), inset 0 0 20px rgba(255,255,255,.15); }
.box-crest i { position: absolute; inset: -4px; border: 2px dashed rgba(255,255,255,.35); border-radius: 50%;
  animation: crestSpin 24s linear infinite; }
@keyframes crestSpin { to { transform: rotate(360deg); } }
.box-crest span { position: relative; font-weight: 900; font-size: 42px; color: #fff; font-style: normal;
  text-shadow: 0 3px 14px rgba(0,0,0,.45); }
.box-body { padding: 18px; }
.box-body h3 { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.box-body p { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 7px 0 14px; }
.countdown { display: inline-flex; gap: 5px; align-items: center; font-variant-numeric: tabular-nums;
  background: rgba(255,69,58,.1); color: #d70015; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 800; }
.save-tag { color: var(--green); font-weight: 800; font-size: 13px; }

/* ---------- Rip overlay ---------- */
.rip-overlay { position: fixed; inset: 0; z-index: 300; background: #0b0b0f; display: none;
  flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.rip-overlay.open { display: flex; }
.rip-bg { position: absolute; inset: -20%; background: radial-gradient(circle at 50% 40%, var(--rip-glow, rgba(255,107,61,.28)), transparent 55%);
  transition: opacity .6s; }
.rip-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px; z-index: 10; width: 42px; height: 42px;
  border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 18px; backdrop-filter: blur(10px); }
.rip-close:hover { background: rgba(255,255,255,.22); }
.rip-skip { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 18px; z-index: 10;
  padding: 11px 18px; border-radius: 99px; background: rgba(255,255,255,.12); color: #fff; font-size: 14px;
  font-weight: 800; backdrop-filter: blur(10px); transition: all .25s var(--ease); }
.rip-skip:hover { background: rgba(255,214,10,.25); transform: scale(1.05); }
.rip-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 22px;
  width: 100%; padding: 76px 16px 30px; max-height: 100vh; overflow-y: auto; overflow-x: hidden; }
.rip-hint { color: rgba(255,255,255,.65); font-size: 15px; font-weight: 600; animation: hintFloat 2s var(--ease) infinite; }
@keyframes hintFloat { 50% { transform: translateY(-5px); opacity: .9; } }

/* the pack itself — real booster proportions: tall and slim */
.rip-pack { width: min(235px, 56vw); aspect-ratio: 58/100; border-radius: 13px; position: relative; cursor: pointer;
  transform-style: preserve-3d; perspective: 900px; animation: packFloat 3.2s ease-in-out infinite;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,.55)); }
/* rip pack in "real product art" mode: the official wrapper shot IS the pack.
   No fake seal strip — the image's own top tears off along a diagonal line
   and slashes away to the right. */
.rip-pack.real { width: auto; aspect-ratio: auto; background: transparent; }
.rip-pack.real .pk-real { display: block; height: min(60vh, 470px); width: auto; max-width: 84vw;
  object-fit: contain; border-radius: 12px; }
.rip-pack.real .pk-top { display: none; } /* the composed silver seal has no place here */
/* the tear slice keeps FULL COLOUR at rest AND while slashing (no greyscale).
   You draw the cut yourself — a thin white light grows across as you drag. */
.rip-pack.real .pk-real { position: relative; z-index: 1; }
.rip-pack.real .pk-tear { position: absolute; inset: 0; pointer-events: none; z-index: 3;
  clip-path: polygon(0 0, 100% 0, 100% 9%, 0 13.5%); }
.rip-pack.real .pk-tear img { display: block; height: min(60vh, 470px); width: auto; max-width: 84vw;
  object-fit: contain; border-radius: 12px; }
/* JPG product shots carry white margins on the sides — shave them off */
.rip-pack.real .pk-real.is-jpg { clip-path: inset(0.5% 4.5% 0.5% 4.5% round 14px); }
.rip-pack.real .pk-tear.is-jpg { clip-path: polygon(4.5% 0.5%, 95.5% 0.5%, 95.5% 9%, 4.5% 13.5%); }
/* the slash light — four layers over the same trace (halo, gradient beam, hot
   core, jittered voltage crackle): an electric tear in the PokéVolt gold, not
   a plain white line */
.pk-slash-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; opacity: 0; pointer-events: none;
  overflow: visible; transition: opacity .12s; }
.pk-slash-svg polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pk-slash-svg .sl-glow { stroke: var(--gold, #ffd60a); stroke-width: 11; opacity: .4; filter: blur(5px);
  animation: slashBreath .7s ease-in-out infinite; }
.pk-slash-svg .sl-beam { stroke: url(#slashGrad); stroke-width: 4.5; opacity: .95;
  filter: drop-shadow(0 0 6px rgba(255,214,10,.9)) drop-shadow(0 0 16px rgba(255,214,10,.55)); }
.pk-slash-svg .sl-core { stroke: #fff; stroke-width: 1.8;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px rgba(255,255,255,.8)); }
.pk-slash-svg .sl-volt { stroke: #fff7cf; stroke-width: 1; opacity: .85; animation: voltFlicker .14s steps(2) infinite; }
@keyframes slashBreath { 50% { opacity: .62; } }
@keyframes voltFlicker { 50% { opacity: .3; } }
/* the volt orb riding the cursor while you cut */
.slash-tip { position: fixed; z-index: 360; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, rgba(255,214,10,.85) 34%, transparent 68%);
  filter: drop-shadow(0 0 10px var(--gold, #ffd60a)); animation: tipFlicker .12s steps(2) infinite; }
@keyframes tipFlicker { 50% { transform: scale(.78); opacity: .75; } }
/* generic slice for the fallback (no-art) pack */
.rip-pack:not(.real) .pk-tear { position: absolute; left: 0; right: 0; top: 0; height: 13%; z-index: 3; overflow: hidden; border-radius: 13px 13px 0 0; }
.rip-pack:not(.real) .pk-tearface { position: absolute; inset: 0; background: linear-gradient(180deg, #eeecf4, #c9c6d6);
  clip-path: polygon(0 0, 100% 0, 100% 84%, 92% 100%, 84% 84%, 76% 100%, 68% 84%, 60% 100%, 52% 84%, 44% 100%, 36% 84%, 28% 100%, 20% 84%, 12% 100%, 4% 84%, 0 100%); }
/* once torn: the slice slashes off (KEEPS colour), the body opens at the cut */
.rip-pack.torn .pk-tear { animation: sealSlash .55s cubic-bezier(.5,.02,.7,.4) forwards;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.rip-pack.real.torn .pk-real { clip-path: polygon(0 13.5%, 100% 9%, 100% 100%, 0 100%);
  filter: drop-shadow(0 -2.5px 0 rgba(255,255,255,.9)); }
.rip-pack.real.torn .pk-real.is-jpg { clip-path: polygon(4.5% 13.5%, 95.5% 9%, 95.5% 100%, 4.5% 100%); }

/* the card stack sits BEHIND the wrapper and rises up THROUGH the opening */
.rip-pack .pk-stack { position: absolute; left: 50%; top: 16%; width: 58%; aspect-ratio: 63/88;
  transform: translate(-50%, 6%); opacity: 0; z-index: 0; border-radius: 10px; pointer-events: none;
  box-shadow: 3px 3px 0 #12306e, 6px 6px 0 #0e2554, 9px 9px 0 #0a1c40, 0 18px 30px rgba(0,0,0,.5); }
.rip-pack.drawn { animation: none; }
.rip-pack.drawn .pk-stack { animation: stackOut .85s cubic-bezier(.2,.75,.3,1) forwards; z-index: 2; }
@keyframes stackOut {
  0%   { transform: translate(-50%, 6%) ; opacity: 0; }
  18%  { opacity: 1; }
  55%  { transform: translate(-50%, -46%); }
  100% { transform: translate(-50%, -72%) rotate(-2deg); opacity: 1; }
}
/* NOTE: .pk-tear is deliberately NOT in this list — it keeps its sealSlash (forwards)
   so the ripped-off top stays gone instead of teleporting back to re-seal the pack. */
.rip-pack.drawn .pk-real,
.rip-pack.drawn .pk-bottom, .rip-pack.drawn .pk-crimp, .rip-pack.drawn .pk-foil, .rip-pack.drawn .pk-gloss {
  animation: packAway .7s ease-in .4s forwards; }
@keyframes packAway { to { transform: translateY(30vh) rotate(5deg); opacity: 0; } }

/* --- low cut: the opening is at the BOTTOM — the whole pack drops away and the
   cards emerge from below (the top tear piece falls straight down, not up-right) --- */
.rip-pack.cut-low.torn .pk-tear { animation: sealDrop .62s cubic-bezier(.5,.05,.75,.4) forwards; }
/* fallback (no-art) pack: its peel strip is fixed at the top — move it to the BOTTOM
   for a low cut so the bottom is what tears off, and flip the torn zigzag to face up */
.rip-pack.cut-low:not(.real) .pk-tear { top: auto; bottom: 0; border-radius: 0 0 13px 13px; }
.rip-pack.cut-low:not(.real) .pk-tearface { transform: scaleY(-1); }
@keyframes sealDrop {
  0%   { transform: none; opacity: 1; }
  12%  { transform: translateY(3%) rotate(1deg); }
  100% { transform: translateY(64vh) rotate(-7deg); opacity: 0; }
}
.rip-pack.cut-low .pk-stack { top: auto; bottom: 12%; transform: translate(-50%, -28%); }
.rip-pack.cut-low.drawn .pk-stack { animation: stackOutDown .85s cubic-bezier(.2,.75,.3,1) forwards; }
@keyframes stackOutDown {
  0%   { transform: translate(-50%, -28%); opacity: 0; }
  18%  { opacity: 1; }
  55%  { transform: translate(-50%, 34%); }
  100% { transform: translate(-50%, 58%) rotate(2deg); opacity: 1; }
}
.rip-pack.drawn.gone2 { transition: opacity .3s; opacity: 0; }
@keyframes sealSlash {
  0%   { transform: none; opacity: 1; }
  12%  { transform: translateX(-2.5%) rotate(-1.2deg); }             /* tiny wind-up */
  100% { transform: translateX(150%) translateY(-14%) rotate(13deg); opacity: 0; } /* the slash */
}
.rip-pack.real .pk-gloss { border-radius: 12px; }
@keyframes packFloat { 50% { transform: translateY(-12px) rotate(1.2deg); } }
.rip-pack .pk-top, .rip-pack .pk-bottom { position: absolute; left: 0; right: 0; overflow: hidden; }
/* silver foil seal strip — the part that peels */
.rip-pack .pk-top { top: 0; height: 13%; border-radius: 13px 13px 0 0; z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.65) 0 2px, rgba(150,148,165,.55) 2px 4px, rgba(255,255,255,.25) 4px 7px),
    linear-gradient(180deg, #eeecf4, #c9c6d6);
  clip-path: polygon(0 0, 100% 0, 100% 84%, 95% 100%, 90% 84%, 85% 100%, 80% 84%, 75% 100%, 70% 84%, 65% 100%, 60% 84%, 55% 100%, 50% 84%, 45% 100%, 40% 84%, 35% 100%, 30% 84%, 25% 100%, 20% 84%, 15% 100%, 10% 84%, 5% 100%, 0 84%);
  transition: transform .7s cubic-bezier(.45,-.2,.6,1), opacity .6s; }
/* pearlescent wrapper body, tinted with the set's colors */
.rip-pack .pk-bottom { top: 13%; bottom: 0; border-radius: 4px 4px 13px 13px;
  background:
    repeating-linear-gradient(115deg, transparent 0 10px, color-mix(in srgb, var(--pk-c1) 18%, transparent) 10px 12px, transparent 12px 24px),
    repeating-linear-gradient(65deg, transparent 0 14px, color-mix(in srgb, var(--pk-c2) 12%, transparent) 14px 16px),
    linear-gradient(160deg, #ffffff, color-mix(in srgb, var(--pk-c1) 15%, #f6f4fb) 42%, #ffffff 68%, color-mix(in srgb, var(--pk-c2) 13%, #f2f0f8));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.rip-pack .pk-burst { position: absolute; left: 50%; top: 44%; width: 130%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,.55), transparent 55%); }
.rip-pack .pk-pkmn { position: absolute; top: 4.5%; left: 13%; width: 74%; object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.28)); }
.rip-pack .pk-band { position: absolute; top: 19.5%; left: 22%; right: 22%; text-align: center;
  background: linear-gradient(180deg, #e33d3d, #ad1e1e); color: #fff; border-radius: 99px;
  font-size: 9px; font-weight: 900; letter-spacing: 1.6px; padding: 2.5px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.rip-pack .pk-icon { position: absolute; left: 50%; top: 27%; width: 64%; max-height: 37%;
  transform: translateX(-50%); object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.32)) drop-shadow(0 0 16px rgba(255,255,255,.7)); }
.rip-pack .pk-setlogo { position: absolute; bottom: 16%; left: 8%; width: 84%; max-height: 16%;
  object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0,0,0,.3)); }
.rip-pack .pk-name { position: absolute; bottom: 17%; left: 0; right: 0; text-align: center; color: #2b2b30;
  font-weight: 900; font-size: 19px; letter-spacing: 2.5px; text-transform: uppercase; }
.rip-pack .pk-count { position: absolute; bottom: 8%; left: 12%; right: 12%; text-align: center;
  background: rgba(255,255,255,.94); border: 1px solid rgba(0,0,0,.16); border-radius: 99px;
  color: #2b2b30; font-size: 8px; font-weight: 900; letter-spacing: 1.4px; padding: 2.5px 0; }
/* red factory crimp along the bottom, like the product shot */
.rip-pack .pk-crimp { position: absolute; left: 0; right: 0; bottom: 0; height: 5.5%; z-index: 2;
  border-radius: 4px 4px 13px 13px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.3) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #e23b3b, #b31f1f);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.18); }
.rip-pack .pk-foil { position: absolute; inset: 0; border-radius: 13px; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(115deg, rgba(170,150,210,.05) 0 10px, transparent 10px 26px); }
.rip-pack .pk-gloss { position: absolute; inset: 0; border-radius: 14px; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.3) 45%, transparent 62%);
  background-size: 250% 100%; animation: gloss 2.8s linear infinite; }
@keyframes gloss { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.rip-pack.torn { animation: none; }
.rip-pack.gone { transition: transform .5s var(--ease), opacity .4s; transform: scale(.8) translateY(40px); opacity: 0; pointer-events: none; }

/* revealed cards row */
.rip-cards { display: flex; gap: clamp(6px, 1.4vw, 13px); justify-content: center; flex-wrap: nowrap; perspective: 1200px; width: 100%;
  position: relative; z-index: 6; /* cards fly OVER the fading pack husk; positioned so card offsets measure against the row */
  margin-bottom: 26px; /* room for the value tags below the cards */ }
.rip-cards.wrap { flex-wrap: wrap; max-width: 1040px; row-gap: 42px; }
.rcard { width: clamp(52px, 8.6vw, 108px); aspect-ratio: 63/88; position: relative; cursor: pointer;
  transform-style: preserve-3d; transition: transform .7s var(--ease); animation: dealIn .55s var(--ease) backwards; }
.rip-cards.wrap .rcard { width: clamp(72px, 10vw, 108px); }
/* fullscreen on a laptop: the 12 cards come out as 2 rows of 6 (bigger, since
   only 6 share a row); the box summary (.wrap, >12 cards) keeps its own flow */
@media (min-width: 861px) {
  .rip-cards:not(.wrap) { display: grid; grid-template-columns: repeat(6, max-content); justify-content: center; row-gap: 44px; }
  .rip-cards:not(.wrap) .rcard { width: clamp(84px, 10.5vw, 138px); }
}
@keyframes dealIn { from { transform: translateY(60px) scale(.6); opacity: 0; } }
.rcard .face { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; overflow: hidden; }
.rcard .back, .rcard-back {
  /* official physical card back (self-hosted scan); drawn SVG beneath as fallback */
  background: url('../img/packs/cardback.jpg') center/100% 100% no-repeat, var(--cardback) center/100% 100% no-repeat !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  transform: rotateY(0deg); /* explicit facing — keeps backface-visibility honored during animations */
}
.rcard .front { transform: rotateY(180deg); background: #101018; }
.rcard .front img { width: 100%; height: 100%; object-fit: contain; }
.rcard.flipped { transform: rotateY(180deg); }
.rcard.flipped:hover { transform: rotateY(180deg) scale(1.06); }
.rcard:not(.flipped):hover { transform: translateY(-8px); }
.rcard .halo { position: absolute; inset: -14px; border-radius: 18px; opacity: 0; transition: opacity .5s; pointer-events: none;
  background: radial-gradient(circle, var(--halo, transparent) 0%, transparent 70%); filter: blur(10px); z-index: -1; }
.rcard.flipped .halo { opacity: 1; }
.rcard .shine-sweep { position: absolute; inset: 0; border-radius: 10px; transform: rotateY(180deg); backface-visibility: hidden;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.5) 48%, transparent 60%);
  background-size: 260% 100%; animation: gloss 2.2s linear infinite; opacity: 0; pointer-events: none; }
.rcard.flipped.shiny .shine-sweep { opacity: 1; }
.rcard .tag { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%) rotateY(180deg);
  white-space: nowrap; font-size: clamp(9px, 1.5vw, 12px); font-weight: 800; color: #fff; opacity: 0; transition: opacity .4s .2s; }
.rcard.flipped .tag { opacity: 1; }

.rip-summary { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; animation: viewIn .5s var(--ease); }
.rip-total { font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -.8px; }
.rip-total b { color: var(--gold); }
.rip-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rip-actions .btn { border: 1.5px solid rgba(255,255,255,.85); }

/* jackpot tease wheel */
.wheel-wrap { width: min(920px, 96vw); position: relative; padding: 26px 0; }
.wheel-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold), var(--accent)); z-index: 5; border-radius: 3px;
  box-shadow: 0 0 18px rgba(255,214,10,.8); }
.wheel-marker::before, .wheel-marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  border: 8px solid transparent; }
.wheel-marker::before { top: -6px; border-top: 11px solid var(--gold); }
.wheel-marker::after { bottom: -6px; border-bottom: 11px solid var(--gold); }
.wheel-window { overflow: hidden; border-radius: 16px; background: rgba(255,255,255,.05);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.wheel-strip { display: flex; gap: 12px; padding: 16px 0; will-change: transform; }
.witem { width: var(--wi, 120px); flex: none; aspect-ratio: 63/88; border-radius: 10px; overflow: hidden; position: relative;
  background: #17171f; border: 1.5px solid rgba(255,255,255,.09); }
.witem img { width: 100%; height: 100%; object-fit: contain; }
.witem.hot { border-color: var(--gold); box-shadow: 0 0 20px rgba(255,214,10,.45); }
.witem.hot::after { content: 'GRAIL'; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; font-weight: 900; letter-spacing: 1px; color: #16151a; background: var(--gold);
  padding: 2px 7px; border-radius: 99px; }
.wheel-caption { text-align: center; color: rgba(255,255,255,.85); font-weight: 800; font-size: clamp(16px, 2.6vw, 22px);
  letter-spacing: -.3px; margin-top: 18px; min-height: 30px; }
.wheel-caption.gold { color: var(--gold); animation: capPulse .55s ease-in-out infinite; }
@keyframes capPulse { 50% { transform: scale(1.06); opacity: .85; } }

/* big single reveal */
.big-reveal { display: flex; flex-direction: column; align-items: center; gap: 18px; perspective: 1400px; }
.big-card.auto { transform: none !important; transition: none; cursor: default; }
.big-card.auto img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; display: block;
  animation: viewIn .45s var(--ease); }
.big-card { width: min(310px, 72vw); aspect-ratio: 63/88; position: relative; transform-style: preserve-3d;
  transition: transform .9s var(--ease); cursor: pointer; }
.big-card.flipped { transform: rotateY(180deg); }
.big-card .face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; overflow: hidden; }
.big-card .front { transform: rotateY(180deg); }
.big-card .front img { width: 100%; height: 100%; object-fit: contain; }
.big-label { text-align: center; color: #fff; animation: viewIn .6s var(--ease); }
.big-label .r-name { font-size: clamp(22px, 4vw, 32px); font-weight: 800; letter-spacing: -.6px; }
.big-label .r-sub { font-size: 15px; font-weight: 700; margin-top: 4px; }

/* Sol's-RNG-style rarity cutscene */
.cutscene { position: fixed; inset: 0; z-index: 370; background: #000; display: grid; place-items: center;
  overflow: hidden; }
.cutscene.out { transition: opacity .45s ease; opacity: 0; }
.cut-glow { position: absolute; inset: -30%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, var(--cg, rgba(255,255,255,.6)) 0%, transparent 58%); }
.cut-glow.pulse { animation: cutPulse .58s ease-out; }
@keyframes cutPulse { 0% { opacity: 0; transform: scale(.55); } 22% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
.cut-label { position: relative; font-size: clamp(30px, 7.5vw, 66px); font-weight: 900; letter-spacing: 5px;
  text-transform: uppercase; opacity: 0; text-align: center; padding: 0 14px; }
.cut-label.pop { animation: cutPop .6s var(--ease); }
@keyframes cutPop { 0% { opacity: 0; transform: scale(.7); filter: blur(6px); }
  30% { opacity: 1; transform: scale(1.12); filter: blur(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.02); } }
.cutscene.strobe .cut-glow { animation: cutStrobe .11s linear 7; opacity: 1; }
@keyframes cutStrobe { 50% { opacity: .12; } }
.cutscene.strobe .cut-label { animation: none; opacity: 1; transform: scale(1.22);
  text-shadow: 0 0 46px currentColor, 0 0 120px currentColor; }

/* rarity flash & shake */
#flash { position: fixed; inset: 0; z-index: 350; pointer-events: none; opacity: 0; background: #fff; }
#flash.go { animation: flashGo .55s ease-out; }
@keyframes flashGo { 0% { opacity: .85; } 100% { opacity: 0; } }
.shake { animation: shake .5s ease-in-out; }
@keyframes shake { 20% { transform: translate(-7px, 3px); } 40% { transform: translate(6px, -4px); }
  60% { transform: translate(-5px, 2px); } 80% { transform: translate(4px, -2px); } }

/* confetti */
.confetti-piece { position: fixed; top: -14px; z-index: 360; pointer-events: none; border-radius: 2px;
  animation: confFall linear forwards; }
@keyframes confFall { to { transform: translateY(108vh) rotate(720deg); opacity: .6; } }

/* ---------- Portfolio ---------- */
.coll-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  max-height: 0; opacity: 0; transition: max-height .5s var(--ease), opacity .35s, margin .4s var(--ease); margin: 0; }
.filter-panel.open { max-height: 500px; opacity: 1; margin: 0 0 18px; }
.fp-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 13px 18px; }
.fp-group + .fp-group { border-top: 1px solid rgba(0,0,0,.05); }
.fp-group label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: var(--ink-3); width: 118px; flex: none; }
.fp-group .chip { box-shadow: none; background: rgba(0,0,0,.05); }
.fp-group .chip.active { background: var(--ink); color: #fff; }
.master-bar { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 15px 18px;
  margin-bottom: 18px; font-size: 14.5px; }
.ccard.missing img.art { filter: grayscale(1) brightness(.72); opacity: .45; }
.ccard.missing { border: 2px dashed rgba(0,0,0,.14); box-shadow: none; background: rgba(255,255,255,.6); }
.ccard.missing .cc-name, .ccard.missing .cc-val { opacity: .55; }
.cc-missing { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px;
  font-weight: 800; padding: 3px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .5px; z-index: 1; }
.ccard .cc-actions .find { color: var(--accent-2); }
.chip { padding: 8px 15px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #fff;
  box-shadow: var(--shadow); color: var(--ink-2); transition: all .25s var(--ease); }
.chip:hover { transform: translateY(-1px); }
.chip.active { background: var(--ink); color: #fff; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.ccard { background: var(--card); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.ccard:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--shadow-lg); }
.ccard img.art { width: 100%; aspect-ratio: 63/88; object-fit: contain; border-radius: 8px; background: #f0f0f4; }
.ccard .cc-name { font-size: 13px; font-weight: 800; margin-top: 8px; letter-spacing: -.2px; }
.ccard .cc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; }
.ccard .cc-val { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.ccard .cc-rar { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.ccard .cc-count { position: absolute; top: 6px; right: 6px; background: var(--ink); color: #fff; font-size: 11px;
  font-weight: 800; padding: 3px 8px; border-radius: 99px; }
.ccard .cc-actions { display: flex; gap: 6px; margin-top: 9px; }
.ccard .cc-actions button { flex: 1; padding: 7px 0; border-radius: 9px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.05); transition: all .2s; }
.ccard .cc-actions button:hover { background: rgba(0,0,0,.12); }
.ccard .cc-actions .sell:hover { background: rgba(255,56,92,.14); color: var(--accent-2); }
.empty-note { text-align: center; padding: 70px 20px; color: var(--ink-3); font-weight: 600; }
.empty-note .big { font-size: 44px; margin-bottom: 10px; }

/* pfp & accessory shelves */
.pfp-shelf { display: flex; gap: 12px; flex-wrap: wrap; }
.pfp-item { width: 66px; height: 66px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: var(--shadow);
  position: relative; transition: transform .25s var(--ease); border: 3px solid transparent; }
.pfp-item img { width: 100%; height: 100%; object-fit: cover; }
.pfp-item:hover { transform: scale(1.1); }
.pfp-item.active { border-color: var(--accent); }
.pfp-item.locked { filter: grayscale(1); opacity: .45; }
.pfp-item.locked::after { content: '🔒'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; }
/* bundle-exclusive shiny PFPs shimmer */
.pfp-item.shiny-pfp { border-color: rgba(240,171,252,.8); box-shadow: 0 2px 12px rgba(217,70,239,.35); position: relative; }
.pfp-item.shiny-pfp::before { content: '✨'; position: absolute; top: -4px; right: -4px; font-size: 13px; z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.pfp-item.shiny-pfp.active { border-color: #d946ef; }
.acc-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.acc-item { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; gap: 12px;
  align-items: center; border: 2px solid transparent; transition: all .25s var(--ease); cursor: pointer; }
.acc-item:hover { transform: translateY(-2px); }
.acc-item.active { border-color: var(--accent); }
.acc-item.locked { opacity: .5; }
.acc-item .a-icon { font-size: 26px; }
.acc-item b { display: block; font-size: 14.5px; }
.acc-item span { font-size: 12px; color: var(--ink-3); }

/* ---------- Trade ---------- */
.friend-row { display: flex; align-items: center; gap: 13px; background: #fff; border-radius: 16px; padding: 13px 16px;
  box-shadow: var(--shadow); margin-bottom: 10px; transition: transform .25s var(--ease); }
.friend-row:hover { transform: translateX(3px); }
.friend-row img { width: 46px; height: 46px; border-radius: 50%; background: #f0f0f4; object-fit: cover; }
.friend-row .fr-info { flex: 1; min-width: 0; }
.friend-row .fr-info b { font-size: 15px; display: block; }
.friend-row .fr-info span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.friend-row .fr-online { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.friend-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }

.trade-room { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.trade-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,.06); flex-wrap: wrap; gap: 8px; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; }
.trade-side { padding: 18px; min-height: 230px; }
.trade-side + .trade-side { border-left: 1px solid rgba(0,0,0,.06); }
.trade-side h4 { font-size: 14px; font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.trade-side .ts-val { font-size: 12.5px; color: var(--ink-3); font-weight: 700; margin-bottom: 12px; }
.trade-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.tslot { width: 76px; aspect-ratio: 63/88; border-radius: 8px; overflow: hidden; position: relative; background: #f0f0f4;
  animation: dealIn .4s var(--ease) backwards; }
.tslot img { width: 100%; height: 100%; object-fit: contain; }
.tslot .rm { position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px; display: grid; place-items: center; }
.tslot-add { width: 76px; aspect-ratio: 63/88; border-radius: 8px; border: 2px dashed rgba(0,0,0,.18);
  display: grid; place-items: center; font-size: 22px; color: var(--ink-3); transition: all .25s; }
.tslot-add:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,56,92,.05); }
.fair-wrap { padding: 18px 20px; border-top: 1px solid rgba(0,0,0,.06); }
.fair-bar { height: 12px; border-radius: 99px; background: rgba(0,0,0,.07); overflow: hidden; margin: 9px 0 5px; }
.fair-bar i { display: block; height: 100%; border-radius: 99px; transition: width .6s var(--ease), background .6s; }
.fair-label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.trade-foot { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid rgba(0,0,0,.06);
  align-items: center; flex-wrap: wrap; }
.accept-state { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.accept-state .ok { color: var(--green); }

/* ---------- Free pack strip & flash sale ---------- */
.free-strip { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 13px 18px; border-radius: 16px; margin-bottom: 18px; font-size: 14.5px; font-weight: 700;
  background: #fff; box-shadow: var(--shadow); color: var(--ink-2); font-variant-numeric: tabular-nums; }
button.free-strip.ready { cursor: pointer; color: #fff; border: none;
  background: linear-gradient(120deg, var(--accent), #ff8a00); box-shadow: 0 6px 20px rgba(255,110,30,.4);
  animation: freePulse 1.8s ease-in-out infinite; transition: transform .25s var(--ease); }
button.free-strip.ready:hover { transform: scale(1.015); }
@keyframes freePulse { 50% { box-shadow: 0 6px 30px rgba(255,110,30,.65); } }

/* ---------- Level pill, streak, missions ---------- */
.lvl-pill { padding: 8px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 800;
  background: linear-gradient(120deg, #0a84ff, #bf5af2); color: #fff; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(10,132,255,.35); transition: transform .25s var(--ease); }
.lvl-pill:hover { transform: scale(1.06); }
.streak-day { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(0,0,0,.06); font-weight: 800; font-size: 15px; color: var(--ink-3); }
.streak-day.lit { background: linear-gradient(140deg, #fff3cd, #ffe08a); box-shadow: 0 3px 10px rgba(245,184,0,.35); }
.missions-panel { display: flex; flex-direction: column; gap: 10px; }
.mission { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px;
  padding: 14px 18px; box-shadow: var(--shadow); }
.mission.done { border: 1.5px solid rgba(52,199,89,.4); }
.mission .mi-info { flex: 1; min-width: 0; font-size: 14.5px; }
.mission .mi-prog { font-size: 13px; font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mission .mi-reward { display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13.5px; }
.mission .mi-claimed { color: var(--green); font-weight: 800; font-size: 13px; }

/* ---------- Interactive cards: tilt + glare + detail ---------- */
.tiltable { position: relative; will-change: transform; transition: transform .18s ease-out; }
.tiltable::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.3), transparent 55%);
  opacity: 0; transition: opacity .25s; }
.tiltable:hover::after { opacity: 1; }
.ccard.tiltable:hover { box-shadow: var(--shadow-lg); }
.detail-card { width: min(280px, 68vw); border-radius: 12px; }
.detail-card img { width: 100%; display: block; border-radius: 12px; filter: drop-shadow(0 14px 30px rgba(0,0,0,.3)); }

/* ---------- Checkout ---------- */
.pay-fast { display: flex; gap: 10px; margin-bottom: 6px; }
.pay-btn { flex: 1; padding: 13px 0; border-radius: 13px; background: #000; color: #fff; font-size: 16px;
  font-weight: 700; letter-spacing: .3px; transition: all .25s var(--ease); }
.pay-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.pay-btn:disabled { opacity: .6; }
.pay-or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px;
  font-weight: 700; margin: 14px 0; text-transform: uppercase; letter-spacing: .6px; }
.pay-or::before, .pay-or::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,.1); }

/* ---------- Feed comments ---------- */
.comments { margin-top: 12px; border-top: 1px solid rgba(0,0,0,.06); padding-top: 10px;
  display: flex; flex-direction: column; gap: 7px; }
.comment { font-size: 13.5px; line-height: 1.45; }
.comment b { margin-right: 5px; }
.comment-in { border: none; background: rgba(0,0,0,.045); border-radius: 99px; padding: 9px 15px;
  font-size: 13.5px; outline: none; transition: background .25s; }
.comment-in:focus { background: rgba(0,0,0,.08); }

/* ---------- Portfolio & price charts ---------- */
.port-chart { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px 12px; margin-bottom: 18px; }
.port-chart .pc-label { font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--ink-3); }
.port-chart .pc-big { display: flex; align-items: center; gap: 8px; font-size: 24px;
  letter-spacing: -.5px; font-weight: 800; margin-top: 2px; }
.port-chart .pc-big .coin-s { width: 20px; height: 20px; }
.spark { display: block; width: 100%; height: auto; margin-top: 6px; }
.spark .spark-halo { animation: sparkHalo 2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes sparkHalo { 50% { opacity: .06; transform: scale(1.5); } }
.chart-body { position: relative; }
.y-axis { position: absolute; right: 4px; top: 10px; bottom: 10px; display: flex; flex-direction: column;
  justify-content: space-between; align-items: flex-end; pointer-events: none; }
.y-axis span { font-size: 10px; font-weight: 800; color: var(--ink-2); background: rgba(255,255,255,.78);
  padding: 1px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; backdrop-filter: blur(2px); }
.range-chips { display: flex; gap: 5px; }
.chip-xs { padding: 5px 11px; font-size: 11.5px; box-shadow: none; }
.chart-foot { font-size: 10.5px; font-weight: 600; margin-top: 6px; }
.chg { font-size: 12.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.chg.up { background: rgba(52,199,89,.14); color: #1d8a3e; }
.chg.down { background: rgba(255,69,58,.14); color: #d70015; }

/* ---------- Custom icon set ---------- */
.bn-ico { display: grid; place-items: center; }
.bn-ico svg { width: 22px; height: 22px; }
.bottom-nav button.active .bn-ico svg { stroke-width: 2.4; }
.icon-btn svg { width: 19px; height: 19px; }
.shop-btn { display: inline-flex; align-items: center; gap: 6px; }
.shop-btn .sb-ico { display: grid; place-items: center; }
.shop-btn .sb-ico svg { width: 16px; height: 16px; stroke-width: 2.4; }
.nav-links .shop-link { margin-left: 6px; padding: 8px 15px; }
@media (min-width: 861px) { .nav-right > .shop-btn { display: none; } } /* desktop: Shop lives with the nav links */

/* password show/hide */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 48px !important; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-58%); width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); transition: all .2s; }
.pw-eye:hover { background: rgba(0,0,0,.07); color: var(--ink); }
.pw-eye svg { width: 19px; height: 19px; }

/* set-logo pack art (legacy class, still used inside the rip overlay) */
.pack-art .pack-logo { width: 82% !important; height: auto !important; max-height: 68%; object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); transition: transform .5s var(--ease); position: relative; }
.pack-art .pack-logo.logo-fallback { width: 140px !important; height: 140px !important; }
.rip-pack .pk-icon { object-fit: contain; }
.rip-pack .pk-icon:not(.logo-fallback) { width: 84%; max-height: 42%; }

/* ---------- booster wrapper: modeled on the real product ----------
   Pearlescent white foil, Pokémon logo + red TCG band up top, featured
   artwork center, set logo beneath, white "10 CARDS" strip and red crimp
   at the bottom — the layout printed on the actual wrappers. */
.booster { width: clamp(104px, 46%, 134px); aspect-ratio: 58/100; position: relative; border-radius: 9px;
  background:
    repeating-linear-gradient(115deg, transparent 0 9px, color-mix(in srgb, var(--pk-c1) 20%, transparent) 9px 11px, transparent 11px 22px),
    repeating-linear-gradient(65deg, transparent 0 13px, color-mix(in srgb, var(--pk-c2) 14%, transparent) 13px 15px),
    linear-gradient(160deg, #ffffff, color-mix(in srgb, var(--pk-c1) 16%, #f6f4fb) 42%, #ffffff 68%, color-mix(in srgb, var(--pk-c2) 14%, #f2f0f8));
  box-shadow: 0 18px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.7), inset 0 0 12px rgba(255,255,255,.5);
  transition: transform .5s var(--ease); z-index: 1; }
.pack-card:hover .booster { transform: translateY(-7px) rotate(-3.5deg) scale(1.05); }
.booster .bo-crimp { position: absolute; left: 0; right: 0; height: 5.5%; z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.65) 0 2px, rgba(150,148,165,.5) 2px 4px, rgba(255,255,255,.2) 4px 6px),
    linear-gradient(180deg, #e9e7f0, #cfccdb); }
.booster .bo-crimp.top { top: 0; border-radius: 9px 9px 2px 2px; box-shadow: 0 3px 5px rgba(0,0,0,.14); }
.booster .bo-crimp.bot { bottom: 0; border-radius: 2px 2px 9px 9px; box-shadow: 0 -2px 4px rgba(0,0,0,.16);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #e23b3b, #b31f1f); }
.pack-art .booster img.bo-pkmn { position: absolute; top: 7%; left: 12%; width: 76% !important; height: auto !important;
  max-height: 15%; object-fit: contain; z-index: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.booster .bo-band { position: absolute; top: 22.5%; left: 20%; right: 20%; z-index: 1; text-align: center;
  background: linear-gradient(180deg, #e33d3d, #ad1e1e); color: #fff; border-radius: 99px;
  font-size: 5.5px; font-weight: 900; letter-spacing: 1.1px; padding: 1.5px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pack-art .booster img.bo-art { position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  width: 74% !important; height: auto !important; max-height: 38%; object-fit: contain; z-index: 1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)) drop-shadow(0 0 10px rgba(255,255,255,.6)); }
.pack-art .booster img.bo-logo { position: absolute; bottom: 15%; left: 9%; width: 82% !important; height: auto !important;
  max-height: 17%; object-fit: contain; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.booster .bo-tcg { position: absolute; bottom: 7.5%; left: 8%; right: 8%; text-align: center; z-index: 1;
  background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.14); border-radius: 99px;
  color: #2b2b30; font-size: 5.5px; font-weight: 900; letter-spacing: 1px; padding: 1.5px 0; }
.booster .bo-gloss { position: absolute; inset: 0; border-radius: 9px; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.5) 47%, transparent 60%);
  transform: translateX(-130%); transition: transform .8s var(--ease); }
.pack-card:hover .booster .bo-gloss { transform: translateX(130%); }

/* the pack's grail slides out smoothly from behind the wrapper on hover —
   bare card scan, soft shadow, no glow box */
.pack-art .pack-peek { position: absolute; left: 50%; top: 50%; width: 88px !important; height: auto !important;
  z-index: 0; border-radius: 6px; background: transparent; box-shadow: 0 8px 18px rgba(0,0,0,.3);
  transform: translate(-50%, -50%) rotate(0deg); filter: none;
  transition: transform .6s cubic-bezier(.22,1,.36,1); }
.pack-card:hover .pack-art .pack-peek { transform: translate(52%, -58%) rotate(10deg); }

/* clearer, more definite buttons */
.btn { border: 1.5px solid transparent; }
.btn-ghost { border-color: rgba(0,0,0,.28); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { border-color: #000; }
.btn-primary { border-color: rgba(0,0,0,.08); }
.btn:focus-visible, .chip:focus-visible { outline: 3px solid rgba(10,132,255,.45); outline-offset: 2px; }
.chip { border: 1.5px solid rgba(0,0,0,.14); }
.chip.active { border-color: var(--ink); }

/* ---------- Admin command console ---------- */
.ap-console { margin: 0 18px 14px; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.42);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; line-height: 1.55;
  max-height: 150px; overflow-y: auto; }
.ap-console .cl-in { color: var(--gold); font-weight: 700; margin-top: 6px; }
.ap-console .cl-in:first-child { margin-top: 0; }
.ap-console .cl-out { color: rgba(255,255,255,.82); }
.admin-panel #apCmd { background: rgba(0,0,0,.35); font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* ---------- Admin set builder ---------- */
.sb-select { padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(0,0,0,.16);
  font-family: var(--font); font-size: 13.5px; font-weight: 700; background: #fff; outline: none; }
.sb-setrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg);
  border-radius: 11px; margin-bottom: 6px; font-size: 13.5px; }
.sb-setrow b { flex: 1; }
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px;
  max-height: 42vh; overflow-y: auto; padding: 2px; }
.sb-card { border-radius: 9px; padding: 5px; background: var(--bg); cursor: pointer;
  border: 2px solid transparent; transition: all .15s; }
.sb-card:hover { transform: translateY(-2px); }
.sb-card.sel { border-color: var(--accent); background: rgba(255,56,92,.08); }
.sb-card img { width: 100%; border-radius: 5px; display: block; }
.sb-card .sbc-name { font-size: 10px; font-weight: 800; margin-top: 4px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.sb-card .sbc-meta { font-size: 9px; font-weight: 600; color: var(--ink-3); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.sb-card { position: relative; }
/* ---- Card library (admin) ---- */
.cl-detail { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.cl-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.07); font-size: 13px; }
.cl-row .cl-k { flex: 0 0 34%; font-weight: 800; color: var(--ink-3); }
.cl-row .cl-v { flex: 1; font-weight: 600; word-break: break-word; }
.cl-tag { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px;
  background: rgba(255,56,92,.12); color: var(--accent); margin: 1px 2px 1px 0; }
.cl-atk { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.cl-atk b { font-size: 13px; }
.cl-atktx { font-size: 12px; font-weight: 500; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.cl-form { max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.cl-f { display: block; margin-bottom: 9px; }
.cl-f > span { display: block; font-size: 11.5px; font-weight: 800; color: var(--ink-3); margin-bottom: 3px; }
.cl-f input, .cl-f textarea, .cl-f select { width: 100%; padding: 8px 10px; border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,.16); font: inherit; font-size: 13px; font-weight: 600; background: var(--card); }
.cl-sub { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); margin: 12px 0 6px; }
.cl-arow { display: flex; gap: 5px; align-items: flex-start; margin-bottom: 6px; flex-wrap: wrap; }
.cl-arow input { flex: 1 1 90px; padding: 6px 8px; border-radius: 8px; border: 1.5px solid rgba(0,0,0,.16);
  font: inherit; font-size: 12px; font-weight: 600; background: var(--card); min-width: 0; }
.cl-arow textarea { flex: 1 1 100%; padding: 6px 8px; border-radius: 8px; border: 1.5px solid rgba(0,0,0,.16);
  font: inherit; font-size: 12px; font-weight: 500; background: var(--card); }
.cl-ck { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.inv-n { position: absolute; top: 3px; right: 3px; z-index: 2; font-size: 9.5px; font-weight: 900;
  padding: 2px 6px; border-radius: 99px; background: rgba(29,29,31,.85); color: #fff;
  font-variant-numeric: tabular-nums; }
.inv-n.out { background: #d70015; }
.pack-card.sold-out .pack-art, .pack-card.sold-out .pack-body { filter: grayscale(.85) opacity(.75); }
.sb-bar { position: sticky; bottom: -24px; margin: 10px -4px -10px; padding: 10px 12px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-radius: 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: 0 -4px 16px rgba(0,0,0,.07); }
.sb-bar:empty { display: none; }

/* ---------- Audit trail (admin) ---------- */
.audit-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; }
.audit-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 9px 2px;
  border-bottom: 1px solid rgba(0,0,0,.06); font-size: 13px; line-height: 1.4; }
.audit-row:last-child { border-bottom: none; }
.au-time { color: var(--ink-3); font-weight: 700; font-size: 11px; min-width: 96px;
  font-variant-numeric: tabular-nums; }
.audit-row b { font-size: 13px; }
.au-event { font-weight: 700; color: var(--ink-2); }
.au-detail { color: var(--ink-3); font-weight: 600; }
.au-amt { margin-left: auto; font-weight: 900; font-size: 12px; color: #dc2626; font-variant-numeric: tabular-nums; }
/* spend summary + calendar (admin audit) */
.audit-spend { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; font-size: 13.5px; }
.audit-spend .au-total { font-weight: 900; color: #16a34a; font-variant-numeric: tabular-nums; }
.audit-spend .chip { display: inline-flex; align-items: center; gap: 4px; }
.audit-cal { border: 1px solid rgba(0,0,0,.09); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: rgba(0,0,0,.02); }
.audit-cal.hidden { display: none; }
.ac-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.ac-dows { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10px; font-weight: 800; color: var(--ink-3); margin-bottom: 2px; }
.ac-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ac-day { aspect-ratio: 1; border: none; border-radius: 7px; background: rgba(0,0,0,.045); font-size: 11.5px; font-weight: 700;
  color: var(--ink-3); display: grid; place-items: center; cursor: default; }
.ac-day.pad { background: transparent; }
.ac-day.spent { background: #22c55e; color: #fff; font-weight: 900; cursor: pointer; box-shadow: 0 1px 4px rgba(34,197,94,.45); }
.ac-day.spent:hover { background: #16a34a; }
.ac-day.sel { outline: 2.5px solid #14532d; outline-offset: 1px; }
.ac-daytotal { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; }
.ac-daytotal b { color: #dc2626; }

/* ---------- Admin console ---------- */
.admin-panel { margin-top: 18px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #16151a, #2a2233); color: #fff;
  border: 1.5px solid rgba(255,214,10,.45); box-shadow: 0 10px 34px rgba(255,214,10,.14); }
.ap-head { padding: 15px 18px; font-weight: 800; font-size: 16.5px; letter-spacing: -.3px;
  border-bottom: 1px solid rgba(255,255,255,.09); display: flex; align-items: baseline; gap: 10px; }
.ap-head span { font-size: 11.5px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.admin-panel .fp-group { border-color: rgba(255,255,255,.07); }
.admin-panel .fp-group label { color: rgba(255,255,255,.5); }
.admin-panel .chip { background: rgba(255,255,255,.1); color: #fff; }
.admin-panel .chip:hover { background: rgba(255,255,255,.2); }
.admin-panel .chip.active { background: var(--gold); color: #4a3b00; }
.admin-panel input { width: 130px; padding: 8px 12px; border-radius: 99px; border: none;
  background: rgba(255,255,255,.12); color: #fff; font-size: 14px; font-weight: 700; outline: none; }
.uluck { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.uluck input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; padding: 0; height: 22px;
  background: transparent; border-radius: 0; }
.uluck input[type=range]::-webkit-slider-runnable-track { height: 7px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,.18), var(--gold)); }
.uluck input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px;
  border-radius: 50%; background: var(--gold); border: 3px solid #16151a; margin-top: -6.5px;
  box-shadow: 0 0 12px rgba(255,214,10,.7); cursor: pointer; }
.uluck input[type=range]::-moz-range-track { height: 7px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,.18), var(--gold)); }
.uluck input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); border: 3px solid #16151a; box-shadow: 0 0 12px rgba(255,214,10,.7); cursor: pointer; }
.uluck-ticks { display: flex; justify-content: space-between; font-size: 8.5px; font-weight: 800;
  color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; padding: 0 3px; }

/* ---------- Market ---------- */
.mkt-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px 20px; margin-bottom: 20px; }
.mkt-title { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.mkt-section .listing { box-shadow: none; border: 1px solid rgba(0,0,0,.07); }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.listing { background: #fff; border-radius: 14px; padding: 12px; box-shadow: var(--shadow);
  transition: transform .3s var(--ease); animation: dealIn .5s var(--ease) backwards; }
.listing:hover { transform: translateY(-4px); }
.listing img { width: 100%; aspect-ratio: 63/88; object-fit: contain; border-radius: 8px; background: #f0f0f4; }
.listing .li-name { font-size: 13.5px; font-weight: 800; margin-top: 8px; }
.listing .li-seller { font-size: 11.5px; color: var(--ink-3); font-weight: 600; display: flex; gap: 5px; align-items: center; margin-top: 2px; }
.listing .li-seller img { width: 16px; height: 16px; border-radius: 50%; }
.listing .li-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }

/* ---------- Feed ---------- */
.feed-col { max-width: 620px; margin: 0 auto; }
.post { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
  animation: dealIn .5s var(--ease) backwards; transition: box-shadow .3s var(--ease); }
.post:hover { box-shadow: var(--shadow-lg); }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.post-head img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #f0f0f4; }
.post-head b { font-size: 14.5px; display: block; }
.post-head span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.post-card-wrap { display: flex; gap: 14px; align-items: center; background: var(--bg); border-radius: 14px; padding: 14px; }
.post-card-wrap img { width: 96px; border-radius: 7px; }
.post-card-wrap .pc-info b { font-size: 16px; display: block; letter-spacing: -.3px; }
.post-card-wrap .pc-info .pc-rar { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.post-card-wrap .pc-info .pc-val { font-size: 13.5px; font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.post-text { font-size: 14.5px; margin: 12px 2px; line-height: 1.5; }
.post-foot { display: flex; gap: 8px; }
.like-btn { display: flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 99px; font-size: 13.5px;
  font-weight: 700; background: rgba(0,0,0,.045); transition: all .25s var(--ease); }
.like-btn:hover { background: rgba(255,56,92,.1); }
.like-btn.liked { background: rgba(255,56,92,.12); color: var(--accent-2); }
.like-btn.liked .heart { animation: heartPop .45s var(--ease); }
@keyframes heartPop { 40% { transform: scale(1.5); } }

/* ---------- Leaderboard ---------- */
.lb-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  max-height: 0; opacity: 0; transition: max-height .6s var(--ease), opacity .4s, margin .5s var(--ease); margin: 0; }
.lb-panel.open { max-height: 900px; opacity: 1; margin: 14px 0 8px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(0,0,0,.05);
  transition: background .25s, transform .25s var(--ease); }
.lb-row:hover { background: rgba(0,0,0,.025); transform: translateX(3px); }
.lb-row:last-child { border: none; }
.lb-row .rank.top { display: grid; place-items: center; }
.lb-row .rank { width: 30px; font-weight: 800; font-size: 15px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lb-row .rank.top { font-size: 19px; }
.lb-row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #f0f0f4; }
.lb-row b { flex: 1; font-size: 14.5px; }
.lb-row .lb-val { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 5px; }
.lb-row.me { background: rgba(255,56,92,.06); }

/* ---------- Shop ---------- */
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.bundle { background: #fff; border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); text-align: center;
  position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease); border: 2px solid transparent; }
.bundle:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(255,56,92,.35); }
.bundle .b-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 99px; white-space: nowrap; }
.bundle .b-art { width: 96px; height: 74px; margin: 2px auto 8px; transition: transform .4s var(--ease);
  filter: drop-shadow(0 8px 16px rgba(245,184,0,.4)); }
.bundle .b-art svg { width: 100%; height: 100%; }
.bundle:hover .b-art { transform: scale(1.1) rotate(-2deg); }
.bundle .b-name { font-weight: 800; font-size: 14px; color: var(--ink-2); margin-bottom: 3px; }
.bundle b.amount { font-size: 24px; letter-spacing: -.5px; display: block; }
.bundle .b-price { color: var(--ink-3); font-weight: 700; font-size: 14px; margin: 3px 0 14px; }
.promo-strip { background: linear-gradient(92deg, #1d1d1f, #3c3c43); color: #fff; border-radius: var(--radius);
  padding: 22px 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 26px 0; }
.promo-strip b { font-size: 19px; letter-spacing: -.4px; }
.promo-strip p { font-size: 13.5px; opacity: .75; margin-top: 3px; }

/* ---------- Profile ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; background: #fff; border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); margin-top: 30px; flex-wrap: wrap; }
.profile-head .p-ava { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; border: 4px solid #fff;
  box-shadow: var(--shadow-lg); background: #f0f0f4; }
.profile-head .p-ava img { width: 100%; height: 100%; object-fit: cover; }
.profile-head h2 { font-size: 26px; letter-spacing: -.6px; }
.profile-head .p-join { color: var(--ink-3); font-size: 13.5px; font-weight: 600; margin-top: 3px; }
.p-stats { display: flex; gap: 26px; margin-left: auto; flex-wrap: wrap; }
.p-stats div b { display: block; font-size: 21px; letter-spacing: -.4px; }
.p-stats div span { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.showcase-row { display: flex; gap: 14px; flex-wrap: wrap; }
.showcase-slot { width: 130px; aspect-ratio: 63/88; border-radius: 12px; background: #fff; box-shadow: var(--shadow);
  display: grid; place-items: center; overflow: hidden; border: 2px dashed rgba(0,0,0,.14); color: var(--ink-3);
  font-size: 26px; cursor: pointer; transition: all .3s var(--ease); }
.showcase-slot:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--accent); }
.showcase-slot.filled { border-style: solid; border-color: transparent; }
.showcase-slot img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Modals ---------- */
.modal-veil { position: fixed; inset: 0; z-index: 380; background: rgba(0,0,0,.44); backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center; }
.modal-veil.open { display: flex; animation: veilIn .3s ease; }
@keyframes veilIn { from { opacity: 0; } }
.modal { position: relative; background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-width: 480px; max-height: 88vh;
  overflow-y: auto; padding: 28px 24px calc(24px + env(safe-area-inset-bottom)); animation: sheetUp .45s var(--ease); }
@keyframes sheetUp { from { transform: translateY(60px) scale(.98); opacity: 0; } }
@media (min-width: 640px) {
  .modal-veil { align-items: center; padding: 20px; }
  .modal { border-radius: 24px; padding: 30px; }
}
.modal h3 { font-size: 22px; letter-spacing: -.5px; margin-bottom: 6px; }
.modal .m-sub { color: var(--ink-3); font-size: 14px; margin-bottom: 20px; font-weight: 500; line-height: 1.5; }
/* Terms & Conditions doc (scrolls inside the modal) */
.terms-doc { max-height: 62vh; overflow-y: auto; padding: 4px 4px 4px 0; margin-top: 4px; -webkit-overflow-scrolling: touch; }
.terms-doc h4 { font-size: 14.5px; font-weight: 800; margin: 18px 0 6px; letter-spacing: -.2px; }
.terms-doc h4:first-child { margin-top: 2px; }
.terms-doc p { color: var(--ink-2); font-size: 13px; line-height: 1.6; margin: 0 0 8px; }
.terms-doc ul { margin: 0 0 10px; padding-left: 20px; }
.terms-doc li { color: var(--ink-2); font-size: 13px; line-height: 1.55; margin-bottom: 6px; }
.terms-doc .terms-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.1); font-size: 12px; color: var(--ink-3); font-weight: 600; }
/* acceptance notice under the auth forms */
.auth-terms { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; margin: 14px 2px 0; text-align: center; font-weight: 600; }
.auth-terms a, .profile-legal a { color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: none; }
.auth-terms a:hover, .profile-legal a:hover, .home-terms a:hover { text-decoration: underline; }
/* quiet, single Terms link — never a bulky footer block */
.home-terms { margin: 30px 0 4px; text-align: center; }
.home-terms a { color: var(--ink-3); font-size: 12px; font-weight: 700; opacity: .7; cursor: pointer; text-decoration: none; }
.home-terms a:hover { opacity: 1; }
.profile-legal { margin: 18px 2px 0; font-size: 12px; }
.modal input[type=text], .modal input[type=password] { width: 100%; padding: 14px 16px; border-radius: 13px; border: 1.5px solid rgba(0,0,0,.14);
  font-size: 15.5px; margin-bottom: 12px; outline: none; transition: border .25s; font-family: var(--font); }
.modal input[type=text]:focus, .modal input[type=password]:focus { border-color: var(--accent); }
.auth-opt { display: flex; align-items: center; gap: 14px; border: 1.5px solid rgba(0,0,0,.1); border-radius: 16px;
  padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all .25s var(--ease); width: 100%; text-align: left; }
.auth-opt:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.auth-opt .ao-icon { font-size: 26px; display: inline-flex; align-items: center; justify-content: center; width: 30px; }
.auth-opt .ao-icon svg { width: 26px; height: 26px; }
.auth-opt b { display: block; font-size: 15.5px; }
.auth-opt span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.auth-opt .bonus { margin-left: auto; background: rgba(52,199,89,.13); color: #1d8a3e; font-weight: 800;
  padding: 6px 11px; border-radius: 99px; font-size: 12.5px; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.pick-card { border-radius: 9px; overflow: hidden; cursor: pointer; transition: transform .2s; position: relative; background: #f0f0f4; }
.pick-card:hover { transform: scale(1.05); }
.pick-card img { width: 100%; display: block; }
.pick-card span { position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; font-weight: 800; color: #fff;
  background: rgba(0,0,0,.6); padding: 3px 5px; text-align: center; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 70px; right: 16px; z-index: 400; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast { background: rgba(29,29,31,.94); color: #fff; padding: 13px 18px; border-radius: 14px; font-size: 14px;
  font-weight: 600; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; max-width: 330px;
  animation: toastIn .45s var(--ease); backdrop-filter: blur(10px); }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(110%); opacity: 0; } }
.toast img { width: 30px; height: 30px; object-fit: contain; }
.toast.gold { background: linear-gradient(120deg, #7a5a00, #b8860b); }

/* ---------- Accessories (body themes) ----------
   quiet, premium, never covering content: all sit BELOW the nav bars (z 90)
   and respect phone safe areas */
body.acc-retro-frame::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  border: 5px solid #2e3440; border-radius: 14px;
  box-shadow: inset 0 0 0 2px #8fbcbb, inset 0 0 0 5px #2e3440; opacity: .85; }
body.acc-holo-bg { background: linear-gradient(120deg, #f5f5f7, #ffe9f0, #e9f2ff, #f0ffe9, #f5f5f7); background-size: 400% 400%;
  animation: holoShift 16s ease infinite; }
@keyframes holoShift { 50% { background-position: 100% 50%; } }
body.acc-ember::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  box-shadow: inset 0 0 110px rgba(255,94,25,.22); }
/* GOLD TRIM: gilded frame with a light that travels around it, plus gold-kissed chrome */
body.acc-gold-trim::before { content: ''; position: fixed; inset: 5px; pointer-events: none; z-index: 90;
  border: 2.5px solid transparent; border-radius: 18px;
  background: linear-gradient(var(--gt-a, 120deg), #8a6508, #f5d34a 20%, #fff3c4 26%, #f5d34a 32%, #8a6508 55%, #f5d34a 80%, #8a6508) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: goldSweep 5s linear infinite; }
@property --gt-a { syntax: '<angle>'; initial-value: 120deg; inherits: false; }
@keyframes goldSweep { to { --gt-a: 480deg; } }
body.acc-gold-trim .nav { box-shadow: 0 1px 16px rgba(212,168,20,.3); border-bottom-color: rgba(212,168,20,.35); }
body.acc-gold-trim .bottom-nav { border-top-color: rgba(212,168,20,.4); box-shadow: 0 -2px 16px rgba(212,168,20,.22); }
body.acc-gold-trim .credit-pill { box-shadow: 0 2px 14px rgba(245,184,0,.55); }
/* STARFIELD: two twinkling depth layers + a shooting star every ~9s */
body.acc-starfield::before { content: ''; position: fixed; inset: -10%; pointer-events: none; z-index: 0; opacity: .55;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, #8f87c9 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 68%, #9d96d1 50%, transparent 51%),
    radial-gradient(2px 2px at 58% 34%, #7f76c0 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 76% 74%, #8f87c9 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 88% 18%, #746ab8 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 86%, #9d96d1 50%, transparent 51%);
  background-size: 44% 44%; animation: starDrift 70s linear infinite, starTwinkle 3.4s ease-in-out infinite; }
body.acc-starfield::after { content: ''; position: fixed; top: 12%; left: -8%; width: 130px; height: 2px;
  pointer-events: none; z-index: 0; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, #b9b2e8 60%, #fff);
  transform: rotate(16deg); animation: shootingStar 9s ease-in 2s infinite; }
@keyframes starDrift { to { background-position: 44% 44%; } }
@keyframes starTwinkle { 50% { opacity: .3; } }
@keyframes shootingStar {
  0%, 92% { opacity: 0; transform: translate(0, 0) rotate(16deg); }
  93% { opacity: .9; }
  100% { opacity: 0; transform: translate(115vw, 32vw) rotate(16deg); }
}
/* TWILIGHT: a real dusk — deep sky wash, sunset glow on the horizon, warm chrome */
body.acc-midnight { background: linear-gradient(180deg, #c8c4e6, #a9a4d4 45%, #8d88c0 72%, #7a74ae); }
body.acc-midnight::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 34% at 50% 104%, rgba(255,158,94,.5), rgba(255,158,94,0) 70%),
    radial-gradient(30% 18% at 72% 102%, rgba(255,205,120,.45), transparent 70%);
  animation: duskBreathe 9s ease-in-out infinite; }
@keyframes duskBreathe { 50% { opacity: .75; } }
body.acc-midnight .nav { background: rgba(240,238,250,.72); }

/* accessory shelf: feels like equipment, not clutter */
.acc-item .a-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: rgba(0,0,0,.05); color: var(--ink-2); }
.acc-item .a-icon svg { width: 22px; height: 22px; }
.acc-item.active .a-icon { background: linear-gradient(135deg, #ffe9a0, #ffd23f); color: #6b4d00; box-shadow: 0 2px 10px rgba(245,184,0,.4); }
.acc-item .acc-on { background: var(--green); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .6px;
  padding: 4px 9px; border-radius: 99px; }
.acc-item .acc-off { color: var(--ink-3); font-size: 11px; font-weight: 800; }
.acc-item.active { box-shadow: 0 6px 20px rgba(245,184,0,.18); }

/* PFP region tabs */
.pfp-tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pfp-tabs::-webkit-scrollbar { display: none; }
.pfp-tabs .chip { flex: none; }

/* bundle cover: the real packs inside, fanned */
.box-fan { position: relative; width: 100%; height: 100%; }
.box-fan img { position: absolute; left: 50%; top: 54%; height: 78%; width: auto; object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.3)); transition: transform .45s var(--ease); }
.box-fan img.is-jpg { border-radius: 7px; filter: none;
  box-shadow: 0 8px 14px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); }
.box-fan.n1 img.bf0 { transform: translate(-50%, -50%); }
.box-fan.n2 img.bf0 { transform: translate(-78%, -50%) rotate(-8deg); }
.box-fan.n2 img.bf1 { transform: translate(-22%, -48%) rotate(8deg); }
.box-fan.n3 img.bf0 { transform: translate(-92%, -48%) rotate(-13deg); }
.box-fan.n3 img.bf1 { transform: translate(-50%, -52%); z-index: 1; }
.box-fan.n3 img.bf2 { transform: translate(-8%, -48%) rotate(13deg); }
/* 5-wide spread (grail-hunter case) */
.box-fan.n5 img { height: 68%; }
.box-fan.n5 img.bf0 { transform: translate(-140%, -44%) rotate(-20deg); }
.box-fan.n5 img.bf1 { transform: translate(-95%, -48%) rotate(-10deg); z-index: 1; }
.box-fan.n5 img.bf2 { transform: translate(-50%, -52%); z-index: 2; }
.box-fan.n5 img.bf3 { transform: translate(-5%, -48%) rotate(10deg); z-index: 1; }
.box-fan.n5 img.bf4 { transform: translate(40%, -44%) rotate(20deg); }
/* flip-box real product shots */
.box-art .box-product { max-width: 94%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
/* laptop: the pack menu's box tab is hidden — boxes live on the Boxes page */
@media (min-width: 861px) { .pk-boxtab { display: none; } }
.pk-boxtab { margin-top: 6px; }
.pk-boxtab .box-grid { margin-top: 12px; }
/* official coin skins shelf (portfolio) */
.coin-shelf { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.coin-skin { width: 108px; padding: 10px 8px; border-radius: 14px; background: var(--card, #fff); border: 1.5px solid rgba(0,0,0,.08);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.coin-skin img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.coin-skin span { font-size: 11px; font-weight: 700; }
.coin-skin.locked { opacity: .38; filter: grayscale(.9); }
.coin-skin.equipped { border-color: var(--gold, #ffd60a); box-shadow: 0 4px 14px rgba(255,214,10,.25); }
.coin-lock { font-size: 10px; color: var(--ink-3, #888); font-weight: 800; text-transform: uppercase; }
.sleeve-item.equipped { outline: 2px solid var(--gold, #ffd60a); border-radius: 12px; }
/* your equipped sleeve wraps the battle deck pile */
.bt-deckpile.sleeved i { background: linear-gradient(160deg, var(--sl1), var(--sl2)) !important; border-color: rgba(255,255,255,.35) !important; }
/* the opening coin flip — your equipped coin, actually flipping */
.bt-coinflip { position: fixed; inset: 0; z-index: 420; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 22px; background: rgba(8,8,12,.72); backdrop-filter: blur(3px); transition: opacity .35s; }
.bt-coinflip.out { opacity: 0; pointer-events: none; }
.bt-flipcoin { width: 130px; height: 130px; position: relative; transform-style: preserve-3d; }
.bt-flipcoin.heads { animation: coinToss 1.4s cubic-bezier(.3,.6,.4,1) forwards; }
.bt-flipcoin.tails { animation: coinTossT 1.4s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes coinToss  { 0% { transform: translateY(40px) rotateX(0); } 45% { transform: translateY(-110px) rotateX(900deg); } 100% { transform: translateY(0) rotateX(1800deg); } }
@keyframes coinTossT { 0% { transform: translateY(40px) rotateX(0); } 45% { transform: translateY(-110px) rotateX(880deg); } 100% { transform: translateY(0) rotateX(1620deg); } }
.cf-face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 8px 26px rgba(0,0,0,.55), inset 0 0 0 4px rgba(255,255,255,.18); }
.cf-front { background: radial-gradient(circle at 35% 30%, #ffe9a3, #d9920e); }
.cf-front img { width: 92%; height: 92%; object-fit: contain; border-radius: 50%; }
.cf-back { background: radial-gradient(circle at 35% 30%, #b8bfcf, #5c6373); transform: rotateX(180deg); color: #2b2f3a; font-size: 44px; font-weight: 900; }
.cf-front b { color: #7a5200; font-size: 44px; }
.cf-label { color: #fff; font-size: 19px; font-weight: 900; opacity: 0; transform: translateY(8px); transition: all .3s var(--ease); text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.cf-label.show { opacity: 1; transform: none; }
.box-card:hover .box-fan.n2 img.bf0 { transform: translate(-84%, -52%) rotate(-12deg); }
.box-card:hover .box-fan.n2 img.bf1 { transform: translate(-16%, -50%) rotate(12deg); }
.box-card:hover .box-fan.n3 img.bf0 { transform: translate(-100%, -50%) rotate(-17deg); }
.box-card:hover .box-fan.n3 img.bf1 { transform: translate(-50%, -56%) scale(1.04); }
.box-card:hover .box-fan.n3 img.bf2 { transform: translate(0%, -50%) rotate(17deg); }

/* ---------- Battle League ---------- */
.league-panel { background: linear-gradient(120deg, #16151a, #2c2438); color: #fff; border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(30,20,60,.3); }
.league-panel .lg-rank { display: flex; align-items: center; gap: 11px; }
.league-panel .lg-rank b { display: block; font-size: 17px; letter-spacing: -.3px; }
.league-panel .lg-rank span { font-size: 12px; font-weight: 700; opacity: .7; }
.league-panel .lg-meta { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; font-weight: 700; opacity: .8; }
.btl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.btl-side { display: flex; align-items: center; gap: 9px; min-width: 0; }
.btl-side img { width: 38px; height: 38px; border-radius: 50%; background: var(--bg); flex: none; }
.btl-side b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.btl-side span { font-size: 11px; font-weight: 700; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.btl-vs { font-size: 15px; font-weight: 900; color: var(--accent-2); flex: none; }
.btl-pip { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: rgba(0,0,0,.12); }
.btl-pip.live { background: var(--pc); box-shadow: 0 0 6px var(--pc); }
.btl-arena { display: flex; justify-content: center; gap: 22px; padding: 12px; border-radius: 14px;
  background: linear-gradient(160deg, #f3f2f8, #e6e4f0); min-height: 130px; align-items: center; }
.btl-fighter { position: relative; width: 92px; transition: transform .35s var(--ease), filter .35s; }
.btl-fighter img { width: 100%; border-radius: 6px; display: block; box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btl-fighter span { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
  background: #1d1d1f; color: #fff; font-size: 11px; font-weight: 900; padding: 2px 9px; border-radius: 99px; }
.btl-fighter.won { transform: scale(1.08); }
.btl-fighter.won span { background: var(--green); }
.btl-fighter.lost { filter: grayscale(.8) brightness(.75); transform: scale(.92); }
.btl-fighter.lost span { background: #d70015; }
.btl-log { font-size: 13.5px; font-weight: 600; text-align: center; margin: 12px 0 4px; min-height: 20px; }
.btl-hand { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.btl-card { width: 96px; border-radius: 8px; position: relative; transition: transform .25s var(--ease); }
.btl-card img { width: 100%; border-radius: 6px; display: block; box-shadow: 0 4px 12px rgba(0,0,0,.22); }
.btl-card span { display: block; font-size: 10.5px; font-weight: 800; color: var(--ink-2); margin-top: 4px; }
.btl-card:hover { transform: translateY(-6px) scale(1.05); }

/* ---------- Battle arena (rulebook engine, js/battle.js) ---------- */
/* everything fits ONE viewport — no scrolling mid-battle */
.bt-overlay { position: fixed; inset: 0; z-index: 320; background: radial-gradient(circle at 50% 30%, #232030, #0d0c12 70%);
  display: flex; flex-direction: column; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  color: #fff; overflow: hidden; height: 100dvh; }
.bt-overlay .bt-row.foe-active, .bt-overlay .bt-row.you-active { flex: none; }
.bt-overlay .bt-mid { flex: none; }
.bt-overlay .bt-handbar { margin-top: auto; }

/* --- action animations (TCG-Pocket pacing) --- */
.bt-slot.anim-lunge-up { animation: btLungeUp .38s cubic-bezier(.4,0,.6,1); z-index: 4; }
.bt-slot.anim-lunge-down { animation: btLungeDown .38s cubic-bezier(.4,0,.6,1); z-index: 4; }
@keyframes btLungeUp { 45% { transform: translateY(-30px) scale(1.1) rotate(-2deg); } 100% { transform: none; } }
@keyframes btLungeDown { 45% { transform: translateY(30px) scale(1.1) rotate(2deg); } 100% { transform: none; } }
.bt-slot.anim-hit { animation: btHit .5s ease-out; }
.bt-slot.anim-hit::after { content: ''; position: absolute; inset: 0; border-radius: 8px; pointer-events: none;
  background: rgba(255,70,60,.45); animation: btHitFlash .5s ease-out forwards; }
@keyframes btHit { 15% { transform: translate(-7px, 2px) rotate(-3deg); } 35% { transform: translate(7px, -2px) rotate(3deg); }
  55% { transform: translate(-5px, 0) rotate(-2deg); } 75% { transform: translate(3px, 0); } 100% { transform: none; } }
@keyframes btHitFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
.bt-slot.anim-ko { animation: btKO .58s ease-in forwards; pointer-events: none; }
@keyframes btKO { 30% { transform: rotate(6deg); filter: none; }
  100% { transform: translateY(26px) rotate(14deg) scale(.86); opacity: 0; filter: grayscale(1) brightness(.6); } }
.bt-slot.anim-pulse::before { content: ''; position: absolute; inset: -5px; border-radius: 12px; pointer-events: none;
  border: 2.5px solid #ffd60a; animation: btPulseRing .7s ease-out forwards; z-index: 3; }
@keyframes btPulseRing { 0% { opacity: 1; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.18); } }
.bt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 5px; min-width: 0; }
.bt-pl { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.bt-pl img { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); flex: none; }
.bt-pl b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-pl span { font-size: 11px; font-weight: 700; opacity: .7; white-space: nowrap; }
/* the concede button NEVER leaves the screen — everything else shrinks first */
.bt-x { padding: 7px 14px; border-radius: 99px; background: rgba(255,255,255,.12); color: #fff; font-size: 12.5px; font-weight: 800; flex: none; }
@media (max-width: 480px) {
  .bt-x { padding: 6px 10px; font-size: 11.5px; }
  .bt-pl b { font-size: 12.5px; max-width: 22vw; }
  .bt-pl span { font-size: 10px; }
  .bt-piles { gap: 4px; }
  .bt-foehand { margin: 0 2px; }
  .bt-foehand i { width: 15px; height: 22px; margin-left: -8px; }
}
.bt-x:hover { background: rgba(255,69,58,.35); }
.bt-row { display: flex; justify-content: center; gap: 8px; padding: 2px 0; flex-wrap: nowrap; }
/* card sizes key off BOTH axes so the whole board always fits the screen */
.bt-row.foe-bench .bt-slot, .bt-row.you-bench .bt-slot { width: clamp(46px, min(10.5vw, 9.2vh), 78px); }
.bt-row.foe-active .bt-slot, .bt-row.you-active .bt-slot { width: clamp(78px, min(19vw, 15vh), 138px); }
.bt-slot { position: relative; border-radius: 7px; cursor: pointer; flex: none; transition: transform .2s var(--ease); }
.bt-slot:hover { transform: translateY(-3px); }
.bt-slot img { width: 100%; border-radius: 6px; display: block; box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.bt-slot.empty { display: grid; place-items: center; color: rgba(255,255,255,.25); font-weight: 800; min-height: 60px; cursor: default; }
.bt-hp { height: 4px; border-radius: 3px; background: rgba(255,255,255,.18); margin-top: 3px; overflow: hidden; }
.bt-hp i { display: block; height: 100%; background: linear-gradient(90deg, #34c759, #a3e635); border-radius: 3px; }
.bt-hpn { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.72); font-size: 8.5px; font-weight: 900;
  padding: 1px 5px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.bt-badges { position: absolute; top: 2px; left: 2px; display: flex; gap: 2px; }
.bt-cond { font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .3px; line-height: 1;
  padding: 2px 3px; border-radius: 4px; color: #fff; background: #444;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.bt-cond.c-asleep { background: #6366f1; }
.bt-cond.c-burned { background: #ef4444; }
.bt-cond.c-confused { background: #a855f7; }
.bt-cond.c-paralyzed { background: #eab308; color: #4a3a00; }
.bt-cond.c-poisoned { background: #10b981; }
.atk-flip { font-style: normal; font-size: 9px; font-weight: 800; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.bt-nrgrow { position: absolute; bottom: 6px; left: 4px; display: flex; gap: 2px; flex-wrap: wrap; max-width: 92%; }
/* TCG-Pocket-style energy token: a glossy coloured disc with the type glyph */
.bt-nrg { width: 15px; height: 15px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255,255,255,.85); box-shadow: 0 1px 3px rgba(0,0,0,.45), inset 0 1px 2px rgba(255,255,255,.5);
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.65), rgba(255,255,255,0) 55%), #cfccdb; }
.bt-nrg > span { font-size: 8px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.bt-nrg.sm { width: 13px; height: 13px; vertical-align: middle; }
.bt-nrg.sm > span { font-size: 7px; }
.bt-nrg.t-grass { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%), #4caf50; }
.bt-nrg.t-fire { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%), #f4511e; }
.bt-nrg.t-water { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%), #2196f3; }
.bt-nrg.t-lightning { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.7), rgba(255,255,255,0) 55%), #fdd835; }
.bt-nrg.t-psychic { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%), #ab47bc; }
.bt-nrg.t-fighting { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.55), rgba(255,255,255,0) 55%), #c0631f; }
.bt-nrg.t-darkness { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.4), rgba(255,255,255,0) 55%), #37474f; }
.bt-nrg.t-metal { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.7), rgba(255,255,255,0) 55%), #90a4ae; }
.bt-nrg.t-dragon { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%), #c9a227; }
.bt-nrg.t-fairy { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.7), rgba(255,255,255,0) 55%), #ec6ca8; }
.bt-nrg.t-colorless { background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.8), rgba(255,255,255,0) 55%), #dfe3e7; }
/* free attack — a faded grey ring meaning NO energy is required */
.bt-nrg.t-free { background: transparent; border: 1.5px dashed rgba(150,150,160,.7); box-shadow: none; opacity: .6; }
.bt-nrg.t-free span { color: rgba(150,150,160,.9); }
/* newest token slides up into place when Energy is attached */
.bt-slot.anim-pulse .bt-nrgrow .bt-nrg:last-child { animation: nrgIn .5s cubic-bezier(.2,.9,.3,1.3); }
@keyframes nrgIn { from { transform: translateY(22px) scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
.bt-mid { max-width: 640px; margin: 4px auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* (the battle log now lives as a right-side column — rules near the end of the file) */
.bt-atk { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 11px; text-align: left;
  background: rgba(255,255,255,.1); color: #fff; font-size: 12.5px; transition: background .2s; }
.bt-atk:hover { background: rgba(255,214,10,.25); }
.bt-atk.off { opacity: .38; }
.bt-atk b { flex: 1; font-size: 12.5px; }
.bt-atk em { font-style: normal; font-weight: 900; color: #ffd60a; }
.bt-actions .chip { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.bt-row.you-active { align-items: center; gap: 16px; }
.bt-handbar { margin-top: auto; padding-top: 8px; transition: transform .28s var(--ease, ease); }
.bt-hlabel { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; opacity: .7;
  display: flex; align-items: center; gap: 8px; }
/* hand collapse toggle — lets you drop the hand to a peek so the whole board,
   deck, discard and prizes are visible, then raise it back */
.bt-handtog { margin-left: auto; padding: 3px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .4px;
  text-transform: uppercase; cursor: pointer; z-index: 26; }
.bt-handtog:hover { background: rgba(255,255,255,.2); }
/* lowered: the whole hand bar slides down to a thin peek strip (its toggle + label
   stay reachable at the top edge); everything above is now clear */
.bt-overlay.hand-low .bt-handbar { transform: translateY(calc(100% - 42px)); }
.bt-overlay.hand-low .bt-hand { opacity: .55; }
.bt-hand { display: flex; gap: 7px; overflow: visible; padding: 5px 2px 2px; min-width: 0; } /* the hand NEVER scrolls — it crowds tighter instead */
.bt-hcard { width: clamp(56px, min(13vw, 10.2vh), 80px); flex: none; border-radius: 6px; position: relative; transition: transform .2s var(--ease); }
.bt-hcard img { width: 100%; border-radius: 5px; display: block; }
.bt-hcard span { display: block; font-size: 9px; font-weight: 800; color: rgba(255,255,255,.75); margin-top: 2px; text-align: center; }
.bt-hcard.sel { transform: translateY(-8px); outline: 2.5px solid #ffd60a; outline-offset: 2px; border-radius: 6px; }
.bt-hcard:hover { transform: translateY(-5px); }
body:has(.bt-overlay) .bottom-nav, body:has(.bt-overlay) .voltage-fab { display: none; } /* full attention on the match */

/* ---------- battle: TCG-Live-style playmat, zoom & damage popups ---------- */
.bt-overlay { background:
  radial-gradient(70% 46% at 50% -6%, rgba(120,80,200,.25), transparent 60%),
  radial-gradient(70% 46% at 50% 106%, rgba(60,120,220,.22), transparent 60%),
  radial-gradient(circle at 50% 50%, #262238, #0d0c12 75%); }
.bt-row.foe-bench, .bt-row.you-bench { padding: 5px 10px; border-radius: 14px; min-height: 56px;
  background: rgba(255,255,255,.045); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  width: min(560px, 96%); margin: 1px auto; }
.bt-row.foe-active, .bt-row.you-active { position: relative; }
.bt-row.foe-active .bt-slot, .bt-row.you-active .bt-slot { box-shadow: 0 0 0 2px rgba(255,214,10,.25), 0 10px 24px rgba(0,0,0,.5); border-radius: 8px; }
.bt-mid::before { content: ''; display: block; height: 1px; margin: 2px auto 6px; width: min(620px, 96%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); }
.bt-slot.pick { outline: 2.5px dashed #ffd60a; outline-offset: 3px; border-radius: 8px; animation: pulse 1.2s infinite; }
.bt-pop { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); z-index: 5; pointer-events: none;
  font-size: 19px; font-weight: 900; color: #ff5a4e; text-shadow: 0 2px 6px rgba(0,0,0,.7), 0 0 2px #000;
  animation: dmgPop 1.3s cubic-bezier(.2,.6,.3,1) forwards; }
.bt-pop.heal { color: #51e07d; }
.bt-pop.nrg { color: #ffd60a; font-size: 15px; }
@keyframes dmgPop {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.6); }
  18% { opacity: 1; transform: translate(-50%, -6px) scale(1.25); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1); }
}
.bt-zoom { position: fixed; inset: 0; z-index: 340; background: rgba(6,6,10,.82); backdrop-filter: blur(6px);
  display: grid; place-items: center; animation: veilIn .2s ease; }
.bt-zoom-in { display: flex; gap: 18px; align-items: flex-start; max-width: min(760px, 94vw); padding: 18px;
  flex-wrap: wrap; justify-content: center; position: relative; }
.bt-zoom-in img { width: min(330px, 72vw); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.bt-zoom-txt { flex: 1; min-width: 230px; max-width: 330px; color: #fff; font-size: 13px; line-height: 1.5;
  background: rgba(255,255,255,.07); border-radius: 14px; padding: 14px 16px; max-height: 70vh; overflow-y: auto; }
.bt-zoom-txt > b { font-size: 16px; }
.bt-zoom-txt > span { opacity: .7; font-weight: 700; font-size: 12px; margin-left: 6px; }
.bt-zoom-txt p { margin: 10px 0 0; }
.bt-zoom-txt em { color: #ffd60a; font-style: normal; font-weight: 900; }
.bt-zoom-txt .bz-ab { background: #c8102e; color: #fff; font-size: 9.5px; font-weight: 900; padding: 2px 7px;
  border-radius: 99px; font-style: normal; letter-spacing: .5px; }
.bt-zoom-txt .muted-z { opacity: .6; font-size: 11.5px; }
.bt-zoom-in .bt-x { position: absolute; top: 4px; right: 4px; }

/* ---------- Voltage: the card advisor ---------- */
.voltage-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 18px; z-index: 200;
  width: 54px; height: 54px; border-radius: 50%; color: #16151a;
  background: linear-gradient(135deg, #ffe25e, #ffc400 55%, #ff9500);
  box-shadow: 0 6px 22px rgba(255,180,0,.5), inset 0 0 0 2px rgba(255,255,255,.5);
  display: grid; place-items: center; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  animation: voltPulse 3.2s ease-in-out infinite; }
.voltage-fab svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(255,255,255,.5)); }
.voltage-fab:hover { transform: scale(1.1) rotate(-6deg); box-shadow: 0 10px 30px rgba(255,180,0,.65), inset 0 0 0 2px rgba(255,255,255,.6); }
@keyframes voltPulse { 50% { box-shadow: 0 6px 30px rgba(255,180,0,.75), inset 0 0 0 2px rgba(255,255,255,.5); } }
@media (max-width: 860px) { .voltage-fab { bottom: calc(84px + env(safe-area-inset-bottom)); } } /* rides above the hot bar */
.voltage-panel { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: 82px; z-index: 210;
  width: min(360px, calc(100vw - 28px)); max-height: min(520px, 72vh); display: flex; flex-direction: column;
  background: #fff; border-radius: 20px; box-shadow: 0 18px 60px rgba(0,0,0,.28);
  animation: vpIn .35s var(--ease); overflow: hidden; }
@media (max-width: 860px) { .voltage-panel { bottom: calc(148px + env(safe-area-inset-bottom)); } }
@keyframes vpIn { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.vp-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px;
  background: linear-gradient(120deg, #1d1d1f, #3a3444); color: #fff; }
.vp-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #ffe25e, #ff9500); color: #16151a; }
.vp-ava svg { width: 18px; height: 18px; }
.vp-head b { display: block; font-size: 15px; letter-spacing: -.2px; }
.vp-head span { font-size: 10.5px; font-weight: 700; opacity: .65; text-transform: uppercase; letter-spacing: .8px; }
.vp-close { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; color: #fff;
  background: rgba(255,255,255,.12); font-size: 13px; }
.vp-close:hover { background: rgba(255,255,255,.25); }
.vp-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.vp-msgs .bubble { font-size: 13.5px; }
.vp-msgs .bubble.volt { background: #fff7e0; border: 1px solid rgba(255,180,0,.25); }
.vp-msgs .vp-typing { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--ink-3);
  animation: pulse 1.2s infinite; }
.vp-in { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(0,0,0,.07); }
.vp-in input { flex: 1; border: 1.5px solid rgba(0,0,0,.12); border-radius: 12px; padding: 10px 12px;
  font-size: 14px; outline: none; font-family: var(--font); }
.vp-in input:focus { border-color: #ffc400; }
body:has(.rip-overlay.open) .voltage-fab, body:has(.cutscene) .voltage-fab { display: none; } /* out of the way mid-action */

/* ---------- Bottom nav (mobile) ---------- */
/* the hot bar rides above confetti & effects; overlays/modals (an action in
   progress) push it back down so they cover it */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 368; display: none;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(0,0,0,.07); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
  font-size: 9.5px; font-weight: 700; color: var(--ink-3); padding: 6px 0; border-radius: 12px; transition: color .25s; }
.bottom-nav button .bn-ico { font-size: 20px; line-height: 1; transition: transform .3s var(--ease); }
.bottom-nav button.active { color: var(--accent); }
.bottom-nav button.active .bn-ico { transform: translateY(-2px) scale(1.12); }
.bottom-nav { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .bottom-nav { display: flex; }
  main { padding-bottom: 130px; }
  .trade-cols { grid-template-columns: 1fr; }
  .trade-side + .trade-side { border-left: none; border-top: 1px solid rgba(0,0,0,.06); }
  .p-stats { margin-left: 0; }
  .rip-cards { flex-wrap: wrap; row-gap: 36px; }
  .rcard, .rip-cards.wrap .rcard { width: clamp(76px, 21vw, 110px); }
  .rcard .tag { bottom: -24px; }
}

body:has(.rip-overlay.open) .bottom-nav,
body:has(.modal-veil.open) .bottom-nav,
body:has(.cutscene) .bottom-nav { z-index: 120; } /* action in progress — bar steps back */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    /* animation-iteration-count:1 is the load-bearing line: without it an `... infinite`
       keyframe at .01ms doesn't STOP — it cycles sub-frame forever, resampling an aliased
       value every frame → a per-frame repaint that FLICKERS instead of freezing. Keeping the
       .01ms duration (not `animation:none`) lets `forwards` end-states still resolve. */
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
    /* the GPU-expensive bits the old block left fully active on weak/battery-saver phones */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    will-change: auto !important;
  }
  /* blur removed above → keep the always-on chrome legible with a near-opaque backing */
  .nav { background: rgba(255,255,255,.97) !important; }
  .bottom-nav { background: rgba(255,255,255,.98) !important; }
  body.acc-midnight .nav { background: rgba(240,238,250,.98) !important; }
}

/* LITE MODE — auto-enabled on weak devices that do NOT set prefers-reduced-motion (a slow laptop
   with integrated graphics). Mirrors the reduced-motion reductions that actually cost frames —
   stops every `infinite` animation (iteration-count:1), removes the GPU-heavy backdrop blur and
   promoted layers — but KEEPS transitions so buttons/taps still feel responsive. */
html.lite *, html.lite *::before, html.lite *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  will-change: auto !important;
}
#liteToggle { font-size: 15px; line-height: 1; }
#liteToggle.active { color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); }
html.lite .nav { background: rgba(255,255,255,.97) !important; }
html.lite .bottom-nav { background: rgba(255,255,255,.98) !important; }
html.lite body.acc-midnight .nav { background: rgba(240,238,250,.98) !important; }

/* util */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }

/* ---------- iPhone / notch safe areas (fixed elements ignore body padding) ---------- */
.bottom-nav { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
.rip-overlay { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.toasts { right: max(16px, env(safe-area-inset-right)); }
@media (max-width: 860px) {
  /* iOS zooms the page when focusing inputs under 16px — that zoom is what
     leaves the layout panned with the left edge cut off */
  input, select, textarea { font-size: 16px !important; }
}

/* ---------- mobile top bar scales with the screen width ----------
   every element sizes off vw so the row always fits on one line — no overflow
   on narrow phones, full size again on wider ones */
@media (max-width: 640px) {
  .nav { padding: 8px clamp(8px, 2.5vw, 14px); gap: clamp(3px, 1.2vw, 8px); }
  .nav .logo { font-size: clamp(13px, 4.2vw, 19px); margin-right: 2px; gap: clamp(4px, 1.5vw, 8px); }
  .logo-ball { width: clamp(18px, 5.5vw, 26px); height: clamp(18px, 5.5vw, 26px); }
  .logo-ball::after { width: clamp(6px, 1.9vw, 9px); height: clamp(6px, 1.9vw, 9px); border-width: 2px; }
  .nav-right { gap: clamp(4px, 1.6vw, 10px); }
  .nav-right > .shop-btn { padding: 7px clamp(7px, 2.4vw, 14px); font-size: clamp(10.5px, 3.1vw, 13px); gap: 4px; }
  .shop-btn .sb-ico svg { width: clamp(12px, 3.4vw, 16px); height: clamp(12px, 3.4vw, 16px); }
  .lvl-pill { padding: 6px clamp(6px, 2vw, 11px); font-size: clamp(9.5px, 2.8vw, 12px); }
  .credit-pill { padding: 5px clamp(7px, 2.2vw, 12px) 5px clamp(5px, 1.6vw, 9px); font-size: clamp(10.5px, 3.1vw, 13px); gap: clamp(3px, 1.4vw, 6px); min-width: 0; }
  .credit-pill .coin { width: clamp(13px, 4vw, 18px); height: clamp(13px, 4vw, 18px); }
  .credit-pill .plus { width: clamp(12px, 3.6vw, 16px); height: clamp(12px, 3.6vw, 16px); font-size: clamp(9px, 2.8vw, 12px); }
  .credit-pill #creditAmt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24vw; }
  .icon-btn { width: clamp(28px, 8.4vw, 36px); height: clamp(28px, 8.4vw, 36px); }
  .icon-btn svg { width: clamp(14px, 4.4vw, 18px); height: clamp(14px, 4.4vw, 18px); }
  .avatar-btn { width: clamp(28px, 8.4vw, 36px); height: clamp(28px, 8.4vw, 36px); }
  .signin-btn { padding: 8px clamp(9px, 3vw, 16px); font-size: clamp(11px, 3.4vw, 14px); }
}
@media (max-width: 480px) {
  .nav { padding: 7px 5px; gap: 2px; }
  .nav .logo { font-size: 3.6vw; margin-right: 0; gap: 1vw; }
  .logo-ball { width: 5vw; height: 5vw; min-width: 17px; min-height: 17px; }
  .nav-right { gap: .9vw; }
  .nav-right > .shop-btn { padding: 6px 1.7vw; font-size: 2.9vw; }
  .credit-pill { padding: 5px 1.8vw 5px 1.4vw; font-size: 2.9vw; }
  .credit-pill .coin { width: 3.7vw; height: 3.7vw; min-width: 13px; min-height: 13px; }
  .credit-pill .plus { display: none; }        /* the pill itself still opens the shop */
  .credit-pill #creditAmt { max-width: 15vw; }
  .icon-btn, .avatar-btn { width: 7.4vw; height: 7.4vw; min-width: 25px; min-height: 25px; }
  .icon-btn svg { width: 3.9vw; height: 3.9vw; min-width: 13px; min-height: 13px; }
  .lvl-pill { padding: 5px 1.6vw; font-size: 2.6vw; }
}

/* ---------- pack opening: grip → rip → burst to life ---------- */
.rip-pack.tearing { animation: packGrip .3s ease-in-out !important; }
@keyframes packGrip {
  15% { transform: rotate(-2.6deg) scale(1.01); }
  35% { transform: rotate(2.8deg) scale(1.03); }
  55% { transform: rotate(-2.2deg) scale(1.04); }
  75% { transform: rotate(1.6deg) scale(1.05); }
  100% { transform: rotate(0) scale(1.05); }
}
.rip-pack.torn { animation: none; }
/* the seal PEELS: the corner lifts, the strip rolls back on itself (rotateX
   past 90° with a shrinking scaleY reads as foil curling into a tube), then
   the rolled-up strip tears free and drifts off, still spinning */
.rip-pack.torn .pk-top {
  transition: none;
  transform-origin: 6% 88%;
  animation: sealPeel .6s cubic-bezier(.4,.03,.42,1) forwards;
}
@keyframes sealPeel {
  0%   { transform: none; filter: none; opacity: 1; }
  12%  { transform: rotateZ(-2deg) rotateX(24deg); }
  17%  { transform: rotateZ(-1deg) rotateX(19deg); }        /* snag — the foil resists */
  32%  { transform: rotateZ(-6deg) rotateX(78deg) translateY(-6%) scaleY(.9); filter: brightness(1.2); }
  48%  { transform: rotateZ(-11deg) rotateX(168deg) translateY(-34%) scaleY(.62); filter: brightness(1.4); }
  64%  { transform: rotateZ(-19deg) rotateX(262deg) translate(-9%, -95%) scaleY(.44); filter: brightness(1.5); }
  82%  { transform: rotateZ(-33deg) rotateX(360deg) translate(-34%, -190%) scaleY(.36); opacity: .9; }
  100% { transform: rotateZ(-50deg) rotateX(452deg) translate(-66%, -300%) scaleY(.3); opacity: 0; filter: brightness(1.65); }
}
.rip-pack .pk-flash { position: absolute; left: 50%; top: 12%; width: 130%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.2); border-radius: 50%; pointer-events: none; opacity: 0; z-index: 4;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,214,10,.5) 40%, transparent 68%); }
.rip-pack.torn .pk-flash { animation: sealFlash .6s ease-out .55s; } /* fires as the roll tears free */
@keyframes sealFlash {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.2); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(2.4); }
}
/* the bag POPS open — swells, shudders, bursts bright and the cards erupt */
.rip-pack.gone { animation: packPop .5s cubic-bezier(.34,1.3,.5,1) forwards !important; pointer-events: none; }
@keyframes packPop {
  0%   { transform: scale(1); opacity: 1; }
  25%  { transform: scale(1.15) rotate(-2.5deg); }
  45%  { transform: scale(1.09) rotate(2deg); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; filter: brightness(1.7); }
}
/* NOTE: .rip-spark, never .spark — that class belongs to the charts' SVG */
.rip-spark { position: fixed; z-index: 360; width: 7px; height: 7px; border-radius: 2px; pointer-events: none;
  box-shadow: 0 0 10px rgba(255,214,10,.9); animation: sparkFly .8s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes sparkFly {
  20% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(300deg) scale(.15); opacity: 0; }
}
/* cards erupt from the popped bag: tight cluster at the mouth, arcing up
   and fanning outward with a little overshoot — an inviting burst */
.rip-cards.burst .rcard { animation: burstIn .8s cubic-bezier(.16,.9,.28,1.18) backwards; }
@keyframes burstIn {
  0%  { transform: translate(var(--bx, 0), var(--by, 16vh)) scale(.2) rotate(var(--rot, 0deg)); opacity: 0; }
  35% { opacity: 1; }
  62% { transform: translate(calc(var(--bx, 0) * .12), -30px) scale(1.07) rotate(calc(var(--rot, 0deg) * -.3)); }
  100% { transform: none; }
}

/* ---------- mailbox ---------- */
.icon-btn { position: relative; }
.mail-badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 900; display: grid; place-items: center;
  padding: 0 4px; border: 2px solid #fff; }
.mail-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,.07); }
.mail-row:last-child { border-bottom: none; }
.mail-row img { width: 56px; border-radius: 5px; flex: none; }
.mail-row .mr-info { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.mail-row .mr-amt { display: flex; align-items: center; gap: 5px; font-size: 14px; margin-top: 2px; flex-wrap: wrap; }
.mail-row .mr-actions { display: flex; flex-direction: column; gap: 6px; }

/* ---------- DMs, profiles & trade chat ---------- */
.chat-link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(0,0,0,.25); text-underline-offset: 2px; }
.chat-link:hover { color: var(--accent-2); }
.chat-head { display: flex; align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,.08); }
.chat-head img { width: 42px; height: 42px; border-radius: 50%; background: var(--bg); }
.chat-msgs { max-height: 44vh; min-height: 160px; overflow-y: auto; display: flex; flex-direction: column;
  gap: 7px; padding: 14px 2px; }
.bubble { max-width: 78%; align-self: flex-start; background: #eef0f4; border-radius: 16px 16px 16px 5px;
  padding: 9px 13px; font-size: 14px; line-height: 1.4; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 16px 16px 5px 16px; }
.bubble.typing { color: var(--ink-3); letter-spacing: 2px; animation: pulse 1.2s infinite; }
.bubble i { display: block; font-style: normal; font-size: 9.5px; opacity: .55; margin-top: 2px; text-align: right; }
.thread-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px;
  padding: 13px 16px; box-shadow: var(--shadow); margin-bottom: 10px; cursor: pointer;
  transition: transform .25s var(--ease); }
.thread-row:hover { transform: translateX(3px); }
.thread-row img { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); flex: none; }
.thread-row .tr-info { flex: 1; min-width: 0; font-size: 14.5px; }
.uprof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px;
  max-height: 48vh; overflow-y: auto; padding: 2px; }
.up-card { position: relative; border-radius: 10px; padding: 6px; background: var(--bg); }
.up-card img { width: 100%; border-radius: 5px; display: block; }
.trade-chat { border-top: 1px solid rgba(0,0,0,.06); }
.trade-chat .tc-msgs { display: flex; flex-direction: column; gap: 6px; padding: 14px 20px 10px;
  max-height: 180px; overflow-y: auto; }

/* ============ box contents (promo + accessory prices) ============ */
.box-contents { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.box-contents li { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.box-contents .bc-val { margin-left: auto; font-weight: 800; color: var(--ink); white-space: nowrap; }
.box-contents .bc-ico { width: 15px; height: 15px; display: inline-flex; color: var(--accent); }
.box-contents .bc-ico svg { width: 100%; height: 100%; }

/* ============ room creation form ============ */
.rf-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; flex-wrap: wrap; }
.rf-row > span { font-size: 12.5px; font-weight: 800; color: var(--ink-2); min-width: 92px; }
.rf-opts { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.rf-opts .chip { font-size: 12px; }

/* ============ persistent room HUD (roster + controls) ============ */
.room-hud { position: fixed; right: 16px; bottom: 84px; z-index: 620; width: 288px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1.5px solid rgba(0,0,0,.1); border-radius: 16px;
  box-shadow: 0 18px 46px rgba(0,0,0,.24); overflow: hidden; animation: rhIn .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rhIn { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.room-hud.mini .rh-body { display: none; }
.rh-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; }
.rh-title { font-size: 14px; font-weight: 900; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-code { font-size: 10.5px; font-weight: 800; opacity: .92; letter-spacing: .5px; display: flex; gap: 8px; }
.rh-timer { font-variant-numeric: tabular-nums; }
.rh-min { margin-left: auto; background: rgba(255,255,255,.25); border: 0; color: #fff; width: 24px; height: 24px;
  border-radius: 7px; font-size: 17px; font-weight: 800; cursor: pointer; line-height: 1; }
.rh-body { padding: 11px 13px 13px; }
.rh-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.rh-badge { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--bg); color: var(--ink-2); }
.rh-badge.rank { background: #fff4d6; color: #a6791a; }
.rh-badge.stake { background: #e8f9ec; color: #1a7a3a; }
.rh-badge.tourney { background: #efe6ff; color: #6b3fd0; }
.rh-pot { font-size: 12px; font-weight: 800; margin-top: 8px; padding: 7px 10px; border-radius: 10px;
  background: #fff4d6; color: #a6791a; }
.rh-hint { font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin: 8px 0; }
.rh-roster { display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow-y: auto; margin-top: 2px; }
.rh-mem { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 9px; background: var(--bg); }
.rh-mem.me { background: #eef4ff; }
.rh-mem img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #fff; flex-shrink: 0; }
.rh-name { font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.rh-name:hover { color: var(--accent); }
.rh-wl { font-size: 10px; font-weight: 800; color: var(--ink-2); }
.rh-stat { margin-left: auto; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.rh-stat.idle { color: var(--ink-2); background: rgba(0,0,0,.05); }
.rh-stat.q { color: #a6791a; background: #fff4d6; }
.rh-stat.busy { color: #b3402f; background: #ffe4de; }
.rh-mem .chip-xs { padding: 3px 7px; }
@media (max-width: 640px) {
  .room-hud { right: 8px; left: 8px; bottom: 74px; width: auto; }
}

/* ============ deck manager ============ */
.dm-list { display: flex; flex-direction: column; gap: 7px; max-height: 46vh; overflow-y: auto; }
.dm-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1.5px solid transparent; }
.dm-row.active { border-color: var(--accent); background: #eef4ff; }
.dm-badge { font-size: 9.5px; font-weight: 900; color: #fff; background: var(--accent); padding: 2px 6px; border-radius: 6px; vertical-align: middle; }

/* ============ battle animations (TCG-Pocket style) ============ */
/* type-coloured impact burst on the defender */
.bt-vfx { position: absolute; inset: 0; pointer-events: none; z-index: 6; display: grid; place-items: center; }
.bt-vfx i { position: absolute; width: 60%; height: 60%; border-radius: 50%; opacity: 0; }
.bt-vfx i:nth-child(1) { animation: vfxFlash .5s ease-out; }
.bt-vfx i:nth-child(2) { animation: vfxRing .6s ease-out; border: 3px solid; border-radius: 50%; background: none; }
.bt-vfx i:nth-child(3) { animation: vfxShards .55s ease-out; }
@keyframes vfxFlash { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes vfxRing { 0% { opacity: 1; transform: scale(.2); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes vfxShards { 0% { opacity: 1; transform: scale(.5) rotate(0); } 100% { opacity: 0; transform: scale(1.8) rotate(45deg); } }
.bt-vfx.t-fire i { background: radial-gradient(circle, #ffd24a, #f4511e 60%, transparent 72%); color: #f4511e; }
.bt-vfx.t-water i { background: radial-gradient(circle, #b3e5ff, #2196f3 60%, transparent 72%); color: #2196f3; }
.bt-vfx.t-grass i { background: radial-gradient(circle, #c6f68d, #4caf50 60%, transparent 72%); color: #4caf50; }
.bt-vfx.t-lightning i { background: radial-gradient(circle, #fff59d, #fdd835 60%, transparent 72%); color: #fbc02d; }
.bt-vfx.t-psychic i { background: radial-gradient(circle, #e1bee7, #ab47bc 60%, transparent 72%); color: #ab47bc; }
.bt-vfx.t-fighting i { background: radial-gradient(circle, #ffcc99, #c0631f 60%, transparent 72%); color: #c0631f; }
.bt-vfx.t-darkness i { background: radial-gradient(circle, #78909c, #263238 60%, transparent 72%); color: #455a64; }
.bt-vfx.t-metal i { background: radial-gradient(circle, #eceff1, #90a4ae 60%, transparent 72%); color: #90a4ae; }
.bt-vfx.t-dragon i { background: radial-gradient(circle, #ffe082, #c9a227 60%, transparent 72%); color: #c9a227; }
.bt-vfx.t-colorless i, .bt-vfx.t-fairy i { background: radial-gradient(circle, #fff, #cfd8dc 60%, transparent 72%); color: #cfd8dc; }

/* slam-in when a Pokémon is benched / evolves / promotes */
.bt-slot.anim-enter { animation: btEnter .42s cubic-bezier(.2,.85,.3,1.4); }
@keyframes btEnter { 0% { transform: translateY(-26px) scale(1.35); opacity: .2; } 60% { transform: translateY(2px) scale(.96); } 100% { transform: none; opacity: 1; } }

/* coin flips */
.bt-coins { display: flex; gap: 8px; justify-content: center; margin-top: 6px; }
.bt-coin { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 900;
  color: #4a3a00; background: radial-gradient(circle at 34% 28%, #fff6c9, #f6c93b 60%, #c99700); border: 2px solid #fff2b0;
  box-shadow: 0 3px 8px rgba(0,0,0,.4); animation: coinFlip .7s cubic-bezier(.3,.7,.4,1) both; transform-style: preserve-3d; }
.bt-coin.tails { color: #6b1f1f; background: radial-gradient(circle at 34% 28%, #f3d0d0, #c98a8a 60%, #8a4a4a); }
@keyframes coinFlip { 0% { transform: rotateX(0) scale(.4); opacity: 0; } 55% { transform: rotateX(900deg) scale(1.15); opacity: 1; } 100% { transform: rotateX(1080deg) scale(1); opacity: 1; } }

/* deck pile + draw-into-hand */
.bt-handwrap { display: flex; align-items: flex-end; gap: 8px; }
.bt-deckpile { position: relative; width: 30px; height: 42px; flex-shrink: 0; align-self: center; }
.bt-deckpile i { position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(135deg, #2b6cb0, #1a365d);
  border: 1.5px solid rgba(255,255,255,.5); box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.bt-deckpile i:nth-child(1) { transform: translate(-3px,-3px) rotate(-4deg); }
.bt-deckpile i:nth-child(2) { transform: translate(-1px,-1.5px) rotate(-2deg); }
.bt-deckpile b { position: absolute; bottom: -3px; right: -4px; z-index: 2; font-size: 9px; font-weight: 900; color: #fff;
  background: #1d1d1f; border-radius: 8px; padding: 1px 4px; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.bt-deckpile.drawing i:nth-child(3) { animation: deckDraw .55s ease-out; }
@keyframes deckDraw { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(40px,-6px) scale(.9); opacity: 0; } }
.bt-hcard.bt-drawn { animation: handDraw .5s cubic-bezier(.2,.9,.3,1.2); }
@keyframes handDraw { 0% { transform: translateX(-46px) translateY(-8px) scale(.6) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* zoom viewer: two swipeable pages (card / attachments) */
.bz-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; max-width: min(760px, 94vw); scrollbar-width: none; }
.bz-pages::-webkit-scrollbar { display: none; }
.bz-page { flex: 0 0 100%; scroll-snap-align: start; display: flex; gap: 18px; align-items: flex-start; }
.bz-pages.has2 .bz-page { flex: 0 0 100%; }
.bz-attach { flex-direction: column; color: #fff; min-width: 0; padding: 4px 8px; }
.bz-attach h4 { margin: 0 0 8px; font-size: 15px; }
.bz-nrggrid { display: flex; flex-wrap: wrap; gap: 12px; }
.bz-nrgcell { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: #fff; }
.bz-nrgcell .bt-nrg { width: 34px; height: 34px; }
.bz-nrgcell .bt-nrg > span { font-size: 17px; }
.bz-swipe { text-align: center; color: rgba(255,255,255,.6); font-size: 11.5px; font-weight: 800; margin-top: 8px; }

/* ============ profile bio + presence ============ */
.p-bio-wrap { display: flex; align-items: center; gap: 10px; margin: 4px 0 20px; flex-wrap: wrap; }
.p-bio { flex: 1; min-width: 180px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); line-height: 1.5;
  background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.pres-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
  border: 1.5px solid var(--card); }
.pres-dot.on { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.25); }
.pres-dot.off { background: #b7b7c2; }

/* ============ league-themed page background ============ */
body[data-league]::after { content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .06;
  background-repeat: repeat; background-size: 130px 130px; }
body[data-league="pokeball"]::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cg fill='none' stroke='%23e8433f' stroke-width='4'%3E%3Ccircle cx='45' cy='45' r='30'/%3E%3Cline x1='15' y1='45' x2='75' y2='45'/%3E%3C/g%3E%3Ccircle cx='45' cy='45' r='9' fill='none' stroke='%23e8433f' stroke-width='4'/%3E%3C/svg%3E"); }
body[data-league="greatball"]::after { opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cg fill='none' stroke='%232a63c9' stroke-width='4'%3E%3Ccircle cx='45' cy='45' r='30'/%3E%3Cline x1='15' y1='45' x2='75' y2='45'/%3E%3Cpath d='M30 22l8 14M60 22l-8 14'/%3E%3C/g%3E%3C/svg%3E"); }
body[data-league="ultraball"]::after { opacity: .08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cg fill='none' stroke='%23d99e00' stroke-width='4'%3E%3Ccircle cx='45' cy='45' r='30'/%3E%3Cline x1='15' y1='45' x2='75' y2='45'/%3E%3C/g%3E%3Cpath d='M45 18l6 10-6 4-6-4z' fill='%23222'/%3E%3C/svg%3E"); }
body[data-league="masterball"]::after { opacity: .09; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cg fill='none' stroke='%238e44ad' stroke-width='4'%3E%3Ccircle cx='45' cy='45' r='30'/%3E%3Cline x1='15' y1='45' x2='75' y2='45'/%3E%3C/g%3E%3Ctext x='45' y='34' font-size='16' fill='%238e44ad' text-anchor='middle' font-weight='bold'%3EM%3C/text%3E%3C/svg%3E"); }

/* ============ friends search results ============ */
#frResults .thread-row { cursor: pointer; }

/* ============ admin danger zone (wipe gauntlet) ============ */
.ap-danger { border-top: 1px solid rgba(255,107,107,.2); }
.wipe-actions .wipe-yes { transition: left .12s, top .12s; }
.wipe-actions.evasive { border: 1.5px dashed rgba(255,255,255,.14); border-radius: 12px; }

/* ============ universal modal close (no more mobile traps) ============ */
.modal-x { position: absolute; top: 10px; right: 10px; z-index: 5; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: #111827; color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
  display: grid; place-items: center; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: background .15s, transform .1s; }
.modal-x:hover { background: #000; }
.modal-x:active { transform: scale(.9); }
@media (prefers-color-scheme: dark) { .modal-x { background: #111827; color: #fff; } }

/* ============ universal card zoom (nav + deck count circle) ============ */
.cz-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cz-nav { flex-shrink: 0; width: 40px; height: 56px; border: none; border-radius: 12px; cursor: pointer;
  background: #111827; color: #fff; font-size: 30px; font-weight: 800; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: background .15s, transform .1s; }
.cz-nav:hover { background: #000; }
.cz-nav:active { transform: scale(.92); }
.cz-card { position: relative; }
.cz-count { position: absolute; top: -10px; left: -10px; z-index: 4; min-width: 30px; height: 30px; padding: 0 7px;
  border-radius: 99px; background: #fff; color: #1d1d1f; border: 2.5px solid var(--accent);
  display: grid; place-items: center; font-size: 15px; font-weight: 900;
  box-shadow: 0 3px 10px rgba(0,0,0,.28); }
.cz-count.has { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .cz-nav { background: #111827; color: #fff; } }
@media (max-width: 480px) { .cz-nav { width: 34px; height: 48px; font-size: 26px; } }

/* ============ skeleton loading ============ */
.sk { position: relative; overflow: hidden; background: rgba(130,130,150,.14); border-radius: 12px; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: skShimmer 1.3s infinite; }
@keyframes skShimmer { 100% { transform: translateX(100%); } }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.sk-pack { aspect-ratio: 3/4; border-radius: 14px; }
.sk-line { height: 12px; border-radius: 6px; margin: 8px 0; }
@media (prefers-color-scheme: dark) { .sk { background: rgba(255,255,255,.08); } }

/* ============ battle overhaul: hands, piles, pops, arcs, shake ============ */
/* fanned enemy hand of card backs */
.bt-foehand { position: relative; display: flex; align-items: center; height: 38px; margin: 0 6px; }
.bt-foehand i { width: 20px; height: 29px; border-radius: 3.5px; margin-left: -9px; flex-shrink: 0;
  background: linear-gradient(150deg, #2b6cb0, #16305e); border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 1px 3px rgba(0,0,0,.45); transform: rotate(calc((var(--k) - 3.5) * 4deg)); }
.bt-foehand b { margin-left: 8px; font-size: 12.5px; font-weight: 900; color: #fff;
  background: rgba(0,0,0,.5); padding: 2px 8px; border-radius: 9px; }
/* deck + discard mini-piles (top) */
.bt-piles { display: flex; gap: 8px; }
.bt-pile { position: relative; width: 26px; height: 34px; cursor: default; }
.bt-pile.disc { cursor: pointer; }
.bt-pile i { position: absolute; inset: 0; border-radius: 4px; border: 1.4px solid rgba(255,255,255,.45); }
.bt-pile.deck i { background: linear-gradient(140deg, #2b6cb0, #16305e); }
.bt-pile.deck i:nth-child(2) { transform: translate(2px, 2px); opacity: .7; }
.bt-pile.disc i { background: linear-gradient(140deg, #4b5563, #1f2530); }
.bt-pile span { position: absolute; bottom: -3px; right: -4px; z-index: 2; font-size: 8.5px; font-weight: 900; color: #fff;
  background: #1d1d1f; border-radius: 8px; padding: 0 4px; }
.bt-pile.disc:hover { transform: scale(1.08); }
/* Lost Zone pile — a glyph badge with a count, appears only when it has cards */
.bt-pile.lost { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: auto; min-width: 26px; padding: 0 5px; height: 34px; border-radius: 8px; background: rgba(120, 70, 190, .28); border: 1px solid rgba(170, 120, 240, .5); color: #d9c2ff; font-size: 13px; font-weight: 800; cursor: pointer; }
.bt-pile.lost span { font-size: 11px; }
.bt-pile.lost:hover { transform: scale(1.08); }
/* your discard pile in the hand bar */
.bt-discpile { position: relative; width: 30px; height: 42px; flex-shrink: 0; align-self: center; cursor: pointer; }
.bt-discpile i { position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(140deg, #4b5563, #1f2530);
  border: 1.5px solid rgba(255,255,255,.4); box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.bt-discpile b { position: absolute; bottom: -3px; right: -4px; z-index: 2; font-size: 9px; font-weight: 900; color: #fff;
  background: #1d1d1f; border-radius: 8px; padding: 1px 4px; }
.bt-discpile:hover { transform: scale(1.06); }
.bt-deckpile { cursor: pointer; }
/* fanned / overlapping hand — spreads on hover (PC) */
/* TCG-Pocket hand: normal gaps while the row fits; overflowing hands overlap into a
   ROUNDED fan (each card rotates around a point far below → a natural arc). The
   hovered/selected card straightens and pops. Values persist between renders. */
.bt-hand.fan { padding: 0 var(--fanpad, 4px); } /* --fanpad reserves the end cards' sideways swing so they tilt into the padding, never over the deck/discard piles (set per-render in renderBT) */
.bt-hand.fan .bt-hcard { --c: calc(var(--i, 0) - (var(--n, 1) - 1) / 2);
  margin-left: var(--hovl, 7px); transition: transform .18s, margin .18s;
  transform: rotate(calc(var(--c) * var(--fanang, 0deg)));
  transform-origin: 50% 175%; } /* pivot just below the card → the rotation tilts the card without flinging it sideways over the piles (was 340%, which translated end cards ~60px into the piles) */
.bt-hand.fan .bt-hcard:first-child { margin-left: 0; }
/* the pop lives on the INNER image so the hitbox never moves — moving the card
   itself out from under the cursor un-hovered it and the hand jittered up/down */
.bt-hand.fan .bt-hcard:hover, .bt-hand.fan .bt-hcard.sel { z-index: 9; }
.bt-hand.fan .bt-hcard img { transition: transform .18s var(--ease), box-shadow .18s; transform-origin: 50% 80%; }
/* TOUCH: these elements own their gestures — without touch-action:none the browser
   claims any finger movement for scrolling and fires pointercancel, which killed
   drag-and-drop, bench drop highlights and hold-to-zoom on mobile entirely */
.bt-hcard, .bt-slot, .bt-handbar, .bt-row, .bt-hand, .bt-oncard { touch-action: none; }
/* prize cards: a natural face-down stack beside each side of the field */
.bt-prizes { position: absolute; left: 10px; z-index: 4; pointer-events: none; display: flex; flex-direction: column; }
.bt-prizes.foe { top: 64px; }
.bt-prizes.you { bottom: 170px; }
.bt-prize { width: 34px; aspect-ratio: 63/88; border-radius: 4px; margin-top: -34px;
  background: url('../img/packs/cardback.jpg') center/100% 100% no-repeat, #12306e;
  border: 1px solid rgba(255,255,255,.25); box-shadow: 0 3px 8px rgba(0,0,0,.45);
  transform: rotate(calc(var(--k, 0) * 1.6deg - 2deg)); }
.bt-prizes .bt-prize:first-child { margin-top: 0; }
@media (max-width: 640px) { .bt-prize { width: 26px; margin-top: -27px; } .bt-prizes.you { bottom: 152px; } }
/* the foe drew a card — their fanned hand pulses so the draw is visible cross-table */
.bt-foehand.drawing i:last-of-type { animation: foeDraw .7s var(--ease); }
@keyframes foeDraw { 0% { transform: translateY(-16px) scale(.5); opacity: 0; } 100% { transform: none; opacity: 1; } }
.bt-hcard img, .bt-slot img { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.bt-hand.fan .bt-hcard:hover img, .bt-hand.fan .bt-hcard.sel img {
  transform: translateY(-14px) scale(1.45); box-shadow: 0 10px 26px rgba(0,0,0,.65); }
.bt-hcard.bt-dragging { opacity: .25; }
.bt-hcard.bt-landing { opacity: 0; } /* a card mid-flight from the deck hides until touchdown */

/* ============ battle: drag-to-play (TCG-Pocket gesture) ============ */
.bt-dragghost { position: fixed; left: 0; top: 0; z-index: 400; width: 84px; pointer-events: none; will-change: transform; }
.bt-dragghost img { width: 100%; border-radius: 7px; box-shadow: 0 18px 44px rgba(0,0,0,.65); }
.bt-overlay.bt-dragmode .bt-slot { transition: box-shadow .15s; }
.bt-slot.bt-dropok { outline: 2.5px dashed #7cc8ff; outline-offset: 2px; box-shadow: 0 0 18px 4px rgba(80,170,255,.5); border-radius: 8px; }
.bt-row.you-bench.bt-dropok { outline: 2.5px dashed #7cc8ff; outline-offset: -2px; box-shadow: inset 0 0 22px rgba(80,170,255,.25); }
.bt-overlay.drop-any::after { content: ''; position: absolute; inset: 6% 4% 24% 4%; border: 2.5px dashed rgba(255,214,10,.65);
  border-radius: 18px; pointer-events: none; animation: benchPulse 1.1s ease-in-out infinite; }

/* ============ battle: options ON the active card (hover / tap) ============ */
.bt-slot.has-oncard { cursor: pointer; }
.bt-oncard { display: none; position: absolute; left: 50%; top: 101%; transform: translateX(-50%); width: 175%;
  z-index: 6; flex-direction: column; gap: 4px; padding: 6px; border-radius: 10px;
  background: rgba(10,10,16,.92); box-shadow: 0 14px 34px rgba(0,0,0,.6); }
.bt-slot.has-oncard:hover, .bt-slot.has-oncard.show { transform: scale(1.6) translateY(-9%); z-index: 30; }
.bt-slot.has-oncard:hover .bt-oncard, .bt-slot.has-oncard.show .bt-oncard { display: flex; }
/* bench sits at the bottom of the board, so its hover panel opens UPWARD */
.bt-oncard-bench { top: auto; bottom: 103%; }
.bt-slot.has-oncard:hover img, .bt-slot.has-oncard.show img { box-shadow: 0 18px 44px rgba(0,0,0,.7); }
.bt-oatk { display: block; width: 100%; padding: 4px 7px; border-radius: 7px;
  background: rgba(255,255,255,.1); color: #fff; text-align: left; font-size: 8.5px; }
.bt-oatk-row { display: flex; align-items: center; gap: 5px; }
.bt-oatk b { flex: 1; font-size: 9px; }
.bt-oatk em { font-style: normal; font-weight: 900; font-size: 10px; color: #ffd60a; }
.bt-oatk-fx { display: block; margin-top: 2px; font-size: 7.5px; line-height: 1.35; font-weight: 600;
  color: rgba(255,255,255,.75); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bt-oatk:hover { background: rgba(255,214,10,.25); }
.bt-oatk.off { opacity: .38; pointer-events: none; }
.bt-oncard-foot { display: flex; justify-content: center; gap: 5px; }
.bt-oncard-foot .chip.off { opacity: .38; pointer-events: none; }

/* ============ battle: log on the RIGHT + centre prompts + end-turn fab ============ */
.bt-log { position: absolute; right: 5px; top: 13%; width: clamp(108px, 22vw, 185px); max-height: 52%;
  overflow: hidden; display: flex; flex-direction: column; gap: 4px; z-index: 4; pointer-events: none; }
.bt-log > div { background: rgba(8,8,14,.72); border-radius: 8px; padding: 5px 7px; font-size: 10px;
  line-height: 1.35; color: #fff; }
.bt-log > div.old { opacity: .55; font-size: 9.5px; }
.bt-prompt { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto; padding: 6px 14px; border-radius: 99px;
  background: rgba(255,214,10,.16); color: #ffd60a; font-weight: 800; font-size: 12.5px;
  box-shadow: 0 0 0 1.5px rgba(255,214,10,.5); animation: benchPulse 1.2s ease-in-out infinite; }
.bt-think { margin: 0 auto; color: rgba(255,255,255,.6); font-size: 12px; font-weight: 700; }
.bt-endfab { position: absolute; right: 10px; bottom: clamp(120px, 22vh, 190px); z-index: 25;
  padding: 9px 16px; border-radius: 99px; background: linear-gradient(135deg, #ffd60a, #ff9f0a); color: #4a3a00;
  font-weight: 900; font-size: 12.5px; box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.bt-endfab:hover { filter: brightness(1.08); }
/* ---- setup phase (TCG-Pocket style opening placement) ---- */
.bt-setup { display: flex; flex-direction: column; align-items: center; gap: 5px; }
/* the Start button lives IN the setup panel — a corner fab sat exactly on bench
   slots 4-5 at phone widths and stole their taps */
.bt-setupgo { margin-top: 3px; padding: 8px 22px; border-radius: 99px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #ffd60a, #ff9f0a); color: #4a3a00; font-weight: 900; font-size: 12.5px;
  box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.bt-setupgo:hover { filter: brightness(1.08); }
.bt-setupgo[disabled] { opacity: .45; filter: grayscale(.5); cursor: not-allowed; }
.bt-prompt.setup { animation: none; } /* the countdown provides the urgency — a pulsing pill for 60s is noise */
#btSetupClock { min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; color: #fff; font-weight: 900; }
#btSetupClock.low { color: #ff453a; animation: benchPulse .9s ease-in-out infinite; }
.bt-setuptrack { width: min(300px, 64vw); height: 4px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.bt-setuptrack i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #ffd60a, #ff9f0a); transition: width 1s linear; }
.bt-slot.empty.setup-spot { aspect-ratio: 63/88; border: 2px dashed rgba(255,214,10,.75); border-radius: 8px;
  background: rgba(255,214,10,.08); color: rgba(255,224,130,.95); cursor: pointer;
  display: grid; place-items: center; align-content: center; gap: 2px;
  font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  animation: benchPulse 1.2s ease-in-out infinite; }
.bt-slot.empty.setup-spot small { font-size: 8.5px; opacity: .7; font-weight: 700; text-transform: none; letter-spacing: 0; }
.bt-slot.facedown { cursor: default; }
.bt-slot.facedown img { border-radius: 7px; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.bt-revealing .bt-slot[data-side="foe"] img,
.bt-revealing .bt-slot[data-side="you"] img { animation: btflipin .65s var(--ease) both; } /* spectators see both boards flip */
@keyframes btflipin { from { transform: rotateY(90deg); filter: brightness(1.9); } to { transform: rotateY(0deg); } }
/* drawn card: deck → centre zoom (read it) → glides into the hand */
.bt-drawfly { position: fixed; z-index: 360; pointer-events: none; will-change: transform;
  transition: transform .5s cubic-bezier(.25,.85,.3,1); }
.bt-drawfly img { width: 100%; border-radius: 7px; box-shadow: 0 16px 44px rgba(0,0,0,.65); display: block; }
.bt-drawfly.tohand { transition: transform .4s cubic-bezier(.4,.1,.6,1); }
/* card pop (drawn / discarded) */
.bt-cardpop { position: absolute; left: 50%; top: 50%; z-index: 40; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
  animation: btPop 1.15s cubic-bezier(.2,.8,.3,1) forwards; }
.bt-cardpop img { width: min(120px, 26vw); border-radius: 9px; box-shadow: 0 14px 40px rgba(0,0,0,.6); }
.bt-cardpop span { font-size: 12px; font-weight: 800; color: #fff; background: rgba(0,0,0,.6); padding: 3px 10px; border-radius: 99px; }
.bt-cardpop.discard img { filter: grayscale(.3) brightness(.85); }
@keyframes btPop { 0% { transform: translate(-50%,-30%) scale(.5); opacity: 0; } 18% { transform: translate(-50%,-55%) scale(1.05); opacity: 1; }
  72% { transform: translate(-50%,-55%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-72%) scale(.85); opacity: 0; } }
/* zoom card-only (no side text) */
.bz-cardonly { justify-content: center; }
.bz-cardonly img { width: min(360px, 82vw); }
/* energy-attach electric arcs (type-coloured) */
.bt-arcs { position: absolute; inset: -6px; pointer-events: none; z-index: 7; }
.bt-arcs i { position: absolute; width: 2px; height: 55%; left: 50%; top: 50%; transform-origin: top center;
  border-radius: 2px; opacity: 0; animation: btArc .55s ease-out; background: currentColor;
  box-shadow: 0 0 6px 1px currentColor; }
.bt-arcs i:nth-child(1) { transform: rotate(20deg); animation-delay: 0s; }
.bt-arcs i:nth-child(2) { transform: rotate(110deg); animation-delay: .06s; }
.bt-arcs i:nth-child(3) { transform: rotate(200deg); animation-delay: .12s; }
.bt-arcs i:nth-child(4) { transform: rotate(290deg); animation-delay: .09s; }
@keyframes btArc { 0% { opacity: 0; height: 0; } 30% { opacity: 1; height: 55%; } 100% { opacity: 0; height: 62%; } }
.bt-arcs.t-lightning { color: #fdd835; } .bt-arcs.t-fire { color: #ff6a3d; } .bt-arcs.t-water { color: #4db6ff; }
.bt-arcs.t-grass { color: #66d36e; } .bt-arcs.t-psychic { color: #c86bd6; } .bt-arcs.t-fighting { color: #e08a3c; }
.bt-arcs.t-darkness { color: #7a8aa0; } .bt-arcs.t-metal { color: #c3ccd6; } .bt-arcs.t-dragon { color: #e6c34a; }
.bt-arcs.t-fairy { color: #ff9ecb; } .bt-arcs.t-colorless { color: #eaeef3; }
/* screen shake + rise-then-slam to active */
.bt-overlay.bt-shake { animation: btShake .4s cubic-bezier(.36,.07,.19,.97); }
@keyframes btShake { 10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(3px); }
  30%,50%,70% { transform: translateX(-5px); } 40%,60% { transform: translateX(5px); } }
.bt-slot.active.anim-enter { animation: btRiseSlam .5s cubic-bezier(.2,.7,.25,1.5); }
@keyframes btRiseSlam { 0% { transform: translateY(-40px) scale(1.25); opacity: .3; }
  45% { transform: translateY(-40px) scale(1.15); opacity: 1; } 75% { transform: translateY(6px) scale(.94); }
  100% { transform: none; opacity: 1; } }
/* stronger, type-flavoured impact VFX */
.bt-vfx { z-index: 8; }
.bt-vfx i { width: 100%; height: 100%; }
.bt-vfx i:nth-child(1) { animation-duration: .6s; }
/* KO: jump + 90° rotate, then fall into discard */
.bt-slot.anim-ko { animation: btKOspin .6s cubic-bezier(.3,.1,.5,1) forwards; z-index: 9; }
@keyframes btKOspin { 0% { transform: none; } 35% { transform: translateY(-30px) rotate(90deg) scale(1.05); }
  60% { transform: translateY(-10px) rotate(90deg); } 100% { transform: translateY(70px) rotate(0) scale(.75); opacity: 0; } }

/* ============ battle: tap-to-place highlights ============ */
.bt-slot.can-bench { border: 2px dashed rgba(120,200,255,.85); background: rgba(80,170,255,.14);
  color: rgba(180,225,255,.9); font-size: 26px; font-weight: 800; cursor: pointer;
  display: grid; place-items: center; animation: benchPulse 1.1s ease-in-out infinite; }
@keyframes benchPulse { 50% { background: rgba(80,170,255,.28); border-color: #7cc8ff; } }
.bt-slot.can-evolve { outline: 3px solid #ffd60a; outline-offset: -1px; cursor: pointer;
  box-shadow: 0 0 16px 3px rgba(255,214,10,.65); animation: evoPulse 1s ease-in-out infinite; }
@keyframes evoPulse { 50% { box-shadow: 0 0 22px 6px rgba(255,214,10,.9); } }

/* ============ battle: Trainer card resolving beside the active ============ */
.bt-trainer-play { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 12;
  display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none;
  animation: trainerLay .35s cubic-bezier(.2,.8,.3,1.2); }
.bt-trainer-play img { width: clamp(46px, 9vw, 74px); border-radius: 6px; box-shadow: 0 8px 22px rgba(0,0,0,.55);
  transform: rotate(4deg); }
.bt-trainer-play span { font-size: 9px; font-weight: 900; color: #fff; background: rgba(200,16,46,.9);
  padding: 1px 6px; border-radius: 6px; letter-spacing: .3px; }
@keyframes trainerLay { 0% { transform: translateY(-50%) translateX(40px) rotate(20deg); opacity: 0; }
  100% { transform: translateY(-50%) translateX(0) rotate(0); opacity: 1; } }

/* ============ battle: card flight (nothing teleports) ============ */
.bt-fly { position: fixed; z-index: 350; pointer-events: none; will-change: transform;
  transition: transform .48s cubic-bezier(.3,.75,.35,1); }
.bt-fly img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px;
  box-shadow: 0 12px 34px rgba(0,0,0,.55); transition: opacity .3s .12s, border-radius .3s; }
/* energy flight: the card melts into a glowing orb mid-air */
.bt-fly.ball .orb { position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity .25s .1s;
  background: radial-gradient(circle at 35% 30%, #fff, var(--fly-c, #cfd4dc) 55%, color-mix(in srgb, var(--fly-c, #cfd4dc) 55%, #000) 100%);
  box-shadow: 0 0 18px 4px var(--fly-c, #cfd4dc); }
.bt-fly.ball.go img { opacity: 0; border-radius: 50%; }
.bt-fly.ball.go .orb { opacity: 1; }
.bt-fly.t-fire { --fly-c: #ff9d55; } .bt-fly.t-water { --fly-c: #4fc3f7; } .bt-fly.t-grass { --fly-c: #7ed957; }
.bt-fly.t-lightning { --fly-c: #ffd60a; } .bt-fly.t-psychic { --fly-c: #c084fc; } .bt-fly.t-fighting { --fly-c: #d9822b; }
.bt-fly.t-darkness { --fly-c: #6b7280; } .bt-fly.t-metal { --fly-c: #b9c2cf; } .bt-fly.t-fairy { --fly-c: #f9a8d4; }
.bt-fly.t-dragon { --fly-c: #ffca3a; } .bt-fly.t-colorless { --fly-c: #e5e7eb; }
/* while a card is inbound, its landing spot (slot OR trainer-lay) hides the art +
   holds its slam until touchdown */
.bt-landing { animation: none !important; }
.bt-landing > img { opacity: 0; }
.bt-land > img { animation: btLand .22s ease-out; }
@keyframes btLand { 0% { transform: scale(1.16); filter: brightness(1.5); } 100% { transform: scale(1); filter: none; } }

/* stadium in play — small card + name in the mid arena (follows .bt-trainer-play) */
.bt-stadium { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 5px 9px 5px 5px; border-radius: 12px; background: rgba(20, 22, 40, .72); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.bt-stadium > img { width: 34px; height: 47px; border-radius: 5px; object-fit: cover; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.bt-stadium-info { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.bt-stadium-info > span { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; font-weight: 700; }
.bt-stadium-info > b { font-size: 12px; font-weight: 700; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-stadium-info > .chip { margin-top: 2px; align-self: flex-start; }
