/* ===== LevelPlan 10.2 · « Chibi nocturne » =====
   Direction de la planche de référence : panneaux bleu nuit, filets dorés, titres sérif, cartes d'objets
   teintées par la rareté (gemme en coin), héros chibi dans des décors peints, compagnons en cartes.
   Chargé en dernier : affine les composants partagés sans toucher à la géométrie de l'agenda. */

/* ---------- fond de l'application : l'atelier, flouté et assombri ---------- */
:root[data-skin=cartographe][data-mode=dark] body { background: var(--bg); }
:root[data-skin=cartographe][data-mode=dark] body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% -10%, #3a4d8a33, transparent 60%), linear-gradient(180deg, #090d16cc, #090d16f0 55%, #090d16), url('../assets/ambient.jpg') center top / cover no-repeat, #090d16;
}
:root[data-skin=cartographe][data-mode=dark] .topbar { background: color-mix(in srgb, #0b101b 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
:root[data-skin=cartographe][data-mode=dark] .nav { background: color-mix(in srgb, #0b101b 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* cartes « de jeu » (inventaire, compagnons, héros) : toujours sombres, texte clair, quel que soit le thème */
:root { --gc-tx: #efe9da; --gc-tx2: #cfd4de; --gc-mu: #a6aec0; --gc-line: #2a3349; }

/* ---------- panneaux de la planche ---------- */
.panel { position: relative; margin: 12px 0 16px; padding: 12px; border-radius: 14px; border: 1px solid var(--line2); background: linear-gradient(165deg, color-mix(in srgb, var(--s2) 80%, #1a2140), var(--bg2)); box-shadow: inset 0 1px #ffffff0a, 0 14px 40px #0006; }
.panel::before { content: ''; position: absolute; inset: 3px; border-radius: 11px; border: 1px solid color-mix(in srgb, var(--ac) 14%, transparent); pointer-events: none; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; position: relative; }
.panel-h h2 { font-family: var(--font-d); font-weight: 500; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.panel-h h2::before { content: ''; width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--ac); background: color-mix(in srgb, var(--ac) 30%, transparent); flex: none; }
.panel-h .more { font-size: 12.5px; color: var(--acs); font-weight: 600; min-height: 36px; padding: 0 4px; }
.sech h2 { display: flex; align-items: center; gap: 8px; }

/* ---------- aperçu du personnage : scène + liste des emplacements ---------- */
body[data-route=hero] main { max-width: 680px; }
.hv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.hv-preview .stage { margin: 0; max-width: none; }
.hv-preview .stage .big { border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ac) 45%, var(--line2)); box-shadow: 0 0 0 3px #00000040, 0 16px 40px #0007; overflow: hidden; background: #0b0f1a; aspect-ratio: 5 / 6; }
.hv-preview .stage .big svg { display: block; width: 100%; height: 100%; }
.hv-slots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
.hslot { position: relative; display: flex; align-items: center; gap: 9px; min-height: 58px; padding: 6px 8px 6px 6px; border-radius: 10px; text-align: left; background: linear-gradient(160deg, color-mix(in srgb, var(--rc, #2a3346) 14%, #141b2b), #0c111c); border: 1px solid color-mix(in srgb, var(--rc, #3a465f) 45%, var(--line)); }
.hslot.none { --rc: #3a465f; }
.hslot .si { width: 46px; height: 46px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--rc) 28%, transparent), #0a0e18 75%); border: 1px solid color-mix(in srgb, var(--rc) 35%, #ffffff10); }
.hslot .si svg { width: 100%; height: 100%; display: block; }
.hslot .si.empty { color: var(--mu2); border-style: dashed; background: #0a0e18; }
.hslot .si.empty svg { width: 18px; height: 18px; }
.hslot .st { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hslot .st b { font-family: var(--font-d); font-weight: 500; font-size: 13.5px; color: var(--gc-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hslot .st small { font-size: 11px; color: var(--gc-mu); }
.hslot .sk { position: absolute; top: 5px; right: 8px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gc-mu); }
.hslot .ndot { position: absolute; top: 6px; left: 6px; margin: 0; }
.hv-gear { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 10px; padding: 8px 4px 0; border-top: 1px solid var(--line); position: relative; }
@media (min-width: 760px) {
  body[data-route=hero] main { max-width: 980px; }
  .hv-grid { grid-template-columns: minmax(0, 1fr) 270px; align-items: start; }
  .hv-slots { grid-template-columns: minmax(0, 1fr); }
  .hslot { min-height: 64px; }
  .hslot .si { width: 52px; height: 52px; }
  .hv-preview .stage .big { aspect-ratio: 4 / 3; }
  .hv-preview .stage .big svg { object-fit: cover; }
}
.nameplate { margin-top: 4px; }
.nameplate h1 { font-size: 30px; }
.nameplate p { color: var(--acs); }

/* ---------- rareté : nom coloré, gemme en losange ---------- */
.rn { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; color: var(--ri); }
.rn-N { --ri: #c3cad4; --rc: #a7b0bd; } .rn-R { --ri: #7fb8ff; --rc: #4a9cff; } .rn-SR { --ri: #c39bff; --rc: #a46bff; } .rn-SSR { --ri: #f3c96a; --rc: #f0b84a; } .rn-LR { --ri: #ff8098; --rc: #ff4d6d; }
.gemi { display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); flex: none; background: linear-gradient(135deg, #ffffff 0%, var(--rc) 45%, color-mix(in srgb, var(--rc) 55%, #000)); box-shadow: 0 0 5px color-mix(in srgb, var(--rc) 70%, transparent); border-radius: 1px; }
.gemc { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; transform: rotate(45deg); border-radius: 1.5px; background: linear-gradient(135deg, #ffffff 0%, var(--rc) 42%, color-mix(in srgb, var(--rc) 50%, #000)); box-shadow: 0 0 8px color-mix(in srgb, var(--rc) 80%, transparent), 0 0 0 1px #00000080; z-index: 1; }

/* ---------- cartes d'objets (inventaire) ---------- */
.inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; margin-top: 12px; }
.itm, .comp, .rs { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 9px; border-radius: 10px; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 32%, color-mix(in srgb, var(--rc) 26%, transparent), transparent 68%), linear-gradient(170deg, color-mix(in srgb, var(--rc) 16%, #131a29), #0b1019 85%);
  border: 1px solid color-mix(in srgb, var(--rc) 52%, #273049); box-shadow: inset 0 1px #ffffff12, inset 0 0 0 1px #00000040, 0 6px 16px #0006; }
.itm::after, .comp::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, #ffffff0d, transparent 30%); }
.itm .ii, .comp .cart { position: relative; width: 74px; height: 74px; border-radius: 0; background: none; overflow: visible; }
.itm .ii svg, .comp .cart svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 6px #0008); }
.itm .in { font-family: var(--font-d); font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--gc-tx); min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
.itm .lk { font-size: 10.5px; color: var(--gc-mu); line-height: 1.25; }
.itm.lock { opacity: 1; }
.itm.lock .ii svg { filter: grayscale(.85) brightness(.45) drop-shadow(0 4px 6px #0008); }
.itm.lock .in { color: var(--gc-mu); }
.lki { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #0b1019; border: 1px solid var(--line2); color: var(--mu); }
.lki svg { width: 12px !important; height: 12px !important; filter: none !important; }
.itm.eq, .comp.sel { border-color: #e2c27a; box-shadow: inset 0 0 0 1px #e2c27a, 0 0 22px #e2c27a3d, 0 6px 16px #0006; }
.eqb { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #2a1d08; background: linear-gradient(180deg, #f3dfaa, #cfa85c); box-shadow: 0 2px 6px #0006; }
.itm .tag-new, .comp .tag-new { position: absolute; top: 6px; left: 6px; z-index: 1; }
.inv.scenes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.itm.wide { padding: 8px 8px 9px; }
.itm.wide .ii { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; border: 1px solid #ffffff14; }
.itm.wide .ii svg { filter: none; }
.itm.wide.lock .ii svg { filter: grayscale(.8) brightness(.45); }
.itm.wide .in { min-height: 0; margin-top: 4px; }
.scene-svg { display: block; width: 100%; height: 100%; }
.itm:hover, .comp:hover, .hslot:hover { border-color: color-mix(in srgb, var(--rc) 80%, #ffffff30); }
.itm:focus-visible, .comp:focus-visible, .hslot:focus-visible, .charcard:focus-visible, .eqtabs button:focus-visible { outline: 2px solid var(--acs); outline-offset: 2px; }

/* onglets d'emplacement (Tête, Dos, Main, Aura, Décors) */
.eqtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px 0 10px; padding: 2px; }
.eqtabs::-webkit-scrollbar { display: none; }
.eqtabs button { position: relative; flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: 9px; color: var(--mu); font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--s1) 85%, transparent); border: 1px solid var(--line); }
.eqtabs button svg { width: 17px; height: 17px; }
.eqtabs button small { font-size: 10.5px; color: var(--mu2); font-weight: 600; }
.eqtabs button[aria-selected=true] { color: var(--tx); border-color: color-mix(in srgb, var(--ac) 70%, var(--line2)); background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 14%, var(--s2)), var(--s1)); box-shadow: inset 0 1px #ffffff12, 0 0 14px color-mix(in srgb, var(--ac) 18%, transparent); }
.eqtabs button[aria-selected=true] small { color: var(--acs); }
.eqtabs .ndot { position: absolute; top: 5px; right: 5px; margin: 0; }

/* ---------- compagnons ---------- */
.comps { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; margin-top: 10px; }
.comp { padding-top: 10px; }
.comp .cart { width: 82px; height: 82px; }
.comp b { font-family: var(--font-d); font-weight: 500; font-size: 13.5px; color: var(--gc-tx); }
.comp .rn { font-size: 10.5px; }
.comp .lvl { font-size: 10.5px; color: var(--gc-mu); margin-top: -2px; }
.comp .lk { font-size: 10.5px; color: var(--gc-mu); line-height: 1.25; }
.ethcard + .sech { margin-top: 18px; }
@media (min-width: 900px) {
  .comps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .comp { padding-top: 14px; padding-bottom: 12px; }
  .comp .cart { width: 104px; height: 104px; }
  .comp b { font-size: 15px; }
}
.cdetail .btns .btn { white-space: normal; text-align: center; line-height: 1.25; height: auto; padding-top: 8px; padding-bottom: 8px; }
.hint.top { margin: -4px 0 8px; }
.comp .act { position: absolute; top: 6px; right: 6px; left: auto; z-index: 2; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #2a1d08; background: linear-gradient(180deg, #f3dfaa, #cfa85c); box-shadow: 0 2px 6px #0006; }
.comp .act svg { width: 13px; height: 13px; }
.comp.sel .gemc, .comp:has(.act) .gemc { display: none; }
.comp.lock .cart svg { filter: brightness(0) drop-shadow(0 0 1px #7f8bb0) opacity(.75); }
.comp.lock b { color: var(--gc-mu); }
.cdetail { margin-top: 14px; border-radius: 14px; background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--rc, var(--ac)) 18%, transparent), transparent 60%), linear-gradient(170deg, var(--s2), var(--bg2)); border: 1px solid color-mix(in srgb, var(--rc, var(--line2)) 45%, var(--line2)); }
.cdetail .cbig { width: min(100%, 260px) !important; border-radius: 12px !important; border: 1px solid color-mix(in srgb, var(--rc, #3a465f) 40%, #ffffff14) !important; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--rc, #4a9cff) 22%, #141b2b), #0a0e18 80%) !important; }
.cdetail.lockd .cbig svg { filter: brightness(0) drop-shadow(0 0 1px #7f8bb0) opacity(.7); }
.evo .ev span { border-radius: 10px; background: radial-gradient(ellipse at 50% 40%, #1d2740, #0b1019); border: 1px solid var(--line); }
.evo .ev.cur span { border-color: #e2c27a; box-shadow: 0 0 14px #e2c27a33; }
.evo .ev.no span svg { filter: brightness(0) drop-shadow(0 0 1px #7f8bb0) opacity(.7); }
.pet-svg.locked { filter: none; }

/* ---------- évolution du héros (tenues de rang) ---------- */
.evostrip { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.evs { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; scroll-snap-align: center; padding: 0; background: none; border: 0; color: inherit; font: inherit; }
button.evs { cursor: pointer; }
button.evs:focus-visible .ev-art { outline: 2px solid var(--acs); outline-offset: 2px; }
.evs .ev-art { width: 96px; height: 116px; border-radius: 10px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #26304e, #0b1019 80%); border: 1px solid var(--line); }
.evs .ev-art svg { width: 100%; height: 100%; display: block; }
.evs b { font-family: var(--font-d); font-weight: 500; font-size: 12px; line-height: 1.2; min-height: 2.4em; }
.evs small { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--mu); }
.evs small .rank { padding: 0; background: none; } .evs small .rank i { width: 17px; height: 17px; font-size: 10px; }
.evs.cur .ev-art { border-color: #e2c27a; box-shadow: 0 0 16px #e2c27a40; }
.evs.lock .ev-art svg { filter: saturate(.25) brightness(.55); }
.evs.lock b { color: var(--mu); }
.evstrip .evarrow, .evostrip .evarrow { color: var(--mu2); flex: none; }
.evostrip .evarrow svg { width: 14px; height: 14px; }
@media (min-width: 900px) {
  .evostrip { overflow: visible; gap: 6px; }
  .evs { flex: 1 1 0; min-width: 0; }
  .evs .ev-art { width: 100%; max-width: 140px; height: auto; aspect-ratio: 5 / 6; }
}

/* ---------- système de raretés (codex) ---------- */
.rarsys { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.rs { padding: 14px 5px 9px; gap: 3px; }
.rs .ii { width: 100%; max-width: 74px; aspect-ratio: 1; }
.rs .ii svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 6px #0008); }
.rs b { font-family: var(--font-d); font-weight: 500; font-size: 13px; }
.rs small { font-size: 10px; color: var(--gc-mu); line-height: 1.25; min-height: 2.5em; }
.rs .odd { font-size: 10.5px; color: var(--gc-tx2); }
@media (max-width: 520px) { .rarsys { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- choix du héros (onboarding, apparence) ---------- */
.charpick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 6px; }
.charcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 8px 12px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #2a3456, transparent 70%), linear-gradient(175deg, #182036, #0b1019); border: 1px solid var(--line2); box-shadow: inset 0 1px #ffffff12, 0 8px 20px #0006; }
.charcard .pv { width: 100%; max-width: 170px; }
.charcard .pv svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 10px #0008); }
.charcard .sym { position: absolute; top: 8px; left: 10px; font-size: 20px; line-height: 1; color: var(--gc-mu); }
.charcard b { margin-top: -4px; padding: 5px 16px; border-radius: 99px; font-family: var(--font-d); font-weight: 500; font-size: 14.5px; color: var(--gc-tx); background: #0b1019d9; border: 1px solid #3a465f; }
.charcard[aria-checked=true] { border-color: #e2c27a; box-shadow: inset 0 0 0 1px #e2c27a, 0 0 28px #e2c27a33, 0 8px 20px #0006; }
.charcard[aria-checked=true] .sym { color: #e2c27a; }
.charcard[aria-checked=true] b { border-color: #e2c27a; }
.hairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.hairs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 4px 7px; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: var(--gc-tx2); background: linear-gradient(175deg, #161e31, #0b1019); border: 1px solid var(--line); }
.hairs .hpv { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #2a3456, #0b1019 80%); }
.hairs .hpv svg { width: 100%; height: 100%; display: block; }
.hairs button[aria-checked=true] { color: var(--gc-tx); border-color: #e2c27a; box-shadow: inset 0 0 0 1px #e2c27a; }
.creator > .pv { border-radius: 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ac) 40%, var(--line2)); background: #0b0f1a; }
.creator > .pv svg { display: block; width: 100%; height: auto; }
.starters { gap: 8px; }
.starter { position: relative; gap: 2px; padding: 10px 6px; border-radius: 10px; background: radial-gradient(ellipse at 50% 30%, #2a3456, transparent 70%), linear-gradient(175deg, #182036, #0b1019); border: 1px solid var(--line2); }
.starter svg { width: 76px; height: 76px; }
.starter b { font-family: var(--font-d); font-weight: 500; color: var(--gc-tx); }
.starter span { font-size: 11px; color: var(--gc-tx2); }
.starter small { font-size: 10.5px; color: var(--gc-mu); }
.starter[aria-checked=true] { border-color: #e2c27a; box-shadow: inset 0 0 0 1px #e2c27a, 0 0 18px #e2c27a33; }

/* ---------- coffres et récompenses ---------- */
.chest-svg { filter: drop-shadow(0 6px 10px #0007); }
.chestbar .cbi { width: 54px; height: 54px; }
.lootone .ii, .loot .li .ii, .cmpic { background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--rc, #4a9cff) 28%, transparent), #0a0e18 75%); border-radius: 10px; }
.rw-art, .cmppv svg { border-radius: 12px; }
.cmppv svg { border-color: color-mix(in srgb, var(--ac) 35%, var(--line2)); }

/* ---------- accueil : le décor équipé, le héros et son compagnon dans l'en-tête ---------- */
.dayhead { border-color: color-mix(in srgb, var(--ac) 45%, #3a3020); }
.dayhead::after { content: ''; position: absolute; inset: 4px; border-radius: 9px; border: 1px solid #d2ad6826; pointer-events: none; }
.dayhead.withhero { min-height: 236px; }
.dayhead.withhero::before { background: linear-gradient(90deg, #080d15f2 0%, #080d15b8 42%, #080d1520 75%), linear-gradient(0deg, #080d15d9, transparent 55%); }
.dayhead .dh-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: 62% 45%; }
.dayhead .dh-hero { position: absolute; right: 2%; bottom: -4px; height: 104%; aspect-ratio: 5 / 6; padding: 0; border: 0; background: none; z-index: 0; }
.dayhead .dh-hero svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 10px 14px #000a); }
.dayhead.withhero .greet, .dayhead.withhero .pagetitle { position: relative; z-index: 1; }
.dayhead.withhero .day-emblem { z-index: 1; }
.dayhead.withhero .pagetitle { max-width: 58%; text-shadow: 0 2px 12px #000c; }
.dayhead.withhero .greet { text-shadow: 0 1px 8px #000c; }
@media (min-width: 800px) { .dayhead.withhero { min-height: 270px; } .dayhead .dh-hero { right: 6%; } }
@media (max-width: 400px) { .dayhead.withhero .pagetitle { max-width: 56%; } .dayhead .dh-hero { right: -2%; height: 100%; } }

/* ---------- animations discrètes du héros (scène principale uniquement) ---------- */
@keyframes lp-tw { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes lp-flut { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.94); } }
@keyframes lp-flick { 0%, 100% { opacity: .85; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.08); } }
@keyframes lp-rise { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-18px); opacity: 0; } }
@keyframes lp-fall { 0% { transform: translateY(-8px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes lp-spin { to { transform: rotate(360deg); } }
@keyframes lp-sway { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes lp-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }
.hero-svg .lp-tw, .hero-svg .lp-float, .hero-svg .lp-flut, .hero-svg .lp-flick, .hero-svg .lp-rise, .hero-svg .lp-fall, .hero-svg .lp-spin, .hero-svg .lp-sway,
.pet-svg .lp-tw, .pet-svg .lp-float, .pet-svg .lp-flut, .pet-svg .lp-flick, .pet-svg .lp-rise, .pet-svg .lp-spin, .chest-svg .lp-tw { transform-box: fill-box; transform-origin: center; }
.lp-anim .lp-tw, .cdetail .pet-svg .lp-tw, .rw-art .lp-tw, .chestbox .lp-tw { animation: lp-tw 2.4s ease-in-out infinite; }
.lp-anim .lp-float, .cdetail .pet-svg .lp-float { animation: lp-float 3s ease-in-out infinite; }
.lp-anim .lp-flut, .cdetail .pet-svg .lp-flut, .rw-art .lp-flut { animation: lp-flut 2.6s ease-in-out infinite; transform-origin: center bottom; }
.lp-anim .lp-flick, .cdetail .pet-svg .lp-flick { animation: lp-flick 1.2s ease-in-out infinite; transform-origin: center bottom; }
.lp-anim .lp-rise, .cdetail .pet-svg .lp-rise { animation: lp-rise 3.2s ease-out infinite; }
.lp-anim .lp-fall { animation: lp-fall 3.6s ease-in infinite; }
.lp-anim .lp-spin, .cdetail .pet-svg .lp-spin { animation: lp-spin 24s linear infinite; }
.lp-anim .lp-sway { animation: lp-sway 6s ease-in-out infinite; }
.lp-anim .lp-pet { animation: lp-breathe 3.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .hero-svg *, .pet-svg *, .chest-svg * { animation: none !important; } }
:root[data-motion=reduced] .hero-svg *, :root[data-motion=reduced] .pet-svg *, :root[data-motion=reduced] .chest-svg * { animation: none !important; }

/* ---------- petites largeurs ---------- */
@media (max-width: 400px) {
  .inv { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .inv.scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .itm .ii { width: 64px; height: 64px; }
  .itm .in { font-size: 12px; }
  .comps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .comp .cart { width: 70px; height: 70px; }
  .hslot .st b { font-size: 12.5px; }
  .hslot .sk { display: none; }
  .eqtabs button { padding: 0 9px; font-size: 12px; }
  .eqtabs button small { display: none; }
  .hairs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
}

/* thème clair : les cartes de jeu restent sombres (comme une vitrine), le reste suit le thème */
:root[data-mode=light] .rn { color: var(--ri); }
:root[data-mode=light] .panel { background: linear-gradient(165deg, var(--s1), var(--s2)); }
:root[data-mode=light] .evs .ev-art, :root[data-mode=light] .hairs .hpv { background: radial-gradient(ellipse at 50% 30%, #2a3456, #0b1019 80%); }
:root[data-mode=light] .eqtabs button { background: var(--s1); }

/* listes (feuille d'emplacement…) : puces de rareté et de stats en ligne, pas en colonne */
.item .tx .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; white-space: normal; overflow: visible; }
.item .tx .chips > span, .item .tx .rar, .item .tx .stc { display: inline-flex; margin-top: 0; overflow: visible; }
.item .ic { background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--rc, #4a9cff) 26%, transparent), #0a0e18 75%); border: 1px solid color-mix(in srgb, var(--rc, #3a465f) 35%, #ffffff10); }
