/* Refonte du sac et de la fiche personnage (14/10/2026) : plus large sur ordinateur, hiérarchie claire, caractéristiques en cartes,
   grille du sac agrandie ; couleurs du thème du jeu (themes.css). Chargée après les autres feuilles : règles limitées à ces deux vues. */
#player-dialog:is([data-view=character],[data-view=inventory]){width:min(1380px,calc(100vw - 32px))!important;max-width:none!important;max-height:calc(100dvh - 28px)!important;border-radius:18px!important;overflow:hidden;box-shadow:0 30px 80px -24px #000d!important}
#player-dialog:is([data-view=character],[data-view=inventory])>header{padding:12px 18px!important;background:linear-gradient(180deg,color-mix(in srgb,var(--theme-chrome,#302714) 86%,#fff),var(--theme-chrome,#302714))!important;color:var(--theme-chrome-text,#fff0be)!important;border-bottom:2px solid var(--theme-accent,#477316)!important}:where(html[data-theme="nuit"]) #player-dialog:is([data-view=character],[data-view=inventory])>header{background:linear-gradient(180deg,color-mix(in srgb,var(--theme-chrome,#181f2c) 86%,#fff),var(--theme-chrome,#181f2c))!important}
#player-dialog:is([data-view=character],[data-view=inventory])>header h2{font:400 21px/1.2 var(--font-display,serif)!important;color:inherit!important}
#player-dialog:is([data-view=character],[data-view=inventory]) #player-dialog-content{padding:16px 18px!important}

/* ── Fiche personnage : identité | caractéristiques | statistiques ── */
#player-dialog[data-view=character] .character-layout{display:grid!important;grid-template-columns:250px minmax(0,1.45fr) minmax(290px,1fr)!important;gap:18px!important;align-items:start}
#player-dialog[data-view=character] .character-identity{position:sticky;top:0;display:grid;gap:10px;padding:16px!important;border:1px solid var(--theme-border,#b68742)!important;border-radius:16px!important;background:linear-gradient(160deg,color-mix(in srgb,var(--theme-gold,#ffd468) 24%,var(--theme-card,#fff0c7)),var(--theme-card,#fff0c7))!important;box-shadow:0 10px 26px -18px #000a}
#player-dialog[data-view=character] .identity-compact-header{display:grid!important;grid-template-columns:1fr!important;justify-items:center;text-align:center;gap:8px}
#player-dialog[data-view=character] .class-illustration{width:118px!important;height:132px!important}
#player-dialog[data-view=character] .class-illustration img:first-child{width:100%!important;height:100%!important;object-fit:contain;filter:drop-shadow(0 8px 10px #0004)}
#player-dialog[data-view=character] .identity-compact-header strong{font:400 24px/1.1 var(--font-display,serif)!important}
#player-dialog[data-view=character] .identity-class{font:800 11px var(--font-ui,sans-serif);letter-spacing:.12em;text-transform:uppercase;color:var(--theme-accent-ink,#365d0a)}
#player-dialog[data-view=character] .character-identity progress{width:100%;height:10px;border-radius:99px;overflow:hidden}
#player-dialog[data-view=character] .character-details.character-alloc{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;min-width:0}
#player-dialog[data-view=character] .attribute-disclosure{width:auto!important;border:0!important;background:none!important;padding:0!important}
#player-dialog[data-view=character] .attr-panel{padding:16px!important;border:1px solid var(--theme-border,#b68742)!important;border-radius:16px!important;background:var(--theme-card,#fff0c7)!important;width:auto!important}
#player-dialog[data-view=character] .attr-head{display:flex!important;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
#player-dialog[data-view=character] .attr-head h3{margin:0;font:400 20px/1.2 var(--font-display,serif)!important}
#player-dialog[data-view=character] .attr-head small{display:block;margin-top:3px;color:var(--theme-muted,#654824)}
#player-dialog[data-view=character] .attr-pool{display:grid!important;justify-items:center;min-width:96px;padding:8px 12px!important;border-radius:14px!important;background:var(--theme-paper,#eed69e)!important;border:1px solid var(--theme-border,#b68742)!important;font-size:11px;font-weight:800;text-align:center}
#player-dialog[data-view=character] .attr-pool b{font:800 26px/1 var(--font-ui,sans-serif)}
#player-dialog[data-view=character] .attr-pool.has-points{background:var(--theme-accent,#477316)!important;color:var(--theme-accent-text,#fff7dc)!important;border-color:transparent!important;animation:rv-pool 2.4s ease-in-out infinite}
@keyframes rv-pool{50%{box-shadow:0 0 0 5px color-mix(in srgb,var(--theme-accent,#477316) 25%,transparent)}}
#player-dialog[data-view=character] .attr-table,#player-dialog[data-view=character] .attr-table tbody{display:grid!important;gap:8px;width:100%;border:0!important}
#player-dialog[data-view=character] .attr-row{display:grid!important;grid-template-columns:40px minmax(0,1.15fr) 64px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 12px!important;border:1px solid color-mix(in srgb,var(--theme-border,#b68742) 60%,transparent)!important;border-radius:13px!important;background:var(--theme-paper,#eed69e)!important;transition:border-color .15s,box-shadow .15s}
#player-dialog[data-view=character] .attr-row>*{display:block;padding:0!important;border:0!important;background:none!important;text-align:left}
#player-dialog[data-view=character] .attr-row.is-used{border-color:var(--theme-accent,#477316)!important;box-shadow:inset 4px 0 var(--theme-accent,#477316)}
#player-dialog[data-view=character] .attr-row.is-previewing{box-shadow:0 0 0 2px var(--theme-gold,#ffd468)}
#player-dialog[data-view=character] .attr-ico img{width:34px;height:34px}
#player-dialog[data-view=character] .attr-row th{font:800 15px/1.2 var(--font-ui,sans-serif)}
#player-dialog[data-view=character] .attr-row th small{display:block;margin-top:2px;font:600 11.5px/1.3 var(--font-ui,sans-serif);color:var(--theme-muted,#654824)}
#player-dialog[data-view=character] .attr-val{text-align:center!important}
#player-dialog[data-view=character] .attr-val b{display:block;font:800 22px/1 var(--font-ui,sans-serif)}
#player-dialog[data-view=character] .attr-val small{font-size:10.5px;color:var(--theme-muted,#654824)}
#player-dialog[data-view=character] .attr-effect{font:700 12.5px/1.35 var(--font-ui,sans-serif);color:var(--theme-ink,#392711)}
#player-dialog[data-view=character] .is-previewing .attr-effect{color:var(--theme-accent-ink,#365d0a)}
#player-dialog[data-view=character] .attr-btns{display:flex!important;gap:5px;justify-content:flex-end}
#player-dialog[data-view=character] .attr-btns button{min-width:40px;min-height:36px!important;padding:0 9px!important;border-radius:10px!important;border:1px solid var(--theme-border,#b68742)!important;background:var(--theme-card,#fff0c7)!important;color:var(--theme-ink,#392711)!important;font:800 13px var(--font-ui,sans-serif)!important;cursor:pointer}
#player-dialog[data-view=character] .attr-btns button:not(:disabled):hover{border-color:var(--theme-accent,#477316)!important;background:var(--theme-accent-soft,#d6dfa0)!important}
#player-dialog[data-view=character] .attr-btns .attr-max{background:var(--theme-accent,#477316)!important;color:var(--theme-accent-text,#fff7dc)!important;border-color:transparent!important}
#player-dialog[data-view=character] .attr-btns button:disabled{opacity:.38;cursor:not-allowed}
#player-dialog[data-view=character] .attr-hint{margin:10px 2px 0;font-size:12px;color:var(--theme-muted,#654824)}
#player-dialog[data-view=character] .character-next{display:flex!important;gap:10px;align-items:center;padding:12px 14px!important;border-radius:14px!important;width:auto!important}
#player-dialog[data-view=character] .character-stats{display:grid;gap:12px;padding:16px;border:1px solid var(--theme-border,#b68742);border-radius:16px;background:var(--theme-card,#fff0c7);min-width:0}
#player-dialog[data-view=character] .character-stats-title{margin:0;font:400 20px/1.2 var(--font-display,serif)}
#player-dialog[data-view=character] .character-stats .element-stats{display:none!important}/* déjà dans « Caractéristiques » (total) */
#player-dialog[data-view=character] .character-stats .stat-chips{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
#player-dialog[data-view=character] .character-stats .stat-chips>span{display:grid!important;justify-items:center;gap:2px;padding:10px 6px!important;border-radius:13px!important}
#player-dialog[data-view=character] .character-stats .stat-chips b{font-size:22px!important}
#player-dialog[data-view=character] .character-stats .secondary-stats{width:auto!important;border-radius:13px!important}
#player-dialog[data-view=character] .stat-help-links{display:flex!important;flex-wrap:wrap;gap:6px 12px}
#player-dialog[data-view=character] #character-equipment{width:100%;min-height:44px;border-radius:12px!important}
#player-dialog[data-view=character] .stat-breakdown{margin-top:16px!important;border-radius:14px!important}

/* ── Sac : équipement | objets | fiche de l'objet ── */
#player-dialog[data-view=inventory] .bag-topline{padding:8px 12px!important;border-radius:14px;background:var(--theme-card,#fff0c7);border:1px solid color-mix(in srgb,var(--theme-border,#b68742) 60%,transparent)}
#player-dialog[data-view=inventory] .bag-tabs{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto;scrollbar-width:thin;padding:8px 0 10px!important;border:0!important}
#player-dialog[data-view=inventory] .bag-tabs button{flex:1 0 auto;min-height:36px!important;padding:0 16px!important;border-radius:999px!important;white-space:nowrap}
#player-dialog[data-view=inventory] .bag-layout{display:grid!important;grid-template-columns:260px minmax(0,1fr) 340px!important;gap:16px!important;align-items:start;min-height:0}
#player-dialog[data-view=inventory] .bag-equipment{display:grid;gap:10px;padding:12px;border:1px solid var(--theme-border,#b68742);border-radius:16px;background:linear-gradient(160deg,color-mix(in srgb,var(--theme-gold,#ffd468) 18%,var(--theme-card,#fff0c7)),var(--theme-card,#fff0c7));width:auto!important}
#player-dialog[data-view=inventory] .equip-slot{border-radius:12px!important}
#player-dialog[data-view=inventory] .bag-storage{display:grid;gap:10px;padding:12px;border:1px solid var(--theme-border,#b68742);border-radius:16px;background:var(--theme-card,#fff0c7);min-width:0;width:auto!important}
#player-dialog[data-view=inventory] .bag-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(66px,1fr))!important;gap:7px!important;padding:8px!important;border-radius:12px!important;max-height:min(60vh,560px);overflow:auto;align-content:start}
#player-dialog[data-view=inventory] .bag-cell{width:auto!important;height:auto!important;aspect-ratio:1;border-radius:12px!important;transition:transform .12s,box-shadow .12s,border-color .12s}
#player-dialog[data-view=inventory] .bag-cell:not(.empty):hover{transform:translateY(-2px);box-shadow:0 6px 14px -6px #0007;border-color:var(--theme-accent,#477316)!important}
#player-dialog[data-view=inventory] .bag-cell img{width:78%!important;height:78%!important;object-fit:contain}
#player-dialog[data-view=inventory] .bag-cell[aria-pressed=true],#player-dialog[data-view=inventory] .bag-cell.is-selected{box-shadow:0 0 0 3px var(--theme-accent,#477316)!important}
#player-dialog[data-view=inventory] .item-inspector{position:sticky;top:0;padding:16px!important;border:1px solid var(--theme-border,#b68742)!important;border-radius:16px!important;background:var(--theme-card,#fff0c7)!important;max-height:min(70vh,640px);overflow:auto;width:auto!important}
#player-dialog[data-view=inventory] .bag-footer{margin-top:12px!important;border-radius:12px}

/* ── Écrans moyens ── */
@media (max-width:1180px){
 #player-dialog[data-view=character] .character-layout{grid-template-columns:230px minmax(0,1fr)!important}
 #player-dialog[data-view=character] .character-stats{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr))}
 #player-dialog[data-view=character] .character-stats>:is(.character-stats-title,#character-equipment,.stat-help-links){grid-column:1/-1}
 #player-dialog[data-view=inventory] .bag-layout{grid-template-columns:240px minmax(0,1fr)!important}
 #player-dialog[data-view=inventory] .item-inspector{grid-column:1/-1;position:static}
}
/* ── Mobile : une colonne, répartition des points juste après l'identité ── */
@media (max-width:760px){
 #player-dialog:is([data-view=character],[data-view=inventory]){width:100vw!important;max-height:100dvh!important;border-radius:0!important}
 #player-dialog:is([data-view=character],[data-view=inventory]) #player-dialog-content{padding:12px!important}
 #player-dialog[data-view=character] .character-layout{grid-template-columns:1fr!important;gap:12px!important}
 #player-dialog[data-view=character] .character-identity{position:static;padding:12px!important}
 #player-dialog[data-view=character] .identity-compact-header{grid-template-columns:78px 1fr!important;justify-items:start;text-align:left}
 #player-dialog[data-view=character] .class-illustration{width:78px!important;height:88px!important}
 #player-dialog[data-view=character] .identity-compact-header strong{font-size:20px!important}
 #player-dialog[data-view=character] .attr-panel{padding:12px!important}
 #player-dialog[data-view=character] .attr-row{grid-template-columns:34px minmax(0,1fr) auto;row-gap:6px}
 #player-dialog[data-view=character] .attr-ico img{width:30px;height:30px}
 #player-dialog[data-view=character] .attr-effect{grid-column:2/-1;font-size:12px}
 #player-dialog[data-view=character] .attr-btns{grid-column:1/-1;justify-content:stretch}
 #player-dialog[data-view=character] .attr-btns button{flex:1}
 #player-dialog[data-view=character] .character-stats{grid-template-columns:1fr}
 #player-dialog[data-view=inventory] .bag-layout{grid-template-columns:1fr!important}
 #player-dialog[data-view=inventory] .bag-grid{grid-template-columns:repeat(auto-fill,minmax(56px,1fr))!important;max-height:none}
}
/* Corrections de cascade : anciennes règles très prioritaires (game-ui.css « html[data-theme] … ») et largeurs fixes */
html[data-theme] #player-dialog[data-view=character] .character-layout>.character-identity{grid-column:1!important;grid-row:1!important}
html[data-theme] #player-dialog[data-view=character] .character-layout>.character-alloc{grid-column:2!important;grid-row:1!important;display:flex!important;flex-direction:column!important;gap:12px!important}
html[data-theme] #player-dialog[data-view=character] .character-layout>.character-stats{grid-column:3!important;grid-row:1!important}
html[data-theme] #player-dialog[data-view=character] .character-alloc>*{grid-column:auto!important;grid-row:auto!important;margin:0!important}
html[data-theme] #player-dialog[data-view=character] .attr-row>*{width:auto!important;white-space:normal!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
html[data-theme] #player-dialog[data-view=character] .attr-row .attr-effect{display:block!important}
html[data-theme] #player-dialog[data-view=character] .attr-btns button{margin:0!important}
html[data-theme] #player-dialog[data-view=character] .attribute-disclosure>summary{display:none}
@media (max-width:1180px){html[data-theme] #player-dialog[data-view=character] .character-layout>.character-stats{grid-column:1/-1!important;grid-row:2!important}}
@media (max-width:760px){html[data-theme] #player-dialog[data-view=character] .character-layout>:is(.character-identity,.character-alloc,.character-stats){grid-column:1!important;grid-row:auto!important}html[data-theme] #player-dialog[data-view=character] .attribute-disclosure:not([open])>summary{display:flex}}
html #player-dialog[data-view=inventory] .bag-layout{align-items:start!important}
html #player-dialog[data-view=inventory] .bag-equipment{height:auto!important;max-height:none!important;overflow:visible!important}
html[data-theme] #player-dialog[data-view=character] .character-layout{grid-template-columns:240px minmax(0,1.75fr) minmax(280px,.95fr)!important}
html[data-theme] #player-dialog[data-view=character] .attr-row{grid-template-columns:38px minmax(140px,1.15fr) 52px minmax(120px,1fr) auto!important}
html[data-theme] #player-dialog[data-view=character] .attr-btns button{min-width:36px!important;padding:0 7px!important}
html #player-dialog[data-view=inventory] #player-dialog-content{overflow:auto!important;display:block!important}
html #player-dialog[data-view=inventory] .bag-layout{height:auto!important;min-height:0!important;max-height:none!important;flex:none!important;overflow:visible!important}
html #player-dialog[data-view=inventory] .bag-equipment .bag-quick{position:static!important}
html[data-theme] #player-dialog[data-view=character] .character-identity{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:none!important}
html[data-theme] #player-dialog[data-view=character] .character-identity>*{grid-column:1!important;grid-row:auto!important;width:auto!important}
html[data-theme] #player-dialog[data-view=character] .identity-compact-header>div{min-width:0;width:auto!important}
html[data-theme] #player-dialog[data-view=character] .attribute-disclosure>summary{align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:0 16px;border:1px solid var(--theme-border,#b68742);border-radius:14px;background:var(--theme-card,#fff0c7);font:800 15px var(--font-ui,sans-serif);cursor:pointer}
html[data-theme] #player-dialog[data-view=character] .attribute-disclosure>summary b{padding:3px 10px;border-radius:999px;background:var(--theme-paper,#eed69e)}
@media (max-width:760px){html[data-theme] #player-dialog[data-view=character] .identity-compact-header{grid-template-columns:78px minmax(0,1fr)!important}}
@media (max-width:760px){html #player-dialog[data-view=inventory] .bag-layout>*{width:auto!important;max-width:none!important;min-width:0!important;grid-column:1/-1!important;grid-row:auto!important}html #player-dialog[data-view=inventory] .bag-grid{grid-template-columns:repeat(auto-fill,minmax(60px,1fr))!important}}
@media (max-width:760px){html[data-theme] #player-dialog[data-view=inventory] .bag-layout{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important}html[data-theme] #player-dialog[data-view=inventory] .bag-layout>*{align-self:stretch!important;width:auto!important}}
/* largeur : la zone des caractéristiques ne déborde jamais sur la colonne Statistiques */
html[data-theme] #player-dialog[data-view=character] .character-layout{grid-template-columns:230px minmax(0,1.8fr) minmax(260px,.9fr)!important}
html[data-theme] #player-dialog[data-view=character] .character-alloc,html[data-theme] #player-dialog[data-view=character] .attr-panel{min-width:0!important;overflow:hidden}
html[data-theme] #player-dialog[data-view=character] .attr-row{grid-template-columns:34px minmax(0,1.1fr) 46px minmax(0,1fr) auto!important;gap:8px!important}
html[data-theme] #player-dialog[data-view=character] .attr-btns{gap:4px!important}
html[data-theme] #player-dialog[data-view=character] .attr-btns button{min-width:34px!important;min-height:34px!important;padding:0 6px!important;font-size:12.5px!important}
@media (max-width:1320px){html[data-theme] #player-dialog[data-view=character] .character-layout{grid-template-columns:230px minmax(0,1fr)!important}html[data-theme] #player-dialog[data-view=character] .character-layout>.character-stats{grid-column:1/-1!important;grid-row:2!important;grid-template-columns:repeat(2,minmax(0,1fr))}html[data-theme] #player-dialog[data-view=character] .character-stats>:is(.character-stats-title,#character-equipment,.stat-help-links){grid-column:1/-1}}
@media (max-width:760px){html[data-theme] #player-dialog[data-view=character] .character-layout{grid-template-columns:1fr!important}html[data-theme] #player-dialog[data-view=character] .character-layout>.character-stats{grid-template-columns:1fr}html[data-theme] #player-dialog[data-view=character] .attr-row{grid-template-columns:30px minmax(0,1fr) auto!important}}
html[data-theme] #player-dialog[data-view=character] .character-identity>*{margin:0!important}
html[data-theme] #player-dialog[data-view=character] .identity-xp{display:flex;align-items:center;gap:6px}
html[data-theme] #player-dialog[data-view=character] .secondary-summary{display:flex!important;flex-wrap:wrap;gap:8px 12px}
html[data-theme] #player-dialog[data-view=character] .secondary-summary>div{flex:1 1 30%;min-width:84px}

/* ═══ Fenêtres sac + fiche (14/10/2026) : sans voile, ouvrables ensemble, rangées côte à côte sur ordinateur ═══ */
:is(#player-dialog,#player-dialog-char)[open]:not(:modal){position:fixed!important;inset:0!important;margin:auto!important;z-index:900;height:fit-content}
:is(#player-dialog,#player-dialog-char)[open]:not(:modal).is-front{z-index:901}
#player-dialog-char{width:min(1180px,calc(100vw - 32px))!important;max-width:none!important;max-height:calc(100dvh - 28px)!important;border-radius:18px!important;overflow:hidden}
@media (min-width:1100px){
 html.pd-dual #player-dialog[open]:not(:modal){left:12px!important;right:auto!important;margin:0!important;top:14px!important;width:calc(57vw - 18px)!important}
 html.pd-dual #player-dialog-char[open]:not(:modal){right:12px!important;left:auto!important;margin:0!important;top:14px!important;width:calc(43vw - 18px)!important}
}
/* Fiche dans sa fenêtre (seule) : mêmes trois colonnes que la refonte */
html[data-theme] #player-dialog-char .character-layout{display:grid!important;grid-template-columns:230px minmax(0,1.8fr) minmax(260px,.9fr)!important;gap:18px!important;align-items:start}
@media (max-width:1320px){html[data-theme] #player-dialog-char .character-layout{grid-template-columns:230px minmax(0,1fr)!important}html[data-theme] #player-dialog-char .character-layout>.character-stats{grid-column:1/-1!important;grid-row:2!important}}
@media (max-width:760px){#player-dialog-char{width:100vw!important;max-height:100dvh!important;border-radius:0!important}html[data-theme] #player-dialog-char .character-layout{grid-template-columns:1fr!important}html[data-theme] #player-dialog-char .character-layout>*{grid-column:1!important;grid-row:auto!important}}

/* ═══ Fenêtres simplifiées : sans textes d'aide ni raccourcis vers d'autres fenêtres ═══ */
:is(#player-dialog,#player-dialog-char) :is(.character-next,.attr-hint,.stat-help-links,.bag-footer,.stat-breakdown,.stat-formulas,.identity-energy>small,.bag-quick>small,.attr-head small,.bag-quick-links){display:none!important}
/* Aperçu des statistiques au survol d'un équipement */
:is(#player-dialog,#player-dialog-char) .stat-delta{display:inline-block;margin-left:5px;padding:1px 6px;border-radius:999px;font:800 11.5px/1.3 var(--font-ui,sans-serif);font-style:normal;vertical-align:middle;animation:rv-delta .25s ease-out}
:is(#player-dialog,#player-dialog-char) .stat-delta.is-up{background:color-mix(in srgb,var(--theme-positive,#2f5e08) 18%,transparent);color:var(--theme-positive,#2f5e08)}
:is(#player-dialog,#player-dialog-char) .stat-delta.is-down{background:color-mix(in srgb,var(--theme-negative,#a33025) 16%,transparent);color:var(--theme-negative,#a33025)}
@keyframes rv-delta{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
/* Mode côte à côte : la fiche (fenêtre étroite) passe en une colonne, quelle que soit la largeur de l'écran */
@media (min-width:1100px){
 html.pd-dual[data-theme] #player-dialog-char[data-view=character]:not([data-size=m],[data-size=l]) .character-layout{grid-template-columns:minmax(0,1fr)!important}
 html.pd-dual[data-theme] #player-dialog-char[data-view=character]:not([data-size=m],[data-size=l]) .character-layout>*{grid-column:1!important;grid-row:auto!important}
 html.pd-dual[data-theme] #player-dialog-char[data-view=character] .character-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html.pd-dual[data-theme] #player-dialog-char[data-view=character] .character-stats>.character-stats-title{grid-column:1/-1}
 html.pd-dual[data-theme] #player-dialog-char[data-view=character] .character-stats .stat-chips{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 html.pd-dual[data-theme] #player-dialog-char[data-view=character] .character-stats .stat-chips>span{display:grid!important;writing-mode:horizontal-tb!important;height:auto!important}
 html.pd-dual[data-theme] #player-dialog-char[data-view=character] .attr-row{grid-template-columns:32px minmax(0,1.1fr) 44px minmax(0,1fr) auto!important}
}
/* silhouette du sac : nom et niveau déjà dans l'en-tête, pas sous les emplacements */
html[data-theme] #player-dialog[data-view=inventory] .equipment-paper .hero-portrait>:not(img):not(svg):not(canvas):not(.hero-disc){display:none!important}
:is(#player-dialog,#player-dialog-char) :is(.set-link,.gear-preset-share){min-width:30px;min-height:28px;padding:0 6px;border:1px solid var(--theme-border,#b68742);border-radius:8px;background:var(--theme-card,#fff0c7);cursor:pointer}
/* ═══ Couleurs des statistiques (élément de chaque caractéristique) et équipements rapides (14/10/2026) ═══ */
:is(#player-dialog,#player-dialog-char){--st-vitality:#c0392b;--st-wisdom:#7d4cc2;--st-strength:#8a5a22;--st-intelligence:#d9531e;--st-chance:#2b7fc4;--st-agility:#2f8f4e}
html[data-theme=brakmar] :is(#player-dialog,#player-dialog-char){--st-vitality:#ff8a7a;--st-wisdom:#c3a2ff;--st-strength:#e0b07a;--st-intelligence:#ff9a6a;--st-chance:#7cc0ff;--st-agility:#7fe0a0}
html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row:is(.attr-vitality,.attr-wisdom,.attr-strength,.attr-intelligence,.attr-chance,.attr-agility){--st:var(--st-vitality)}
html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row.attr-wisdom{--st:var(--st-wisdom)}html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row.attr-strength{--st:var(--st-strength)}html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row.attr-intelligence{--st:var(--st-intelligence)}html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row.attr-chance{--st:var(--st-chance)}html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row.attr-agility{--st:var(--st-agility)}
html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row{border-left:4px solid var(--st)!important;background:linear-gradient(90deg,color-mix(in srgb,var(--st) 10%,var(--theme-paper,#eed69e)),var(--theme-paper,#eed69e) 45%)!important}
html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row th{color:var(--st)!important}
html[data-theme] :is(#player-dialog,#player-dialog-char) .attr-row .attr-val b{color:var(--st)!important}
html[data-theme] :is(#player-dialog,#player-dialog-char) .element-stat.strength b{color:var(--st-strength)}html[data-theme] :is(#player-dialog,#player-dialog-char) .element-stat.intelligence b{color:var(--st-intelligence)}html[data-theme] :is(#player-dialog,#player-dialog-char) .element-stat.chance b{color:var(--st-chance)}html[data-theme] :is(#player-dialog,#player-dialog-char) .element-stat.agility b{color:var(--st-agility)}
/* équipements rapides : pastilles lisibles, l'actif mis en avant */
html[data-theme] #player-dialog .gear-presets{padding:10px!important;border-radius:14px!important}
html[data-theme] #player-dialog .gear-preset-row{display:flex!important;flex-wrap:wrap;gap:6px!important}
html[data-theme] #player-dialog .gear-preset{display:inline-flex!important;align-items:center;gap:2px;padding:2px!important;border:1px solid var(--theme-border,#b68742)!important;border-radius:999px!important;background:var(--theme-card,#fff0c7)!important}
html[data-theme] #player-dialog .gear-preset>button{border:0!important;background:transparent!important;min-height:30px!important;padding:0 8px!important;border-radius:999px!important;font-weight:800!important}
html[data-theme] #player-dialog .gear-preset.is-on{background:var(--theme-accent,#477316)!important;border-color:transparent!important}
html[data-theme] #player-dialog .gear-preset.is-on>button{color:var(--theme-accent-text,#fff7dc)!important}
html[data-theme] #player-dialog .gear-preset-add{border-radius:999px!important}

/* Fiche d'objet du sac : un seul défilement (la fiche), plus de listes imbriquées qui défilent chacune de leur côté et coupent le bas
   (signalement du 14/10/2026 : avec beaucoup d'exemplaires, les derniers jets étaient inatteignables). */
#player-dialog[data-view=inventory] .item-inspector .inspector-panel{overflow:visible!important;flex:none!important;max-height:none!important;height:auto!important}
#player-dialog[data-view=inventory] .item-inspector .item-jets{max-height:none!important;overflow:visible!important}
#player-dialog[data-view=inventory] .item-inspector .item-jets h4{position:static!important}

/* Mobile : la fiche d'objet suit le reste (plus collée par-dessus l'équipement) */
@media (max-width:760px){html #player-dialog[data-view=inventory] .item-inspector{position:static!important;max-height:none!important;overflow:visible!important}}

/* ═══ Sac & équipement (14/10/2026, refonte complète, remplace les passes précédentes) ═══
   Ordinateur : trois colonnes de pleine hauteur, équipement | sac | fiche de l'objet, chacune défile seule, jamais la fenêtre.
   Poupée à la DOFUS Rétro : coiffe, amulette, anneau, ceinture à gauche ; cape, arme, anneau, bottes à droite ; familier sous le personnage.
   Fenêtre étroite (côte à côte avec la fiche, ou écran moyen) : la fiche de l'objet passe sous la grille. Mobile : une colonne. */
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper{position:relative!important;display:grid!important;grid-template-columns:64px minmax(0,1fr) minmax(0,1fr) 64px!important;grid-template-rows:repeat(4,64px)!important;grid-template-areas:"coiffe portrait portrait cape" "amulette portrait portrait arme" "anneau portrait portrait anneau2" "ceinture familier bouclier bottes"!important;gap:8px!important;padding:10px!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;max-width:none!important;flex:none!important;transform:none!important;overflow:visible!important;margin:0!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .hero-portrait{grid-area:portrait!important;position:relative!important;inset:auto!important;width:auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;transform:none!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .hero-portrait :is(img,canvas){position:relative!important;inset:auto!important;z-index:1;width:auto!important;max-width:100%!important;height:100%!important;max-height:212px!important;object-fit:contain!important;transform:none!important;margin:0!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .hero-portrait .hero-disc{position:absolute!important;inset:8% 4%!important;width:auto!important;height:auto!important;border-radius:50%!important;transform:none!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .hero-portrait :is(strong,span){display:none!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot{position:relative!important;inset:auto!important;left:auto!important;top:auto!important;width:64px!important;height:64px!important;min-width:0!important;min-height:0!important;margin:0!important;transform:none!important;justify-self:center!important;align-self:center!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=coiffe]{grid-area:coiffe!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=amulette]{grid-area:amulette!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=anneau]{grid-area:anneau!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=ceinture]{grid-area:ceinture!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=cape]{grid-area:cape!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=arme]{grid-area:arme!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=anneau2]{grid-area:anneau2!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=bottes]{grid-area:bottes!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=familier]{grid-area:familier!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment .stat-chips{display:none!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment .element-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:0!important;gap:6px!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment>*{flex:none!important;margin:0!important;max-width:100%!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-cell{width:auto!important;height:auto!important;aspect-ratio:1!important;min-width:0!important}
@media (min-width:761px){
 html[data-theme] body #player-dialog[data-view=inventory][open]{display:flex!important;flex-direction:column!important;height:calc(100dvh - 28px)!important;max-height:calc(100dvh - 28px)!important;overflow:hidden!important}
 html[data-theme] body #player-dialog[data-view=inventory] #player-dialog-content{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
 html[data-theme] body #player-dialog[data-view=inventory] #player-dialog-content>*{flex:none}
 html[data-theme] body #player-dialog[data-view=inventory] #player-dialog-content>.bag-layout{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;display:grid!important;grid-template-columns:332px minmax(0,1fr) 300px!important;grid-template-rows:minmax(0,1fr)!important;grid-template-areas:"equip storage inspect"!important;gap:12px!important;align-items:stretch!important;overflow:hidden!important;margin:0!important}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout>*{position:static!important;grid-column:auto!important;grid-row:auto!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout>.bag-equipment{grid-area:equip!important;display:flex!important;flex-direction:column!important;gap:10px!important;padding:12px!important;overflow-x:hidden!important;overflow-y:auto!important;scrollbar-width:thin}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout>.bag-storage{grid-area:storage!important;display:flex!important;flex-direction:column!important;gap:8px!important;padding:12px!important;overflow:hidden!important}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout>.bag-storage>*{flex:none}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout>.bag-storage>.bag-grid{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;display:grid!important;grid-template-columns:repeat(auto-fill,minmax(62px,1fr))!important;grid-auto-rows:auto!important;align-content:start!important;gap:6px!important;padding:6px!important;scrollbar-width:thin}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout>.item-inspector{grid-area:inspect!important;overflow-x:hidden!important;overflow-y:auto!important;scrollbar-width:thin}
}
/* fenêtre étroite : équipement | sac, la fiche de l'objet sous la grille */
@media (min-width:761px) and (max-width:1180px){
 html[data-theme] body #player-dialog[data-view=inventory] #player-dialog-content>.bag-layout{grid-template-columns:304px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;grid-template-areas:"equip storage" "equip inspect"!important}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout>.item-inspector{max-height:min(300px,42vh)!important}
}
@media (min-width:1100px){
 html.pd-dual[data-theme] body #player-dialog[data-view=inventory] #player-dialog-content>.bag-layout{grid-template-columns:304px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;grid-template-areas:"equip storage" "equip inspect"!important}
 html.pd-dual[data-theme] body #player-dialog[data-view=inventory] .bag-layout>.item-inspector{max-height:min(300px,42vh)!important}
}
@media (max-width:760px){
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper{grid-template-columns:58px minmax(0,1fr) 58px!important;grid-template-rows:repeat(4,58px)!important;gap:6px!important;width:100%!important;max-width:340px!important;margin:0 auto!important}
 html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot{width:58px!important;height:58px!important}
}
/* caractéristiques sous la poupée : deux colonnes lisibles à toutes les tailles (annule les anciens placements absolus du mobile) */
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment{display:flex!important;flex-direction:column!important;gap:10px!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment .element-stats{display:grid!important;position:static!important;width:auto!important;height:auto!important;inset:auto!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment .element-stat{flex-direction:row!important;justify-content:flex-start!important;min-height:30px!important;padding:4px 8px!important;gap:6px!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment .element-stat>span{display:flex!important;flex:1!important;justify-content:space-between!important;font-size:12px!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .bag-equipment .element-stat .element-name{display:inline!important}
/* Sac : pods (poids porté / capacité) et plage des jets au double-clic sur le nom (15/10/2026) */
#player-dialog .bag-pods{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--theme-muted,#6d5a3a)}
#player-dialog .bag-pods img{width:16px;height:16px}
#player-dialog .bag-pods b{color:var(--theme-text,#3b2a14)}
#player-dialog .bag-pods i{position:relative;display:inline-block;width:70px;height:6px;border-radius:3px;background:#0000001f;overflow:hidden}
#player-dialog .bag-pods i::after{content:"";position:absolute;inset:0 auto 0 0;width:var(--pods);background:linear-gradient(90deg,#7fae3a,#c9a227);border-radius:3px}
#player-dialog .bag-pods.is-loaded b{color:#c77a12}#player-dialog .bag-pods.is-loaded i::after{background:#d9902a}#player-dialog .bag-pods.is-over b{color:#c0392b}#player-dialog .bag-pods.is-over i::after{background:#c0392b}
#player-dialog [data-range-toggle]{cursor:default;user-select:none}
#player-dialog .item-effects.is-range{background:repeating-linear-gradient(135deg,#0000 0 8px,#00000008 8px 16px)}
#player-dialog .item-range-note{margin:4px 0 0;font-size:11.5px;color:var(--theme-muted,#8a7650);text-align:center}

/* pods et kamas en bas à gauche du sac (15/10/2026) */
html #player-dialog[data-view=inventory] .bag-footer{display:flex!important;align-items:center!important;gap:12px!important;margin:8px 0 0!important;padding:0!important;border:0!important;flex:none!important}
html #player-dialog[data-view=inventory] .bag-footer>:not(.bag-wallet){display:none!important}
#player-dialog .bag-footer .bag-wallet{display:inline-flex;align-items:center;gap:16px;padding:5px 12px;border:1px solid var(--theme-border,#b68742);border-radius:10px;background:var(--theme-card,#fff8e6);font-size:13px}
#player-dialog .bag-footer .bag-wallet .kamas{display:inline-flex;align-items:center;gap:5px;font-size:13px}
#player-dialog .bag-footer .bag-wallet .kamas img{width:18px;height:18px}
#player-dialog .bag-footer .bag-status{margin-left:auto}
#player-dialog .bag-footer .bag-pods{font-size:13px;color:var(--theme-text,#3b2a14)}
#player-dialog .bag-footer .bag-pods i{width:90px;height:7px}

/* ═══ Fenêtres rétrécies (15/10/2026) : la mise en page suit la largeur de la fenêtre (data-size, draggable-ui.js), pas celle de l'écran ═══ */
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=m] .character-layout{grid-template-columns:230px minmax(0,1fr)!important}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=m] .character-layout>.character-stats{grid-column:1/-1!important;grid-row:auto!important}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=m] .character-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=m] .character-stats>.character-stats-title{grid-column:1/-1}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=s] .character-layout{grid-template-columns:minmax(0,1fr)!important}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=s] .character-layout>*{grid-column:1!important;grid-row:auto!important}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=s] .character-identity{position:static!important}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=s] .identity-compact-header{grid-template-columns:88px minmax(0,1fr)!important;justify-items:start!important;text-align:left!important}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=s] .class-illustration{width:88px!important;height:96px!important}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=s] .character-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-theme] body :is(#player-dialog-char,#player-dialog[data-view=character])[data-size=s] .character-stats>.character-stats-title{grid-column:1/-1}
html[data-theme] body #player-dialog[data-view=inventory][data-size=m] #player-dialog-content>.bag-layout{grid-template-columns:304px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;grid-template-areas:"equip storage" "equip inspect"!important}
html[data-theme] body #player-dialog[data-view=inventory][data-size=m] .bag-layout>.item-inspector{max-height:min(300px,42vh)!important}
html[data-theme] body #player-dialog[data-view=inventory][data-size=s] #player-dialog-content{overflow-y:auto!important}
html[data-theme] body #player-dialog[data-view=inventory][data-size=s] #player-dialog-content>.bag-layout{display:flex!important;flex-direction:column!important;flex:none!important;overflow:visible!important}
html[data-theme] body #player-dialog[data-view=inventory][data-size=s] .bag-layout>*{overflow:visible!important;max-height:none!important}
html[data-theme] body #player-dialog[data-view=inventory][data-size=s] .bag-layout>.bag-storage>.bag-grid{max-height:320px!important;flex:none!important}
html[data-theme] body #player-dialog[data-view=inventory][data-size=s] .bag-layout .equipment-paper{max-width:340px!important;margin:0 auto!important;width:100%!important}
html[data-theme] body #player-dialog[data-view=inventory][data-size=s] .bag-tabs{flex-wrap:wrap!important}

/* Bouclier (15/10/2026) : sous le personnage, à côté du familier */
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=bouclier]{grid-area:bouclier!important;justify-self:start!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=familier]{justify-self:end!important}

/* Dofus (16/10/2026) : deux cases sous la poupée, comme la ligne des Dofus de Rétro */
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper{grid-template-rows:repeat(5,64px)!important;grid-template-areas:"coiffe portrait portrait cape" "amulette portrait portrait arme" "anneau portrait portrait anneau2" "ceinture familier bouclier bottes" "dofus dofus2 . ."!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=dofus]{grid-area:dofus!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=dofus2]{grid-area:dofus2!important}
/* ═══ Sac : panoplies compactes + recherche, personnages en onglets au bord (17/10/2026) ═══ */
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .set-library.setlib2{display:flex!important;flex-direction:column;gap:0;padding:0 2px 8px!important;overflow:auto!important;min-height:0;flex:1 1 auto}
#player-dialog .setlib-bar{position:sticky;top:0;z-index:3;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 0 8px;margin:0 0 6px;background:#dcd5b2;border-bottom:1px solid #b9a774}
#player-dialog .setlib-search{flex:1 1 260px;display:flex;align-items:center;gap:6px;min-width:0;height:34px;padding:0 4px 0 10px;border:1px solid #b08a4a;border-radius:8px;background:#fffaf0;box-shadow:inset 0 1px 2px #0001;cursor:text}
#player-dialog .setlib-search:focus-within{border-color:#e07b10;box-shadow:0 0 0 2px #e07b1033}
#player-dialog .setlib-search>span{font-size:13px;opacity:.6}
html[data-theme] body #player-dialog#player-dialog .setlib-search input{flex:1;min-width:0;height:30px!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;outline:0;font:inherit;font-size:13px!important;color:#3b2a14}
#player-dialog .setlib-search input::-webkit-search-cancel-button{display:none}
html[data-theme] body #player-dialog#player-dialog .setlib-search input:focus{outline:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
@media (min-width:601px){html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .set-library.setlib2{min-height:min(60vh,540px)}}
html[data-theme] body #player-dialog#player-dialog .setlib-clear{flex:none;width:26px;height:26px;min-width:0!important;min-height:0!important;padding:0!important;border:0!important;border-radius:6px;background:#e6d6ae!important;color:#5a3e17!important;font-size:17px;line-height:1;cursor:pointer;box-shadow:none!important}
html[data-theme] body #player-dialog#player-dialog .setlib-clear:hover{background:#d9c28d!important}
#player-dialog .setlib-clear[hidden]{display:none}
#player-dialog .setlib-filter{display:inline-flex;border:1px solid #b08a4a;border-radius:8px;overflow:hidden;flex:none}
html[data-theme] body #player-dialog#player-dialog .setlib-filter button{min-height:0!important;height:32px;padding:0 11px!important;border:0!important;border-radius:0!important;background:#fffaf0!important;color:#5a3e17!important;font-weight:700;font-size:12px;box-shadow:none!important;cursor:pointer}
html[data-theme] body #player-dialog#player-dialog .setlib-filter button+button{border-left:1px solid #b08a4a!important}
html[data-theme] body #player-dialog#player-dialog .setlib-filter button[aria-pressed=true]{background:#e07b10!important;color:#fff!important}
#player-dialog .setlib-count{flex:none;margin-left:auto;font-size:12px;color:#7a6440;white-space:nowrap}
#player-dialog .setlib-list{display:flex;flex-direction:column;gap:4px}
#player-dialog .setlib-empty{display:flex;flex-direction:column;align-items:center;gap:2px;margin:24px 0;color:#7a6440;font-size:12px}#player-dialog .setlib-empty strong{font-size:15px;color:#4a3618}
#player-dialog .setlib-empty[hidden],#player-dialog .setrow[hidden]{display:none!important}
/* une ligne par panoplie : nom + compteur | pièces | bonus | lien chat ; paliers dépliables sur toute la largeur */
#player-dialog .setrow{display:grid;grid-template-columns:minmax(150px,210px) auto minmax(0,1fr) auto;grid-template-areas:"head pieces bonus actions" "tiers tiers tiers tiers";align-items:center;column-gap:12px;padding:4px 6px 4px 10px;border:1px solid #d8c595;border-radius:8px;background:#fbf4e1}
#player-dialog .setrow.is-started{background:#fff8e6;border-color:#c9a35a}
#player-dialog .setrow.is-active{border-color:#e07b10;box-shadow:inset 3px 0 0 #e07b10}
#player-dialog .setrow-head{grid-area:head;display:flex;flex-direction:column;gap:4px;min-width:0}
#player-dialog .setrow-name{font-size:13px;line-height:1.2;color:#3b2a14;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#player-dialog .setrow-count{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#7a6440}
#player-dialog .setrow-count i{position:relative;flex:0 0 70px;height:5px;border-radius:3px;background:#e2d3ab;overflow:hidden}
#player-dialog .setrow-count i::after{content:"";position:absolute;inset:0 auto 0 0;width:var(--p);background:#e07b10;border-radius:3px}
#player-dialog .setrow-count b{font-variant-numeric:tabular-nums;color:#5a3e17}
#player-dialog .setrow-pieces{grid-area:pieces;display:flex;flex-wrap:wrap;gap:3px}
html[data-theme] body #player-dialog#player-dialog .setrow-piece{position:relative;width:36px;height:36px;min-width:0!important;min-height:0!important;padding:1px!important;display:grid;place-items:center;border:1px solid #cdb886!important;border-radius:6px!important;background:#f3e8cb!important;box-shadow:none!important;cursor:pointer}
html[data-theme] body #player-dialog#player-dialog .setrow-piece img{width:32px!important;height:32px!important;object-fit:contain}
html[data-theme] body #player-dialog#player-dialog .setrow-piece.is-missing{background:#ece4cf!important;border-style:dashed!important;border-color:#c3b48e!important}
html[data-theme] body #player-dialog#player-dialog .setrow-piece.is-missing img{filter:grayscale(1);opacity:.42}
html[data-theme] body #player-dialog#player-dialog .setrow-piece.is-owned{border-color:#c9a35a!important;background:#fff7e0!important}
html[data-theme] body #player-dialog#player-dialog .setrow-piece.is-equipped{border-color:#e07b10!important;background:#ffe6c2!important}
html[data-theme] body #player-dialog#player-dialog .setrow-piece.is-equipped::after{content:"";position:absolute;right:2px;bottom:2px;width:7px;height:7px;border-radius:50%;background:#e07b10;box-shadow:0 0 0 1.5px #fff}
html[data-theme] body #player-dialog#player-dialog .setrow-piece:hover{border-color:#a0520a!important;transform:translateY(-1px)}
html[data-theme] body #player-dialog#player-dialog .setrow-piece:hover img{filter:none;opacity:1}
#player-dialog .setrow-bonus{grid-area:bonus;display:flex;align-items:center;gap:4px 10px;min-width:0;overflow:hidden;white-space:nowrap;font-size:12px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 18px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 18px),transparent)}
#player-dialog .setrow-bonus>*{flex:none}
#player-dialog .setrow-tag{padding:1px 7px;border-radius:999px;background:#ebdcb4;color:#6b4c1c;font-size:11px;font-weight:700}
#player-dialog .setrow-tag.is-on{background:#e07b10;color:#fff}
#player-dialog .setrow-actions{grid-area:actions;display:flex;align-items:center;gap:4px}
html[data-theme] body #player-dialog#player-dialog .setrow-more{min-height:0!important;height:26px;padding:0 9px!important;border:1px solid #c9a35a!important;border-radius:6px!important;background:#fffaf0!important;color:#6b4c1c!important;font-size:11.5px;font-weight:700;box-shadow:none!important;cursor:pointer}
html[data-theme] body #player-dialog#player-dialog .setrow-more::after{content:" ▾";font-size:10px}
html[data-theme] body #player-dialog#player-dialog .setrow-more[aria-expanded=true]{background:#f0dfb5!important;border-color:#a0520a!important}
html[data-theme] body #player-dialog#player-dialog .setrow-more[aria-expanded=true]::after{content:" ▴"}
html[data-theme] body #player-dialog#player-dialog .setrow .set-link{height:26px;min-height:0!important}
#player-dialog .setrow-tiers{grid-area:tiers;margin:5px 0 2px!important;padding:2px 0 0;border-top:1px dashed #d3bf8d!important;font-size:11.5px}
#player-dialog .setrow-tiers[hidden]{display:none!important}
#player-dialog .setrow-tiers>p{margin:4px 0!important}
#player-dialog .setrow-tiers .set-tier{grid-template-columns:70px 1fr;padding:5px 0}
/* onglets de personnages : accrochés au bord gauche, hors du cadre ; l'actif rejoint le cadre */
html[data-theme] body #player-dialog#player-dialog.rv-has-tabs:not(.rv-tabs-in)[data-view=inventory]{overflow:visible!important}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs{position:absolute;right:100%;top:72px;z-index:5;display:flex;flex-direction:column;align-items:flex-end;gap:4px;width:150px;margin:0;padding:0}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs button{position:relative;display:flex;align-items:center;gap:6px;width:136px;height:40px;min-height:0!important;margin:0!important;padding:0 8px 0 5px!important;border:1px solid #17120b!important;border-right:0!important;border-radius:10px 0 0 10px!important;background:linear-gradient(90deg,#b9a774,#a8955f)!important;background-image:linear-gradient(90deg,#b9a774,#a8955f)!important;color:#2a1e0e!important;box-shadow:-2px 2px 6px #0006,inset 0 1px 0 #ffffff40!important;text-align:left;cursor:pointer;transition:width .12s,background .12s}html[data-theme]:where([data-theme="nuit"]) body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs button{border:1px solid #0c1016!important}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs button:hover{width:142px;background-image:linear-gradient(90deg,#cdbd8a,#bfae77)!important}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs button[aria-pressed=true]{width:152px;margin-right:-2px!important;background:#ddd6b4!important;background-image:linear-gradient(90deg,#e6dfbf,#ddd6b4)!important;border-color:#17120b!important;box-shadow:-3px 3px 8px #0006!important;z-index:2}html[data-theme]:where([data-theme="nuit"]) body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs button[aria-pressed=true]{border-color:#0c1016!important}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs button[aria-pressed=true]::before{content:"";position:absolute;left:-1px;top:6px;bottom:6px;width:3px;border-radius:2px;background:#e07b10}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs img{flex:none;width:30px;height:30px;border-radius:50%;background:#fff6dc;box-shadow:0 0 0 1px #a8874f}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;font-size:12.5px}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs small{flex:none;min-width:22px;padding:1px 4px;border-radius:6px;background:#3b2a1422;font-size:10.5px;font-weight:700;text-align:center}html[data-theme]:where([data-theme="nuit"]) body #player-dialog#player-dialog[data-view=inventory] .rv-char-tabs small{background:#1b243422}
/* pas la place à gauche (fenêtre collée au bord, deux fenêtres, mobile) : rangée défilante compacte au-dessus du contenu */
html[data-theme] body #player-dialog#player-dialog[data-view=inventory].rv-tabs-in .rv-char-tabs{position:static;flex-direction:row;align-items:center;width:auto;max-width:100%;gap:4px;margin:0 0 6px;padding:0 0 2px;overflow-x:auto;scrollbar-width:thin;flex:none}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory].rv-tabs-in .rv-char-tabs button{flex:none;width:auto;max-width:132px;height:32px;padding:0 8px 0 3px!important;border:1px solid #c9a35a!important;border-radius:999px!important;background:#fffaf0!important;background-image:none!important;box-shadow:none!important;margin:0!important}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory].rv-tabs-in .rv-char-tabs button[aria-pressed=true]{width:auto;background:#e07b10!important;background-image:none!important;border-color:#a0520a!important;color:#fff!important}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory].rv-tabs-in .rv-char-tabs button[aria-pressed=true]::before{display:none}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory].rv-tabs-in .rv-char-tabs img{width:24px;height:24px}
html[data-theme] body #player-dialog#player-dialog[data-view=inventory].rv-tabs-in .rv-char-tabs small{background:#0000001a}
html[data-theme] body #player-dialog#player-dialog:not([data-view=inventory]) .rv-char-tabs{display:none}
@media (min-width:821px){#player-dialog .setrow-pieces{width:316px}}
@media (max-width:820px){#player-dialog .setrow{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"head actions" "pieces pieces" "bonus bonus" "tiers tiers";row-gap:4px}}
@media (max-width:600px){#player-dialog .setlib-bar{gap:6px}#player-dialog .setlib-search{flex-basis:100%}#player-dialog .setlib-count{margin-left:auto}#player-dialog .setrow{padding:5px 6px}html[data-theme] body #player-dialog#player-dialog .setrow-piece{width:34px;height:34px}html[data-theme] body #player-dialog#player-dialog .setrow-piece img{width:30px!important;height:30px!important}#player-dialog .setrow-bonus{white-space:normal;flex-wrap:wrap;-webkit-mask-image:none;mask-image:none}}
/* listes « Tous les types » (18/10/2026) : assez larges pour leur texte, flèche comprise */
html body #bag-type,html body .rv-bank-type{min-width:10.5em!important;width:auto!important;max-width:100%;flex:none!important;padding-right:24px!important}
