/* ---------- les cosmétiques des classées (src/ui/cosmetics.js, 11 nov. 2026) : COSMÉTIQUES, BOUTIQUE, la bourse ----------
   Sur la grille 640 × 360 des menus, direction « BD d'horreur » (css/comic.css, css/ranked.css). Le perso en 3D à gauche
   (la vitrine, dessinée derrière), les onglets des sortes et la grille des objets à droite ; une tuile à la couleur de la
   rareté de son objet (--rc). */
.px.cm .tt-title { left: 14px; top: 8px; }
.px .cm-purse, .px.rk-hub .rk-bourse { position: absolute; right: 12px; top: 12px; padding: 2px 10px; background: var(--ink); color: #e6d8f2; transform: rotate(-1.5deg);
  box-shadow: 0 0 0 1.5px #ffd84a, 3px 3px 0 1.5px var(--ink); font-family: var(--px-small); font-weight: 800; font-size: 9px; line-height: 15px; white-space: nowrap; z-index: 5; }
.px .cm-purse b, .px.rk-hub .rk-bourse b { font-family: var(--px-font); font-weight: normal; font-size: 15px; color: #ffd84a; letter-spacing: .5px; margin-right: 2px; }
.px .cm-purse.spend b { color: #fff3d6; }
.px .cm-purse.poor { animation: cm-shake .4s; box-shadow: 0 0 0 1.5px #ff5a5a, 3px 3px 0 1.5px var(--ink); }
.px.rk-hub .rk-bourse { top: 14px; right: 104px; transform: rotate(1deg); }
.px.rk-hub .rk-links { margin-top: 8px; }
.px.rk-hub .rk-hrules { margin-top: 5px; }
@keyframes cm-shake { 20% { transform: translateX(-4px) rotate(-3deg); } 40% { transform: translateX(4px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* le perso de l'aperçu : son nom, ◀ ▶ pour changer, un clic pour la grille */
.px .cm-who { position: absolute; left: 20px; top: 46px; display: flex; align-items: center; gap: 4px; z-index: 4; }
.px .cm-who i { font-style: normal; width: 16px; height: 18px; line-height: 18px; text-align: center; background: var(--ink); color: #ffd84a; font-size: 10px; cursor: pointer; box-shadow: 0 0 0 1.5px #ffd84a; }
.px .cm-who span { display: block; padding: 1px 8px 2px; background: #1d1030; box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 2px var(--ink); cursor: pointer; transform: rotate(-1deg); }
.px .cm-who small { display: block; font-family: var(--px-small); font-weight: 800; font-size: 7px; line-height: 8px; color: #cdbfe0; letter-spacing: .6px; }
.px .cm-who b { display: block; font-weight: normal; font-size: 15px; line-height: 16px; color: var(--bone); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; white-space: nowrap; max-width: 150px; }

/* la carte de combat en aperçu (la vraie, css/cards.css) */
.px .cm-card { position: absolute; left: 82px; top: 292px; width: 132px; height: 48px; z-index: 4; }
.px .cm-card .phc { left: 0; top: 0; }

/* à droite : les onglets, la grille, la fiche de l'objet */
.px .cm-side { position: absolute; left: 306px; top: 40px; width: 322px; height: 296px; z-index: 4; }
.px .cm-tabs { display: flex; gap: 5px; height: 24px; }
.px .cm-tab { position: relative; display: flex; align-items: center; gap: 3px; padding: 0 6px; background: #1d1030; box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 2px var(--ink); cursor: pointer;
  font-size: 10.5px; line-height: 22px; letter-spacing: .5px; color: #cdbfe0; white-space: nowrap; transition: transform .12s; }
.px .cm-tab i { font-style: normal; font-size: 12px; }
.px .cm-tab small { font-family: var(--px-small); font-weight: 800; font-size: 7.5px; color: #9a8cb0; }
.px .cm-tab.sel { background: #ffd84a; color: var(--ink); transform: rotate(-2deg); }
.px .cm-tab.sel small { color: #4a3260; }
.px .cm-tab.on { box-shadow: 0 0 0 2px #fff3d6, 3px 3px 0 2px var(--ink); transform: scale(1.08) rotate(-2deg); }
.px .cm-gridbox { position: absolute; left: -6px; right: -6px; top: 30px; height: 218px; padding: 6px; box-sizing: border-box; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  background: rgba(18, 10, 26, .62); box-shadow: inset 0 0 0 2px var(--ink); }
.px .cm-gridbox::-webkit-scrollbar { display: none; }
.px .cm-grid { display: flex; flex-wrap: wrap; gap: 6px 5px; }
.px .cm-tile { position: relative; width: 47px; height: 58px; box-sizing: border-box; background: linear-gradient(180deg, color-mix(in srgb, var(--rc, #b8c0c8) 22%, #1d1030), #140a20);
  box-shadow: 0 0 0 1.5px var(--rc, #b8c0c8), 2px 2px 0 1.5px var(--ink); cursor: pointer; transition: transform .12s cubic-bezier(.2, 1.8, .4, 1); overflow: hidden; }
.px .cm-tile .cm-ico { position: absolute; left: 0; right: 0; top: 4px; text-align: center; font-style: normal; font-size: 21px; line-height: 24px; filter: drop-shadow(1px 1px 0 var(--ink)); }
.px .cm-tile .cm-nm { position: absolute; left: 2px; right: 2px; top: 29px; height: 16px; overflow: hidden; text-align: center; font-family: var(--px-small); font-weight: 800; font-size: 6.5px; line-height: 8px; color: var(--bone); text-shadow: 1px 1px 0 var(--ink); white-space: normal; }
.px .cm-tile .cm-st { position: absolute; left: 0; right: 0; bottom: 0; height: 11px; text-align: center; font-style: normal; font-size: 8px; line-height: 11px; letter-spacing: .4px; background: var(--ink); color: #ffd84a; white-space: nowrap; }
.px .cm-tile .cm-st.on { background: #3c8a1c; color: #fff; }
.px .cm-tile .cm-st.got { background: #1c6a9a; color: #fff; }
.px .cm-tile .cm-st.lock { color: #cdbfe0; }
.px .cm-tile .cm-rar { position: absolute; right: 2px; top: 2px; width: 5px; height: 5px; background: var(--rc, #b8c0c8); transform: rotate(45deg); box-shadow: 0 0 0 1px var(--ink); }
.px .cm-tile.locked .cm-ico, .px .cm-tile.locked .cm-mini { opacity: .55; filter: grayscale(.75) drop-shadow(1px 1px 0 var(--ink)); }
.px.cm-shop .cm-tile.locked .cm-ico, .px.cm-shop .cm-tile.locked .cm-mini { opacity: 1; filter: drop-shadow(1px 1px 0 var(--ink)); } /* (à vendre : en couleur, c'est l'envie qui compte) */
.px .cm-tile.worn { box-shadow: 0 0 0 2px #9dff3a, 2px 2px 0 2px var(--ink); }
.px .cm-tile.none .cm-ico { color: #9a8cb0; font-size: 18px; }
.px .cm-tile.on { transform: scale(1.14) rotate(-2deg); z-index: 3; box-shadow: 0 0 0 2px #fff3d6, 0 0 0 4px var(--rc, #ffd84a), 3px 3px 0 3px var(--ink); }
.px .cm-tile.nope { animation: cm-shake .35s; }
/* les plus rares brillent dans la grille (un reflet qui passe, seulement de la position du fond) */
.px .cm-tile[style*="#ffb020"]::after, .px .cm-tile[style*="#ff3b6b"]::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, .35) 50%, transparent 60%) 0 0 / 250% 100% no-repeat; animation: pc-sheen 2.8s ease-in-out infinite; }
/* la carte de combat en réduction dans sa tuile (la vraie carte du HUD, ×0,34) */
.px .cm-tile .cm-mini { position: absolute; left: 1px; top: 8px; width: 45px; height: 20px; overflow: visible; }
.px .cm-tile .cm-mini .phc { left: 0; top: 0; transform: scale(.34); transform-origin: 0 0; pointer-events: none; }
.px .cm-tile .cm-mini .phc .pp { display: none; }

.px .cm-info { position: absolute; left: 0; right: 0; top: 254px; height: 40px; padding: 4px 10px; box-sizing: border-box; background: #1d1030; box-shadow: 0 0 0 2px var(--ink), 4px 4px 0 2px var(--ink); transform: rotate(-.6deg); }
.px .cm-info b { display: inline-block; font-weight: normal; font-size: 17px; line-height: 18px; color: var(--rc, var(--bone)); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; white-space: nowrap; max-width: 230px; vertical-align: middle; }
.px .cm-info .cm-rk { display: inline-block; margin-left: 6px; padding: 0 5px; font-style: normal; font-size: 9px; line-height: 12px; letter-spacing: .6px; background: var(--rc); color: var(--ink); vertical-align: middle; transform: rotate(-3deg); }
.px .cm-info .cm-try { display: inline-block; margin-left: 4px; padding: 0 4px; font-style: normal; font-size: 8px; line-height: 11px; background: #fff3d6; color: var(--ink); vertical-align: middle; transform: rotate(4deg); }
.px .cm-info small { display: block; margin-top: 1px; font-family: var(--px-small); font-weight: 800; font-size: 9px; line-height: 12px; color: #e6d8f2; text-shadow: 1px 1px 0 var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px .cm-help { top: 344px; }

/* les fenêtres : l'achat, pas assez de PB, le choix du perso */
.px .cm-pop { position: absolute; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; background: rgba(10, 4, 18, .62); }
.px .cm-pop.on { display: flex; }
.px .cm-box { width: 300px; padding: 12px 16px 14px; box-sizing: border-box; background: #1d1030; text-align: center; box-shadow: 0 0 0 2.5px var(--ink), 6px 6px 0 2.5px var(--ink), 0 0 0 5px #ffd84a;
  transform: rotate(-1deg); animation: cap-in .3s cubic-bezier(.2, 1.7, .4, 1) both; }
.px .cm-box > b { display: block; font-weight: normal; font-size: 24px; line-height: 26px; color: #ffd84a; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; letter-spacing: 1px; }
.px .cm-box p { margin: 8px 0 10px; font-family: var(--px-small); font-weight: 700; font-size: 12px; line-height: 16px; color: var(--bone); }
.px .cm-box p em { font-style: normal; font-family: var(--px-font); font-size: 15px; color: #ffd84a; }
.px .cm-box p em.nm { color: var(--bone); }
.px .cm-box p small { font-size: 9px; color: #cdbfe0; }
.px .cm-pico { display: inline-block; margin-right: 5px; padding: 0 3px; font-size: 18px; vertical-align: middle; box-shadow: 0 0 0 2px var(--rc); background: #140a20; }
.px .cm-btns { display: flex; justify-content: center; gap: 12px; }
.px .cm-box.cm-pick { width: 470px; }
.px .cm-faces { display: grid; grid-template-columns: repeat(15, 26px); gap: 3px; justify-content: center; margin: 8px 0 6px; }
.px .cm-face { display: block; width: 26px; height: 26px; overflow: hidden; background: #2a1840; box-shadow: 0 0 0 1px var(--ink); cursor: pointer; transition: transform .1s; }
.px .cm-face img { width: 26px; height: 26px; display: block; }
.px .cm-face.cur { box-shadow: 0 0 0 1.5px #9dff3a; }
.px .cm-face.on { transform: scale(1.3); z-index: 2; position: relative; box-shadow: 0 0 0 2px #ffd84a, 2px 2px 0 2px var(--ink); }
.px .cm-box.cm-pick small { font-family: var(--px-small); font-weight: 800; font-size: 9px; color: #cdbfe0; }

/* le tampon ACQUIS ! sur l'objet acheté */
.px .jx-layer .cm-stamp { position: absolute; transform: translate(-50%, -50%) rotate(-14deg); padding: 2px 10px; border: 3px solid #9dff3a; color: #9dff3a; background: rgba(18, 10, 26, .85);
  font-size: 26px; line-height: 28px; letter-spacing: 2px; -webkit-text-stroke: 1px var(--ink); white-space: nowrap; z-index: 9; animation: cm-stamp 1.6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes cm-stamp { 0% { transform: translate(-50%, -50%) rotate(-14deg) scale(3); opacity: 0; } 18% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1.05); opacity: 0; } }

/* ---- l'accueil des classées : les deux entrées ---- */
.px.rk-hub .rk-cosm { display: flex; gap: 8px; margin-top: 8px; }
.px.rk-hub .rk-cbtn { position: relative; flex: 1; height: 27px; padding: 2px 10px 0; box-sizing: border-box; cursor: pointer; transform: rotate(-1deg); transition: transform .14s cubic-bezier(.2, 1.8, .4, 1);
  background: linear-gradient(160deg, #6a2c9a, #3a1460); box-shadow: 0 0 0 2.5px var(--ink), 4px 4px 0 2.5px var(--ink); animation: panel-in .45s cubic-bezier(.2, 1.6, .4, 1) .2s both; }
.px.rk-hub .rk-cbtn.shop { background: linear-gradient(160deg, #e8a91a, #a8640a); transform: rotate(1deg); }
.px.rk-hub .rk-cbtn b { display: block; font-weight: normal; font-size: 14px; line-height: 14px; letter-spacing: 1px; color: var(--bone); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; white-space: nowrap; }
.px.rk-hub .rk-cbtn small { display: block; font-family: var(--px-small); font-weight: 800; font-size: 7px; line-height: 9px; color: #fff3d6; text-shadow: 1px 1px 0 var(--ink); }
.px.rk-hub .rk-cbtn.on { transform: scale(1.07) rotate(-2deg); box-shadow: 0 0 0 2.5px #ffd84a, 4px 4px 0 2.5px var(--ink), 0 0 14px rgba(255, 216, 74, .55); z-index: 2; }

/* ---- l'écran de fin : ce que la bourse a gagné ---- */
.px.rk-end .rk-ebourse { position: absolute; left: 370px; top: 214px; width: 140px; text-align: left; white-space: normal; line-height: 13px; z-index: 4; opacity: 0; font-family: var(--px-small); font-weight: 800; font-size: 10px; color: #e6d8f2; text-shadow: 1px 1px 0 var(--ink); }
.px.rk-end .rk-ebourse.in { opacity: 1; animation: slam .4s cubic-bezier(.2, 1.8, .4, 1); }
.px.rk-end .rk-ebourse i { font-style: normal; color: #ffd84a; font-size: 13px; margin-right: 2px; }
.px.rk-end .rk-ebourse b { font-family: var(--px-font); font-weight: normal; font-size: 18px; color: #ffd84a; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; margin-right: 2px; }
.px.rk-end .rk-ebourse small { display: block; font-size: 9px; color: #cdbfe0; }

/* la BANQUE de PB de l'écran de fin (12 nov. 2026) : les PB y volent en même temps que vers la jauge du rang */
.px.rk-end .rk-ebank { position: absolute; left: 440px; top: 258px; width: 182px; height: 46px; z-index: 5; opacity: 0; transform: rotate(-2deg);
  background: linear-gradient(180deg, #2a1640, #160a24); box-shadow: 0 0 0 3px var(--ink), 4px 4px 0 3px var(--ink), inset 0 0 0 2px #ffd84a55;
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: 16px 1fr; align-items: center; }
.px.rk-end .rk-ebank.in { opacity: 1; animation: slam .4s cubic-bezier(.2, 1.8, .4, 1); }
.px.rk-end .rk-ebank .vault { grid-row: 1 / 3; justify-self: center; font-style: normal; font-size: 26px; color: #ffd84a; text-shadow: 2px 2px 0 var(--ink), 0 0 10px #ffd84a88; }
.px.rk-end .rk-ebank small { font-family: var(--px-small); font-weight: 800; font-size: 9px; letter-spacing: 1px; color: #c9b8ff; align-self: end; }
.px.rk-end .rk-ebank b { font-family: var(--px-font); font-weight: normal; font-size: 22px; line-height: 24px; color: #ffd84a; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.px.rk-end .rk-ebank em { position: absolute; left: 4px; top: -16px; font-style: normal; font-family: var(--px-font); font-size: 14px; color: #9dff3a; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.px.rk-end .rk-ebank em.on { opacity: 1; transform: none; }
.px.rk-end .rk-ebank.in.bump { animation: rkBankBump .18s ease-out; }
@keyframes rkBankBump { 0% { transform: rotate(-2deg) scale(1); } 40% { transform: rotate(-2deg) scale(1.08); } 100% { transform: rotate(-2deg) scale(1); } }
.px.rk-end .rk-tok { position: absolute; left: 0; top: 0; z-index: 9; pointer-events: none; margin: -7px 0 0 -7px; width: 14px; height: 14px; font-style: normal; }
.px.rk-end .rk-tok.bank { font-size: 15px; line-height: 14px; text-align: center; color: #ffd84a; text-shadow: 1px 1px 0 var(--ink), 0 0 8px #ffd84a; }
.px.rk-end .rk-tok.rank { border-radius: 50%; background: radial-gradient(circle, #f4ffd6 0 30%, #9dff3a 55%, #9dff3a00 72%); }
.px.rk-end .rk-ebank.park { top: 40px; left: 466px; transform: rotate(-2deg) scale(.82); transition: top .45s cubic-bezier(.3, 1.4, .5, 1), left .45s, transform .45s; animation: none; }
.px.rk-end .rk-ebank.park em { opacity: 0; }
