/* Styles de boîte par console. Chaque style s'appuie sur une famille de boîtier (BOX_FAMILY dans js/design.js)
   et n'écrit que ses différences :
     - carton (base css/gamebox-nes.css)      : snes, n64, gb, gbc, gba
     - boîtier CD (base css/gamebox-ps1.css)   : saturn, dc
     - boîtier DVD (base css/gamebox-ps2.css)  : sms, md, gc, xbox, wii, ds, psp, ps3, x360
   Couleurs et proportions inspirées des boîtes européennes (PAL) ; aucun logo officiel, le nom de la
   console est écrit en texte. Les raretés hautes gardent leur bandeau argent / or / holographique. */

/* ==== Formats (largeur / hauteur réelles) ============================================================
   --half-h = demi-hauteur en cqw = 50 × hauteur / largeur. */
.card.gbox--ps3 { aspect-ratio: 135 / 171; }  .gbox--ps3 { --half-h: 63.3cqw; --depth: 10cqw; }
.card.gbox--ds  { aspect-ratio: 125 / 137; }  .gbox--ds  { --half-h: 54.8cqw; --depth: 11cqw; }
.card.gbox--psp { aspect-ratio: 104 / 180; }  .gbox--psp { --half-h: 86.5cqw; --depth: 13cqw; }
.card:is(.gbox--gb, .gbox--gbc, .gbox--gba) { aspect-ratio: 125 / 140; }
.gbox:is(.gbox--gb, .gbox--gbc, .gbox--gba) { --half-h: 56cqw; --depth: 18cqw; }
.gbox:is(.gbox--md, .gbox--sms) { --depth: 15cqw; } /* boîtier « clamshell » épais */
/* Formats mélangés (style « Auto ») : les boîtes se posent sur la même ligne, comme sur une étagère. */
.card-grid > :has(.gbox), .card-grid > .gbox { align-self: end; }
/* Le boîtier UMD est très haut : on le réduit dans les grandes vues. */
.zoom-stage .card.gbox--psp { --w: min(330px, 70vw, calc((100dvh - 150px) * 104 / 180)); }
.reveal-slot .card.gbox--psp { --w: min(240px, 60vw, calc((100dvh - 360px) * 104 / 180)); }
.style-preview .card.gbox--psp { --w: 118px; }

/* ==== Famille « boîtier DVD » ========================================================================= */
/* GameCube : petit boîtier noir, bandeau indigo. */
.gbox--gc { --case: #2B2733; --case-dark: #141219; --case-light: #4C465C; --sleeve: #33307A; }
.gbox--gc .gb-band { border-bottom: .7cqw solid #B9B6D8; }
.gbox--gc .gb-platform { font-style: normal; letter-spacing: .06em; text-transform: uppercase; font-size: 3.8cqw; }

/* Xbox : boîtier noir, bandeau noir souligné de vert. */
.gbox--xbox { --case: #1E211E; --case-dark: #0C0E0C; --case-light: #3A3F39; --sleeve: #0E0F0E; }
.gbox--xbox .gb-band { border-bottom: .9cqw solid #5CB82C; }
.gbox--xbox .gb-platform { color: #8BD45A; font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.gbox--xbox .gbox-spine { box-shadow: inset 0 0 0 .9cqw #3F8A1E, inset 0 12cqw 0 var(--case-dark); }

/* Xbox 360 : boîtier vert, bandeau blanc qui vire au vert. */
.gbox--x360 { --case: #4E9A2A; --case-dark: #2E6618; --case-light: #7CC24E; --sleeve: #F4F6F2; }
.gbox--x360 .gb-band { background: linear-gradient(180deg, #FFFFFF, #E4ECDD); color: var(--ink); border-bottom: .8cqw solid #5DAE32; }
.gbox--x360 .gb-platform { color: #3F8A1E; font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.gbox--x360 .gb-rarity { color: #55605A; }
.gbox--x360 .gb-band .pips i { box-shadow: inset 0 0 0 .5cqw #55605A; }
.gbox--x360 .gb-band .pips i.on { background: #55605A; }
.gbox--x360 .gbox-spine { background: linear-gradient(180deg, #FFFFFF, #E4ECDD); box-shadow: inset 0 0 0 .9cqw var(--case), inset 0 12cqw 0 #5DAE32; }
.gbox--x360 .gbox-spine span { color: var(--ink); }

/* Wii : boîtier blanc, bandeau blanc, filet gris. */
.gbox--wii { --case: #EEEFF2; --case-dark: #C4C6CE; --case-light: #FFFFFF; --sleeve: #FBFBFC; }
.gbox--wii .gb-band { color: var(--ink); border-bottom: .5cqw solid #B9BCC6; }
.gbox--wii .gb-platform { color: #8A8F9C; font-style: normal; font-size: 5cqw; letter-spacing: .02em; }
.gbox--wii .gb-rarity { color: #6D7280; }
.gbox--wii .gb-band .pips i { box-shadow: inset 0 0 0 .5cqw #8A8F9C; }
.gbox--wii .gb-band .pips i.on { background: #8A8F9C; }
.gbox--wii .gbox-front { box-shadow: inset 0 0 0 .5cqw var(--case-dark), inset 0 0 5cqw rgba(60, 60, 80, .12); }
.gbox--wii .gbox-spine { background: #FBFBFC; box-shadow: inset 0 0 0 .9cqw var(--case), inset 0 12cqw 0 #DADCE2; }
.gbox--wii .gbox-spine span { color: var(--ink); }
.gbox--wii :is(.gb-seam) { background: rgba(58, 44, 64, .3); }
.gbox--wii .gb-notch { background: radial-gradient(ellipse at 40% 50%, rgba(58, 44, 64, .3), rgba(58, 44, 64, .08) 70%); }

/* PS3 : boîtier Blu-ray bleuté, plus court, bandeau noir argenté. */
.gbox--ps3 { --case: #3E5FA0; --case-dark: #243A6A; --case-light: #7E9AD0; --sleeve: #0E0E12; }
.gbox--ps3 .gb-band { background: linear-gradient(180deg, #2A2A30, #0E0E12); border-bottom: .5cqw solid #9EA3B0; }
.gbox--ps3 .gb-platform { font-style: normal; letter-spacing: .12em; text-transform: uppercase; font-size: 3.6cqw; color: #E6E8EE; }
.gbox--ps3 .gb-title { font-size: 5.8cqw; }

/* Nintendo DS : petit boîtier gris presque carré, bandeau blanc argenté. */
.gbox--ds { --case: #D5D6DC; --case-dark: #A3A6B0; --case-light: #F2F2F5; --sleeve: #F7F7F9; }
.gbox--ds .gb-band { background: linear-gradient(180deg, #FFFFFF, #DCDDE3); color: var(--ink); border-bottom: .6cqw solid #A3A6B0; }
.gbox--ds .gb-platform { color: #6D7280; font-style: normal; text-transform: uppercase; letter-spacing: .06em; font-size: 3.8cqw; }
.gbox--ds .gb-rarity { color: #6D7280; }
.gbox--ds .gb-band .pips i { box-shadow: inset 0 0 0 .5cqw #6D7280; }
.gbox--ds .gb-band .pips i.on { background: #6D7280; }
.gbox--ds .gb-title { font-size: 5.6cqw; -webkit-line-clamp: 1; }
.gbox--ds .gb-plate { padding-top: 7cqw; }
.gbox--ds .gb-rating { width: 10cqw; height: 12cqw; }
.gbox--ds .gbox-spine { background: #F7F7F9; box-shadow: inset 0 0 0 .9cqw var(--case), inset 0 10cqw 0 var(--case-dark); }
.gbox--ds .gbox-spine span { color: var(--ink); }

/* PSP : boîtier UMD étroit et transparent, bandeau noir. */
.gbox--psp { --case: #DADDE5; --case-dark: #A9ADBA; --case-light: #F7F8FA; --sleeve: #0F0F14; }
.gbox--psp .gbox-front { padding: 2.6cqw 2.6cqw 2.6cqw 4.8cqw; }
.gbox--psp .gb-band { padding: 2.4cqw 3cqw; }
.gbox--psp .gb-platform { font-size: 5.4cqw; letter-spacing: .1em; font-style: normal; }
.gbox--psp .gb-rarity { font-size: 3.8cqw; }
.gbox--psp .gb-plate { left: 4.8cqw; right: 2.6cqw; bottom: 2.6cqw; padding-top: 14cqw; }
.gbox--psp .gb-title { font-size: 7.6cqw; }
.gbox--psp .gb-meta { font-size: 4cqw; }
.gbox--psp .gb-rating { width: 14cqw; height: 17cqw; }
.gbox--psp .gb-rating strong { font-size: 6.6cqw; }
.gbox--psp .gb-rating span { font-size: 2.5cqw; }
.gbox--psp .gbox-spine span { font-size: 6cqw; max-height: 150cqw; }
.gbox--psp .gb-seam { background: rgba(58, 44, 64, .35); }
.gbox--psp .gb-notch { background: radial-gradient(ellipse at 40% 50%, rgba(58, 44, 64, .35), rgba(58, 44, 64, .1) 70%); }

/* Mega Drive : boîtier noir épais, bandeau noir quadrillé de rouge. */
.gbox--md { --case: #1C1C1F; --case-dark: #0A0A0B; --case-light: #3B3B40; --sleeve: #0B0B0D; }
.gbox--md .gb-band {
  background:
    repeating-linear-gradient(90deg, rgba(226, 50, 50, .55) 0 .3cqw, transparent .3cqw 3.2cqw),
    repeating-linear-gradient(0deg, rgba(226, 50, 50, .55) 0 .3cqw, transparent .3cqw 3.2cqw), #0B0B0D;
  border-bottom: .9cqw solid #D73A3A; padding: 3cqw 2.6cqw;
}
.gbox--md .gb-platform { font-style: normal; text-transform: uppercase; letter-spacing: .1em; font-size: 4cqw; }
.gbox--md .gbox-spine { background:
    repeating-linear-gradient(0deg, rgba(226, 50, 50, .45) 0 .3cqw, transparent .3cqw 3.2cqw), #0B0B0D;
  box-shadow: inset 0 0 0 .9cqw var(--case), inset 0 12cqw 0 #D73A3A; }

/* Master System : boîtier noir, jaquette blanche quadrillée. */
.gbox--sms { --case: #1C1C1F; --case-dark: #0A0A0B; --case-light: #3B3B40; --sleeve: #F7F7F4; }
.gbox--sms .gb-band {
  background:
    repeating-linear-gradient(90deg, rgba(20, 20, 24, .35) 0 .3cqw, transparent .3cqw 3.2cqw),
    repeating-linear-gradient(0deg, rgba(20, 20, 24, .35) 0 .3cqw, transparent .3cqw 3.2cqw), #F7F7F4;
  color: var(--ink); border-bottom: .9cqw solid #D73A3A; padding: 3cqw 2.6cqw;
}
.gbox--sms .gb-platform { color: #D73A3A; font-style: normal; text-transform: uppercase; letter-spacing: .06em; font-size: 4cqw; }
.gbox--sms .gb-rarity { color: #3A3A42; }
.gbox--sms .gb-band .pips i { box-shadow: inset 0 0 0 .5cqw #3A3A42; }
.gbox--sms .gb-band .pips i.on { background: #3A3A42; }
.gbox--sms .gb-art { border-left: 1.6cqw solid #F7F7F4; border-right: 1.6cqw solid #F7F7F4; }
.gbox--sms .gbox-spine { background:
    repeating-linear-gradient(0deg, rgba(20, 20, 24, .3) 0 .3cqw, transparent .3cqw 3.2cqw), #F7F7F4;
  box-shadow: inset 0 0 0 .9cqw var(--case), inset 0 12cqw 0 #D73A3A; }
.gbox--sms .gbox-spine span { color: var(--ink); }
/* Rareté (mêmes règles que la boîte PC) : plus de rareté dans le bandeau du haut ; en bas à gauche, pastille
   avec les initiales de la rareté sur sa couleur et les six points dans la bande blanche. */
/* Mega Drive : mêmes règles (demande du 2026-09-29), d'où les sélecteurs :is(.gbox--sms, .gbox--md). */
:is(.gbox--sms, .gbox--md) .gb-band .gb-rarity, :is(.gbox--sms, .gbox--md) .gb-band .pips { display: none; }
:is(.gbox--sms, .gbox--md) .gb-rating--rarity { width: 11.5cqw; height: auto; padding: 0; overflow: hidden; justify-content: flex-start; align-items: stretch; }
:is(.gbox--sms, .gbox--md) .gb-rating--rarity strong { font-family: 'Anton', var(--font-display); font-size: 6cqw; line-height: 1; padding: 1.3cqw 0 .9cqw;
  text-align: center; color: #1A1A20; background: var(--r); }
:is(.gbox--sms, .gbox--md) .gb-rating--rarity .pips { display: flex; justify-content: center; gap: .45cqw; padding: .8cqw .3cqw .7cqw; background: #fff; }
:is(.gbox--sms, .gbox--md) .gb-rating--rarity .pips i { width: 1.3cqw; height: 1.3cqw; box-shadow: inset 0 0 0 .3cqw #1A1A20; }
:is(.gbox--sms, .gbox--md) .gb-rating--rarity .pips i.on { background: #1A1A20; }
:is(.gbox--sms, .gbox--md)[data-rarity="epique"] .gb-rating--rarity strong { background: linear-gradient(135deg, #C9CBD6, #F2F3F8 50%, #A9ADBD); }
:is(.gbox--sms, .gbox--md)[data-rarity="legendaire"] .gb-rating--rarity strong { background: linear-gradient(135deg, #C9A640, #F7E7A6 50%, #B58C22); }
:is(.gbox--sms, .gbox--md)[data-rarity="mythique"] .gb-rating--rarity strong { background: linear-gradient(135deg, #F5B8D2, #FFF0A8 30%, #B8F0D6 55%, #B8D6FF 80%, #DCC2FF); }
/* Bas de boîte sans texte : les jaquettes Master System portent déjà le nom du jeu. Seule la pastille de rareté
   reste, sans le dégradé sombre. (Essai précédent, texte réduit : .gb-title 4.4cqw, .gb-meta 2.5cqw, .gb-num 2.1cqw.) */
/* Le bloc du bas couvre le coin bas gauche de la jaquette : il porte la pastille et une légère vignette
   (voile sombre en diagonale depuis le coin) pour qu'elle garde du contraste. */
:is(.gbox--sms, .gbox--md) .gb-plate, :is(.gbox--sms, .gbox--md)[data-rarity="mythique"] .gb-plate { left: 4.4cqw; right: 2.4cqw; bottom: 2.6cqw; top: auto; height: 42%;
  display: flex; align-items: flex-end; padding: 0; border-radius: 0 0 1.2cqw 1.2cqw;
  background: linear-gradient(35deg, rgba(10, 10, 14, .6), rgba(10, 10, 14, .28) 22%, rgba(10, 10, 14, .08) 38%, transparent 50%); }
:is(.gbox--sms, .gbox--md) :is(.gb-title, .gb-meta, .gb-num) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:is(.gbox--sms, .gbox--md) .gb-rating--rarity { margin: 0 0 1.6cqw 1.6cqw; box-shadow: 0 0 0 .45cqw #fff, .4cqw .6cqw 0 rgba(0, 0, 0, .35); }
:is(.gbox--sms, .gbox--md) .gb-art { --safe-bottom: .1; }

/* Mega Drive « PAL » (classe .md-pal), d'après les vraies boîtes européennes : jaquette
   pleine page, logo chromé dans un ovale noir posé en haut sur l'illustration, bande noire en bas
   (« 16-BIT CARTRIDGE » + éditeur), tranche bleue avec le logo en haut. Sans le logo officiel : texte seul.
   Les règles ci-dessus (bandeau quadrillé rouge) restent la version 'grid'. */
.gbox--md.md-pal .gb-band { position: absolute; z-index: 2; left: 4.4cqw; right: 2.4cqw; top: 3.6cqw; justify-content: center;
  padding: 0; background: none; border: 0; }
.gbox--md.md-pal .gb-platform { font-family: 'Anton', var(--font-display); font-size: 4.6cqw; letter-spacing: .14em; line-height: 1;
  padding: 1.1cqw 4.2cqw 1.2cqw 4.6cqw; border-radius: 50%; background: linear-gradient(180deg, #26262C, #050506 60%);
  color: #E9EAF0; text-shadow: 0 -.25cqw 0 #FFFFFF, 0 .35cqw 0 #6E7282;
  box-shadow: 0 0 0 .45cqw #9DA1AE, 0 0 0 .75cqw #1A1A1E, 0 .6cqw 1.4cqw rgba(0, 0, 0, .5); }
.gbox--md.md-pal .gb-art { border-radius: 1.2cqw 1.2cqw 0 0; overflow: hidden; }
.gbox--md.md-pal .md-foot { position: relative; flex: 0 0 12cqw; display: flex; align-items: center; justify-content: space-between;
  gap: 2cqw; padding: 0 2.4cqw 0 2.8cqw; background: #070708; color: #F4F4F6; border-radius: 0 0 1.2cqw 1.2cqw;
  border-top: .35cqw solid #2E2E34; overflow: hidden; }
.gbox--md.md-pal .md-cart { display: flex; flex-direction: column; min-width: 0; line-height: 1; }
.gbox--md.md-pal .md-cart strong { font-family: 'Anton', var(--font-display); font-weight: 400; font-size: 4.5cqw; letter-spacing: .05em; }
.gbox--md.md-pal .md-cart small { font-size: 1.7cqw; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #B9BAC4; margin-top: .6cqw; }
.gbox--md.md-pal .md-editor { flex: 0 1 auto; min-width: 0; max-width: 42%; padding: .9cqw 1.6cqw; border-radius: .6cqw;
  background: #1F4FC2; color: #fff; font-weight: 900; font-size: 2.6cqw; line-height: 1; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 0 0 .3cqw rgba(255, 255, 255, .5); }
/* Pastille de rareté et vignette : juste au-dessus de la bande noire. */
.gbox--md.md-pal .gb-plate, .gbox--md.md-pal[data-rarity="mythique"] .gb-plate { bottom: calc(2.6cqw + 12cqw); height: 36%; border-radius: 0; }
/* Tranche bleue des boîtes européennes : logo en haut, titre en blanc. */
.gbox--md.md-pal .gbox-spine { flex-direction: column; justify-content: flex-start; align-items: center;
  background: linear-gradient(90deg, #1B43A6, #2A5CD0 50%, #1B43A6); box-shadow: inset 0 0 0 .9cqw var(--case); }
.gbox--md.md-pal .gbox-spine span { color: #fff; font-family: 'Anton', var(--font-display); font-size: 6cqw; margin: 0; padding: 3cqw 0 5cqw; max-height: 118cqw; }
.gbox--md.md-pal .md-spine-logo { writing-mode: vertical-rl; transform: rotate(180deg); flex: none; margin-top: 3cqw; padding: 1.8cqw .9cqw;
  border-radius: 3cqw; background: #050506; color: #E9EAF0; box-shadow: 0 0 0 .35cqw #9DA1AE;
  font-family: 'Anton', var(--font-display); font-weight: 400; font-size: 3.4cqw; letter-spacing: .12em; line-height: 1; }
/* Dos : bandeau noir souligné de bleu au lieu du quadrillage rouge. */
.gbox--md.md-pal .gb-back-band { background: #070708; box-shadow: inset 0 -.7cqw 0 #1F4FC2; }

/* ==== Famille « boîtier CD » ========================================================================== */
/* Nom de la console écrit à la verticale dans la bande, comme sur les jaquettes CD (sinon « PlayStation »
   ne tient pas dans la largeur de la bande). */
.gbox--ps1 .gb-platform { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 3.6cqw; }
/* Nom long : la rareté n'est plus écrite en toutes lettres dans la bande, les points suffisent. */
.gbox--ps1:not([data-platform="pc"]) .gb-rarity { display: none; }
/* Saturn : bande noire avec un filet bleu. */
.gbox--saturn .gb-band { box-shadow: inset -1.1cqw 0 0 #2E5FD9; }
.gbox--saturn .gb-platform { font-style: normal; text-transform: uppercase; letter-spacing: .04em; font-size: 3.4cqw; }
.gbox--saturn .gbox-spine { box-shadow: inset 0 0 0 .7cqw rgba(231, 227, 236, .85), inset 0 9cqw 0 #2E5FD9, inset 0 -9cqw 0 #2A2833; }

/* Dreamcast : bande bleue avec une spirale orange. */
.gbox--dc { --sleeve: #1D4AA6; }
.gbox--dc .gb-band::before { content: ''; flex: none; width: 8cqw; height: 8cqw; border-radius: 50%;
  background:
    radial-gradient(circle at 58% 44%, transparent 0 1.2cqw, #F28C28 1.25cqw 1.9cqw, transparent 1.95cqw),
    radial-gradient(circle at 50% 50%, transparent 0 2.7cqw, #F28C28 2.75cqw 3.5cqw, transparent 3.55cqw);
  transform: rotate(-30deg); }
.gbox--dc .gb-platform { font-style: normal; font-size: 3cqw; text-transform: lowercase; letter-spacing: .02em; }
.gbox--dc .gbox-spine { box-shadow: inset 0 0 0 .7cqw rgba(231, 227, 236, .85), inset 0 9cqw 0 #F28C28, inset 0 -9cqw 0 #173A84; }

/* ==== Famille « carton » ============================================================================== */
/* Couleurs claires communes : texte encre, carton qui ne ressort pas en noir. */
.gbox:is(.gbox--snes, .gbox--gb, .gbox--gbc, .gbox--gba) .gb-title { color: var(--ink); text-shadow: .5cqw .5cqw 0 var(--r), .9cqw .9cqw 0 rgba(58, 44, 64, .25); }
.gbox:is(.gbox--snes, .gbox--gb, .gbox--gbc, .gbox--gba) .gb-meta { color: #5C566A; }
.gbox:is(.gbox--snes, .gbox--gb, .gbox--gbc, .gbox--gba) .gb-art { border-color: #8E8A99; }
.gbox:is(.gbox--snes, .gbox--gb, .gbox--gbc, .gbox--gba) .gbox-spine span { color: var(--ink); }
.gbox:is(.gbox--snes, .gbox--gb, .gbox--gbc, .gbox--gba) .gbox-front { box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 0 6cqw rgba(58, 44, 64, .18); }
.gbox:is(.gbox--snes, .gbox--gb, .gbox--gbc, .gbox--gba) .gb-series { color: var(--r-edge); }

/* Super Nintendo : carton gris, bandeau gris foncé et filet aux quatre couleurs des boutons. */
.gbox--snes { --board: #D6D5DC; --board-edge: #A9A7B3; --grid: rgba(58, 44, 64, .05); }
.gbox--snes .gb-plate { padding-top: 9cqw;
  background:
    linear-gradient(90deg, #D8403A 0 25%, #F2C230 25% 50%, #3FA34D 50% 75%, #3C63C9 75%) 0 5cqw / 100% 1.3cqw no-repeat,
    linear-gradient(#57555F, #57555F) 0 0 / 100% 5cqw no-repeat; }
.gbox--snes .gbox-spine { box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 12cqw 0 #57555F; }

/* Nintendo 64 : carton noir, petit cube aux quatre couleurs en haut à droite. */
.gbox--n64 .gb-plate { position: relative; padding-right: 17cqw; }
.gbox--n64 .gb-plate::after { content: ''; position: absolute; right: 5.5cqw; top: 4.5cqw; width: 9cqw; aspect-ratio: 1;
  background: conic-gradient(#3C63C9 0 25%, #3FA34D 0 50%, #D8403A 0 75%, #F2C230 0); transform: rotate(45deg) skew(-8deg, -8deg);
  box-shadow: 0 0 0 .5cqw #0B0B0E, .6cqw .6cqw 0 .5cqw rgba(0, 0, 0, .5); border-radius: .6cqw; }
.gbox--n64 .gb-meta { padding-right: 0; }

/* Game Boy : petite boîte en carton gris clair, bandeau gris en haut. */
.gbox--gb { --board: #D2CFC7; --board-edge: #A29E94; --grid: rgba(58, 44, 64, .045); }
.gbox--gb .gb-plate { padding-top: 7.5cqw;
  background: linear-gradient(100deg, #6E6C75 0 62%, #8C2B5A 62% 64%, transparent 64%) 0 0 / 100% 4.5cqw no-repeat; }
.gbox--gb .gbox-spine { box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 10cqw 0 #6E6C75; }

/* ---- Game Boy v2 (2026-09-29, d'après des photos de boîtes européennes) --------------------------------
   Boîte carrée, bande grise à gauche avec « GAME BOY » en grandes capitales penchées (lues de bas en haut),
   petite pastille rouge cerclée en haut de la bande (à la place de l'ovale du constructeur), illustration
   pleine dans un fin cadre blanc. Rareté : mêmes règles que PC / Master System (rien dans la bande, pastille
   initiales + points en bas à gauche de l'illustration, pas de texte : la jaquette porte le nom).
   Les règles « Game Boy » ci-dessus (bandeau gris en haut, format 125 × 140) sont la première version ; les
   règles ci-dessous les remplacent (retirer ce bloc pour y revenir). */
.card.gbox--gb { aspect-ratio: 1 / 1; }
.zoom-stage .card.gbox--gb { --w: min(580px, 84vw, calc(100dvh - 170px)); }
.reveal-slot .card.gbox--gb { --w: min(340px, 70vw, calc(100dvh - 440px)); }
.gbox.gbox--gb { --half-h: 50cqw; --depth: 19cqw; --board: #E6E6EA; --board-edge: #B7B7C0; --gb-band-w: 21cqw; --gb-ink: #2B3170; }
.gbox.gbox--gb .gbox-front { padding: 0; display: block; }
.gbox.gbox--gb .gb-band, .gbox.gbox--gb[data-rarity] .gb-band { position: absolute; left: 0; top: 0; bottom: 0; width: var(--gb-band-w); height: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding: 3cqw 0 3.4cqw; border: 0;
  background: linear-gradient(90deg, #F3F3F6, #DEDEE4 80%, #CFCFD7); box-shadow: inset -.5cqw 0 0 #B7B7C0; color: var(--gb-ink); }
.gbox.gbox--gb .gb-band::before { content: 'Unboxd'; flex: none; font: italic 800 2.3cqw var(--font-body); color: #D8262E; background: #fff;
  border: .45cqw solid #D8262E; border-radius: 99px; padding: .2cqw 1.3cqw .3cqw; }
.gbox.gbox--gb .gb-platform { margin-top: auto; writing-mode: vertical-rl; transform: rotate(180deg); background: none; padding: 0;
  font-family: 'Anton', var(--font-display); font-style: italic; font-size: 14.5cqw; line-height: 1; letter-spacing: .015em; text-transform: uppercase;
  color: var(--gb-ink); text-shadow: .3cqw .3cqw 0 rgba(255, 255, 255, .7); white-space: nowrap; }
.gbox.gbox--gb .gb-band .gb-rarity, .gbox.gbox--gb .gb-band .pips { display: none; }
/* Texte SVG étiré (gamebox.js) : occupe toute la hauteur libre sous la pastille. */
.gbox.gbox--gb .gb-platform--stretch { flex: 1; align-self: stretch; margin: 5cqw 2.4cqw 0 2cqw; /* 5cqw d'air sous la pastille Unboxd */ /* un peu plus à droite : l'ombre du bord droit */ writing-mode: horizontal-tb; transform: none;
  font-size: 0; text-shadow: none; }
.gb-platform--stretch svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gb-platform--stretch text { font-family: 'Anton', sans-serif; font-style: italic; font-size: 20px; fill: var(--gb-ink, #2B3170);
  paint-order: stroke; stroke: rgba(255, 255, 255, .7); stroke-width: .6px; }
.gbox.gbox--gb .gb-art { position: absolute; left: var(--gb-band-w); top: 0; right: 0; bottom: 0; margin: 0; border: 1.3cqw solid #fff;
  border-radius: 0 .6cqw .6cqw 0; box-shadow: inset 0 0 0 .3cqw rgba(0, 0, 0, .12); }
.gbox.gbox--gb .gb-art::after { opacity: .15; }
.gbox.gbox--gb :is(.gb-series, .gb-sticker) { display: none; }
/* Pastille de rareté en bas à gauche de l'illustration, sur une légère vignette. */
.gbox.gbox--gb .gb-plate, .gbox.gbox--gb[data-rarity="mythique"] .gb-plate { position: absolute; left: calc(var(--gb-band-w) + 1.3cqw); right: 1.3cqw;
  bottom: 1.3cqw; height: 38%; display: flex; align-items: flex-end; padding: 0 0 2cqw 2cqw; border: 0;
  background: linear-gradient(35deg, rgba(10, 10, 14, .55), rgba(10, 10, 14, .25) 22%, rgba(10, 10, 14, .06) 38%, transparent 50%); }
.gbox.gbox--gb :is(.gb-title, .gb-meta, .gb-num) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gbox.gbox--gb .gb-rating--rarity { position: static; transform: none; width: 11cqw; height: auto; padding: 0; overflow: hidden; border-radius: .6cqw;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; line-height: 1; color: #1A1A20; background: #fff;
  box-shadow: 0 0 0 .45cqw #fff, .4cqw .6cqw 0 rgba(0, 0, 0, .35); }
.gbox.gbox--gb .gb-rating--rarity strong { font-family: 'Anton', var(--font-display); font-size: 5.8cqw; padding: 1.2cqw 0 .8cqw; text-align: center;
  color: #1A1A20; background: var(--r); }
.gbox.gbox--gb .gb-rating--rarity .pips { display: flex; justify-content: center; gap: .4cqw; padding: .8cqw .3cqw .7cqw; background: #fff; }
.gbox.gbox--gb .gb-rating--rarity .pips i { width: 1.25cqw; height: 1.25cqw; box-shadow: inset 0 0 0 .3cqw #1A1A20; }
.gbox.gbox--gb .gb-rating--rarity .pips i.on { background: #1A1A20; }
.gbox.gbox--gb[data-rarity="epique"] .gb-rating--rarity strong { background: linear-gradient(135deg, #C9CBD6, #F2F3F8 50%, #A9ADBD); }
.gbox.gbox--gb[data-rarity="legendaire"] .gb-rating--rarity strong { background: linear-gradient(135deg, #C9A640, #F7E7A6 50%, #B58C22); }
.gbox.gbox--gb[data-rarity="mythique"] .gb-rating--rarity strong { background: linear-gradient(135deg, #F5B8D2, #FFF0A8 30%, #B8F0D6 55%, #B8D6FF 80%, #DCC2FF); }
/* Tranche et côtés : carton gris clair comme la bande ; pas de bandeau de rareté. */
.gbox.gbox--gb .gbox-spine { background: linear-gradient(90deg, #DEDEE4, #F3F3F6 50%, #DEDEE4); box-shadow: inset 0 0 0 .5cqw var(--board-edge); }
.gbox.gbox--gb .gbox-spine span { font-family: 'Anton', var(--font-display); font-style: italic; text-transform: uppercase; color: var(--gb-ink);
  font-size: 6cqw; margin: auto 0; padding: 3cqw 0; max-height: 92cqw; }
.gbox.gbox--gb :is(.gbox-spine, .gbox-right)::after { display: none; }
.gbox.gbox--gb :is(.gbox-right, .gbox-cap) { background: linear-gradient(90deg, #D6D6DD, #EDEDF1 50%, #D6D6DD); }
.gbox.gbox--gb .gb-gloss { opacity: .45; mix-blend-mode: screen; } /* film plastique des boîtes neuves */

/* Game Boy Color : carton blanc, bandeau arc-en-ciel. */
.gbox--gbc { --board: #F3F1EC; --board-edge: #C4C0B6; --grid: rgba(58, 44, 64, .04); }
.gbox--gbc .gb-plate { padding-top: 7.5cqw;
  background: linear-gradient(90deg, #E2463F, #F2A531 20%, #F2D531 40%, #4DB35A 60%, #3E7BD6 80%, #8A4FC4) 0 0 / 100% 4.5cqw no-repeat; }
.gbox--gbc .gbox-spine { box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 10cqw 0 #8A4FC4; }

/* Game Boy Advance : carton clair, bandeau violet. */
.gbox--gba { --board: #ECEAF3; --board-edge: #B8B4C8; --grid: rgba(58, 44, 64, .04); }
.gbox--gba .gb-plate { padding-top: 8cqw;
  background:
    linear-gradient(#BFB7EA, #BFB7EA) 0 4.6cqw / 100% .9cqw no-repeat,
    linear-gradient(90deg, #3B2F92, #5A48C0) 0 0 / 100% 4.6cqw no-repeat; }
.gbox--gba .gbox-spine { box-shadow: inset 0 0 0 .5cqw var(--board-edge), inset 0 10cqw 0 #3B2F92; }
