/* ═══════════════════════════════════════════════════════
 *  Thème B — Vélin Enluminé (parchemin, encre sépia, or feuille)
 *  Appliqué via body[data-theme="velin"]
 * ═══════════════════════════════════════════════════════ */

body[data-theme="velin"] {
  background: linear-gradient(180deg, #f0e6cc 0%, #e8d9b5 55%, #dfd0a8 100%) !important;
  color: #2a1e0e !important;
}

/* Variables du thème clair — posées sur body et héritées naturellement,
   plus jamais sur `*` (audit V1 : cascade prévisible, rendu moins coûteux).
   NB : les alias legacy doivent être redéfinis explicitement ici car les
   alias de tokens.css (--bg: var(--bg-app)) se résolvent au niveau :root. */
body[data-theme="velin"] {
  /* ── Tokens v2 (consommés par components.css et les nouvelles vues) ── */
  --bg-app:    #e8d9b5;
  --bg-panel:  #f0e7d0;
  --bg-card:   #f5edda;
  --bg-raised: #eee0c0;
  --ink-high:  #2a1e0e;
  --ink-mid:   #5a3e20;
  --ink-low:   #82643a;
  --ember:     #8c2218;
  --ember-hot: #a82c1e;
  --line:        rgba(184,150,58,0.4);
  --line-strong: #b8963a;
  --hp:          #3a5a2a;
  --hp-low:      #8a6210;
  --hp-critical: #8c2218;
  --mana:        #2c4a7a;
  --reaction:    #5a3a7a;
  --shadow-card: 0 1px 2px rgba(90,62,32,.18), 0 4px 12px rgba(90,62,32,.12);
  --focus: 0 0 0 2px #f5edda, 0 0 0 4px #8c2218;

  /* ── Alias legacy (pages existantes) ── */
  --bg:           #e8d9b5;
  --bg-elevated:  #faf5e8;
  --border-mid:   #b8963a;
  --border-dim:   rgba(184,150,58,0.4);
  --text:         #2a1e0e;
  --text-muted:   #5a3e20;
  --text-dim:     #82643a;
  --red:          #8c2218;
  --red-light:    #a82c1e;
  --gold:         #8a6210;
  --gold-light:   #a87820;
  --blue:         #2c4a7a;
  --purple:       #5a3a7a;
  --green:        #3a5a2a;

  /* ── Landmines (T0) : vars consommées SANS redéf Vélin → elles flippent enfin ── */
  --purple-light:  #5a3a7a;                 /* lavande #c0a0f8 → violet sépia lisible sur crème */
  --green-light:   #3a5a2a;                 /* vert sombre lisible */
  --gold-glow:     rgba(138,98,16,0.18);    /* wash or sépia (au lieu d'ambre obsidian) */
  --red-glow:      rgba(140,34,24,0.18);    /* wash rouge sépia */
  --modal-scrim:   rgba(50,30,10,0.6);      /* voile modale chaud (au lieu du noir dense Obsidian) */
  --border-bright: #b8963a;                 /* « bordure vive » → or parchemin */
  --gold-deco:     #8a6210;                 /* déco or → sépia (fait aussi flipper --gold-accent) */

  /* Accents par caractéristique (O3) — variantes foncées lisibles sur parchemin */
  --class-str: #8c2218;   /* FOR — rouge sépia */
  --class-dex: #3a5a2a;   /* DEX — vert sombre */
  --class-con: #8a4a10;   /* CON — ambre foncé */
  --class-int: #2c4a7a;   /* INT — bleu sombre */
  --class-wis: #5a3a7a;   /* SAG — violet sombre */
  --class-cha: #8a6210;   /* CHA — or sépia */

  /* Rareté — couleurs foncées lisibles sur parchemin */
  --rarity-common:    #6a6258;
  --rarity-uncommon:  #2a6838;
  --rarity-rare:      #1e4a82;
  --rarity-very-rare: #5a3078;
  --rarity-legendary: #7a5208;
}

/* Texture parchemin subtile */
body[data-theme="velin"]::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    repeating-linear-gradient(94deg, rgba(120,90,40,0.025) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(2deg,  rgba(120,90,40,0.02)  0 1px, transparent 1px 8px);
}

/* ── Header — bandeau cuir ── */
body[data-theme="velin"] header {
  background: linear-gradient(180deg, #2a1c10, #3a2518) !important;
  border-bottom: 3px solid #1a0e08 !important;
  box-shadow: 0 3px 0 rgba(184,150,58,0.5), 0 4px 20px rgba(0,0,0,0.4) !important;
}
body[data-theme="velin"] .header-ornament-line { background: linear-gradient(90deg, transparent, rgba(232,184,75,0.7), transparent) !important; }
body[data-theme="velin"] .header-ornament-diamond { background: #e8b84b !important; }

/* ── Forge bar — cuir ── */
body[data-theme="velin"] #forge-bar {
  background: linear-gradient(180deg, #3a2518, #2c1c10) !important;
  border-bottom: 2px solid #1a0e08 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important;
}
/* ── Barre MJ (dm.php) — même cuir : --bg-deep ne flippe pas, override dédié (D1) ── */
body[data-theme="velin"] #dm-bar {
  background: linear-gradient(180deg, #3a2518, #2c1c10) !important;
  border-bottom-color: rgba(184,150,58,0.5) !important;
}
body[data-theme="velin"] .fbar-btn-ghost {
  background: rgba(255,240,200,0.08) !important;
  color: #e8d6a8 !important;
  border-color: rgba(184,150,58,0.35) !important;
}
body[data-theme="velin"] .fbar-btn-ghost:hover {
  background: rgba(255,240,200,0.15) !important;
  color: #f5e8c0 !important;
}
body[data-theme="velin"] .fbar-btn-red {
  background: #8c2218 !important;
  color: #f5ead0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
body[data-theme="velin"] #current-char-name {
  color: #f0d99a !important;
  background: rgba(184,150,58,0.15) !important;
  border-color: rgba(184,150,58,0.35) !important;
}

/* ── Nav — plus d'override de thème ──
   La nav « intercalaires de grimoire » (forge.css) est 100 % tokens : en Vélin
   elle hérite du dégradé parchemin (--bg-app→--bg-card), du filet --line et de
   l'or sépia (--gold) sur l'onglet actif. Plus de rouge, plus de !important. */

/* ── Page / App ── */
body[data-theme="velin"] .app { color: #2a1e0e !important; }

/* ── Cards / panels ── */
body[data-theme="velin"] .card,
body[data-theme="velin"] .grim-vital-card,
body[data-theme="velin"] .grim-stats-card,
body[data-theme="velin"] .grim-identity,
body[data-theme="velin"] [class*="grim-cb-panel"],
body[data-theme="velin"] [class*="grim-inv"],
body[data-theme="velin"] [class*="grim-ft"] {
  background: #f5edda !important;
  border: 1px solid rgba(184,150,58,0.5) !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 10px rgba(80,50,10,0.15) !important;
  color: #2a1e0e !important;
}
/* Filet cramoisie→or en haut */
body[data-theme="velin"] .card::before,
body[data-theme="velin"] .grim-vital-card::before,
body[data-theme="velin"] .grim-stats-card::before,
body[data-theme="velin"] .grim-identity::before {
  content: '' !important;
  position: absolute !important; top: 0 !important; left: 14px !important; right: 14px !important; height: 2px !important;
  background: linear-gradient(90deg, transparent, #8c2218 35%, #b8963a 50%, #8c2218 65%, transparent) !important;
  opacity: 0.6 !important;
}

/* ── Titres de section ── */
body[data-theme="velin"] .grim-stats-title,
body[data-theme="velin"] .grim-cb-section-title-text,
body[data-theme="velin"] .dm-section-title,
body[data-theme="velin"] .card-title { color: #8c2218 !important; }

/* ── Inputs / selects / textareas ── */
body[data-theme="velin"] input[type="text"],
body[data-theme="velin"] input[type="number"],
body[data-theme="velin"] input[type="email"],
body[data-theme="velin"] input[type="password"],
body[data-theme="velin"] select,
body[data-theme="velin"] textarea {
  background: #faf5e8 !important;
  border: 1px solid rgba(184,150,58,0.5) !important;
  color: #2a1e0e !important;
  border-radius: 4px !important;
}
body[data-theme="velin"] input:focus,
body[data-theme="velin"] select:focus,
body[data-theme="velin"] textarea:focus {
  border-color: #8c2218 !important;
  box-shadow: 0 0 0 2px rgba(140,34,24,0.15) !important;
  outline: none !important;
}
body[data-theme="velin"] input::placeholder,
body[data-theme="velin"] textarea::placeholder { color: #82643a !important; }

/* Inputs transparents (chiffres stats etc.) */
body[data-theme="velin"] .grim-stat-score,
body[data-theme="velin"] .grim-hp-cur,
body[data-theme="velin"] .grim-hp-max,
body[data-theme="velin"] .grim-vital-value,
body[data-theme="velin"] .grim-cb-val-inp,
body[data-theme="velin"] .char-name-input {
  background: transparent !important;
  border: none !important;
  color: #2a1e0e !important;
}

/* ── Textes généraux ── */
body[data-theme="velin"] .grim-vital-label,
body[data-theme="velin"] .grim-cb-chip-label { color: #5a3e20 !important; }
body[data-theme="velin"] .grim-vital-sub,
body[data-theme="velin"] .grim-cb-chip-sub { color: #82643a !important; font-style: italic !important; }
body[data-theme="velin"] .text-muted,
body[data-theme="velin"] [class*="text-muted"] { color: #5a3e20 !important; }
body[data-theme="velin"] [class*="text-dim"] { color: #82643a !important; }

/* ── Avatar ── */
body[data-theme="velin"] .avatar-wrap {
  background: radial-gradient(ellipse at 50% 30%, #f6eed6, #e3d3ad) !important;
  border: 1px solid rgba(184,150,58,0.5) !important;
  box-shadow: inset 0 0 0 2px rgba(156,116,36,0.25) !important;
}

/* ── Nom / sélects identité ── */
body[data-theme="velin"] .char-name-input { color: #8c2218 !important; border-bottom: 1px solid rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .char-sub select { background: #faf5e8 !important; border: 1px solid rgba(184,150,58,0.5) !important; color: #2a1e0e !important; }

/* ── Méta niveau/maîtrise/inspiration ── */
body[data-theme="velin"] .grim-meta-row { border-top: 1px solid rgba(184,150,58,0.4) !important; border-bottom: 1px solid rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .grim-meta-label { color: #82643a !important; }
body[data-theme="velin"] .grim-meta-value { color: #2a1e0e !important; }

/* ── XP ── */
body[data-theme="velin"] .xp-bar-wrap { background: rgba(120,90,40,0.15) !important; border: 1px solid rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .xp-bar-fill { background: linear-gradient(90deg, #8c2218, #b8963a) !important; }

/* ── HP ── */
body[data-theme="velin"] .grim-hp-card { border-top: 2px solid #8c2218 !important; background: #f5edda !important; }
body[data-theme="velin"] #hpCurrent { color: #8c2218 !important; text-shadow: none !important; animation: none !important; }
body[data-theme="velin"] #hpMax { color: #5a3e20 !important; }
body[data-theme="velin"] .grim-hp-max-label { color: #82643a !important; }
body[data-theme="velin"] .grim-hp-heart { color: #8c2218 !important; opacity: 0.7 !important; }
body[data-theme="velin"] .grim-hp-bar { background: rgba(120,90,40,0.2) !important; }
body[data-theme="velin"] .grim-hp-bar-fill { background: linear-gradient(90deg, #6a1810, #a82c1e) !important; box-shadow: none !important; }
body[data-theme="velin"] .grim-hp-pct { color: #82643a !important; }
body[data-theme="velin"] .grim-hp-divider { background: linear-gradient(90deg, rgba(140,34,24,0.4), transparent) !important; }

/* ── Vitals CA/Init/Speed ── */
body[data-theme="velin"] .grim-vital-card.accent-red    { border-top: 2px solid #8c2218 !important; }
body[data-theme="velin"] .grim-vital-card.accent-blue   { border-top: 2px solid #2c4a7a !important; }
body[data-theme="velin"] .grim-vital-card.accent-gold   { border-top: 2px solid #8a6210 !important; }
body[data-theme="velin"] .grim-vital-card.accent-purple { border-top: 2px solid #5a3a7a !important; }
body[data-theme="velin"] .grim-vital-value { color: #2a1e0e !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-vital-card.accent-blue   .grim-vital-value { color: #2c4a7a !important; }
body[data-theme="velin"] .grim-vital-card.accent-gold   .grim-vital-value { color: #8a6210 !important; }
body[data-theme="velin"] .grim-vital-card.accent-purple .grim-vital-value { color: #5a3a7a !important; }
body[data-theme="velin"] .grim-vital-badge { background: #f0e5c8 !important; box-shadow: inset 0 0 0 1px rgba(184,150,58,0.35) !important; }
body[data-theme="velin"] .grim-vital-badge.blue   { color: #2c4a7a !important; }
body[data-theme="velin"] .grim-vital-badge.gold   { color: #8a6210 !important; }
body[data-theme="velin"] .grim-vital-badge.purple { color: #5a3a7a !important; }

/* ── Combat chips ── */
body[data-theme="velin"] .grim-cb-chip { background: #f5edda !important; border: 1px solid rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .grim-cb-chip.init { background: linear-gradient(160deg, rgba(138,98,16,0.08) 0%, #f5edda 60%) !important; border-top: 2px solid #8a6210 !important; }
body[data-theme="velin"] .grim-cb-chip.ca   { background: linear-gradient(160deg, rgba(44,74,122,0.08) 0%, #f5edda 60%) !important; border-top: 2px solid #2c4a7a !important; }
body[data-theme="velin"] .grim-cb-chip.speed { background: linear-gradient(160deg, rgba(90,58,122,0.08) 0%, #f5edda 60%) !important; border-top: 2px solid #5a3a7a !important; }
body[data-theme="velin"] .grim-cb-val-inp { color: #2a1e0e !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-cb-chip.init .grim-cb-val-inp { color: #8a6210 !important; }
body[data-theme="velin"] .grim-cb-chip.ca   .grim-cb-val-inp { color: #2c4a7a !important; }
body[data-theme="velin"] .grim-cb-chip.speed .grim-cb-val-inp { color: #5a3a7a !important; }
body[data-theme="velin"] .grim-cb-hp-total { color: #8c2218 !important; text-shadow: none !important; }

/* ── Grille stats ── */
body[data-theme="velin"] .grim-stat-cell { border-color: rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .grim-stat-name { color: #82643a !important; opacity: 1 !important; }
body[data-theme="velin"] .grim-stat-mod  { color: #2a1e0e !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-stat-score { color: #8a6210 !important; background: rgba(250,245,232,0.8) !important; border-color: rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .grim-stat-save { border-top-color: rgba(184,150,58,0.4) !important; color: #82643a !important; }
body[data-theme="velin"] .grim-stat-save-dot { border-color: #b8963a !important; background: transparent !important; }
body[data-theme="velin"] .grim-stat-save-dot.proficient { background: #b8963a !important; border-color: #8a6210 !important; box-shadow: none !important; }
body[data-theme="velin"] .grim-stat-save-val.proficient { color: #8a6210 !important; }
/* Couleurs stat — plus sombres pour lisibilité sur fond clair */
body[data-theme="velin"] .grim-stat-cell:nth-child(1) .grim-stat-mod { color: #8c2218 !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(2) .grim-stat-mod { color: #2c4a7a !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(3) .grim-stat-mod { color: #3a5a2a !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(4) .grim-stat-mod { color: #5a3a7a !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(5) .grim-stat-mod { color: #8a6210 !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(6) .grim-stat-mod { color: #7a3060 !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(1) .grim-stat-name { color: #8c2218 !important; opacity: 0.8 !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(2) .grim-stat-name { color: #2c4a7a !important; opacity: 0.8 !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(3) .grim-stat-name { color: #3a5a2a !important; opacity: 0.8 !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(4) .grim-stat-name { color: #5a3a7a !important; opacity: 0.8 !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(5) .grim-stat-name { color: #8a6210 !important; opacity: 0.8 !important; }
body[data-theme="velin"] .grim-stat-cell:nth-child(6) .grim-stat-name { color: #7a3060 !important; opacity: 0.8 !important; }

/* ── Conditions ── */
body[data-theme="velin"] .grim-cb-cond-strip { background: #f5edda !important; border-color: rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .grim-cb-cond-label { color: #82643a !important; }
body[data-theme="velin"] .grim-cb-cond { background: #faf5e8 !important; border-color: rgba(184,150,58,0.3) !important; color: #5a3e20 !important; }
body[data-theme="velin"] .grim-cb-cond.active { color: #8c2218 !important; border-color: #8c2218 !important; background: rgba(140,34,24,0.08) !important; box-shadow: none !important; }

/* ── Sorts ── (S1b : la base forge.css est tokenisée et flippe seule. Les anciens
   overrides carte/nom/tag étaient périmés et cassaient la parité crème : le tag d'école
   virait au rouge alors qu'il est --reaction (violet) en Obsidian, et les sorts non
   préparés perdaient leur atténuation --ink-low. Retirés → la base gouverne les 2 thèmes.
   Seul rescapé : redonner --reaction au focus du champ recherche, sinon le blanket
   input:focus (plus haut) le force en rouge → incohérence avec Obsidian. */
body[data-theme="velin"] .grim-sp-search:focus {
  border-color: var(--reaction) !important;
  box-shadow: var(--focus) !important;
}

/* ── Inventaire ── */
body[data-theme="velin"] .grim-inv-item { background: #f5edda !important; border-color: rgba(184,150,58,0.4) !important; }
body[data-theme="velin"] .grim-inv-item-name { color: #2a1e0e !important; }
body[data-theme="velin"] .grim-inv-item-desc { color: #5a3e20 !important; }


/* ── Coquille modale + boutons (M1) ──
   La base (forge.css) flippe désormais entièrement via tokens : --bg-card, --text,
   --border-mid, --red (liseré haut), --bg-elevated, et le voile via --modal-scrim
   (tuné plus haut). Les anciens overrides !important étaient soit redondants (mêmes
   valeurs que les tokens), soit nuisibles : `.modal { border:1px }` écrasait le liseré
   HAUT rouge, et `.modal-title` forçait le titre en rouge (vs neutre en Obsidian).
   Retirés → coquille cohérente dans les 2 thèmes, sans !important. (.add-btn idem, S1c.) */
body[data-theme="velin"] label { color: #5a3e20 !important; }

/* ── Scrollbars ── */
body[data-theme="velin"] ::-webkit-scrollbar-thumb { background: #b8963a !important; }
body[data-theme="velin"] ::-webkit-scrollbar-track { background: #e0d0a0 !important; }

/* ── Glows inadaptés au fond clair : neutralisation CIBLÉE uniquement
   (audit V1 : ne jamais tuer toutes les animations d'un thème) ── */
body[data-theme="velin"] .grim-hp-cur,
body[data-theme="velin"] .grim-cb-hp-total { animation: none !important; text-shadow: none !important; }
body[data-theme="velin"] .grim-cb-heart { animation: none !important; }

/* ══ Slots d'équipement remplis — vélin propre ══ */
/* Retirer le filet décoratif parasite sur les slots */
body[data-theme="velin"] #invSlotsGrid .grim-inv-item::before { display: none !important; }

body[data-theme="velin"] #invSlotsGrid .grim-inv-item {
  background: #f3e8cc !important;
  border: 1px solid #c0a050 !important;
  border-left: 3px solid #9c7424 !important;
  box-shadow: 0 2px 8px rgba(80,55,20,0.12) !important;
  border-radius: 6px !important;
  padding: 0.7rem 0.85rem !important;
}
/* Bordure gauche selon rareté */
body[data-theme="velin"] #invSlotsGrid .grim-inv-item.rarity-common      { border-left-color: var(--rarity-common) !important; }
body[data-theme="velin"] #invSlotsGrid .grim-inv-item.rarity-uncommon    { border-left-color: var(--rarity-uncommon) !important; }
body[data-theme="velin"] #invSlotsGrid .grim-inv-item.rarity-rare        { border-left-color: var(--rarity-rare) !important; }
body[data-theme="velin"] #invSlotsGrid .grim-inv-item.rarity-very-rare   { border-left-color: var(--rarity-very-rare) !important; }
body[data-theme="velin"] #invSlotsGrid .grim-inv-item.rarity-legendary   { border-left-color: var(--rarity-legendary) !important; box-shadow: 0 0 10px rgba(122,82,8,0.2) !important; }

/* Icône */
body[data-theme="velin"] #invSlotsGrid .grim-inv-item-icon {
  background: #faf5e8 !important;
  border: 1px solid #c3a86a !important;
  border-radius: 6px !important;
}

/* Nom — pas de bordure, encre franche */
body[data-theme="velin"] #invSlotsGrid .grim-inv-item-name {
  color: #2a1e0e !important;
  font-weight: 700 !important;
  background: transparent !important;
  border: none !important;
}

/* Badge rareté — pastille pleine lisible */

/* Label de slot (TÊTE, COU...) — ne pas couper */
body[data-theme="velin"] #invSlotsGrid .grim-inv-item-foot {
  gap: 0.5rem !important;
  align-items: center !important;
}
body[data-theme="velin"] #invSlotsGrid .grim-inv-item-foot > span:last-child {
  color: #8a775c !important;
  opacity: 1 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* Boutons modifier/supprimer visibles */
body[data-theme="velin"] #invSlotsGrid .grim-inv-item-actions { opacity: 1 !important; }
body[data-theme="velin"] #invSlotsGrid .grim-inv-item-btn { color: #8a775c !important; }
body[data-theme="velin"] #invSlotsGrid .grim-inv-item-btn:hover { color: #9e2b22 !important; background: rgba(158,43,34,0.1) !important; }

/* Slots vides — propres */
body[data-theme="velin"] .inv-slot {
  background: #ede0c0 !important;
  border: 1px dashed #c0a050 !important;
}
body[data-theme="velin"] .inv-slot:hover { border-color: #9c7424 !important; background: #f0e5c8 !important; }
body[data-theme="velin"] .inv-slot-label { color: #8a775c !important; }
body[data-theme="velin"] .inv-slot-item  { color: #b0a080 !important; }


/* ══ Inventaire vélin — cartes propres ══ */
/* Pas de filet décoratif sur les items (crée des bordures parasites) */
body[data-theme="velin"] .grim-inv-item::before,
body[data-theme="velin"] [class*="grim-inv-item"]::before { display: none !important; }

body[data-theme="velin"] .grim-inv-item {
  background: #f3e8cc !important;
  border: 1px solid #c0a050 !important;
  border-left: 3px solid #a08850 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(80,55,20,0.12) !important;
}
body[data-theme="velin"] .grim-inv-item.rarity-common    { border-left-color: var(--rarity-common) !important; }
body[data-theme="velin"] .grim-inv-item.rarity-uncommon  { border-left-color: var(--rarity-uncommon) !important; }
body[data-theme="velin"] .grim-inv-item.rarity-rare      { border-left-color: var(--rarity-rare) !important; }
body[data-theme="velin"] .grim-inv-item.rarity-very-rare { border-left-color: var(--rarity-very-rare) !important; }
body[data-theme="velin"] .grim-inv-item.rarity-legendary { border-left-color: var(--rarity-legendary) !important; }

/* Badge rareté — encre foncée sur parchemin */
body[data-theme="velin"] .grim-inv-rarity {
  background: rgba(42,30,14,0.06) !important;
}
body[data-theme="velin"] .grim-inv-rarity.rarity-common    { color: var(--rarity-common) !important; }
body[data-theme="velin"] .grim-inv-rarity.rarity-uncommon  { color: var(--rarity-uncommon) !important; }
body[data-theme="velin"] .grim-inv-rarity.rarity-rare      { color: var(--rarity-rare) !important; }
body[data-theme="velin"] .grim-inv-rarity.rarity-very-rare { color: var(--rarity-very-rare) !important; }
body[data-theme="velin"] .grim-inv-rarity.rarity-legendary { color: var(--rarity-legendary) !important; }

/* Icône */
body[data-theme="velin"] .grim-inv-item-icon {
  background: #faf5e8 !important;
  border: 1px solid #c3a86a !important;
}
/* Nom — encre franche, aucune bordure */
body[data-theme="velin"] .grim-inv-item-name {
  color: #2a1e0e !important; font-weight: 700 !important;
  background: transparent !important; border: none !important;
}
body[data-theme="velin"] .grim-inv-item-qty { color: #8a6210 !important; }
body[data-theme="velin"] .grim-inv-item-desc { color: #5a3e20 !important; }
body[data-theme="velin"] .grim-inv-item-btn { color: #8a775c !important; }
body[data-theme="velin"] .grim-inv-item-btn:hover { color: #9e2b22 !important; background: rgba(158,43,34,0.1) !important; }

/* ── §7.11 audit : en Vélin, le carnet de notes a droit à plus de
   matière papier — lignes d'encre brune douce, pas de doré ── */
body[data-theme="velin"] .grim-nt-journal {
  background:
    linear-gradient(#faf5e8, #faf5e8) 0 0 / 100% 100%,
    repeating-linear-gradient(transparent, transparent calc(1.8em - 1px), rgba(90,62,32,0.10) 1.8em);
  border-color: rgba(120,90,40,0.35);
}
