:root {
  color-scheme:dark;
  --bg-stage:#05050b; --bg-app:#06070A; --surface-1:#111319; --surface-2:#181B23; --surface-3:#222632;
  --border-subtle:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.15);
  --ink-primary:#FFFFFF; --ink-secondary:#9CA3AF; --ink-dim:#6B7280;
  --brand-green:#22D366; --brand-green-dark:#072914;
  --theme:#FF5A1F; --pearl:linear-gradient(92deg,#FFF3AE 0%,#FFD572 28%,#FF9CE3 58%,#A78BFA 88%,#C4B5FD 100%);
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  font:15px/1.45 var(--sans); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
:root,[data-rarity="Common"],[data-rarity="Unknown"] { --rc:#94A3B8; --rc-soft:rgba(148,163,184,.14); --rc-border:rgba(148,163,184,.34); }
[data-rarity="Grail"] { --rc:#FFB020; --rc-soft:rgba(255,176,32,.22); --rc-border:rgba(255,176,32,.72); }
[data-rarity="Secret"] { --rc:#FF7A2F; --rc-soft:rgba(255,122,47,.22); --rc-border:rgba(255,122,47,.70); }
[data-rarity="Ultra"] { --rc:#B25CFF; --rc-soft:rgba(178,92,255,.24); --rc-border:rgba(178,92,255,.70); }
[data-rarity="Rare"] { --rc:#38BDF8; --rc-soft:rgba(56,189,248,.20); --rc-border:rgba(56,189,248,.62); }
*,*::before,*::after { box-sizing:border-box; }
html,body { margin:0; width:100%; height:100%; overflow:hidden; overscroll-behavior:none; }
body { display:grid; place-items:center; isolation:isolate; background:var(--bg-stage); color:var(--ink-primary); }
button,input,textarea,select { font:inherit; color:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { appearance:none; background:none; border:none; padding:0; cursor:pointer; touch-action:manipulation; }
button:disabled { cursor:not-allowed; opacity:.46; }
button:focus-visible,a:focus-visible,select:focus-visible { outline:2px solid rgba(167,139,250,.78); outline-offset:2px; }
input:focus-visible,textarea:focus-visible { outline:none; border-color:#8b78b8; box-shadow:0 0 0 3px rgba(139,120,184,.22); }
a { color:var(--brand-green); text-underline-offset:3px; }
[hidden] { display:none!important; }
svg,img { display:block; max-width:100%; }
.ui-icon,.rarity-gem { flex:none; }
.rarity-gem { color:var(--rc); }
h1,h2,h3,h4,p,dl,ol,ul { margin:0; }
h1,h2,h3,h4 { line-height:1.13; letter-spacing:-.035em; }
h1 { font-size:30px; } h2 { font-size:23px; } h3 { font-size:17px; }
b,strong,time,button,.price,output { font-variant-numeric:tabular-nums; }
small,.fineprint { font-size:12px; } .fineprint,.muted { color:var(--ink-secondary); }
.art-pack { height:auto; object-fit:contain; user-select:none; -webkit-user-drag:none; }
.art-card { width:100%; height:auto; display:block; }
.app-shell {
  position:relative; isolation:isolate; display:grid; grid-template-rows:calc(52px + env(safe-area-inset-top,0px)) minmax(0,1fr) calc(60px + env(safe-area-inset-bottom,0px));
  background:var(--bg-app); width:100%; height:100vh; height:100dvh; min-width:0; overflow:hidden;
}
.site-header,.mobile-nav { min-width:0; z-index:2; }
.site-header { display:flex; justify-content:space-between; align-items:center; width:100%; max-width:780px; margin:0 auto; padding:env(safe-area-inset-top,0px) 18px 0; background:transparent; }
.brand,.wallet-chip { display:inline-flex; align-items:center; }
.brand { gap:8px; min-height:44px; color:#f7eddb; font-size:15px; font-weight:800; letter-spacing:.08em; }
.brand img { width:auto; height:24px; }
.app-shell[data-page=pack] {
  --sky-top:#E87D1E; --sky-mid:#A13408; --sky-edge:#3A1206; --sky-dark:#07060F;
  background:#05050B;
}
.app-shell[data-page=pack][data-active-pack=starter] { --sky-top:#EB7E1C; --sky-mid:#A43708; --sky-edge:#3C1306; --sky-dark:#07060F; }
.app-shell[data-page=pack][data-active-pack=standard] { --sky-top:#269BFF; --sky-mid:#1450CA; --sky-edge:#0B1E52; --sky-dark:#060711; }
.app-shell[data-page=pack][data-active-pack=premium] { --sky-top:#B86BFF; --sky-mid:#6D24B8; --sky-edge:#2B0E54; --sky-dark:#070511; }
.app-shell[data-page=pack][data-active-pack=collector] { --sky-top:#F0B82B; --sky-mid:#A86609; --sky-edge:#3F2305; --sky-dark:#08060D; }
.app-shell[data-page=pack]::before {
  --diag-angle:158deg;
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:
    linear-gradient(180deg,rgba(6,7,14,.36) 0%,rgba(6,7,14,0) 15%),
    radial-gradient(ellipse 96% 42% at 50% 6%,color-mix(in srgb,var(--sky-top) 78%,transparent) 0%,transparent 72%),
    linear-gradient(var(--diag-angle),var(--sky-top) 0%,var(--sky-mid) 25%,var(--sky-edge) 47%,var(--sky-dark) 56%,#05050B 82%);
  transition:background .35s ease;
}
@media (max-width:639px) {
  .app-shell[data-page=pack]::before { --diag-angle:142deg; }
}
.app-shell[data-page=pack]::after {
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(ellipse 84% 38% at 50% 42%,color-mix(in srgb,var(--sky-top) 24%,transparent) 0%,transparent 74%);
}
.app-shell[data-page=pack] .site-header { background:transparent; }
.app-shell[data-page=pack] .brand { text-shadow:0 2px 12px rgba(0,0,0,.38); }
.app-shell[data-page=pack] .wallet-chip { background:rgba(8,9,16,.44); border-color:rgba(255,255,255,.22); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); }
.app-shell[data-page=pack] .main-content { z-index:1; }
.icon-btn { display:inline-grid; place-items:center; flex:none; border-radius:50%; }
.wallet-chip { height:34px; padding:0 5px 0 11px; gap:7px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius:99px; color:#f8f7fb; font-size:13px; font-weight:720; }
.wallet-coin { width:12px; height:12px; border-radius:50%; background:linear-gradient(130deg,#fff1b8,#e5af51 60%,#a66a24); box-shadow:inset 0 0 0 1px #e1b860,inset 0 0 0 2px #fff0ae86; }
.wallet-plus { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; color:#052010; background:#22D366; }
.wallet-plus svg,.vfx-wallet b svg { display:block; width:11px; height:11px; }
.main-content { position:relative; min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#30343c transparent; }
.main-content[data-page=pack] { overflow:hidden; }
.main-content:not([data-page=pack])>* { max-width:560px; margin-inline:auto; }
.main-content:focus,.modal-panel:focus { outline:none; }
.mobile-nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:stretch; width:100%; padding:0 max(0px,calc(50% - 360px)) env(safe-area-inset-bottom,0px); background:rgba(8,9,13,.96); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); border-top:1px solid rgba(255,255,255,.08); }
.nav-link { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; color:#787D8B; font-size:10.5px; font-weight:600; line-height:1.15; transition:color .16s ease; }
.nav-link:hover { color:#c7ccd8; }
.nav-link .ui-icon { width:21px; height:21px; }
.nav-link.active { color:#22D366; }
.nav-link.rip-nav .ui-icon { width:22px; height:22px; }
.nav-count { position:absolute; left:calc(50% + 7px); top:8px; min-width:15px; height:15px; border-radius:12px; background:var(--brand-green); color:var(--brand-green-dark); display:grid; place-items:center; padding:0 3px; border:1px solid var(--bg-app); font:720 9px/1 var(--sans); }
.nav-count.due-soon { background:#ff755f; color:#2b1010; }
.modal-backdrop { position:absolute; inset:0; z-index:10; display:flex; align-items:flex-end; justify-content:center; background:rgba(0,0,0,.62); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.modal-panel { position:relative; isolation:isolate; width:100%; max-width:100%; max-height:calc(100% - 18px); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#3b414b transparent; background:var(--surface-2); border:1px solid var(--border-subtle); border-bottom:0; border-radius:24px 24px 0 0; padding:31px 18px max(20px,env(safe-area-inset-bottom,0px)); box-shadow:0 -10px 56px #0006; }
.sheet-grip { position:absolute; top:10px; left:calc(50% - 20px); width:40px; height:4px; border-radius:10px; background:#484b52; }
.modal-close { position:absolute; top:16px; right:15px; width:34px; height:34px; z-index:3; color:#f3f4f6; background:var(--surface-3); border:1px solid var(--border-subtle); }
.modal-panel:not([data-modal="offer"]) .sheet-title { padding-right:34px; }
.modal-body { min-width:0; }
.modal-backdrop.full-screen { background:var(--bg-app); backdrop-filter:none; }
.full-screen .modal-panel { height:100%; max-height:100%; border:0; border-radius:0; padding:0; box-shadow:none; background:var(--bg-app); }
.full-screen .modal-body { height:100%; }
#toast { pointer-events:none; position:absolute; z-index:14; bottom:calc(78px + env(safe-area-inset-bottom,0px)); left:50%; width:max-content; max-width:calc(100% - 24px); transform:translateX(-50%); padding:8px 13px; background:#242a30f5; color:#f3f9f5; border:1px solid #4b5457; border-radius:14px; text-align:center; box-shadow:0 4px 20px #0006; font-size:12px; }
#toast:empty { display:none; }
.btn { display:inline-flex; justify-content:center; align-items:center; gap:7px; min-height:42px; padding:10px 15px; border:1px solid var(--border-strong); border-radius:12px; color:var(--ink-primary); font-size:14px; font-weight:700; text-align:center; text-decoration:none; }
/* Paint the entire pill from one gradient tile, including its rounded ends. */
.primary,.rip-purchase,.vfx-speed,.reveal-sell,.pulls-home {
  color:#0A0914; border:none; border-radius:999px; overflow:hidden;
  background-image:var(--pearl); background-repeat:no-repeat; background-size:100% 100%;
  background-origin:border-box; background-clip:border-box;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78),0 8px 26px rgba(255,146,206,.34);
}
.secondary { background:var(--surface-2); } .ghost { color:#c3c8cf; background:transparent; border-color:var(--border-subtle); }
.emerald { background:#22D366; color:#051F10; border:none; box-shadow:0 8px 22px rgba(34,211,102,.22); }
.btn:active:not(:disabled) { filter:brightness(.88); }
.eyebrow { display:inline-flex; align-items:center; gap:6px; color:var(--ink-secondary); font-size:10px; font-weight:750; letter-spacing:.11em; text-transform:uppercase; }
.button-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.sheet-title { margin-bottom:8px; line-height:1.12; font-size:24px; }
.modal-body>.sheet-title~.button-row,.modal-body>.sheet-title~.btn { margin-top:14px; }
.sheet-content { display:grid; gap:13px; }
.sheet-content p,.modal-body>p,.panel>p { color:var(--ink-secondary); }
.row-item { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 0; border-bottom:1px solid var(--border-subtle); font-size:14px; }
.row-item>span:first-child { color:var(--ink-secondary); }
.row-item>strong { text-align:right; }
.panel { padding:15px; border-radius:16px; background:var(--surface-1); border:1px solid var(--border-subtle); }
.form-grid,.field { display:grid; gap:7px; } .form-grid { gap:13px; margin-top:15px; }
.field>span,.payment-methods legend { color:var(--ink-secondary); font-weight:600; font-size:12px; }
input:not([type=checkbox]):not([type=radio]),select,textarea { width:100%; min-width:0; min-height:42px; background:var(--surface-2); border:1px solid var(--border-strong); border-radius:11px; padding:8px 12px; font-size:16px; }
input[type=checkbox],input[type=radio]{accent-color:var(--brand-green);}
.check-row,.payment-option { display:flex; align-items:center; gap:8px; }
.payment-methods { margin:0; padding:8px 0 0; border:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.payment-option { background:var(--surface-2); border:1px solid var(--border-subtle); border-radius:10px; min-height:42px; padding:6px 8px; font-size:13px; }
.payment-option:has(:checked){border-color:var(--brand-green);}
.pill { display:inline-flex; align-items:center; justify-content:center; border-radius:50px; background:var(--surface-2); color:var(--ink-primary); border:1px solid var(--border-subtle); padding:3px 8px; font-size:11px; }
.empty-state { display:grid; gap:7px; justify-items:start; padding:20px; border:1px solid var(--border-subtle); background:var(--surface-1); border-radius:14px; }
.empty-state .muted { font-size:13px; }
@media(min-width:640px){
  .modal-backdrop:not(.full-screen) { align-items:center; padding:24px; }
  .modal-backdrop:not(.full-screen) .modal-panel { max-width:460px; border-radius:24px; border-bottom:1px solid var(--border-subtle); padding-bottom:22px; }
  .modal-backdrop:not(.full-screen) .sheet-grip { display:none; }
}
@media(prefers-reduced-motion:no-preference){
  @keyframes sheet-in { from{ transform:translateY(25px); opacity:.55; } to{ transform:translateY(0); opacity:1; } }
  .modal-backdrop:not(.full-screen) .modal-panel { animation:sheet-in .19s ease-out; }
}
/* Shared holo surfaces for the card inspector and Rip. */
.holo-viewport { display:block; width:100%; height:100%; perspective:940px; }
.holo-viewport:not([data-holo-hover-only]) { touch-action:none; cursor:grab; }
.holo-viewport:not([data-holo-hover-only]):active { cursor:grabbing; }
.holo-card-3d {
  --rx:0deg; --ry:0deg; --gx:50%; --gy:50%; --glare-opacity:0; --foil-strength:.32; --hs:1;
  position:relative; display:block; width:100%; height:100%; border-radius:6% / 4.4%;
  transform:rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--hs)); transform-style:preserve-3d;
  transition:transform 420ms cubic-bezier(.16,1,.3,1),filter 260ms ease; will-change:transform;
}
.holo-card-3d.is-tilting { --hs:1.035; transition:transform 65ms linear,filter 160ms ease; }
.holo-card-3d:has(.holo-surface) { filter:drop-shadow(0 12px 24px rgba(0,0,0,.52)); }
.holo-card-3d.is-tilting:has(.holo-surface) {
  filter:drop-shadow(0 20px 32px rgba(0,0,0,.64)) drop-shadow(0 0 18px color-mix(in srgb,var(--holo-aura,#c4b5fd) 32%,transparent));
}
.holo-card-3d[data-rarity=Common] { --foil-strength:.20; --holo-aura:#cbd5e1; }
.holo-card-3d[data-rarity=Rare] { --foil-strength:.32; --holo-aura:#60a5fa; }
.holo-card-3d[data-rarity=Ultra] { --foil-strength:.42; --holo-aura:#c084fc; }
.holo-card-3d[data-rarity=Secret] { --foil-strength:.48; --holo-aura:#fb7185; }
.holo-card-3d[data-rarity=Grail] { --foil-strength:.56; --holo-aura:#fbbf24; }
.holo-surface { position:relative; display:block; width:100%; height:100%; border-radius:inherit; overflow:hidden; }
.holo-glare,.holo-foil { position:absolute; inset:0; pointer-events:none; border-radius:inherit; transition:opacity 240ms ease; }
.holo-card-3d.is-tilting .holo-glare,.holo-card-3d.is-tilting .holo-foil { transition:opacity 90ms linear; }
.holo-glare {
  opacity:calc(var(--glare-opacity,0) * .62);
  background:radial-gradient(circle at var(--gx,50%) var(--gy,50%),rgba(255,253,240,.88) 0%,rgba(255,250,232,.30) 26%,rgba(255,255,255,.06) 46%,transparent 68%);
  mix-blend-mode:overlay;
}
.holo-foil {
  opacity:calc(var(--glare-opacity,0) * var(--foil-strength,.32));
  background:linear-gradient(var(--foil-angle,125deg),transparent 14%,rgba(56,189,248,.52) 30%,rgba(192,132,252,.58) 46%,rgba(250,204,21,.64) 60%,rgba(52,211,153,.46) 74%,transparent 88%);
  background-size:230% 230%; background-position:var(--gx,50%) var(--gy,50%); mix-blend-mode:color-dodge;
}
.physical-flip { display:block; position:relative; width:100%; height:100%; transform-style:preserve-3d; transition:transform .48s cubic-bezier(.22,.8,.28,1); }
.physical-flip.is-flipped { transform:rotateY(180deg); }
.physical-flip .reveal-face { position:absolute; inset:0; display:block; overflow:hidden; border-radius:6% / 4.4%; backface-visibility:hidden; -webkit-backface-visibility:hidden; transform:translateZ(1px); }
.physical-flip svg,.holo-surface .art-card { height:100%; width:100%; display:block; }
.reveal-flip .holo-glare,.reveal-flip .holo-foil { border-radius:inherit; }
.reveal-flip.is-tilting:not(.is-dragging) { transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); transition:transform 80ms linear; }
.reveal-flip.is-tilting.is-flipped:not(.is-dragging) { transform:rotateX(var(--rx,0deg)) rotateY(calc(180deg + var(--ry,0deg))); transition:transform 80ms linear; }
.reveal-flip:not(.is-tilting):not(.is-dragging) { transition:transform 420ms cubic-bezier(.16,1,.3,1); }
@media (prefers-reduced-motion:reduce) {
  .holo-card-3d,.physical-flip { transition:none!important; }
  .holo-card-3d { transform:none!important; }
  .holo-glare,.holo-foil { display:none; }
}
