/* =========================================================================
   DRAGON BALL — GRAND CROSS  |  feuille de style
   ========================================================================= */

:root {
  --bg:          #0a0d18;
  --bg-2:        #121732;
  --panel:       rgba(20, 26, 52, .82);
  --panel-solid: #161c38;
  --line:        rgba(255, 255, 255, .10);
  --txt:         #eef1ff;
  --txt-dim:     #9aa3c7;
  --gold:        #ffc23c;
  --gold-2:      #ff8a1e;
  --force:       #ff4d5a;
  --vitesse:     #4a9eff;
  --robustesse:  #2fd98a;
  --ssr:         #ffcc33;
  --sr:          #c084fc;
  --r:           #7dd3fc;
  --danger:      #ff4757;
  --ok:          #2fd98a;
  --r:           14px;
  --shadow:      0 10px 34px rgba(0, 0, 0, .55);
  /* teintes de la nébuleuse de fond — pilotées par la palette choisie */
  --neb-1:       rgba(255, 138, 30, .20);
  --neb-2:       rgba(74, 158, 255, .18);
  --neb-3:       rgba(255, 194, 60, .06);
  --bg-mid:      #10142a;
}

/* =========================================================================
   PALETTES — sélectionnables dans les options (attribut data-theme sur <html>).
   Chaque thème ne redéfinit que les teintes de fond et les accents : tout le
   reste de la feuille de style continue de lire les mêmes variables.
   ========================================================================= */
:root[data-theme="namek"] {
  --bg: #04140f; --bg-2: #0a2a1e; --bg-mid: #082019;
  --panel: rgba(10, 40, 30, .82); --panel-solid: #0c2b21;
  --gold: #c8f560; --gold-2: #2fd98a;
  --neb-1: rgba(47, 217, 138, .22); --neb-2: rgba(200, 245, 96, .14); --neb-3: rgba(47, 217, 138, .07);
}
:root[data-theme="demon"] {
  --bg: #150614; --bg-2: #2a0a26; --bg-mid: #200a1e;
  --panel: rgba(42, 12, 40, .82); --panel-solid: #2b0d28;
  --gold: #ff4d5a; --gold-2: #a855f7;
  --neb-1: rgba(168, 85, 247, .24); --neb-2: rgba(255, 77, 90, .18); --neb-3: rgba(168, 85, 247, .07);
}
:root[data-theme="tenkaichi"] {
  --bg: #1a1108; --bg-2: #2e1d0c; --bg-mid: #24160a;
  --panel: rgba(46, 30, 14, .84); --panel-solid: #30200e;
  --gold: #ffd76a; --gold-2: #ff8a1e;
  --neb-1: rgba(255, 138, 30, .26); --neb-2: rgba(255, 215, 106, .16); --neb-3: rgba(255, 138, 30, .08);
}
:root[data-theme="ki"] {
  --bg: #04121a; --bg-2: #08283a; --bg-mid: #061e2c;
  --panel: rgba(8, 38, 56, .82); --panel-solid: #0a2c40;
  --gold: #e2f4ff; --gold-2: #22d3ee;
  --neb-1: rgba(34, 211, 238, .24); --neb-2: rgba(226, 244, 255, .12); --neb-3: rgba(34, 211, 238, .07);
}
:root[data-theme="saiyan"] {
  --bg: #1a0606; --bg-2: #340e0e; --bg-mid: #280a0a;
  --panel: rgba(46, 14, 14, .84); --panel-solid: #300e0e;
  --gold: #ffbf3c; --gold-2: #ff4d4d;
  --neb-1: rgba(255, 77, 77, .24); --neb-2: rgba(255, 191, 60, .16); --neb-3: rgba(255, 77, 77, .07);
}
:root[data-theme="kaioshin"] {
  --bg: #180a1e; --bg-2: #2c1236; --bg-mid: #220f2a;
  --panel: rgba(44, 18, 54, .82); --panel-solid: #2c122e;
  --gold: #f0abfc; --gold-2: #ec4899;
  --neb-1: rgba(236, 72, 153, .24); --neb-2: rgba(192, 132, 252, .16); --neb-3: rgba(236, 72, 153, .07);
}
:root[data-theme="super"] {
  --bg: #03101f; --bg-2: #072138; --bg-mid: #05192a;
  --panel: rgba(7, 33, 56, .82); --panel-solid: #0a2740;
  --gold: #67e8f9; --gold-2: #3b82f6;
  --neb-1: rgba(59, 130, 246, .26); --neb-2: rgba(103, 232, 249, .16); --neb-3: rgba(59, 130, 246, .08);
}
:root[data-theme="gold"] {
  --bg: #141005; --bg-2: #2a2109; --bg-mid: #201a08;
  --panel: rgba(42, 33, 9, .84); --panel-solid: #2c230b;
  --gold: #fde68a; --gold-2: #f59e0b;
  --neb-1: rgba(245, 158, 11, .26); --neb-2: rgba(253, 230, 138, .16); --neb-3: rgba(245, 158, 11, .08);
}
:root[data-theme="majin"] {
  --bg: #1a0713; --bg-2: #300f26; --bg-mid: #260b1d;
  --panel: rgba(48, 15, 38, .84); --panel-solid: #320f28;
  --gold: #fbcfe8; --gold-2: #f472b6;
  --neb-1: rgba(244, 114, 182, .24); --neb-2: rgba(251, 207, 232, .14); --neb-3: rgba(244, 114, 182, .07);
}
:root[data-theme="hell"] {
  --bg: #150404; --bg-2: #2c0a08; --bg-mid: #220706;
  --panel: rgba(44, 12, 10, .86); --panel-solid: #2e0d0a;
  --gold: #fb923c; --gold-2: #ef4444;
  --neb-1: rgba(239, 68, 68, .26); --neb-2: rgba(251, 146, 60, .16); --neb-3: rgba(239, 68, 68, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--txt);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {                      /* nébuleuse de fond */
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 620px at 12% -8%,  var(--neb-1), transparent 62%),
    radial-gradient(760px 540px at 88% 108%, var(--neb-2), transparent 60%),
    radial-gradient(600px 400px at 50% 50%,  var(--neb-3), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-mid) 55%, var(--bg));
  z-index: -2;
  transition: background .45s ease;
}

#app { position: relative; height: 100%; }

.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  animation: fade .28s ease;
}
.screen.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Éléments communs ------------------------------------------- */
.btn {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  color: var(--txt);
  padding: 13px 26px;
  border-radius: 11px;
  font-size: 15px; font-weight: 650;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .12s, box-shadow .18s, filter .18s, background .18s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.45); filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .38; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: #241300; border-color: transparent;
  box-shadow: 0 8px 24px rgba(255, 138, 30, .34);
}
.btn-gold {
  background: linear-gradient(180deg, #ffe58a, var(--gold));
  color: #241300; border-color: transparent;
  box-shadow: 0 8px 26px rgba(255, 194, 60, .40);
}
.btn-back {
  background: rgba(255,255,255,.07); border: 1px solid var(--line);
  color: var(--txt); padding: 9px 16px; border-radius: 9px;
  font-size: 14px; cursor: pointer; transition: background .15s;
}
.btn-back:hover { background: rgba(255,255,255,.14); }
.btn-back.small { padding: 6px 12px; font-size: 12px; }
.btn-link {
  background: none; border: 0; color: var(--txt-dim);
  font-size: 12.5px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--txt); }

.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 24, .72);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.topbar h2 { font-size: 19px; font-weight: 750; letter-spacing: .4px; }
.topbar .crystals { margin-left: auto; }
.crystals {
  background: rgba(255, 194, 60, .13);
  border: 1px solid rgba(255, 194, 60, .34);
  color: var(--gold);
  padding: 7px 15px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
}

/* =========================================================================
   MENU
   ========================================================================= */
#screen-menu { align-items: center; justify-content: center; }
.menu-inner { text-align: center; z-index: 1; }
.logo {
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 900; letter-spacing: 3px; line-height: .96;
  background: linear-gradient(180deg, #fff6d8 6%, var(--gold) 46%, var(--gold-2) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 18px rgba(255, 138, 30, .45));
}
.logo span { display: block; }
.logo-sub {
  margin-top: 8px; font-size: clamp(13px, 2vw, 19px);
  letter-spacing: 11px; color: var(--txt-dim); font-weight: 600;
}
.menu-nav { margin-top: 46px; display: flex; flex-direction: column; gap: 13px; width: 300px; margin-inline: auto; }
.menu-foot { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* =========================================================================
   ÉCRAN HÉROS
   ========================================================================= */
.hero-layout { flex: 1; display: grid; grid-template-columns: 1fr 400px; overflow: hidden; }
.hero-main { display: flex; flex-direction: column; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 17px; padding: 22px; overflow-y: auto; align-content: start;
}

/* =========================================================================
   BARRE DE FILTRES
   ========================================================================= */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
  flex-shrink: 0;
}

/* --- bouton qui ouvre le menu --- */
.filter-wrap { position: relative; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  color: var(--txt); font-family: inherit; font-size: 13.5px; font-weight: 650;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; transition: .15s;
}
.filter-toggle:hover { border-color: rgba(255,194,60,.5); background: rgba(255,194,60,.08); }
.ft-badge {
  background: var(--gold); color: #241300; font-weight: 850;
  font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; display: inline-grid; place-items: center;
}
.filter-count { font-size: 12.5px; color: var(--txt-dim); }

/* --- panneau déroulant --- */
.filter-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  width: 340px; max-height: 70vh; overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 13px; padding: 14px; box-shadow: var(--shadow);
  display: none; animation: fade .14s ease;
}
.filter-panel.open { display: block; }
.fp-label {
  font-size: 10.5px; letter-spacing: 1.1px; color: var(--txt-dim);
  font-weight: 700; margin: 13px 0 7px;
}
.fp-label:first-of-type { margin-top: 4px; }
.fp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fp-chip {
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--txt-dim); padding: 6px 11px; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 650; font-family: inherit; transition: .14s; white-space: nowrap;
}
.fp-chip:hover { color: var(--txt); border-color: rgba(255,255,255,.25); }
.fp-chip.active {
  background: rgba(255,194,60,.18); border-color: rgba(255,194,60,.5); color: var(--gold);
}
.fp-chip.active.tinted {
  background: color-mix(in srgb, var(--chip) 22%, transparent);
  border-color: var(--chip); color: var(--chip);
}
.fp-reset { display: block; margin: 15px 0 2px; }

.filter-search {
  display: flex; align-items: center; gap: 7px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
  border-radius: 9px; padding: 0 10px; height: 36px;
  transition: border-color .16s, box-shadow .16s;
}
.filter-search:focus-within {
  border-color: rgba(255, 194, 60, .55);
  box-shadow: 0 0 0 3px rgba(255, 194, 60, .12);
}
.filter-search .fs-icon { font-size: 12px; opacity: .65; }
.filter-search input {
  background: none; border: 0; outline: none; color: var(--txt);
  font-size: 13.5px; flex: 1; min-width: 0; font-family: inherit;
}
.filter-search input::placeholder { color: var(--txt-dim); }
.fs-clear {
  background: none; border: 0; cursor: pointer; color: var(--txt-dim);
  font-size: 12px; padding: 2px 3px; border-radius: 4px;
}
.fs-clear:hover { color: var(--txt); background: rgba(255,255,255,.1); }

.empty-msg {
  grid-column: 1 / -1; text-align: center; color: var(--txt-dim);
  font-size: 14px; padding: 46px 20px;
}

/* --- tags sur la fiche de héros --- */
.hd-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tag-chip {
  font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
  background: color-mix(in srgb, var(--tc) 14%, transparent);
}

/* =========================================================================
   INFOBULLE D'UNITÉ (combat)
   ========================================================================= */
.unit-tip {
  position: fixed; z-index: 300; pointer-events: none;
  width: 268px; padding: 12px 13px;
  background: rgba(14, 18, 38, .97);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .68);
  animation: fade .13s ease;
  backdrop-filter: blur(8px);
}
.tip-head {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding-bottom: 9px; margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.tip-head b { font-size: 14px; margin-right: auto; }
.tip-head .chip { font-size: 10px; padding: 2px 7px; }
.tip-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tip-stats div {
  background: rgba(255, 255, 255, .05); border-radius: 8px;
  padding: 6px 4px; text-align: center;
}
.tip-stats small { display: block; color: var(--txt-dim); font-size: 9.5px; letter-spacing: .7px; }
.tip-stats b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tip-delta { font-size: 10.5px; font-weight: 700; }
.tip-delta.up { color: var(--ok); }
.tip-delta.down { color: var(--danger); }

.tip-section {
  font-size: 10px; letter-spacing: 1.3px; color: var(--txt-dim);
  font-weight: 700; margin: 11px 0 5px;
}
.tip-mod {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 11.5px; padding: 3px 0;
}
.tip-mod span { flex: 1; }
.tip-mod b { font-variant-numeric: tabular-nums; }
.tip-mod small { color: var(--txt-dim); font-size: 9.5px; }
.tip-mod.up b { color: var(--ok); }
.tip-mod.down b { color: var(--danger); }
.tip-none { font-size: 11.5px; color: var(--txt-dim); margin-top: 9px; font-style: italic; }
.tip-note { font-size: 11px; color: #c6cded; line-height: 1.5; }
.tip-orbs {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--txt-dim);
}
.unit:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.hero-card {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(170deg, var(--panel-solid), #0d1226);
  border: 1px solid var(--line);
  cursor: pointer; transition: transform .16s, box-shadow .2s, border-color .2s;
  /* Hauteur fixe et non `aspect-ratio` : tous les enfants de la carte sont en
     position absolue, donc sa hauteur intrinsèque est nulle et la ligne de
     grille se calait à ~93px, ce qui faisait se chevaucher les cartes. */
  height: 244px;
}
.hero-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(255,255,255,.24); }
.hero-card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,194,60,.35), var(--shadow); }

/* Une autre forme du même personnage est déjà dans l'équipe. On grise sans
   masquer : le joueur doit comprendre que la carte est écartée par la règle,
   pas absente de sa collection. Le curseur reste cliquable, le clic explique. */
.hero-card.twin-locked { opacity: .38; filter: saturate(.35); }
.hero-card.twin-locked::after {
  content: '⛔'; position: absolute; top: 6px; right: 6px;
  font-size: 13px; line-height: 1; text-shadow: 0 1px 3px #000;
}
.hero-card.locked { filter: grayscale(.85) brightness(.5); }
.hero-card .portrait {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 8px 34px;
}
.hero-card .portrait img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.6)); }
.hero-card .aura { position: absolute; inset: 0; opacity: .3; }
.hero-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 9px 11px 10px;
  background: linear-gradient(0deg, rgba(6,8,18,.97), rgba(6,8,18,.72) 62%, transparent);
}
.hero-card .cap b { display: block; font-size: 13.5px; font-weight: 750; }
.hero-card .cap small { color: var(--txt-dim); font-size: 11px; }
.rarity-tag {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  font-size: 10.5px; font-weight: 850; letter-spacing: .6px;
  padding: 3px 8px; border-radius: 6px; color: #1a1206;
}
.rarity-SSR { background: linear-gradient(180deg, #ffe58a, var(--ssr)); }
.rarity-SR  { background: linear-gradient(180deg, #ddb6ff, var(--sr)); }
.rarity-R   { background: linear-gradient(180deg, #bae6fd, var(--r)); }
.attr-tag {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px;
  border: 1px solid rgba(255,255,255,.28);
}
.stars-tag {
  position: absolute; bottom: 44px; left: 10px; z-index: 2;
  font-size: 11px; color: var(--gold); letter-spacing: 1px;
  text-shadow: 0 1px 4px #000;
}
.lock-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 30px; z-index: 3;
}

/* --- panneau de détail --- */
.hero-detail {
  border-left: 1px solid var(--line);
  background: rgba(10, 13, 26, .68);
  overflow-y: auto; padding: 22px;
}
.hd-empty { color: var(--txt-dim); text-align: center; margin-top: 70px; font-size: 14px; line-height: 1.7; }
.hd-hero { display: flex; flex-direction: column; gap: 15px; }
.hd-top { position: relative; border-radius: var(--r); overflow: hidden; padding: 14px; text-align: center; }
.hd-top img { width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0,0,0,.65)); }
.hd-name { font-size: 22px; font-weight: 800; margin-top: 6px; }
.hd-title { color: var(--txt-dim); font-size: 13px; }
.hd-chips { display: flex; gap: 8px; justify-content: center; margin-top: 11px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06);
}
.hd-lore { font-size: 12.5px; color: var(--txt-dim); line-height: 1.65; font-style: italic; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat {
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; text-align: center;
}
.stat small { display: block; color: var(--txt-dim); font-size: 10.5px; letter-spacing: .8px; }
.stat b { font-size: 17px; }

.skill-box {
  background: rgba(255,255,255,.045); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px;
}
.skill-box + .skill-box { margin-top: 9px; }
.skill-box.passive { border-color: rgba(255,194,60,.36); background: rgba(255,194,60,.07); }
.skill-box.ult     { border-color: rgba(255,138,30,.5);  background: linear-gradient(140deg, rgba(255,138,30,.14), rgba(255,77,90,.09)); }
.sb-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.sb-head b { font-size: 14.5px; }
.sb-tag {
  margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  color: var(--txt-dim); border: 1px solid var(--line); padding: 2px 7px; border-radius: 5px;
}
.sb-desc { font-size: 12.5px; color: #c6cded; line-height: 1.6; }

/* --- effets nommés entre crochets --- */
.kw {
  color: var(--kw); font-weight: 800;
  background: color-mix(in srgb, var(--kw) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--kw) 45%, transparent);
  padding: 0 6px; border-radius: 5px; white-space: nowrap;
}
.kw-def {
  margin-top: 6px; padding: 6px 9px;
  border-left: 3px solid var(--kw);
  background: color-mix(in srgb, var(--kw) 9%, transparent);
  border-radius: 0 7px 7px 0;
  font-size: 11.5px; line-height: 1.55; color: var(--txt-dim);
}
.kw-def b { color: var(--kw); }

/* ligne « Concerne : … » sous un buff d'équipe */
.concerned {
  margin-top: 7px; font-size: 11.5px; color: var(--txt-dim);
  padding: 5px 9px; border-radius: 7px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.concerned b { font-weight: 700; }

/* « alliés concernés » dans le texte : renvoie visuellement à la ligne ci-dessus */
.concerned-word { color: #4a9eff; font-weight: 700; }

/* --- chiffres et pourcentages mis en évidence dans les descriptions --- */
.sb-desc .num, .kw-def .num { color: #ffd76a; font-weight: 700; }

/* --- SSR vedette : cadre distinct d'un SSR ordinaire --- */
.hero-card.featured {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 26px rgba(255, 214, 102, .5);
  background: linear-gradient(170deg, #3a2a10, #16101f);
}
.hero-card.featured::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(120deg, transparent 38%, rgba(255,255,255,.16) 50%, transparent 62%);
  animation: featuredSheen 3.4s ease-in-out infinite;
}
@keyframes featuredSheen {
  0%, 100% { transform: translateX(-60%); opacity: 0; }
  45%      { opacity: 1; }
  60%      { transform: translateX(60%); opacity: 0; }
}
.rarity-tag.rarity-featured {
  background: linear-gradient(180deg, #fff6d0, #ffcc33 55%, #ff9f1a);
  color: #2a1600; box-shadow: 0 0 12px rgba(255, 204, 51, .8);
}
.featured-ribbon {
  position: absolute; top: 34px; left: -26px; z-index: 3;
  transform: rotate(-38deg);
  background: linear-gradient(90deg, #ff9f1a, #ffcc33);
  color: #2a1600; font-size: 9px; font-weight: 900; letter-spacing: 1.4px;
  padding: 3px 30px; box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.chip-featured {
  background: linear-gradient(180deg, #fff6d0, #ffcc33 55%, #ff9f1a);
  border-color: transparent !important; color: #2a1600 !important;
  font-weight: 850; box-shadow: 0 0 14px rgba(255, 204, 51, .6);
}
.sb-icon { font-size: 17px; }
.rank-tabs { display: flex; gap: 5px; margin-top: 9px; }
.rank-tab {
  flex: 1; padding: 5px; font-size: 11px; font-weight: 700; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 7px; color: var(--txt-dim); transition: .15s;
}
.rank-tab.active { background: rgba(255,194,60,.2); border-color: rgba(255,194,60,.5); color: var(--gold); }
.section-label {
  font-size: 11px; letter-spacing: 1.6px; color: var(--txt-dim);
  font-weight: 700; margin: 4px 0 2px;
}

/* =========================================================================
   GACHA
   ========================================================================= */
/* --- onglets de portail --- */
.banner-tabs {
  display: flex; gap: 9px; padding: 13px 22px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); flex-shrink: 0;
  background: rgba(255,255,255,.022);
}
.banner-tab {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 11px; padding: 9px 15px; cursor: pointer;
  color: var(--txt); font-family: inherit; text-align: left;
  transition: .16s;
}
.banner-tab:hover { border-color: var(--bc); }
.banner-tab.active {
  background: color-mix(in srgb, var(--bc) 18%, transparent);
  border-color: var(--bc);
  box-shadow: 0 0 18px color-mix(in srgb, var(--bc) 30%, transparent);
}
.banner-tab.closed { opacity: .42; }
.bt-icon { font-size: 19px; }
.bt-txt { display: flex; flex-direction: column; line-height: 1.25; }
.bt-txt b { font-size: 13px; }
.bt-txt small { font-size: 10.5px; color: var(--txt-dim); }

.banner-title { font-size: 21px; font-weight: 800; text-align: center; }
.banner-sub { font-size: 13px; color: var(--txt-dim); text-align: center; margin-top: -10px; }

.featured-box {
  display: flex; align-items: center; gap: 15px; cursor: pointer;
  background: linear-gradient(100deg, color-mix(in srgb, var(--bc) 22%, transparent), transparent);
  border: 1px solid var(--bc); border-radius: 14px; padding: 12px 22px 12px 12px;
  box-shadow: 0 0 26px color-mix(in srgb, var(--bc) 28%, transparent);
  transition: transform .16s;
}
.featured-box:hover { transform: translateY(-3px); }
.featured-box img { width: 88px; height: 88px; object-fit: contain; }
.featured-box b { display: block; font-size: 17px; }
.featured-box small { color: var(--txt-dim); font-size: 12px; }
.feat-tag {
  display: inline-block; font-size: 9.5px; font-weight: 850; letter-spacing: 1px;
  background: var(--bc); color: #fff; padding: 2px 8px; border-radius: 5px; margin-bottom: 5px;
}
.feat-rate { font-size: 11.5px; color: var(--gold); margin-top: 4px; font-weight: 700; }

.gacha-orb .dragon-ball { box-shadow: 0 0 62px color-mix(in srgb, var(--bc, #ffa028) 55%, transparent), inset -10px -12px 26px rgba(0,0,0,.34); }

.pull-card.is-r { border-color: rgba(125,211,252,.5); }
.pull-card.is-featured { border-color: #fff; box-shadow: 0 0 30px rgba(255,255,255,.55); }
.rarity-R { background: linear-gradient(180deg, #bae6fd, #7dd3fc); }

.gacha-wrap { flex: 1; overflow-y: auto; padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 17px; }
.gacha-orb { margin-top: 6px; }
.dragon-ball {
  width: 132px; height: 132px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff5cf, #ffb524 42%, #e07a10 78%, #a24f06);
  box-shadow: 0 0 62px rgba(255, 160, 40, .58), inset -10px -12px 26px rgba(0,0,0,.34);
  display: grid; place-items: center;
  animation: float 3.4s ease-in-out infinite;
}
.dragon-ball span { color: #d92b2b; font-size: 42px; text-shadow: 0 2px 5px rgba(0,0,0,.28); }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-13px) rotate(4deg); } }

.gacha-rates { display: flex; gap: 11px; flex-wrap: wrap; justify-content: center; }
.gacha-actions { display: flex; gap: 13px; flex-wrap: wrap; justify-content: center; }
.gacha-note { color: var(--txt-dim); font-size: 12.5px; text-align: center; }

.pull-results {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px; width: 100%; max-width: 860px; margin-top: 6px;
}
.pull-card {
  border-radius: 12px; padding: 10px; text-align: center;
  border: 1px solid var(--line); background: var(--panel-solid);
  animation: pop .42s cubic-bezier(.2,1.5,.4,1) backwards;
  position: relative;
}
.pull-card img { width: 78px; height: 78px; object-fit: contain; }
.pull-card b { display: block; font-size: 12.5px; margin-top: 3px; }
.pull-card small { font-size: 10.5px; color: var(--txt-dim); }
.pull-card.is-ssr { border-color: var(--ssr); box-shadow: 0 0 22px rgba(255, 204, 51, .38); }
.pull-card.is-sr  { border-color: rgba(192,132,252,.6); }
.pull-badge {
  position: absolute; top: -7px; right: -5px;
  font-size: 9.5px; font-weight: 850; padding: 3px 7px; border-radius: 6px;
  background: var(--ok); color: #04150c;
}
.pull-badge.dupe { background: #55608d; color: #fff; }
@keyframes pop { from { opacity: 0; transform: scale(.55) translateY(14px); } to { opacity: 1; transform: none; } }

/* =========================================================================
   MISSIONS
   ========================================================================= */
.missions-intro { padding: 16px 26px 0; color: var(--txt-dim); font-size: 13px; max-width: 780px; }
.missions-grid {
  flex: 1; overflow-y: auto; padding: 18px 26px 26px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px; align-content: start;
}
.mission-card {
  background: linear-gradient(168deg, var(--panel-solid), #0d1226);
  border: 1px solid var(--line); border-radius: 14px; padding: 15px;
  display: flex; flex-direction: column; gap: 9px;
  transition: transform .16s, border-color .18s;
}
.mission-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.22); }
.mission-card.tier-2 { border-left: 3px solid var(--gold); }
.mission-card.tier-3 { border-left: 3px solid var(--danger); }
.mission-card.done { opacity: .82; }
.mc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-head b { font-size: 15px; margin-right: auto; }
.mc-diff {
  font-size: 10px; font-weight: 850; letter-spacing: .6px;
  padding: 3px 9px; border-radius: 6px;
}
.d-easy   { background: rgba(47,217,138,.18); color: var(--ok); }
.d-normal { background: rgba(255,194,60,.18); color: var(--gold); }
.d-hard   { background: rgba(255,77,90,.18);  color: var(--danger); }
.mc-done { font-size: 10.5px; color: var(--ok); font-weight: 700; }
.mc-desc { font-size: 12.5px; color: var(--txt-dim); line-height: 1.55; font-style: italic; }
.mc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.mc-tags .chip { font-size: 10px; padding: 2px 8px; }
.mc-foes, .mb-foes { display: flex; gap: 9px; }
.mf {
  position: relative; width: 54px; height: 54px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.mf img { width: 100%; height: 100%; object-fit: contain; }
.mf-fb { font-size: 15px; font-weight: 800; color: var(--txt-dim); }
.mf b {
  position: absolute; bottom: 1px; left: 0; right: 0; text-align: center;
  font-size: 7.5px; color: var(--gold); background: rgba(6,8,18,.85); letter-spacing: -.5px;
}
.mc-rewards { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--txt-dim); }
.mc-first { color: var(--gold); font-weight: 700; }
.mc-go { margin-top: 3px; padding: 10px; }

/* --- carte du tournoi : mise en avant sur toute la largeur --- */
.mission-card.tournament {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,194,60,.45);
  background: linear-gradient(120deg, rgba(255,138,30,.13), rgba(20,26,52,.9) 55%);
  box-shadow: 0 0 28px rgba(255,138,30,.16);
}
.tour-rounds { display: flex; gap: 8px; flex-wrap: wrap; }
.tr {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 11px; font-size: 11.5px; color: var(--txt-dim);
}
.tr b {
  width: 17px; height: 17px; border-radius: 50%; background: var(--gold);
  color: #241300; font-size: 10px; display: grid; place-items: center;
}
.tour-prize {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,204,51,.08); border: 1px solid rgba(255,204,51,.3);
  border-radius: 12px; padding: 11px 15px;
}
.tour-prize img { width: 72px; height: 72px; object-fit: contain; }
.tour-prize b { display: block; font-size: 16px; }
.tour-prize small { color: var(--txt-dim); font-size: 11.5px; }
.tour-note { font-size: 11px; color: var(--gold); margin-top: 4px; }

.mission-banner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(100deg, rgba(255,138,30,.14), transparent);
  border: 1px solid rgba(255,194,60,.34); border-radius: 13px; padding: 14px 17px;
}
.mission-banner b { display: block; font-size: 17px; margin-top: 5px; }
.mission-banner p { font-size: 12.5px; color: var(--txt-dim); font-style: italic; margin-top: 2px; }
.mission-banner .btn-back { margin-left: auto; }

/* =========================================================================
   SÉLECTION D'ÉQUIPE
   ========================================================================= */
.team-setup { flex: 1; overflow-y: auto; padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 20px; }
.team-setup h3 { font-size: 13px; letter-spacing: 1.2px; color: var(--txt-dim); font-weight: 700; margin-bottom: 9px; }
.mode-picker { display: flex; gap: 46px; flex-wrap: wrap; }
.seg { display: inline-flex; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 11px; padding: 4px; gap: 4px; }
.seg-btn {
  background: none; border: 0; color: var(--txt-dim);
  padding: 9px 17px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; font-weight: 650; transition: .15s;
}
.seg-btn:hover { color: var(--txt); }
.seg-btn.active { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #241300; }

.picked-row { display: flex; gap: 13px; margin-bottom: 17px; flex-wrap: wrap; }
.picked-slot {
  width: 108px; height: 138px; border-radius: 12px;
  border: 2px dashed rgba(255,255,255,.18);
  display: grid; place-items: center; position: relative;
  color: var(--txt-dim); font-size: 12px; overflow: hidden;
  background: rgba(255,255,255,.028);
}
.picked-slot.filled { border-style: solid; border-color: var(--gold); cursor: pointer; background: var(--panel-solid); }
.picked-slot img { width: 100%; height: 100%; object-fit: contain; padding: 5px 5px 22px; }
.picked-slot .pname {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 4px;
  font-size: 10.5px; text-align: center; background: rgba(6,8,18,.9); color: var(--txt);
}
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.team-actions { display: flex; gap: 13px; justify-content: flex-end; }

/* =========================================================================
   COMBAT
   ========================================================================= */
#screen-battle { display: none; }
#screen-battle.active { display: grid; grid-template-rows: auto auto 1fr auto auto; height: 100%; }

.battle-hud {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 18px; border-bottom: 1px solid var(--line);
  background: rgba(10,13,24,.7);
}
.round-pill, .turn-pill {
  font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid var(--line);
}
.turn-pill.mine { background: rgba(255,194,60,.16); border-color: rgba(255,194,60,.42); color: var(--gold); }
.turn-pill.foe  { background: rgba(255,77,90,.16);  border-color: rgba(255,77,90,.42);  color: var(--force); }
.battle-hud .btn-back { margin-left: auto; }

.side { padding: 9px 18px; }
.side-foe { border-bottom: 1px solid var(--line); }
.team-row { display: flex; gap: 13px; justify-content: center; }

/* --- vignette d'unité --- */
.unit {
  width: 152px; border-radius: 12px; padding: 8px;
  background: linear-gradient(170deg, var(--panel-solid), #0c1023);
  border: 1px solid var(--line);
  position: relative; transition: transform .16s, box-shadow .2s, opacity .3s;
}
.unit.targetable { cursor: pointer; }
.unit.targetable:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.3); }
.unit.is-target { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(255,71,87,.35), 0 0 26px rgba(255,71,87,.28); }
.unit.dead { opacity: .3; filter: grayscale(1); }
.unit.acting { transform: translateY(-9px) scale(1.05); box-shadow: 0 0 34px rgba(255,194,60,.5); z-index: 5; }
.unit.hurt { animation: shake .34s; }

/* --- mouvement des unités : bond à l'attaque, recul au coup, chute au K.O. --- */
.unit.lunge-up, .unit.lunge-down, .unit.recoil-up, .unit.recoil-down, .unit.ko-fall { z-index: 7; }
@keyframes lungeUp {
  0% { transform: translateY(0); } 34% { transform: translateY(-30px) scale(1.07); }
  100% { transform: translateY(0); }
}
@keyframes lungeDown {
  0% { transform: translateY(0); } 34% { transform: translateY(30px) scale(1.07); }
  100% { transform: translateY(0); }
}
.unit.lunge-up   { animation: lungeUp .46s cubic-bezier(.3,.85,.3,1); }
.unit.lunge-down { animation: lungeDown .46s cubic-bezier(.3,.85,.3,1); }

@keyframes recoilUp {   /* unité du bas : repoussée vers le bas */
  0% { transform: translate(0,0); } 18% { transform: translate(-6px, 10px); }
  40% { transform: translate(6px, 7px); } 65% { transform: translate(-3px, 3px); }
  100% { transform: translate(0,0); }
}
@keyframes recoilDown { /* unité du haut : repoussée vers le haut */
  0% { transform: translate(0,0); } 18% { transform: translate(-6px, -10px); }
  40% { transform: translate(6px, -7px); } 65% { transform: translate(-3px, -3px); }
  100% { transform: translate(0,0); }
}
.unit.recoil-up   { animation: recoilUp .4s ease-out; }
.unit.recoil-down { animation: recoilDown .4s ease-out; }

@keyframes koFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(26px) rotate(-9deg) scale(.88); opacity: .4; }
}
.unit.ko-fall { animation: koFall .42s cubic-bezier(.4,0,.7,1) forwards; }

/* --- hit-stop : flash d'impact + zoom-punch --- */
.impact-freeze {
  position: fixed; inset: 0; pointer-events: none; z-index: 160;
  background: radial-gradient(circle at 50% 48%, rgba(255,255,255,.30), transparent 58%);
  animation: impFreeze .22s ease-out forwards;
}
@keyframes impFreeze { 0% { opacity: .95; } 100% { opacity: 0; } }
.side-foe, .side-mine, #screen-battle .stage { transition: transform .13s ease; }
#screen-battle.zoom-punch .side-foe,
#screen-battle.zoom-punch .stage,
#screen-battle.zoom-punch .side-mine { transform: scale(1.04); transition: transform .07s ease-out; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(4px); }
}

.unit-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.unit-name { font-size: 11.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-attr { width: 19px; height: 19px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; flex-shrink: 0; }
.unit-art { height: 74px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.unit-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 9px rgba(0,0,0,.6)); }
.side-foe .unit-art img { transform: scaleX(-1); }

.hp-bar { height: 9px; border-radius: 5px; background: rgba(0,0,0,.55); overflow: hidden; margin-top: 5px; position: relative; }
.hp-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #2fd98a, #62f0b0); transition: width .42s cubic-bezier(.3,.9,.3,1); }
.hp-fill.mid { background: linear-gradient(90deg, #ffb524, #ffd76a); }
.hp-fill.low { background: linear-gradient(90deg, #ff3b47, #ff7b85); }
.hp-text { font-size: 10px; color: var(--txt-dim); text-align: right; margin-top: 2px; font-variant-numeric: tabular-nums; }
/* Bouclier : liseré cyan translucide par-dessus la barre de PV, aligné à gauche. */
.shield-fill {
  position: absolute; top: 0; left: 0; height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, rgba(124,192,255,.9), rgba(190,225,255,.75));
  box-shadow: 0 0 6px rgba(124,192,255,.7) inset; transition: width .35s ease;
}
.shield-text { color: #9cd0ff; font-weight: 700; }
.dmg-pop.shield { color: #9cd0ff; text-shadow: 0 2px 8px #000, 0 0 16px rgba(124,192,255,.85); font-size: 22px; }

.orbs { display: flex; gap: 3px; margin-top: 5px; justify-content: center; }
.orb { width: 12px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.13); transition: .25s; }
.orb.on { background: linear-gradient(90deg, var(--gold), #fff0b8); box-shadow: 0 0 7px rgba(255,194,60,.75); }
.unit.ult-ready { box-shadow: 0 0 0 1px var(--gold), 0 0 22px rgba(255,194,60,.4); }

.eff-row { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 5px; min-height: 15px; justify-content: center; }
.eff {
  font-size: 9px; padding: 1px 5px; border-radius: 4px; font-weight: 700;
  border: 1px solid transparent;
}
.eff.up   { background: rgba(47,217,138,.18); color: #6ff0b4; border-color: rgba(47,217,138,.4); }
.eff.down { background: rgba(255,77,90,.18);  color: #ff9aa2; border-color: rgba(255,77,90,.4); }

/* --- scène --- */
.stage { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 92px; }
.battle-feed {
  display: flex; flex-direction: column; gap: 5px; align-items: center;
  font-size: 13px; color: var(--txt-dim); max-height: 100%; overflow: hidden;
  padding: 8px;
}
.feed-line { animation: fade .3s; }
.feed-line b { color: var(--txt); }
.feed-line.big {
  font-size: 21px; font-weight: 850; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.dmg-pop {
  position: absolute; font-weight: 900; font-size: 26px;
  color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 18px rgba(255,80,80,.7);
  pointer-events: none; animation: dmgUp 1s ease-out forwards;
}
.dmg-pop.crit { font-size: 34px; color: #ffe066; text-shadow: 0 2px 10px #000, 0 0 24px rgba(255,190,40,.95); }
.dmg-pop.heal { color: #6ff0b4; text-shadow: 0 2px 8px #000, 0 0 18px rgba(47,217,138,.8); }
@keyframes dmgUp {
  0%   { opacity: 0; transform: translate(-50%, 6px) scale(.6); }
  22%  { opacity: 1; transform: translate(-50%, -12px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -62px) scale(1); }
}


/* --- pont de commande : emplacements + main --- */
.control-deck {
  border-top: 1px solid var(--line);
  background: rgba(10,13,24,.85);
  padding: 10px 18px 13px;
  display: flex; flex-direction: column; gap: 9px;
}
.slots-row { display: flex; gap: 11px; justify-content: center; min-height: 74px; }
.action-slot {
  width: 96px; height: 74px; border-radius: 11px;
  border: 2px dashed rgba(255,255,255,.16);
  display: grid; place-items: center;
  color: var(--txt-dim); font-size: 21px; position: relative;
  background: rgba(255,255,255,.028); transition: .16s;
}
.action-slot.drop-hint { border-color: var(--gold); background: rgba(255,194,60,.12); }
.action-slot.filled { border-style: solid; border-color: transparent; padding: 0; }
.slot-index {
  position: absolute; top: -8px; left: -6px; z-index: 3;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); color: #241300;
  font-size: 11px; font-weight: 850; display: grid; place-items: center;
}
.slot-target {
  position: absolute; bottom: -7px; right: -7px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden;
  background: var(--panel-solid); border: 2px solid var(--danger);
  display: grid; place-items: center;
  font-size: 8px; font-weight: 850; color: var(--txt-dim);
}
.slot-target img { width: 130%; height: 130%; object-fit: contain; }
.slot-target.aoe   { border-color: var(--gold); color: var(--gold); }
.slot-target.ally  { border-color: var(--ok); color: var(--ok); font-size: 13px; }

.hand-row { display: flex; gap: 10px; justify-content: center; min-height: 104px; align-items: center; flex-wrap: nowrap; }

/* --- carte de compétence --- */
.card {
  width: 92px; height: 104px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(168deg, #1c2344, #0e1226);
  border: 1px solid var(--line);
  position: relative; cursor: grab; overflow: hidden;
  transition: transform .14s, box-shadow .18s, border-color .18s;
  user-select: none; touch-action: none;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 26px rgba(0,0,0,.55); }
.card.dragging { opacity: .35; cursor: grabbing; }
.card.merge-target { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(47,217,138,.45), 0 0 22px rgba(47,217,138,.4); transform: translateY(-6px) scale(1.05); }
.card.in-slot { width: 96px; height: 74px; cursor: pointer; }
.card.in-slot .card-name { font-size: 9.5px; }
.card.in-slot .card-art { height: 26px; }

.card-strip { height: 3px; width: 100%; flex-shrink: 0; }
.card-art { height: 40px; display: flex; align-items: center; justify-content: center; margin-top: 3px; overflow: hidden; }
.card-art img { width: 84%; height: 100%; object-fit: contain; }
.card-body { padding: 2px 5px 4px; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.card-name { font-size: 10px; font-weight: 750; line-height: 1.18; }
.card-ranks { display: flex; gap: 2px; justify-content: center; margin-top: 3px; }
.card-rank-pip { width: 11px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.18); }
.card-rank-pip.on { background: var(--gold); box-shadow: 0 0 5px rgba(255,194,60,.85); }

.card.ult {
  border-color: var(--gold);
  background: linear-gradient(168deg, #4a2c08, #2a1605);
  box-shadow: 0 0 20px rgba(255,194,60,.34);
  animation: ultPulse 1.7s ease-in-out infinite;
}
@keyframes ultPulse {
  0%,100% { box-shadow: 0 0 18px rgba(255,194,60,.3); }
  50%     { box-shadow: 0 0 30px rgba(255,194,60,.62); }
}
.card.ult .card-name { color: var(--gold); }
.ult-tag {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  font-size: 8px; font-weight: 850; letter-spacing: .5px;
  background: var(--gold); color: #241300; padding: 1px 5px; border-radius: 4px;
}

.deck-actions { display: flex; align-items: center; gap: 15px; }
.hint { font-size: 11.5px; color: var(--txt-dim); flex: 1; line-height: 1.5; }
.deck-actions .btn { padding: 11px 30px; }

.drag-ghost {
  position: fixed; z-index: 999; pointer-events: none;
  transform: translate(-50%, -50%) scale(1.08) rotate(-3deg);
  box-shadow: 0 16px 40px rgba(0,0,0,.7);
  opacity: .96;
}

/* =========================================================================
   FX — calque plein écran des effets de combat
   ========================================================================= */
#fx-overlay {
  position: fixed; inset: 0; z-index: 150;
  pointer-events: none; overflow: hidden;
}
#fx-overlay > * { position: absolute; }

/* secousse d'écran */
#app.fx-shaking { animation: fxShake .48s cubic-bezier(.36,.07,.19,.97); }
@keyframes fxShake {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(calc(var(--shake) * -1), calc(var(--shake) * .4)); }
  25% { transform: translate(var(--shake), calc(var(--shake) * -.5)); }
  40% { transform: translate(calc(var(--shake) * -.7), calc(var(--shake) * .6)); }
  55% { transform: translate(calc(var(--shake) * .6), calc(var(--shake) * -.3)); }
  70% { transform: translate(calc(var(--shake) * -.35), 0); }
  85% { transform: translate(calc(var(--shake) * .2), 0); }
}

/* --- impact --- */
.fx-impact {
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--c) 34%, transparent 70%);
  animation: fxImpact .58s cubic-bezier(.15,.9,.3,1) forwards;
}
@keyframes fxImpact {
  0%   { opacity: 0; transform: scale(.4); }
  18%  { opacity: 1; transform: scale(calc(7 * var(--s))); }
  100% { opacity: 0; transform: scale(calc(12 * var(--s))); }
}
.fx-shard {
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 8px var(--c);
  animation: fxShard .5s ease-out forwards;
}
@keyframes fxShard {
  0%   { opacity: 1; transform: translate(0,0) scale(1.3); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); }
}

/* --- rayon --- */
.fx-beam {
  height: 12px; margin-top: -6px; transform-origin: 0 50%;
  border-radius: 6px;
  background: linear-gradient(90deg, #fff, var(--c) 26%, var(--c) 74%, rgba(255,255,255,.7));
  box-shadow: 0 0 20px var(--c), 0 0 44px var(--c);
  animation: fxBeam .6s ease-out forwards;
}
@keyframes fxBeam {
  0%   { opacity: 0; clip-path: inset(0 100% 0 0); }
  22%  { opacity: 1; clip-path: inset(0 0 0 0); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform-origin: 0 50%; }
}
.fx-charge {
  width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--c) 60%, transparent);
  box-shadow: 0 0 24px var(--c);
  animation: fxCharge .4s ease-out forwards;
}
@keyframes fxCharge {
  0%   { opacity: 0; transform: scale(.2); }
  40%  { opacity: 1; transform: scale(2.4); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* --- projectile --- */
.fx-orb {
  width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #fff, var(--c) 58%, transparent 78%);
  box-shadow: 0 0 26px var(--c), 0 0 52px var(--c);
  animation: fxOrb .48s cubic-bezier(.4,0,.7,1) forwards;
}
.fx-orb.big { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
@keyframes fxOrb {
  0%   { opacity: 0; transform: translate(0,0) scale(.3); }
  18%  { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1.15); }
}

/* --- entaille --- */
/* Centrage assuré par le translate(-50%,-50%) posé en ligne — pas de marge ici,
   sinon le décalage serait appliqué deux fois. */
.fx-slash {
  width: 150px; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, transparent, #fff 30%, var(--c) 55%, transparent);
  box-shadow: 0 0 16px var(--c);
  animation: fxSlash .4s ease-out forwards;
}
@keyframes fxSlash {
  0%   { opacity: 0; clip-path: inset(0 100% 0 0); }
  30%  { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; }
}

/* --- onde de choc --- */
.fx-ring {
  width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
  border: 4px solid var(--c); box-shadow: 0 0 22px var(--c), inset 0 0 18px var(--c);
  animation: fxRing .68s cubic-bezier(.1,.8,.3,1) forwards;
}
@keyframes fxRing {
  0%   { opacity: 0; transform: scale(.2); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: scale(6.5); border-width: 1px; }
}

/* --- soin --- */
.fx-heal-glow {
  width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,217,138,.55), transparent 68%);
  animation: fxHealGlow .9s ease-out forwards;
}
@keyframes fxHealGlow {
  0% { opacity: 0; transform: scale(.5); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); }
}
.fx-spark {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6ff0b4; box-shadow: 0 0 10px #2fd98a;
  animation: fxSpark 1s ease-out forwards;
}
@keyframes fxSpark {
  0%   { opacity: 0; transform: translateY(0) scale(.6); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-58px) scale(1.1); }
}

/* --- bouclier --- */
/* Positionné sur le coin haut-gauche de l'unité (fx.js), donc aucun centrage :
   les keyframes animent `transform`, un translate y serait écrasé. */
.fx-shield {
  border-radius: 14px; border: 2px solid var(--c);
  box-shadow: 0 0 26px var(--c), inset 0 0 26px var(--c);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--c) 18%, transparent));
  animation: fxShield .88s ease-out forwards;
}
@keyframes fxShield {
  0% { opacity: 0; transform: scale(1.35); } 30% { opacity: 1; transform: scale(1); }
  70% { opacity: .85; } 100% { opacity: 0; transform: scale(1.05); }
}

/* --- absorption --- */
.fx-drain {
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 12px var(--c);
  animation: fxDrain .85s cubic-bezier(.5,0,.6,1) forwards;
}
@keyframes fxDrain {
  0%   { opacity: 0; transform: translate(0,0) scale(1.4); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); }
}

/* --- rayon hélicoïdal --- */
.fx-spiral {
  height: 30px; margin-top: -15px; transform-origin: 0 50%;
  background: repeating-linear-gradient(90deg,
    transparent 0 10px, color-mix(in srgb, var(--c) 75%, #fff) 10px 18px);
  opacity: .85; filter: blur(.4px);
  animation: fxSpiral .68s linear forwards;
}
@keyframes fxSpiral {
  0%   { opacity: 0; clip-path: inset(0 100% 0 0); }
  25%  { opacity: .9; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; background-position-x: 90px; }
}

/* --- flash plein écran --- */
.fx-flash {
  inset: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, #fff, var(--c) 42%, transparent 78%);
  animation: fxFlash .44s ease-out forwards;
}
@keyframes fxFlash { 0% { opacity: 0; } 14% { opacity: .92; } 100% { opacity: 0; } }

/* =========================================================================
   FX — séquence d'ULTIME
   ========================================================================= */
.fx-ult-dim {
  inset: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--c) 22%, transparent), rgba(2,4,10,.86) 70%);
  animation: fxUltDim 1.9s ease-out forwards;
}
@keyframes fxUltDim {
  0% { opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; }
}

.fx-ult-rays { inset: 0; width: 100%; height: 100%; }
.fx-ult-rays .fx-ray {
  position: absolute; left: 50%; top: 50%;
  width: 52vmax; height: 3px; transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c) 80%, #fff));
  animation: fxRay 1.4s ease-out forwards;
}
@keyframes fxRay {
  0%   { opacity: 0; }
  16%  { opacity: .85; }
  100% { opacity: 0; }
}

.fx-ult-cutin {
  left: 0; top: 50%; width: 100%; height: 300px; margin-top: -150px;
  display: flex; align-items: center;
  animation: fxCutIn 1.7s cubic-bezier(.16,.9,.3,1) forwards;
}
.fx-ult-band {
  position: absolute; left: -12%; top: 0; width: 124%; height: 100%;
  background: linear-gradient(100deg,
    transparent 0%,
    color-mix(in srgb, var(--c) 60%, transparent) 18%,
    color-mix(in srgb, var(--c) 22%, transparent) 52%,
    transparent 82%);
  transform: skewY(-6deg);
  box-shadow: 0 0 60px color-mix(in srgb, var(--c) 55%, transparent);
}
.fx-ult-cutin img {
  position: relative; height: 300px; margin-left: 4vw;
  object-fit: contain;
  filter: drop-shadow(0 0 28px var(--c)) drop-shadow(0 12px 26px rgba(0,0,0,.8));
  animation: fxCutInImg 1.7s cubic-bezier(.16,.9,.3,1) forwards;
}
@keyframes fxCutIn {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  74%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes fxCutInImg {
  0%   { transform: translateX(-46vw) scale(.86); }
  22%  { transform: translateX(0) scale(1); }
  70%  { transform: translateX(2vw) scale(1.04); }
  100% { transform: translateX(8vw) scale(1.08); }
}

.fx-ult-name {
  left: 0; right: 0; top: 50%; margin-top: -14px;
  text-align: right; padding-right: 5vw;
  animation: fxUltName 1.8s cubic-bezier(.16,.9,.3,1) forwards;
}
.fx-ult-name .fx-ult-caster {
  display: block; font-size: clamp(12px, 1.6vw, 18px);
  letter-spacing: 5px; color: #fff; opacity: .8; margin-bottom: 4px;
  text-shadow: 0 2px 10px #000;
}
.fx-ult-name b {
  display: block; font-size: clamp(28px, 5.4vw, 68px);
  font-weight: 900; letter-spacing: 2px; line-height: 1;
  background: linear-gradient(180deg, #fff 8%, var(--gold) 52%, var(--gold-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255,138,30,.9));
}
@keyframes fxUltName {
  0%   { opacity: 0; transform: translateX(9vw); }
  16%  { opacity: 1; transform: translateX(0); }
  76%  { opacity: 1; transform: translateX(-1vw); }
  100% { opacity: 0; transform: translateX(-5vw); }
}

.fx-ult-charge {
  width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #fff, var(--c) 56%, transparent 76%);
  box-shadow: 0 0 40px var(--c), 0 0 90px var(--c);
  animation: fxUltCharge .72s cubic-bezier(.3,.8,.4,1) forwards;
}
@keyframes fxUltCharge {
  0%   { opacity: 0; transform: scale(.2); }
  45%  { opacity: 1; transform: scale(2.8); }
  80%  { opacity: 1; transform: scale(2.2); }
  100% { opacity: 0; transform: scale(.6); }
}

.fx-ult-beam {
  height: 46px; margin-top: -23px; transform-origin: 0 50%;
  border-radius: 24px;
  background: linear-gradient(90deg, #fff 0%, #fff 12%, var(--c) 42%, var(--c) 84%, rgba(255,255,255,.6));
  box-shadow: 0 0 40px var(--c), 0 0 110px var(--c);
  animation: fxUltBeam .78s cubic-bezier(.1,.85,.3,1) forwards;
}
/* N'anime ni `transform` ni rien qui l'écraserait : la rotation du rayon est
   posée en ligne par fx.js et doit survivre à l'animation. */
@keyframes fxUltBeam {
  0%   { opacity: 0; clip-path: inset(45% 100% 45% 0); }
  16%  { opacity: 1; clip-path: inset(0 0 0 0); }
  62%  { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; clip-path: inset(0 0 0 0); }
}

/* =========================================================================
   CINÉMATIQUE D'INVOCATION (perso vedette)
   ========================================================================= */
.summon-cine {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) 30%, #05070f) 0%, #05070f 70%);
  cursor: pointer; animation: fade .3s ease;
}
.summon-cine.out { animation: fade .3s ease reverse; }
.summon-cine .sc-rays {
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 0deg at 50% 45%,
    color-mix(in srgb, var(--c) 22%, transparent) 0deg 6deg, transparent 6deg 14deg);
  animation: scSpin 14s linear infinite; opacity: .5;
}
@keyframes scSpin { to { transform: rotate(360deg); } }
.summon-cine .sc-flash {
  position: absolute; inset: 0; background: #fff;
  animation: scFlash .7s ease-out forwards;
}
@keyframes scFlash { 0% { opacity: .9; } 100% { opacity: 0; } }
.summon-cine .sc-portrait {
  width: 240px; height: 240px; object-fit: contain; border-radius: 50%;
  filter: drop-shadow(0 0 40px var(--c));
  animation: scPortrait 1s cubic-bezier(.15,1.4,.4,1) both;
}
@keyframes scPortrait {
  0% { opacity: 0; transform: scale(.3) rotate(-12deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.summon-cine .sc-tag {
  margin-top: 18px; font-size: 12px; font-weight: 850; letter-spacing: 3px;
  color: #05070f; background: linear-gradient(180deg, #fff6d0, #ffcc33);
  padding: 4px 16px; border-radius: 999px;
  animation: fade .5s ease .5s both;
}
.summon-cine .sc-name {
  margin-top: 12px; font-size: clamp(30px, 6vw, 56px); font-weight: 900; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff, var(--c) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 14px color-mix(in srgb, var(--c) 70%, transparent));
  animation: scName .6s cubic-bezier(.2,1.3,.4,1) .55s both;
}
@keyframes scName { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.summon-cine .sc-form { color: var(--txt-dim); font-size: 15px; margin-top: 2px; animation: fade .5s ease .7s both; }
.summon-cine .sc-quote {
  margin-top: 20px; max-width: 520px; text-align: center; font-style: italic;
  font-size: 17px; color: #e7ecff; animation: fade .7s ease .95s both;
}

/* =========================================================================
   RÉSULTAT
   ========================================================================= */
/* Écran défilable : quand récompense + XP + récap dépassent la hauteur, les
   boutons d'action restaient hors de portée (le centrage flex rognait le bas
   sans permettre de scroller). `margin: auto 0` centre quand ça tient, et
   laisse défiler proprement quand ça déborde. */
#screen-result { align-items: center; justify-content: flex-start; overflow-y: auto; padding: 22px 16px 30px; }
.result-inner { text-align: center; margin: auto 0; width: 100%; max-width: 620px; }
#result-title {
  font-size: clamp(40px, 8.5vw, 84px); font-weight: 900; letter-spacing: 5px;
  background: linear-gradient(180deg, #fff8e0, var(--gold) 50%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 22px rgba(255,138,30,.5));
  animation: pop .55s cubic-bezier(.2,1.4,.4,1);
}
#result-title.lose {
  background: linear-gradient(180deg, #ffd0d4, var(--danger) 55%, #8b1220);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 6px 22px rgba(255,71,87,.45));
}
#result-sub { color: var(--txt-dim); margin-top: 10px; font-size: 15px; }
.result-reward {
  margin: 24px auto 0; font-size: 17px; color: var(--gold); font-weight: 700;
}
.result-actions { margin-top: 22px; display: flex; gap: 11px; justify-content: center; flex-wrap: wrap;
  position: sticky; bottom: 0; padding: 12px 0 6px;
  background: linear-gradient(180deg, transparent, var(--bg) 45%); }

/* =========================================================================
   MODALE
   ========================================================================= */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,6,14,.78); backdrop-filter: blur(5px); }
.modal-box {
  position: relative; width: min(880px, 92vw); max-height: 88vh; overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow);
  animation: pop .3s cubic-bezier(.2,1.3,.4,1);
}
.modal-close {
  position: absolute; top: 13px; right: 13px; z-index: 3;
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid var(--line);
  color: var(--txt); font-size: 17px;
}
.modal-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }

/* --- barres de défilement --- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.24); }

/* --- écrans peu hauts : version compacte du combat ---------------------- */
@media (max-height: 800px) {
  .side { padding: 5px 16px; }
  .unit { width: 134px; padding: 6px; }
  .unit-art { height: 54px; }
  .hp-text { font-size: 9px; }
  .eff-row { min-height: 0; }
  .stage { min-height: 62px; }
  .battle-feed { font-size: 12px; gap: 3px; }
  .control-deck { padding: 7px 16px 9px; gap: 6px; }
  .slots-row { min-height: 62px; }
  .action-slot { width: 84px; height: 62px; }
  .card { width: 80px; height: 88px; }
  .card.in-slot { width: 84px; height: 62px; }
  .card-art { height: 34px; }
  .card.in-slot .card-art { height: 22px; }
  .hand-row { min-height: 88px; gap: 8px; }
  .deck-actions .btn { padding: 9px 24px; font-size: 14px; }
  .hint { font-size: 10.5px; }
}

/* --- écrans étroits --- */
@media (max-width: 1000px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-detail { display: none; }
  .modal-grid { grid-template-columns: 1fr; }
  .unit { width: 118px; }
  .card, .card.in-slot { width: 76px; }
  .action-slot { width: 80px; }
}

/* =========================================================================
   MENU PRINCIPAL — refonte en tuiles
   ========================================================================= */
.menu-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 26px 34px 0; z-index: 1;
}
.menu-brand { text-align: left; }
.menu-top .logo { font-size: 40px; line-height: .92; }
.menu-top .logo span { display: inline; }
.menu-top .logo-sub { margin-top: 2px; font-size: 12px; letter-spacing: 5px; }
.menu-wallet { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--txt);
  font-size: 17px; line-height: 1; transition: .16s;
}
.icon-btn:hover { border-color: var(--gold); transform: rotate(35deg); }

#screen-menu .menu-inner {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 10px 34px 30px; text-align: initial;
}
.menu-tiles {
  display: grid; gap: 14px; width: min(860px, 100%);
  grid-template-columns: repeat(3, 1fr);
}
.tile {
  position: relative; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px 18px 16px; border-radius: 16px; color: var(--txt);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: .18s; overflow: hidden;
}
.tile::after {                       /* liseré d'accent au survol */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--gold); opacity: 0; transition: .18s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--gold); }
.tile:hover::after { opacity: 1; }
.tile-lg { grid-column: span 3; flex-direction: row; align-items: center; gap: 16px; padding: 20px 22px; }
.tile-lg b { font-size: 19px; }
.tile-lg .tile-ico { font-size: 34px; }
.tile-lg small { flex: 1; }
.tile-ico { font-size: 26px; }
.tile b { font-size: 15px; }
.tile small { color: var(--txt-dim); font-size: 12px; }
.tile-gold { background: linear-gradient(120deg, rgba(255,194,60,.14), var(--panel) 60%); }
.tile-badge {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.tile-badge:empty { display: none; }
@media (max-width: 720px) {
  .menu-tiles { grid-template-columns: 1fr; }
  .tile-lg { grid-column: span 1; }
}

/* dock en bas à droite : outils de consultation */
.menu-dock {
  position: absolute; right: 26px; bottom: 22px; z-index: 2;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.dock-btn {
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); color: var(--txt-dim);
  transition: .16s;
}
.dock-btn:hover { color: var(--txt); border-color: var(--gold); transform: translateX(-3px); }

/* =========================================================================
   OPTIONS
   ========================================================================= */
.options-wrap { padding: 22px 34px 40px; overflow-y: auto; max-width: 900px; }
.opt-title { font-size: 15px; margin-top: 22px; letter-spacing: .4px; }
.opt-title:first-child { margin-top: 0; }
.danger-title { color: var(--danger); }
.opt-note { color: var(--txt-dim); font-size: 12.5px; margin: 5px 0 14px; }

.theme-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.theme-card {
  cursor: pointer; text-align: left; padding: 14px; border-radius: 14px;
  background: var(--panel); border: 2px solid var(--line); color: var(--txt); transition: .16s;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card.active { border-color: var(--gold); }
.theme-swatch { display: flex; gap: 5px; margin-bottom: 10px; }
.theme-swatch i { width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(255,255,255,.16); }
.theme-card b { display: block; font-size: 13.5px; }
.theme-card small { color: var(--txt-dim); font-size: 11.5px; }
.theme-card .theme-on { display: none; color: var(--gold); font-size: 11px; font-weight: 700; margin-top: 6px; }
.theme-card.active .theme-on { display: block; }

/* zone sensible : repliée par défaut, saisie obligatoire */
.danger-zone {
  border: 1px solid rgba(255,71,87,.35); border-radius: 14px;
  background: rgba(255,71,87,.05); overflow: hidden;
}
.danger-zone summary {
  cursor: pointer; padding: 13px 16px; font-size: 13px; font-weight: 600; color: var(--danger);
  list-style: none;
}
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone summary::before { content: "⚠ "; }
.danger-zone[open] summary { border-bottom: 1px solid rgba(255,71,87,.25); }
.danger-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.danger-body p { font-size: 12.5px; color: var(--txt-dim); }
.danger-ask b { color: var(--danger); letter-spacing: 1px; }
.danger-input {
  padding: 10px 12px; border-radius: 10px; font-size: 13px; letter-spacing: 2px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--txt);
  font-family: inherit; max-width: 260px;
}
.danger-input:focus { outline: none; border-color: var(--danger); }
.btn-danger {
  background: var(--danger); border-color: var(--danger); color: #fff; max-width: 260px;
}
.btn-danger:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost {
  background: transparent; border: 1px dashed var(--line); color: var(--txt-dim);
  font-size: 12.5px; margin-top: 10px;
}
.btn-ghost:hover { color: var(--txt); border-color: var(--gold); }

/* =========================================================================
   RÉSULTATS D'INVOCATION — en surimpression
   ========================================================================= */
.pull-modal {
  position: fixed; inset: 0; z-index: 150; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(4, 6, 14, .86); backdrop-filter: blur(7px);
  animation: fade .25s ease;
}
.pull-modal.out { animation: fadeOut .25s ease forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.pull-modal h3 { font-size: 19px; letter-spacing: 1px; }
.pull-modal .pull-grid {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  max-width: min(880px, 92vw); max-height: 62vh; overflow-y: auto; padding: 6px;
}
.pull-modal .pull-card { animation: pullPop .4s backwards cubic-bezier(.2,.9,.3,1.2); }
@keyframes pullPop { from { opacity: 0; transform: translateY(16px) scale(.86); } }
.pull-close { font-size: 13px; }
.pull-hint { color: var(--txt-dim); font-size: 12px; }

/* =========================================================================
   TIER LIST DÉV + LEXIQUE
   ========================================================================= */
.tier-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.tier-key {
  flex: 0 0 54px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 21px; font-weight: 800; color: #10121f;
  background: var(--tc); text-shadow: none;
}
.tier-items {
  flex: 1; display: flex; flex-wrap: wrap; gap: 6px; padding: 7px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px;
  min-height: 46px;
}
.tier-chip {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 9px 4px 4px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--panel-solid); border: 1px solid var(--line); transition: .14s;
}
.tier-chip:hover { border-color: var(--gold); transform: translateY(-1px); }
.tier-chip img { width: 24px; height: 24px; border-radius: 50%; }
.tier-chip .tc-rar { font-size: 9.5px; opacity: .8; }
.tier-note { color: var(--txt-dim); font-size: 11.5px; margin: 12px 0 4px; line-height: 1.6; }
/* Unité de réserve : elle n'est visible que par un développeur, il faut qu'elle
   se distingue au premier regard d'une unité réellement déployée. */
.tier-chip.reserve { border-style: dashed; border-color: var(--kw, #a78bfa); }

/* =========================================================================
   PANNEAU DE DÉVELOPPEMENT
   ========================================================================= */
.dev-panel { display: flex; flex-direction: column; min-height: 60vh; }
.dev-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dev-burger {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  font-size: 16px; background: var(--panel-solid); border: 1px solid var(--line);
  color: var(--txt); transition: .14s;
}
.dev-burger:hover { border-color: var(--gold); }
.dev-body { display: flex; gap: 16px; align-items: flex-start; }

.dev-nav {
  flex: 0 0 186px; display: flex; flex-direction: column; gap: 2px;
  padding: 8px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  position: sticky; top: 0;
}
.dev-nav-group {
  font-size: 10px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--txt-dim); padding: 9px 8px 4px;
}
.dev-nav-item {
  text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--txt-dim);
  background: transparent; border: 1px solid transparent; transition: .14s;
}
.dev-nav-item:hover { color: var(--txt); background: rgba(255,255,255,.05); }
.dev-nav-item.on { color: var(--txt); background: var(--panel-solid); border-color: var(--gold); }

.dev-content { flex: 1; min-width: 0; }

/* Sous 760px la navigation devient un vrai tiroir : elle sort du flux et se
   replie après chaque choix, sinon elle mange la moitié d'un écran de
   téléphone alors que le contenu est fait de tableaux larges. */
@media (max-width: 760px) {
  .dev-body { display: block; }
  .dev-nav {
    display: none; width: 100%; margin-bottom: 12px; position: static;
  }
  .dev-nav.open { display: flex; }
}

/* — Listes (réserve, héros) — */
.dev-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.dev-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.dev-av { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; }
.dev-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dev-row-txt b { font-size: 12.5px; }
.dev-row-txt .tier-note { margin: 0; }
.dev-row .btn { flex: 0 0 auto; padding: 5px 11px; font-size: 11px; }

.dev-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.dev-btns .btn { padding: 6px 12px; font-size: 11.5px; }
.dev-form { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; align-items: center; }
.dev-form label { font-size: 11.5px; color: var(--txt-dim); display: flex; align-items: center; gap: 6px; }
.dev-num {
  width: 78px; padding: 5px 8px; border-radius: 8px; font-size: 12px;
  background: var(--panel-solid); border: 1px solid var(--line); color: var(--txt);
}

/* — Cartouches de la vue d'ensemble — */
.dev-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; margin: 10px 0; }
.dev-stat {
  padding: 11px 13px; border-radius: 11px; display: flex; flex-direction: column; gap: 2px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.dev-stat-v { font-size: 20px; font-weight: 800; line-height: 1.1; }
.dev-stat-l { font-size: 10.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--txt-dim); }
.dev-stat .tier-note { margin: 2px 0 0; }

/* — Tableaux — */
/* Le défilement horizontal vit DANS le conteneur : une vingtaine de colonnes
   ne tiendra jamais sur un écran, mais la page elle-même ne doit pas déborder. */
.dev-table-wrap { overflow-x: auto; margin: 8px 0 4px; border-radius: 10px; border: 1px solid var(--line); }
.dev-table { width: 100%; border-collapse: collapse; font-size: 11.5px; white-space: nowrap; }
.dev-table th, .dev-table td { padding: 6px 10px; text-align: left; }
.dev-table thead th {
  position: sticky; top: 0; z-index: 1; cursor: pointer; user-select: none;
  font-size: 10px; letter-spacing: .4px; text-transform: uppercase; color: var(--txt-dim);
  background: var(--panel-solid); border-bottom: 1px solid var(--line);
}
.dev-table thead th:hover { color: var(--txt); }
.dev-table thead th.sorted { color: var(--gold); }
.dev-table tbody tr:nth-child(even) { background: rgba(255,255,255,.025); }
.dev-table tbody tr:hover { background: rgba(255,255,255,.06); }
.dev-table tbody td:first-child { font-weight: 600; }
.dev-bar {
  display: block; height: 7px; width: var(--w); min-width: 2px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent, #4a9eff), var(--gold));
}
.dev-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

/* — Barre de progression de la mesure à chaud — */
.dev-live { margin-top: 14px; }
.dev-prog {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  font-size: 11.5px; color: var(--txt-dim);
}
.dev-prog::before {
  content: ''; flex: 1; height: 7px; border-radius: 4px;
  background: rgba(255,255,255,.07);
}
.dev-prog-bar {
  position: absolute; height: 7px; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent, #4a9eff), var(--gold));
  transition: width .12s linear;
}
.dev-prog { position: relative; }
.dev-prog-bar { left: 0; top: 50%; transform: translateY(-50%); max-width: calc(100% - 110px); }
.dev-prog span { flex: 0 0 auto; }

.lex-item {
  padding: 11px 13px; border-radius: 11px; margin-bottom: 8px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  border-left: 3px solid var(--kw);
}
.lex-item b { color: var(--kw); font-size: 13px; }
.lex-item p { margin-top: 4px; font-size: 12px; color: var(--txt-dim); line-height: 1.55; }
.lex-users { margin-top: 7px; font-size: 11px; color: var(--txt-dim); }
.lex-users span { color: var(--txt); }

/* Mots-clés appariés : un seul bloc, deux définitions côte à côte. Le liseré
   gauche disparaît (chaque moitié porte le sien) et on passe en colonne sous
   560px, sinon les deux définitions deviennent illisibles sur mobile. */
.lex-paired { border-left-color: var(--line); }
.lex-pair-note {
  font-size: 10.5px; letter-spacing: .4px; text-transform: uppercase;
  color: var(--txt-dim); margin-bottom: 9px;
}
.lex-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.lex-half { border-left: 3px solid var(--kw); padding-left: 10px; }
.lex-half b { color: var(--kw); font-size: 13px; }
.lex-half p { margin-top: 4px; font-size: 12px; color: var(--txt-dim); line-height: 1.55; }
@media (max-width: 560px) { .lex-pair { grid-template-columns: 1fr; } }

/* contenu d'un portail, rangé par rareté */
.pool-group { margin-bottom: 14px; }
.pool-head {
  font-size: 12px; font-weight: 800; letter-spacing: 1px; margin-bottom: 7px;
  color: var(--pc); border-bottom: 1px solid var(--line); padding-bottom: 5px;
}
.pool-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.pool-item {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 5px 11px 5px 5px; border-radius: 999px; font-size: 11.5px;
  background: var(--panel-solid); border: 1px solid var(--line); transition: .14s;
}
.pool-item:hover { border-color: var(--gold); }
.pool-item img { width: 26px; height: 26px; border-radius: 50%; }
.pool-item.is-featured { border-color: var(--gold); background: linear-gradient(120deg, rgba(255,194,60,.16), var(--panel-solid)); }

/* bandeau « nouveautés » du portail : vedette en tête */
.new-strip { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.new-card {
  position: relative; cursor: pointer; width: 108px; padding: 10px 8px 9px;
  border-radius: 13px; text-align: center; transition: .16s;
  background: var(--panel); border: 1px solid var(--line);
}
.new-card:hover { transform: translateY(-3px); border-color: var(--bc); }
.new-card img { width: 62px; height: 62px; border-radius: 50%; }
.new-card b { display: block; font-size: 12px; margin-top: 5px; }
.new-card small { display: block; font-size: 10px; color: var(--txt-dim); line-height: 1.25; }
.new-card.is-featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 8px 22px rgba(255,194,60,.16); }
.new-card.is-featured img { width: 74px; height: 74px; }
.new-card.is-featured { width: 124px; }
.new-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; font-weight: 800; letter-spacing: .6px; white-space: nowrap;
  padding: 2.5px 8px; border-radius: 999px; background: var(--gold); color: #1a1206;
}

/* =========================================================================
   MODE HISTOIRE
   ========================================================================= */
.story-wrap { padding: 18px 30px 40px; overflow-y: auto; }
.tile-story { background: linear-gradient(120deg, rgba(168,85,247,.16), var(--panel) 60%); }

.branch-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 900px; margin: 20px auto; }
.branch-card {
  cursor: pointer; text-align: left; padding: 22px; border-radius: 18px; color: var(--txt);
  background: linear-gradient(150deg, color-mix(in srgb, var(--bc) 18%, transparent), var(--panel) 62%);
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: .18s;
  /* Le portrait est en position absolue et débordant : la carte doit le
     rogner, et réserver de la hauteur pour qu'il ait de la place. */
  position: relative; overflow: hidden; min-height: 300px;
}
.branch-card:hover { transform: translateY(-4px); border-color: var(--bc); }

/* Portrait pleine page du Zitrone de la voie. Ancré en bas à droite, il sort
   volontairement du cadre en bas : on veut un buste imposant, pas une figurine
   entière perdue au milieu. Le texte reste lisible par-dessus grâce au voile. */
.br-art {
  /* Hauteur calée pour que la TÊTE reste entière : à 118% le haut de la
     chevelure passait sous le bord supérieur de la carte. Le léger débord bas
     est voulu, il est estompé par le masque. */
  position: absolute; right: -8%; bottom: -4%;
  height: 104%; width: auto; object-fit: contain; object-position: bottom;
  pointer-events: none; z-index: 0;
  filter: drop-shadow(-8px 6px 22px rgba(0,0,0,.55));
  transition: transform .28s ease, filter .28s ease;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 99%);
          mask-image: linear-gradient(180deg, #000 78%, transparent 99%);
}
.branch-card:hover .br-art {
  transform: translateY(-6px) scale(1.03);
  filter: drop-shadow(-8px 6px 30px color-mix(in srgb, var(--bc) 60%, transparent));
}
/* Voile derrière le texte : sans lui, le portrait passe sous les lignes claires
   et l'intro devient illisible sur les zones vives de l'armure. */
.br-body {
  position: relative; z-index: 1; max-width: 55%;
  text-shadow: 0 1px 8px rgba(0,0,0,.85);
}
/* Une carte étroite (une colonne) n'a plus la largeur pour deux zones : le
   portrait recule au second plan et le texte reprend toute la place. */
@media (max-width: 620px) {
  .branch-card { min-height: 260px; }
  .br-body { max-width: 68%; }
  .br-art { right: -14%; opacity: .8; }
}
.br-ico { font-size: 40px; display: block; }
.branch-card b { display: block; font-size: 20px; margin: 8px 0 6px; color: var(--bc); }
.branch-card p { font-size: 12.5px; color: var(--txt-dim); line-height: 1.55; min-height: 38px; }
.branch-card small { font-size: 11.5px; color: var(--txt-dim); }
.br-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); margin: 12px 0 6px; overflow: hidden; }
.br-bar i { display: block; height: 100%; background: var(--bc); border-radius: 99px; transition: width .4s ease; }

.chapter-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 900px; margin: 16px auto; }
.chapter-card {
  cursor: pointer; text-align: left; padding: 18px; border-radius: 16px; color: var(--txt);
  background: var(--panel); border: 1px solid var(--line); transition: .18s;
}
.chapter-card:hover:not(.locked) { transform: translateY(-3px); border-color: var(--bc); }
.chapter-card.locked { opacity: .5; cursor: not-allowed; }
.ch-n { font-size: 10.5px; letter-spacing: 2px; color: var(--bc); font-weight: 800; }
.chapter-card b { display: block; font-size: 17px; margin: 3px 0 6px; }
.chapter-card p { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; }
.ch-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--txt-dim); margin-top: 10px; }
.ch-lock { font-size: 11.5px; color: var(--danger); margin-top: 6px; }

.story-missions { display: flex; flex-direction: column; gap: 10px; max-width: 860px; margin: 0 auto; }
.story-mission {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: .16s;
}
.story-mission:not(.locked):hover { border-color: var(--bc); }
.story-mission.done { opacity: .82; }
.story-mission.locked { opacity: .45; }
.sm-n {
  flex: 0 0 38px; height: 38px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  background: color-mix(in srgb, var(--bc) 22%, transparent); color: var(--bc);
  border: 1px solid var(--bc);
}
.story-mission.done .sm-n { background: var(--ok); color: #08210f; border-color: var(--ok); }
.sm-body { flex: 1; min-width: 0; }
.sm-go { flex: 0 0 auto; }
.story-mission .mc-foes { margin: 7px 0; }
.story-mission .mc-desc { font-size: 12px; }

/* =========================================================================
   NIVEAUX ET EXPÉRIENCE
   ========================================================================= */
.lvl-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  background: rgba(0,0,0,.62); color: var(--txt); border: 1px solid var(--line);
}
.lvl-tag.maxed { color: #1a1206; background: var(--gold); border-color: var(--gold); }

.xp-bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; }
.xp-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .45s ease; }

.lvl-panel {
  margin: 10px 0 4px; padding: 13px; border-radius: 13px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.lvl-panel.lp-flash { animation: lpFlash .7s ease; }
@keyframes lpFlash { 0%,100% { border-color: var(--line); } 40% { border-color: var(--gold); background: rgba(255,194,60,.12); } }
.lp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.lp-head b { font-size: 14px; }
.lp-head span { font-size: 11px; color: var(--txt-dim); }
.lp-xp { display: block; margin-top: 5px; font-size: 11px; color: var(--txt-dim); }
.lp-items { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }
.lp-item {
  display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left;
  padding: 7px 10px; border-radius: 10px; color: var(--txt);
  background: var(--panel-solid); border: 1px solid var(--line); transition: .14s;
}
.lp-item:hover:not(:disabled) { border-color: var(--gold); transform: translateX(2px); }
.lp-item:disabled { opacity: .38; cursor: not-allowed; }
.lp-ico { font-size: 18px; }
.lp-txt { flex: 1; }
.lp-txt b { display: block; font-size: 12px; }
.lp-txt small { font-size: 10.5px; color: var(--txt-dim); }
.lp-have { font-size: 12px; font-weight: 700; color: var(--gold); }
.lp-empty { font-size: 11px; color: var(--txt-dim); line-height: 1.5; }

.result-xp { margin-top: 14px; width: min(430px, 88vw); margin-inline: auto; text-align: left; }
.xp-row {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin-bottom: 6px;
  border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.xp-row.up { border-color: var(--gold); }
.xp-row img { width: 38px; height: 38px; border-radius: 50%; }
.xp-body { flex: 1; min-width: 0; }
.xp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.xp-head b { font-size: 12.5px; }
.xp-lvl { font-size: 11.5px; color: var(--txt-dim); }
.xp-lvl i { color: var(--gold); font-style: normal; font-weight: 800; }
.xp-body small { font-size: 10.5px; color: var(--txt-dim); display: block; margin-top: 3px; }

/* ---------- Verrou des outils de développement ------------------------- */
.dock-dev { opacity: .55; }
.dock-dev:hover { opacity: 1; }
.dev-gate { display: flex; flex-direction: column; gap: 11px; align-items: flex-start; }
.dev-gate .danger-input { width: 100%; max-width: 100%; letter-spacing: 3px; }
.dev-gate .btn { width: 100%; }
.dev-error { color: var(--danger); font-size: 12px; }

/* Niveau affiché sur la vignette de combat (les deux camps) */
.unit-lvl {
  position: absolute; bottom: 2px; right: 2px; z-index: 3;
  font-size: 10px; font-weight: 800; line-height: 1;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(4, 6, 14, .78); color: var(--txt);
  border: 1px solid var(--line); pointer-events: none;
}
.unit-lvl.maxed { background: var(--gold); color: #1a1206; border-color: var(--gold); }
/* le portrait adverse est miroité : on remet le badge à l'endroit */
.side-foe .unit-art img { transform: scaleX(-1); }

/* Niveau des adversaires sur les vignettes de mission et les rounds de tournoi */
.mf b { font-size: 9.5px; font-weight: 800; letter-spacing: .2px; }
.tour-rounds .tr i {
  font-style: normal; margin-left: 6px; font-size: 10px; font-weight: 800;
  color: var(--gold); opacity: .9;
}

/* =========================================================================
   CONFORT DE JEU — vitesse, inventaire, aide, récapitulatif
   ========================================================================= */
.hud-btn {
  cursor: pointer; padding: 5px 11px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; background: var(--panel); border: 1px solid var(--line);
  color: var(--txt-dim); transition: .14s;
}
.hud-btn:hover:not(:disabled) { color: var(--txt); border-color: var(--gold); }
.hud-btn:disabled { opacity: .35; cursor: not-allowed; }

/* export / import de sauvegarde */
.save-io { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.save-box {
  width: 100%; min-height: 92px; resize: vertical; padding: 10px 12px;
  border-radius: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 11px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--txt-dim);
}
.save-box:focus { outline: none; border-color: var(--gold); color: var(--txt); }
.save-msg { font-size: 12px; margin-top: 8px; min-height: 16px; }
.save-msg.ok { color: var(--ok); }
.save-msg.ko { color: var(--danger); }

/* son */
.sound-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vol-slider { flex: 1; min-width: 140px; max-width: 260px; accent-color: var(--gold); }
.vol-slider:disabled { opacity: .4; }

/* inventaire global */
.inv-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-bottom: 7px;
  border-radius: 11px; background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.inv-row.empty { opacity: .45; }
.inv-ico { font-size: 22px; }
.inv-body { flex: 1; min-width: 0; }
.inv-body b { display: block; font-size: 13px; }
.inv-body small { font-size: 11px; color: var(--txt-dim); }
.inv-right { text-align: right; }
.inv-right b { color: var(--gold); font-size: 15px; }
.inv-right small { display: block; font-size: 10px; color: var(--txt-dim); }
.inv-heroes { display: flex; flex-wrap: wrap; gap: 7px; }
.pool-item.maxed { border-color: var(--gold); }

/* utilisation d'objets en lot */
.lp-line {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 10px;
  background: var(--panel-solid); border: 1px solid var(--line);
}
.lp-btns { display: flex; gap: 5px; }
.lp-use {
  cursor: pointer; padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--txt); transition: .14s;
}
.lp-use:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.lp-use:disabled { opacity: .3; cursor: not-allowed; }

/* aide */
.help-block { margin-bottom: 12px; }
.help-block p { font-size: 12.5px; color: var(--txt-dim); line-height: 1.65; margin-bottom: 6px; }
.help-block b { color: var(--txt); }

/* conseil d'affinité sur les missions */
.aff-hint { display: flex; align-items: center; gap: 8px; margin: 7px 0; flex-wrap: wrap; }
.aff-chip {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  color: var(--ac); border: 1px solid var(--ac); background: color-mix(in srgb, var(--ac) 12%, transparent);
}
.aff-hint small { font-size: 11px; color: var(--txt-dim); }

/* récapitulatif de dégâts */
.result-recap { margin-top: 14px; width: min(430px, 88vw); margin-inline: auto; text-align: left; }
.dmg-row {
  display: flex; align-items: center; gap: 11px; padding: 7px 10px; margin-bottom: 5px;
  border-radius: 11px; background: rgba(255,255,255,.035); border: 1px solid var(--line);
}
.dmg-row.mine { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.dmg-row img { width: 32px; height: 32px; border-radius: 50%; }
.dmg-body { flex: 1; min-width: 0; }
.dmg-head { display: flex; justify-content: space-between; align-items: baseline; }
.dmg-head b { font-size: 12px; }
.dmg-head span { font-size: 12px; font-weight: 800; color: var(--gold); }
.dmg-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 4px 0 3px; }
.dmg-bar i { display: block; height: 100%; border-radius: 99px; background: var(--txt-dim); }
.dmg-row.mine .dmg-bar i { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.dmg-body small { font-size: 10px; color: var(--txt-dim); }

/* Lexique : recherche + regroupement par famille */
.lex-search {
  width: 100%; padding: 9px 12px; margin: 4px 0 12px; border-radius: 10px;
  background: rgba(0,0,0,.3); border: 1px solid var(--line); color: var(--txt); font-size: 13px;
}
.lex-search:focus { outline: none; border-color: var(--gold); }
.lex-cat { margin-bottom: 16px; }
.lex-cat-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px;
  padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.lex-cat-head span { font-size: 16px; }
.lex-cat-head b { font-size: 13.5px; letter-spacing: .5px; }
.lex-cat-head small { font-size: 11px; color: var(--txt-dim); }

/* Journal des nouveautés */
.icon-btn { position: relative; }
.cl-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger); border: 1px solid var(--bg); }
.cl-entry { margin-bottom: 16px; padding-left: 12px; border-left: 2px solid var(--line); }
.cl-entry.latest { border-left-color: var(--gold); }
.cl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-head b { font-size: 15px; color: var(--gold); }
.cl-badge { font-size: 9px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px;
  border-radius: 999px; background: var(--gold); color: #1a1206; }
.cl-title { font-size: 13px; font-weight: 600; }
.cl-date { margin-left: auto; font-size: 11px; color: var(--txt-dim); }
.cl-notes { margin: 0; padding-left: 18px; }
.cl-notes li { font-size: 12px; color: var(--txt-dim); line-height: 1.6; margin-bottom: 3px; }

/* =========================================================================
   COMBAT — refonte HUD + QOL
   ========================================================================= */
.turn-pill { transition: background .2s, color .2s; }
.turn-pill.mine { box-shadow: 0 0 0 1px rgba(255,194,60,.3), 0 0 14px rgba(255,194,60,.18); }

/* résumé d'équipe dans le HUD */
.hud-teams { display: flex; gap: 8px; align-items: center; margin-left: 4px; }
.team-chip { display: flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.team-chip.foe  { border-color: rgba(255,77,90,.35); }
.team-chip.mine { border-color: rgba(47,217,138,.35); }
.tc-count { font-size: 11px; font-weight: 800; }
.team-chip.foe .tc-count  { color: var(--force); }
.team-chip.mine .tc-count { color: var(--ok); }
.tc-bar { width: 46px; height: 6px; border-radius: 99px; background: rgba(0,0,0,.4); overflow: hidden; }
.tc-bar i { display: block; height: 100%; border-radius: 99px; transition: width .4s ease; }
.team-chip.foe .tc-bar i  { background: linear-gradient(90deg,#ff4d5a,#ff8a9a); }
.team-chip.mine .tc-bar i { background: linear-gradient(90deg,#2fd98a,#62f0b0); }
@media (max-width: 720px) { .hud-teams { display: none; } }

/* cible en surbrillance : anneau pulsé */
.unit.is-target { box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(255,194,60,.4); }
.unit.is-target::after {
  content: "🎯"; position: absolute; top: -10px; right: -8px; font-size: 15px; z-index: 5;
  animation: tgtBob 1s ease-in-out infinite;
}
@keyframes tgtBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* carte injouable ce tour-ci */
.card.unplayable { opacity: .42; filter: grayscale(.55); }
.card.unplayable::before {
  content: "🚫"; position: absolute; top: 4px; right: 4px; font-size: 13px; z-index: 4;
}

/* boutons de la barre d'action */
.deck-buttons { display: flex; gap: 9px; align-items: center; justify-content: center; }
.deck-buttons .btn-primary { min-width: 150px; }
#btn-auto:not(:disabled)  { border-color: rgba(255,194,60,.45); color: var(--gold); }
#btn-clear:not(:disabled) { border-color: rgba(255,77,90,.4); color: var(--force); }

/* emplacement vide plus lisible */
.action-slot:not(.filled) { border-color: rgba(255,255,255,.2); }
.action-slot:not(.filled)::after {
  content: "action"; position: absolute; bottom: 6px; font-size: 8.5px; letter-spacing: 1px;
  color: var(--txt-dim); opacity: .6; text-transform: uppercase;
}

/* =========================================================================
   CARTES — code couleur par rôle (DPS / Debuff / Buff / Soin)
   ========================================================================= */
.card { border-top: 2px solid var(--role, transparent); }
.card.role-dps    { --role: #ff4d5a; }
.card.role-debuff { --role: #a855f7; }
.card.role-buff   { --role: #4a9eff; }
.card.role-heal   { --role: #2fd98a; }
.card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 0 1px var(--role); }
.card-role {
  position: absolute; top: 4px; left: 4px; z-index: 4;
  font-size: 10px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6));
  opacity: .95;
}
.card.merge-target { border-top-color: var(--ok); }

/* Auto-combat actif */
#btn-auto.active {
  background: rgba(255,194,60,.18); border-color: var(--gold); color: var(--gold);
  animation: autoPulse 1.1s ease-in-out infinite;
}
@keyframes autoPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,194,60,.3); } 50% { box-shadow: 0 0 0 4px rgba(255,194,60,0); } }

/* Sneak Peek */
.sneak-quote {
  margin: 12px 0 16px; padding: 12px 16px; border-left: 3px solid var(--gold);
  font-style: italic; font-size: 14px; color: var(--txt); line-height: 1.5;
  background: rgba(255,194,60,.06); border-radius: 0 10px 10px 0;
}
.sneak-list { margin: 6px 0 0; padding-left: 20px; }
.sneak-list li { font-size: 12.5px; color: var(--txt-dim); line-height: 1.7; }
.sneak-list b { color: var(--txt); }

/* Défis d'événement */
.mission-card.event-challenge { border-color: rgba(192,132,252,.4); background: linear-gradient(150deg, rgba(192,132,252,.08), var(--panel) 60%); }
.mission-card.event-challenge .mc-diff.d-hard { background: rgba(192,132,252,.2); color: #d8b4fe; border-color: rgba(192,132,252,.5); }

/* Cinématique vedette — refonte (vortex, halo, ring, hint) */
.summon-cine .sc-vortex {
  position: absolute; inset: -20%;
  background: conic-gradient(from 0deg at 50% 45%,
    transparent, color-mix(in srgb, var(--c) 40%, transparent), transparent 40%);
  animation: scSpin 6s linear infinite reverse; opacity: .45; filter: blur(14px);
}
.summon-cine .sc-halo {
  position: absolute; top: 45%; left: 50%; width: 340px; height: 340px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent) 0%, transparent 62%);
  animation: scHalo 2.2s ease-in-out infinite; pointer-events: none;
}
@keyframes scHalo { 0%,100% { transform: translate(-50%,-50%) scale(.9); opacity: .55; }
                    50% { transform: translate(-50%,-50%) scale(1.12); opacity: .85; } }
.summon-cine .sc-portrait-wrap {
  position: relative; border-radius: 50%; padding: 5px;
  background: conic-gradient(from 0deg, var(--c), #fff, var(--c));
  animation: scSpin 3.5s linear infinite, scName .8s cubic-bezier(.15,1.4,.4,1) both;
  box-shadow: 0 0 50px color-mix(in srgb, var(--c) 70%, transparent);
}
.summon-cine .sc-portrait-wrap .sc-portrait { display: block; background: #05070f; }
.summon-cine .sc-form { font-style: italic; color: var(--c); font-weight: 700; }
.summon-cine .sc-skip {
  position: absolute; bottom: 26px; font-size: 12px; color: var(--txt-dim);
  letter-spacing: 1px; animation: scBlink 1.4s ease-in-out infinite;
}
@keyframes scBlink { 0%,100% { opacity: .35; } 50% { opacity: .85; } }

/* invocations rapides : pas de délai d'apparition */
.pull-card.fast { animation-duration: .12s !important; animation-delay: 0ms !important; }

/* bascules d'options */
.opt-toggles { display: flex; gap: 9px; flex-wrap: wrap; }

/* =========================================================================
   MESSAGE ÉPHÉMÈRE (toast)
   Pour un refus d'action : la règle « un seul exemplaire d'un personnage »
   doit s'expliquer sans ouvrir de modale, puisque le joueur n'a rien à
   décider. Au-dessus du calque d'effets, sous les modales.
   ========================================================================= */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 14px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: 12px;
  background: rgba(10, 13, 24, .96); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  color: var(--txt); font-size: 12.5px; line-height: 1.5; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; z-index: 90;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.in  { opacity: 1; transform: translate(-50%, 0); }
.toast.out { opacity: 0; transform: translate(-50%, 10px); }

/* =========================================================================
   ROMAN VISUEL (js/vn.js)
   Décors PROCÉDURAUX : dégradés et lueurs en CSS, aucune image à charger.
   Même contrainte que le reste du projet — le jeu s'ouvre par double-clic.
   ========================================================================= */
.vn {
  position: fixed; inset: 0; z-index: 120;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; overflow: hidden;
  opacity: 0; transition: opacity .3s ease;
}
.vn.in  { opacity: 1; }
.vn.out { opacity: 0; }

/* --- décors ------------------------------------------------------------ */
.vn-bg { position: absolute; inset: 0; background: #05070f; }
.vn-bg::before, .vn-bg::after { content: ''; position: absolute; inset: 0; }

/* laboratoire : froid, stérile, verticales de cuves */
.vn[data-bg="lab"] .vn-bg {
  background:
    linear-gradient(180deg, #071620 0%, #04101a 45%, #020509 100%);
}
.vn[data-bg="lab"] .vn-bg::before {
  background:
    repeating-linear-gradient(90deg, rgba(103,232,249,.07) 0 2px, transparent 2px 84px),
    radial-gradient(60% 45% at 50% 22%, rgba(103,232,249,.16), transparent 70%);
}
.vn[data-bg="lab"] .vn-bg::after {
  background: radial-gradient(28% 40% at 78% 62%, rgba(47,217,138,.10), transparent 70%);
  animation: vnPulse 6s ease-in-out infinite;
}

/* salle du trône : pourpre impérial, lueur basse */
.vn[data-bg="throne"] .vn-bg {
  background: linear-gradient(180deg, #17061c 0%, #0d0413 50%, #04010a 100%);
}
.vn[data-bg="throne"] .vn-bg::before {
  background:
    radial-gradient(50% 38% at 50% 14%, rgba(168,85,247,.22), transparent 72%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 140px);
}

/* vide spatial : noir profond, poussière d'étoiles */
.vn[data-bg="void"] .vn-bg { background: radial-gradient(120% 90% at 50% 40%, #0a0f22 0%, #01020a 75%); }
.vn[data-bg="void"] .vn-bg::before {
  background:
    radial-gradient(1.5px 1.5px at 18% 24%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 16%, #cfe6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 48%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 82%, #dbeafe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 61% 74%, #fff 50%, transparent 51%);
  animation: vnPulse 5s ease-in-out infinite;
}

/* planète purgée : braise et cendre */
.vn[data-bg="ruins"] .vn-bg { background: linear-gradient(180deg, #1a0704 0%, #2a0a06 40%, #060202 100%); }
.vn[data-bg="ruins"] .vn-bg::before {
  background: radial-gradient(70% 45% at 50% 96%, rgba(251,146,60,.30), transparent 72%);
}

/* Terre : ciel ouvert, le seul décor clair du jeu */
.vn[data-bg="earth"] .vn-bg { background: linear-gradient(180deg, #123a5c 0%, #1e5f7a 45%, #0a1a24 100%); }
.vn[data-bg="earth"] .vn-bg::before {
  background: radial-gradient(50% 40% at 50% 20%, rgba(255,231,150,.22), transparent 70%);
}

@keyframes vnPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

.vn-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(75% 60% at 50% 45%, transparent 40%, rgba(0,0,0,.62) 100%);
}

/* --- portraits ---------------------------------------------------------- */
.vn-stage {
  position: absolute; inset: 0 0 24%; display: flex; align-items: flex-end;
  justify-content: space-between; padding: 0 clamp(8px, 5vw, 90px);
  pointer-events: none;
}
.vn-portrait { width: clamp(140px, 26vw, 300px); position: relative; }
.vn-portrait[data-side="right"] { order: 2; }
.vn-portrait img, .vn-silhouette {
  display: block; width: 100%; aspect-ratio: 1; border-radius: 50%;
  /* Hors tour de parole : reculé, assombri, désaturé. Le regard va tout seul
     sur celui qui parle, sans qu'on ait à l'écrire. */
  filter: brightness(.42) saturate(.5);
  transform: scale(.9) translateY(10px);
  transition: filter .28s ease, transform .28s ease, box-shadow .28s ease;
}
.vn-silhouette { background: radial-gradient(circle at 50% 38%, var(--c), #0a0d18 72%); opacity: .8; }
.vn-portrait.talking img, .vn-portrait.talking .vn-silhouette {
  filter: none; transform: scale(1) translateY(0);
  box-shadow: 0 0 46px color-mix(in srgb, var(--c) 55%, transparent);
}
.vn-portrait.enter img, .vn-portrait.enter .vn-silhouette { animation: vnIn .34s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes vnIn { from { opacity: 0; transform: scale(.82) translateY(26px); } }

/* --- boîte de dialogue -------------------------------------------------- */
.vn-box {
  position: relative; z-index: 2; margin: 0 auto 30px;
  width: min(880px, calc(100% - 28px));
  padding: 16px 20px 20px;
  background: rgba(6, 9, 18, .93);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.6);
}
.vn-name { font-size: 13.5px; margin-bottom: 7px; }
.vn-name b { font-size: 14.5px; }
.vn-name span { color: var(--txt-dim); font-style: italic; font-size: 12px; }
.vn-text {
  font-size: 14.5px; line-height: 1.72; color: var(--txt);
  /* Trois lignes réservées : sans ça la boîte grandit à chaque caractère tapé
     et tout le décor tremble pendant la frappe. */
  min-height: 4.6em;
}
.vn-box.narrating .vn-text { font-style: italic; color: var(--txt-dim); text-align: center; }
.vn-next {
  position: absolute; right: 16px; bottom: 10px; font-size: 12px;
  color: var(--gold); opacity: 0; transition: opacity .2s;
}
.vn-next.ready { opacity: 1; animation: vnBlink 1.2s ease-in-out infinite; }
@keyframes vnBlink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* --- commandes ---------------------------------------------------------- */
.vn-skip {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  padding: 7px 13px; border-radius: 9px; cursor: pointer;
  background: rgba(6,9,18,.8); border: 1px solid var(--line);
  color: var(--txt-dim); font-size: 12px; font-family: inherit;
}
.vn-skip:hover { color: var(--txt); border-color: rgba(255,255,255,.3); }
.vn-count {
  position: absolute; top: 20px; left: 18px; z-index: 3;
  font-size: 11px; color: var(--txt-dim); letter-spacing: 1px;
}

/* Sur mobile les portraits mangent la boîte : on les réduit et on les remonte. */
@media (max-width: 620px) {
  .vn-stage { inset: 0 0 40%; }
  .vn-portrait { width: 33vw; }
  .vn-text { font-size: 13.5px; min-height: 5.4em; }
}

/* bouton « Revoir » d'une scène déjà lue, dans la liste des missions */
.sm-replay { margin-top: 9px; font-size: 11.5px; padding: 5px 11px; }

/* --- bibliothèque des scènes ------------------------------------------- */
.story-lib { display: block; margin: 4px auto 24px; }
.lib-group { margin-bottom: 14px; }
.lib-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; margin-bottom: 7px; border-radius: 11px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.lib-row b { font-size: 13px; }
.lib-row small { color: var(--txt-dim); font-size: 11px; margin-right: auto; }
.lib-row .btn { flex: 0 0 auto; font-size: 11.5px; padding: 5px 11px; }
.lib-row.locked { opacity: .5; }
.lib-row.locked b { color: var(--txt-dim); font-weight: 600; }

/* bandeau de contrainte de camp, écran de préparation du Mode Histoire */
.camp-note {
  margin: 6px 0 12px; padding: 9px 13px; border-radius: 10px;
  font-size: 12px; line-height: 1.55; color: var(--txt-dim);
  background: color-mix(in srgb, var(--bc) 12%, transparent);
  border: 1px solid var(--line); border-left: 3px solid var(--bc);
}
.camp-note b { color: var(--txt); }
