/* Retrofus Ascension — local layer, loaded after the client's own stylesheets (injected by server/patches.js). */

/* ============================================================================================================================ */
/* Theme "Nuit" : a neutral dark palette (graphite and blue-grey), next to Rétro / Bonta / Brâkmar.                                */
/* The client themes are pure CSS variables (themes.css), so a theme is a variable block + the few rules scoped to Brâkmar.         */
/* ============================================================================================================================ */
html[data-theme="nuit"]{
 --theme-bg:#10141b;--theme-paper:#1a2130;--theme-paper-deep:#131925;--theme-card:#222c3f;--theme-ink:#e8edf6;--theme-muted:#a8b5c9;--theme-border:#3c4f6c;
 --theme-accent:#3e78c4;--theme-accent-ink:#a3cbff;--theme-accent-hover:#4d89d8;--theme-accent-text:#f4f8ff;--theme-accent-soft:#25395a;--theme-gold:#e8c46a;--theme-gold-ink:#f0cf80;
 --theme-chrome:#0c1017;--theme-chrome-2:#18212f;--theme-chrome-text:#e9eff9;--theme-chrome-muted:#9aabc3;--theme-chrome-line:#435a7a;--theme-positive:#92d49e;--theme-negative:#ff9f94;
 --theme-hp-bg:#46282b;--theme-hp-ink:#ffb5a9;--theme-mana-bg:#1e3850;--theme-mana-ink:#9fd1f6;--theme-damage-bg:#443d25;--theme-damage-ink:#f1d98c;--theme-hero-rgb:12,16,23;
}
html[data-theme="nuit"]{--window-chrome:#161e2b;--window-chrome-2:#202b3d;--window-text:#e6ecf6;--window-muted:#a5b3c7;--window-line:#4a6286;--window-accent:#e0bd68;--window-paper:var(--theme-paper);--window-paper-deep:var(--theme-paper-deep);--window-ink:var(--theme-ink)}
html[data-theme="nuit"] :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="nuit"] :is(.rv-name-row input,.rv-confirm input){background:var(--theme-card);color:var(--theme-ink)}
.theme-swatch-nuit{background:conic-gradient(#3e78c4 0deg 140deg,#e8c46a 140deg 220deg,#1a2130 220deg 360deg)}

/* ============================================================================================================================ */
/* Interface sizes (ui-scale.js zooms the HUD blocks with CSS `zoom`). The upstream layout stacks the blocks with fixed offsets, so a few */
/* of them were left out of the zoom or placed from screen coordinates: buttons off their row, panels on top of each other.            */
/* ============================================================================================================================ */
/* Blocks that sat outside the zoom list: they scale with their neighbours so the stacks keep their order. */
html:not([data-ui-size="m"]) :is(#rv-onb-chip,#polls-fab,#support-open.support-chip){zoom:var(--ui-zoom);max-width:calc(100vw / var(--ui-zoom))!important}
/* The Groupe window did not follow the interface size at all (its button did): same zoom, and it stays inside the screen. */
html:not([data-ui-size="m"]) #multiplayer-panel{zoom:var(--ui-zoom);max-width:calc(100vw / var(--ui-zoom) - 24px)!important}
@media (min-width:761px){
 #multiplayer-panel{max-height:min(560px,calc((var(--rv-dock-top,100dvh) - 10px) / var(--ui-zoom) - 178px))!important}
 /* right column, top to bottom: account bar · Auto/Cases/Radio · Groupe · Paliers (the "Paliers" chip used to cover the Groupe button) */
 #support-open.support-chip{top:178px}
 /* left column: the party frame (under the title blocks) must not sit under the "Premiers pas" chip */
 body:has(#rv-onb-chip:not([hidden])) #rv-teamframe{top:296px}
}

/* Minimap frozen: the same size and the same place (bottom-right, 168 px above the bottom so that it clears the dock at the largest interface size) whatever
   the interface size or the window; not zoomed with the interface, not draggable (patches.js), never hidden or shrunk (local.js). */
@media (min-width:761px){
html body #mobile-map-panel#mobile-map-panel{zoom:1!important;max-width:none!important;max-height:none!important;position:fixed!important;right:12px!important;bottom:168px!important;left:auto!important;top:auto!important;transform:none!important;margin:0!important}
}

/* ---- Nuit: windows whose upstream styles assume a light parchment (cream panels, dark text) ----------------------------------------- */
html[data-theme="nuit"]{--nuit-panel:#222c3f;--nuit-panel-2:#2a354a;--nuit-ink:#e8edf6;--nuit-dim:#a9b6c9;--nuit-line:#3c4f6c}
/* bag */
html[data-theme="nuit"] .gear-presets small{color:#dbe4f2!important}
html[data-theme="nuit"] .resource-purpose,html[data-theme="nuit"] .inspector-consume{background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .resource-purpose :is(strong,b){color:var(--nuit-ink)!important}
html[data-theme="nuit"] .bag-pods,html[data-theme="nuit"] .bag-pods span{color:#e3d4ac!important}
/* character */
html[data-theme="nuit"] :is(.attr-cost,th small b){color:#a6dc8f!important}
/* jobs / resources */
html[data-theme="nuit"] .rv-job .rv-resources li{background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .rv-job .rv-resources li :is(b,span){color:var(--nuit-ink)!important}
html[data-theme="nuit"] .rv-job .rv-resources li small{color:var(--nuit-dim)!important}
/* guild window */
html[data-theme="nuit"] #guild-window{background:#1a2130!important;color:var(--nuit-ink)}
html[data-theme="nuit"] #guild-window :is(h2,h3,p,b,small,label,li,dt,dd){color:inherit}
html[data-theme="nuit"] #guild-window .gw-head,html[data-theme="nuit"] #guild-window .gw-hero{background:#141b28!important}
html[data-theme="nuit"] #guild-window :is(.gw-tabs button:not(.is-on),.gw-recruit,.gw-bar){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #guild-window .gw-primary{color:#fff!important}
/* market, shop, community */
html[data-theme="nuit"] :is(.hdv-intro,#community-dialog p,#community-dialog i){color:var(--nuit-dim)!important}
html[data-theme="nuit"] .shop-bar-earn a{color:#f0cf80!important}
/* codex & bestiary */
html[data-theme="nuit"] .cx-tabs button span{color:var(--nuit-ink)!important}
html[data-theme="nuit"] :is(.cx-window,.bs-window) :is(small,.cx-placeholder p,.bs-placeholder p){color:var(--nuit-dim)!important}
html[data-theme="nuit"] .bs-archi{color:#cfa8ff!important}
html[data-theme="nuit"] .bs-boss{color:#ff9d8a!important}
/* leaderboard */
html[data-theme="nuit"] .lb-filters button:not(.is-on){background:var(--nuit-panel-2)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .lb-podium :is(.lb-step,.lb-step *){color:var(--nuit-ink)!important}
html[data-theme="nuit"] .lb-podium .lb-score,html[data-theme="nuit"] .lb-podium .lb-score em{color:#f0cf80!important}
html[data-theme="nuit"] :is(.lb-note,.lb-xp){color:var(--nuit-dim)!important}
/* key bindings, patch notes, account menu, feedback */
html[data-theme="nuit"] .kb-auto{background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .kb-auto :is(b,small,span){color:var(--nuit-ink)!important}
html[data-theme="nuit"] .kb-cap{background:#41506a!important;color:#f2f5fb!important}
html[data-theme="nuit"] .kb-reset{color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #patchnotes :is(.pn-head h3,.tag-amelioration span,.tag-nouveau span,.tag-correctif span){color:var(--nuit-ink)!important}
html[data-theme="nuit"] #patchnotes .pn-when span{color:var(--nuit-dim)!important}
html[data-theme="nuit"] #mobile-menu-sheet .account-manage{background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .fb-status.is-error p{color:#ff9d8c!important}
/* ---- Nuit: second pass (found with server/local/_lab/scan.js: text/background contrast < 2.6 in every window) ------------------------ */
html[data-theme="nuit"] .rv-resources li i{color:#a6dc8f!important}
html[data-theme="nuit"] #guild-window :is(.gw-table-wrap,.gw-table-wrap table,.gw-table-wrap tr,.gw-table-wrap td,.gw-table-wrap th){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #guild-window :is(.gw-recruit,.gw-members,.gw-card,.gw-panel,.gw-box){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] .shop-bar-earn{color:#f0cf80!important}
html[data-theme="nuit"] .cx-tabs button{background:var(--nuit-panel-2)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .cx-tabs button.is-on{background:#e8780c!important}
html[data-theme="nuit"] .cx-tabs button small{color:#fff!important}
html[data-theme="nuit"] .account-manage{background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .kb-row .kb-cap{background:#41506a!important;color:#f2f5fb!important;border-color:#5b6d8c!important}
html[data-theme="nuit"] .kb-actions .kb-reset{color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #patchnotes :is(.pn-card,.pn-content){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] #patchnotes :is(.pn-head h3,.pn-when span,li span){color:var(--nuit-ink)!important}
html[data-theme="nuit"] #patchnotes .pn-content li{background:color-mix(in srgb,var(--pn-c,#2f6a8f) 22%,var(--nuit-panel-2))!important}
html[data-theme="nuit"] #patchnotes .pn-card.is-latest .pn-content{background:var(--nuit-panel-2)!important}
/* console MJ */
html[data-theme="nuit"] #admin-panel :is(.admin-card,.admin-stat){background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #admin-panel :is(.admin-card,.admin-stat) :is(.admin-hint,span,small,p,h4){color:var(--nuit-dim)!important}
html[data-theme="nuit"] #admin-panel .admin-stat b{color:#f0cf80!important}
html[data-theme="nuit"] #admin-panel .admin-section-caption strong{color:var(--nuit-ink)!important}
/* third pass: rules that need an id to win against the upstream skin */
html[data-theme="nuit"]{--theme-surface:#2a354a}
html[data-theme="brakmar"]{--theme-surface:#3a2a2e}   /* the account menu used a cream fallback (#e5dfc4) when the theme did not define it */
html[data-theme="nuit"] #astrub-shop .shop-bar-earn{color:#f0cf80!important}
html[data-theme="nuit"] #keybinds-dialog :is(.kb-cap,.kb-reset){color:#f2f5fb!important}
html[data-theme="nuit"] #keybinds-dialog .kb-cap{background:#41506a!important}
html[data-theme="nuit"] #codex-dialog .cx-tabs button small{color:#fff!important}
html[data-theme="nuit"] #account-control #account-logout,html[data-theme="nuit"] #account-logout{color:#ff9d8c!important}

/* ============================================================================================================================ */
/* Account menu: « Gérer mon compte Retrofus Ascension » is a link, written in blue (lighter on the dark themes).                   */
/* ============================================================================================================================ */
html[data-theme] #account-control #account-actions>a.account-manage{color:#1b64c9!important;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
html[data-theme="nuit"] #account-control #account-actions>a.account-manage,html[data-theme="brakmar"] #account-control #account-actions>a.account-manage{color:#7dbcff!important}
html[data-theme] #account-control #account-actions>a.account-manage:hover{filter:brightness(1.15)}

/* ---- Nuit, pass 4: parchment surfaces that stayed cream (found with _lab/scan.js › __sweepLight) --------------------------------- */
html[data-theme="nuit"] :is(.book-ranks-wrap,.book-ranks-wrap table,.book-ranks-wrap tr,.book-ranks-wrap td,.book-ranks-wrap th,.gw-none,.gw-pref,.hdv-diritem,.lb-filters,.lb-list li,.cc-stats>div){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] :is(.cx-search,.bs-search,.bs-zone,.bs-race,.report-body select,.report-body textarea,.report-body input,.fb-body select,.fb-body textarea,.fb-body input,.polls-body input,.polls-body textarea){background:#121927!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] :is(.fb-seg button,.polls-tabs button,.ns-tabs button,.shop-tabs button,.kb-reset,.report-window>footer button,.lb-kinds button,.lb-sorts button,.lb-classes button):not(.is-on):not([aria-pressed="true"]):not([aria-selected="true"]):not(.is-active){background:var(--nuit-panel-2)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important;box-shadow:none!important}
html[data-theme="nuit"] .quick-tile{background:linear-gradient(180deg,#27334b,#1d2740)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .quick-tile :is(b,strong,span,small,p){color:inherit!important}
html[data-theme="nuit"] .lb-step{background:linear-gradient(180deg,#2a3650,#1c2538)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .lb-face-full{background:linear-gradient(180deg,#34415c,#222c40)!important}
html[data-theme="nuit"] .rv-name-preview{background:linear-gradient(180deg,#2a3650,#1c2538)!important}
html[data-theme="nuit"] .shop-bar-earn{background:linear-gradient(180deg,#27334b,#1d2740)!important}
html[data-theme="nuit"] body :is(#keybinds-dialog .kb-actions .kb-reset,#report-dialog .report-window>footer button:not(.primary),.ns-hero .rv-name-preview){background-image:none!important;background-color:var(--nuit-panel-2)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] .gw-none h4,html[data-theme="nuit"] .lb-val b{color:#f0cf80!important}
html[data-theme="nuit"] .gw-none .gw-line em{color:var(--nuit-dim)!important}
html[data-theme="nuit"] body #report-dialog .report-window>footer button{background-image:none!important;background-color:var(--nuit-panel-2)!important;color:var(--nuit-ink)!important}
/* bag (sets, quick sets, pets) and the fight result table */
html[data-theme="nuit"] :is(.bag-set,.bag-quick,.bag-pets-open){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] :is(.bag-set,.bag-quick,.bag-pets-open) :is(b,strong,span,small,p,h4){color:inherit!important}
html[data-theme="nuit"] #rv-fight-result .tc-v2{background:linear-gradient(180deg,#1f2a40,#151d2e)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] #rv-fight-result :is(.rt-table,.rt-table tr,.rt-table td,.rt-table th,.rt-name,.rt-num,.rt-xp,.rt-items){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #rv-fight-result :is(.rt-table th,.rt-head,thead td){background:#2d3a55!important;color:#f0cf80!important}
html[data-theme="nuit"] #rv-fight-result .tc-sub{color:var(--nuit-dim)!important}
/* bottom dock (shown on a cream parchment at some window sizes) */
html[data-theme="nuit"] #spell-dock.glass{background:linear-gradient(180deg,#1d2740,#121a2b)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important;box-shadow:0 -4px 22px #0008!important}
html[data-theme="nuit"] #spell-dock :is(#class-name,#label,.xp-label,small,span,label,b){color:var(--nuit-ink)}
html[data-theme="nuit"] #dock-portrait{background:linear-gradient(180deg,#34415c,#222c40)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] body #spell-dock#spell-dock.glass{background:linear-gradient(180deg,#1d2740,#121a2b)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important;box-shadow:0 -4px 22px #0008!important}
html[data-theme="nuit"] body #spell-dock#spell-dock :is(#class-name,#label,.xp-label,small,span,label,b,strong,em){color:var(--nuit-ink)}
html[data-theme="nuit"] body #dock-portrait#dock-portrait{background:linear-gradient(180deg,#34415c,#222c40)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] body #weekend-chip#weekend-chip:not(.active){background:#222c3f!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #rv-afk#rv-afk>button{background:#2a354a!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .ytv-sites .ytv-site b,html[data-theme="nuit"] .ytv-sec li>b{color:#f0cf80}
html[data-theme="nuit"] body #spell-dock #player-strip#player-strip>button{background:linear-gradient(180deg,#34415c,#222c40)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #spell-dock #player-strip#player-strip>button:hover{background:linear-gradient(180deg,#42537a,#2c3955)!important}
html[data-theme="nuit"] body #spell-dock #player-strip#player-strip>button :is(span,b,small,strong){color:var(--nuit-ink)!important}
html[data-theme="nuit"] .quick-item{background:#2a354a;border-color:var(--nuit-line);color:var(--nuit-ink)}
/* chat / social panel */
html[data-theme="nuit"] #retroverse-chat{--chat-paper:#1d2638;--chat-well:#2a354a;--chat-frame:#3c4f6c;--chat-ink:#e8edf6;--chat-dim:#a9b6c9;--ch-general:#e8edf6;--ch-group:#6fd3de;--ch-guild:#d2a8f2;--ch-private:#8db6ff;--ch-trade:#e6b982;--ch-info:#93d884;--ch-system:#f0a04a;--ch-error:#ff8f80;color:var(--chat-ink)}
html[data-theme="nuit"] #retroverse-chat #chat-panel{background:#141b29f2;border-color:var(--nuit-line)}
html[data-theme="nuit"] #retroverse-chat #chat-panel .chat-tabs{background:#182033}
html[data-theme="nuit"] #retroverse-chat #chat-panel .chat-tabs button{background:linear-gradient(#2b3750,#222c40)!important;color:var(--nuit-ink)!important;box-shadow:inset 0 1px #ffffff12!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel .chat-tabs button:hover{background:linear-gradient(#35446a,#2a3652)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel .chat-tabs button[aria-selected=true]{background:var(--chat-well)!important;color:#fff!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel :is(#chat-options,.chat-opt-sec,.chat-opt-row,.chat-opt-switch,.chat-compose,.social-tabs,.social-search,.trade-side){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel :is(input,select,textarea){background:#161e2d!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel :is(.chat-empty strong,.chat-empty p,.chat-opt-head b,.chat-opt-sec h4,.social-section-heading h3,.social-check span,.social-empty p,details>summary span){color:var(--nuit-ink)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel :is(.chat-opt-sec h4 small,.chat-opt-colors small,.social-eyebrow,.social-online-count,.chat-compose-hint){color:var(--nuit-dim)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel :is(.social-tabs button,.social-search button,#chat-clear,.chat-opt-link,.cj-seg button,.cj-opt){background:linear-gradient(#2b3750,#222c40)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel .social-tabs button[aria-selected=true],html[data-theme="nuit"] #retroverse-chat #chat-panel .social-tabs button.is-on{background:linear-gradient(#e0bd68,#c79a3c)!important;color:#241a08!important}
/* trade window */
html[data-theme="nuit"] #trade-window{background:#1a2130!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #trade-window :is(.trade-side,.trade-kamas,.trade-status,.trade-bag){background:var(--nuit-panel)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #trade-window :is(input,.trade-search){background:#161e2d!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #trade-window .trade-cancel{background:linear-gradient(#2b3750,#222c40)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] #trade-window :is(h2,h3,h4,b,strong,small,span,p,label){color:inherit}
/* multiplayer panel search */
html[data-theme="nuit"] #multiplayer-panel .mp-search input{background:#161e2d!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel .social-tabs button.is-active{background:linear-gradient(#e0bd68,#c79a3c)!important;color:#241a08!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel .social-tabs button>span{color:inherit!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel :is(#social-search,#social-friend-sort,.chat-font-btn){background:#161e2d!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] #retroverse-chat #chat-panel .chat-opt-help{color:#f0cf80!important}
html[data-theme="nuit"] #chat-options :is([data-chat-size],[data-chat-lines]):not([aria-checked=true]):not([aria-pressed=true]){background:#161e2d!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
/* account page (compte.html): the « Gérer mon compte » button is a blue link as well */
html[data-theme] .portal-actions a.portal-button[data-auth-route="profile"]{background:transparent!important;box-shadow:none!important;color:#1b64c9!important;text-decoration:underline;text-underline-offset:3px;border-color:#1b64c9!important}
html[data-theme="nuit"] .portal-actions a.portal-button[data-auth-route="profile"],html[data-theme="brakmar"] .portal-actions a.portal-button[data-auth-route="profile"]{color:#7dbcff!important;border-color:#4f8fd8!important;background:#ffffff0a!important}
html[data-theme="nuit"] :is(.portal-notice,.portal-badge){background:var(--nuit-panel-2)!important;color:#f0cf80!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] .portal-notice :is(b,strong,a,span){color:inherit!important}
/* ---- home / account / legal pages (premium.css paints them cream) -------------------------------------------------------------- */
html[data-theme="nuit"] body.account-page,html[data-theme="nuit"] body.lp{background:radial-gradient(1100px 500px at 50% -8%,#27344d 0,transparent 60%),#10141b!important}
html[data-theme="nuit"] .account-page .portal-card,html[data-theme="nuit"] .lp-features li,html[data-theme="nuit"] .lp-step-list li{background:linear-gradient(180deg,#2a354a,#222c3f 55%)!important;border-color:var(--nuit-line)!important;box-shadow:inset 0 1px #ffffff12,0 14px 32px #0006!important;color:var(--nuit-ink)}
html[data-theme="nuit"] .account-page .portal-card :is(h2,h3,strong,label,b){color:var(--nuit-ink)}
html[data-theme="nuit"] .account-page .portal-intro h1{background:linear-gradient(180deg,#fff0c9,#e0bd68)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important}
html[data-theme="nuit"] .account-page .portal-notice{background:linear-gradient(90deg,#2a354a,#222c3f)!important;color:#f0cf80!important}
html[data-theme="nuit"] .account-page .portal-badge{background:var(--nuit-panel-2)!important;color:#f0cf80!important}
html[data-theme="nuit"] .lp-features img{background:radial-gradient(circle at 35% 30%,#3a4a6a,#222c3f)!important;box-shadow:0 0 0 3px #2a354a,0 6px 14px #0006!important}
html[data-theme="nuit"] .lp-features li :is(h3,b,strong){color:var(--nuit-ink)}
html[data-theme="nuit"] .lp-features li p,html[data-theme="nuit"] .lp-step-list li p{color:var(--nuit-dim)}
html[data-theme="nuit"] .lp-step-list li :is(h3,b,strong){color:var(--nuit-ink)}

/* ---- Six Dofus slots: two rows under the doll (server/patches.js › DOFUS_SLOTS) ------------------------------------------------ */
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper{grid-template-rows:repeat(6,64px)!important;grid-template-areas:"coiffe portrait portrait cape" "amulette portrait portrait arme" "anneau portrait portrait anneau2" "ceinture familier bouclier bottes" "dofus dofus2 dofus3 dofus4" ". dofus5 dofus6 ."!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=dofus3]{grid-area:dofus3!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=dofus4]{grid-area:dofus4!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=dofus5]{grid-area:dofus5!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=dofus6]{grid-area:dofus6!important}
/* bag: equipment column + quick sets (their gradient is a color-mix, invisible to the scan helper) */
html[data-theme="nuit"] body #player-dialog .bag-equipment{background:linear-gradient(160deg,#27334b,#1a2233)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] body #player-dialog .gear-presets{background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}

/* ---- Tab « Émotes » of the chat (server/local/emotes.js) -------------------------------------------------------------------------- */
#chat-panel #chat-emotes{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:6px;padding:8px 9px 10px;overflow:auto}
#chat-panel #chat-emotes[hidden]{display:none!important}
#chat-emotes .emote-hint{margin:0;font:600 11px/1.35 Verdana,Tahoma,sans-serif;color:var(--chat-dim,#5a523e)}
#chat-emotes .emote-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:6px}
#chat-emotes .emote-btn{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:1px;min-height:64px;padding:5px 3px 4px;border:1px solid var(--chat-frame,#5b5242);border-radius:6px;background:var(--chat-well,#f1ecd2);color:var(--chat-ink,#1b1710);font:700 11px/1.15 Verdana,Tahoma,sans-serif;text-align:center;cursor:pointer;transition:transform .12s,box-shadow .12s,background .12s}
#chat-emotes .emote-btn:hover,#chat-emotes .emote-btn:focus-visible{transform:translateY(-1px);box-shadow:0 3px 10px #0004;background:color-mix(in srgb,var(--chat-well,#f1ecd2) 80%,#e8780c)}
#chat-emotes .emote-btn:active{transform:translateY(0) scale(.97)}
#chat-emotes .emote-ico{font-size:22px;line-height:26px;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
#chat-emotes .emote-name{display:block;font-size:10.5px}
#chat-emotes .emote-btn small{font-size:9.5px;font-weight:600;color:var(--chat-dim,#5a523e)}
#chat-emotes .emote-btn.is-locked{opacity:.45;filter:grayscale(.8);cursor:not-allowed}
#chat-emotes .emote-btn.is-locked:hover{transform:none;box-shadow:none}
html[data-theme="nuit"] #chat-emotes .emote-btn:hover,html[data-theme="nuit"] #chat-emotes .emote-btn:focus-visible{background:#35446a}
.speech-bubble p{font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",inherit,sans-serif}

/* ---- « Apparence » slot (Obvijevans): last row of the equipment grid, right-hand corner, golden frame ---------------------------------- */
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper{grid-template-rows:repeat(6,64px)!important;grid-template-areas:"coiffe portrait portrait cape" "amulette portrait portrait arme" "anneau portrait portrait anneau2" "ceinture familier bouclier bottes" "dofus dofus2 dofus3 dofus4" "dofus5 dofus6 . apparence"!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=apparence]{grid-area:apparence!important;border-color:#d9a93a!important;box-shadow:0 0 0 1px #d9a93a55,inset 0 0 12px #d9a93a22!important}
html[data-theme] body #player-dialog[data-view=inventory] .bag-layout .equipment-paper .equip-slot[data-slot=apparence] small{color:#e8c870!important}
/* item sheet: list of effects */
html[data-theme="nuit"] body #player-dialog .item-effects{background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #player-dialog .item-effects :is(span,b,small,li,p){color:inherit}
html[data-theme="nuit"] body #player-dialog .item-effects .item-bonus-other:not(.is-malus)>span{color:#e3d4ac!important}
html[data-theme="nuit"] body #player-dialog .bag-sets .bag-set>em{color:#f0cf80!important}
html[data-theme="nuit"] body #player-dialog .item-inspector :is(.inspector-main,.inspector-panel) span>b{color:#9fe08a}
html[data-theme="nuit"] body #player-dialog .item-inspector div>span>b{color:#9fe08a!important}

/* ---- Nuit: what was brown upstream (gold/brown chips, headers, team frame, Compagnons window) → navy and steel ------------------------- */
html[data-theme="nuit"]{--nuit-chip:linear-gradient(180deg,#36486e,#28344d 60%,#1c2538);--nuit-chip-line:#6f89ba;--nuit-head:linear-gradient(180deg,#2f3f5f,#202b42);--nuit-deep:#141b2a;--nuit-glass:#18213099;--theme-damage-bg:#2f3b57;--theme-damage-ink:#f1d98c}
/* floating chips and buttons around the map */
html[data-theme="nuit"] body :is(#feedback-fab,#polls-fab,#leaderboard-fab,#community-chip){background:var(--nuit-chip)!important;border-color:var(--nuit-chip-line)!important;color:var(--nuit-ink)!important;box-shadow:0 4px 14px #0008,inset 0 1px 0 #ffffff26!important}
html[data-theme="nuit"] body :is(#feedback-fab,#polls-fab,#leaderboard-fab,#community-chip) :is(b,span){color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #polls-fab .polls-badge{box-shadow:0 0 0 2px #1c2538}
html[data-theme="nuit"] body #support-open.support-chip{background:radial-gradient(120% 140% at 0% 0%,#3d527e,#27334b 55%,#1a2234)!important;border-color:#8fa6d2!important}
html[data-theme="nuit"] body #support-open.support-chip .sc-text small{color:#b8c7e2}
html[data-theme="nuit"] body #rv-realm-live#rv-realm-live#rv-realm-live{background:#18213ae6!important;border-color:#5a76a8!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #rv-ping{background:#141b2ae0;border-color:#4d628a}
/* party frame */
html[data-theme="nuit"] body #rv-teamframe{background:#18213aee;border-color:#5a76a8;color:var(--nuit-ink)}
html[data-theme="nuit"] body #rv-teamframe .tf-head{background:#ffffff12;border-bottom-color:#ffffff1f}
html[data-theme="nuit"] body #rv-teamframe .tf-head>b,html[data-theme="nuit"] body #rv-teamframe .tf-head span b,html[data-theme="nuit"] body #rv-teamframe li.is-me span b{color:#cfe0ff}
html[data-theme="nuit"] body #rv-teamframe li.is-me{background:#5a8ae033}
html[data-theme="nuit"] body #rv-teamframe li.is-me .tf-face{border-color:#8fb2ee}
/* header bands of the small windows */
html[data-theme="nuit"] body :is(#feedback-dialog .fb-head,#polls-dialog>header,#leaderboard-dialog .lb-window>header,#companions-dialog .cp-window>header){background:var(--nuit-head)!important;border-bottom-color:#5a8ae0!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body :is(#feedback-dialog .fb-head,#polls-dialog>header,#leaderboard-dialog .lb-window>header,#companions-dialog .cp-window>header) :is(h2,h3,p){color:var(--nuit-ink)!important}
html[data-theme="nuit"] body :is(#feedback-dialog .fb-close,#companions-dialog .cp-close){background:#18213a!important;border-color:#6f89ba!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #feedback-dialog .fb-seg{border-color:var(--nuit-line)}
html[data-theme="nuit"] body #feedback-dialog .fb-seg button{background:var(--nuit-panel-2);color:var(--nuit-ink);border-right-color:var(--nuit-line)}
html[data-theme="nuit"] body #feedback-dialog .fb-seg button[aria-pressed=true]{background:#3e78c4;color:#fff}
/* shop balance bar, character level chips, power chip */
html[data-theme="nuit"] body #shop-content .shop-bar{background:linear-gradient(90deg,#33466b,#202b42)!important;border-color:#6f89ba!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #shop-content .shop-bar [data-shop-sync]{border-color:#6f89ba;background:#0003;color:var(--nuit-ink)}
html[data-theme="nuit"] body #monster-badges .monster-lvl{background:#1b2740!important;border-color:#5a76a8!important;color:#e8edf6!important}
html[data-theme="nuit"] body .character-stats .stat-chips .stat-power{background:#2f3b57!important;border-color:#52688f!important}
html[data-theme="nuit"] body .character-stats .stat-chips .stat-power b{color:#f1d98c!important}
/* Compagnons window */
html[data-theme="nuit"] body #companions-dialog .cp-team{background:linear-gradient(135deg,#2f4268,#1d2740)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #companions-dialog .cp-team .cp-life small{color:var(--nuit-dim)}
html[data-theme="nuit"] body #companions-dialog :is(.cp-face,.cpq-cta-faces img){background:#141b2a!important;border-color:#6f89ba}
html[data-theme="nuit"] body #companions-dialog .cpq-cta-go{background:#141b2a!important;color:#cfe0ff!important}
html[data-theme="nuit"] body #companions-dialog .cp-window>footer{background:var(--nuit-panel)!important;border-top-color:var(--nuit-line)!important}
html[data-theme="nuit"] body #companions-dialog :is(.cp-card,.cpq-class,.cpq-chip>button:first-child,.cpq-color,.cpq-progress li,.cpq-full){background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #companions-dialog .cp-card.is-on{background:#2a3a5c!important;border-color:#5a8ae0!important;box-shadow:0 0 0 2px #5a8ae033}
html[data-theme="nuit"] body #companions-dialog .cp-take small,html[data-theme="nuit"] body #companions-dialog .cp-note{color:var(--nuit-dim)!important}
html[data-theme="nuit"] body #companions-dialog .cp-take input{accent-color:#5a8ae0}
html[data-theme="nuit"] body #companions-dialog .cp-card .cp-tag{background:#ffffff1c;color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cp-card.is-on .cp-tag{background:#3e78c4;color:#fff}
html[data-theme="nuit"] body #companions-dialog .cp-modes button{background:var(--nuit-panel-2);border-color:var(--nuit-line);color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cp-modes button[aria-checked="true"]{background:linear-gradient(180deg,#4a8ae0,#2f64b4);border-color:#7fb0f4;color:#fff}
html[data-theme="nuit"] body #companions-dialog .cp-spells li{background:var(--nuit-panel-2)}
html[data-theme="nuit"] body #companions-dialog .cp-train{border-top-color:var(--nuit-line)}
html[data-theme="nuit"] body #companions-dialog .cp-train>summary{color:#9fc3ff}
html[data-theme="nuit"] body #companions-dialog .cp-train h4{color:var(--nuit-dim)}
html[data-theme="nuit"] body #companions-dialog .cp-train :is(summary,h4) small{color:#92d49e}
html[data-theme="nuit"] body #companions-dialog .cp-train li{background:var(--nuit-panel-2);border-color:var(--nuit-line);color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cp-train li small{color:var(--nuit-dim)}
html[data-theme="nuit"] body #companions-dialog .cp-train li button{background:linear-gradient(#5b97ea,#2f64b4)!important;color:#fff!important;border-color:#86b4f2!important}
html[data-theme="nuit"] body #companions-dialog .cp-train li button:disabled{background:#2a354a!important;color:#6f7f99!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] body #companions-dialog .cp-train-actions button:not(.cp-train-apply){background:var(--nuit-panel-2)!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] body #companions-dialog .cp-train-apply{background:linear-gradient(#5b97ea,#2f64b4)!important;border-color:#86b4f2!important}
html[data-theme="nuit"] body #companions-dialog .cp-side .cp-intro{opacity:1;color:var(--nuit-dim)}
/* Compagnons: the character builder (« Créer des compagnons ») */
html[data-theme="nuit"] body #companions-dialog .cpq-step>h3{color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cpq-step>h3>span{background:linear-gradient(180deg,#5b97ea,#2f64b4)}
html[data-theme="nuit"] body #companions-dialog .cpq-step>h3>small{background:#141b2a;color:#cfe0ff}
html[data-theme="nuit"] body #companions-dialog :is(.cpq-teams button,.cpq-name button,.cpq-color-actions button,.cpq-sex button,.cpq-back){background:var(--nuit-panel-2)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #companions-dialog .cpq-teams button:hover{background:#34466a!important;border-color:#6f89ba!important}
html[data-theme="nuit"] body #companions-dialog .cpq-team-faces img{border-color:#6f89ba;background:#141b2a}
html[data-theme="nuit"] body #companions-dialog .cpq-class:hover{border-color:#6f89ba!important}
html[data-theme="nuit"] body #companions-dialog :is(.cpq-class.is-on,.cpq-chip.is-on>button:first-child){background:#2a3a5c!important;border-color:#5a8ae0!important;box-shadow:0 0 0 2px #5a8ae044}
html[data-theme="nuit"] body #companions-dialog .cpq-class img{background:#141b2a;border-color:#52688f}
html[data-theme="nuit"] body #companions-dialog .cpq-class em{background:#3e78c4}
html[data-theme="nuit"] body #companions-dialog :is(.cpq-chip-text small,.cpq-label,.cpq-hint,.cpq-color span,.cpq-progress li small){color:var(--nuit-dim)}
html[data-theme="nuit"] body #companions-dialog .cpq-hint.is-error{color:#ff9f94}
html[data-theme="nuit"] body #companions-dialog .cpq-chip-x{background:#ffffff1a;color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cpq-editor{background:linear-gradient(180deg,#222c3f,#1b2435);border-color:var(--nuit-line)}
html[data-theme="nuit"] body #companions-dialog .cpq-stage{background:radial-gradient(70% 60% at 50% 70%,#4a5f88 0%,#2d3b57 60%,#1d2638 100%);border-color:#52688f;box-shadow:inset 0 0 0 1px #ffffff1a,inset 0 -18px 30px #0a0f1a55}
html[data-theme="nuit"] body #companions-dialog .cpq-stage-label{background:linear-gradient(0deg,#0c1220e6,#0c122000);color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog :is(.cpq-turn,.cpq-step-btn){background:#18213aeb;border-color:#6f89ba;color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cpq-name input{background:#141b2a;border-color:var(--nuit-line);color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cpq-name input:focus{outline-color:#5a8ae0;border-color:#5a8ae0}
html[data-theme="nuit"] body #companions-dialog .cpq-sex button[aria-checked="true"]{background:linear-gradient(180deg,#4a8ae0,#2f64b4)!important;border-color:#7fb0f4!important;color:#fff!important}
html[data-theme="nuit"] body #companions-dialog .cpq-color-actions button:first-child{background:linear-gradient(180deg,#3a4d73,#27334b)!important;border-color:#6f89ba!important;color:#dbe8ff!important}
html[data-theme="nuit"] body #companions-dialog .cpq-color input{border-color:#6f89ba}
html[data-theme="nuit"] body #companions-dialog .cpq-color button{color:var(--nuit-dim)}
html[data-theme="nuit"] body #companions-dialog .cpq-palettes button{border-color:#222c3f;box-shadow:0 0 0 1px #6f89ba,0 2px 5px #0006}
html[data-theme="nuit"] body #companions-dialog .cpq-palettes button.is-on{box-shadow:0 0 0 2px #5a8ae0,0 0 0 4px #8fb2ee88}
html[data-theme="nuit"] body #companions-dialog .cpq-join{color:var(--nuit-ink)}
html[data-theme="nuit"] body #companions-dialog .cpq-join input{accent-color:#5a8ae0}
html[data-theme="nuit"] body #companions-dialog .cpq-progress li.is-ok{border-color:#3f8a52!important;background:#1f3a2b!important}
html[data-theme="nuit"] body #companions-dialog .cpq-progress li.is-ok>i{background:#3f8a52}
html[data-theme="nuit"] body #companions-dialog .cpq-chip.is-bad>button:first-child{border-color:#ff7a6c!important}
/* ping, AFK banner, radio header, day/night menu */
html[data-theme="nuit"] body :is(#rv-ping,#rv-afk){background:linear-gradient(180deg,#2d3c5a,#18213a)!important;border-color:#5a76a8!important;color:var(--nuit-ink)!important;box-shadow:0 3px 10px #0007,inset 0 1px 0 #ffffff1f!important}
html[data-theme="nuit"] body #rv-afk b{color:#cfe0ff}
html[data-theme="nuit"] body #rv-radio header{background:var(--nuit-head)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #rv-radio header button{color:var(--nuit-ink);background:#ffffff1a}
html[data-theme="nuit"] body #rv-radio{background:var(--nuit-panel)!important;border-color:#5a76a8!important}
html[data-theme="nuit"] body #rv-daynight{background:linear-gradient(#2a3652,#1a2234);border-color:#5a76a8;color:var(--nuit-ink)}
html[data-theme="nuit"] body #rv-daynight b{color:#cfe0ff}
html[data-theme="nuit"] body #rv-daynight button{color:var(--nuit-ink)}
html[data-theme="nuit"] body #rv-daynight button[aria-checked="true"]{background:#3e78c4}

/* ---- Radio: nothing moves when the title changes, and the volume slider stays inside the panel ------------------------------------------ */
html #radio-toggle{box-sizing:border-box;width:112px;min-width:112px;max-width:112px;justify-content:center;overflow:visible}
html #radio-toggle .rv-radio-label{max-width:64px}
html #rv-radio{box-sizing:border-box;overflow:hidden}
html #rv-radio .rv-radio-controls{flex-wrap:nowrap;gap:5px}
html #rv-radio .rv-radio-controls button{min-width:32px;flex:none}
html #rv-radio .rv-radio-volume{flex:1 1 auto;min-width:0;margin-left:auto;justify-content:flex-end}
html #rv-radio .rv-radio-volume input{width:100%;min-width:34px;max-width:72px}
html #rv-radio .rv-radio-now b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html #rv-radio .rv-radio-list{overscroll-behavior:contain}

/* ---- Nuit: the auction house window (parchment and brown headers upstream) ----------------------------------------------------------- */
html[data-theme="nuit"] body #player-market{background:#1b2436;color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .market-heading{background:var(--nuit-head);border-bottom-color:#5a8ae0;color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .market-heading h2{color:var(--nuit-ink)}
html[data-theme="nuit"] body #market-close{background:#18213a;border-color:#6f89ba;color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .hdv-tabs{background:#141b2a;border-bottom-color:#5a76a8}
html[data-theme="nuit"] body #player-market .hdv-tabs button{border-color:#4d628a!important;background-color:#222c3f!important;color:var(--nuit-dim)!important}
html[data-theme="nuit"] body #player-market .hdv-tabs button.is-on{background-color:#2c3a56!important;color:var(--nuit-ink)!important;box-shadow:inset 0 2px 0 #5a8ae0!important}
html[data-theme="nuit"] body #player-market :is(.hdv-col,.hdv-diritem){background:var(--nuit-panel);border-color:var(--nuit-line)}
html[data-theme="nuit"] body #player-market .hdv-coltitle{background:linear-gradient(180deg,#34466b,#26324d);color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .hdv-table th{background:#33466b;color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .hdv-table td{border-bottom-color:#ffffff12}
html[data-theme="nuit"] body #player-market .hdv-table tbody tr:nth-child(even) td{background:#ffffff08}
html[data-theme="nuit"] body #player-market .hdv-table tbody tr[data-item]:hover td{background:#2e3d5c}
html[data-theme="nuit"] body #player-market .hdv-table tbody tr.is-on td{background:#35508a!important}
html[data-theme="nuit"] body #player-market .hdv-search{background:var(--nuit-panel)}
html[data-theme="nuit"] body #player-market :is(.hdv-search input,.hdv-field input[type=number]){background:#141b2a;border-color:var(--nuit-line);color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market :is(.hdv-empty,.hdv-foot,.hdv-mine tr.is-elsewhere td,.hdv-drop.is-empty .hdv-dropzone){color:var(--nuit-dim)}
html[data-theme="nuit"] body #player-market :is(.hdv-namecell small,.hdv-effcell,.hdv-facts small){color:#92d49e}
html[data-theme="nuit"] body #player-market .hdv-effects .is-other{color:#c3a2ff}
html[data-theme="nuit"] body #player-market .hdv-facts a{color:#9fc3ff}
html[data-theme="nuit"] body #player-market .hdv-msg{background:var(--nuit-panel-2);border-color:var(--nuit-line);color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .hdv-msg.is-error{background:#46282b;border-color:#c97b6a;color:#ffb5a9}
html[data-theme="nuit"] body #player-market :is(.hdv-legacy,.hdv-confirm){background:#2a354a;border-color:#5a8ae0;color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .hdv-buybar{background:#222c3f}
html[data-theme="nuit"] body #player-market .hdv-lotcell{border-left-color:#ffffff12}
html[data-theme="nuit"] body #player-market .hdv-lotcell:hover:not(.is-none):not(.is-off){background:#2e3d5c!important;box-shadow:inset 0 0 0 1px #5a8ae0}
html[data-theme="nuit"] body #player-market .hdv-lotcell.is-on{background:#3e78c4!important;box-shadow:inset 0 0 0 1px #8fb2ee;color:#fff}
html[data-theme="nuit"] body #player-market .hdv-lotcell.is-none{color:#ffffff55}
html[data-theme="nuit"] body #player-market .hdv-oddlot{background:#ffffff12;color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .hdv-oddlot.is-on{background:#3e78c4;color:#fff}
html[data-theme="nuit"] body #player-market .hdv-type{color:var(--nuit-ink)!important;border-bottom-color:#ffffff12!important}
html[data-theme="nuit"] body #player-market .hdv-type:hover{background-color:#2e3d5c!important}
html[data-theme="nuit"] body #player-market .hdv-type.is-on{background-color:#35508a!important;color:#fff!important}
html[data-theme="nuit"] body #player-market .hdv-type b{background:#4d628a}
html[data-theme="nuit"] body #player-market :is(.hdv-x,.hdv-bagcell,.hdv-mine button,.hdv-confirm button:not(.hdv-primary)){background-color:#2a354a!important;color:var(--nuit-ink)!important;border-color:var(--nuit-line)!important}
html[data-theme="nuit"] body #player-market .hdv-bagcell b{background:#0c1220d9;color:#e8edf6!important}
html[data-theme="nuit"] body #player-market .hdv-drop.is-empty .hdv-dropzone{border-color:#6f89ba80}
html[data-theme="nuit"] body #player-market .hdv-drop.is-over{background:#2e3d5c;box-shadow:inset 0 0 0 3px #5a8ae0}
html[data-theme="nuit"] body #player-market .hdv-lotpick label{background:#2a354a;border-color:var(--nuit-line);color:var(--nuit-ink)}
html[data-theme="nuit"] body #player-market .hdv-lotpick label.is-on{background:#3e78c4;color:#fff}
html[data-theme="nuit"] body #player-market .hdv-lotpick input{accent-color:#5a8ae0}
html[data-theme="nuit"] body #player-market .hdv-diritem button{border-color:#6f89ba;background:#3e78c4}

/* ---- « Smileys » and « Émotes » buttons next to « Groupe » (hud-menus.js) and their windows ------------------------------------------------------------ */
.rv-hud-btn{position:fixed;top:126px;right:300px;z-index:7;display:flex;align-items:center;gap:7px;border:1px solid var(--theme-chrome-line);border-radius:10px;background:var(--theme-chrome);color:var(--theme-chrome-text);padding:8px 12px;min-height:44px;box-shadow:0 4px 15px #0002;font:700 14px/1.2 var(--font-ui,"Nunito Sans",sans-serif);cursor:pointer;transition:opacity .2s ease}
.rv-hud-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7}
html:not([data-ui-size="m"]) .rv-hud-btn{zoom:var(--ui-zoom)}
html body:not(.in-battle) .rv-hud-btn:not(:hover):not(:focus-visible){opacity:.5}
html body.in-battle .rv-hud-btn{display:none}
/* phones (same query as the mobile interface: portrait ≤ 600 px, landscape ≤ 500 px high): icon-only buttons the size of « Groupe », on its left, above the chips of the top row
   (hud-menus.js measures « Groupe » into --rv-btn and keeps the chips clear of the two buttons with --rv-hud-extra) */
@media (max-width:600px),(max-width:1000px) and (max-height:500px){
  html body .rv-hud-btn{display:inline-flex;justify-content:center;width:var(--rv-btn,40px);height:var(--rv-btn,40px);min-width:0;min-height:0;padding:0;gap:0;border-radius:11px;font-size:0;z-index:60;box-shadow:0 2px 8px #0006;opacity:.92}
  html body:not(.in-battle) .rv-hud-btn:not(:hover):not(:focus-visible){opacity:.92}
  html body .rv-hud-btn span{display:none}
  html body .rv-hud-btn svg{width:22px;height:22px}
  html body:not(.in-battle) #rv-top-stack#rv-top-stack{right:calc(var(--m2-col,50px) + var(--rv-hud-extra,0px))!important}
  html body dialog.rv-hud-dialog{zoom:1!important;width:min(560px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
  .rv-hud-dialog>header{padding:6px 10px}
  .rv-hud-hint{padding:6px 10px 0;font-size:11.5px}
  .rv-smiley-grid,.rv-emote-grid{gap:6px;padding:8px 10px 10px}
  .rv-smiley-grid{grid-template-columns:repeat(auto-fill,minmax(72px,1fr))}
  .rv-emote-grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}
  .rv-smiley-btn img{width:38px;height:38px}
}
.rv-hud-dialog{width:min(560px,calc(100vw - 32px));max-height:min(640px,calc(100dvh - 48px));padding:0;border:1px solid var(--theme-chrome-line);border-radius:14px;background:var(--theme-paper,#fbf3df);color:var(--theme-ink,#2b2216);box-shadow:0 18px 50px #000a;overflow:hidden}
.rv-hud-dialog[open]{display:flex;flex-direction:column}
.rv-hud-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;background:linear-gradient(180deg,var(--theme-chrome-2),var(--theme-chrome));color:var(--theme-chrome-text);border-bottom:2px solid var(--theme-accent,#e8780c);cursor:grab}
.rv-hud-dialog h2{margin:0;font:400 18px/1.2 var(--font-display,"Bree Serif",serif)}
.rv-hud-close{width:30px;height:30px;border-radius:8px;border:1px solid var(--theme-chrome-line);background:#0003;color:inherit;font-size:14px;cursor:pointer}
.rv-hud-hint{margin:0;padding:9px 14px 0;font-size:12.5px;color:var(--theme-muted,#6b6148)}
.rv-smiley-grid,.rv-emote-grid{display:grid;gap:8px;padding:12px 14px 14px;overflow:auto}
.rv-smiley-grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr))}
.rv-emote-grid{grid-template-columns:repeat(auto-fill,minmax(118px,1fr))}
.rv-smiley-btn,.rv-emote-btn{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:3px;padding:7px 4px 6px;border:1px solid var(--theme-border,#9b9271);border-radius:10px;background:var(--theme-card,#ebe5c9);color:inherit;font:700 11.5px/1.2 var(--font-ui,"Nunito Sans",sans-serif);text-align:center;cursor:pointer;transition:transform .12s,box-shadow .12s,background .12s}
.rv-smiley-btn:hover,.rv-emote-btn:hover,.rv-smiley-btn:focus-visible,.rv-emote-btn:focus-visible{transform:translateY(-1px);box-shadow:0 4px 12px #0005;background:var(--theme-accent-soft,#f3d79a)}
.rv-smiley-btn:active,.rv-emote-btn:active{transform:scale(.96)}
.rv-smiley-btn img{width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 2px 2px #0004)}
.rv-emote-ico{font-size:26px;line-height:30px;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
.rv-emote-btn small{font-weight:600;font-size:10.5px;opacity:.7}
.rv-emote-btn.is-locked{opacity:.45;filter:grayscale(.8);cursor:not-allowed}
.rv-emote-btn.is-locked:hover{transform:none;box-shadow:none}
.speech-bubble p.is-smiley{display:block;overflow:visible;border:0;padding:0}
.speech-bubble p.is-smiley:not(:last-child){display:none}
.speech-bubble .speech-smiley{display:block;width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 2px 3px #0007);animation:rv-smiley-pop .28s cubic-bezier(.2,1.6,.4,1)}
.speech-bubble:has(>p.is-smiley:only-child){background:transparent;border:0;box-shadow:none;padding:0}
.speech-bubble:has(>p.is-smiley:only-child)::after{display:none}
@keyframes rv-smiley-pop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}

/* ---- « Choix du personnage » : the logo of the game replaces the old emblem (ui-assets/select/retroverse-crest.webp, tools/crest.js), a bit larger so that its name can be read ---- */
#rv-chars .rv-lx-brand>img{width:62px;height:auto;max-height:64px;margin:-8px -6px -8px -4px;object-fit:contain;filter:drop-shadow(0 2px 4px #000a)}

/* ---- bottom bar (computer layout): larger, with the tools « Émotes, Smileys, Sorts, Bugs & idées, Classement, Sondages » (hud-dock.js) ---------------------------------------------------- */
#rv-dock-tools{display:none}
@media (min-width:1001px) and (min-height:560px){
  html body #spell-dock#spell-dock{zoom:calc(var(--ui-zoom,1) * var(--rv-dock-f,1))!important}
  html[data-theme] body #spell-dock#spell-dock{grid-template-columns:56px 200px 64px auto auto auto auto repeat(3,38px) repeat(4,38px)!important}
  html body:not(.in-battle) #spell-dock #rv-dock-tools{display:contents}
  html body:not(.in-battle) #spell-dock .rv-dock-btn{position:relative;display:grid;place-items:center;width:38px;height:100%;min-width:0;min-height:0;margin:0;padding:0;box-sizing:border-box;border:1px solid #a8956a;border-radius:8px;background:linear-gradient(180deg,#fffaf0,#eadfbf);color:#3b3326;box-shadow:0 1px 0 #fff inset,0 1px 2px #0003;cursor:pointer}
  html body:not(.in-battle) #spell-dock .rv-dock-btn:hover{background:linear-gradient(180deg,#fff,#f3e3b8);border-color:#e8780c}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[hidden]{display:none}
  html body:not(.in-battle) #spell-dock .rv-dock-btn svg{width:23px;height:23px;display:block}
  html body:not(.in-battle) #spell-dock .rv-dock-btn .rv-dock-lbl{display:none}
  /* 7 tools on 2 rows (21/10/2026 : « Sorts » au-dessus de « Smileys ») : Groupe, Émotes, Sorts, Sondages / Bugs & idées, Classement, Smileys
     slots: 0 Groupe, 1 Émotes, 2 Smileys, 3 Sorts, 4 Bugs & idées, 5 Classement, 6 Sondages */
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="0"]{grid-column:11;grid-row:1/3}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="1"]{grid-column:12;grid-row:1/3}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="3"]{grid-column:13;grid-row:1/3}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="6"]{grid-column:14;grid-row:1/3}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="4"]{grid-column:11;grid-row:3/5}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="5"]{grid-column:12;grid-row:3/5}
  html body:not(.in-battle) #spell-dock .rv-dock-btn[data-slot="2"]{grid-column:13;grid-row:3/5}
  html body:not(.in-battle) #spell-dock .rv-dock-badge{position:absolute;top:-6px;right:-6px;min-width:16px;height:16px;padding:0 4px;box-sizing:border-box;border-radius:999px;background:#e8780c;color:#fff;font:800 10px/16px var(--font-ui,sans-serif);text-align:center;pointer-events:none}
  html body:not(.in-battle) :is(#choose-class,#feedback-fab,#leaderboard-fab,#polls-fab,#rv-emotes-toggle,#rv-smileys-toggle,#multiplayer-toggle){display:none!important}
}
/* ---- phones (mobile shell): « Groupe » is a fifth button of the bottom bar (hud-dock.js); « Émotes » / « Smileys » are in the menu, no longer next to « Groupe » ---- */
@media (max-width:700px),(max-width:1000px) and (max-height:500px){
  html body.mobile-ui-ready :is(#multiplayer-toggle,#rv-emotes-toggle,#rv-smileys-toggle){display:none!important}
  body.mobile-ui-ready #mobile-explorebar:has(#mobile-group){grid-template-columns:repeat(5,minmax(0,1fr))}
  body.mobile-ui-ready #mobile-explorebar #mobile-group span{white-space:nowrap}
}
#mobile-group-count{position:absolute;right:12%;top:2px;background:var(--theme-gold,#e8a23c);color:var(--theme-chrome,#1d2740);min-width:18px;height:18px;line-height:18px;border-radius:10px;padding:0 4px;font-size:11.5px;font-weight:800;text-align:center}
#mobile-group-count[hidden]{display:none!important}
html[data-theme="nuit"] body #spell-dock .rv-dock-btn{background:linear-gradient(180deg,#34415c,#222c40)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}
html[data-theme="nuit"] body #spell-dock .rv-dock-btn:hover{background:linear-gradient(180deg,#42537a,#2c3955)!important;border-color:#e8a23c!important}

/* ---- chat window: enlarge / corner buttons and the handle of its upper right corner (chat-tools.js) ---- */
.rv-chat-tools{display:inline-flex;gap:3px;margin-left:auto;margin-right:4px;flex:none}
.rv-chat-btn{width:20px;height:20px;min-width:20px;min-height:20px;padding:0;border:1px solid #9a8f70;border-radius:2px;background:#2c261b;color:#fff3d6;font-size:12px;line-height:1;cursor:pointer}
.rv-chat-btn:hover{background:#4a4234}
.rv-chat-grip{position:absolute;right:0;top:0;width:16px;height:16px;z-index:3;cursor:nesw-resize;touch-action:none;background:linear-gradient(225deg,#f3e3b8 0 40%,transparent 41%),repeating-linear-gradient(225deg,transparent 0 3px,#0006 3px 4px);opacity:.55;border-top-right-radius:2px}
.rv-chat-grip:hover{opacity:1}
@media (max-width:700px),(max-width:1000px) and (max-height:500px){.rv-chat-tools,.rv-chat-grip{display:none}}
html[data-theme="nuit"] body .rv-chat-btn{background:#222c40;border-color:var(--nuit-line);color:var(--nuit-ink)}

/* ---- the ping pill also shows the frames per second ---- */
@media (max-width:600px),(max-width:1000px) and (max-height:500px){
  html body:not(.in-battle) #rv-ping#rv-ping.is-floating{max-width:118px}
  html body:not(.in-battle) #rv-top-stack#rv-top-stack{left:130px!important}
}

/* ---- « Paliers » (Comptoir › Soutien): the tiers are given by the team here, no YouTube membership to join or to have checked ---- */
#astrub-shop .shop-tier-cta:not(.is-current):not(.is-included),#astrub-shop .shop-support-go,#astrub-shop .shop-support-hero,#astrub-shop [data-support-jump],#astrub-shop #shop-support-request,#astrub-shop [data-support-open]{display:none!important}

/* ---- right column (computer layout): « Paliers » just under Auto / Cases / Radio (« Groupe » is in the bottom bar now), « Quitter le donjon » under it: the exit button used to sit on top of the « Paliers » chip ---- */
@media (min-width:1001px) and (min-height:560px){
  html body #support-open#support-open.support-chip{top:100px}
  html body #dungeon-exit#dungeon-exit{top:146px!important;right:14px!important;left:auto!important;bottom:auto!important;transform:none!important}
}
@media (min-width:761px) and (max-width:1000px){
  html body #dungeon-exit#dungeon-exit{top:224px!important;right:14px!important;left:auto!important;bottom:auto!important;transform:none!important}
}

/* ---- phones (mobile shell): more room. Labels of 10.5 px and buttons under 36 px were too small and too close to each other; the interface also starts one size larger (patches.js, ui-scale) ---- */
@media (max-width:700px),(max-width:1000px) and (max-height:500px){
  html body.mobile-ui-ready #mobile-explorebar button span{font-size:12.5px!important}
  html body #rv-ping,html body #rv-ping span{font-size:12px!important}
  html body #community-chip .cc-online{font-size:12px!important}
  html body #chat-overlay .chat-ov-tabs button,html body #retroverse-chat .chat-header button{font-size:12.5px!important;min-height:34px;padding:5px 10px!important}
  html body #chat-overlay .chat-ov-tool{font-size:15px!important;min-width:34px;min-height:34px}
  html body #dungeon-room-bar{flex-wrap:wrap;row-gap:6px}
  html body #dungeon-room-bar .drb-room{font-size:13px;flex:1 1 100%}
  html body #dungeon-room-bar .drb-count{font-size:12.5px}
  html body #dungeon-room-bar button{min-height:40px}
  html body #rv-teamframe{font-size:12.5px}
  html body #rv-teamframe small,html body #rv-teamframe .tf-more{font-size:11.5px}
  html body #spell-dock .quick-item{min-width:38px;min-height:38px}
  html body .i18n-option{min-width:40px;min-height:40px}
  html body #leave-fight{min-height:44px;min-width:44px}
  html body #mp-placement-bar{max-width:calc(100vw - 12px)!important;flex-wrap:wrap;justify-content:center;row-gap:6px}
}
/* Fenêtre « Mise à jour disponible » (server/news.js) : le bandeau du bas devient une vraie fenêtre au centre, avec toutes les lignes de la nouveauté et deux boutons.
   Il n'apparaît jamais en combat ni pendant une action (règles de update-notice.js) ; « Plus tard » le repousse de 10 minutes et laisse la pastille « Nouvelle version ». */
html body #update-notice:not([hidden]){display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-end!important;position:fixed!important;top:50%!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translate(-50%,-50%)!important;width:min(520px,calc(100vw - 24px))!important;max-width:min(520px,calc(100vw - 24px))!important;max-height:calc(100vh - 24px);overflow:auto;box-sizing:border-box;padding:16px 18px 14px!important;gap:12px 14px!important;border-radius:16px!important;z-index:70;animation:rv-update-pop .28s ease-out!important;box-shadow:0 0 0 100vmax #0000004d,0 22px 50px #000c,inset 0 1px 0 #ffffff1a!important}
@keyframes rv-update-pop{from{opacity:0;transform:translate(-50%,-46%) scale(.97)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
html body #update-notice:not([hidden]) .update-notice-art{width:84px!important;height:84px!important;align-self:flex-start!important}
html body #update-notice:not([hidden]) .update-notice-copy{flex:1 1 calc(100% - 112px)!important;min-width:0!important}
html body #update-notice:not([hidden]) strong{font-size:18px!important}
html body #update-notice:not([hidden]) .update-notice-eyebrow{font-size:11px!important}
html body #update-notice#update-notice:not([hidden]) .update-notice-news{display:flex!important;flex-direction:column;gap:6px;margin:10px 0 4px!important;padding:0!important;list-style:none;overflow:visible!important;-webkit-line-clamp:unset!important;-webkit-box-orient:unset!important}
html body #update-notice:not([hidden]) .update-notice-news[hidden]{display:none!important}
html body #update-notice:not([hidden]) .update-notice-news li{display:flex!important;align-items:baseline;gap:8px;max-width:none!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:13px!important;line-height:1.35;color:#efe6cf}
html body #update-notice:not([hidden]) .update-notice-news li::before{flex:none;min-width:84px;padding:2px 7px;border-radius:999px;color:#fff;font:800 10px/1.4 var(--font-ui,sans-serif);letter-spacing:.04em;text-align:center;text-transform:uppercase}
html body #update-notice .update-notice-news li.rv-t-new::before{content:"✦ Nouveau";background:#3f8a2f}
html body #update-notice .update-notice-news li.rv-t-imp::before{content:"▲ Amélioration";background:#2f6a8f}
html body #update-notice .update-notice-news li.rv-t-fix::before{content:"✔ Correctif";background:#b4532a}
html body #update-notice:not([hidden]) #update-notice-message{font-size:12px!important;margin:0!important;-webkit-line-clamp:unset!important;display:block!important}
html body #update-notice:not([hidden]) #update-notice-message:empty{display:none!important}
/* « Plus tard » : un vrai bouton à côté de « Mettre à jour » (la pastille ronde du coin disparaît) */
html body #update-notice:not([hidden]) #update-notice-later{position:static!important;top:auto!important;right:auto!important;width:auto!important;min-width:0!important;height:auto!important;min-height:44px!important;padding:8px 16px!important;border-radius:9px!important;background:transparent!important;border:1px solid #c99a3c99!important;color:#f2e6c4!important;box-shadow:none;font:700 12.5px/1.2 var(--font-ui,sans-serif)!important;order:1}
html body #update-notice:not([hidden]) #update-notice-reload{order:2;min-height:44px;padding:8px 20px!important;font-size:13.5px!important}
html body #update-notice:not([hidden]) #update-notice-force{order:3}
html[data-theme="nuit"] body #update-notice:not([hidden]){background:linear-gradient(135deg,#222c3ff7,#161e2bf7)!important;border-color:#e0bd6899!important}
@media(max-width:700px),(max-width:1000px) and (max-height:500px){
  html body #update-notice:not([hidden]){left:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:calc(100vw - 20px)!important;max-width:none!important;padding:12px 12px 10px!important}
  html body #update-notice:not([hidden]) .update-notice-art{display:none!important}
  html body #update-notice:not([hidden]) .update-notice-news li{font-size:13px!important}
  html body #update-notice:not([hidden]) #update-notice-later,html body #update-notice:not([hidden]) #update-notice-reload{flex:1 1 40%;min-height:46px}
}
/* Console MJ — boutons bien visibles dans tous les thèmes (19/10/2026) : les onglets ne rétrécissent plus (libellés coupés « Accu », « Joue »…) et passent à la ligne,
   l'onglet actif est orange, chaque bouton a un vrai contour et un fond qui se détache du panneau (couleurs tirées de --window-ink / --window-paper-deep du thème). */
html body #admin-panel .admin-tabs{flex-wrap:wrap!important;overflow:visible!important;row-gap:6px!important}
html body #admin-panel .admin-tabs button{flex:0 0 auto!important;min-width:0!important;white-space:nowrap!important;overflow:visible!important}
html body #admin-panel .admin-tabs [data-admin-refresh]{margin-left:auto!important}
html[data-theme="nuit"] body #admin-panel .admin-tabs{background:linear-gradient(180deg,#1d2636,#161e2b)!important;border-bottom:1px solid #4a6286!important}
html body #admin-panel button:not(.admin-link-btn):not(.admin-primary):not(.is-primary):not(.is-main):not([aria-pressed=true]):not([aria-selected=true]):not(.is-gift):not(.is-sanction):not(.is-forever):not(.is-danger){
  background:color-mix(in srgb,var(--window-ink,#2a2216) 10%,var(--window-paper-deep,#e8dcb8))!important;
  border:1.5px solid color-mix(in srgb,var(--window-ink,#2a2216) 55%,var(--window-paper-deep,#e8dcb8))!important;
  box-shadow:0 1px 0 color-mix(in srgb,var(--window-ink,#2a2216) 30%,transparent),inset 0 1px 0 #ffffff22}
html body #admin-panel button:not(.admin-link-btn):not(.admin-primary):not(.is-primary):not(.is-main):not([aria-pressed=true]):not([aria-selected=true]):not(.is-gift):not(.is-sanction):not(.is-forever):not(.is-danger):hover:not(:disabled){
  background:color-mix(in srgb,var(--window-ink,#2a2216) 18%,var(--window-paper-deep,#e8dcb8))!important;
  border-color:var(--window-accent,#e07b17)!important}
html body #admin-panel :is(.admin-primary,.is-primary,.aev-btn.is-main){background:linear-gradient(180deg,#f7a443,#e8780c 60%,#d0680a)!important;color:#1d1306!important;border:1.5px solid #7a3d00!important;box-shadow:0 1px 0 #0006,inset 0 1px 0 #ffffff55;font-weight:800}
html body #admin-panel#admin-panel .admin-tabs button[aria-pressed=true]{background:linear-gradient(180deg,#f7a443,#e8780c)!important;color:#1d1306!important;border:1.5px solid #7a3d00!important;box-shadow:0 1px 0 #0006!important}
html body #admin-panel :is(.admin-subtabs,.admin-segment,.admin-durations,.aev-seg,.aev-themes) button[aria-pressed=true],html body #admin-panel :is(.admin-subtabs,.admin-subtabs) button[aria-selected=true]{background:linear-gradient(180deg,#f7a443,#e8780c)!important;color:#1d1306!important;border:1.5px solid #7a3d00!important}
html body #admin-panel :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){border:1.5px solid color-mix(in srgb,var(--window-ink,#2a2216) 50%,var(--window-paper-deep,#e8dcb8))!important}
html body #admin-panel button:disabled{opacity:.6}
/* bouton « remettre la taille de la fenêtre » (coin des fenêtres) : lisible dans tous les thèmes */
html body .rv-win-reset.rv-win-reset{background:#2a2116!important;color:#f6e9c6!important;border-color:#c99a3c!important}
/* Console MJ, thème Nuit : cartes crème avec texte clair (journal, paliers, accès, guildes, objets) — fond sombre pour que tout se lise */
html[data-theme="nuit"] #admin-panel :is(.admin-log,.admin-item-list,.admin-item-sheet,.admin-explain,.admin-tier-table,.admin-access-state,.ag-list>li){background:var(--nuit-panel,#222c3f)!important;border-color:var(--nuit-line,#3c4f6c)!important;color:var(--nuit-ink,#e8edf6)!important}
html[data-theme="nuit"] #admin-panel .admin-log.is-rejected{background:color-mix(in srgb,#b8432f 30%,var(--nuit-panel,#222c3f))!important}
html[data-theme="nuit"] #admin-panel .admin-access-state.is-open{background:color-mix(in srgb,#2f7a3f 30%,var(--nuit-panel,#222c3f))!important}
html[data-theme="nuit"] #admin-panel .admin-tier-table [role=row]{border-top-color:var(--nuit-line,#3c4f6c)!important}
html[data-theme="nuit"] #admin-panel :is(.admin-explain,.admin-tier-table,.admin-access-state,.admin-item-sheet,.admin-log,.ag-list>li) :is(h3,h4,strong,b,span,small,p,li){color:var(--nuit-ink,#e8edf6)}
html[data-theme="nuit"] #admin-panel :is(.admin-explain,.admin-tier-table,.admin-access-state,.admin-item-sheet,.admin-log,.ag-list>li) :is(small,.admin-hint){color:var(--nuit-dim,#a9b6c9)}
/* lien « YouTube Studio ↗ » du thème clair */
html body #admin-panel a.admin-link-btn{color:#7a3d00!important}
html[data-theme="nuit"] body #admin-panel a.admin-link-btn,html[data-theme="nuit"] #admin-panel a.admin-link-btn{color:#f0cf80!important}
/* Console MJ, thème Brakmar (sombre comme Nuit) : même traitement que Nuit — textes foncés codés en dur dans la console (#3b2c18…) illisibles sur fond sombre */
html[data-theme="brakmar"]{--nuit-panel:#3e2c2f;--nuit-panel-2:#4b3639;--nuit-ink:#ffe6cc;--nuit-dim:#d8bda0;--nuit-line:#6d5256}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel :is(.admin-card,.admin-stat){background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel :is(strong,b,h2,h3,h4,label,p,small,span,li,dt,dd,.admin-hint,.admin-section-caption *):not(button *):not(.rv-name-preview):not([class*="chip"]):not(.admin-tabs *):not(.aev-preview *){color:var(--nuit-ink)}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel :is(small,.admin-hint,.admin-stat span,.admin-card :is(span,small,p)):not(button *):not([class*="chip"]):not(.aev-preview *):not(.ns-card *){color:var(--nuit-dim)}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-stat b{color:#f0cf80!important}
html[data-theme="brakmar"] #admin-panel :is(.admin-log,.admin-item-list,.admin-item-sheet,.admin-explain,.admin-tier-table,.admin-access-state,.ag-list>li){background:var(--nuit-panel)!important;border-color:var(--nuit-line)!important;color:var(--nuit-ink)!important}
html[data-theme="brakmar"] #admin-panel .admin-log.is-rejected{background:color-mix(in srgb,#b8432f 30%,var(--nuit-panel))!important}
html[data-theme="brakmar"] #admin-panel .admin-access-state.is-open{background:color-mix(in srgb,#2f7a3f 30%,var(--nuit-panel))!important}
html[data-theme="brakmar"] body #admin-panel .admin-tabs,html[data-theme="brakmar"] #admin-panel .admin-tabs{background:linear-gradient(180deg,#3a2a2d,#2c2023)!important;border-bottom:1px solid #6d5256!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) body #admin-panel a.admin-link-btn,html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel a.admin-link-btn{color:#f0cf80!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-tier-table [role=row].is-head{background:var(--nuit-panel-2,#2a354a)!important;color:var(--nuit-dim)!important}
/* Console MJ, thèmes sombres : boutons « offrir / changer » (vert clair → vert sombre), carte de confirmation et bandeau de résultat restent crème : texte foncé */
html:is([data-theme="nuit"],[data-theme="brakmar"]) body #admin-panel .admin-action-group button.is-gift{background:color-mix(in srgb,#3f8a2f 30%,var(--nuit-panel-2,#2a354a))!important;border:1.5px solid #78b85f!important;color:var(--nuit-ink,#e8edf6)!important;box-shadow:0 1px 0 #0006,inset 0 1px 0 #ffffff1f}
html:is([data-theme="nuit"],[data-theme="brakmar"]) body #admin-panel .admin-action-group button.is-gift:hover:not(:disabled){background:color-mix(in srgb,#3f8a2f 45%,var(--nuit-panel-2,#2a354a))!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-confirm-body :is(.admin-confirm-what,p,span,b,strong){color:#2b2214!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-confirm-body .admin-confirm-who{color:#6f6346!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-confirm-reason,html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-confirm-reason :is(p,span,b){color:#3d3420!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-confirm-reason>span{color:#8a7440!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel p.admin-status{color:#203a10!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel p.admin-status.is-error{color:#5e2414!important}
html:is([data-theme="nuit"],[data-theme="brakmar"]) #admin-panel .admin-note.is-bad{color:#ffb9a8!important}
/* Console MJ : motif du refus écrit juste au-dessus du bouton « Vérifier l'action » (server/admin-patches.js) */
html body #admin-panel p.admin-form-error{margin:8px 0 0;padding:8px 12px;border-radius:9px;border:1.5px solid #b8432f;background:#f6d9cf;color:#6a1f10!important;font-weight:800;font-size:13px}
/* Fin de donjon : fenêtre « Donjon terminé ! » (server/local/dungeon-end.js) et bouton de sortie mis en avant */
#dungeon-end{border:0;padding:0;background:transparent;max-width:none;overflow:visible}
#dungeon-end::backdrop{background:#0009}
#dungeon-end .de-card{width:min(420px,calc(100vw - 28px));padding:22px 22px 18px;border-radius:16px;border:2px solid #e8a23a;background:linear-gradient(180deg,#3b3326,#241f17);color:#fff3d0;text-align:center;box-shadow:0 24px 60px #000c}
#dungeon-end .de-trophy{font-size:46px;line-height:1.1}
#dungeon-end h2{margin:6px 0 8px;font:400 24px/1.2 var(--font-display,"Bree Serif",serif);color:#ffe28a}
#dungeon-end p{margin:0 0 16px;font-size:14px;line-height:1.45;color:#f0e6cc}
#dungeon-end .de-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
#dungeon-end button{min-height:46px;padding:10px 20px;border-radius:10px;border:1.5px solid #c99a3c99;background:#2a2116;color:#f6e9c6;font:700 14px/1.2 var(--font-ui,sans-serif);cursor:pointer}
#dungeon-end button.de-leave{border-color:#7a3d00;background:linear-gradient(180deg,#f7a443,#e8780c);color:#1d1306;font-weight:800;box-shadow:0 3px 0 #7a3d00}
#dungeon-end button:focus-visible{outline:3px solid #ffe28a;outline-offset:2px}
html body #dungeon-exit.is-complete{background:linear-gradient(180deg,#6cc454,#3f8a2f)!important;color:#fff!important;border-color:#2c6a1f!important;font-weight:800;animation:rv-exit-pulse 1.8s ease-in-out infinite}
@keyframes rv-exit-pulse{50%{box-shadow:0 0 0 6px #6cc45466}}
@media (prefers-reduced-motion:reduce){html body #dungeon-exit.is-complete{animation:none}}
/* Alerte de percepteur (server/local/collector-alert.js) */
#collector-alert{position:fixed;z-index:80;top:64px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;max-width:min(560px,calc(100vw - 24px));padding:10px 14px;border-radius:12px;border:2px solid #e8a23a;background:linear-gradient(180deg,#5a1f14,#3a1410);color:#fff3d0;font:700 14px/1.35 var(--font-ui,sans-serif);box-shadow:0 12px 34px #000b;animation:rv-ca-in .3s ease-out}
#collector-alert[hidden]{display:none}
#collector-alert.is-repelled{border-color:#78b85f;background:linear-gradient(180deg,#24401c,#182a12)}
#collector-alert.is-defeated{border-color:#c99a3c;background:linear-gradient(180deg,#3b3326,#241f17)}
#collector-alert .ca-icon{font-size:22px}
#collector-alert button{flex:none;min-width:32px;min-height:32px;border-radius:8px;border:1px solid #ffffff55;background:#0003;color:#fff;cursor:pointer}
@keyframes rv-ca-in{from{opacity:0;transform:translate(-50%,-10px)}to{opacity:1;transform:translate(-50%,0)}}

/* ---- Bugs & idées (feedback-ui.js) : le tableau a des cartes et un formulaire crème, mais le thème Nuit y mettait du texte clair (étiquettes « Bug / Idée », champs, réponses presque invisibles) ------------------ */
#feedback-dialog#feedback-dialog .fb-compose,#feedback-dialog#feedback-dialog .fb-compose label,#feedback-dialog#feedback-dialog .fb-compose input,#feedback-dialog#feedback-dialog .fb-compose textarea,
#feedback-dialog#feedback-dialog .fb-item,#feedback-dialog#feedback-dialog .fb-item p,#feedback-dialog#feedback-dialog .fb-item b,#feedback-dialog#feedback-dialog .fb-detail,#feedback-dialog#feedback-dialog .fb-text,
#feedback-dialog#feedback-dialog .fb-reply,#feedback-dialog#feedback-dialog .fb-reply p,#feedback-dialog#feedback-dialog .fb-replyform textarea,#feedback-dialog#feedback-dialog .fb-tools input,#feedback-dialog#feedback-dialog .fb-tools select{color:#2f2416!important}
#feedback-dialog#feedback-dialog .fb-compose input::placeholder,#feedback-dialog#feedback-dialog .fb-compose textarea::placeholder,#feedback-dialog#feedback-dialog .fb-replyform textarea::placeholder,#feedback-dialog#feedback-dialog .fb-tools input::placeholder{color:#857558!important;opacity:1}
#feedback-dialog#feedback-dialog .fb-hint,#feedback-dialog#feedback-dialog .fb-meta{color:#6d5c3d!important}
#feedback-dialog#feedback-dialog .fb-seg button[aria-pressed="false"]{color:#e8edf6!important}
