/* Jouabilité mobile v5 (23/10/2026) — accompagne mobile-play.js. Tout est sous body.mp5 (téléphone, mobile-shell prêt) : rien sur ordinateur.
   Bloc 1 : joystick virtuel · bloc 2 : barre de sorts rapides en arc · bloc 3 : HUD de combat épuré · bloc 4 : réglages tactiles. */
:root{--mp-safe-t:env(safe-area-inset-top,0px);--mp-safe-b:env(safe-area-inset-bottom,0px);--mp-safe-l:env(safe-area-inset-left,0px);--mp-safe-r:env(safe-area-inset-right,0px);
 --mp-ink:#fff6dc;--mp-glass:rgba(24,18,12,.62);--mp-glass-2:rgba(24,18,12,.82);--mp-gold:#e8c46a;--mp-line:rgba(232,196,106,.55);--mp-mana:#5fb4ff;--mp-red:#ff6b5b}
#mp-stick,#mp-pad,#mp-tip,#mp-reticle{display:none}

/* ---------- bloc 1 : joystick ---------- */
body.mp5 #mp-stick{display:block;position:fixed;z-index:46;left:0;top:0;width:124px;height:124px;margin:-62px 0 0 -62px;pointer-events:none;opacity:0;transform:scale(.82);transition:opacity .12s,transform .12s}
body.mp5 #mp-stick.is-shown{opacity:1;transform:none}
#mp-stick .mp-stick-base{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,rgba(255,246,220,.10) 0 52%,rgba(255,246,220,.18) 53% 60%,rgba(0,0,0,.10) 61%);border:2px solid rgba(255,246,220,.42);box-shadow:0 0 0 1px rgba(0,0,0,.25),inset 0 0 18px rgba(0,0,0,.18)}
#mp-stick .mp-stick-knob{position:absolute;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;border-radius:50%;background:radial-gradient(circle at 40% 35%,rgba(255,246,220,.95),rgba(232,196,106,.82) 60%,rgba(150,110,40,.85));box-shadow:0 3px 10px rgba(0,0,0,.4);transform:translate(var(--kx,0),var(--ky,0))}
/* mode fixe : anneau toujours visible (discret) au-dessus de la barre du bas ; plus bas en combat (barre masquée) */
body.mp5[data-mp5-stick="fixed"] #mp-stick{left:calc(26px + 62px + var(--mp-safe-l))!important;top:auto!important;bottom:calc(var(--mp-safe-b) + 112px + 62px);margin:0 0 -62px -62px;opacity:.5;transform:none}
body.mp5[data-mp5-stick="fixed"].in-battle #mp-stick{bottom:calc(var(--mp-safe-b) + 34px + 62px)}
body.mp5[data-mp5-stick="fixed"] #mp-stick.is-on{opacity:1}
body.mp5[data-mp5-stick="off"] #mp-stick,body.mp5.rvh-modal:not(rvhx) #mp-stick{display:none}
@media (max-height:500px){body.mp5[data-mp5-stick="fixed"] #mp-stick{bottom:calc(var(--mp-safe-b) + 84px + 62px)}body.mp5[data-mp5-stick="fixed"].in-battle #mp-stick{bottom:calc(var(--mp-safe-b) + 22px + 62px)}}

/* ---------- bloc 2 : barre de sorts rapides ---------- */
body.mp5-pad #mp-pad:not([hidden]){display:block;position:fixed;z-index:47;right:calc(var(--mp-safe-r) + 18px);bottom:calc(var(--mp-safe-b) + 22px);width:80px;height:80px;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#mp-pad button{position:absolute;border-radius:50%;padding:0;margin:0;border:2px solid var(--mp-line);background:var(--mp-glass);color:var(--mp-ink);box-shadow:0 4px 14px rgba(0,0,0,.35);touch-action:none;-webkit-tap-highlight-color:transparent;cursor:pointer;font:600 12px/1.1 var(--font-ui,sans-serif)}
#mp-pad button:active,#mp-pad button.is-held{transform:translate(var(--dx,0),var(--dy,0)) scale(.93)}
#mp-pad .mp-main{left:0;top:0;width:80px;height:80px;display:grid;place-items:center;background:radial-gradient(circle at 50% 40%,rgba(120,46,30,.92),rgba(52,20,14,.94));border-color:var(--mp-gold)}
#mp-pad .mp-main img{width:38px;height:38px;margin-top:-10px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.5))}
#mp-pad .mp-main-lbl{position:absolute;left:4px;right:4px;bottom:9px;font-size:11px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px #000}
#mp-pad .mp-main .mp-mana{position:absolute;inset:-6px;border-radius:50%;pointer-events:none;background:conic-gradient(var(--mp-mana) calc(var(--mana,1)*360deg),rgba(95,180,255,.16) 0);-webkit-mask:radial-gradient(circle closest-side,transparent calc(100% - 5px),#000 calc(100% - 4px));mask:radial-gradient(circle closest-side,transparent calc(100% - 5px),#000 calc(100% - 4px))}
#mp-pad .mp-main .mp-x{display:none;position:absolute;inset:0;border-radius:50%;place-items:center;font-size:30px;background:rgba(150,30,20,.9)}
#mp-pad.is-aiming .mp-main .mp-x{display:grid}
#mp-pad.is-aiming.is-cancel .mp-main{transform:scale(1.12);border-color:#fff}
#mp-pad .mp-spell,#mp-pad .mp-next{left:50%;top:50%}
#mp-pad .mp-spell{width:60px;height:60px;margin:-30px 0 0 -30px;transform:translate(var(--dx),var(--dy));display:grid;place-items:center;overflow:visible}
#mp-pad .mp-spell[hidden]{display:none}
#mp-pad .mp-spell img{width:44px;height:44px;border-radius:50%;pointer-events:none}
#mp-pad .mp-spell .mp-cd{position:absolute;inset:0;border-radius:50%;pointer-events:none;background:conic-gradient(rgba(0,0,0,.66) calc(var(--cd,0)*360deg),transparent 0)}
#mp-pad .mp-spell .mp-t{position:absolute;inset:0;display:grid;place-items:center;font:700 17px/1 var(--font-ui,sans-serif);font-style:normal;color:#fff;text-shadow:0 1px 3px #000;pointer-events:none}
#mp-pad .mp-spell .mp-cost{position:absolute;right:-5px;bottom:-4px;min-width:22px;height:20px;padding:0 4px;border-radius:10px;display:grid;place-items:center;font-size:12px;background:#163a5c;border:1px solid var(--mp-mana);color:#e6f3ff;pointer-events:none}
#mp-pad .mp-spell[data-state="mana"] img{filter:grayscale(.75) brightness(.7)}
#mp-pad .mp-spell[data-state="mana"] .mp-cost{background:#5c1616;border-color:var(--mp-red)}
#mp-pad .mp-spell[data-state="cooldown"] img{filter:grayscale(.4) brightness(.8)}
#mp-pad .mp-spell[data-state="range"]{border-color:rgba(255,190,90,.9)}
#mp-pad .mp-spell.is-active{border-color:#fff;box-shadow:0 0 0 3px rgba(255,236,170,.55),0 4px 14px rgba(0,0,0,.35)}
#mp-pad .mp-next{width:46px;height:46px;margin:-23px 0 0 -23px;transform:translate(var(--dx),var(--dy));display:grid;place-items:center}
#mp-pad .mp-next svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#mp-pad .mp-next:disabled{opacity:.4}
#mp-pad.is-aiming .mp-next{opacity:.25}
#mp-tip:not([hidden]){display:block;position:fixed;z-index:60;max-width:min(300px,calc(100vw - 20px));padding:10px 12px;border-radius:12px;background:var(--mp-glass-2);border:1px solid var(--mp-line);color:var(--mp-ink);font:14px/1.35 var(--font-ui,sans-serif);box-shadow:0 8px 24px rgba(0,0,0,.4);pointer-events:none}
#mp-tip b{display:block;font-size:15px;color:var(--mp-gold)}#mp-tip small{display:block;font-size:13px;opacity:.9;margin:2px 0 4px}#mp-tip ul{margin:4px 0 0;padding-left:18px}#mp-tip .mp-why{margin:6px 0 0;color:#ffb3a8}
#mp-reticle:not([hidden]){display:block;position:fixed;z-index:46;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 2px rgba(0,0,0,.35),inset 0 0 0 2px rgba(0,0,0,.25);pointer-events:none}
#mp-reticle::before,#mp-reticle::after{content:"";position:absolute;left:50%;top:50%;width:14px;height:2px;margin:-1px 0 0 -7px;background:#fff}#mp-reticle::after{transform:rotate(90deg)}
@media (max-height:500px){body.mp5-pad #mp-pad:not([hidden]){right:calc(var(--mp-safe-r) + 16px);bottom:calc(var(--mp-safe-b) + 12px);width:70px;height:70px}#mp-pad .mp-main{width:70px;height:70px}#mp-pad .mp-main img{width:32px;height:32px}#mp-pad .mp-spell{width:56px;height:56px;margin:-28px 0 0 -28px}#mp-pad .mp-spell img{width:40px;height:40px}}

/* ---------- bloc 3 : HUD de combat épuré (barre de sorts rapides active) ---------- */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5-pad.in-battle:not(.in-prep) #spell-dock{display:none!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle :is(#multiplayer-toggle,#rv-onb-chip,#chat-overlay,#mobile-location,#leaderboard-fab,#feedback-fab,#support-open){display:none!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #mobile-topbar .i18n-picker{display:none!important}
/* bandeau du combat : une ligne fine en haut (PV et mana en barres, « Fuir » à droite), entre l'état de connexion et le menu */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hud{position:fixed!important;top:calc(var(--mp-safe-t) + 8px)!important;left:calc(var(--mp-safe-l) + 96px)!important;right:calc(var(--mp-safe-r) + 60px)!important;width:auto!important;max-width:420px!important;height:44px!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;align-items:stretch!important;gap:6px!important;background:none!important;border:0!important;box-shadow:none!important;transform:none!important;backdrop-filter:none!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hud[hidden]{display:none!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-status,html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-enemies,html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hud :is(.vital-label,.fight-vital img){display:none!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-resources{flex:1 1 auto!important;min-width:0;display:flex!important;flex-direction:column!important;justify-content:center;gap:4px!important;margin:0!important;padding:0!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hud .fight-vital{position:relative!important;flex:1 1 0!important;min-height:0!important;height:20px!important;width:100%!important;margin:0!important;padding:0 8px!important;display:flex!important;align-items:center;justify-content:flex-start;overflow:hidden;border-radius:10px!important;border:1px solid rgba(0,0,0,.6)!important;background:rgba(18,14,10,.72)!important;box-shadow:0 2px 6px rgba(0,0,0,.35)!important;color:#fff!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hud .fight-vital b{position:relative;z-index:1;font:700 14px/1 var(--font-ui,sans-serif)!important;color:#fff!important;text-shadow:0 1px 2px #000;white-space:nowrap}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hud .fight-vital i{position:absolute!important;left:0!important;top:0!important;bottom:0!important;height:auto!important;max-width:100%;border-radius:0!important;margin:0!important;opacity:.95}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hp-fill{background:linear-gradient(180deg,#e8574a,#a3261d)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-mana-fill{background:linear-gradient(180deg,#4fa8f0,#1f5f9e)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #leave-fight{flex:none!important;min-width:64px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 12px!important;border-radius:22px!important;border:2px solid rgba(255,200,180,.6)!important;background:rgba(120,30,22,.88)!important;color:#fff!important;font:700 14px/1 var(--font-ui,sans-serif)!important;box-shadow:0 2px 8px rgba(0,0,0,.4)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #leave-fight::before{content:"🏃 "}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #battle-feedback{position:fixed!important;top:calc(var(--mp-safe-t) + 112px)!important;bottom:auto!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:max-content!important;max-width:calc(100vw - 32px)!important;padding:7px 12px!important;border-radius:12px!important;font:600 14px/1.3 var(--font-ui,sans-serif)!important;text-align:center;background:rgba(18,14,10,.78)!important;color:#fff6dc!important;border:1px solid var(--mp-line)!important;box-shadow:0 4px 12px rgba(0,0,0,.35)!important;pointer-events:none!important;z-index:44!important}
@media (max-height:500px){
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #fight-hud{right:auto!important;width:min(380px,calc(100vw - var(--mp-safe-l) - 220px))!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #rv-foe-bar{top:calc(var(--mp-safe-t) + 58px)!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #battle-feedback{top:calc(var(--mp-safe-t) + 106px)!important;max-width:min(520px,calc(100vw - 340px))!important}
}
/* lieu masqué en combat : le menu reste à droite */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #mobile-topbar{justify-content:flex-end!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.in-battle #mobile-menu-toggle{margin-left:auto!important}
/* chat ouvert, carte du monde : la barre de sorts et le joystick s'effacent */
body.mp5.chat-open #mp-pad,body.mp5.mobile-map-open #mp-pad,body.mp5.desktop-map-open #mp-pad{visibility:hidden}

/* ---------- bloc 4 : Menu › Réglages › Contrôles tactiles ---------- */
#mp-settings .mp-set{display:grid;gap:6px;margin:6px 0 14px}
#mp-settings .mp-set>b{display:block;font:700 15px/1.25 var(--font-ui,sans-serif);color:var(--theme-ink,#3a2a14)}
#mp-settings .mp-set>small{display:block;font:400 14px/1.35 var(--font-ui,sans-serif);color:var(--theme-muted,#6b5a40)}
#mp-settings .mp-seg{display:flex;gap:6px;margin-top:2px}
#mp-settings .mp-seg button{flex:1 1 0;min-width:0;min-height:44px;padding:0 6px;border-radius:10px;border:1px solid var(--theme-border,#c9b48a);background:var(--theme-card,#fffaf0);color:var(--theme-ink,#3a2a14);font:600 14px/1.1 var(--font-ui,sans-serif);cursor:pointer}
#mp-settings .mp-seg button[aria-checked="true"]{background:var(--theme-accent,#e0822b);border-color:var(--theme-accent,#e0822b);color:var(--theme-accent-text,#fff)}

/* ===================== Lot 2 (23/10/2026) : fenêtres — lecture 14 px, cibles 44 px, appui long, clavier ===================== */
/* ---------- bloc 5 : plancher de lecture (mobile-ui5.js pose m5-fs sur les textes calculés sous 14 px dans une fenêtre ouverte) ---------- */
html:not(#m5):not(#m5a):not(#m5b):not(#m5c) body:not(#m5):not(#m5a):not(#m5b):not(#m5c).mp5 .m5-fs.m5-fs{font-size:14px!important;line-height:1.3!important;letter-spacing:0!important}
/* ---------- bloc 6 : cibles tactiles (m5-h : hauteur, m5-w : largeur) ---------- */
html:not(#m5):not(#m5a):not(#m5b):not(#m5c) body:not(#m5):not(#m5a):not(#m5b):not(#m5c).mp5 .m5-h.m5-h{min-height:44px!important}
html:not(#m5):not(#m5a):not(#m5b):not(#m5c) body:not(#m5):not(#m5a):not(#m5b):not(#m5c).mp5 .m5-w.m5-w{min-width:44px!important}
html:not(#m5):not(#m5a):not(#m5b):not(#m5c) body:not(#m5):not(#m5a):not(#m5b):not(#m5c).mp5 label.m5-h.m5-h{display:flex!important;align-items:center!important}
/* ---------- bloc 7 : bulle de l'appui long ---------- */
#mp-lp{position:fixed;z-index:2147483001;max-width:min(320px,calc(100vw - 16px));padding:9px 12px;border-radius:12px;background:rgba(24,18,12,.94);border:1px solid var(--mp-line);color:var(--mp-ink);font:500 14px/1.4 var(--font-ui,sans-serif);white-space:pre-line;box-shadow:0 8px 24px rgba(0,0,0,.45);pointer-events:none}
#mp-lp[hidden]{display:none}
/* ---------- bloc 8 : clavier virtuel ouvert (hauteur suivie par visualViewport) ---------- */
html body.mp5.mp5-kb :is(dialog[open],#chat-panel,#trade-window){max-height:calc(100dvh - var(--mp-kb,0px))!important}
html body.mp5.mp5-kb :is(#mp-pad,#mp-stick,#mobile-explorebar,#chat-overlay){visibility:hidden!important}
html:not(#m5):not(#m5a):not(#m5b):not(#m5c) body:not(#m5):not(#m5a):not(#m5b):not(#m5c).mp5 .m5-badge.m5-badge{font-size:14px!important;line-height:1!important;letter-spacing:-.02em!important}
/* ---------- bloc 9 : zones sûres des fenêtres qui les ignoraient (compagnons, signalement, nouveautés) ---------- */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #companions-dialog[open]{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;inset:0!important;border-radius:0!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #companions-dialog[open] .cp-window{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-height:0!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #companions-dialog[open] .cp-window>header{padding-top:calc(var(--mp-safe-t) + 10px)!important;padding-left:calc(var(--mp-safe-l) + 14px)!important;padding-right:calc(var(--mp-safe-r) + 64px)!important;position:relative!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #companions-dialog[open] .cp-close{top:calc(var(--mp-safe-t) + 8px)!important;right:calc(var(--mp-safe-r) + 10px)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #companions-dialog[open] .cp-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding-left:calc(var(--mp-safe-l) + 12px)!important;padding-right:calc(var(--mp-safe-r) + 12px)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #companions-dialog[open] .cp-window>footer{padding-bottom:calc(var(--mp-safe-b) + 8px)!important;padding-left:calc(var(--mp-safe-l) + 12px)!important;padding-right:calc(var(--mp-safe-r) + 12px)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #report-dialog[open] .report-window{padding-bottom:calc(var(--mp-safe-b) + 6px)!important;padding-left:var(--mp-safe-l)!important;padding-right:var(--mp-safe-r)!important}
/* nouveautés en paysage : la liste ne passe plus sous l'encoche */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #patchnotes[open] .patchnotes-body{padding-left:max(12px,calc(var(--mp-safe-l) + 8px))!important;padding-right:max(12px,calc(var(--mp-safe-r) + 8px))!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #patchnotes[open] .patchnotes-window>footer{padding-left:max(10px,calc(var(--mp-safe-l) + 6px))!important;padding-right:max(10px,calc(var(--mp-safe-r) + 6px))!important;padding-bottom:max(6px,var(--mp-safe-b))!important}
/* signalement : la feuille ne dépasse plus l'écran (paysage), le corps défile, Annuler / Envoyer restent au-dessus de la barre système */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #report-dialog[open]{max-height:calc(100dvh - var(--mp-safe-t) - 8px)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #report-dialog[open] .report-window{max-height:inherit!important;min-height:0!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #report-dialog[open] .report-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important}
/* chat : pseudo cliquable en ligne (interligne normal), zone de toucher de 44 px par pseudo-élément */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #retroverse-chat #chat-panel .chat-author{display:inline!important;min-height:0!important;height:auto!important;position:relative!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #retroverse-chat #chat-panel .chat-author::before{content:""!important;position:absolute!important;inset:-14px -4px!important}

/* ===================== Lot 3 (23/10/2026) : monde épuré, HUD lisible, finitions ===================== */
/* ---------- bloc 9 : HUD du monde — textes à 14 px, boutons regroupés ---------- */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #mobile-explorebar>button>span{font-size:14px!important;line-height:1.1!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 :is(.mobile-location-name,#mobile-location-coords){font-size:14px!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #rv-onb-chip#rv-onb-chip *{font-size:14px!important;line-height:1.2!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #rv-onb-chip#rv-onb-chip{max-width:min(240px,calc(100vw - 130px))!important}
/* « Bugs et idées » et « Classement » restent dans le menu (Accès rapides) : la colonne de droite ne garde que le groupe */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 :is(#feedback-fab,#leaderboard-fab){display:none!important}
/* chat du jeu : lignes à 14 px ; onglets du chat de jeu à 14 px avec une vraie cible de 44 px (portrait) */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #chat-overlay#chat-overlay .chat-overlay-feed{font-size:14px!important;line-height:1.35!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #chat-overlay#chat-overlay .chat-overlay-feed *{font-size:14px!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #chat-overlay#chat-overlay .chat-ov-tabs button{font-size:14px!important;line-height:32px!important;height:32px!important;min-height:32px!important;padding:0 10px!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #chat-overlay#chat-overlay .chat-ov-tabs button::before{content:""!important;position:absolute!important;inset:-6px -3px!important}
@media (max-height:500px){
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #mobile-explorebar>button>span{font-size:14px!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #chat-overlay#chat-overlay .chat-ov-tabs{display:none!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #chat-overlay#chat-overlay .chat-overlay-feed{max-height:calc(3 * 1.35em + 6px)!important}
}
/* ---------- bloc 10 : soin rapide hors combat (vie incomplète) ---------- */
#mp-heal{display:none}
body.mp5 #mp-heal:not([hidden]){display:flex;flex-direction:column;gap:10px;position:fixed;z-index:42;right:calc(var(--mp-safe-r) + 12px);bottom:calc(var(--mp-safe-b) + 92px)}
#mp-heal button{position:relative;width:52px;height:52px;padding:0;border-radius:50%;border:2px solid var(--mp-line);background:var(--mp-glass);color:var(--mp-ink);display:grid;place-items:center;box-shadow:0 4px 12px rgba(0,0,0,.35);-webkit-tap-highlight-color:transparent}
#mp-heal button[hidden]{display:none}
#mp-heal .mp-eat img{width:34px;height:34px;object-fit:contain}
#mp-heal .mp-eat b{position:absolute;right:-4px;bottom:-3px;min-width:22px;height:20px;padding:0 4px;border-radius:10px;display:grid;place-items:center;font:700 14px/1 var(--font-ui,sans-serif);background:#2b4d1e;border:1px solid #8fd16b;color:#eaffdf}
#mp-heal .mp-sit svg{width:28px;height:28px;fill:currentColor;stroke:currentColor;stroke-width:.6}
#mp-heal .mp-sit.is-on{border-color:#8fd16b;background:rgba(43,77,30,.85)}
@media (max-height:500px){body.mp5 #mp-heal:not([hidden]){flex-direction:row;bottom:calc(var(--mp-safe-b) + 10px);right:calc(var(--mp-safe-r) + 14px)}}
/* ---------- bloc 11 : sac en paysage — la grille des objets prend la hauteur et défile (elle était réduite à 14 px, invisible) ---------- */
@media (max-height:500px){
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] #player-dialog-content:has(>.bag-layout){overflow:hidden!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] #player-dialog-content>.bag-topline{display:none!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-layout{grid-template-rows:minmax(0,1fr) auto!important;min-height:0!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-layout>.item-inspector.empty-inspector{display:none!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-layout>.item-inspector:not(.empty-inspector){max-height:46vh!important;overflow-y:auto!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-storage{height:auto!important;min-height:0!important;align-self:stretch!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-storage>.bag-grid{flex:1 1 auto!important;min-height:0!important;height:auto!important;overflow-y:auto!important;align-content:start!important;overscroll-behavior:contain}
}
@media (max-height:500px){
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-storage>.bag-grid{grid-template-columns:repeat(auto-fill,minmax(58px,1fr))!important;grid-template-rows:none!important;grid-auto-rows:58px!important;gap:6px!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-storage>.bag-grid>.bag-cell{width:auto!important;height:58px!important;min-height:0!important;aspect-ratio:auto!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-storage>.bag-toolbar{min-height:0!important;margin-bottom:4px!important}
}
@media (max-height:500px){
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] #player-dialog-content:has(>.bag-layout){gap:6px!important;padding-top:6px!important;padding-bottom:max(4px,var(--mp-safe-b))!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-layout{gap:8px!important;margin:0!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-storage{padding:6px!important;gap:4px!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #player-dialog[open] .bag-storage>.bag-grid{grid-template-columns:repeat(auto-fill,minmax(52px,1fr))!important;padding:4px!important}
}

/* ===================== Lot 4 (23/10/2026) : barre du bas en PAYSAGE — icônes seules, bois et or ===================== */
/* Deux dispositions (Menu › Réglages › Contrôles tactiles) : mp5-bar-a = colonne sur le bord droit (défaut), mp5-bar-b = rangée
   flottante en bas à droite (48 px). Libellés à l'appui long (data-tip, mobile-ui5.js) ; bouton Menu dans la barre (mobile-play.js). */
:root{--mp-wood:linear-gradient(180deg,#5a4630,#3d2f20 60%,#2c2117);--mp-wood-hi:linear-gradient(180deg,#6d5538,#4a3826 60%,#33261a);--mp-gold-line:#c9a35a}
html body #mobile-explorebar>#mobile-menu-bar{display:none!important}
@media (max-height:500px){
 /* ---------- barre commune : planche de bois, cadre or, icônes 24 px, libellés masqués (lecteurs d'écran : conservés) ---------- */
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar{display:flex!important;grid-template-columns:none!important;align-items:center!important;justify-content:center!important;gap:4px!important;width:auto!important;min-width:0!important;height:auto!important;min-height:0!important;padding:3px!important;margin:0!important;transform:none!important;border-radius:14px!important;border:1px solid var(--mp-gold-line)!important;background:var(--mp-wood)!important;box-shadow:0 0 0 1px #1a120a,inset 0 1px 0 rgba(255,236,190,.18),0 6px 16px rgba(0,0,0,.45)!important;backdrop-filter:none!important;z-index:30!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b).in-battle #mobile-explorebar{display:none!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar>button{position:relative!important;flex:none!important;display:grid!important;place-items:center!important;width:44px!important;height:44px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;border:1px solid transparent!important;border-radius:10px!important;background:transparent!important;color:#f3e3bc!important;gap:0!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar>button+button{border-left:1px solid transparent!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar>button:active{background:var(--mp-wood-hi)!important;border-color:rgba(201,163,90,.7)!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar>button[aria-expanded="true"]{background:var(--mp-wood-hi)!important;border-color:var(--mp-gold-line)!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar>button>:is(img,svg){width:25px!important;height:25px!important;margin:0!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar>button>svg{fill:none;stroke:currentColor;stroke-width:1.8}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar>button>span{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;margin:0!important;padding:0!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-explorebar #mobile-chat-unread{position:absolute!important;top:-4px!important;right:-4px!important;min-width:18px!important;height:18px!important;font:700 12px/18px var(--font-ui,sans-serif)!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-menu-bar{display:grid!important}
 /* Menu passe dans la barre : le bouton du haut s'efface */
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b):not(.in-battle) #mobile-topbar #mobile-menu-toggle{display:none!important}
 /* ---------- variante A : colonne sur le bord droit, sous le bouton Groupe ---------- */
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.mp5-bar-a #mobile-explorebar{flex-direction:column!important;left:auto!important;right:calc(var(--mp-safe-r) + 8px)!important;top:calc(var(--mp-safe-t) + 56px)!important;bottom:auto!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.mp5-bar-a #mobile-explorebar>button+button{border-left:1px solid transparent!important;border-top:1px solid rgba(201,163,90,.22)!important;border-radius:0 0 10px 10px!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b):not(.in-battle) #multiplayer-toggle{top:calc(var(--mp-safe-t) + 8px)!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b):not(.in-battle) #mobile-topbar .i18n-picker{margin-right:52px!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.mp5-bar-a #mp-heal:not([hidden]){right:calc(var(--mp-safe-r) + 66px)!important;bottom:calc(var(--mp-safe-b) + 8px)!important}
 /* ---------- variante B : rangée flottante en bas à droite (48 px de haut) ---------- */
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.mp5-bar-b #mobile-explorebar{flex-direction:row!important;gap:3px!important;left:auto!important;right:calc(var(--mp-safe-r) + 8px)!important;bottom:calc(var(--mp-safe-b) + 6px)!important;top:auto!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.mp5-bar-b #mp-heal:not([hidden]){flex-direction:column!important;right:calc(var(--mp-safe-r) + 10px)!important;bottom:calc(var(--mp-safe-b) + 66px)!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.mp5-bar-b #mobile-explorebar>button{width:40px!important;height:40px!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5.mp5-bar-b #mobile-explorebar>button::before{content:""!important;position:absolute!important;inset:-2px!important}
 /* chat de jeu : la place libérée au centre est rendue au monde (le chat reste à gauche, plus large) */
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #chat-overlay#chat-overlay{bottom:calc(var(--mp-safe-b) + 8px)!important;width:min(40vw,360px)!important}
 /* ---------- haut de l'écran : boutons au même habillage bois et or ---------- */
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) :is(#mobile-location,#multiplayer-toggle,#mobile-menu-toggle,#mobile-topbar .i18n-option){background:var(--mp-wood)!important;border:1px solid var(--mp-gold-line)!important;color:#f3e3bc!important;box-shadow:0 0 0 1px #1a120a,inset 0 1px 0 rgba(255,236,190,.18),0 4px 10px rgba(0,0,0,.35)!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-topbar .i18n-picker{background:none!important;border:0!important;box-shadow:none!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) :is(#mobile-location,#mobile-menu-toggle) :is(span,b,#mobile-location-coords){color:#f3e3bc!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #mobile-menu-toggle svg{stroke:#f3e3bc!important}
 html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5:is(.mp5-bar-a,.mp5-bar-b) #multiplayer-toggle svg{stroke:#f3e3bc!important;color:#f3e3bc!important}
 /* ---------- combat : arc de sorts plus compact (attaque 64, sorts 50) ---------- */
 body.mp5-pad #mp-pad:not([hidden]){right:calc(var(--mp-safe-r) + 14px);bottom:calc(var(--mp-safe-b) + 8px);width:64px;height:64px}
 #mp-pad .mp-main{width:64px;height:64px}#mp-pad .mp-main img{width:28px;height:28px;margin-top:-9px}#mp-pad .mp-main-lbl{bottom:7px;font-size:11px}
 #mp-pad .mp-spell{width:50px;height:50px;margin:-25px 0 0 -25px}#mp-pad .mp-spell img{width:36px;height:36px}
 #mp-pad .mp-spell .mp-cost{min-width:20px;height:18px;font-size:11px;right:-6px;bottom:-5px}
 #mp-pad .mp-next{width:40px;height:40px;margin:-20px 0 0 -20px}#mp-pad .mp-next svg{width:22px;height:22px}
}
/* ---------- arc de sorts : habillage bois et or (toutes orientations) ---------- */
#mp-pad .mp-spell,#mp-pad .mp-next{background:var(--mp-wood);border-color:var(--mp-gold-line);box-shadow:0 0 0 1px #1a120a,inset 0 1px 0 rgba(255,236,190,.2),0 4px 12px rgba(0,0,0,.45)}
#mp-pad .mp-main{border-color:#e8c46a;box-shadow:0 0 0 1px #1a120a,0 0 0 3px rgba(232,196,106,.25),0 6px 16px rgba(0,0,0,.5)}
#mp-heal button{background:var(--mp-wood);border-color:var(--mp-gold-line)}
/* astuces d'initiation (sac presque plein…) : boutons à 44 px au doigt */
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #rv-onb-tip .onb-tip-act{min-height:44px!important;font-size:14px!important;padding:0 14px!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #rv-onb-tip .onb-x{position:relative!important}
html:not(#v5a):not(#v5b):not(#v5c):not(#v5d) body.mp5 #rv-onb-tip .onb-x::before{content:""!important;position:absolute!important;inset:-6px!important;border-radius:50%}
