/* ============================================================================
   bffr.fr/raid/items - CATALOGUE (refonte du 2026-09-26)
   ----------------------------------------------------------------------------
   Compendium d'équipement, matériaux, potions et listes de détenteurs.
   Chargée par shell() (option head) APRÈS raids/ds.css : elle ne redéfinit
   aucun jeton, elle n'utilise que les variables de ds.css. La couleur de
   rareté d'un set / d'un objet arrive en style inline (--rc, donnée du jeu).
   Préfixe : .cg-   Script associé : /scripts/raids/catalogue.js
   Performance : 65 sets en cartes compactes (les pièces ne sont construites
   qu'à l'ouverture d'un set), content-visibility sur les lignes, aucune ombre
   ni filtre sur les éléments répétés.
   ============================================================================ */

/* ── Onglets Équipements / Matériaux / Potions ─────────────────────────────── */
body.raidnew .cg-tabs { margin: 0 0 14px; }
body.raidnew .cg-tabs .rgtab { text-decoration: none; min-height: 40px; }
body.raidnew .cg-tabs .rgtab:hover { text-decoration: none; }

/* ── Barre d'outils (recherche + filtres) ──────────────────────────────────── */
body.raidnew .cg-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px; margin: 0 0 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--hl);
}
body.raidnew .cg-q { position: relative; flex: 1 1 260px; min-width: 0; }
body.raidnew .cg-q > svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--mut); pointer-events: none; }
body.raidnew .rgmain .cg-q input { width: 100%; min-height: 42px; padding-left: 40px; box-sizing: border-box; }
body.raidnew .rgmain .cg-bar select { min-height: 42px; flex: 0 0 auto; }
body.raidnew .cg-count { margin-left: auto; color: var(--mut); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.raidnew .cg-count b { color: var(--txt); font-weight: 700; }

/* Pastilles de rareté (filtre) : défilent DANS la barre sur téléphone, jamais la page. */
body.raidnew .cg-chips {
  display: flex; gap: 6px; flex: 1 1 100%; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 1px 0;
}
body.raidnew .cg-chips::-webkit-scrollbar { display: none; }
body.raidnew .cg-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--line2); color: var(--mut);
  font: 650 .8rem/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: border-color .13s, color .13s, background-color .13s;
}
body.raidnew .cg-chip:hover { color: var(--txt); border-color: var(--accent-line); }
body.raidnew .cg-chip[aria-pressed="true"] { background: var(--accent-dim); border-color: var(--accent-line); color: var(--txt); }
body.raidnew .cg-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc, var(--mut)); flex: 0 0 8px; }
body.raidnew .cg-chip small { color: var(--mut); font-size: .74rem; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Interrupteur "Possédés" */
body.raidnew .cg-tog { min-height: 42px; padding: 0 14px; border-radius: 11px; }
body.raidnew .cg-tog::before {
  content: ""; width: 16px; height: 16px; border-radius: 5px; flex: 0 0 16px; box-sizing: border-box;
  border: 1.5px solid var(--line2); background: var(--bg);
}
body.raidnew .cg-tog[aria-pressed="true"]::before {
  border-color: var(--accent); background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.4' fill='none' stroke='%230b0b10' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ── Bandes de rareté (repliables) ─────────────────────────────────────────── */
body.raidnew .cg-band { margin: 0 0 30px; }
body.raidnew .cg-bandh {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  margin: 0 0 12px; padding: 0; background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--txt); font: 800 .78rem/1 var(--font); letter-spacing: .15em; text-transform: uppercase;
}
body.raidnew .cg-bandh::after { content: ""; flex: 1; order: 3; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }
body.raidnew .cg-bandh .cg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); flex: 0 0 10px; }
body.raidnew .cg-bandh .cg-bandn { color: var(--mut); font-weight: 600; letter-spacing: .02em; text-transform: none; font-size: .8rem; }
body.raidnew .cg-bandh .cg-car { order: 4; width: 16px; height: 16px; color: var(--mut); transition: transform .18s var(--ease); flex: 0 0 16px; }
body.raidnew .cg-band.is-closed .cg-bandh .cg-car { transform: rotate(-90deg); }
body.raidnew .cg-band.is-closed .cg-bandb { display: none; }

/* ── Sets : une ligne par set (vignettes des 10 pièces), les pièces s'ouvrent dessous ── */
body.raidnew .cg-sets { display: flex; flex-direction: column; gap: 8px; }
body.raidnew .cg-set {
  position: relative; display: grid; grid-template-columns: minmax(230px, 1fr) auto minmax(150px, 200px); align-items: center; column-gap: 18px;
  min-width: 0; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--hl);
  content-visibility: auto; contain-intrinsic-size: auto 76px;
  transition: border-color .15s, background-color .15s;
}
body.raidnew .cg-set::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rc); }
body.raidnew .cg-set:hover { border-color: var(--line2); background: var(--card2); }
body.raidnew .cg-set.is-open { cursor: default; border-color: var(--line2); background: var(--card); content-visibility: visible; }
body.raidnew .cg-set.is-off, body.raidnew .cg-band.is-off { display: none; }
body.raidnew .cg-sethd {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 13px; align-items: center; min-width: 0;
  width: 100%; padding: 13px 0 13px 18px; margin: 0;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
body.raidnew .cg-setic { width: 46px; height: 46px; object-fit: contain; grid-row: 1 / span 2; }
body.raidnew .cg-setic.cg-noimg { display: flex; align-items: center; justify-content: center; background: var(--bg2); border-radius: 12px; color: var(--mut); }
body.raidnew .cg-setn { min-width: 0; color: var(--txt); font-weight: 700; font-size: 1rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.raidnew .cg-setb { grid-column: 2; min-width: 0; color: var(--mut); font-size: .78rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Les 10 pièces en vignettes : l'aperçu du set sans construire 10 lignes. Elles sont tirées par le
   script de la liste JSON #cg-pcs : pistes de colonnes fixes (la largeur ne bouge pas quand elles
   arrivent) et hauteur réservée tant que la bande est vide (aucun saut de mise en page). */
body.raidnew .cg-strip { display: grid; grid-template-columns: repeat(10, 38px); gap: 6px; }
body.raidnew .cg-strip:empty { min-height: 38px; }
body.raidnew .cg-pc {
  display: block; width: 100%; max-width: 38px; aspect-ratio: 1 / 1; height: auto; justify-self: center;
  object-fit: contain; padding: 4px; box-sizing: border-box;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  transition: opacity .15s;
}
body.raidnew span.cg-pc { display: flex; align-items: center; justify-content: center; color: var(--mut); font-size: .8rem; }
body.raidnew .cg-pc.is-none { opacity: .3; border-style: dashed; }
body.raidnew .cg-pc.is-off { opacity: .12; }
body.raidnew .cg-pc.is-hit { border-color: var(--rc); opacity: 1; }
body.raidnew .cg-setft { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 16px 0 0; color: var(--mut); font-size: .78rem; min-width: 0; }
body.raidnew .cg-cnt { text-align: right; line-height: 1.3; white-space: nowrap; }
body.raidnew .cg-cnt b { display: block; color: var(--txt); font-size: .98rem; font-weight: 750; font-variant-numeric: tabular-nums; }
body.raidnew .cg-open {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); color: var(--txt2);
}
body.raidnew .cg-open .cg-ol { display: none; }
body.raidnew .cg-open svg { width: 16px; height: 16px; transition: transform .18s var(--ease); }
body.raidnew .cg-set:hover .cg-open { border-color: var(--accent-line); color: var(--accent2); }
body.raidnew .cg-set.is-open .cg-open { border-color: var(--accent-line); color: var(--accent2); background: var(--accent-dim); }
body.raidnew .cg-set.is-open .cg-open svg { transform: rotate(180deg); }

/* Pièces d'un set ouvert */
body.raidnew .cg-pieces {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px;
  margin: 0 16px 16px 18px; padding-top: 14px; border-top: 1px solid var(--line); cursor: default;
}
body.raidnew .cg-piece {
  display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 56px; padding: 8px 12px 8px 9px; box-sizing: border-box;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; color: var(--txt2);
}
body.raidnew a.cg-piece { transition: border-color .13s, background-color .13s; }
body.raidnew a.cg-piece:hover { border-color: var(--rc); background: var(--card2); color: var(--txt2); text-decoration: none; }
body.raidnew .cg-piece > img, body.raidnew .cg-piece > .cg-noimg { width: 36px; height: 36px; flex: 0 0 36px; object-fit: contain; }
body.raidnew .cg-piece > .cg-noimg { display: flex; align-items: center; justify-content: center; color: var(--mut); }
body.raidnew .cg-piece.is-none { opacity: .5; }
body.raidnew .cg-piece.is-off { display: none; }
body.raidnew .cg-pt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
/* Nom et sous-ligne passent à la ligne au lieu d'être coupés (« 3 exemplaires · 2 équip... »). */
body.raidnew .cg-pn { color: var(--txt); font-weight: 650; font-size: .88rem; line-height: 1.25; overflow-wrap: anywhere; }
body.raidnew .cg-ps { color: var(--mut); font-size: .76rem; line-height: 1.35; overflow-wrap: anywhere; }
body.raidnew .cg-ps b { color: var(--txt2); font-weight: 650; font-variant-numeric: tabular-nums; }
body.raidnew .cg-go { flex: 0 0 auto; width: 16px; height: 16px; color: var(--mut); }
body.raidnew a.cg-piece:hover .cg-go { color: var(--accent2); }

/* État "aucun résultat" (construit par le script) */
body.raidnew .cg-none { margin: 10px auto 30px; }

/* ── Matériaux ─────────────────────────────────────────────────────────────── */
body.raidnew .cg-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
body.raidnew .cg-mat {
  display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 68px; padding: 11px 14px 11px 12px; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--hl); color: var(--txt2);
  transition: border-color .13s, background-color .13s;
}
body.raidnew a.cg-mat:hover { border-color: var(--rc, var(--accent-line)); background: var(--card2); color: var(--txt2); text-decoration: none; }
body.raidnew .cg-mat > img, body.raidnew .cg-mat > .cg-noimg { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }
body.raidnew .cg-mat > .cg-noimg { display: flex; align-items: center; justify-content: center; color: var(--mut); background: var(--bg2); border-radius: 10px; }
body.raidnew .cg-mat.is-none { opacity: .62; }
body.raidnew .cg-mat.is-off { display: none; }
body.raidnew .cg-mt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
body.raidnew .cg-mn { color: var(--txt); font-weight: 650; font-size: .92rem; line-height: 1.25; overflow-wrap: anywhere; }
body.raidnew .cg-mm { color: var(--mut); font-size: .76rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
body.raidnew .cg-mm b { color: var(--txt2); font-weight: 650; }
body.raidnew .cg-soon { font-size: .66rem; color: var(--mut); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; margin-left: 6px; font-weight: 600; vertical-align: 1px; }

/* ── Potions ───────────────────────────────────────────────────────────────── */
body.raidnew .cg-pots { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
body.raidnew .cg-pot {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-content: start;
  min-width: 0; padding: 16px 16px 0; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--hl); color: var(--txt2);
  transition: border-color .13s, background-color .13s;
}
/* Liseré de rareté à gauche, comme les sets, les fiches et les notes (un trait en haut ne suivait pas l'arrondi). */
body.raidnew .cg-pot::before { content: ""; position: absolute; left: -1px; top: 18px; width: 3px; height: 52px; border-radius: 0 3px 3px 0; background: var(--rc); }
body.raidnew a.cg-pot:hover { border-color: var(--rc, var(--accent-line)); background: var(--card2); color: var(--txt2); text-decoration: none; }
body.raidnew .cg-pot.is-off { display: none; }
body.raidnew .cg-potic { grid-row: 1 / span 2; width: 56px; height: 56px; padding: 7px; box-sizing: border-box; object-fit: contain; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; }
body.raidnew .cg-potn { color: var(--txt); font-weight: 700; font-size: 1rem; line-height: 1.25; align-self: end; overflow-wrap: anywhere; }
body.raidnew .cg-rl { color: var(--rc, var(--mut)); font-weight: 700; font-size: .78rem; align-self: start; }
body.raidnew .cg-desc { grid-column: 1 / -1; margin: 12px 0 0; color: var(--txt2); font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
body.raidnew .cg-potft {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 11px 0 13px; border-top: 1px solid var(--line); color: var(--mut); font-size: .78rem; font-variant-numeric: tabular-nums;
}
body.raidnew .cg-potft b { color: var(--txt2); font-weight: 700; }
body.raidnew .cg-sort { flex: 0 0 auto; }

/* ── Fiche d'un objet (en-tête des pages de détenteurs) ─────────────────────── */
body.raidnew .cg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
body.raidnew .cg-actions .rgbtn { margin-top: 0; }
body.raidnew .cg-head {
  position: relative; display: flex; align-items: center; gap: 16px; min-width: 0;
  padding: 18px 20px; margin: 0 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--hl);
}
body.raidnew .cg-head::before { content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rc, var(--accent)); }
body.raidnew .cg-head > img { width: 60px; height: 60px; flex: 0 0 60px; padding: 8px; box-sizing: border-box; object-fit: contain; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; }
body.raidnew .cg-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
body.raidnew .cg-head h2 { margin: 0; font-size: 1.4rem; line-height: 1.15; overflow-wrap: anywhere; }
body.raidnew .cg-head .cg-rl { font-size: .86rem; }
body.raidnew .cg-head .cg-desc { margin: 4px 0 0; max-width: 620px; }
body.raidnew .cg-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
body.raidnew .cg-stat {
  display: inline-flex; align-items: baseline; gap: 7px; min-height: 36px; padding: 0 13px; box-sizing: border-box; align-items: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; color: var(--mut); font-size: .8rem;
}
body.raidnew .cg-stat b { color: var(--txt); font-size: .92rem; font-weight: 750; font-variant-numeric: tabular-nums; }

/* ── Listes de détenteurs : tableau sur PC, cartes sur téléphone ───────────── */
body.raidnew .cg-list { display: flex; flex-direction: column; gap: 6px; }
body.raidnew .cg-thead, body.raidnew .cg-row, body.raidnew .cg-orow {
  display: grid; align-items: center; column-gap: 14px; min-width: 0;
}
body.raidnew .cg-thead {
  padding: 0 16px 4px; color: var(--mut); font-size: .68rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase;
}
body.raidnew .cg-row, body.raidnew .cg-orow {
  min-height: 58px; padding: 8px 16px; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px; color: var(--txt2);
  content-visibility: auto; contain-intrinsic-size: auto 58px;
}
/* Items : Joueur | Objet | Tier | État */
body.raidnew .cg-list.is-items .cg-thead, body.raidnew .cg-row { grid-template-columns: minmax(160px, 1.1fr) minmax(0, 2.1fr) 58px 104px; }
body.raidnew .cg-row.is-clk { cursor: pointer; transition: border-color .13s, background-color .13s; }
body.raidnew .cg-row.is-clk:hover { border-color: var(--accent-line); background: var(--card2); }
body.raidnew .cg-who { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--txt); font-weight: 650; }
body.raidnew .cg-who:hover { color: var(--accent2); text-decoration: none; }
body.raidnew .cg-who img { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--bg2); }
body.raidnew .cg-who span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.raidnew .cg-what { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.raidnew .cg-what img { width: 30px; height: 30px; flex: 0 0 30px; object-fit: contain; }
/* Objet + set : retour à la ligne plutôt que des points de suspension (« Bottes de Patrouille Ma... »). */
body.raidnew .cg-what > span { min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
body.raidnew .cg-what .cg-wn { color: var(--txt2); font-weight: 600; }
body.raidnew .cg-what .cg-ws { color: var(--mut); }
body.raidnew .cg-what .cg-ws::before { content: " · "; }
body.raidnew .cg-tier { font-weight: 850; font-size: .95rem; text-align: center; font-variant-numeric: tabular-nums; }
body.raidnew .cg-state {
  justify-self: end; display: inline-flex; align-items: center; min-height: 26px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line2); color: var(--mut); font-size: .74rem; font-weight: 650; white-space: nowrap;
}
/* Équipé : texte et pastille en --ok (aucune teinte en dur : le moteur de thèmes la suit). */
body.raidnew .cg-state.is-eq { color: var(--ok); }
body.raidnew .cg-state.is-eq::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }
/* Matériaux / potions : # | Joueur | Part du stock | Quantité */
body.raidnew .cg-list.is-owners .cg-thead, body.raidnew .cg-orow { grid-template-columns: 44px minmax(0, 1.3fr) minmax(90px, 1fr) 110px; }
body.raidnew .cg-orow:hover { border-color: var(--accent-line); background: var(--card2); color: var(--txt2); text-decoration: none; }
body.raidnew .cg-rank { color: var(--mut); font-weight: 750; font-size: .86rem; font-variant-numeric: tabular-nums; text-align: center; }
body.raidnew .cg-share { height: 6px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
body.raidnew .cg-share > i { display: block; height: 100%; min-width: 3px; border-radius: 99px; background: var(--accent); }
body.raidnew .cg-qty { text-align: right; color: var(--txt); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.raidnew .cg-thead .cg-r { text-align: right; }
body.raidnew .cg-thead .cg-c { text-align: center; }
/* Plafond d'affichage (le script replie au-delà de 50 lignes, bouton .rgx-more). Le registre d'un item
   (?q=) arrive, lui, avec 60 lignes : la suite attend dans <template class="cg-more-tpl"> (jamais
   affiché) et le bouton .rgx-more.cg-more la dévoile par tranches de 60. */
body.raidnew .cg-list .is-more { display: none; }
body.raidnew .cg-note { margin: 0 0 12px; color: var(--mut); font-size: .84rem; font-variant-numeric: tabular-nums; }
body.raidnew .cg-note b { color: var(--txt2); }
/* Liste plafonnée par le moteur (200 plus gros détenteurs) : dit combien ne sont pas listés. */
body.raidnew .cg-cap { margin: -6px 0 16px; line-height: 1.5; }
body.raidnew .cg-msg { margin: 6px 0 0; }

/* Formulaire de recherche des détenteurs d'un item */
body.raidnew .cg-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
body.raidnew .cg-search .rgbtn { margin-top: 0; min-height: 42px; }

/* ── Téléphone et tablette ─────────────────────────────────────────────────── */
/* Cibles tactiles >= 40 px (charte §4), même seuil que .rgx-chip dans ds.css. */
@media (max-width: 960px) {
  body.raidnew .cg-chip { min-height: 40px; padding: 0 13px; }
  body.raidnew .cg-tog { min-height: 42px; }
}
/* Entre 900 et 1100 px : même ligne, vignettes un peu plus petites. */
@media (max-width: 1100px) {
  body.raidnew .cg-set { grid-template-columns: minmax(190px, 1fr) auto minmax(120px, 160px); column-gap: 14px; }
  body.raidnew .cg-strip { grid-template-columns: repeat(10, 32px); gap: 5px; }
  body.raidnew .cg-pc { padding: 3px; border-radius: 9px; }
}
/* Sous 900 px, la ligne d'un set passe sur trois étages : en-tête + bouton, vignettes, total. */
@media (max-width: 900px) {
  body.raidnew .cg-set {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "hd op" "st st" "ct ct" "pc pc";
    contain-intrinsic-size: auto 150px;
  }
  body.raidnew .cg-sethd { grid-area: hd; padding: 13px 0 10px 18px; }
  body.raidnew .cg-setft { display: contents; }
  body.raidnew .cg-open { grid-area: op; margin-right: 14px; }
  body.raidnew .cg-strip { grid-area: st; grid-template-columns: repeat(10, minmax(0, 38px)); padding: 0 16px 0 18px; }
  body.raidnew .cg-cnt { grid-area: ct; text-align: left; padding: 10px 16px 13px 18px; }
  body.raidnew .cg-cnt b { display: inline; font-size: .86rem; }
  body.raidnew .cg-pieces { grid-area: pc; }
}
@media (max-width: 900px) {
  body.raidnew .cg-list.is-items .cg-thead, body.raidnew .cg-list.is-owners .cg-thead { display: none; }
  /* Détenteurs d'un item : carte à deux lignes (joueur + état / objet + tier) */
  body.raidnew .cg-row {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who state" "what tier";
    row-gap: 8px; padding: 12px 14px;
    contain-intrinsic-size: auto 96px;
  }
  body.raidnew .cg-row .cg-who { grid-area: who; }
  body.raidnew .cg-row .cg-state { grid-area: state; }
  body.raidnew .cg-row .cg-what { grid-area: what; padding-left: 45px; }
  body.raidnew .cg-row .cg-tier { grid-area: tier; text-align: right; }
  body.raidnew .cg-row .cg-what img { width: 26px; height: 26px; flex-basis: 26px; }
  /* Le set passe sous le nom de l'objet (deux lignes lisibles au lieu d'une ligne coupée). */
  body.raidnew .cg-row .cg-ws { display: block; font-size: .82rem; }
  body.raidnew .cg-row .cg-ws::before { content: none; }
  /* Détenteurs d'un matériau : rang, joueur, quantité ; la barre de part passe dessous */
  body.raidnew .cg-orow {
    grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "rank who qty" ". share share";
    row-gap: 8px; padding: 10px 14px 12px 8px;
    contain-intrinsic-size: auto 78px;
  }
  body.raidnew .cg-orow .cg-rank { grid-area: rank; }
  body.raidnew .cg-orow .cg-who { grid-area: who; }
  body.raidnew .cg-orow .cg-qty { grid-area: qty; }
  body.raidnew .cg-orow .cg-share { grid-area: share; margin-left: 45px; }
}
@media (max-width: 560px) {
  /* Compteur des filtres de rareté : 12 px minimum (charte §4.5). */
  body.raidnew .cg-chips .cg-chip small { font-size: .75rem; }
  /* Boss du set sous son nom : texte courant, 13 px (recette du 2026-09-27). */
  body.raidnew .cg-sethd .cg-setb { font-size: .8125rem; }
  body.raidnew .cg-tabs { width: 100%; }
  body.raidnew .cg-tabs .rgtab { flex: 1 1 0; justify-content: center; padding: 0 8px; }
  body.raidnew .cg-bar { padding: 10px; gap: 8px; margin-bottom: 18px; }
  body.raidnew .cg-q { flex: 1 1 100%; }
  body.raidnew .rgmain .cg-bar select { flex: 1 1 calc(50% - 4px); min-width: 0; }
  body.raidnew .cg-tog { flex: 0 0 auto; }
  body.raidnew .cg-count { flex: 1 1 auto; text-align: right; }
  body.raidnew .cg-sethd { padding: 12px 0 9px 16px; grid-template-columns: 42px minmax(0, 1fr); column-gap: 11px; }
  body.raidnew .cg-setic { width: 42px; height: 42px; }
  body.raidnew .cg-open { width: 40px; height: 40px; margin-right: 12px; }
  body.raidnew .cg-strip { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; padding: 0 14px 0 16px; }
  /* Vignette carrée = (largeur de la bande - 9 écarts) / 10 ; largeur = écran - 96 px de marges. */
  body.raidnew .cg-strip:empty { min-height: calc((100vw - 96px) / 10); }
  body.raidnew .cg-pc { border-radius: 8px; padding: 2px; }
  body.raidnew .cg-cnt { padding: 9px 14px 12px 16px; }
  body.raidnew .cg-pieces { grid-template-columns: minmax(0, 1fr); margin: 0 12px 12px 14px; }
  body.raidnew .cg-mats, body.raidnew .cg-pots { grid-template-columns: minmax(0, 1fr); }
  /* Matériau : deux lignes (nom / détenteurs · revente) pour garder 119 cartes courtes */
  body.raidnew .cg-mat { min-height: 60px; padding: 9px 12px 9px 11px; gap: 11px; }
  body.raidnew .cg-mat > img, body.raidnew .cg-mat > .cg-noimg { width: 36px; height: 36px; flex-basis: 36px; }
  body.raidnew .cg-mt { display: block; }
  body.raidnew .cg-mn { display: block; margin-bottom: 2px; }
  body.raidnew .cg-mm { display: inline; }
  body.raidnew .cg-mm + .cg-mm::before { content: " · "; }
  body.raidnew .cg-circ { display: none; }
  body.raidnew .cg-mats { gap: 8px; }
  body.raidnew .cg-head { padding: 16px; gap: 14px; }
  body.raidnew .cg-head > img { width: 52px; height: 52px; flex-basis: 52px; }
  body.raidnew .cg-head h2 { font-size: 1.2rem; }
  /* Le retour « Tous les items » est un a.rgx-back au-dessus du bandeau (ds.css) : le champ prend la ligne. */
  body.raidnew .cg-search .cg-q { flex: 1 1 100%; order: 1; }   /* seul sur sa ligne : le texte indicatif n'est plus coupé */
  body.raidnew .rgmain .cg-search select { order: 2; flex: 1 1 calc(50% - 5px); min-width: 0; }
  body.raidnew .cg-search button.rgbtn { order: 3; flex: 1 1 100%; }
  body.raidnew .cg-actions .rgbtn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  body.raidnew .cg-set, body.raidnew .cg-mat, body.raidnew .cg-pot, body.raidnew .cg-piece, body.raidnew .cg-chip,
  body.raidnew .cg-open svg, body.raidnew .cg-bandh .cg-car { transition: none; }
}

/* États vides posés dans une grille : ils prennent toute la largeur. */
body.raidnew .cg-pots > .rgempty-box, body.raidnew .cg-mats > .rgempty-box { grid-column: 1 / -1; }

/* Cellule « objet » du registre en <button> (accès clavier à la fiche) : même rendu que le span. */
body.raidnew button.cg-what { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
