/* v0.89 : écrans en plein écran (au-delà de 1 200 px) et thème de couleurs du Bastion */
@media (min-width: 1200px) {
  #expedition.screen, #bossSelect.screen, #teams.screen, #summon.screen, #gallery.screen, #heroes.screen, #social.screen { max-width: none; }
  /* v0.93.3 : les écrans restés à 1 120 px passent aussi en plein écran */
  #guildboss.screen, #hv.screen, #raid.screen, #tactic.screen, #season.screen, #battle.screen { max-width: none; }
  :is(#guildboss, #hv, #raid, #tactic, #season, #social).screen { padding: 0 14px 24px; }
  :is(#guildboss, #hv, #raid, #tactic, #season, #social) > .topbar { margin: 0 -14px; }

  /* ---------- Sceau du Bastion (boss) : boss et progression côte à côte, puis attaque · dégâts · récompenses ---------- */
  #guildboss .craft-body { max-width: none; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; padding-left: 0; padding-right: 0; }
  #guildboss .craft-body > :not(.gb-head):not(.gb-levels) { grid-column: 1 / -1; }
  #guildboss .gb-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); }
  #guildboss .gb-grid .gb-rewards { grid-column: auto; }

  /* ---------- Hôtel des ventes : annonces en grille ---------- */
  #hv #hvBody { max-width: none; }
  #hv .hv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(540px, 1fr)); gap: 10px; align-items: start; }
  #hv .hv-list > .hv-mat { margin: 0; }

  /* ---------- Social : soutien et ajout à gauche, liste des amis à droite ---------- */
  #social .craft-body { max-width: none; padding-left: 0; padding-right: 0; }
  #social #soTab:has(> .so-mine) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
  #social #soTab > .so-mine ~ section:last-child { grid-column: 2; grid-row: 1 / span 6; }
  #social #soTab > .so-chat { max-width: 1100px; margin: 0 auto; width: 100%; }

  /* ---------- Raid (salon) : salon, table et lancement à gauche ; héros et discussion à droite ---------- */
  #raid .raid-lobby { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; align-items: start; grid-auto-flow: row dense; padding-left: 0; padding-right: 0; }
  #raid .raid-lobby > * { grid-column: 1; }
  #raid .raid-lobby > .raid-box:has(#rdPick) { grid-column: 2; grid-row: 1; }
  #raid .raid-lobby > .raid-chat { grid-column: 2; grid-row: 2 / span 4; }
  #raid .raid-lobby > p.hint.pad { grid-column: 1 / -1; }

  /* ---------- Brèche et saison : contenu sur toute la largeur ---------- */
  #tactic .craft-body, #season .craft-body { max-width: none; padding-left: 0; padding-right: 0; }

  /* ---------- Combats de boss, Crypte et Sceau (écran de combat) : comme l'Expédition ---------- */
  #battle.screen { padding: 0 14px 24px; }
  #battle > .topbar { margin: 0 -14px; }
  #battle .battle-layout.bv-e.uni:not(.full) { height: calc(100vh - 16px); max-height: none; }

  /* ---------- Expédition : même disposition qu'aujourd'hui, sur toute la largeur, combat agrandi ---------- */
  #expedition.screen { padding: 0 14px 24px; }
  #expedition > .topbar, #expedition > #map { margin-left: -14px; margin-right: -14px; }
  #expedition > #map { justify-content: center; }
  #expedition > .exp-top { padding-left: 0; padding-right: 0; }
  #expedition > .team-bar { margin-left: 0; margin-right: 0; }
  #expedition #expBattle .battle-layout.bv-e.uni:not(.full) { height: calc(100vh - 16px); max-height: none; }

  /* ---------- Fléaux : toutes les cartes de boss côte à côte ---------- */
  #bossSelect.screen { padding: 0 14px 24px; }
  #bossSelect > .topbar { margin: 0 -14px; }
  #bossSelect #bossList { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 12px; align-items: start; }
  #bossSelect #bossList > .boss-card { margin: 0; width: auto; }

  /* ---------- Équipes : compagnie et équipes à gauche, héros disponibles à droite ---------- */
  #teams.screen { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 16px; padding: 0 14px 24px; align-content: start; }
  #teams > .topbar { grid-column: 1 / -1; margin: 0 -14px; }
  #teams > * { grid-column: 1; }
  #teams > #teamPool { grid-column: 2; grid-row: 2 / span 6; position: sticky; top: 8px; align-self: start; max-height: calc(100vh - 16px); display: flex; flex-direction: column; margin-top: 8px; }
  #teams > #teamPool #teamPoolList { overflow-y: auto; min-height: 0; flex: 1; }
  #teams #teamPresets { padding-left: 0; padding-right: 0; }
  #teams > p.hint { grid-column: 1; }
  #teams > h3.section-h:nth-of-type(2) { grid-column: 2; grid-row: 2; margin-top: 14px; }
  #teams > #teamPool { grid-row: 3 / span 6 !important; margin-top: 0 !important; }
  #teams .preset-idle .preset-faces { flex-wrap: nowrap; }
  #teams .preset-idle { grid-template-columns: max-content 1fr auto auto; }

  /* ---------- Invocation : bannières à gauche, scène au centre, règles à droite ---------- */
  #summon.screen { display: grid; grid-template-columns: 230px minmax(0, 1fr) 340px; grid-template-rows: auto auto auto auto 1fr; column-gap: 16px; padding: 0 14px 24px; align-content: start; }
  #summon > .topbar { grid-column: 1 / -1; margin: 0 -14px; }
  #summon > #sumBanners { grid-column: 1; grid-row: 2 / span 4; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; padding: 14px 0; background: none; border: 0; }
  #summon > #sumBanners .sum-tab { width: 100%; text-align: left; padding: 10px 14px; margin: 0; }
  #summon > #summonStage { grid-column: 2; grid-row: 2; margin: 14px 0 0; height: min(58vh, 560px); }
  #summon > .summon-btns { grid-column: 2; grid-row: 3; }
  #summon > #sumResults { grid-column: 2; grid-row: 4; }
  #summon > #sumPity { grid-column: 3; grid-row: 2; margin: 14px 0 0; align-self: start; }
  #summon > #sumRates { grid-column: 3; grid-row: 3 / span 2; text-align: left; padding: 12px 4px; align-self: start; }

  /* ---------- Héros : plus d'espace pour la liste et la fiche ---------- */
  .screen.hero-menu { max-width: none; }
  .hero-menu .hm-layout { grid-template-columns: 420px 104px minmax(0, 1fr); }
  .hero-menu .hm-list { max-height: calc(100vh - 80px); height: calc(100vh - 80px); }
}

:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle).screen {
  --c-navy: #1b1724; --c-ink: #0d0c12; --c-ink2: #121019; --c-paper: #0d0c12; --c-paper2: #16131e; --c-text: #e6e1d6; --c-mute: #9a92aa;
  --panel: #121019; --panel-2: #16131e; --text: #e6e1d6; --muted: #9a92aa; --gold: #e2bd5f; --gold-soft: rgba(226, 189, 95, .35);
  background: #0a0910; color: #e6e1d6; min-height: 100vh;
}
body:has(:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle).screen:not(.hidden)) { background: #0a0910; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(.panel, .boss-card, .preset, .team-bar) {
  background: #121019; border: 1px solid #2a2436; border-radius: 10px; box-shadow: none; --text: #e6e1d6; --muted: #9a92aa; color: #e6e1d6; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(.panel, .boss-card, .preset, .team-bar)::before,
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(.panel, .boss-card, .preset, .team-bar)::after { display: none; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) .section-h { font-family: Cinzel, serif; color: #e2bd5f; letter-spacing: .08em; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) .section-h::after { background: linear-gradient(90deg, #3a3350, transparent); }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(.hint, .empty, label) { color: #9a92aa; }
/* Boutons */
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(.btn-small, .filter-tabs button, .mode-tabs button, .tp-btn, .gbk-f) {
  background: #1b1724; border: 1px solid #4a4060; border-radius: 6px; color: #e6e1d6; --text: #e6e1d6; box-shadow: none; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(.btn-small, .filter-tabs button, .mode-tabs button, .tp-btn):hover:not(:disabled) { border-color: #e2bd5f; color: #f4e2b0; filter: none; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(.btn-small.on, .btn-small.active, .filter-tabs button.active, .mode-tabs button.active, .tp-btn.on, .tp-btn.active) {
  background: #e2bd5f; border-color: #e2bd5f; color: #12100a; --text: #12100a; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) .mode-tabs button.active small { color: #3a2e14; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) .btn-primary {
  background: linear-gradient(180deg, #f0cf75, #c9a14a 60%, #a8822f); color: #12100a; --text: #12100a; box-shadow: inset 0 0 0 1px #fff1c4; text-shadow: none; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) .btn-primary:disabled { background: #2a2436; color: #6f6880; box-shadow: none; }
/* Champs */
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) :is(input:not([type=checkbox]):not([type=range]), select, textarea) {
  background: #08070c; border: 1px solid #2e2840; border-radius: 6px; color: #f1ebdc; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) input::placeholder { color: #6f6880; }
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) option { background: #121019; }
/* Retour au Camp, carte des zones */
:is(#expedition, #bossSelect, #teams, #summon, #gallery, #heroes, #social, #guildboss, #hv, #raid, #tactic, #season, #battle) .topbar .back { background: #1b1724; color: #f4e2b0; --text: #f4e2b0; border: 1px solid #e2bd5f; }
#expedition #map { background: #0d0c12; border-bottom: 1px solid #2a2436; }
#expedition .map-node.cleared:not(.current) { background: #1b1724; border-color: #6a5a3a; color: #e6e1d6; }
#expedition .map-node.frontier:not(.current) { background: #2a2213; border-color: #e2bd5f; color: #f4e2b0; }
/* Cartes de héros (équipes, liste, galerie) */
:is(#teams, #heroes) :is(.party-card, .hl-item) { background: #16131e; border-color: #3a3350; color: #e6e1d6; --text: #e6e1d6; }
:is(#teams, #heroes) :is(.party-card.on, .party-card.sel, .hl-item.active) { background: #1f1a12; border-color: #e2bd5f; }
#teams .pool-h, #heroes .hl-role { color: #e2bd5f; }
#gallery .ga-item.got { background: #16131e; border-color: #3a3350; }
#gallery .ga-item.missing { background: #0f0d14; }
/* Héros : onglets verticaux, portrait, bandeau */
#heroes #hmTabs button { background: #121019; border: 1px solid #2a2436; color: #b9b1c8; }
#heroes #hmTabs button.active { background: #1f1a12; border-color: #e2bd5f; color: #f4e2b0; }
#heroes :is(.hm-portrait, .hr-portrait, .eq-portrait, .gear-hero, .hm-head) { background: #0d0c12; border-color: #3a3350; }

/* =========================================================
   v0.89 : Codex d'Avarenth (ancienne Galerie) — gabarit du Bastion (.bs) : colonne à gauche, chapitres en haut
   ========================================================= */
#gallery.screen { padding: 0 10px 10px; }
#gallery > .topbar { margin: 0 -10px; }
#gallery .cx { min-height: calc(100vh - 70px); margin-top: 6px; }
#gallery .cx-book { filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
#gallery .cx-tabs { min-height: 120px; }
#gallery .cx-tabs button { padding: 0 12px; }
.cx-n { font: 800 10px Nunito, sans-serif; color: #8f879f; letter-spacing: 0; }
.cx-cl { width: 100%; display: flex; flex-direction: column; gap: 2px; }
.cx-cli { all: unset; cursor: pointer; box-sizing: border-box; display: grid; grid-template-columns: 18px 1fr auto; column-gap: 6px; align-items: center; font-size: 12.5px; color: #c9c1d6; padding: 4px 6px; border-radius: 6px; }
.cx-cli:hover, .cx-cli.on { background: rgba(226,189,95,.08); color: #f4e2b0; }
.cx-cli:focus-visible { outline: 2px solid #e2bd5f; }
.cx-cli i { font-style: normal; color: #c8a04a; text-align: center; }
.cx-cli em { font-style: normal; font-weight: 800; color: #e2bd5f; font-size: 11.5px; }
.cx-clb { grid-column: 2 / 4; height: 3px; border-radius: 2px; background: #2a2436; margin-top: 3px; }
.cx-clb span { display: block; height: 100%; border-radius: 2px; background: #e2bd5f; }
.cx-rw { margin-top: auto; width: 100%; font-size: 11.5px; color: #9a92aa; border-top: 1px solid #2e2840; padding-top: 8px; line-height: 1.45; }
.cx-rw b { color: #e2bd5f; }
.cx-body { padding: 16px 18px 22px; min-width: 0; }
/* Héros/Ensembles/Armes (rendus d'origine) : filtres à gauche, cartes à droite */
.cx-body:not(.cx-free) { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 12px 16px; align-content: start; }
.cx-body:not(.cx-free) > #gaHead { grid-column: 1; margin: 0; }
.cx-body:not(.cx-free) > #gaBar { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 0; align-self: start; position: sticky; top: 8px; }
.cx-body:not(.cx-free) > #gaBar .ga-seg { flex-wrap: wrap; }
.cx-body:not(.cx-free) > #gaGrid { grid-column: 2; grid-row: 1 / span 2; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); margin: 0; }
.cx-body:not(.cx-free) .ga-prog { flex-wrap: wrap; }
.cx-intro { font: italic 600 17px 'Cormorant Garamond', serif; color: #c9bfa6; margin: 0 0 12px; }
.cx-page h4 { margin: 8px 0 4px; font-family: Cinzel, serif; font-size: 12.5px; letter-spacing: .12em; color: #e2bd5f; }
.cx-page p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #d9d2c2; }
.cx-fk { font-size: 10.5px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: #e2bd5f; }
.cx-fn { font-family: Cinzel, serif; font-size: 24px; color: #f4e2b0; line-height: 1.1; }
.cx-fe { font: italic 600 16px 'Cormorant Garamond', serif; color: #c9bfa6; }
.cx-fl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid #1d1a26; }
.cx-fl span { color: #9a92aa; } .cx-fl b { text-align: right; }
.cx-lore { font-style: italic; color: #cfc7b6 !important; }
/* Sommaire */
.cx-som { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cx-cc { all: unset; cursor: pointer; box-sizing: border-box; background: #121019; border: 1px solid #2a2436; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.cx-cc:hover, .cx-cc:focus-visible { border-color: #6a5a3a; }
.cx-cc.done { border-color: #5a4a2a; background: linear-gradient(180deg, #1d1810, #121019); }
.cx-cct { display: flex; gap: 10px; align-items: flex-start; }
.cx-cci { width: 42px; height: 42px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 22px; color: #e2bd5f; background: #1f1a12; border: 1px solid #6a5a3a; }
.cx-cct b { font-family: Cinzel, serif; font-size: 16px; color: #f4e2b0; display: block; }
.cx-cct small { font-size: 12px; color: #9a92aa; line-height: 1.35; display: block; margin-top: 2px; }
.cx-ccb { height: 6px; border-radius: 3px; background: #2a2436; margin-top: auto; }
.cx-ccb span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #a8822f, #e2bd5f); }
.cx-ccf { display: flex; justify-content: space-between; font-size: 12px; color: #9a92aa; }
.cx-ccf em { font-style: normal; font-weight: 800; color: #e6e1d6; }
.cx-cc.done .cx-ccf span { color: #e2bd5f; font-weight: 800; }
.cx-som-r { display: flex; flex-direction: column; gap: 12px; }
.cx-pl { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 7px; background: #16131e; border: 1px solid #2a2436; font-size: 12.5px; }
.cx-pl b { font-family: Cinzel, serif; color: #9a92aa; } .cx-pl small { font-size: 11px; color: #8f879f; }
.cx-pl.got { opacity: .6; } .cx-pl.got small { color: #4fd08a; }
.cx-pl.ready { border-color: #e2bd5f; background: #1f1a12; } .cx-pl.ready b { color: #e2bd5f; }
.cx-rc { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #1d1a26; }
.cx-rci { width: 44px; height: 44px; display: grid; place-items: center; background: #0b0a10; border-radius: 6px; border: 1px solid #2a2436; overflow: hidden; }
.cx-rci > * { max-width: 40px; max-height: 40px; }
.cx-rc small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #8f879f; font-weight: 800; }
.cx-rc b { display: block; font-size: 13.5px; color: #f4e2b0; } .cx-rc > span > span { display: block; font-size: 11.5px; color: #9a92aa; }
.cx-rc em { font-style: normal; font-size: 11px; color: #8f879f; white-space: nowrap; }
/* Héros */
.cx-hero { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.cx-hl { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px; max-height: calc(100vh - 210px); }
.cx-hbar { display: flex; flex-wrap: wrap; gap: 5px; }
.cx-hbar .ga-el-chip { padding: 0; background: none; border: 0; opacity: .55; } .cx-hbar .ga-el-chip.on { opacity: 1; }
.cx-hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow-y: auto; min-height: 0; padding-right: 4px; }
.cx-hc { all: unset; cursor: pointer; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 8px; background: #16131e; border: 1px solid #2e2840; text-align: center; }
.cx-hc:hover, .cx-hc:focus-visible { border-color: #6a5a3a; }
.cx-hc .cx-hs { height: 52px; display: grid; place-items: end center; }
.cx-hs.sil > * { filter: brightness(0) drop-shadow(0 0 1px rgba(226,189,95,.6)); opacity: .7; }
.cx-hc b { font-size: 13px; color: #f4e2b0; } .cx-hc small { font-size: 11px; color: #9a92aa; }
.cx-hc.sel { border-color: #e2bd5f; background: #1f1a12; }
.cx-hc.un { background: #0f0d14; border-style: dashed; } .cx-hc.un b { color: #9a92aa; }
.cx-hp { display: grid; grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); gap: 16px; background: #121019; border: 1px solid #5a4a2a; border-radius: 10px; padding: 14px; min-width: 0; }
.cx-hpart.ga-big { height: auto !important; min-height: 420px; max-height: calc(100vh - 230px); border-radius: 8px; background: radial-gradient(circle at 50% 40%, #1f1a2a, #0b0a10 75%); border: 1px solid #3a3350; display: flex; align-items: center; justify-content: center; position: sticky; top: 8px; overflow: hidden; }
.cx-hpart.ga-big.art .hero-art.illustration { height: 100%; width: 100%; object-fit: cover; object-position: top; max-height: none; }
.cx-hpx { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cx-hpx .ga-detail { display: block; }
.cx-hpx .section-h { margin-top: 10px; }
/* Bestiaire */
.cx-best { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.cx-bl { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cx-zr { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; background: #121019; border: 1px solid #2a2436; border-radius: 10px; }
.cx-zn b { font-family: Cinzel, serif; font-size: 13.5px; color: #f4e2b0; display: block; line-height: 1.2; } .cx-zn small { font-size: 11.5px; color: #9a92aa; }
.cx-zt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cx-mt { all: unset; cursor: pointer; box-sizing: border-box; position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: #16131e; border: 1px solid #2e2840; min-height: 60px; }
.cx-mt:hover, .cx-mt:focus-visible { border-color: #6a5a3a; }
.cx-ms { grid-row: 1 / 3; width: 50px; height: 48px; display: grid; place-items: center; overflow: hidden; }
.cx-ms > * { max-width: 50px; max-height: 48px; }
.cx-ms.sil > *, .cx-zm.un > * { filter: brightness(0); opacity: .5; }
.cx-mt b { font-size: 12.5px; color: #eee6d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: end; }
.cx-mt > span:not(.cx-ms) { align-self: start; } .cx-mt small { font-size: 10.5px; color: #6f6880; }
.cx-mt.un { background: #0f0d14; border-style: dashed; } .cx-mt.un b { color: #6f6880; }
.cx-mt.g { border-color: #6a5a3a; background: linear-gradient(90deg, #1f1a12, #16131e); }
.cx-mt em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #e2bd5f; }
.cx-mt.sel { border-color: #e2bd5f; box-shadow: 0 0 0 1px #e2bd5f inset; }
.cx-fi { background: #121019; border: 1px solid #5a4a2a; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 7px; position: sticky; top: 8px; }
.cx-fart { height: 170px; border-radius: 8px; background: radial-gradient(circle at 50% 60%, #2a1d2e, #0b0a10 70%); display: grid; place-items: center; border: 1px solid #2a2436; overflow: hidden; }
.cx-fart > * { max-height: 150px; filter: drop-shadow(0 6px 10px #000); }
.cx-fart.un span { font: 700 60px Cinzel, serif; color: #3a3350; }
.cx-fs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cx-fs div { background: #16131e; border: 1px solid #2a2436; border-radius: 6px; padding: 5px 8px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cx-fs small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8f879f; font-weight: 800; }
.cx-fb { margin-top: 6px; }
/* Fléaux, Lieux, Éléments, Histoire */
.cx-grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.cx-grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cx-boss, .cx-zone { gap: 8px; }
.cx-boss.un .cx-fart > *, .cx-zone.un { opacity: .7; }
.cx-boss details summary { cursor: pointer; font-size: 12.5px; color: #e2bd5f; font-weight: 700; }
.cx-boss details p { margin-top: 6px; font-size: 12.5px; }
.cx-boss .btn-small { align-self: flex-start; }
.cx-zmobs { display: flex; gap: 6px; }
.cx-zm { width: 52px; height: 52px; border-radius: 8px; background: #16131e; border: 1px solid #2e2840; display: grid; place-items: center; overflow: hidden; }
.cx-zm > * { max-width: 48px; max-height: 48px; } .cx-zm.g { border-color: #6a5a3a; }
.cx-el p { margin: 0; font-size: 13px; color: #cfc7b6; line-height: 1.45; }
.cx-elh { display: flex; align-items: center; gap: 8px; } .cx-elh b { font-family: Cinzel, serif; color: #f4e2b0; }
.cx-sp .cx-fl { flex-direction: column; gap: 2px; } .cx-sp .cx-fl small { color: #9a92aa; font-size: 12px; }
.cx-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cx-ch { flex-direction: row !important; align-items: flex-start; gap: 14px !important; }
.cx-chn { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 18px Cinzel, serif; color: #e2bd5f; background: #1f1a12; border: 2px solid #6a5a3a; }
.cx-ch.done .cx-chn { border-color: #e2bd5f; } .cx-ch.un { opacity: .6; } .cx-ch.un .cx-chn { color: #6f6880; border-color: #3a3350; background: #16131e; }
.cx-ch .cx-fn { font-size: 18px; }
/* Téléphone et petites fenêtres */
@media (max-width: 1100px) {
  .cx-som, .cx-best, .cx-hero { grid-template-columns: minmax(0, 1fr); }
  .cx-hl { position: static; max-height: none; } .cx-hgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-height: 46vh; }
  .cx-fi, .cx-hpart.ga-big { position: static; }
}
@media (max-width: 900px) {
  #gallery .bs.cx { grid-template-columns: 1fr; }
  #gallery .cx-side { border-right: 0; border-bottom: 1px solid #2e2840; flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 10px; }
  #gallery .cx-side .cx-book { width: 56px; height: 56px; }
  #gallery .cx-side .cx-cl, #gallery .cx-side .cx-rw { display: none; }
  #gallery .cx-tabs { min-height: 70px; flex-wrap: nowrap; overflow-x: auto; }
  #gallery .cx-tabs button { flex: none; }
  .cx-body { padding: 12px 10px; }
  .cx-body:not(.cx-free) { grid-template-columns: minmax(0, 1fr); }
  .cx-body:not(.cx-free) > #gaBar { grid-row: auto; position: static; }
  .cx-body:not(.cx-free) > #gaGrid { grid-column: 1; grid-row: auto; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .cx-zr { grid-template-columns: minmax(0, 1fr); } .cx-zt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-hp { grid-template-columns: minmax(0, 1fr); } .cx-hpart.ga-big { min-height: 260px; max-height: 340px; }
}
.cx-body:not(.cx-free) > #gaHead { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.cx-body:not(.cx-free) > #gaHead > * { max-width: 100%; min-width: 0; flex-wrap: wrap; }
.cx-body:not(.cx-free) > #gaBar input { flex: none; height: 38px; min-height: 0; max-width: none; width: 100%; box-sizing: border-box; }
.cx-body.cx-sets > #gaGrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.cx-hc .cx-hs { overflow: hidden; }
@media (max-width: 900px) { .cx-cc { min-height: 0; } }
/* v0.89 : derniers fonds bleus des écrans au thème du Bastion */
#heroes .hm-visual { background: radial-gradient(circle at 50% 45%, #1f1a2a, #0b0a10 75%); border-color: #3a3350; }
#heroes .hm-stats > div { background: #16131e; border-color: #2a2436; }
:is(#bossSelect, #expedition) :is(.tier-pill, .loop-pill):not(.on):not(.active):not(.done):not(.cur) { background: #1b1724; border-color: #4a4060; }
/* v0.89.1 : icônes peintes du Codex */
.cx-ic { width: 1.5em; height: 1.5em; object-fit: contain; vertical-align: -0.4em; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
#gallery .cx-tabs button i { display: inline-flex; }
#gallery .cx-tabs .cx-ic { width: 26px; height: 26px; }
.cx-cli .cx-ic { width: 18px; height: 18px; }
.cx-cci .cx-ic { width: 34px; height: 34px; }
.cx-cci { background: radial-gradient(circle, #2a2213, #120f0a); }
img.cx-book { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.cx-seal { width: 20px; height: 20px; vertical-align: -5px; margin-right: 4px; }
.cx-pl:not(.got):not(.ready) .cx-seal { filter: grayscale(1) brightness(.6); }
.cx-port { height: 300px; background: #0b0a10; }
.cx-port img { height: 100%; width: 100%; object-fit: cover; object-position: top; filter: none; max-height: none; }
.cx-zimg { width: 100%; aspect-ratio: 137 / 102; object-fit: cover; border-radius: 6px; border: 1px solid #3a3350; image-rendering: auto; }
.cx-zone.un .cx-zimg { filter: grayscale(1) brightness(.35); }
.cx-pl { grid-template-columns: 78px 1fr auto; } .cx-pl b { white-space: nowrap; }
