/* =============================================================================
   BOUTIQUE, habillage de la home (home-arena.css) : la boutique s'ouvre sur la plage floutée,
   avec les mêmes boutons (contour fin teinté, socle, ombre douce, pastels plage) que le menu. Seul l'habillage
   change : la structure et le comportement restent ceux de shop-arcade.css et shop-screen.js.
   Le préfixe :is(#arcade-panel-shop, #arcade-panel-collection) passe devant l'habillage commun des contrôles (game-controls.css).
   ============================================================================= */

/* ---- La plage en fond : le menu derrière s'efface, la scène floutée reste ---- */
.arcade-home-body .arcade-cabinet:has(:is(#arcade-panel-shop, #arcade-panel-collection):not([hidden])) :is(
  .arcade-menu-nav, .home-player-stage, .home-title-header, .arcade-hud-account, .arcade-challenges,
  .arcade-attract .home-bottom-bar > .language-switcher, .arcade-selection-hint
) { visibility: hidden; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) {
  background: var(--panel-veil);
  color: var(--home-white);
}

/* ---- En-tête : titre et logo comme la home, Retour en pastille marine ---- */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .arcade-page-header {
  border-bottom: 0; padding-bottom: 0;
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .arcade-page-header .arcade-page-title {
  color: var(--home-white); font: clamp(22px, 4.4cqh, 38px)/1 var(--game-display-font); letter-spacing: .02em;
  -webkit-text-stroke: .16em var(--home-outline); paint-order: stroke fill; text-shadow: 0 .09em 0 var(--home-outline);
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .arcade-page-header .game-brand {
  filter: drop-shadow(2px 0 0 var(--home-outline)) drop-shadow(-2px 0 0 var(--home-outline))
    drop-shadow(0 2px 0 var(--home-outline)) drop-shadow(0 -2px 0 var(--home-outline)) drop-shadow(0 .5cqh 0 var(--home-outline));
}
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .arcade-page-header .arcade-page-back {
  display: inline-flex; align-items: center; gap: .8cqw;
  min-height: clamp(36px, 5.6cqh, 44px); padding: 0 1.6cqw; box-sizing: border-box;
  border: var(--btn-edge) solid var(--slab-edge); border-radius: 999px;
  background: linear-gradient(180deg, var(--slab-top), var(--slab-bottom)) padding-box;
  box-shadow: inset 0 .35cqh 0 rgb(255 255 255 / .3), inset 0 -.7cqh 0 var(--slab-base); --drop-soft: var(--btn-soft);
  color: var(--home-white); font: clamp(14px, 2.4cqh, 20px)/1 var(--game-display-font); letter-spacing: .03em; text-transform: uppercase;
  filter: var(--drop-soft) var(--fx, );
  &::after { content: none; }
  kbd { color: var(--home-steel); font-size: 12px; }
  &:is(:hover, :focus-visible, .is-selected) { --fx: brightness(1.12); --drop-soft: var(--btn-soft-hover); background: linear-gradient(180deg, var(--slab-top), var(--slab-bottom)) padding-box; color: var(--home-white); outline: 0; transform: none; translate: 0 -2px; }
  &:active { translate: 0 2px; --drop-soft: var(--btn-soft-press); }
}

/* ---- Rayons en pastilles, porte-monnaie de la home ---- */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-toolbar { border-bottom: 0; padding-bottom: 0; }
body.arcade-home-body :is(:is(#arcade-panel-shop, #arcade-panel-collection) .shop-filters, #arcade-panel-challenges .challenges-tabs) { gap: clamp(4px, .8cqw, 10px); }
/* Les onglets Jour / Semaine de la fiche DÉFIS sont les mêmes pastilles. */
body.arcade-home-body .arcade-cabinet :is(:is(#arcade-panel-shop, #arcade-panel-collection) .shop-filter, #arcade-panel-challenges .challenges-tab) {
  min-height: clamp(32px, 5cqh, 40px); padding: 0 clamp(8px, 1.3cqw, 16px); box-sizing: border-box;
  border: var(--btn-edge) solid var(--slab-edge); border-radius: 999px;
  background: linear-gradient(180deg, var(--slab-top), var(--slab-bottom)) padding-box;
  box-shadow: inset 0 .3cqh 0 rgb(255 255 255 / .3), inset 0 -.6cqh 0 var(--slab-base); --drop-soft: var(--btn-soft);
  color: var(--home-white); font: clamp(12px, 2.1cqh, 18px)/1 var(--game-display-font); letter-spacing: .03em; text-transform: uppercase;
  filter: var(--drop-soft) var(--fx, );
  &::after { content: none; }
  &:is(:hover, :focus-visible, .is-selected) { --fx: brightness(1.12); --drop-soft: var(--btn-soft-hover); outline: 0; translate: 0 -2px; color: var(--home-white); background: linear-gradient(180deg, var(--slab-top), var(--slab-bottom)) padding-box; }
  &[aria-selected='true'] {
    border-color: #2f6e5b;
    background: linear-gradient(180deg, #d4f5e8, #9fd9c3) padding-box; color: var(--home-outline);
    box-shadow: inset 0 .3cqh 0 rgb(255 255 255 / .6), inset 0 -.6cqh 0 #5e9a84;
  }
  &[aria-selected='true']:is(:hover, :focus-visible, .is-selected) { background: linear-gradient(180deg, #d4f5e8, #9fd9c3) padding-box; color: var(--home-outline); }
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-wallet {
  display: inline-flex; align-items: center; gap: .9cqw;
  height: 5.6cqh; min-height: 0; margin-left: 3cqh; padding: 0 1.6cqw 0 0; box-sizing: border-box;
  border: var(--btn-edge) solid var(--slab-edge); border-radius: 999px;
  background: linear-gradient(180deg, var(--slab-bottom), var(--slab-base)) padding-box;
  filter: var(--btn-soft);
  color: var(--home-steel); font: clamp(13px, 2.2cqh, 17px)/1 var(--game-display-font); letter-spacing: .04em;
  .coin-icon { width: 64px; height: 64px; margin: -12px 0 -12px -32px; background-size: 64px 64px; filter: drop-shadow(0 3px 0 var(--home-outline)); }
  strong {
    color: var(--home-white); font: clamp(18px, 3.4cqh, 28px)/1 var(--game-display-font); letter-spacing: .02em;
    -webkit-text-stroke: .16em var(--home-outline); paint-order: stroke fill; text-shadow: 0 .09em 0 var(--home-outline);
  }
}

/* ---- Cartes du rayon : autocollants crème, rareté au socle et au contour ---- */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-catalog { padding: 10px 12px 16px; }
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item {
  --card-top: var(--block-top); --card-bottom: var(--block-bottom);
  /* The rarity colours only the card's tag: the cards stay neutral so the items read first. */
  --shop-rarity: #8fd0b9; --shop-rarity-ink: #2f6e5b;
  border: 1px solid var(--block-edge); border-radius: 1cqh;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom)) padding-box;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / var(--block-gloss)), inset 0 -3px 0 var(--block-base);
  --drop-soft: drop-shadow(0 .8cqh 1cqh color-mix(in srgb, var(--screen-shadow) 35%, transparent));
  color: var(--block-ink);
  filter: var(--drop-soft) var(--fx, );
  transition: translate 160ms cubic-bezier(0.22, 1, 0.36, 1), filter 120ms ease-out;
  &::after { content: none; }
  &:is(:hover, .is-selected, :focus-visible) {
    background: linear-gradient(180deg, var(--card-top), var(--card-bottom)) padding-box;
    outline: 0; translate: 0 round(-.4cqh, 1px); --drop-soft: drop-shadow(0 1.4cqh 1.4cqh color-mix(in srgb, var(--screen-shadow) 40%, transparent)); --fx: brightness(1.04);
  }
  &:active { translate: 0 round(.4cqh, 1px); --drop-soft: var(--btn-soft-press); transition-duration: 60ms; }
  @media (prefers-reduced-motion: reduce) { transition: none; }
}
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item[data-rarity='rare'] { --shop-rarity: #8ec5ef; --shop-rarity-ink: #2c5f93; }
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item[data-rarity='epic'] { --shop-rarity: #f2a3cf; --shop-rarity-ink: #9c3a72; }
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item[data-rarity='prestige'] { --shop-rarity: #f2cf6b; --shop-rarity-ink: #8a6413; }
/* L'objet choisi (shop-screen.js) : un liseré menthe, même quand le curseur est sur Acheter. */
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item.is-current {
  border-color: var(--home-mint);
  box-shadow: inset 0 0 0 1px var(--home-mint), inset 0 -3px 0 var(--block-base);
}

body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-art:has(> .shop-blob)::before { background: color-mix(in srgb, var(--screen-bg) 45%, transparent); }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-art-icon { color: var(--block-ink); text-shadow: none; opacity: .55; }
/* In px: an aisle card is its own size container, so cqh there would follow the card. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-copy small {
  align-self: center; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--shop-rarity) 55%, white); color: var(--shop-rarity-ink);
  font: 12px/1 var(--game-display-font); letter-spacing: .05em;
}
/* Centred in every card, the featured poster's caption included. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection).is-featured .shop-item-copy { align-items: center; justify-content: center; text-align: center; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection).is-featured .shop-item-meta { justify-content: center; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-meta > span:first-child { color: inherit; opacity: .75; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-meta > span + span::before { color: inherit; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-copy > strong { color: var(--block-ink); font-family: var(--game-display-font); letter-spacing: .01em; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-price { color: var(--block-ink); font-family: var(--game-display-font); letter-spacing: .01em; }
/* The full price, struck: a thin line so the digits stay readable at 1x. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-price .shop-price-full { color: var(--block-muted); text-decoration-thickness: 1px; opacity: .85; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-price.is-owned { color: var(--block-good); }
/* Owned items close each rayon, after what is for sale (shop-screen.js): toned down so what is still for sale
   stands out, never disabled (a click equips them). Full colors back on the chosen card and on hover. */
body.arcade-home-body #arcade-panel-shop .shop-item:is(.is-owned, .is-equipped):not(.is-current):not(:hover) {
  opacity: .62; filter: saturate(.45);
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-price:is(.is-prestige, .is-expensive) { color: var(--block-muted); }
/* Promo du jour : une pastille corail en coin de carte. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-deal-tag {
  top: 8px; left: 8px;
  padding: 3px 8px; border: 2px solid var(--home-outline); border-radius: 999px;
  background: #ff9d8f; color: var(--home-outline);
  font: 14px/1 var(--game-display-font); letter-spacing: .02em;
  &::before { content: none; }
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection).is-featured .shop-catalog > li:first-child .shop-deal-tag { font-size: clamp(14px, 2.6cqh, 22px); }

/* À la une : l'affiche vedette, à peine teintée de menthe. */
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection).is-featured .shop-catalog > li:first-child .shop-item {
  --card-top: color-mix(in srgb, var(--home-mint) 14%, var(--block-top));
  --card-bottom: color-mix(in srgb, var(--home-mint) 6%, var(--block-bottom));
  /* No corner sparkle: the mint tint and the size already say « à la une ». */
  &::before { content: none; }
}
/* Its name is big, in capitals, and never cut inside a word: as tall as the screen allows, and no
   wider than its column (19cqi holds the longest one-word name, « Citrouille »). */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection).is-featured .shop-catalog > li:first-child .shop-item-copy { container-type: inline-size; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection).is-featured .shop-catalog > li:first-child .shop-item-copy > strong {
  color: var(--block-ink); font-size: clamp(20px, min(5cqh, 19cqi), 44px); line-height: .95;
  overflow-wrap: normal; word-break: keep-all; hyphens: none;
}

/* Pagination : flèches en pastilles du thème ; points au liseré de l'écran, la page courante dans l'accent. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-pager { color: var(--home-white); font-family: var(--game-display-font); }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-pager-title { color: var(--home-white); -webkit-text-stroke: .14em var(--home-outline); paint-order: stroke fill; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-pager-count { color: var(--home-steel); }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-pager-dots > span { width: 8px; height: 8px; border-radius: 50%; background: var(--screen-line); }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-pager-dots > span.is-current { background: var(--screen-accent); }
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-pager-step {
  border: var(--btn-edge) solid var(--slab-edge); border-radius: 50%;
  background: linear-gradient(180deg, var(--slab-top), var(--slab-bottom)) padding-box; box-shadow: none;
  filter: var(--btn-soft);
  &::after { content: none; }
  /* The pixel arrow is drawn left-aligned in its box: nudged so it sits optically centred. */
  display: grid; place-items: center;
  .look-pixel-arrow { background: var(--home-white); translate: 1px 0; }
  .look-pixel-arrow-left { translate: -1px 0; }
  &:hover { background: linear-gradient(180deg, var(--slab-top), var(--slab-bottom)) padding-box; filter: var(--btn-soft-hover) brightness(1.12); }
  &:disabled { opacity: .4; }
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-pager-step:hover .look-pixel-arrow { background: var(--home-white); }

/* ---- L'étal : un grand panneau crème ---- */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail {
  padding: clamp(10px, 1.8cqh, 16px); border: .5cqh solid var(--home-outline); border-radius: 2cqh;
  background: linear-gradient(180deg, var(--block-top), var(--block-bottom)) padding-box;
  box-shadow: inset 0 .4cqh 0 rgb(255 255 255 / var(--block-gloss)), inset 0 -.9cqh 0 var(--block-base);
  filter: drop-shadow(0 .7cqh 0 var(--home-outline));
  color: var(--block-ink); overflow: hidden;
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-counter { margin: calc(clamp(10px, 1.8cqh, 16px) * -1) calc(clamp(10px, 1.8cqh, 16px) * -1) 0; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-scene { border-bottom: 0; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-meta > span:first-child { color: var(--block-muted); font-family: var(--game-display-font); letter-spacing: .05em; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge {
  padding: .4cqh .9cqw; border-radius: 999px; background: #b9ead6; color: #2f6e5b;
  font: clamp(11px, 1.8cqh, 14px)/1 var(--game-display-font); letter-spacing: .05em;
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge[data-rarity='rare'] { background: #cfe5f8; color: #2c5f93; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge[data-rarity='epic'] { background: #f8d2e7; color: #9c3a72; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge[data-rarity='prestige'] { background: #f8e3a6; color: #8a6413; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-copy h3 { color: var(--block-ink); font-family: var(--game-display-font); letter-spacing: .01em; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-status { color: var(--block-muted); font-family: var(--game-display-font); }

/* Acheter : la grande action, en menthe comme JOUER. */
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-buy {
  min-height: clamp(44px, 7.6cqh, 60px); padding: 0 1.4cqw;
  border: var(--btn-edge) solid #2f6e5b; border-radius: 1cqh;
  background: linear-gradient(180deg, #d4f5e8, #9fd9c3) padding-box;
  box-shadow: inset 0 .4cqh 0 rgb(255 255 255 / .6), inset 0 -1.1cqh 0 #5e9a84; --drop-soft: var(--btn-soft);
  color: var(--home-outline); font: clamp(18px, 3.2cqh, 26px)/1 var(--game-display-font); letter-spacing: .03em;
  filter: var(--drop-soft) var(--fx, );
  &::after { content: none; }
  &:is(:hover, .is-selected, :focus-visible) { background: linear-gradient(180deg, #d4f5e8, #9fd9c3) padding-box; color: var(--home-outline); outline: 0; --fx: brightness(1.05); --drop-soft: var(--btn-soft-hover); translate: 0 -2px; }
  &:active { translate: 0 2px; --drop-soft: var(--btn-soft-press); }
  &.is-disabled { border-color: #8f897a; background: linear-gradient(180deg, #eceae3, #d9d5ca) padding-box; color: var(--block-muted); box-shadow: inset 0 -.8cqh 0 #bdb7a8; --fx: none; --drop-soft: var(--btn-soft); translate: none; }
}

/* Achat réussi : l'étal s'illumine deux fois en doré. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-screen.is-bought .shop-scene { animation: none; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-screen.is-bought .shop-detail { animation: shop-arena-bought 480ms steps(2) 2; }
@keyframes shop-arena-bought { 50% { box-shadow: inset 0 0 0 .6cqh #f2cf6b, inset 0 -.9cqh 0 var(--block-base); } }
@media (prefers-reduced-motion: reduce) { body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-screen.is-bought .shop-detail { animation: none; } }

/* ---- Lisibilité (2026-10) ---- */
/* La rareté : un petit texte dans sa couleur, plus une pastille sur chaque carte. Les couleurs claires
   se lisent sur le fond sombre de l'écran. */
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item { --shop-rarity-text: #8fd0b9; }
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item[data-rarity='rare'] { --shop-rarity-text: #8ec5ef; }
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item[data-rarity='epic'] { --shop-rarity-text: #f2a3cf; }
body.arcade-home-body .arcade-cabinet :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item[data-rarity='prestige'] { --shop-rarity-text: #f2cf6b; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-copy small {
  padding: 0; border-radius: 0; background: none; color: var(--shop-rarity-text);
  font: clamp(11px, 1.9cqh, 14px)/1 var(--game-display-font); letter-spacing: .03em;
}
/* À la une : « ENSEMBLE · ÉPIQUE » tient sur une ligne, la catégorie en gris, la rareté en couleur. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-copy .shop-item-meta { flex-wrap: nowrap; white-space: nowrap; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-meta > span:first-child { color: var(--screen-muted); opacity: 1; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item-meta > span + span::before { color: var(--screen-muted); }
/* La fiche : le type sur une ligne (coupé proprement s'il est trop long), la rareté en texte coloré. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge {
  padding: 0; border-radius: 0; background: none; color: #8fd0b9;
  font: clamp(11px, 1.9cqh, 14px)/1 var(--game-display-font); letter-spacing: .03em;
}
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge[data-rarity='rare'] { background: none; color: #8ec5ef; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge[data-rarity='epic'] { background: none; color: #f2a3cf; }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-badge[data-rarity='prestige'] { background: none; color: #f2cf6b; }
/* Animations : le drapeau à damier du coin de carte ne disait rien ; la fiche dit « fin de partie ». */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-item .shop-art-icon { display: none; }
/* Emotes : la bulle, puis la rareté et le prix, groupés au centre de la carte. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection):not(.is-featured) .shop-item[data-shop-type='emote'] {
  justify-content: center; gap: clamp(10px, 2.4cqh, 20px);
  .shop-item-art { flex: 0 0 auto; height: auto; min-height: 0; margin-top: auto; padding: 0; display: grid; place-items: center; overflow: visible; }
  .shop-item-art > .shop-emote-bubble { translate: 0 0; }
  .shop-item-copy { flex: 0 0 auto; margin-bottom: auto; padding-bottom: 0; }
}
/* Le porte-monnaie : ce qu'on peut dépenser se voit d'un coup d'œil, sans crier. Une pastille à peine
   dorée, la pièce dans sa pastille sans déborder, le solde en grand et en clair. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-wallet {
  gap: 9px; height: auto; min-height: clamp(38px, 6cqh, 50px); margin-left: 0; padding: 4px 16px 4px 6px;
  border: 1px solid color-mix(in srgb, var(--screen-accent) 22%, var(--screen-line));
  background: color-mix(in srgb, var(--screen-accent) 5%, var(--screen-panel)); filter: none;
  color: var(--screen-muted);
  .coin-icon { width: clamp(28px, 4.8cqh, 38px); height: clamp(28px, 4.8cqh, 38px); margin: 0; background-size: contain; filter: none; }
  strong { color: var(--screen-ink); font-size: clamp(19px, 3.6cqh, 28px); -webkit-text-stroke: 0; text-shadow: none; font-variant-numeric: tabular-nums; }
}
/* La fiche : moins de vide entre le marchand et le perso essayé. */
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-scene:not(:has(.shop-detail-stage[data-type='anim'])) { --shop-stage-overlap: clamp(36px, 12cqh, 96px); }
body.arcade-home-body :is(#arcade-panel-shop, #arcade-panel-collection) .shop-detail-stage { min-height: 96px; }

/* =============================================================================
   COLLECTION (collection-screen.js) : l'habillage de la boutique ci-dessus (étendu à
   #arcade-panel-collection), plus la jauge du rayon, dans le style de la jauge d'XP de l'accueil
   (home-arena.css .arcade-hud-xp), à plat dans l'accent, et les objets manquants.
   ============================================================================= */
body.arcade-home-body #arcade-panel-collection .shop-toolbar { gap: clamp(10px, 2cqw, 24px); }
body.arcade-home-body #arcade-panel-collection .shop-filters { flex-wrap: wrap; }
.collection-progress {
  display: grid; grid-template-areas: 'head' 'bar' 'total';
  align-items: end; gap: 4px; flex: none; width: clamp(170px, 25cqw, 290px);
  color: var(--home-white); font-family: var(--game-display-font);
}
.collection-progress-head { grid-area: head; display: flex; align-items: baseline; justify-content: space-between; gap: .8cqw; min-width: 0; }
.collection-progress-shelf {
  overflow: hidden; color: var(--home-white); font-size: clamp(13px, 2.3cqh, 18px); letter-spacing: .03em;
  text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.collection-progress-count {
  color: var(--home-white); font: clamp(16px, 3cqh, 24px)/1 var(--game-display-font); letter-spacing: .02em; white-space: nowrap;
}
.collection-progress-total { grid-area: total; justify-self: end; display: inline-flex; align-items: baseline; gap: .5cqw; color: var(--home-steel); font-size: clamp(11px, 1.9cqh, 15px); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.collection-progress-total b { color: var(--home-white); font-weight: inherit; }
.collection-progress-bar {
  grid-area: bar; height: 12px; box-sizing: border-box; overflow: hidden;
  border: 1px solid var(--screen-line); border-radius: 4px; background: var(--screen-bg);
}
/* The fill is scaled (collection-screen.js sets --collection-fill), not resized: no layout per step. */
.collection-progress-bar i {
  display: block; width: 100%; height: 100%; background: var(--screen-accent);
  transform: scaleX(var(--collection-fill, 0)); transform-origin: left center; transition: transform 360ms steps(8);
}
.collection-progress.is-complete .collection-progress-bar i { background: var(--screen-mint); }
@media (prefers-reduced-motion: reduce) { .collection-progress-bar i { transition: none; } }
/* Un rayon complet : une étoile dans l'accent sur sa pastille. */
body.arcade-home-body .arcade-cabinet #arcade-panel-collection .collection-tab.is-complete::before {
  content: '★'; margin-right: .4em; color: var(--screen-accent);
}
/* Pas encore obtenu : le perso grisé, la carte en retrait (comme ce qui est déjà possédé dans la boutique). */
body.arcade-home-body #arcade-panel-collection .shop-item.is-missing .shop-blob,
body.arcade-home-body #arcade-panel-collection .shop-item.is-missing .shop-card-canvas,
body.arcade-home-body #arcade-panel-collection .shop-detail-stage.is-missing :is(.shop-blob, .shop-stage-podium, .shop-stage-canvas) { filter: grayscale(1) brightness(.78) contrast(.9); opacity: .85; }
body.arcade-home-body #arcade-panel-collection .shop-item.is-missing .shop-emote-bubble { opacity: .6; }
/* « Chez le Marchand » : sur un petit cadre, le libellé passe sur deux lignes équilibrées plutôt que
   d'être coupé, comme celui de la boutique (game-controls.css). */
body.arcade-home-body #arcade-panel-collection .shop-buy [data-collection-action-label] { min-width: 0; white-space: normal; text-wrap: balance; line-height: 1.05; }
/* L'inverse de la boutique : ce qui est possédé reste vif, ce qui manque est en retrait. */
body.arcade-home-body #arcade-panel-collection .shop-item.is-missing:not(.is-current):not(:hover) { opacity: .72; }

/* ---- Inventaire : des cases plutôt que des cartes de vitrine ----
   Cinq cases par rangée, trois rangées par page (collection-screen.js ROWS). Une case ne montre que
   l'objet ; nom, prix et rareté sont sur la fiche. La rareté se lit au liseré, l'état en coin. */
body.arcade-home-body #arcade-panel-collection .shop-catalog {
  grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.3cqh, 12px); padding: 8px 10px 12px;
}
body.arcade-home-body .arcade-cabinet #arcade-panel-collection .shop-item.collection-slot {
  position: relative; display: grid; place-items: center; padding: 0; overflow: hidden;
  border: var(--btn-edge, 2px) solid color-mix(in srgb, var(--shop-rarity, #9fd9c3) 70%, transparent); border-radius: 12px;
  /* Owned: a flat raised face; missing: the hollow of the screen (below). */
  background: var(--screen-raised);
  box-shadow: none;
  translate: none; filter: none;
}
/* Aucune ombre interne dans aucun état (celles des cartes de la boutique faisaient une ligne de
   rareté au survol) : le liseré seul porte la rareté. */
body.arcade-home-body .arcade-cabinet #arcade-panel-collection .shop-item.collection-slot:is(:hover, .is-selected, :focus-visible, .is-current, :active) { box-shadow: none; }
/* Un emplacement vide : fond creusé, liseré éteint. */
body.arcade-home-body .arcade-cabinet #arcade-panel-collection .shop-item.collection-slot.is-missing {
  border-color: var(--screen-line); background: var(--screen-bg); box-shadow: none;
}
body.arcade-home-body .arcade-cabinet #arcade-panel-collection .shop-item.collection-slot:is(.is-current, :hover) { border-color: var(--screen-accent); }
body.arcade-home-body .arcade-cabinet #arcade-panel-collection .collection-slot .shop-item-art {
  position: absolute; inset: 0; display: grid; place-items: center; width: auto; height: auto; min-height: 0; padding: 0; translate: none;
}
/* Le sprite (120 px) remplit la largeur de la case ; le perso est dans sa moitié basse (rangées 40
   à 117) : remonté pour que le perso, pas l'image, soit au centre de la case. */
body.arcade-home-body #arcade-panel-collection .collection-slot :is(.shop-blob, .shop-card-canvas) {
  width: 104%; max-width: 140px; height: auto; aspect-ratio: 1; translate: 0 -13%;
}
body.arcade-home-body #arcade-panel-collection .collection-slot .shop-item-art::before { display: none; }
body.arcade-home-body #arcade-panel-collection .collection-slot .shop-art-icon { display: none; }
/* Une animation garde de la place au-dessus du perso pour ses sauts : remontée dans la case. */
body.arcade-home-body #arcade-panel-collection .collection-slot .shop-card-canvas { width: 128%; max-width: 172px; translate: 0 -14%; }
/* Une emote : sa bulle au milieu de la case, à sa largeur, sur deux lignes au plus pour les longues. */
body.arcade-home-body .arcade-cabinet #arcade-panel-collection .collection-slot .shop-item-art:has(> .shop-emote-bubble) { translate: none; }
body.arcade-home-body #arcade-panel-collection .collection-slot .shop-emote-bubble {
  position: relative; inset: auto; translate: none; width: max-content; max-width: 88%;
  font-size: clamp(11px, 2cqh, 15px); line-height: 1.1; padding: 4px 8px; white-space: normal; text-wrap: balance; word-break: keep-all; text-align: center;
}
.collection-slot-mark { position: absolute; top: 6px; right: 6px; z-index: 2; display: grid; place-items: center; }
.collection-slot-mark.is-worn {
  padding: 4px 8px 3px; border-radius: 4px; background: var(--screen-accent); color: var(--screen-accent-ink);
  font: 13px/1 var(--game-display-font); letter-spacing: .03em;
}
.collection-slot-mark.is-locked { color: var(--screen-muted); font-size: 15px; }
/* The detail panel has no merchant's counter to tuck under: the try-on stage sits in its own space,
   a little larger, so no empty band opens between it and the item's name. */
body.arcade-home-body #arcade-panel-collection .shop-detail-stage { margin-top: 0; }
body.arcade-home-body #arcade-panel-collection .shop-detail-stage:not([data-type='emote']) .shop-stage-scene { width: clamp(150px, 44cqh, 320px); }

