/* Refonte mobile (25/10/2026) — accompagne mobile-refonte.js. Chargée après mobile-v5.css.
   body.mr : téléphone (mobile-shell prêt) ; body.mr-tab : tablette tactile ; mr-portrait / mr-landscape : orientation.
   Sur ordinateur (souris), aucune de ces classes n'est posée : rien ne change.
   Préfixe à 5 identifiants (:not(#mrN)) : passe devant les couches v4/v5 (4 identifiants) sans toucher à leurs fichiers. */
:root{--mr-st:env(safe-area-inset-top,0px);--mr-sb:env(safe-area-inset-bottom,0px);--mr-sl:env(safe-area-inset-left,0px);--mr-sr:env(safe-area-inset-right,0px);
 --mr-top:calc(var(--mr-st) + 6px);--mr-wood:linear-gradient(180deg,#5a4630,#3d2f20 60%,#2c2117);--mr-wood-hi:linear-gradient(180deg,#6d5538,#4a3826 60%,#33261a);
 --mr-gold:#e8c46a;--mr-gold-line:rgba(201,163,90,.62);--mr-ink:#fff6dc;--mr-hp:#e0483c;--mr-hp-mid:#e8a03c;--mr-xp:#e8c46a;--mr-vh:100dvh;--mr-vw:100vw}

/* ======================= 1. Page figée (téléphone et tablette) ======================= */
html.rv-mr-on{overscroll-behavior:none;touch-action:pan-x pan-y}
body.mr,body.mr-tab{overscroll-behavior:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.mr :is(button,[role=button],a,summary,label,select,input[type=checkbox],input[type=radio]),body.mr-tab :is(button,[role=button],a,summary,label,select){touch-action:manipulation;-webkit-tap-highlight-color:transparent}
/* retour visuel immédiat au doigt (toutes les commandes) */
body.mr :is(button,[role=button],summary):active:not(:disabled),body.mr-tab :is(button,[role=button],summary):active:not(:disabled){filter:brightness(1.18)}

/* ======================= 2. Haut de l'écran (téléphone, hors combat) ======================= */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr:not(.in-battle) #mobile-topbar{display:grid!important;grid-template-columns:auto minmax(0,1fr) 44px!important;grid-template-rows:48px auto!important;gap:6px 8px!important;align-items:center!important;justify-content:stretch!important;top:var(--mr-top)!important;left:calc(var(--mr-sl) + 8px)!important;right:calc(var(--mr-sr) + 8px)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr:not(.in-battle) #mobile-topbar :is(.i18n-picker,#mobile-menu-toggle){display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mobile-topbar .i18n-picker{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr:not(.in-battle) #mobile-topbar #mobile-location{grid-area:2/1/3/3!important;justify-self:start!important;max-width:100%!important;min-height:40px!important;height:40px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.in-battle #mr-hero,html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.in-battle #mr-gear{display:none!important}
body:not(.mr) #mr-hero,body:not(.mr) #mr-gear{display:none!important}

/* carte du personnage */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero{grid-area:1/1/2/2!important;min-height:0!important;pointer-events:auto!important;display:flex!important;align-items:center!important;gap:8px!important;height:48px!important;min-width:0!important;max-width:min(240px,62vw)!important;padding:3px 12px 3px 3px!important;margin:0!important;border-radius:26px 14px 14px 26px!important;background:var(--mr-wood)!important;border:1px solid var(--mr-gold-line)!important;box-shadow:0 0 0 1px rgba(0,0,0,.45),0 3px 10px rgba(0,0,0,.35),inset 0 1px rgba(255,236,190,.14)!important;color:var(--mr-ink)!important;font:700 13px/1.1 var(--font-ui,sans-serif)!important;text-align:left!important;cursor:pointer!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-face{position:relative!important;flex:none!important;width:40px!important;height:40px!important;border-radius:50%!important;background:radial-gradient(circle at 50% 35%,#f4dfae,#b98c4c 70%,#6d4a22)!important;border:2px solid var(--mr-gold)!important;box-sizing:border-box!important;overflow:visible!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-face img{width:100%!important;height:100%!important;border-radius:50%!important;object-fit:cover!important;display:block!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-lvl{position:absolute!important;right:-6px!important;bottom:-5px!important;min-width:20px!important;height:20px!important;padding:0 4px!important;border-radius:10px!important;background:#2c2117!important;border:1.5px solid var(--mr-gold)!important;color:var(--mr-gold)!important;font:800 12px/17px var(--font-ui,sans-serif)!important;text-align:center!important;box-sizing:border-box!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-bars{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;width:128px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-name{font:700 13px/1.1 var(--font-ui,sans-serif)!important;color:#f6e7c4!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-shadow:0 1px 1px #000!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-hp{position:relative!important;display:block!important;height:15px!important;border-radius:8px!important;background:#1b130c!important;border:1px solid rgba(0,0,0,.6)!important;overflow:hidden!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-hp i{position:absolute!important;inset:0 auto 0 0!important;width:calc(var(--hp,1) * 100%)!important;background:linear-gradient(180deg,#ff7a68,var(--mr-hp) 55%,#a3261c)!important;transition:width .25s ease!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero[data-hp=mid] .mr-hp i{background:linear-gradient(180deg,#ffc56a,var(--mr-hp-mid) 55%,#a86312)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero[data-hp=low] .mr-hp i{animation:mr-pulse 1s ease-in-out infinite alternate!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-hp em{position:relative!important;display:block!important;font:800 12px/15px var(--font-ui,sans-serif)!important;font-style:normal!important;text-align:center!important;color:#fff!important;text-shadow:0 1px 1px #000,0 0 2px #000!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-xp{position:relative!important;display:block!important;height:4px!important;border-radius:2px!important;background:#1b130c!important;overflow:hidden!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero .mr-xp i{position:absolute!important;inset:0 auto 0 0!important;width:calc(var(--xp,0) * 100%)!important;background:var(--mr-xp)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-hero:active{background:var(--mr-wood-hi)!important}
@keyframes mr-pulse{from{opacity:1}to{opacity:.55}}
@media (prefers-reduced-motion:reduce){body.mr #mr-hero[data-hp=low] .mr-hp i{animation:none}}

/* réglages (roue dentée, discrète) */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-gear{grid-area:1/3/2/4!important;max-width:none!important;min-width:44px!important;flex:none!important;pointer-events:auto!important;position:relative!important;display:grid!important;place-items:center!important;width:44px!important;height:44px!important;padding:0!important;margin:0!important;border-radius:12px!important;background:var(--mr-wood)!important;border:1px solid var(--mr-gold-line)!important;box-shadow:0 0 0 1px rgba(0,0,0,.45),0 3px 10px rgba(0,0,0,.3)!important;color:#f3e3bc!important;cursor:pointer!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-gear svg{width:23px!important;height:23px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;stroke-linejoin:round!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-gear .mr-dot{position:absolute!important;top:5px!important;right:5px!important;width:9px!important;height:9px!important;border-radius:50%!important;background:#ff6b4a!important;box-shadow:0 0 0 2px #2c2117!important}

/* bouton Groupe : à gauche de la roue, même ligne ; état de connexion et objectifs en dessous */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr:not(.in-battle) #multiplayer-toggle{position:fixed!important;top:calc(var(--mr-top) + 2px)!important;right:calc(var(--mr-sr) + 60px)!important;left:auto!important;bottom:auto!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait:not(.in-battle) #rv-ping{position:fixed!important;top:calc(var(--mr-top) + 61px)!important;right:calc(var(--mr-sr) + 8px)!important;left:auto!important;bottom:auto!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait:not(.in-battle) #rv-onb-chip{position:fixed!important;top:calc(var(--mr-top) + 104px)!important;left:calc(var(--mr-sl) + 8px)!important;right:auto!important;bottom:auto!important}

/* ======================= 3. Barre du bas en portrait : le menu y entre (usage à une main) ======================= */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #mobile-explorebar>#mobile-menu-bar{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #mobile-explorebar>#mobile-menu-bar>svg{width:26px!important;height:26px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important}
/* Personnage : déjà ouvert par la carte du personnage en haut ; la barre garde 4 + Menu, libellés entiers */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #mobile-explorebar>#mobile-character{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #mobile-explorebar{grid-template-columns:repeat(var(--mr-bar-n,4),minmax(0,1fr))!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #mobile-explorebar>button>span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important}

/* ======================= 4. Paysage (téléphone) : une seule ligne en haut ======================= */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape:not(.in-battle) #mobile-topbar{grid-template-columns:auto auto minmax(0,1fr) 44px!important;grid-template-rows:44px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape:not(.in-battle) #mobile-topbar #mobile-location{grid-area:1/2/2/3!important;height:44px!important;min-height:44px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #mr-hero{height:44px!important;max-width:220px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #mr-hero .mr-face{width:36px!important;height:36px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #mr-hero .mr-name{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #mr-hero .mr-bars{width:112px!important;gap:4px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #mr-gear{grid-area:1/4/2/5!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape:not(.in-battle) #multiplayer-toggle{top:var(--mr-top)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape:not(.in-battle) #rv-ping{position:fixed!important;top:calc(var(--mr-top) + 52px)!important;left:calc(var(--mr-sl) + 8px)!important;right:auto!important;bottom:auto!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape:not(.in-battle) #rv-onb-chip{position:fixed!important;top:calc(var(--mr-top) + 84px)!important;left:calc(var(--mr-sl) + 8px)!important;right:auto!important;bottom:auto!important}

/* ======================= 5. Réglages › Mobile ======================= */
/* même présentation que Contrôles tactiles (mobile-v5.css, bloc 4) */
#mr-settings .mp-set{display:grid;gap:6px;margin:6px 0 14px}
#mr-settings .mp-set>b{display:block;font:700 15px/1.25 var(--font-ui,sans-serif);color:var(--theme-ink,#3a2a14)}
#mr-settings .mp-set>small{display:block;font:400 14px/1.35 var(--font-ui,sans-serif);color:var(--theme-muted,#6b5a40)}
#mr-settings .mp-seg{display:flex;gap:6px;margin-top:2px}
#mr-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}
#mr-settings .mp-seg button[aria-checked="true"]{background:var(--theme-accent,#e0822b);border-color:var(--theme-accent,#e0822b);color:var(--theme-accent-text,#fff)}

/* ======================= 6. Tablette tactile (body.mr-tab) : disposition ordinateur, cibles au doigt ======================= */
/* toutes les commandes du HUD atteignent 44 px (taille réelle ou zone de toucher élargie) */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab :is(.tools #day,.tools #grid,.tools #radio-toggle,#feedback-fab,#leaderboard-fab,.combat-launch>button,#topbar-menu,#game-topbar a.rv-home,.monster-toggle,#retroverse-chat>#chat-toggle){min-height:44px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab #game-topbar .i18n-option{min-height:44px!important;min-width:44px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab #player-strip>button{min-height:40px!important;position:relative!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab :is(#player-strip>button,#quick-items>.quick-item,.minimap-size>button)::after{content:""!important;position:absolute!important;inset:-6px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab #quick-items>.quick-item{position:relative!important;min-width:40px!important;min-height:40px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab .minimap-size>button{position:relative!important;width:32px!important;height:32px!important}
/* zones sûres (encoche, barre de geste, appli installée) : le HUD de l'ordinateur ne les connaissait pas */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab :is(.title.glass,.tools.glass,#game-topbar,.combat-launch,#feedback-fab,#leaderboard-fab,.monster-toggle,#multiplayer-toggle,#rv-onb-chip){translate:var(--mr-sl) var(--mr-st)}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab :is(#spell-dock,#retroverse-chat,#mobile-map-panel){translate:0 calc(-1 * var(--mr-sb))}
/* portrait : la rangée de la barre du joueur (Personnage, Métiers, Équipe, Guilde…) dépassait à droite → icônes seules, comme sur grand écran */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab.mr-portrait #player-strip>button:not(#player-sit){font-size:0!important;gap:0!important;min-width:44px!important;padding-inline:8px!important;justify-content:center!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab.mr-portrait #player-strip>button:not(#player-sit)>:not(img):not(svg){display:none!important}
/* bandeau d'annonce (tirage du week-end) : sous la colonne de gauche plutôt que par-dessus les boutons du haut */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab.mr-portrait .drw-banner{top:calc(var(--mr-st) + 300px)!important}

/* ======================= Lot 2 : fenêtres pratiques au doigt ======================= */
/* ---------- 7. Sac : bascule Objets / Équipement (portrait), fiche de l'objet en feuille ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #player-dialog.mr-bag #mr-bag-seg{display:flex;flex:none;gap:6px;padding:8px calc(12px + var(--mr-sr)) 6px calc(12px + var(--mr-sl));background:var(--theme-paper,#efe6cc);border-bottom:1px solid rgba(120,90,40,.25)}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-bag-seg button{flex:1 1 0;min-height:44px;margin:0;border-radius:12px;border:1px solid var(--theme-border,#c9b48a);background:var(--theme-card,#fffaf0);color:var(--theme-ink,#3a2a14);font:700 15px/1.1 var(--font-ui,sans-serif);cursor:pointer}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-bag-seg button[aria-selected="true"]{background:var(--theme-accent,#e0822b);border-color:var(--theme-accent,#e0822b);color:var(--theme-accent-text,#fff);box-shadow:inset 0 -2px rgba(0,0,0,.18)}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #mr-bag-seg{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #player-dialog.mr-view-items .bag-equipment{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #player-dialog.mr-view-equip :is(.bag-topline,.bag-tabs,.bag-storage){display:none!important}
/* fiche de l'objet : cachée tant qu'aucun objet n'est touché (elle était sous 3 000 px de grille) */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #player-dialog.mr-bag:not(.mr-insp) .item-inspector{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #player-dialog.mr-insp .item-inspector{position:fixed!important;z-index:30!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:auto!important;max-height:min(66vh,calc(var(--mr-vh) - 150px))!important;overflow:auto!important;overscroll-behavior:contain;margin:0!important;padding:20px calc(16px + var(--mr-sr)) calc(18px + var(--mr-sb)) calc(16px + var(--mr-sl))!important;box-sizing:border-box!important;border-radius:20px 20px 0 0!important;border:0!important;border-top:2px solid var(--mr-gold)!important;background:var(--theme-paper,#f3ead2)!important;box-shadow:0 -12px 34px rgba(0,0,0,.5)!important;animation:mr-sheet-up .18s ease-out}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-insp .item-inspector{top:0!important;left:auto!important;width:min(430px,54vw)!important;max-height:none!important;border-radius:20px 0 0 20px!important;border-top:0!important;border-left:2px solid var(--mr-gold)!important;padding:16px calc(16px + var(--mr-sr)) calc(14px + var(--mr-sb)) 18px!important;animation:mr-sheet-left .18s ease-out;box-shadow:-12px 0 34px rgba(0,0,0,.45)!important}
@keyframes mr-sheet-up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes mr-sheet-left{from{transform:translateX(40px);opacity:.4}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){html body.mr #player-dialog.mr-insp .item-inspector,#mr-trade-act>button{animation:none!important}}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mr-insp-close{position:fixed;z-index:31;width:44px;height:44px;display:grid;place-items:center;padding:0;margin:0;border-radius:50%;border:2px solid var(--mr-gold);background:#2c2117;color:#fff3d6;font:700 18px/1 var(--font-ui,sans-serif);box-shadow:0 3px 10px rgba(0,0,0,.45);cursor:pointer}

/* ---------- 8. Sac en paysage : équipement à gauche, catégories + objets à droite, toute la hauteur ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag #player-dialog-content{display:grid!important;grid-template-columns:minmax(330px,40%) minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:6px 10px!important;overflow:hidden!important;padding-top:6px!important;padding-bottom:calc(4px + var(--mr-sb))!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-layout{display:contents!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-topline{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-tabs{grid-column:2!important;grid-row:1!important;margin:0!important;min-width:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-equipment{grid-column:1!important;grid-row:1/3!important;min-height:0!important;max-height:none!important;overflow:auto!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-storage{grid-column:2!important;grid-row:2!important;min-height:0!important;max-height:none!important;height:auto!important;display:flex!important;flex-direction:column!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-grid{flex:1 1 auto!important;min-height:0!important;max-height:none!important;height:auto!important;overflow:auto!important;overscroll-behavior:contain}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-toolbar>span{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog.mr-bag .bag-footer{grid-column:1/3!important;grid-row:3!important;margin:0!important;position:static!important}

/* ---------- 9. En-têtes compacts en paysage (une ligne de 48 px : plus de place pour le contenu) ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape :is(#player-dialog,#player-dialog-char,#adventure-panel)>header{min-height:0!important;height:48px!important;padding-top:0!important;padding-bottom:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window>header.trade-bar{min-height:0!important;height:48px!important;padding-top:0!important;padding-bottom:0!important}

/* ---------- 10. Personnage : onglets Caractéristiques / Sorts entiers en paysage ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog-char .pd-char-tabs{flex:none!important;width:auto!important;max-width:none!important;gap:6px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog-char .pd-char-tabs>button{width:auto!important;min-width:0!important;max-width:none!important;flex:none!important;padding:0 16px!important;white-space:nowrap!important;overflow:visible!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #player-dialog-char>header>h2{flex:1 1 auto!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

/* ---------- 11. Marchand (PNJ) en paysage : liste à gauche, achat ou vente à droite ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #adventure-panel .rv-shop[data-has-order]{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(290px,41%)!important;grid-template-rows:auto auto auto 1fr!important;column-gap:12px!important;align-items:start!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #adventure-panel .rv-shop[data-has-order]>.rv-shop-top{grid-column:1/3!important;grid-row:1!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #adventure-panel .rv-shop[data-has-order]>:not(.rv-shop-top):not(.rv-shop-order){grid-column:1!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #adventure-panel .rv-shop[data-has-order]>.rv-shop-order{grid-column:2!important;grid-row:2/5!important;position:sticky!important;top:6px!important;bottom:auto!important;left:auto!important;right:auto!important;width:auto!important;margin:0!important;max-height:calc(var(--mr-vh) - 120px)!important;overflow:auto!important;border-radius:14px!important;box-shadow:0 4px 14px rgba(0,0,0,.18)!important}

/* ---------- 12. Échange : zones sûres ; paysage en trois colonnes (ton offre, son offre, ton sac) ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #trade-window:not([hidden]){padding-left:var(--mr-sl)!important;padding-right:var(--mr-sr)!important;box-sizing:border-box!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-body{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.15fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:6px 8px!important;overflow:hidden!important;padding:6px 8px calc(6px + var(--mr-sb))!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-panels{display:contents!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-arrows{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side{grid-row:1!important;min-height:0!important;overflow:auto!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side.is-mine{grid-column:1!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side.is-other{grid-column:2!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:44px!important;gap:3px!important;height:auto!important;min-height:0!important;max-height:none!important;flex:none!important;align-content:start!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>header{min-height:0!important;height:auto!important;gap:6px!important;padding-block:2px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>header>.trade-face{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>*{flex:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>header>div{flex:1 1 auto!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:baseline!important;gap:0 6px!important;min-width:0!important;overflow:hidden!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>header>div>*{flex:none!important;white-space:nowrap!important;line-height:1.3!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>header>div>.trade-name{flex:0 1 auto!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>header>.trade-badge{flex:none!important;white-space:nowrap!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-grid>.trade-cell{width:auto!important;height:auto!important;min-height:44px!important;aspect-ratio:auto!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-status{grid-column:1/3!important;grid-row:2!important;margin:0!important;min-height:44px!important;align-items:center!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-actions{grid-column:3!important;grid-row:2!important;margin:0!important;position:static!important;justify-content:flex-end!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-bag{grid-column:3!important;grid-row:1!important;min-height:0!important;display:flex!important;flex-direction:column!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-bag>header{flex-wrap:wrap!important;gap:4px 6px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-tabs{order:3;flex:1 1 100%!important;flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-tabs>button{flex:none!important;white-space:nowrap!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-search{flex:1 1 120px!important;min-width:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-bag-grid{flex:1 1 auto!important;min-height:0!important;max-height:none!important;height:auto!important;overflow:auto!important;grid-template-columns:repeat(auto-fill,minmax(54px,1fr))!important;grid-template-rows:none!important;grid-auto-rows:58px!important;align-content:start!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-bag-grid>.trade-cell{width:auto!important;height:auto!important;min-height:0!important;aspect-ratio:auto!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-hint{display:none!important}
/* action de l'objet choisi (ajouter / retirer) : gros bouton au-dessus des boutons Annuler / Valider */
#mr-trade-act{position:fixed;z-index:95;left:calc(12px + var(--mr-sl));right:calc(12px + var(--mr-sr));bottom:calc(var(--mr-sb) + 66px);display:flex;justify-content:center;pointer-events:none}
#mr-trade-act>button{pointer-events:auto;max-width:100%;min-height:48px;padding:0 18px;border-radius:24px;border:2px solid #fff3c4;background:linear-gradient(180deg,#f0a040,#d9741c);color:#fff;font:800 15px/1.1 var(--font-ui,sans-serif);text-shadow:0 1px 1px rgba(0,0,0,.35);box-shadow:0 6px 18px rgba(0,0,0,.4);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;animation:mr-sheet-up .15s ease-out}
#mr-trade-act[data-mode=remove]>button{background:linear-gradient(180deg,#9b6a4a,#6e4329)}
body.mr.mr-landscape #mr-trade-act{left:auto;right:calc(14px + var(--mr-sr));bottom:calc(var(--mr-sb) + 10px);width:min(300px,33vw)}

/* ---------- 13. Panneau du groupe (« Jouer ensemble ») au-dessus des pastilles du haut ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #multiplayer-panel:not([hidden]){z-index:61!important}

/* ---------- 14. Tablette : bulle de l'appui long ---------- */
#mr-tip{position:fixed;z-index:2147483000;max-width:min(360px,calc(100vw - 16px));padding:9px 12px;border-radius:12px;background:rgba(30,22,14,.96);border:1px solid var(--mr-gold-line);color:#fff6dc;font:600 15px/1.35 var(--font-ui,sans-serif);white-space:pre-line;box-shadow:0 8px 24px rgba(0,0,0,.45);pointer-events:none}
#mr-tip[hidden]{display:none}

/* ---------- 15. Objectifs « Premiers pas » en paysage : panneau sur toute la hauteur, liste qui défile ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-onb[open]{top:calc(var(--mr-top) + 2px)!important;bottom:calc(var(--mr-sb) + 8px)!important;left:calc(var(--mr-sl) + 8px)!important;right:auto!important;height:auto!important;max-height:none!important;width:min(400px,52vw)!important;display:flex!important;flex-direction:column!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-onb[open] .onb-list{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:auto!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-onb[open] .onb-head{padding-block:6px!important}

/* ---------- 16. Carte du monde en paysage : en-tête d'une ligne, outils sur deux colonnes (tous visibles) ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #worldmap .worldmap-head{min-height:0!important;height:48px!important;padding-top:0!important;padding-bottom:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #worldmap .worldmap-tools{display:grid!important;grid-template-columns:repeat(2,44px)!important;grid-auto-rows:44px!important;gap:6px!important;width:auto!important;height:auto!important;max-height:calc(100% - 20px)!important;overflow:auto!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #worldmap #worldmap-search{max-width:none!important;width:calc(var(--mr-vw) - var(--mr-sl) - var(--mr-sr) - 160px)!important;right:auto!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #worldmap .worldmap-tools>*{width:44px!important;height:44px!important;min-height:0!important;margin:0!important}

/* ---------- 17. Chat du jeu (compact) : onglets fins à l'œil, mais 44 px au doigt ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #chat-overlay .chat-ov-tabs>button{position:relative!important;overflow:visible!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #chat-overlay .chat-ov-tabs>button::after{content:""!important;position:absolute!important;inset:-7px -2px!important}

/* état de connexion : texte entier (« reconnexion… » était coupé) */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-ping{max-width:none!important;width:auto!important;white-space:nowrap!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-ping>span{overflow:visible!important;text-overflow:clip!important;max-width:none!important}

/* ---------- 18. Tablette : toutes les commandes des fenêtres à 44 px au doigt (fenêtres de l'ordinateur conservées) ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab :is(dialog[open],#retroverse-chat #chat-panel,#trade-window,#worldmap) :is(button,select,summary,[role=tab],input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden])){min-height:44px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab :is(dialog[open],#retroverse-chat #chat-panel,#trade-window,#worldmap) button{min-width:44px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab #chat-overlay .chat-ov-tabs>button{position:relative!important;overflow:visible!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab #chat-overlay .chat-ov-tabs>button::after{content:""!important;position:absolute!important;inset:-12px -2px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr-tab.chat-open #rv-onb-chip{visibility:hidden!important}

/* échange en paysage : nom du joueur entier (l'étiquette « Ton offre / Son offre » reste lue par les lecteurs d'écran), champ des kamas compact */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side>header>div>small{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side .trade-kamas{min-height:0!important;height:44px!important;padding-block:0!important;margin-top:4px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side .trade-kamas>input{height:40px!important;min-height:40px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-side{padding:6px!important;gap:4px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-status p{line-height:1.25!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-actions>button{flex:1 1 0!important}
@media (max-height:375px){html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-status{min-height:40px!important;padding-block:2px!important}html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-status p{margin-block:0!important;font-size:14px!important}html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-body{padding-top:4px!important;gap:4px 8px!important}html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #trade-window .trade-grid{grid-auto-rows:42px!important}}

/* ---------- 19. Corrections du détecteur de rognage (lot 2) ---------- */
/* échange en portrait : le message d'état (2 lignes) était coupé dans une boîte de 30 px */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #trade-window .trade-status{height:auto!important;min-height:30px!important;max-height:none!important;overflow:visible!important;flex:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #trade-window .trade-status p{white-space:normal!important;overflow:visible!important}
/* bestiaire en paysage : les filtres de niveau passaient sous le bas du panneau → la colonne défile */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape .bs-side{overflow-y:auto!important;overscroll-behavior:contain}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape .bs-side>*{flex-shrink:0!important}
/* accueil « Bienvenue » en paysage bas (360 px) : tient dans l'écran, défile au besoin */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-onb-welcome[open]{max-height:calc(var(--mr-vh) - var(--mr-st) - var(--mr-sb) - 12px)!important;overflow-y:auto!important;top:calc(var(--mr-st) + 6px)!important;bottom:calc(var(--mr-sb) + 6px)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-onb-welcome .onb-x{width:44px!important;height:44px!important}

/* ======================= Lot 3 : combat tour par tour (Hécate, classic-ui.js) sur téléphone ======================= */
/* Le HUD du combat est pensé pour l'ordinateur (barre centrée, ordre de jeu déplaçable) : sur téléphone, il passe sous l'encoche,
   derrière la barre du bas, ou couvre le centre de la carte en paysage. Ici : ordre de jeu en haut (portrait) ou à gauche (paysage),
   bandeau du tour fin, dock du bas en planche de bois (ressources, sorts en grille, actions), monde épuré pendant le combat. */
/* monde épuré : le combat tactique masque le HUD d'exploration (comme le combat en temps réel) */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.rv-tactic-on :is(#mr-hero,#mobile-location,#rv-onb-chip,#rv-ping,#multiplayer-toggle,#mobile-explorebar,#chat-overlay,#mp-heal,#mp-stick,#mp-pad,#zone-banner,#companions-hud,#mobile-topbar .i18n-picker){display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.rv-tactic-on #mr-gear{display:grid!important;position:fixed!important;top:var(--mr-top)!important;right:calc(var(--mr-sr) + 8px)!important;z-index:46!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.rv-tactic-on #mobile-topbar{display:block!important;height:0!important}

/* ordre de jeu (initiative) : rangée en haut, sans poignée de déplacement ; chaque portrait touché = sa fiche (existant) */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-order{position:fixed!important;left:calc(var(--mr-sl) + 8px)!important;right:auto!important;top:var(--mr-top)!important;bottom:auto!important;translate:none!important;transform:none!important;flex-direction:row!important;align-items:center!important;max-width:calc(var(--mr-vw) - var(--mr-sl) - var(--mr-sr) - 70px)!important;padding:4px 6px!important;cursor:default!important;pointer-events:auto!important;border-color:rgba(201,163,90,.62)!important;background:var(--mr-wood)!important;border-radius:14px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-grip{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-timeline{flex-direction:row!important;gap:6px!important;max-height:none!important;max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:none;padding:3px 2px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-timeline li{flex:none!important;width:44px!important;height:44px!important;cursor:pointer!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-timeline li.is-turn{transform:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-timeline i{height:5px!important}

/* bandeau du tour : sous l'ordre de jeu, une ligne */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-banner{position:fixed!important;top:calc(var(--mr-top) + 62px)!important;bottom:auto!important;left:50%!important;transform:translateX(-50%)!important;min-width:0!important;width:max-content!important;max-width:calc(var(--mr-vw) - 24px)!important;padding:6px 14px 8px!important;font-size:14px!important;line-height:1.25!important;white-space:normal!important}
/* fiche d'une unité (appui sur un portrait ou une case) : sous le bandeau */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-tip{position:fixed!important;top:calc(var(--mr-top) + 106px)!important;bottom:auto!important;font-size:14px!important;max-width:calc(var(--mr-vw) - 24px)!important}

/* dock du bas : planche pleine largeur au-dessus de la barre de geste */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-dock{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;transform:none!important;translate:none!important;max-width:none!important;width:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;padding:8px calc(10px + var(--mr-sr)) calc(8px + var(--mr-sb)) calc(10px + var(--mr-sl))!important;border-radius:18px 18px 0 0!important;border:0!important;border-top:2px solid var(--mr-gold)!important;background:var(--mr-wood)!important;pointer-events:auto!important;box-shadow:0 -8px 24px rgba(0,0,0,.45)!important}
/* ressources : PV en barre, PA et PM en grosses pastilles (lisibles d'un coup d'œil) */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-me{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-me>img{width:40px!important;height:40px!important;flex:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res{flex:1 1 auto!important;display:flex!important;gap:6px!important;min-width:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>span{height:40px!important;clip-path:none!important;border-radius:20px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;padding:0 10px!important;font-size:18px!important;border:1px solid rgba(0,0,0,.4)!important;box-shadow:inset 0 1px rgba(255,255,255,.18)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>.tc-hp{flex:1 1 auto!important;min-width:0!important;width:auto!important;position:relative!important;overflow:hidden!important;background:#1b130c!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>.tc-hp>i{position:absolute!important;inset:0 auto 0 0!important;width:var(--hp)!important;height:auto!important;background:linear-gradient(180deg,#ff7a68,#e0483c 55%,#a3261c)!important;z-index:0!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>.tc-hp>:not(i){position:relative!important;z-index:1!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>.tc-hp small{font-size:14px!important;margin:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>:is(.tc-ap,.tc-mp){flex:none!important;width:auto!important;min-width:64px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>.tc-ap{background:linear-gradient(180deg,#3d7fe0,#1f4f9c)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res>.tc-mp{background:linear-gradient(180deg,#3fae5a,#1f6e33)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res img{width:22px!important;height:22px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-res .mr-lbl{font:800 12px/1 var(--font-ui,sans-serif)!important;opacity:.9}
/* sorts : grille de 52 px, coût en PA dans le coin, relance au centre, indisponible grisé avec la raison à l'appui long */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-spells{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(52px,1fr))!important;gap:7px!important;max-width:none!important;width:100%!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-spells>button{width:auto!important;height:auto!important;aspect-ratio:1!important;min-height:48px!important;border-radius:12px!important;border:2px solid #6b5432!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-spells>button.is-on{border-color:#ffd27a!important;box-shadow:0 0 0 2px #ffd27a,0 0 16px #ffd27a99!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-spells>button:disabled{opacity:.45!important;filter:grayscale(.85)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-spells b{right:-3px!important;bottom:-3px!important;min-width:22px!important;height:22px!important;line-height:22px!important;font-size:13px!important;border:1.5px solid #fff!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-spells em{font-size:20px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-spells kbd{display:none!important}
/* actions : fin du tour en grand (protégée par un second appui, mobile-refonte.js), vue tactique et abandon discrets */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-actions{display:flex!important;flex-direction:row!important;align-items:stretch!important;gap:8px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-actions>button{min-height:48px!important;margin:0!important;font-size:15px!important;border-radius:12px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-actions>.tc-main{flex:1 1 auto!important;min-width:0!important;font-size:17px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-actions>.tc-small{flex:0 0 auto!important;min-width:84px!important;padding:0 10px!important;font-size:14px!important;line-height:1.1!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-tactic .tc-actions>[data-tc="pass"].mr-armed{background:linear-gradient(180deg,#ff9a5a,#e0582a 55%,#a3301a)!important;color:#fff!important;text-shadow:0 1px 1px #0008!important;animation:mr-arm 1s ease-in-out infinite alternate}
@keyframes mr-arm{from{box-shadow:0 0 0 0 #ffb27a}to{box-shadow:0 0 0 5px #ffb27a66}}
@media (prefers-reduced-motion:reduce){html body.mr #rv-tactic .tc-actions>[data-tc="pass"].mr-armed{animation:none!important}}

/* paysage : ordre de jeu en colonne à gauche, dock en bande basse (ressources | sorts | actions), centre de la carte libre */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-order{flex-direction:column!important;max-width:none!important;max-height:calc(var(--mr-vh) - var(--mr-top) - 90px - var(--mr-sb))!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-timeline{flex-direction:column!important;overflow-x:visible!important;overflow-y:auto!important;max-height:100%!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-banner{top:var(--mr-top)!important;max-width:calc(var(--mr-vw) - 260px)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-tip{top:calc(var(--mr-top) + 46px)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-dock{grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;padding:6px calc(10px + var(--mr-sr)) calc(6px + var(--mr-sb)) calc(10px + var(--mr-sl))!important;border-radius:16px 16px 0 0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-me>img{display:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-res{flex-direction:column!important;gap:4px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-res>span{height:30px!important;font-size:15px!important;min-width:0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-res>.tc-hp{width:150px!important;flex:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-res>:is(.tc-ap,.tc-mp){position:absolute!important;opacity:0!important;pointer-events:none!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-spells{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none;scroll-snap-type:x mandatory;padding:4px 2px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-spells>button{flex:0 0 52px!important;width:52px!important;height:52px!important;scroll-snap-align:start}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-actions>.tc-main{min-width:132px!important}
/* paysage : PA / PM en pastilles au-dessus du dock, côté droit (toujours visibles, même pendant le défilement des sorts) */
#mr-tc-pts{display:none}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape.rv-tactic-on #mr-tc-pts{display:flex;position:fixed;z-index:41;left:calc(var(--mr-sl) + 176px);bottom:calc(var(--mr-sb) + 76px);gap:6px;pointer-events:none}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.rv-tactic-on #mr-tc-pts>span{display:flex;align-items:center;gap:4px;height:34px;padding:0 10px;border-radius:17px;color:#fff;font:800 17px/1 var(--font-ui,sans-serif);text-shadow:0 1px 1px #000;border:1px solid rgba(0,0,0,.45);box-shadow:0 3px 10px rgba(0,0,0,.4)}
#mr-tc-pts .ap{background:linear-gradient(180deg,#3d7fe0,#1f4f9c)}#mr-tc-pts .mp{background:linear-gradient(180deg,#3fae5a,#1f6e33)}
#mr-tc-pts small{font:800 12px/1 var(--font-ui,sans-serif);opacity:.85}

/* case choisie au doigt (2 appuis) : losange doré + bouton « Valider » ; « Annuler » à côté */
#mr-cellpick{position:fixed;z-index:39;left:0;top:0;width:0;height:0;pointer-events:none}
#mr-cellpick[hidden]{display:none}
#mr-cellpick>i{position:absolute;left:calc(var(--w) / -2);top:calc(var(--h) / -2);width:var(--w);height:var(--h);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);background:rgba(255,214,110,.42);animation:mr-pick .9s ease-in-out infinite alternate}
#mr-cellpick>i::after{content:"";position:absolute;inset:3px;clip-path:inherit;background:rgba(255,240,190,.25)}
@keyframes mr-pick{from{opacity:1}to{opacity:.55}}
#mr-cellpick>div{position:absolute;left:0;top:calc(var(--h) / -2 - 58px);transform:translateX(-50%);display:flex;gap:6px;pointer-events:auto}
#mr-cellpick>div.is-below{top:calc(var(--h) / 2 + 10px)}
#mr-cellpick button{min-width:48px;min-height:44px;padding:0 14px;border-radius:22px;border:2px solid #fff3c4;background:linear-gradient(180deg,#ffd27a,#e9a23a 45%,#b8700f);color:#2b1802;font:800 15px/1 var(--font-ui,sans-serif);box-shadow:0 4px 14px rgba(0,0,0,.45);white-space:nowrap}
#mr-cellpick button.no{min-width:44px;padding:0;background:#2a2219;color:#efe2c0;border-color:#8a6a2c}
@media (prefers-reduced-motion:reduce){#mr-cellpick>i{animation:none}}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-actions>.tc-small{min-width:0!important;max-width:86px!important;padding:0 8px!important;font-size:13px!important;white-space:normal!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-res>.tc-hp{width:128px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-landscape #rv-tactic .tc-spells{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent)}
/* états du personnage en combat tour par tour */
#mr-tc-states{display:none}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.rv-tactic-on #mr-tc-states:not([hidden]){display:flex;flex-wrap:wrap;gap:5px;position:fixed;z-index:41;right:calc(var(--mr-sr) + 10px);max-width:60vw;justify-content:flex-end;pointer-events:none}
#mr-tc-states>span{display:flex;align-items:baseline;gap:4px;padding:5px 9px;border-radius:14px;font:800 14px/1 var(--font-ui,sans-serif);color:#fff;text-shadow:0 1px 1px #000;border:1px solid rgba(0,0,0,.45);box-shadow:0 2px 8px rgba(0,0,0,.4)}
#mr-tc-states>.good{background:linear-gradient(180deg,#3fae5a,#1f6e33)}#mr-tc-states>.bad{background:linear-gradient(180deg,#d8553f,#8f2618)}#mr-tc-states small{font-size:12px;opacity:.9}
/* combat en temps réel : zones de toucher de 44 px (mana, cartes des ennemis, menu) sans changer le dessin */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.in-battle :is(#fight-resources .fight-vital,#rv-foe-bar .fb-card){position:relative!important;overflow:visible!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.in-battle #fight-resources .fight-vital::after{content:""!important;position:absolute!important;inset:-12px 0!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.in-battle #rv-foe-bar .fb-card::after{content:""!important;position:absolute!important;inset:-5px -7px!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.in-battle #mobile-topbar #mobile-menu-toggle{min-height:44px!important}

/* ======================= Lot 4 : personnalisation (profil par orientation), monde au doigt ======================= */
/* ---------- 20. Taille des boutons (html[data-mr-btn] : s / m / l) ---------- */
html[data-mr-btn="l"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-portrait #mobile-explorebar>button{min-height:72px!important}
html[data-mr-btn="l"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-portrait #mobile-explorebar>button>:is(img,svg){width:34px!important;height:34px!important}
html[data-mr-btn="l"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-landscape #mobile-explorebar>button{width:52px!important;height:52px!important}
html[data-mr-btn="l"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr :is(#mr-gear,#multiplayer-toggle){width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important}
html[data-mr-btn="l"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr:not(.in-battle) #multiplayer-toggle{right:calc(var(--mr-sr) + 68px)!important}
html[data-mr-btn="s"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-portrait #mobile-explorebar>button{min-height:52px!important;padding-block:2px!important}
html[data-mr-btn="s"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-portrait #mobile-explorebar>button>:is(img,svg){width:24px!important;height:24px!important}
/* ---------- 21. Barre du bas compacte (icônes seules ; nom à l'appui long, mobile-ui5.js) ---------- */
html[data-mr-dens="compact"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-portrait #mobile-explorebar>button>span:not(#mobile-chat-unread){position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
html[data-mr-dens="compact"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-portrait #mobile-explorebar>button{min-height:52px!important}
html[data-mr-dens="compact"][data-mr-btn="l"]:not(#mr1):not(#mr2):not(#mr3):not(#mr4) body.mr.mr-portrait #mobile-explorebar>button{min-height:60px!important}
/* ---------- 22. Raccourcis favoris dans la barre du bas ---------- */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mobile-explorebar>.mr-fav{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;position:relative!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mobile-explorebar>.mr-fav>img{width:26px!important;height:26px!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #mobile-explorebar>.mr-fav::before{content:"★"!important;position:absolute!important;top:3px!important;right:5px!important;font-size:10px!important;color:var(--mr-gold)!important}
/* ---------- 23. Réglages › Mobile : profil, tailles, favoris, réinitialisation ---------- */
#mr-settings .mr-prof>b{font-size:16px}#mr-settings .mr-orient{color:var(--theme-accent,#e0822b)}
#mr-settings .mr-sizes button{font-weight:800}
#mr-settings .mr-favs{display:flex;flex-wrap:wrap;gap:6px}
#mr-settings .mr-favs button{min-height:44px;padding:0 12px;border-radius:22px;border:1px solid var(--theme-border,#c9b48a);background:var(--theme-card,#fffaf0);color:var(--theme-ink,#3a2a14);font:600 14px/1 var(--font-ui,sans-serif)}
#mr-settings .mr-favs button[aria-pressed="true"]{background:var(--theme-accent,#e0822b);border-color:var(--theme-accent,#e0822b);color:var(--theme-accent-text,#fff)}
#mr-settings .mr-favs button[aria-pressed="true"]::before{content:"★ "}
#mr-settings .mr-reset{width:100%;min-height:48px;border-radius:12px;border:1px dashed var(--theme-border,#c9b48a);background:transparent;color:var(--theme-ink,#3a2a14);font:700 14px/1.2 var(--font-ui,sans-serif)}
#mr-settings [data-mr="zoom"] button{font-size:18px;font-weight:800}#mr-settings [data-mr="zoom"] .mr-zv{font-size:14px}
/* ---------- 24. Monde : anneau au toucher, choix entre entités superposées, recentrer ---------- */
.mr-ripple{position:fixed;z-index:30;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;border:2.5px solid rgba(255,236,170,.95);box-shadow:0 0 10px rgba(255,210,110,.7);pointer-events:none;animation:mr-ripple .5s ease-out forwards}
@keyframes mr-ripple{from{transform:scale(.35);opacity:1}to{transform:scale(1.25);opacity:0}}
@media (prefers-reduced-motion:reduce){.mr-ripple{animation-duration:.01s}}
#mr-pick{position:fixed;z-index:95;display:flex;flex-direction:column;gap:4px;min-width:200px;max-width:calc(100vw - 16px);padding:8px;border-radius:14px;background:var(--mr-wood);border:1px solid var(--mr-gold-line);box-shadow:0 10px 30px rgba(0,0,0,.55);color:var(--mr-ink)}
#mr-pick[hidden]{display:none}
#mr-pick>b{font:700 13px/1.2 var(--font-ui,sans-serif);color:#e8d6a8;padding:2px 4px 4px}
#mr-pick>button{min-height:44px;padding:0 12px;border-radius:10px;border:1px solid rgba(201,163,90,.35);background:rgba(255,255,255,.06);color:#fff3d6;font:700 15px/1.15 var(--font-ui,sans-serif);text-align:left}
#mr-pick>button:active{background:var(--mr-wood-hi)}
#mr-recenter{position:fixed;z-index:43;right:calc(var(--mr-sr) + 12px);bottom:calc(var(--mr-sb) + 150px);width:48px;height:48px;display:grid;place-items:center;padding:0;border-radius:50%;background:var(--mr-wood);border:1.5px solid var(--mr-gold-line);color:#f3e3bc;box-shadow:0 4px 12px rgba(0,0,0,.45)}
#mr-recenter[hidden],body:not(.mr) #mr-recenter{display:none}
#mr-recenter svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8}
body.mr.mr-landscape #mr-recenter{right:calc(var(--mr-sr) + 70px);bottom:calc(var(--mr-sb) + 14px)}
/* finitions : bandeau du nom de zone sous les pastilles du haut (portrait), objectifs à 44 px de haut */
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr.mr-portrait #zone-banner{top:calc(var(--mr-top) + 160px)!important}
html:not(#mr1):not(#mr2):not(#mr3):not(#mr4):not(#mr5) body.mr #rv-onb-chip{min-height:44px!important}
