/* TCG Stockpile website: the fun parts · Shannon Cain */

/* ---------- nav extras: the Dex and the sound toggle */
.nav-fun { display: flex; gap: 6px; align-items: center; }
.dex-btn, .sound-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--bg-2); color: var(--navy); font: inherit; font-weight: 850; font-size: 14px; }
.dex-btn svg { width: 22px; height: 22px; }
.dex-btn.done { background: var(--yellow); }
.sound-btn { width: 40px; justify-content: center; padding: 0; }
.sound-btn svg { width: 20px; height: 20px; }
.sound-btn .on { display: none; } .sound-btn[aria-pressed="true"] .on { display: block; } .sound-btn[aria-pressed="true"] .off { display: none; }
@media (max-width: 420px) { .dex-btn span { display: none; } .sound-btn { display: none; } }

/* ---------- wild cards hiding in the grass */
.wild { position: absolute; z-index: 6; width: 92px; height: 64px; padding: 0; border: 0; background: none; cursor: pointer; left: var(--x, auto); right: var(--r, auto);
  top: var(--t, auto); bottom: var(--b, 8px); -webkit-tap-highlight-color: transparent; }
.wild svg { position: absolute; inset: auto 0 0 0; width: 100%; height: auto; filter: drop-shadow(0 4px 4px rgba(0,0,0,.15)); transform-origin: 50% 100%; }
.wild.rustle svg, .wild:hover svg { animation: rustle .7s ease-in-out; }
@keyframes rustle { 20% { transform: rotate(-6deg) scaleY(1.05); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
.wild-card { position: absolute; left: 50%; bottom: 14px; width: 58px; transform: translate(-50%, 30%) scale(.6); opacity: 0;
  transition: transform .55s cubic-bezier(.3,1.5,.5,1), opacity .25s; pointer-events: none; }
.wild-card img { width: 100%; border-radius: 4px; box-shadow: 0 10px 18px -6px rgba(0,0,0,.5); }
.wild.appeared .wild-card { transform: translate(-50%, -62%) scale(1); opacity: 1; }
.wild.caught { cursor: default; opacity: .55; }
.wild.caught svg { filter: grayscale(.3); }
.wild-got { position: absolute; right: 6px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 900; font-size: 13px;
  display: grid; place-items: center; }
.wild-bubble { position: absolute; z-index: 8; bottom: calc(100% + 64px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 240px; padding: 10px 14px; border-radius: 14px;
  background: #fff; color: var(--navy); font-weight: 800; font-size: 14.5px; text-align: center; box-shadow: inset 0 0 0 3px var(--navy-2), var(--shadow); animation: fx-pop-b .35s cubic-bezier(.3,1.5,.5,1) both; }
.wild[style*="--r"] .wild-bubble { left: auto; right: 0; transform: none; }
@keyframes fx-pop-b { from { opacity: 0; scale: .7; } }

/* ---------- the Dex */
.dex-dialog { border: 0; border-radius: 26px; padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow: auto; background: #fff; color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); }
.dex-dialog::backdrop { background: rgba(10, 16, 40, .66); backdrop-filter: blur(4px); }
.dex-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 24px 0; background: none; }
.dex-head h2 { font-size: 30px; }
.dex-x { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--bg-2); font-size: 26px; cursor: pointer; color: var(--navy); }
.dex-sub { margin: 8px 24px 16px; color: var(--ink-2); }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; padding: 0 24px 8px; }
.dex-slot { margin: 0; display: grid; gap: 6px; }
.dex-slot img, .dex-q { width: 100%; aspect-ratio: 600/825; border-radius: 6px; }
.dex-q { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #e9edf6 0 8px, #f4f7fe 8px 16px); color: #b6bed6; font-size: 40px; font-weight: 900;
  box-shadow: inset 0 0 0 2px #dfe4f0; }
.dex-slot figcaption { font-size: 12px; font-weight: 700; color: var(--ink-3); line-height: 1.3; }
.dex-slot.got figcaption { color: var(--navy); }
.dex-foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px 24px; }

/* ---------- feature cards: our own trading card design */
.binder-page { display: grid; gap: 22px; margin-top: 44px; grid-template-columns: repeat(3, minmax(0, 1fr)); perspective: 1400px; }
@media (max-width: 980px) { .binder-page { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .binder-page { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 6px 16px 24px; margin-inline: -16px; scrollbar-width: none; }
  .binder-page .appcard { flex: 0 0 74vw; scroll-snap-align: center; }
}
.appcard { --c1: #ffcb05; --c2: #ff9d00; --rx: 0deg; --ry: 0deg; --gx: 30%; --gy: 20%;
  position: relative; display: block; width: 100%; aspect-ratio: 63 / 88; padding: 0; border: 0; background: none; cursor: pointer; container-type: inline-size;
  transform-style: preserve-3d; perspective: 900px; text-align: left; font: inherit; color: var(--navy);
  opacity: 0; transform: translateY(40px) rotate(-4deg) scale(.92); transition: opacity .6s, transform .7s cubic-bezier(.2,.8,.2,1); }
.appcard.dealt { opacity: 1; transform: none; }
.ac-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); border-radius: 4.6% / 3.4%; box-shadow: 0 30px 50px -24px rgba(22,32,74,.55); }
.appcard.flipped .ac-inner { transform: rotateX(var(--rx)) rotateY(calc(180deg + var(--ry))); }
.ac-front, .ac-back { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.ac-front { padding: 3.6cqw; background: linear-gradient(160deg, var(--c1), var(--c2)); display: flex; flex-direction: column; }
.ac-front::before { content: ""; position: absolute; inset: 2.4cqw; border-radius: 3cqw; background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72)); }
.ac-front > * { position: relative; }
.ac-top { display: flex; align-items: center; gap: 2cqw; padding: 2.2cqw 2.6cqw 1.4cqw; }
.ac-top b { font-size: 7.4cqw; font-weight: 900; letter-spacing: -.02em; line-height: 1; flex: 1; }
.ac-hp { font-size: 6.6cqw; font-weight: 900; color: var(--red); } .ac-hp small { font-size: 3.6cqw; margin-right: .6cqw; }
.ac-type { width: 8cqw; height: 8cqw; border-radius: 50%; display: grid; place-items: center; background: var(--c2); box-shadow: inset 0 0 0 .6cqw rgba(255,255,255,.6); color: #fff; }
.ac-type svg { width: 5cqw; height: 5cqw; }
.ac-art { display: block; margin: 0 2.6cqw; flex: 1 1 auto; min-height: 40cqw; border-radius: 1.4cqw; overflow: hidden; box-shadow: 0 0 0 .9cqw #c9a227, 0 0 0 1.4cqw rgba(0,0,0,.18); background: #fff; }
.ac-art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 12%); display: block; }
.ac-strip { margin: 2.4cqw 2.6cqw 1.6cqw; padding: .8cqw 2cqw; border-radius: 99px; background: linear-gradient(90deg, #d4d9e2, #f3f5f9, #d4d9e2); font-size: 3.2cqw;
  font-weight: 750; text-align: center; color: #4a5470; font-style: italic; }
.ac-move { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2cqw; padding: 0 3.4cqw; }
.ac-cost { display: flex; gap: .8cqw; }
.ac-cost i { width: 5cqw; height: 5cqw; border-radius: 50%; background: var(--c2); box-shadow: inset 0 0 0 .5cqw rgba(255,255,255,.55); }
.ac-move b { font-size: 5.2cqw; font-weight: 900; }
.ac-move em { font-style: normal; font-size: 5cqw; font-weight: 900; }
.ac-desc { display: block; padding: .6cqw 3.4cqw 2cqw; font-size: 3.9cqw; min-height: 11cqw; line-height: 1.32; color: #2b3355; }
.ac-foot { display: flex; justify-content: space-between; gap: 2cqw; padding: 1.6cqw 3.4cqw; border-top: .4cqw solid rgba(22,32,74,.15); font-size: 3cqw; font-weight: 750; color: #4a5470; }
.ac-num { display: flex; justify-content: space-between; padding: 0 3.4cqw 1.2cqw; font-size: 2.8cqw; font-weight: 800; color: #4a5470; }
.ac-shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: color-dodge; opacity: .35; transition: opacity .3s;
  background: radial-gradient(farthest-corner circle at var(--gx) var(--gy), rgba(255,255,255,.75) 0%, rgba(255,255,255,.1) 25%, transparent 50%),
    repeating-linear-gradient(115deg, transparent 0 6%, rgba(255,240,120,.3) 9%, rgba(120,210,255,.3) 12%, rgba(255,140,220,.25) 15%, transparent 18%);
  background-size: 100% 100%, 240% 240%; background-position: center, var(--gx) var(--gy); }
.appcard:hover .ac-shine { opacity: .6; }
.ac-back { transform: rotateY(180deg); padding: 7cqw; display: flex; flex-direction: column; gap: 3cqw; color: #fff;
  background: radial-gradient(circle at 50% 38%, #2a4aa8 0%, #1c2e6b 45%, #121a3e 100%); box-shadow: inset 0 0 0 2.6cqw #0e1533, inset 0 0 0 3.2cqw #ffcb05; }
.ac-back img { width: 34cqw; margin: 2cqw auto 0; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.ac-back b { text-align: center; font-size: 6.4cqw; font-weight: 900; color: var(--yellow); }
.ac-back ul { margin: 0; padding-left: 5cqw; font-size: 3.9cqw; line-height: 1.38; color: #d9e3ff; display: grid; gap: 1.6cqw; }
.ac-back small { margin-top: auto; text-align: center; font-size: 3.2cqw; color: #9fb0e6; font-weight: 700; }
.appcard:focus-visible { outline: 4px solid var(--blue); outline-offset: 6px; border-radius: 16px; }
.t-electric { --c1: #ffe25c; --c2: #f2b300; } .t-fire { --c1: #ff9b6b; --c2: #e24a1f; } .t-grass { --c1: #9be38f; --c2: #2f9e44; }
.t-water { --c1: #8fd0ff; --c2: #2a75bb; } .t-psychic { --c1: #e2a7f5; --c2: #9b4fd1; } .t-steel { --c1: #e3e7ee; --c2: #8b95a8; }
.t-dark { --c1: #8f99b8; --c2: #3a4466; } .t-dragon { --c1: #ffd36b; --c2: #c27a00; } .t-fairy { --c1: #ffc6e4; --c2: #e7609f; }
.binder-hint { margin-top: 14px; color: var(--ink-3); font-weight: 650; font-size: 14.5px; }

/* ---------- living phones and screens */
.alive { --rx: 0deg; --ry: 0deg; transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.phone[data-screens] { position: relative; }
.phone[data-screens] img { position: absolute; inset: 11px; width: calc(100% - 22px); height: calc(100% - 22px); object-fit: cover; object-position: top; opacity: 0;
  transition: opacity .7s ease, transform 3.4s ease; transform: scale(1.02); }
.phone[data-screens] img:first-child { position: relative; inset: auto; width: 100%; height: auto; }
.phone[data-screens] img.on { opacity: 1; transform: none; }
.float { animation: float 6s ease-in-out infinite; }
.float.b { animation-delay: -3s; }
@keyframes float { 50% { translate: 0 -12px; } }
.popout { position: absolute; z-index: 4; width: var(--w, 120px); left: var(--x, auto); right: var(--r, auto); top: var(--t, auto); bottom: var(--b, auto);
  border-radius: 6px; box-shadow: 0 26px 40px -16px rgba(0,0,0,.55); transform: rotate(var(--rot, 8deg)); animation: float 5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.chip-float { position: absolute; z-index: 5; padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--navy); font-weight: 850; font-size: 15px; white-space: nowrap;
  box-shadow: var(--shadow); left: var(--x, auto); right: var(--r, auto); top: var(--t, auto); bottom: var(--b, auto); animation: float 5.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.chip-float b { color: var(--green); } .chip-float.red b { color: var(--red); } .chip-float.blue b { color: var(--blue); }
.chip-float small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.stage { position: relative; }
@supports (animation-timeline: view()) {
  .swing { animation: swing linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; transform-origin: 50% 100%; }
  @keyframes swing { from { transform: perspective(1400px) rotateX(28deg) scale(.9); opacity: .4; } to { transform: perspective(1400px) rotateX(0) scale(1); opacity: 1; } }
}

/* ---------- worlds behind the page heroes */
.hero.sub.world { padding-bottom: 60px; }
.hero.sub.world::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; z-index: 1; pointer-events: none; background-repeat: repeat-x; background-size: 1200px 120px; }
.world-grass::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0 70 C150 20 300 30 450 60 S750 110 900 60 1100 30 1200 50 V120 H0Z' fill='%234fbf74'/%3E%3Cpath d='M0 90 C200 50 380 70 560 92 S900 120 1050 86 1160 76 1200 84 V120 H0Z' fill='%23339a52'/%3E%3C/svg%3E"); }
.world-night { background: radial-gradient(120% 90% at 70% 10%, #2b3f8f 0%, #16204a 50%, #0b1030 100%); }
.world-night::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0 120 V70 h60 v-30 h40 v40 h50 v-55 h70 v60 h40 v-20 h60 v45 h50 v-70 h40 v70 h70 v-35 h60 v20 h50 v-60 h80 v65 h40 v-25 h70 v40 h60 v-50 h50 v60 h80 v-30 h40 v40 V120Z' fill='%230a0f2a'/%3E%3C/svg%3E"); }
.world-sunset { background: linear-gradient(180deg, #1c2e6b 0%, #6a3c8f 45%, #e8743b 85%, #ffb347 100%); }
.world-sunset::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0 80 C200 40 400 60 600 80 S1000 110 1200 70 V120 H0Z' fill='%233a2a5c'/%3E%3C/svg%3E"); }
.clouds { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.clouds i { position: absolute; top: var(--t); width: var(--w); height: calc(var(--w) * .32); border-radius: 999px; background: rgba(255,255,255,.18);
  animation: drift var(--s) linear infinite; animation-delay: var(--d); left: -20%; filter: blur(1px); }
.clouds i::before { content: ""; position: absolute; width: 55%; height: 140%; left: 18%; bottom: 30%; border-radius: 50%; background: inherit; }
@keyframes drift { to { left: 110%; } }
.lights { position: absolute; left: 0; right: 0; top: 14px; height: 40px; z-index: 1; pointer-events: none;
  background: radial-gradient(circle, #ffd76b 0 3px, transparent 4px) 0 10px / 46px 30px repeat-x; filter: drop-shadow(0 0 6px #ffcb05); animation: twinkle 2.4s ease-in-out infinite; }
.lights::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30px; border-bottom: 2px solid rgba(255,255,255,.25); border-radius: 0 0 50% 50% / 0 0 30px 30px; }
@keyframes twinkle { 50% { opacity: .55; } }
.sparkles { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(2px 2px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, #fff, transparent), radial-gradient(2px 2px at 55% 45%, #ffe68a, transparent), radial-gradient(1.5px 1.5px at 10% 80%, #fff, transparent);
  animation: twinkle 3s ease-in-out infinite; }

/* ---------- booster packs */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 40px auto 10px; max-width: 980px; }
@media (max-width: 760px) { .packs { grid-template-columns: 1fr; max-width: 360px; } }
.pack-wrap { position: relative; display: grid; justify-items: center; gap: 14px; min-height: 420px; }
.pack { position: relative; width: 190px; height: 300px; border: 0; padding: 0; background: none; cursor: pointer; transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.pack:hover { transform: rotate(-3deg) scale(1.04); }
.pack-body, .pack-top { position: absolute; left: 0; right: 0; background: var(--pk, linear-gradient(160deg, #3a7fd0, #1c2e6b)); overflow: hidden; }
.pack-top { top: 0; height: 46px; z-index: 2; clip-path: polygon(0 18%, 5% 0, 10% 18%, 15% 0, 20% 18%, 25% 0, 30% 18%, 35% 0, 40% 18%, 45% 0, 50% 18%, 55% 0, 60% 18%, 65% 0, 70% 18%, 75% 0, 80% 18%, 85% 0, 90% 18%, 95% 0, 100% 18%, 100% 100%, 0 100%);
  transition: transform .5s cubic-bezier(.4,0,.2,1), opacity .5s; border-bottom: 2px dashed rgba(255,255,255,.4); }
.pack-body { top: 46px; bottom: 0; clip-path: polygon(0 0, 100% 0, 100% 94%, 95% 100%, 90% 94%, 85% 100%, 80% 94%, 75% 100%, 70% 94%, 65% 100%, 60% 94%, 55% 100%, 50% 94%, 45% 100%, 40% 94%, 35% 100%, 30% 94%, 25% 100%, 20% 94%, 15% 100%, 10% 94%, 5% 100%, 0 94%);
  display: grid; justify-items: center; align-content: center; gap: 6px; color: #fff; text-align: center; padding: 10px; }
.pack-body::after, .pack-top::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .5;
  background: repeating-linear-gradient(115deg, transparent 0 8%, rgba(255,240,120,.35) 11%, rgba(120,210,255,.35) 14%, rgba(255,140,220,.3) 17%, transparent 20%); background-size: 260% 260%;
  animation: foil 5s linear infinite; }
@keyframes foil { to { background-position: 260% 0; } }
.pack-body img { width: 82px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.pack-body b { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.pack-body .pp { font-size: 22px; font-weight: 900; color: var(--yellow); }
.pack-body small { font-weight: 700; opacity: .85; }
.pack-tap { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.p-free { --pk: linear-gradient(160deg, #8a96b8, #3a4466); } .p-collector { --pk: linear-gradient(160deg, #ff6a5a, #b0181c); } .p-shop { --pk: linear-gradient(160deg, #ffd34d, #c28a00); }
.p-shop .pack-body { color: var(--navy); } .p-shop .pack-body .pp { color: var(--red); }
.pack-wrap.opening .pack-top { transform: translate(40px, -60px) rotate(24deg); opacity: 0; }
.pack-wrap.opened .pack { transform: translateY(40px) scale(.9); }
.perks { position: absolute; top: 40px; left: 50%; width: 0; height: 0; pointer-events: none; }
.perk { position: absolute; left: -62px; top: 0; width: 124px; height: 172px; border-radius: 9px; padding: 10px; background: linear-gradient(160deg, #fff, #eef2fb); color: var(--navy);
  box-shadow: 0 0 0 4px var(--pc, #ffcb05), 0 20px 30px -12px rgba(0,0,0,.5); display: grid; align-content: center; text-align: center; gap: 6px; font-size: 13px; font-weight: 800;
  opacity: 0; transform: translateY(80px) scale(.6); transition: transform .65s cubic-bezier(.3,1.4,.5,1), opacity .3s; }
.perk i { font-style: normal; font-size: 26px; }
.pack-wrap.opened .perks { pointer-events: auto; }
.pack-wrap.opened .perk { opacity: 1; transform: translate(var(--px), var(--py)) rotate(var(--pr)); transition-delay: var(--pd); }
.pack-wrap.opened .pack-tap { visibility: hidden; }

/* ---------- card lookup */
.lookup { margin-top: 30px; padding: clamp(18px, 3vw, 30px); border-radius: 30px; background: linear-gradient(160deg, #e3350d, #b0181c); box-shadow: var(--shadow), inset 0 -8px 0 rgba(0,0,0,.15); color: #fff; }
.lookup-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.lookup-top .lens { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #bff1ff, #2a9df4 55%, #135c9c); box-shadow: 0 0 0 5px #fff, 0 0 18px #6fd0ff; flex: none; }
.lookup-top .leds { display: flex; gap: 6px; } .lookup-top .leds i { width: 12px; height: 12px; border-radius: 50%; background: #ffcb05; box-shadow: 0 0 8px #ffcb05; }
.lookup-top .leds i:nth-child(2) { background: #4ff2b4; box-shadow: 0 0 8px #4ff2b4; } .lookup-top .leds i:nth-child(3) { background: #fff; }
.lookup-screen { border-radius: 20px; padding: 16px; background: #10183d; box-shadow: inset 0 0 0 4px #0a0f2a, inset 0 6px 20px rgba(0,0,0,.5); }
#lookup { display: flex; gap: 10px; }
#lookup input { flex: 1; min-width: 0; height: 52px; border-radius: 14px; border: 0; padding: 0 16px; font: inherit; font-size: 18px; font-weight: 700; color: var(--navy); }
.lookup-try { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lookup-try button { border: 0; border-radius: 99px; padding: 6px 12px; font: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer; background: rgba(255,255,255,.12); color: #fff; }
#lookup-status { margin: 12px 2px 0; color: #9fd7ff; font-weight: 700; font-size: 14.5px; min-height: 1.4em; }
#lookup-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-top: 14px; }
.look-card { position: relative; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; color: #fff; font: inherit;
  animation: deal-in .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 55ms); }
@keyframes deal-in { from { opacity: 0; transform: translateY(30px) rotate(-6deg) scale(.85); } }
.look-card img { width: 100%; border-radius: 6px; box-shadow: 0 16px 24px -12px rgba(0,0,0,.7); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.look-card:hover img { transform: translateY(-6px) rotate(-2deg) scale(1.04); }
.look-price { position: absolute; top: 8px; right: -6px; padding: 4px 9px; border-radius: 9px; background: var(--yellow); color: var(--navy); font-weight: 900; font-size: 13px; box-shadow: 0 6px 12px -4px rgba(0,0,0,.5); }
.look-name { display: block; margin-top: 6px; font-weight: 850; font-size: 14px; line-height: 1.2; }
.look-set { display: block; font-size: 12px; color: #9fb0e6; font-weight: 650; }

/* ---------- 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.lost h1 { font-size: clamp(40px, 8vw, 80px); }
.lost .ball404 { width: 140px; margin: 0 auto 20px; animation: float 3s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .appcard { opacity: 1; transform: none; }
  .clouds i, .lights, .sparkles, .float, .popout, .chip-float, .pack-body::after { animation: none !important; }
}
.has-wild, .feature .visual { position: relative; }
.pack-wrap.opened .pack { opacity: .3; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#lookup-section .feature > * { min-width: 0; }

/* ---------- public card, set and Pokémon pages */
.pub-hero { position: relative; overflow: clip; color: #fff; padding: 22px 0 54px; background: radial-gradient(120% 90% at 85% 10%, #3a7fd0 0%, var(--navy-2) 45%, var(--navy) 100%); }
.pub-hero h1 { font-size: clamp(34px, 5.6vw, 58px); margin: 4px 0 10px; }
.pub-hero .lead { color: #d9e3ff; }
.pub-hero a { color: var(--yellow); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 0 22px; padding: 0; font-size: 14px; font-weight: 650; color: #b9c7f2; }
.crumbs li + li::before { content: "›"; margin-right: 8px; opacity: .6; }
.crumbs a { color: #d9e3ff; text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.pub-card { display: grid; gap: 28px; align-items: start; }
@media (min-width: 860px) { .pub-card { grid-template-columns: minmax(260px, 380px) 1fr; } }
.pub-art { margin: 0 auto; width: min(380px, 82vw); border-radius: 4.6% / 3.4%; overflow: hidden; cursor: pointer; box-shadow: 0 40px 70px -30px rgba(0,0,0,.7); }
.pub-art img { display: block; width: 100%; height: auto; }
.pub-value { display: grid; gap: 2px; padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); margin: 8px 0 18px; max-width: 420px; }
.pub-value span { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: #b9c7f2; }
.pub-value b { font-size: 40px; font-weight: 900; color: var(--yellow); letter-spacing: -.02em; }
.pub-value small { color: #c8d5fb; font-size: 13.5px; }
.pub-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 15.5px; }
.pub-facts dt { color: #b9c7f2; font-weight: 700; } .pub-facts dd { margin: 0; color: #fff; }
.pub-cols { display: grid; gap: 34px; } @media (min-width: 900px) { .pub-cols { grid-template-columns: 1fr 1fr; } }
.pub-cols h2, .pub-hero ~ section h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 14px; }
.pub-table { width: 100%; border-collapse: collapse; border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; }
.pub-table th, .pub-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.pub-table th { background: var(--bg-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.pub-table td.num { font-weight: 850; } .pub-table tr:last-child td { border-bottom: 0; }
.pub-where { display: grid; gap: 8px; }
.pub-where a { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: var(--ink-2);
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s, box-shadow .15s; }
.pub-where a:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--blue), var(--shadow); }
.pub-where b { font-size: 17px; font-weight: 900; } .pub-where i { font-style: normal; font-weight: 900; color: var(--blue); }
.s-ebay { color: #e53238; } .s-tcgplayer { color: #2a75bb; } .s-mercari { color: #5356ee; } .s-depop { color: #d6001c; }
.pub-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-top: 22px; padding: 18px 20px; border-radius: 20px;
  background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; }
.pub-cta div { display: grid; gap: 2px; } .pub-cta b { font-size: 18px; } .pub-cta span { color: #c8d5fb; font-size: 14.5px; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin-bottom: 20px; }
@media (max-width: 480px) { .pub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.pub-tile { display: grid; gap: 2px; text-decoration: none; color: var(--ink); position: relative; }
.pub-img { display: block; aspect-ratio: 245 / 337; border-radius: 6px; overflow: hidden; background: var(--bg-2); box-shadow: 0 14px 24px -14px rgba(22,32,74,.5);
  transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.pub-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-tile:hover .pub-img { transform: translateY(-6px) rotate(-1.5deg) scale(1.03); }
.pub-tile b { margin-top: 6px; font-size: 14.5px; line-height: 1.2; } .pub-tile small { font-size: 12.5px; color: var(--ink-3); }
.pub-price { position: absolute; top: 8px; right: -6px; padding: 3px 8px; border-radius: 9px; background: var(--yellow); color: var(--navy); font-weight: 900; font-size: 12.5px;
  box-shadow: 0 6px 12px -4px rgba(0,0,0,.4); } .pub-price i { font-style: normal; font-weight: 700; }
.pub-noimg { display: grid; place-items: center; height: 100%; color: var(--ink-3); font-size: 13px; }
.pub-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; color: #c8d5fb; font-size: 15.5px; margin-top: 6px; } .pub-stats b { color: #fff; }
.pub-set-head { display: grid; gap: 18px; align-items: center; } @media (min-width: 760px) { .pub-set-head { grid-template-columns: 300px 1fr; } }
.pub-logo { width: 100%; max-width: 300px; height: auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); }
.pub-fan { display: flex; justify-content: center; margin-top: 30px; }
.pub-fan .pub-tile { width: 150px; margin: 0 -22px; color: #fff; transition: transform .3s; }
.pub-fan .pub-tile:nth-child(1) { transform: rotate(-14deg) translateY(24px); } .pub-fan .pub-tile:nth-child(2) { transform: rotate(-7deg) translateY(6px); }
.pub-fan .pub-tile:nth-child(4) { transform: rotate(7deg) translateY(6px); } .pub-fan .pub-tile:nth-child(5) { transform: rotate(14deg) translateY(24px); }
.pub-fan .pub-tile:hover { transform: translateY(-14px) scale(1.06); z-index: 3; }
.pub-fan .pub-tile small { color: #b9c7f2; } .pub-fan .pub-tile b, .pub-fan .pub-tile small { display: none; }
@media (max-width: 560px) { .pub-fan .pub-tile { width: 96px; margin: 0 -16px; } }
.pub-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 30px; }
.pub-sets a { display: grid; gap: 4px; justify-items: start; padding: 14px; border-radius: 16px; background: #fff; text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s; }
.pub-sets a:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--blue); }
.pub-sets img { height: 48px; width: auto; max-width: 100%; object-fit: contain; } .pub-sets small { color: var(--ink-3); font-size: 12.5px; }
.pub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pub-chips a { padding: 8px 14px; border-radius: 99px; background: var(--bg-2); color: var(--navy); font-weight: 800; text-decoration: none; font-size: 14.5px; box-shadow: inset 0 0 0 1px var(--line); }
.pub-chips a:hover { background: var(--yellow); } .pub-chips small { color: var(--ink-3); font-weight: 650; }
.look-card { text-decoration: none; display: block; }
.pub-fan .pub-price { display: none; }

/* ---------- a livelier header */
.nav { transition: box-shadow .3s, background-color .3s; }
.nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; pointer-events: none; opacity: .9;
  background: linear-gradient(90deg, #d71f24, #ffcb05, #4fbf74, #2a75bb, #9b5cf0, #d71f24) 0 0 / 300% 100%; animation: holo-line 9s linear infinite; }
@keyframes holo-line { to { background-position: 300% 0; } }
.nav.scrolled { background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px); box-shadow: 0 10px 30px -18px rgba(22,32,74,.45); }
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; opacity: 0; transform: translateY(-6px) scale(.4);
  background: linear-gradient(#e3350d 0 45%, #16204a 45% 55%, #fff 55%); box-shadow: 0 0 0 1.5px #16204a; transition: opacity .2s, transform .35s cubic-bezier(.3,1.6,.5,1); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { opacity: 1; transform: none; }
.nav-links a:hover::after { animation: nav-ball .6s ease-in-out; }
@keyframes nav-ball { 30% { transform: translateY(-5px) rotate(-30deg); } 60% { transform: translateY(0) rotate(20deg); } }
.dex-btn svg { transition: transform .5s cubic-bezier(.3,1.6,.5,1); } .dex-btn:hover svg { transform: rotate(-360deg); }

/* ---------- a livelier, smaller footer */
footer { position: relative; margin-top: 0; padding-top: 40px !important; padding-bottom: calc(26px + env(safe-area-inset-bottom)) !important; overflow-x: clip; overflow-y: visible; isolation: isolate;
  background: radial-gradient(90% 140% at 50% 100%, #1c2e6b 0%, var(--navy) 65%) !important; }
.foot-edge { position: absolute; left: 0; right: 0; top: -38px; height: 40px; z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 V22 C120 6 260 30 420 20 S720 2 880 18 S1100 34 1200 14 V40Z' fill='%2316204a'/%3E%3C/svg%3E") 0 0 / 100% 100%; }
.foot-ball { position: absolute; top: 0; left: -40px; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0 4px, #16204a 4.5px 6.5px, transparent 7px), linear-gradient(#e3350d 0 46%, #16204a 46% 54%, #fff 54%);
  box-shadow: 0 0 0 2px #16204a, 0 6px 10px rgba(0,0,0,.3); animation: roll-across 16s linear infinite; }
@keyframes roll-across { 0% { left: -40px; transform: rotate(0); } 70% { left: calc(100% + 40px); transform: rotate(1440deg); } 100% { left: calc(100% + 40px); transform: rotate(1440deg); } }
.foot-sparkles { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .7;
  background-image: radial-gradient(1.5px 1.5px at 12% 40%, #fff, transparent), radial-gradient(2px 2px at 30% 70%, #ffe68a, transparent), radial-gradient(1.5px 1.5px at 55% 30%, #fff, transparent),
    radial-gradient(2px 2px at 78% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 90% 25%, #ffe68a, transparent), radial-gradient(1.5px 1.5px at 45% 85%, #fff, transparent);
  animation: twinkle 3.4s ease-in-out infinite; }
footer .cols { gap: 24px 30px !important; }
@media (min-width: 800px) { footer .cols { grid-template-columns: 1.5fr 1fr 1fr 1fr !important; } }
@media (max-width: 799px) { footer .cols { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } footer .foot-brand { grid-column: 1 / -1; } }
footer .foot-brand p { margin: 0 0 14px; max-width: 34ch; }
footer .foot-brand .btn { display: inline-flex; color: var(--navy); }
footer .brand img { height: 52px !important; }
footer h4 { color: var(--yellow) !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: .08em; }
footer .cols a:not(.btn):not(.brand) { transition: color .2s, transform .2s; }
footer .cols a:not(.btn):not(.brand):hover { transform: translateX(3px); }
.foot-company { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.foot-company a { display: inline-block !important; font-weight: 700; }
footer .legal { margin-top: 12px !important; padding-top: 0 !important; border-top: 0 !important; text-align: center; font-size: 12px !important; max-width: 900px; margin-inline: auto; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .nav::after, .foot-ball, .foot-sparkles { animation: none; } .foot-ball { display: none; } }
@media (max-width: 799px) {
  footer .foot-brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
  footer .foot-brand p { display: none; } footer .foot-brand .brand { margin: 0; } footer .brand img { height: 44px !important; }
  footer .cols a:not(.btn):not(.brand) { padding: 2px 0; } footer h4 { margin-bottom: 6px !important; }
  .foot-company { margin-top: 18px; padding-top: 14px; }
}
