/* MISEKURA v67 · the SELF SEAL SLEEVE (Ron 9 Nov 06:39: "sleeved booster packs shouldn't be in a one touch. But a self seal sleeve would be good,
   animation dropping it in, tearing adhesive strip and folding it over the back of sleeved booster with satisfying noises of course").
   A clear soft polypropylene bag a little bigger than the sleeved pack, heat sealed down both sides and along the bottom, a flap at the top
   with a strip of adhesive under a peel off backing strip. Sealed, the flap is folded over the BACK: from the front you see it through the
   clear film as a second layer above the pack, with the slightly frosted glue line in it. The film: almost clear, a soft gloss, a few
   gentle crinkles, brighter seams. Everything is one element (.ss), so it always moves, flies and enlarges as one piece. */
.ss{--otw:28%;--fh:14%;position:relative;flex:0 0 var(--otw);aspect-ratio:.6;display:block;padding:0;border:0;background:none;-webkit-tap-highlight-color:transparent;
  transition:transform .32s cubic-bezier(.2,.8,.2,1);isolation:isolate}
.ss:active{transform:translateY(-3%)}
.ss>*{pointer-events:none}
.wsh .ss{margin-bottom:5px}
.ss>i,.ss>span{position:absolute;display:block}
/* the folded flap, behind everything: it hangs from the top edge down the back of the bag (rotated 180 about the fold) */
.ss-fl2{left:.6%;right:.6%;bottom:100%;height:var(--fh);transform-origin:50% 100%;transform:perspective(700px) rotateX(180deg);z-index:0;border-radius:3px 3px 0 0;
  background:linear-gradient(180deg,rgba(236,242,248,.1),rgba(236,242,248,.16));box-shadow:inset 0 0 0 1px rgba(255,255,255,.2),inset 0 -1.5px 0 rgba(255,255,255,.3)}
.ss-fl2::before,.ss-fl1::before{content:"";position:absolute;left:5%;right:5%;top:30%;height:30%;border-radius:2px;
  background:linear-gradient(180deg,rgba(255,255,255,.26),rgba(240,244,250,.38) 50%,rgba(255,255,255,.22)),url(../assets/crinkle.webp) 0 0/90px 90px;opacity:.9;
  box-shadow:inset 0 0 0 .5px rgba(255,255,255,.25)}
/* the back film */
.ss-back{inset:0;z-index:1;border-radius:2.6% / 1.6%;background:linear-gradient(180deg,rgba(226,234,242,.07),rgba(226,234,242,.035) 40%,rgba(226,234,242,.06));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
/* the sleeved pack inside, standing on the bottom seam */
.ss-in{left:4.6%;right:4.6%;top:9%;bottom:2.6%;z-index:2;display:flex!important;align-items:flex-end;justify-content:center}
.ss-pack{display:block;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 1px 1.4px rgba(0,0,0,.5))}
/* a pack art in its cardboard sleeve (when an art is picked): a matte card with the art printed on it */
.ss-card{position:relative;display:block;height:100%;max-width:100%;aspect-ratio:.575;border-radius:3.5% / 2%;overflow:hidden;
  background:linear-gradient(180deg,#ece7dc,#d9d1c1);box-shadow:0 1px 1.5px rgba(0,0,0,.5),inset 0 0 0 1px rgba(0,0,0,.14)}
.ss .ss-card img{position:absolute!important;left:4.5%;top:8.5%;width:91%!important;height:88%!important;max-width:none!important;max-height:none!important;object-fit:cover;object-position:50% 46%;border-radius:2px;filter:saturate(.95) contrast(.98)!important;animation:none!important}
/* the hang tab at the top of the cardboard sleeve, with its slot */
.ss-card::before{content:"";position:absolute;left:39%;width:22%;top:2.6%;height:2.8%;border-radius:9px;background:rgba(18,16,14,.85);box-shadow:inset 0 1px 1px rgba(0,0,0,.6),0 .5px 0 rgba(255,255,255,.5)}
.ss-card::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(115deg,rgba(255,255,255,.12),rgba(255,255,255,0) 40%,rgba(0,0,0,.07));box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.18)}
.ss img{animation:none!important}
.c-hero .ss img.ss-pack{position:static;max-width:100%;max-height:100%;filter:drop-shadow(0 1px 1.4px rgba(0,0,0,.5))}
/* the front film: soft gloss streaks, a few crinkles, the heat sealed seams down the sides and along the bottom, the open lip at the top */
.ss-front{inset:0;z-index:3;border-radius:2.6% / 1.6%;overflow:hidden;
  background:linear-gradient(101deg,rgba(255,255,255,0) 10%,rgba(255,255,255,.2) 15%,rgba(255,255,255,.05) 21%,rgba(255,255,255,0) 27%),
    linear-gradient(101deg,rgba(255,255,255,0) 63%,rgba(255,255,255,.1) 67%,rgba(255,255,255,0) 72%),
    linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,0) 14%,rgba(255,255,255,0) 86%,rgba(255,255,255,.06));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.34),inset 0 0 0 1.6px rgba(0,0,0,.1)}
.ss-front::before{content:"";position:absolute;inset:0;background:url(../assets/crinkle.webp) 30% 20%/150% auto,linear-gradient(90deg,rgba(255,255,255,.07),rgba(255,255,255,0) 7%,rgba(255,255,255,0) 93%,rgba(255,255,255,.07)),rgba(235,241,247,.035);opacity:.55}
.ss-front::after{content:"";position:absolute;left:1.6%;right:1.6%;top:0;bottom:1.1%;border:1px solid rgba(255,255,255,.2);border-top:0;border-radius:0 0 2px 2px;
  box-shadow:inset 0 -2px 0 rgba(255,255,255,.05)}
.ss-lip{left:0;right:0;top:0;height:1.4%;z-index:4;border-radius:2px;background:linear-gradient(180deg,rgba(255,255,255,.42),rgba(255,255,255,.08))}
.ss-glint{inset:0;z-index:5;border-radius:inherit;overflow:hidden}
.ss-glint::before{content:"";position:absolute;top:-10%;bottom:-10%;left:-60%;width:36%;transform:skewX(-14deg);opacity:0;
  background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.45) 50%,rgba(255,255,255,0))}
.ss.gl .ss-glint::before{animation:ssGlint .8s cubic-bezier(.3,.1,.3,1) both}
@keyframes ssGlint{0%{opacity:0;transform:translateX(0) skewX(-14deg)}25%{opacity:1}100%{opacity:0;transform:translateX(440%) skewX(-14deg)}}
/* the flap standing open (only while sealing): it rises from the back panel's top edge, glue facing you, the backing strip still on */
/* it rises from the BACK panel, so the pack slides down in front of it, and it folds away from you, behind the pack */
.ss-fl1{left:.6%;right:.6%;bottom:100%;height:var(--fh);transform-origin:50% 100%;z-index:1;opacity:0;border-radius:4px 4px 0 0;
  background:linear-gradient(180deg,rgba(236,242,248,.16),rgba(236,242,248,.24));box-shadow:inset 0 0 0 1px rgba(255,255,255,.4),inset 0 2px 0 rgba(255,255,255,.25)}
.ss-liner{left:5%;right:5%;bottom:calc(100% + var(--fh)*.4);height:calc(var(--fh)*.3);z-index:1;opacity:0;transform-origin:100% 50%;border-radius:1.5px;
  background:linear-gradient(180deg,#fbfcfe,#e3e9f1);box-shadow:0 .5px 1.5px rgba(0,0,0,.35)}
.ss-liner::after{content:"";position:absolute;left:8%;right:8%;top:42%;height:16%;background:repeating-linear-gradient(90deg,rgba(120,140,170,.35) 0 6px,transparent 6px 10px)}
.ss.open .ss-fl1,.ss.open .ss-liner{opacity:1}
.ss.open .ss-fl2{opacity:0}
.ss-foot{left:1%;right:1%;bottom:-2.2%;height:2.4%;z-index:0;border-radius:0 0 30% 30% / 0 0 100% 100%;background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(0,0,0,.2))}
.ss-shade{left:-14%;right:-14%;bottom:-9%;height:9%;z-index:0;border-radius:50%;background:radial-gradient(closest-side,rgba(0,0,0,.72),rgba(0,0,0,.26) 60%,transparent)}
/* the pack sheet: larger, tap to seal it again */
.ss.ss-big{--otw:auto;height:min(44vh,330px);flex:none;margin:calc(min(44vh,330px)*.15 + 4px) auto 0}
.pk-hero.ss-hero{display:flex;justify-content:center;align-items:flex-end;padding:14px 0 22px;background:radial-gradient(60% 50% at 50% 30%,rgba(255,222,168,.13),transparent 70%)}
/* arriving */
.m-ss{position:relative;width:min(48vw,230px);aspect-ratio:.6;margin:calc(min(48vw,230px)*.2) auto 0}
.m-ss .ss{position:absolute;inset:0;--otw:100%}
@media (prefers-reduced-motion:reduce){ .ss{transition:none!important} .ss.gl .ss-glint::before{animation:none} }

/* ---------- v67: pick the art before it is sealed away (Ron 06:42) ---------- */
.ap{margin:14px -18px 4px}
.ap h3{margin:0 18px 8px}
.ap-row{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:6px 18px 12px;-webkit-overflow-scrolling:touch;scrollbar-width:none;overscroll-behavior-x:contain}
.ap-row::-webkit-scrollbar{display:none}
.ap-o{flex:0 0 auto;scroll-snap-align:center;display:flex;flex-direction:column;align-items:center;gap:6px;width:86px;padding:8px 4px 6px;border-radius:14px;border:1px solid transparent;background:rgba(255,255,255,.03);color:inherit;font:inherit;-webkit-tap-highlight-color:transparent;transition:transform .2s cubic-bezier(.2,.8,.2,1),background .2s,border-color .2s}
.ap-o img{height:118px;width:auto;max-width:80px;object-fit:contain;filter:drop-shadow(0 3px 5px rgba(0,0,0,.5));transition:transform .25s cubic-bezier(.2,.8,.2,1)}
.ap-o span{font-size:11.5px;line-height:1.2;text-align:center;opacity:.78;max-width:84px}
.ap-o.on{border-color:rgba(214,178,98,.75);background:rgba(214,178,98,.1)}
.ap-o.on img{transform:translateY(-4px) scale(1.04)}
.ap-o.on span{opacity:1}
.ap-o:active{transform:scale(.96)}
.ap-none{flex:0 0 auto;align-self:center;width:72px;font-size:12px;opacity:.7;text-align:center}
.ap .note{margin:0 18px}
.ptype{margin:12px 0 6px;display:flex;justify-content:center}
.kc-t.sq.art{background:transparent;box-shadow:none;overflow:visible}
.kc-t.sq.art img{object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.55))}

/* v68 (Ron 9 Nov 08:24 "Don't forget these sleeved booster styles"): the cardboard sleeve is die cut like the real retail ones: a hang tab with
   its hole at the top and the curved notches at both sides, all see-through (assets/sl-mask.png, traced from the Delta Reign sleeve). The art Ron
   picked is printed edge to edge on it. A sleeve with no art picked shows the catalogue photo, cut out the same way (img/sl). */
.ss-card.ss-cut{aspect-ratio:.554;border-radius:0;box-shadow:none;background:linear-gradient(180deg,#ece7dc,#d9d1c1);
  -webkit-mask:url(../assets/sl-mask.png?v=72) 0 0/100% 100% no-repeat;mask:url(../assets/sl-mask.png?v=72) 0 0/100% 100% no-repeat}
.ss-card.ss-cut::before{display:none}
.ss-card.ss-cut::after{border-radius:0;box-shadow:none}
.ss .ss-card.ss-cut img,.ss-solo img{position:absolute!important;left:-4%!important;top:-3%!important;width:108%!important;height:106%!important;max-width:none!important;max-height:none!important;object-fit:cover;object-position:50% 42%;border-radius:0;animation:none!important;filter:saturate(.96)!important}
.ss-in:has(.ss-cut){filter:drop-shadow(0 1px 1.4px rgba(0,0,0,.5))}
.ss-solo-w{position:relative;display:block;height:100%;filter:drop-shadow(0 24px 30px rgba(0,0,0,.7));animation:rise .8s cubic-bezier(.2,.8,.2,1) both}
.ss-solo{height:100%;margin:0 auto}

/* v68 (Ron 9 Nov 08:26 "don't forget the sleeved packs will be larger than the booster packs as they contain booster packs"): true relative
   size. A plain booster is about 63 x 115 mm; the retail cardboard sleeve, hang tab included, is about 79 x 144 mm (its own photo's
   proportion, .554, at 79 mm wide), so the sleeved pack stands 1.25x the height of a plain pack everywhere they share the screen: on the
   shelf, in Add and on its sheet. The clear bag is cut to fit it snugly (.54). Plain packs and their one touch are unchanged. */
.ss{aspect-ratio:.54}
.wsh .ss{--otw:31.5%}
.wsh-row:has(>.ss){--otgap:1.6%}
.wsh-row>.ss{flex:0 1 var(--otw);min-width:0}
.ss.ss-big{height:calc(min(44vh,340px)*1.13);margin:calc(min(44vh,340px)*1.13*.15 + 4px) auto 0}
.m-ss{width:min(53vw,255px);aspect-ratio:.54;margin:calc(min(53vw,255px)*.2) auto 0}
.c-hero.ap-hero.ap-sl{height:250px!important}
.pk-hero.ss-hero{padding-top:34px}

/* v70 (Ron 9 Nov 19:55 "Love the animations for sleeve but there's loads of room above it! Let's make it a nice exact fit sleeve"): the bag is
   cut to each pack. js/selfseal.js puts the pack's own proportion on the element (--ar, from its cut out photo) and the bag's (--ssa): the
   pack keeps its width (4.6% of film each side), the bottom seam stays where it was, and above the pack there is only a small lip of film
   (5.5% of the bag's width) instead of 9% of a fixed 1.25x height. Singles, art bundles and 8 or 10 pack bundles are all hugged; the
   flap, its glue strip, the seams, the foot and the shadow keep their real size (they are measured off the bag's width now, not its
   height), so the drop, the tear and the fold play exactly as before. */
.ss{aspect-ratio:var(--ssa,.5597);--fh:calc(var(--ssa,.5597)*25.9%)}
.ss-in{top:calc(var(--ssa,.5597)*5.5%);bottom:calc(var(--ssa,.5597)*4.8%)}
.ss .ss-pack,.c-hero .ss img.ss-pack{width:100%;height:100%;object-fit:contain;object-position:50% 100%}
.ss-lip{height:calc(var(--ssa,.5597)*2.6%)}
.ss-front::after{bottom:calc(var(--ssa,.5597)*2%)}
.ss-foot{bottom:calc(var(--ssa,.5597)*-4.1%);height:calc(var(--ssa,.5597)*4.4%)}
.ss-shade{bottom:calc(var(--ssa,.5597)*-16.7%);height:calc(var(--ssa,.5597)*16.7%)}
/* the pack sheet: the pack stands as tall as before; a bundle is as wide as the sheet allows */
.ss.ss-big{--bw:min(330px,84vw,calc(min(44vh,340px)*1.1*var(--ar,.554)));width:var(--bw);height:auto;aspect-ratio:var(--ssa,.5597);
  margin:calc(var(--bw) / var(--ssa,.5597) * .15 + 4px) auto 0}
/* arriving: the bag stands on the same spot as before, so the caption below never moves; a bundle gets the full width */
.m-ss{--mw:min(53vw,255px);width:var(--mw);aspect-ratio:var(--ssa,.5597);margin:calc(min(53vw,255px)*2.052 - var(--mw) / var(--ssa,.5597)) auto 0}
.m-ss.ss-wide{--mw:min(60vw,280px)}

/* v71 (Ron 9 Nov 20:15 "the booster packs are simply too small at that point"): a bundle on the shelf is as wide as it needs for its packs
   to stand as tall as a single's (js/app.js shelfRows puts the width on it as --otw); it never shrinks past that by more than a few percent
   to share a shelf. A bundle wider than any shelf has a shelf of its own and takes its full inner width (wsh-x). On the sheet and as it
   arrives, a bundle takes the screen's full width. */
.wsh-row>.ss.ss-bun{flex:0 0 var(--otw)}
.wsh.wsh-x{padding-left:11px;padding-right:11px}
.wsh.wsh-x .wsh-row{padding:0}
.wsh.wsh-x .wsh-board{margin-left:-11px;margin-right:-11px}
.ss.ss-big{--bw:min(94vw,520px,calc(min(44vh,340px)*1.1*var(--ar,.554)))}
.m-ss.ss-wide{--mw:min(94vw,520px)}
