/* The Store (store.js): ribbon headers, two featured panels, and rows of four small cards coloured by rarity */
.storepage { justify-content: flex-start; padding-top: .8rem; gap: .55rem; padding-bottom: 1rem; }
.sbar { display: flex; align-items: center; justify-content: space-between; }
.sbar .title { font-size: 2.1rem; }
.sbar .chip.coins { font-size: 1rem; } .sbar .chip .tic { width: 1.4em; height: 1.4em; }

/* a ribbon banner with folded ends */
.sribbon { position: relative; margin: .8rem .5rem .15rem; padding: .35rem 1rem .4rem; text-align: center; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 50%, rgba(0,0,0,.15)), var(--hot);
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); filter: drop-shadow(0 3px 0 color-mix(in srgb, var(--hot) 50%, black)); }
.sribbon b { display: block; font: 400 1.25rem 'Lilita One', var(--body); letter-spacing: .02em; -webkit-text-stroke: 1.2px rgba(0,0,0,.4); paint-order: stroke fill; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.sribbon small { display: block; font: 800 .68rem var(--body); }

/* featured panels (Season Pass, no ads): one line of words, the price on the right */
.sfeature { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; text-align: left; color: var(--ink); font: inherit; cursor: pointer; width: 100%; }
.sfeature .grow { min-width: 0; }
.sfeature b { display: block; font: 400 1.15rem 'Lilita One', var(--body); }
.sfeature small { display: block; color: var(--ink-dim); font-weight: 700; font-size: .74rem; line-height: 1.25; }
.sfpic { flex: none; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 40% 30%, #fff, color-mix(in srgb, var(--hot) 25%, #fff)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 3px 6px rgba(0,0,0,.25); }
.sfpic .tic { width: 2.2rem; height: 2.2rem; }

/* the price pill */
.sprice { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .15rem; padding: .22rem .5rem; border-radius: 99px; font: 400 .88rem 'Lilita One', var(--body); color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%, rgba(0,0,0,.12)), #2fb36b; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.45), 0 2.5px 0 #1d7a47;
  -webkit-text-stroke: .7px rgba(0,0,0,.35); paint-order: stroke fill; }
.sprice .tic { width: 1.15em; height: 1.15em; }
.sprice.cash { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%, rgba(0,0,0,.12)), var(--hot); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.45), 0 2.5px 0 color-mix(in srgb, var(--hot) 55%, black); }
.sfeature .sprice { font-size: 1rem; padding: .3rem .7rem; }

/* four small cards to a line, each in its rarity's colour */
.sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
:root .scard { --rc: #8f98b8; display: grid; justify-items: center; align-content: start; gap: .25rem; padding: .3rem .3rem .45rem; border-radius: 14px; cursor: pointer; color: #fff; font: inherit;
  border: 2px solid color-mix(in srgb, var(--rc) 70%, #fff);
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 40%, rgba(0,0,0,.18)), color-mix(in srgb, var(--rc) 85%, #1b1033);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 0 color-mix(in srgb, var(--rc) 45%, black), 0 6px 12px -4px rgba(0,0,0,.45); }
.scard.r-common { --rc: #8f98b8; } .scard.r-uncommon { --rc: #2fb36b; } .scard.r-rare { --rc: #2f7be0; }
.scard.r-epic { --rc: #8a4fe0; } .scard.r-legendary { --rc: #f0a020; } .scard.r-mythic { --rc: #7f93b8; }
.scard.r-coin { --rc: #3d6fd8; }
.scard .sname { font: 400 .74rem 'Lilita One', var(--body); text-align: center; line-height: 1.05; min-height: 2.1em; display: grid; place-items: center;
  -webkit-text-stroke: .7px rgba(0,0,0,.45); paint-order: stroke fill; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.scard .samount { font-size: 1rem; color: #ffe27a; min-height: 0; }
.spic { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.35), rgba(0,0,0,.25)); box-shadow: inset 0 2px 5px rgba(0,0,0,.3); }
.spic .sav { display: grid; place-items: center; width: 100%; height: 100%; } .spic .sav svg { width: 84%; height: 84%; }
.spic .sthumb { display: block; width: 100%; height: 100%; } .spic .sthumb svg { width: 100%; height: 100%; display: block; }
.spic .srec { display: grid; place-items: center; width: 100%; height: 100%; } .spic .srec svg { width: 76%; height: 76%; }
.spic.scoin svg { width: 100%; height: 100%; }
.spic .sbub { font-size: .62rem; padding: .3rem .5rem; margin: 0; max-width: 90%; }
.stitle { font: 400 .78rem/1.05 'Lilita One', var(--body); text-align: center; color: #fff; -webkit-text-stroke: 1px #1b1033; paint-order: stroke fill; text-transform: uppercase; }
/* a bundle's little "what's inside" tab */
.sbtag { position: absolute; left: 3px; right: 3px; bottom: 3px; display: flex; justify-content: center; gap: 1px; padding: 2px; border-radius: 7px; background: rgba(27,16,51,.7); }
.sbtag .tic { width: 26%; height: auto; }
.snote { margin: .6rem .4rem 0; padding: .55rem .7rem; border-radius: 12px; text-align: center; font-weight: 700; font-size: .78rem; color: var(--ink); background: color-mix(in srgb, var(--panel) 90%, transparent); }
/* keep every picture inside its card: the card's column can't grow past the card, and pictures can't push it */
:root .scard { grid-template-columns: minmax(0, 1fr); min-width: 0; overflow: hidden; }
.scard > * { min-width: 0; max-width: 100%; }
.spic svg { max-width: 100%; }
/* the bundle pop-up: a big picture of the theme, then each item inside with its own preview */
.bundlebox { display: grid; gap: .45rem; }
.bhero { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; border: 2px solid var(--rc); box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); }
.bhero svg { width: 100%; height: 100%; display: block; }
.bitem { display: flex; align-items: center; gap: .6rem; padding: .4rem .55rem; border-radius: 12px; background: var(--sunk); border: 1.5px solid color-mix(in srgb, var(--rc) 55%, transparent); }
.bitem small { display: block; color: var(--ink-dim); font-weight: 800; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.bitem b { display: block; font-weight: 900; }
.bipic { flex: none; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; border-radius: 10px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 35%, #fff), color-mix(in srgb, var(--rc) 70%, #1b2036)); }
.bipic .bthumb, .bipic .bthumb svg { width: 100%; height: 100%; display: block; }
.bipic .srec svg { width: 80%; height: 80%; } .bipic .srec, .bipic .sav { display: grid; place-items: center; width: 100%; height: 100%; }
.bipic .sav svg { width: 88%; height: 88%; }
.bttl { font: 400 .62rem/1.05 'Lilita One', var(--body); color: #fff; text-align: center; -webkit-text-stroke: .8px #1b1033; paint-order: stroke fill; text-transform: uppercase; padding: 2px; }
.bundlebox .btn .tic { width: 1.3em; height: 1.3em; }
.bundlebox { display: flex; flex-direction: column; gap: .45rem; }
.bundlebox > * { flex: none; }
.bhero { width: 100%; height: auto; }
/* prices sized to the small cards: full width of the card, smaller text, so 1,500 and £7.49 always fit */
:root .scard .sprice { width: 100%; padding: .2rem .15rem; gap: .08rem; font-size: clamp(.66rem, 3.1vw, .86rem); }
:root .scard .sprice .tic { width: 1em; height: 1em; flex: none; }
/* a chat bubble sits in the middle of its picture */
.spic .sbub { position: static; align-self: center; justify-self: center; }
/* the bundle pop-up fits the screen: smaller hero, tighter rows, the buy buttons always in view */
.bundlebox { max-height: calc(100dvh - 1.5rem); overflow-y: auto; }
.bhero { aspect-ratio: 2 / 1; }
.bitem { padding: .3rem .5rem; } .bipic { width: 2.8rem; height: 2.8rem; }
.bundlebox .row:has([data-b]) { position: sticky; bottom: -1px; padding: .4rem 0 .2rem; background: var(--panel); }
:root .bundlebox .btn.gold { --hot: #2fb36b; }
/* which kind of music: a coloured strip along the bottom of the picture */
.smtag { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 2px; font: 900 clamp(.44rem, 1.9vw, .54rem)/1.1 var(--body); font-style: normal; letter-spacing: .02em;
  color: #fff; text-align: center; background: #2fb36b; }
.smtag.duel { background: #e63946; }
.spic .srec svg { width: 66%; height: 66%; margin-bottom: 14%; }
/* things they already own: a green Owned tick instead of the price */
:root .sprice.owned { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%, rgba(0,0,0,.12)), #1f9e55; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.45), 0 2.5px 0 #13693a; }
.sprice.owned .ic3l, .sprice.owned .ic { width: 1em; height: 1em; }
.scard.owned .spic { opacity: .82; }
.bitem.bown { border-color: #2fb36b; }
/* item pictures that aren't a drawing: a name colour, an answer button, the win pictures */
.spic .sname-demo, .bipic .sname-demo, .pthumb .sname-demo { font: 400 1.5rem 'Lilita One', var(--body); -webkit-text-stroke: 1px rgba(0,0,0,.35); paint-order: stroke fill; }
.sbtn-demo { display: grid; place-items: center; width: 100%; height: 100%; }
.sbtn-demo .sbtn { width: 64%; aspect-ratio: 1.3; display: grid; place-items: center; font-style: normal; font-weight: 900; border-radius: 10px; background: var(--card); color: var(--ink); border: 1.5px solid var(--panel-edge); }
.sart { display: grid; place-items: center; width: 100%; height: 100%; } .sart svg { width: 74%; height: 74%; }
.bipic .stitle { font-size: .55rem; padding: 2px; }
/* Season Pass tiers show the real item (pictures made by itemInfo in store.js) */
.pthumb.pitem { position: relative; overflow: hidden; border-style: solid; padding: 0; }
.pthumb.pitem > :is(.sav, .sthumb, .srec, .sart, .sbtn-demo) { display: grid; place-items: center; width: 100%; height: 100%; }
.pthumb.pitem .sav svg { width: 88%; height: 88%; } .pthumb.pitem .sthumb svg { width: 100%; height: 100%; display: block; }
.pthumb.pitem .srec svg { width: 70%; height: 70%; margin-bottom: 14%; }
.pthumb.pitem .stitle { font-size: .58rem; padding: 2px; }
.pthumb.pitem .sbub { font-size: .55rem; padding: .25rem .4rem; margin: 0; max-width: 92%; }
.pthumb.pitem .sname-demo { font-size: 1.3rem; }
.ptier[data-pitem^="bundle."] { cursor: pointer; }
.ptier:has(.pstate:not(.ok)) .preward > .pitem { opacity: .85; }   /* a locked item still shows what you would get */
/* Style page and character picker: Store / Season Pass items not owned yet show dimmed with a lock */
.styletile.locked, .avatars button.locked { position: relative; }
.styletile.locked > :not(.slock), .avatars button.locked > svg { opacity: .45; filter: grayscale(.5); }
.slock { position: absolute; top: 3px; right: 3px; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; font-style: normal; }
.slock :is(.ic, .ic3l, svg) { width: 100%; height: 100%; }

/* Mythic is rainbow (user, 2 Nov: platinum looked the same as Common): a shifting rainbow edge on cards, rainbow
   letters on the rarity tag and titles. --r-mythic is the solid colour used where a single colour is needed. */
:root { --r-mythic: #e05cff; }
:is([data-theme="clean"], [data-theme="daylight"], [data-theme="blossom"], [data-theme="wonderland"]) { --r-mythic: #b02fd6; }
:root { --rainbow: linear-gradient(90deg, #ff5a5a, #ffb02e, #ffe14d, #3fd68f, #3fa8ff, #9b6bff, #ff5ad1, #ff5a5a); }
@keyframes mythicShift { to { background-position: 200% 0; } }
:is(.ptier.r-mythic .preward, .scard.r-mythic, .bitem.r-mythic, .bundlebox.r-mythic .bhero) { position: relative; }
:is(.ptier.r-mythic .preward, .scard.r-mythic, .bitem.r-mythic, .bundlebox.r-mythic .bhero)::after {
  content: ''; position: absolute; inset: -2px; padding: 2.5px; border-radius: inherit; pointer-events: none; z-index: 2;
  background: var(--rainbow); background-size: 200% 100%; animation: mythicShift 4s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.ptier.r-mythic .preward { border-color: transparent; box-shadow: 0 0 18px -2px rgba(224, 92, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
:is(.rtag, .ptitle, .styletile.rar > span).r-mythic, .r-mythic .rtag, .styletile.r-mythic > span {
  background: var(--rainbow); background-size: 200% 100%; animation: mythicShift 4s linear infinite;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.r-mythic .rtag, .rtag.r-mythic { border-color: rgba(224, 92, 255, .6); }
.scard.r-mythic { --rc: #8a3fd8; }
@media (prefers-reduced-motion: reduce) { .r-mythic::after, .r-mythic .rtag, .rtag.r-mythic { animation: none; } }
/* the bundle pop-up's small pictures: the theme fills its square, the music tag stays inside, the bubble on one line */
.bipic { position: relative; }
.bipic .sthumb, .bipic .sthumb svg { display: block; width: 100%; height: 100%; }
.bipic .smtag { font-size: .4rem; padding: 2px 1px; }
.bipic .srec svg { margin-bottom: 18%; }
:is(.bipic, .spic, .pthumb) .sbub { white-space: nowrap; }
.bipic .sbub { font-size: .55rem; padding: .25rem .4rem; margin: 0; max-width: 94%; }
/* a chat bubble in a pass square or bundle row: centred, not hanging off its usual corner */
:is(.pthumb.pitem, .bipic, .spic) > .sbub { position: static; margin: 0 auto; align-self: center; justify-self: center; transform: none; float: none; }
.pthumb.pitem { display: grid; place-items: center; }
/* Head to Head trophies: the number with a little trophy in front */
.troph { display: inline-flex; align-items: center; gap: .18em; white-space: nowrap; }
.troph .tic { width: 1.15em; height: 1.15em; flex: none; }
.bignum .troph .tic { width: .9em; height: .9em; }
/* the Season Pass header always fits the screen (user, 2 Nov: in Arcade the wide pixel title pushed the "Pass
   active" line and the coins off the right): its one column can't grow past the card, and long lines wrap */
.passhead { grid-template-columns: minmax(0, 1fr); }
.passhead > *, .passhead .row > *, .passon > * { min-width: 0; }
.passhead .title { white-space: nowrap; overflow: hidden; font-size: clamp(1.3rem, 7vw, 1.7rem); }   /* fitLine() shrinks it to fit */
.passon { font-size: .92rem; line-height: 1.25; }
.passlvl small { white-space: nowrap; }
.spic.scoin img.ic3img { width: 84%; height: 84%; }

/* (owner, 15 Nov) "Unlimited" ran over the edges of the lives cards: smaller, and never wider than the card */
.scard .slives { font-size: clamp(.5rem, 2.9vw, .72rem); line-height: 1.05; letter-spacing: -.01em; max-width: 100%; }
