/* Interface mobile GROLM (08) : cadre commun. Écran de référence 390 × 844, cibles ≥ 44 px. */

/* Polices (08 §5) : Silkscreen pour les chiffres seulement, Pixelify Sans pour les lettres. */
@font-face { font-family: "Silkscreen"; src: url(fonts/silkscreen-latin-400-normal.woff2) format("woff2"); font-display: swap;
  font-weight: 400; unicode-range: U+0030-0039; }
@font-face { font-family: "Silkscreen"; src: url(fonts/silkscreen-latin-700-normal.woff2) format("woff2"); font-display: swap;
  font-weight: 700; unicode-range: U+0030-0039; }
@font-face { font-family: "Pixelify Sans"; src: url(fonts/pixelify-sans-latin-400-normal.woff2) format("woff2"); font-display: swap; font-weight: 400; }
@font-face { font-family: "Pixelify Sans"; src: url(fonts/pixelify-sans-latin-500-normal.woff2) format("woff2"); font-display: swap; font-weight: 500; }
@font-face { font-family: "Pixelify Sans"; src: url(fonts/pixelify-sans-latin-600-normal.woff2) format("woff2"); font-display: swap; font-weight: 600; }
@font-face { font-family: "Pixelify Sans"; src: url(fonts/pixelify-sans-latin-700-normal.woff2) format("woff2"); font-display: swap; font-weight: 700; }

:root {
  --page: #2b2522; --deep: #1c1917; --panel: #3a322e; --edge: #110e0c; --inner: #5b4b43; --hollow: #211c19;
  --text: #f6ecdd; --soft: #c9b8a4; --accent: #b3343c; --accent-lt: #d9575f; --accent-dk: #7a1f25;
  --gold: #f2c14e; --ok: #8fd47a; --bad: #ff8a80; --warn: #e07a1f;
  --hud-h: 108px; --menu-h: 62px;
  --font: "Silkscreen", "Pixelify Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--deep); }
body { margin: 0 auto; max-width: 480px; min-height: 100vh; background: var(--page); color: var(--text);
  font: 15px/1.35 var(--font); -webkit-text-size-adjust: 100%;
  font-variant-ligatures: none;  /* la ligature « fi » de Pixelify s'affiche comme un « A » (« Ko-A », « Aohe ») ; maquettes Gem, Soutien */
  padding: calc(var(--hud-h) + 8px) 12px calc(var(--menu-h) + 16px); }
a { color: var(--gold); }
img, .px { image-rendering: crisp-edges; image-rendering: pixelated; }

/* Cadres (08 §5) : bord 3 px sombre et liseré intérieur 2 px, coins 4 px. */
.pn { background: var(--panel); border: 3px solid var(--edge); box-shadow: inset 0 0 0 2px var(--inner); border-radius: 4px; padding: 10px 12px; }
.pd { background: var(--hollow); border: 2px solid var(--edge); box-shadow: inset 0 0 0 1px #4a3d36; border-radius: 3px; padding: 6px 8px; }
.lbl { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); font-weight: 600; }
.soft { color: var(--soft); font-size: 13px; }
.btn { font: 600 14px var(--font); color: var(--text); background: var(--panel); border: 3px solid var(--edge);
  box-shadow: inset 0 0 0 2px #574740, inset 0 -4px 0 #241e1b; border-radius: 4px; min-height: 44px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.btn.main { background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-lt), inset 0 -4px 0 var(--accent-dk); }
.btn:disabled { opacity: .45; cursor: default; }
/* Confirmation en deux touchers (08 §4.11). */
.btn.armed { background: var(--warn); color: #1c1917; box-shadow: none; animation: beat 1s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.03); } }
.alert { background: #4a1c1f; color: var(--text); border: 2px solid var(--edge); border-radius: 3px; padding: 8px 10px; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* --- En-tête de ressources (08 §4.1) --- */
.hud { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: #171311; border-bottom: 3px solid #0b0908; }
.hud-in { max-width: 480px; margin: 0 auto; height: var(--hud-h); padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; box-sizing: border-box; }
.hud-top { display: flex; align-items: center; gap: 8px; height: 44px; flex: none; }
.crest { width: 40px; height: 42px; flex: none; background: var(--accent); border: 3px solid #0b0908; border-radius: 4px 4px 12px 12px;
  box-shadow: inset 0 0 0 2px var(--accent-lt), inset 0 -5px 0 var(--accent-dk); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; }
.hud-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hud-title b { display: block; font-size: 15px; }
.hud-title span { font-size: 11px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-prest { height: 44px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 7px; background: #0b0908; border: 2px solid #5a4620;
  border-radius: 3px; box-sizing: border-box; color: var(--gold); text-decoration: none; border-style: dashed; border-color: #8a6a2a; }
.hud-prest img { width: 16px; height: 16px; }
.hud-prest b { font-family: "Silkscreen", monospace; font-size: 13px; }
.xp { position: relative; height: 44px; flex: none; width: 130px;  /* porteur, 2026-12-01 : +50 à 100 % de place */
  box-sizing: border-box; background: #0b0908; border: 2px solid #3d332e; border-radius: 3px; display: flex;
  flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; padding: 0 8px 4px; overflow: hidden; }  /* NIV à gauche, XP cumulée à droite (porteur) */
.xp .niv { font-size: 13px; font-weight: 700; color: var(--ok); }
.xp .tot { font-family: "Silkscreen", monospace; font-size: 16px; }
.xp .line { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #2a221f; }
.xp .line > span { display: block; height: 100%; background: var(--ok); }
.hud-bot { display: flex; gap: 4px; height: 44px; flex: none; }
.hud-row { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hud-row.slide { animation: hud-slide .22s ease-out 1; }
@keyframes hud-slide { from { transform: translateX(14px); opacity: .3; } to { transform: none; opacity: 1; } }
.hc { position: relative; height: 44px; box-sizing: border-box; background: #0b0908; border: 2px solid #3d332e; border-radius: 3px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 2px; color: var(--text); text-decoration: none; min-width: 0; overflow: hidden;
  -webkit-user-drag: none; }
.hc.row { flex-direction: row; gap: 3px; }
.hc img, .hc svg { width: 16px; height: 16px; flex: none; -webkit-user-drag: none; }
.hc .k { font-size: 9px; color: var(--soft); overflow: hidden; }
.hc-t { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.hc-v { font-family: "Silkscreen", monospace; font-size: 13px; line-height: 13px; white-space: nowrap; }
.hc-s { font-size: 9.5px; line-height: 9px; color: var(--soft); white-space: nowrap; }
.hc-g { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #2a221f; }
.hc-g i { display: block; height: 100%; background: var(--ok); }
.hc.light .hc-g i { background: #ffe08a; }
/* Case cliquable (mène à un écran) : contour pointillé ; case seulement informative : contour plein (porteur). */
a.hc { border-style: dashed; border-color: #7a6656; }
/* Case en alerte : seul le chiffre passe en rouge, sans contour ni flash (porteur, 2026-12-01). */
.hc.al:not(.row) .hc-v { color: #ff8a80; }
.hc-mana { display: flex; flex-wrap: wrap; width: 100%; row-gap: 3px; justify-content: center; }
.hc-mana > span { display: flex; align-items: center; justify-content: center; gap: 3px; font-family: "Silkscreen", monospace; font-size: 13px; line-height: 13px; }
.hc-mana i { width: 12px; height: 12px; flex: none; border: 1px solid #0b0908; box-sizing: border-box; }
.hc-mana img { width: 16px; height: 16px; }
.hc-mana.two > span { font-size: 11px; } .hc-mana.two i { width: 9px; height: 9px; }
/* Bascule : comme les boutons du menu du bas, fond gris sans contour, pour ne pas ressembler à une case de ressource (porteur). */
.hud-next { position: relative; width: 44px; height: 44px; flex: none; background: var(--panel); border: 0; border-radius: 4px; box-sizing: border-box;
  cursor: pointer; padding: 0; display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 6px; align-content: center; justify-content: center; }
.hud-next i { width: 8px; height: 8px; background: var(--hollow); }
.hud-next i.on { background: var(--gold); box-shadow: 0 0 0 1px #ffe08a; } .hud-next i.al { background: #d9575f; }
.hud-next .pip { position: absolute; top: -5px; right: -5px; width: 12px; height: 12px; border-radius: 50%; background: #d9575f; border: 2px solid #171311; }
@media (prefers-reduced-motion: reduce) { .hud-row.slide { animation: none; } }

/* --- Menu du jeu, en bas (08 §4.2) : 5 entrées, Combat au centre et plus haut --- */
.menu { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #171311; border-top: 3px solid #0b0908; }
.menu-in { max-width: 480px; margin: 0 auto; height: var(--menu-h); display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 6px; padding: 6px 8px; align-items: end; }
.menu a { position: relative; height: 48px; display: flex; align-items: center; justify-content: center; border: 3px solid #0b0908;
  border-radius: 4px; background: var(--panel); color: var(--text); text-decoration: none; font-size: 12px; font-weight: 600; }
.menu a img { width: 24px; height: 24px; }
.menu a.combat { height: 60px; margin-top: -14px; }
.menu a.on { background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-lt); }
.menu .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #1c1917;
  border: 2px solid #0b0908; border-radius: 3px; font-size: 12px; font-weight: 700; padding: 0 5px; white-space: nowrap; }

/* --- En-tête d'écran avec INFO (08 §4.9) --- */
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; min-height: 44px; }
.screen-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.info-switch { display: flex; align-items: center; gap: 8px; min-height: 44px; background: none; border: 0; color: var(--gold);
  font: 700 13px var(--font); cursor: pointer; padding: 0; }
.info-switch .track { width: 44px; height: 24px; border-radius: 12px; background: #4a3d36; border: 2px solid #0b0908; position: relative; }
.info-switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 8px; background: #f6ecdd; transition: left .15s; }
.info-switch[aria-checked="true"] .track { background: #4f8f3c; }
.info-switch[aria-checked="true"] .track::after { left: 22px; }
body.no-info .info { display: none !important; }

/* --- Dé nommé (08 §4.10) : ligne du haut (face 1 en petit + nom), dessous la grande face et 2 × 2 --- */
.named { display: inline-grid; grid-template-columns: auto auto auto; gap: 4px; align-items: start; }
.named .top { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.named .top .name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.named .col { display: grid; gap: 4px; }

.soon { border: 2px dashed #4a3d36; border-radius: 4px; padding: 14px; color: var(--soft); text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* --- Domaine (08 §3.1) : carte des lieux --- */
.map { position: relative; height: 300px; border: 3px solid #0b0908; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--inner); overflow: hidden;
  background-color: #4a4440; background-image: linear-gradient(45deg, #514a45 25%, transparent 25%, transparent 75%, #514a45 75%),
  linear-gradient(45deg, #514a45 25%, transparent 25%, transparent 75%, #514a45 75%); background-size: 32px 32px; background-position: 0 0, 16px 16px; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.place { position: absolute; width: 44%; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 6px; background: #171311; border: 3px solid; box-shadow: inset 0 0 0 2px #0b0908; border-radius: 4px; color: var(--text); text-decoration: none; text-align: center; }
.place b { font-size: 15px; } .place img { width: 64px; height: 48px; }
.place .tag { font-size: 12px; background: var(--hollow); border: 2px solid #0b0908; padding: 2px 6px; border-radius: 3px; color: var(--gold); }
.card { display: block; color: var(--text); text-decoration: none; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* --- Dés (08 §3.9) : onglets, colonne de production, fiches --- */
.red { color: var(--bad); } .up { color: var(--ok); font-size: 11px; } .down { color: var(--bad); font-size: 11px; } .off { opacity: .55; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.tabs a { position: relative; min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 4px;
  background: var(--panel); border: 3px solid var(--edge); border-radius: 4px; color: var(--text); text-decoration: none; font-size: 12px; font-weight: 600; line-height: 1.1; }
/* Onglets en dossier (style de la Collection, porteur 2026-12-01) : le même partout (Dés, Cartes, Tournois, Embellir). */
.tabs a { border-bottom-width: 0; border-radius: 6px 6px 0 0; background: #2a2320; }
.tabs a.on { background: var(--panel); box-shadow: inset 0 2px 0 var(--gold); color: var(--gold); }
.tabs .dot { position: absolute; top: -5px; right: -5px; width: 12px; height: 12px; background: var(--gold); border: 2px solid #0b0908; border-radius: 3px; }
.des-body { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 6px; align-items: start; margin-right: -8px; }
.rail { position: sticky; top: calc(var(--hud-h) + 8px); max-height: calc(100vh - var(--hud-h) - var(--menu-h) - 24px); overflow-y: auto;
  background: #171311; border: 2px solid #0b0908; border-radius: 4px; padding: 0 3px 4px; display: flex; flex-direction: column; gap: 4px; }
.rail .rh { position: sticky; top: 0; background: #171311; text-align: center; font-size: 12px; color: var(--soft); padding: 4px 0; z-index: 1; }
.rc { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: var(--hollow);
  border: 2px solid #0b0908; border-radius: 3px; font-size: 11px; }
.rc .gd-face { --k: 1; } .rc.empty { border: 2px dashed #4a3d36; background: none; }
.boxes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 6px; }
.boxes .box { height: 14px; border: 2px dashed #4a3d36; border-radius: 2px; }
.boxes .box.on { border-style: solid; background: #4f8f3c; } .boxes .box.bad { border-style: solid; background: var(--accent); }
.die-card { cursor: pointer; } .die-card.open { border-color: var(--gold); }
.die-row { display: flex; gap: 8px; align-items: flex-start; }
.die-info { display: flex; flex-direction: column; gap: 4px; font-size: 12px; min-width: 0; }
.ess { display: inline-block; align-self: flex-start; font-size: 11px; padding: 1px 6px; border: 2px solid #0b0908; border-radius: 3px; background: #6b4a2a; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--hollow); border: 2px solid #0b0908; border-radius: 3px; padding: 2px 6px; }
.chip.off { opacity: .55; } .chip img { width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { font-size: 11px; padding: 1px 6px; border: 2px solid #0b0908; border-radius: 3px; background: var(--hollow); }
.tag.gold { color: var(--gold); } .tag.blue { color: #8cc8ef; } .tag.green { color: var(--ok); }
.edge-gold { border-left: 6px solid var(--gold); } .edge-blue { border-left: 6px solid #4aa8dc; } .edge-green { border-left: 6px solid #4f9a3c; }
.sheet { margin-top: 10px; border-top: 2px solid #0b0908; padding-top: 10px; cursor: default; display: flex; flex-direction: column; gap: 6px; }
.btn.mini { min-height: 44px; min-width: 44px; padding: 0 8px; font-size: 13px; }
.btn.short { color: var(--bad); } .btn.buy { min-width: 64px; }
.trial { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.trial .cell { aspect-ratio: 1; border: 2px dashed #4a3d36; border-radius: 3px; display: flex; align-items: center; justify-content: center; }
.trial .cell.spin .gd-face, .emb-die.spin .gd-face { animation: spin .25s linear infinite; }
.trial .cell.land .gd-face, .emb-die.land .gd-face { animation: land .3s ease-out; }  /* essai des Dés et lancer d'Embellir */
@keyframes spin { to { transform: rotate(360deg); } } @keyframes land { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
.dist { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 4px; }
.dist .bar { flex: 1; height: 8px; background: #110e0c; border: 2px solid #0b0908; max-width: 70px; } .dist .bar span { display: block; height: 100%; background: var(--gold); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; margin-top: 6px; }
.conseq { color: var(--warn); margin-top: 4px; }
.shake { display: inline-block; animation: shake .9s; }
@keyframes shake { 0%,100% { transform: none; filter: none; } 15%,45% { transform: translateX(-3px); } 30%,60% { transform: translateX(3px); } 50% { filter: brightness(2); } }
.seg { display: inline-flex; gap: 4px; align-items: center; }
.cyc { display: grid; grid-template-columns: 82px 44px 1fr 44px; gap: 4px; align-items: center; margin-top: 6px; } .cyc b { text-align: center; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; padding: 6px 2px; background: var(--hollow); color: var(--text);
  border: 3px solid #0b0908; border-radius: 4px; font: 600 13px var(--font); cursor: pointer; }
.tile.t-target { border-color: var(--gold); } .tile.t-prot { border-color: #4aa8dc; }
.fx { width: 100%; font-size: 12px; border-collapse: collapse; margin: 6px 0; } .fx td { padding: 2px 4px; }
.gem { display: flex; align-items: center; gap: 8px; } .gem .diamond { flex: none; width: 18px; height: 18px; background: #4aa8dc; transform: rotate(45deg); border: 2px solid #0b0908; }
.big { font-size: 28px; font-weight: 700; }
.skill { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 2px solid #2a221f; font-size: 13px; }
.btn.buy { white-space: nowrap; }
/* Changement d'essence (D-450) : l'étiquette sursaute. */
.ess.bump { animation: bump .45s .45s; }
@keyframes bump { 50% { transform: translateY(-4px) scale(1.15); } }

/* --- Combat (08 §3.4) et Tournois (§3.5) --- */
.gold { color: var(--gold); }
.mode { font-size: 11px; font-weight: 700; padding: 1px 6px; border: 2px solid #0b0908; border-radius: 3px; white-space: nowrap; }
.mode.auto { background: #1f4a66; color: #cfe8f7; } .mode.mine { background: #6b5214; color: var(--gold); }
.place.off, .pn.off { opacity: .55; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-decoration: none; font-weight: 600; }
.tabs .count { position: absolute; top: -8px; right: -4px; background: var(--gold); color: #1c1917; border: 2px solid #0b0908; border-radius: 3px; font-size: 11px; padding: 0 4px; }
.kind { font-size: 11px; font-weight: 700; padding: 1px 6px; border: 2px solid #0b0908; border-radius: 3px; white-space: nowrap; }
.k-BASIQUE { background: #4a3d36; } .k-CONTREE { background: #1f4a66; } .k-REGIONAL { background: #6b5214; color: var(--gold); }
.gauge { height: 10px; background: #110e0c; border: 2px solid #0b0908; margin: 8px 0; } .gauge span { display: block; height: 100%; background: var(--gold); }
.chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; font-size: 12px; }
.opp { background: var(--hollow); border: 2px solid #0b0908; border-radius: 3px; padding: 2px 6px; } .opp.boss { color: var(--gold); border-color: #8a6a1e; }
.up-row { display: grid; grid-template-columns: 46px auto 1fr auto; gap: 6px; align-items: center; min-height: 32px; font-size: 13px; border-bottom: 2px solid #2a221f; }
.up-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .up-row.strong .nm { font-weight: 700; }
.bars { display: flex; gap: 3px; margin: 6px 0; } .bars span { flex: 1; height: 10px; border: 2px solid #0b0908; background: #2a221f; }
.bars span.w { background: #4f9a3c; } .bars span.l { background: var(--accent); }
.res-card { width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.res-line { width: 100%; display: flex; gap: 8px; align-items: center; min-height: 44px; background: none; border: 0; border-bottom: 2px solid #2a221f;
  color: var(--text); font: inherit; font-size: 13px; cursor: pointer; padding: 0; text-align: left; }
.acc { width: 100%; display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 44px; background: none; border: 0; color: var(--text); font: 600 14px var(--font); cursor: pointer; padding: 0; }
.round { border-top: 2px solid #2a221f; padding: 6px 0; font-size: 13px; }
.set { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 2px solid #2a221f; font-size: 13px; }
.set .v { min-width: 52px; text-align: center; }
.blue-frame { border-color: #1f4a66; box-shadow: inset 0 0 0 2px #4aa8dc; }
.pd.pin { border: 2px solid var(--accent); } .pd.auto { border: 2px dashed #4aa8dc; }
.tag.pinned { background: var(--accent); }
.spell { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 2px solid #2a221f; font-size: 13px; } .spell > span { flex: 1; }
.fav-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 2px solid #2a221f; font-size: 13px; }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.res img { margin-right: 6px; vertical-align: -2px; }

/* Images d'emplacements dans le texte (icônes 16 px, portraits 24 px × 2). */
.ic { display: inline-flex; align-items: center; gap: 6px; }
.opp { display: inline-flex; align-items: center; gap: 4px; } .opp img { flex: none; }
.gem img { flex: none; }

/* Établi : les 6 faces sur une ligne étroite (maquette Etabli), faces à × 1 (45 px), rôle en liseré et étiquette. */
.tiles { grid-template-columns: repeat(6, 45px); gap: 2px; justify-content: space-between; }
.tile { background: none; border: 0; padding: 0; gap: 2px; min-height: 44px; }
.tile .fn { font-size: 10px; color: var(--soft); }
.tile .gd-face { border-radius: 5px; }
.tile.t-target .gd-face { box-shadow: 0 0 0 3px var(--gold); } .tile.t-prot .gd-face { box-shadow: 0 0 0 3px #4aa8dc; }
.tile .dv { min-height: 13px; }
.tile .role { font-size: 8px; padding: 0 2px; border-radius: 2px; background: var(--hollow); color: var(--soft); }
.tile.t-target .role { background: var(--gold); color: #2b1d05; } .tile.t-prot .role { background: #4aa8dc; color: #08202e; }

/* --- Cartes (08 §3.8, §4.8) : carte 28 × 40 à facteur entier, liseré de rareté C gris, U vert, R bleu, L or --- */
.tcg { position: relative; flex: none; display: inline-block; background: #e9dcc3; border: 3px solid #8a8a8a; border-radius: 4px; overflow: hidden; color: #2b1d05; }
.tcg.r-U { border-color: #4f9a3c; } .tcg.r-R { border-color: #4aa8dc; } .tcg.r-L { border-color: var(--gold); }
.tcg .spr { position: absolute; inset: -3px; } .tcg .spr img { display: block; }
.tcg .tk { position: absolute; top: 3px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 700; }
.tcg .ti { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); }
.tcg .gem { position: absolute; bottom: 2px; left: 3px; font-size: 9px; font-weight: 700; }
.bst { display: flex; gap: 12px; align-items: center; } .pile { flex: none; min-width: 64px; text-align: center; }
.eds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ed { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; padding: 4px 2px; background: var(--hollow);
  border: 2px solid #0b0908; border-radius: 3px; color: var(--text); font: 600 10px var(--font); cursor: pointer; }
.ed:disabled { opacity: .4; cursor: default; } .ed b { font-size: 11px; color: var(--gold); }
.opened, .plan { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 2px solid #2a221f; font-size: 13px; }
.btn.gold-btn { background: var(--gold); color: #1c1917; box-shadow: inset 0 -4px 0 #8a6a1e; }
.shaker { animation: shake .5s; }
.tabs a.locked { opacity: .5; }

/* --- Collection (08 §3.10) : sprites 32 × 32 à × 2, losange de rareté C beige, U vert, R bleu, L orange --- */
.art { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.art.open { border-color: var(--gold); }
.art-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; font-size: 13px; }
/* Artefact pas encore obtenu : texte grisé, comme sa silhouette (porteur, 2026-12-01). */
.art.unowned .art-txt, .art.unowned .art-txt .soft { color: #6f645c; } .art.unowned .lz { opacity: .45; }
.spr64 { flex: none; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.spr64.ghost { opacity: .3; filter: grayscale(1); }
.spr64 .ph { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; transform: rotate(45deg); border: 3px solid #0b0908; font-weight: 700; }
.spr64 .ph { color: transparent; }
.lz { display: inline-block; width: 10px; height: 10px; transform: rotate(45deg); border: 2px solid #0b0908; margin-right: 6px; vertical-align: 0; }
.r-C.lz, .spr64 .ph.r-C { background: #d9c8a4; } .r-U.lz, .spr64 .ph.r-U { background: #4f9a3c; }
.r-R.lz, .spr64 .ph.r-R { background: #4aa8dc; } .r-L.lz, .spr64 .ph.r-L { background: #e07a1f; }
.pips { display: inline-flex; gap: 3px; margin-right: 6px; } .pips span { width: 10px; height: 10px; border: 2px solid #0b0908; background: #2a221f; border-radius: 2px; }
.pips span.on { background: var(--gold); }
.tier-head { margin: 6px 2px -4px; }
.ring-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ring-cell { min-height: 44px; display: flex; align-items: center; justify-content: center; border: 2px solid #0b0908; border-radius: 4px; background: var(--hollow); font-size: 11px; text-align: center; padding: 2px; }
.ring-cell.free { border: 2px dashed #4a3d36; background: none; }
.ring-cell.r-U { box-shadow: inset 0 0 0 2px #4f9a3c; } .ring-cell.r-R { box-shadow: inset 0 0 0 2px #4aa8dc; } .ring-cell.r-L { box-shadow: inset 0 0 0 2px #e07a1f; }
.axis { padding: 6px 0; border-bottom: 2px solid #2a221f; font-size: 13px; }

/* --- Saison (08 §3.11) : parcours sans menu du bas, barre de 7 étapes, solde permanent --- */
body.journey .menu { display: none; }
body.journey { padding-bottom: 90px; }
.journey-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #171311; border-top: 3px solid #0b0908; }
.journey-nav > div { max-width: 480px; margin: 0 auto; display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.steps7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.steps7 span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0; background: var(--hollow); border: 2px solid #0b0908;
  border-bottom-width: 4px; border-radius: 3px; font-size: 13px; font-weight: 700; color: var(--soft); opacity: .6; }
.steps7 small { font-size: 8px; font-weight: 600; overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.steps7 .done { border-bottom-color: #4f9a3c; color: var(--text); opacity: 1; } .steps7 .now { border-bottom-color: var(--gold); color: var(--gold); opacity: 1; }
.balance { position: sticky; top: calc(var(--hud-h) + 4px); z-index: 5; margin-top: 8px; font-size: 13px; }
.axis.bought { box-shadow: inset 3px 0 0 var(--gold); padding-left: 8px; }
.offer { display: flex; gap: 10px; align-items: flex-start; }
.lst { margin: 4px 0; padding-left: 18px; }

/* --- Retour d'absence (08 §3.0) : pas de menu du bas, un seul bouton fixe Continuer, sections en cascade --- */
body.no-menu .menu { display: none; }
.cascade > * { animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.hatch { height: 14px; border: 2px solid #0b0908; background: repeating-linear-gradient(45deg, #2a221f 0 6px, #3a2e29 6px 12px); margin: 8px 0; }
.hatch span { display: block; height: 100%; background: #4f9a3c; }
.prod4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.prod4 > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; background: var(--hollow); border: 2px solid #0b0908; border-radius: 3px; font-size: 12px; }
.prod4 > div.full { border-color: var(--bad); }
.todo { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-decoration: none; color: var(--text); min-height: 44px; }
.todo.alerte { background: #4a1c1f; }

/* --- Chantier (08 §3.2) et Tour de magie (§3.3) --- */
.share { display: flex; height: 14px; border: 2px solid #0b0908; background: #110e0c; margin: 8px 0 4px; overflow: hidden; } .share span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; } .legend i { display: inline-block; width: 10px; height: 10px; border: 2px solid #0b0908; margin-right: 4px; vertical-align: -1px; }
.plan-row { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 6px; margin-top: 4px; background: var(--hollow);
  border: 2px solid #0b0908; border-radius: 3px; color: var(--text); font: 600 13px var(--font); cursor: pointer; overflow-x: auto; }
.plan-row.on { border-color: var(--gold); }
.towers { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tw { min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--panel); border: 3px solid var(--edge);
  border-radius: 4px; cursor: pointer; font-size: 10px; color: var(--text); }
.tw .sw { width: 18px; height: 18px; border: 2px solid #0b0908; } .tw.on { border-color: var(--gold); } .tw.locked { opacity: .45; }
.sp { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 2px solid #2a221f; font-size: 13px; }
.sp.go { box-shadow: inset 3px 0 0 #4f9a3c; } .sp.dim { opacity: .45; filter: grayscale(1); } .sp.sep { border-top: 3px solid #0b0908; }
.sp-txt { flex: 1; min-width: 0; } .sp-num { display: grid; grid-template-columns: 26px 26px; text-align: right; font-weight: 700; }
.mm { margin-left: 4px; font-size: 11px; } .mm b { margin-right: 1px; }

/* --- Campagne (08 §3.6) --- */
.ph-adv { display: inline-flex; align-items: center; justify-content: center; background: var(--hollow); border: 2px dashed #4a3d36; border-radius: 4px; color: var(--soft); flex: none; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stg { display: flex; flex-direction: column; align-items: center; padding: 6px; background: var(--panel); border: 3px solid var(--edge); border-radius: 4px; font-size: 13px; }
.stg.en_cours { border-color: var(--gold); } .stg.gagnee { opacity: .6; } .stg.a_venir { opacity: .5; }
.pn.cur { border-color: var(--gold); }
.cgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 6px; }
.cf { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; background: var(--hollow); border: 2px solid #0b0908; border-radius: 3px; font-size: 11px; }
.cf.gagne { opacity: .45; filter: grayscale(1); } .cf.en_cours { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cf i { position: absolute; top: 0; right: 3px; color: var(--ok); font-style: normal; font-weight: 700; } .cf small { color: var(--gold); }
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.mate { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; background: var(--hollow); border: 2px solid #0b0908; border-radius: 3px; font-size: 11px; text-align: center; }
.mate .bust { font-size: 20px; } .mate.ko { opacity: .4; filter: grayscale(1); }
/* Campagne › préparer un essai : lots en attente (D-520, 08 §3.6), encart vert vers Stock. */
a.gear { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--text); background: #23361f; box-shadow: inset 0 0 0 1px #8fd47a; }
a.gear .row { font-size: 12px; color: #bfeab3; } a.gear .big { font-size: 14px; } a.gear .info { font-size: 11px; color: #a9cfa0; line-height: 1.35; }
.lf { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; } .lf .dimf { opacity: .35; filter: grayscale(1); }
.bars.ten span.w0 { background: #4a3d36; } .bars.ten span.w1 { background: #4f9a3c; } .bars.ten span.cur { background: var(--gold); }
.place.pulse { animation: beat 1.6s ease-in-out infinite; }

/* Alignement sur les maquettes : menu à pictogrammes (Combat plus large), retour encadré dans l'en-tête d'écran. */
.menu-in { grid-template-columns: 1fr 1fr 1.25fr 1fr 1fr; }
.menu a svg { display: block; }
.screen-head .back-btn { min-height: 44px; padding: 0 10px; font-size: 14px; flex: none; }
.screen-head h1 { flex: 1; min-width: 0; }
.mode.big { font-size: 13px; padding: 3px 8px; }

/* Épingles (maquette Des) */
.slots { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 260px; text-align: center; font-size: 12px; }
.slot.auto { border: 2px solid #4aa8dc; } .slot.pin { border: 2px solid var(--accent); }
.spell-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; } .spell-row.dimmed { opacity: .55; }
.fc { display: inline-flex; gap: 2px; flex: none; }
.rar { font-size: 11px; font-weight: 700; padding: 0 4px; border-radius: 3px; border: 2px solid #0b0908; }
.rar.r-C { background: #8a8a8a; } .rar.r-U { background: #4f9a3c; } .rar.r-R { background: #4aa8dc; color: #08202e; } .rar.r-L { background: var(--gold); color: #2b1d05; }
.red-frame { border-color: #4a1c1f; box-shadow: inset 0 0 0 2px var(--accent); }
.fav { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; } .fav-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: 13px; }
.tabs .count { border-radius: 10px; min-width: 20px; text-align: center; }
.screen-head { gap: 8px; }
.screen-head h1 { font-size: 19px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen-head .back-btn { font-size: 13px; padding: 0 8px; }
.screen-head .info-switch { gap: 6px; } .screen-head .info-switch .track { width: 40px; }

/* Dé nommé compact (maquette : u = 19 pour les 3 dés qui partent, 24 pour les favoris) — exception du porteur. */
.named.compact { gap: 2px; } .named.compact .col { gap: 2px; }
.named.compact .top .name { font-size: 11px; max-width: 70px; }
.slots { grid-auto-flow: unset; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-x: visible; }
.slot { max-width: none; padding: 6px 4px; }

/* --- Donjons et Coffres (08 §3.7) --- */
.chest { --s: 1; position: relative; display: inline-block; flex: none; width: calc(48px * var(--s)); height: calc(40px * var(--s));
  border: calc(3px * var(--s)) solid #0b0908; border-radius: calc(3px * var(--s)) calc(3px * var(--s)) 2px 2px;
  background: linear-gradient(#0000 38%, #0b0908 38% 44%, #0000 44%), var(--wood); box-shadow: inset 0 0 0 calc(2px * var(--s)) #ffffff22; }
.chest i { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-style: normal; font-size: calc(16px * var(--s)); }
.chest.open { background: linear-gradient(#0b0908 0 30%, var(--wood) 30%); }
.c-PIN { --wood: #c8a26b; } .c-BOULEAU { --wood: #e4dccb; } .c-CHENE { --wood: #8a5a34; } .c-EBENE { --wood: #3a2a2a; } .c-LEGENDAIRE { --wood: #d9a62e; }
.chest-img { position: relative; display: inline-block; } .chest-img img + img { position: absolute; inset: 0; }
.bigchest { display: flex; justify-content: center; padding: 12px 0; }
.chest-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 2px solid #2a221f; font-size: 13px; }
.loot-line { border-bottom: 2px solid #2a221f; padding: 4px 0; font-size: 13px; }
.shelf { display: flex; gap: 8px; } .shelf-item { position: relative; } .shelf-item b { position: absolute; right: -4px; bottom: -4px; background: var(--gold); color: #1c1917; font-size: 11px; padding: 0 3px; border: 2px solid #0b0908; border-radius: 3px; }
.gold-frame { border-color: #8a6a1e; box-shadow: inset 0 0 0 2px var(--gold); } .green-frame { box-shadow: inset 0 0 0 2px #4f9a3c; }
.frise { display: grid; grid-template-columns: repeat(36, 1fr); gap: 2px; margin-top: 10px; align-items: end; }
.cy { height: 12px; border: 1px solid #0b0908; } .cy.c-base, .legend i.c-base { background: #3d4a5c; } .cy.c-contrees, .legend i.c-contrees { background: #a5521e; height: 18px; }
.cy.c-regional, .legend i.c-regional { background: #8a4ab3; height: 24px; } .cy.now, .legend i.now { background: var(--gold); }
.legend i.c-contrees, .legend i.c-regional { height: 10px; }
.lvtag { font-size: 11px; font-weight: 700; padding: 1px 6px; border: 2px solid #0b0908; border-radius: 3px; text-transform: uppercase; }
.lvtag.lv-base { background: #2f4a66; } .lvtag.lv-contrees { background: #a5521e; } .lvtag.lv-regional { background: #6b2e8a; }
.lvl.lv-base { box-shadow: inset 0 0 0 2px #4a6a8a; } .lvl.lv-contrees { box-shadow: inset 0 0 0 2px #a5521e; } .lvl.lv-regional { box-shadow: inset 0 0 0 2px #8a4ab3; }
.ports { display: flex; gap: 4px; margin: 6px 0; flex-wrap: wrap; }
.badge-s { font-size: 11px; font-weight: 700; padding: 2px 6px; border: 2px solid #0b0908; border-radius: 3px; }
.badge-s.ok { background: #23361f; color: var(--ok); } .badge-s.bad { background: #4a1c1f; color: var(--bad); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .grid4 .pd { display: flex; flex-direction: column; }
.room { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 2px solid #2a221f; font-size: 13px; }
.tag.role-demi_boss { background: #a5521e; } .tag.role-boss { background: var(--accent); }
.chest-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; border: 2px dashed #8a6a1e; } .chest-row.got { border-color: #4f9a3c; }
.loot { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 6px; } .loot .pd { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.two-lines { display: inline-block; text-align: right; line-height: 1.25; font-size: 11px; }

/* --- Combat en direct de la campagne (08 §3.6, refonte 2026-11-23, maquette CombatLive) : hauteurs fixes --- */
.duel { display: grid; grid-template-columns: 1fr 76px 1fr; gap: 8px; align-items: center; min-height: 104px; }
.duel .side { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; }
.duel .bar { position: relative; height: 16px; background: #110e0c; border: 2px solid #0b0908; overflow: hidden; }
.duel .bar > span { position: absolute; top: 0; bottom: 0; transition: width .3s; }
.duel .bar.left > span { right: 0; background: #7aa6e8; } .duel .bar.right > span { left: 0; background: #c2414a; }
.duel .bar .lost { position: absolute; top: 0; bottom: 0; background: #f6ecdd; animation: lost 1.2s ease-out forwards; }
@keyframes lost { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
.chrono { --p: 0; --c: var(--gold); width: 76px; height: 76px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle, #1c1917 58%, transparent 60%), conic-gradient(var(--c) calc(var(--p) * 1%), #3a2e29 0); border: 3px solid #0b0908; line-height: 1.05; }
.chrono b { font-size: 22px; } .chrono .lbl { font-size: 9px; } .chrono .soft { font-size: 11px; }
.chrono.orange { --c: var(--warn); } .chrono.red { --c: #e86a5f; }
.limit-line { height: 24px; text-align: center; font-size: 14px; }
.beat { display: inline-block; animation: beat 1s ease-in-out infinite; }
.foe { display: flex; gap: 12px; align-items: center; min-height: 128px; border-color: #4a1c1f; box-shadow: inset 0 0 0 2px var(--accent); }
.foe-port { position: relative; flex: none; }
.shake-q { animation: shakeq .4s; } @keyframes shakeq { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.paf { position: absolute; left: 34px; top: -22px; width: 78px; height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #f6ecdd; color: #1c1917; font-size: 12px; font-weight: 700; clip-path: polygon(50% 0, 61% 26%, 92% 14%, 74% 42%, 100% 56%, 70% 64%, 80% 96%, 52% 74%, 26% 98%, 30% 66%, 0 60%, 26% 42%, 8% 14%, 39% 26%);
  animation: paf 1.3s ease-out forwards; }
.paf b { color: var(--accent); font-size: 22px; } @keyframes paf { 0% { transform: scale(.4); opacity: 0; } 15% { transform: scale(1.15); opacity: 1; } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.team-live { border-color: #1f4a66; box-shadow: inset 0 0 0 2px #4aa8dc; }
.team-row { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 4px; align-items: start; min-height: 74px; }
.team-row .mate { background: none; border: 0; } .team-row .bonus { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; } .team-row .bonus b { font-size: 18px; }
.blue-t { color: #8cc8ef; }
.one-row { flex-wrap: nowrap; justify-content: space-between; min-height: 58px; align-items: center; border-top: 2px solid #2a221f; padding-top: 6px; }
.lf-die { border-radius: 4px; } .lf-die.hit { box-shadow: 0 0 0 2px var(--gold); } .lf-die.kn { box-shadow: 0 0 0 2px #4aa8dc; } .lf-die.dimf { opacity: .35; filter: grayscale(1); }
.dmg-line { width: 100%; height: 40px; display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 0 8px; background: var(--hollow); border: 2px solid #0b0908;
  border-radius: 3px; color: var(--text); font: 600 12px var(--font); cursor: pointer; overflow: hidden; white-space: nowrap; }
.dmg-line .total { margin-left: auto; color: var(--ok); font-size: 20px; } .dmg-line .total small { font-size: 11px; color: var(--soft); }
.eff { display: inline-flex; align-items: center; gap: 4px; } .sw { display: inline-block; width: 10px; height: 10px; border: 2px solid #0b0908; }
.sw-RED { background: #d94a26; } .sw-BLUE { background: #4aa8dc; } .sw-GREEN { background: #4f9a3c; } .sw-PURPLE { background: #8a4ab3; } .sw-BLACK { background: #1a1a1a; } .sw-SKULL { background: #f1ece2; }
.controls { display: grid; grid-template-columns: 52px 1fr 52px 56px; gap: 6px; }
.detail { font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
@media (prefers-reduced-motion: reduce) { .paf, .shake-q, .lost, .beat { animation: none !important; } .duel .bar .lost { display: none; } }
.foe > div:last-child { min-width: 0; padding-left: 8px; }

/* --- Dés › Favoris, révision du 2026-11-24 (08 §3.9) : places en une ligne, carte rééquilibrée, barre d'icônes --- */
.places { display: flex; align-items: center; gap: 8px; height: 22px; }
.places .lbl { font-size: 10px; flex: none; } .places b { font-size: 13px; flex: none; }
.places .segs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
.places .segs span { height: 8px; border-radius: 1px; background: #211c19; box-shadow: inset 0 0 0 1px #4a3d36; }
.places .segs .on { background: var(--gold); box-shadow: none; } .places .segs .bad { background: #e0525a; box-shadow: none; }
.alert-info { margin: -6px 0 0; font-size: 11px; line-height: 1.35; color: #ffb3a8; }
.die-title { display: flex; align-items: center; gap: 6px; min-height: 28px; margin-bottom: 4px; }
.die-title b { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.die-title .ess { align-self: center; } .die-title .chev { color: var(--soft); font-size: 14px; padding: 0 2px; }
.die-card .die-row { gap: 10px; } .die-card .die-info { flex: 1; font-size: 11px; gap: 5px; }
.die-info .pr { white-space: nowrap; color: #8cc8ef; }
.actbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ibtn { height: 44px; border: 3px solid #110e0c; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #f6ecdd; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35); padding: 0; }
.ibtn.gold { background: #c9963a; color: #2b1d05; } .ibtn.green { background: #4f8a3f; } .ibtn.blue { background: #3f63a8; }
.ibtn.violet { background: #6a3a8a; } .ibtn.red { background: #8a2a30; color: #ffd0c9; } .ibtn.dim { background: #3a322e; color: #8a7a6e; }
.ibtn.armed { background: var(--warn); color: #1c1209; animation: beat 1s ease-in-out infinite; }
.actline { font-size: 11px; line-height: 1.35; color: #ffb3a8; min-height: 15px; }
.legend { margin: 0; font-size: 10px; line-height: 1.35; color: #a89584; }
@media (prefers-reduced-motion: reduce) { .ibtn.armed { animation: none; } }
/* Mini-trophée (D-472) : ligne « Craquer » sous sa carte */
.crack-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--edge); font-size: 12px; }
/* Moulin (D-478, 15 §2.4) : bandeau sur tous les écrans pendant une vitesse ; trois boutons au Domaine */
.mill-band { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; padding: 4px 8px; font-size: 13px; font-weight: 700;
  color: #1c1209; background: var(--gold); border: 2px solid #0b0908; border-radius: 3px; text-decoration: none; }
.mill-band img { width: 16px; height: 16px; image-rendering: pixelated; }
.mill-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
/* Trois colonnes égales qui ne débordent jamais, quels que soient le prix (10, 60, 100 blés…) et le multiplicateur. */
.mill-btns .btn { min-width: 0; min-height: 52px; padding: 6px 4px; line-height: 1.25; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; }
.mill-btns .btn > span { max-width: 100%; white-space: nowrap; }
/* Orientations des disciples (D-484) : libellé du métier et pastilles des faces cherchées (secondaires atténuées) */
.ori { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.ori-faces { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.ori-f.sec { opacity: .55; }
/* Cadenas pas encore livré : l'icône de clé (remplaçant prévu par l'emplacement coffre.<E>.cadenas), au centre du coffre */
.chest-img .lock-fb { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); display: flex; }
.chest-img .lock-fb img { position: static; }

/* Tempéraments des disciples (D-487, 08 §3.9) — en attendant la maquette de l'atelier */
.tp { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tp-go { flex: 1; min-width: 150px; min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.tp-go.run { opacity: .75; }
.tp-gauge { display: block; width: 100%; height: 6px; background: var(--hollow); border: 1px solid #0b0908; }
.tp-gauge span { display: block; height: 100%; background: var(--gold, #d9a441); }
.tp-dots { display: flex; gap: 3px; }
.tp-dots i { width: 10px; height: 10px; border: 2px solid #0b0908; background: var(--hollow); }
.tp-dots i.on { background: var(--gold, #d9a441); }
.rail-x { display: block; font-size: 11px; color: var(--gold, #d9a441); }

/* Arène des tournois (08 §3.5, maquette Main) et mini-arène (ArenaMini) : rediffusion du dernier tournoi joué */
.arena [hidden] { display: none !important; }
.arena { display: block; background: var(--deep); border: 3px solid var(--edge); color: var(--text); text-decoration: none; }
.arena[hidden] { display: none; }
.ar-band { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 2px solid var(--edge); font-size: 11px; white-space: nowrap; }
.ar-band .ar-next { margin-left: auto; }
.ar-live { background: #4a1616; color: #ffb4ab; padding: 2px 6px; font-size: 11px; white-space: nowrap; animation: ar-blink 1.2s steps(2) infinite; }
.ar-live.off { background: var(--hollow); color: var(--soft, #9a8b82); animation: none; }
@keyframes ar-blink { 50% { opacity: .55; } }
.ar-chain { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px; }
.ar-opp { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--edge); background: var(--hollow); position: relative; font-size: 9px; }
.ar-opp img { width: 24px; height: 24px; }
.ar-opp.boss { border-color: #8a5a2b; }
.ar-opp.now { border-color: var(--gold); }
.ar-opp.beaten { opacity: .45; }
.ar-opp.beaten::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #ffb4ab; font-size: 20px; }
.ar-arrow { color: var(--soft, #9a8b82); font-size: 10px; }
.ar-scene { position: relative; height: 178px; margin: 0 8px; background: var(--panel); border: 2px solid var(--edge); overflow: hidden; }
.ar-mid { position: absolute; left: 0; right: 0; top: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ar-dice { display: flex; gap: 4px; }
.ar-die { opacity: .45; border: 2px solid transparent; line-height: 0; }
.ar-die.hit { opacity: 1; border-color: var(--gold); }
.ar-act { color: var(--gold); font-size: 14px; min-height: 18px; }
.ar-me { position: absolute; left: 10px; bottom: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 11px; }
.ar-me .k { display: grid; place-items: center; width: 64px; height: 64px; background: var(--hollow); border: 2px solid var(--edge); }
.ar-foe { position: absolute; right: 10px; bottom: 8px; line-height: 0; }
.ar-foe.shake { animation: ar-shake .35s steps(4); }
@keyframes ar-shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.ar-bang { position: absolute; right: 70px; top: -6px; line-height: 1.1; background: #f6ecd2; color: #1c1917; padding: 6px 8px; font-size: 12px; text-align: center; clip-path: polygon(0 20%, 15% 0, 35% 15%, 55% 0, 70% 15%, 100% 5%, 88% 45%, 100% 85%, 70% 80%, 50% 100%, 30% 82%, 0 95%, 10% 55%); }
.ar-bang b { display: block; color: #c62828; font-size: 18px; }
.ar-bang.big b { font-size: 24px; }
.ar-ouch { position: absolute; left: 70px; top: 0; background: #f6ecd2; color: #c62828; padding: 3px 6px; font-size: 11px; white-space: nowrap; }
.ar-plus { position: absolute; left: 70px; top: 26px; background: #1f3b1a; color: var(--ok); border: 2px solid var(--edge); padding: 2px 6px; font-size: 11px; white-space: nowrap; }
.ar-ko { position: absolute; right: -6px; top: 40%; transform: rotate(-14deg); border: 3px solid #e57373; color: #ffb4ab; background: rgba(28,25,23,.7); padding: 2px 8px; font-size: 16px; line-height: 1.2; }
.ar-end { position: absolute; inset: 0; background: rgba(17,14,12,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 13px; }
.ar-end > b { font-size: 22px; }
.ar-gauges { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 8px; font-size: 11px; }
.ar-gauges .bar { display: block; height: 10px; background: var(--hollow); border: 2px solid var(--edge); }
.ar-gauges .bar i { display: block; height: 100%; background: #6f9bdc; transition: width .3s; }
.ar-gauges .right { text-align: right; }
.ar-gauges .right .bar i { background: #c94a4a; margin-left: auto; }
.ar-count { display: flex; flex-direction: column; align-items: center; }
.ar-count b { font-size: 16px; }
.ar-ctl { display: flex; gap: 8px; padding: 0 8px 8px; }
.ar-ctl .btn:first-child { flex: 1; }
.ar-ctl .btn:last-child { width: 48px; }
.arena.mini { display: flex; height: 84px; }
.arena.mini[hidden] { display: none; }
.arena.mini .ar-scene { flex: 1; height: auto; margin: 0; border: 0; border-right: 2px solid var(--edge); display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.arena.mini .ar-live { position: absolute; left: 4px; top: 4px; font-size: 9px; padding: 1px 4px; }
.arena.mini .ar-me { position: static; margin-top: 14px; }
.arena.mini .ar-me .k { width: 32px; height: 32px; font-size: 9px; }
.arena.mini .ar-dice { margin-left: auto; }
.arena.mini .ar-foe { position: relative; right: auto; bottom: auto; }
.arena.mini .ar-bang { right: 30px; top: -10px; padding: 3px 5px; font-size: 9px; }
.arena.mini .ar-bang b, .arena.mini .ar-bang.big b { font-size: 13px; }
.arena.mini .ar-side { width: 112px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 8px; font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .ar-live, .ar-foe.shake { animation: none; } }
/* Super roll (D-473) : pastille du compteur sur « Lancer ×10 » */
.sr-wrap { position: relative; display: block; }
.sr-wrap .ibtn { width: 100%; }
.sr-count { position: absolute; top: -8px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid #0b0908; border-radius: 11px;
  background: var(--gold); color: #1c1917; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.sr-won { margin-bottom: 6px; color: var(--gold); }
/* Montée de niveau : popup et feu d'artifice (porteur, 2026-11-29) */
.lvl-party { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(10, 8, 7, .72); }
.lvl-party canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.lvl-card { position: relative; width: min(320px, calc(100% - 32px)); text-align: center; padding: 20px 16px; background: var(--panel); border: 3px solid #8a6a1e;
  box-shadow: inset 0 0 0 2px var(--gold); border-radius: 4px; display: flex; flex-direction: column; gap: 8px; animation: lvl-in .5s cubic-bezier(.2, 1.6, .4, 1); }
.lvl-big { font-size: 34px; font-weight: 700; color: var(--gold); letter-spacing: .06em; text-shadow: 3px 3px 0 #0b0908; }
.lvl-sub { font-weight: 700; letter-spacing: .08em; }
.lvl-gains { display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 6px 0; }
.lvl-gains span { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; color: var(--ok); }
.lvl-ok { min-height: 48px; }
.lvl-pulse { animation: lvl-pulse 1s ease-in-out 3; }
@keyframes lvl-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lvl-pulse { 50% { color: var(--gold); transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .lvl-card, .lvl-pulse { animation: none; } }
/* Chantier : amélioration d'un bâtiment (D-502) */
.upg { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 12px; }

/* Unités de relance (D-516) : encart bleu de la fiche d'un dé, 6 faces à toucher. */
.rel-box { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: #14283a; box-shadow: inset 0 0 0 1px #6fc3f0; }
.rel-faces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.rel-face { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 3px; font-size: 10px; min-height: 44px; }
.rel-face.on { background: #1f3a50; box-shadow: inset 0 0 0 1px #6fc3f0; } .rel-face:focus-visible { outline: 3px solid var(--gold); }
.gem-mark { color: #6fc3f0; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* « Merci ! » (08 §3.16) : un achat Ko-fi crédité, annoncé une fois. GEM ×6 (96 px), rebond puis lueur. */
.merci-veil { position: fixed; inset: 0; background: rgba(10,8,6,.82); z-index: 60; }
.merci { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 48px); max-width: 342px; box-sizing: border-box; z-index: 61;
  background: #3a322e; border: 3px solid #110e0c; box-shadow: inset 0 0 0 2px #6fc3f0, 0 8px 0 #0b0908; border-radius: 6px; padding: 22px 16px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.merci-t { font-size: 30px; letter-spacing: .06em; color: #ffe3a8; text-shadow: 0 3px 0 #7a4a12; }
.merci-gem { display: flex; animation: merci-pop .6s ease-out both, merci-glow 1.6s .6s infinite; }
.merci-dia { width: 48px; height: 48px; margin: 24px; transform: rotate(45deg); background: #6fc3f0; border: 4px solid #0b0908; }
.merci-n { font-size: 34px; color: #8fe0ff; text-shadow: 0 3px 0 #0b1a2a; }
.merci-what { font-size: 14px; color: #e6d8c6; }
.merci ul { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.5; color: var(--soft); }
.merci .info { font-size: 12px; line-height: 1.4; }
.merci-ok { align-self: stretch; min-height: 44px; border: 3px solid #110e0c; border-radius: 4px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  background: var(--gold); color: #2b1d05; box-shadow: inset 0 0 0 2px #ffe08a, inset 0 -4px 0 #b8892a; }
@keyframes merci-pop { 0% { transform: scale(.4); opacity: 0 } 60% { transform: scale(1.15); opacity: 1 } 100% { transform: scale(1) } }
@keyframes merci-glow { 0%, 100% { filter: drop-shadow(0 0 0 #6fc3f0) } 50% { filter: drop-shadow(0 0 10px #6fc3f0) } }
@media (prefers-reduced-motion: reduce) { .merci-gem { animation: none; } }
