/* Interface mobile v2 (17/10/2026) : chargée en dernier, ne vise que les téléphones (≤ 600 px, ou paysage ≤ 500 px de haut).
   Au-dessus de 600 px (tablette, ordinateur), rien ne change.
   Principes : HUD en rangées fixes (barre du haut → pastilles → salle de donjon), colonne de petits boutons à droite,
   chat replié translucide, rien au milieu de l'écran. Les ids répétés battent les règles « html body … !important » plus anciennes. */
@media (max-width:600px),(max-width:1000px) and (max-height:500px){
:root{--m2-top:env(safe-area-inset-top,0px);--m2-bar:38px;--m2-rowA:calc(var(--m2-top) + 52px);--m2-rowB:calc(var(--m2-top) + 86px);--m2-col:50px;--m2-chip:26px;--m2-bg:rgba(30,22,13,.78);--m2-line:rgba(201,163,90,.55);--m2-text:#f6e8c6}:root:where([data-theme="nuit"]){--m2-bg:rgba(15,20,28,.78)}

/* ---------- 1. Barre du haut : un peu plus basse ---------- */
html body.mobile-ui-ready #mobile-topbar#mobile-topbar>button{min-height:var(--m2-bar)!important;padding:5px 10px!important;border-radius:11px!important}
html body.mobile-ui-ready #mobile-topbar#mobile-topbar>button *{font-size:12px}
html body.mobile-ui-ready #mobile-topbar#mobile-topbar #mobile-menu-toggle{min-width:44px!important}

/* ---------- 2. Colonne de droite : boutons ronds de 36 px, alignés ---------- */
html body:not(.in-battle) #multiplayer-toggle#multiplayer-toggle#multiplayer-toggle,
html body #feedback-fab#feedback-fab#feedback-fab,
html body #support-open#support-open.support-chip{position:fixed!important;left:auto!important;right:8px!important;bottom:auto!important;width:36px!important;height:36px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;display:inline-flex;align-items:center;justify-content:center;gap:0!important;border-radius:11px!important;font-size:0!important;transform:none!important;box-shadow:0 2px 8px #0005!important}
html body:not(.in-battle) #multiplayer-toggle#multiplayer-toggle#multiplayer-toggle{top:var(--m2-rowA)!important}
html body #feedback-fab#feedback-fab#feedback-fab{top:calc(var(--m2-rowA) + 42px)!important;font-size:16px!important;line-height:1!important;opacity:.8}
html body #feedback-fab#feedback-fab#feedback-fab :not(:first-child){display:none!important}
html body #support-open#support-open.support-chip{top:calc(var(--m2-rowA) + 84px)!important}
html body:not(.in-battle) #leaderboard-fab#leaderboard-fab#leaderboard-fab{position:fixed!important;left:auto!important;right:8px!important;bottom:auto!important;top:calc(var(--m2-rowA) + 126px)!important;width:36px!important;height:36px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;display:inline-flex;align-items:center;justify-content:center;border-radius:11px!important;font-size:0!important;transform:none!important}
html body #leaderboard-fab#leaderboard-fab#leaderboard-fab>span{font-size:16px!important;line-height:1}html body #leaderboard-fab#leaderboard-fab#leaderboard-fab>b{display:none!important}
html body #leaderboard-fab#leaderboard-fab#leaderboard-fab[hidden]{display:none!important}
html body #support-open#support-open.support-chip .sc-text{display:none!important}
html body #support-open#support-open.support-chip img{width:24px!important;height:24px!important}
html body #multiplayer-toggle#multiplayer-toggle#multiplayer-toggle svg{width:19px;height:19px}
html body #multiplayer-toggle#multiplayer-toggle#multiplayer-toggle :is(#multiplayer-count,.mp-count,b,small){font-size:10px!important}
html body #support-open#support-open.support-chip[hidden],html body #feedback-fab#feedback-fab#feedback-fab[hidden],
html body:is(.in-battle,.desktop-map-open,.mobile-map-open) #support-open#support-open.support-chip,html body.in-battle #feedback-fab#feedback-fab#feedback-fab{display:none!important}

/* ---------- 3. Pastilles du haut : une seule rangée qui défile ---------- */
html body:not(.in-battle) #rv-ping#rv-ping.is-floating{top:var(--m2-rowA)!important;left:8px!important;height:var(--m2-chip);max-width:72px;box-sizing:border-box;padding:0 7px 0 6px!important;gap:4px;overflow:hidden}
html[data-theme] body #rv-ping#rv-ping#rv-ping.is-floating,html[data-theme] body #rv-ping#rv-ping#rv-ping.is-floating span{font-size:10.5px!important}
html body:not(.in-battle) #rv-top-stack#rv-top-stack{top:var(--m2-rowA)!important;left:84px!important;right:var(--m2-col)!important;transform:none!important;max-width:none!important;flex-direction:row!important;flex-wrap:nowrap!important;justify-content:flex-start!important;align-items:center!important;gap:5px!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 14px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 14px),transparent);padding-right:12px}
html body #rv-top-stack#rv-top-stack::-webkit-scrollbar{display:none}
html body #rv-top-stack#rv-top-stack>*{flex:none!important;height:var(--m2-chip)!important;max-width:none!important;box-sizing:border-box;padding:0 9px!important;gap:4px!important;font-size:11px!important;line-height:1!important;border-radius:999px!important;white-space:nowrap;animation:none!important;box-shadow:0 1px 5px #0006!important}
html body #rv-top-stack#rv-top-stack>* small{font-size:10.5px!important}
/* textes longs → valeur courte (le détail reste au toucher : chaque pastille ouvre sa fenêtre) */
html body #rv-top-stack#rv-top-stack #weekend-chip b{font-size:0}html body #rv-top-stack#rv-top-stack #weekend-chip b::after{content:'Week-end';font-size:11px}
html body #rv-top-stack#rv-top-stack #community-chip :is(.cc-chars,.cc-sep){display:none!important}
html body #rv-top-stack#rv-top-stack #community-chip .cc-goal{margin-left:2px}
html body #rv-top-stack#rv-top-stack #rv-gw-pill :is(.rv-gw-name,.rv-gw-sep,.rv-gw-shine){display:none!important}
html body #rv-top-stack#rv-top-stack #rv-afk span{display:none!important}
html body #rv-top-stack#rv-top-stack #rv-afk[data-m2-short] b::after{content:' ' attr(data-m2-short);font-weight:700;opacity:.9}
html body #rv-top-stack#rv-top-stack #rv-afk button{height:20px;padding:0 7px;font-size:10.5px}
html body #rv-top-stack#rv-top-stack #rv-palier-boost .rv-palier-label{max-width:90px;overflow:hidden;text-overflow:ellipsis}
/* détail au toucher (#rv-afk n'ouvre pas de fenêtre) : bulle sous la rangée */
.m2-tip{position:fixed;z-index:70;top:calc(var(--m2-rowA) + 32px);left:8px;right:8px;padding:8px 11px;border-radius:10px;background:var(--m2-bg);border:1px solid var(--m2-line);color:var(--m2-text);font:600 12px/1.35 var(--font-ui,sans-serif);box-shadow:0 4px 14px #0007}

/* ---------- 4. Salle de donjon : une ligne, « Quitter » à côté ---------- */
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar{top:var(--m2-rowB)!important;left:8px!important;right:calc(var(--m2-col) + 74px)!important;transform:none!important;max-width:none!important;width:auto!important;height:32px;box-sizing:border-box;display:flex;flex-wrap:nowrap;gap:6px;padding:0 3px 0 9px!important;border-radius:10px!important;font-size:11.5px!important;line-height:1!important;white-space:nowrap;box-shadow:0 2px 8px #0006!important}
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar .drb-room{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar .drb-room b{font-weight:800}
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar :is(.drb-count,.drb-wait){flex:none;font-size:10.5px}
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar :is(.drb-go,.drb-summon){flex:none;height:26px;padding:0 9px!important;font-size:0!important;border-radius:8px!important}
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar .drb-go::after{content:'⚔ Combattre';font:800 11.5px/1 var(--font-ui,sans-serif)}
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar .drb-summon::after{content:'Rappeler';font:800 11.5px/1 var(--font-ui,sans-serif)}
html body #dungeon-exit#dungeon-exit#dungeon-exit{top:var(--m2-rowB)!important;bottom:auto!important;left:auto!important;right:var(--m2-col)!important;transform:none!important;width:70px;height:32px;box-sizing:border-box;padding:0 6px!important;font-size:0!important;border-radius:10px!important;opacity:1!important;white-space:nowrap;overflow:hidden;background:#3a1f15e6!important;border-color:#b0603a!important}html:where([data-theme="nuit"]) body #dungeon-exit#dungeon-exit#dungeon-exit{background:#1b2434e6!important;border-color:#4f6b9b!important}
html body #dungeon-exit#dungeon-exit#dungeon-exit::after{content:'⇱ Sortir';font:800 11.5px/1 var(--font-ui,sans-serif);color:#ffe2c8}
html body.in-battle #dungeon-exit#dungeon-exit#dungeon-exit{display:none!important}
/* « Premiers pas » : pastille compacte, sous la salle de donjon s'il y en a une */
html body #rv-onb-chip#rv-onb-chip{top:var(--m2-rowB)!important;left:8px!important;max-width:min(200px,calc(100vw - 130px))!important;padding:3px 10px 3px 3px!important;gap:6px!important;transform:none!important}
html body:has(#dungeon-room-bar) #rv-onb-chip#rv-onb-chip{top:calc(var(--m2-rowB) + 38px)!important}
html body #rv-onb-chip#rv-onb-chip :is(.onb-ring,svg){width:26px!important;height:26px!important}
html body #rv-onb-chip#rv-onb-chip *{font-size:11px!important;line-height:1.15!important}

/* ---------- 5. Nom au-dessus du personnage : petit, sans plaque de guilde ---------- */
html[data-theme] body :is(#label,.remote-player-label):is(#label,.remote-player-label):is(#label,.remote-player-label){font-size:10.5px!important;line-height:1.2!important;padding:1px 6px!important;min-width:0!important;max-width:150px!important;border-width:1px!important;box-shadow:0 1px 3px #0008!important;letter-spacing:0!important}
html[data-theme] body :is(#label,.remote-player-label):is(#label,.remote-player-label):is(#label,.remote-player-label).has-guild:not([data-x-none]){padding:1px 6px!important;min-width:0!important;text-align:center!important}
html[data-theme] body :is(#label,.remote-player-label):is(#label,.remote-player-label) .lbl-guild{display:none!important}
html[data-theme] body :is(#label,.remote-player-label):is(#label,.remote-player-label)[data-title]:not([data-title=""])::after{font-size:8.5px!important;line-height:1.1!important;letter-spacing:0!important}
html[data-theme] body :is(#label,.remote-player-label):is(#label,.remote-player-label)[data-fx-frame]:not([data-fx-frame=""]){padding:1px 7px!important;border-width:1.5px!important}

/* ---------- 6. Chat replié : 3 lignes, translucide, 12 px ---------- */
html body #chat-overlay#chat-overlay#chat-overlay{left:8px!important;width:min(74vw,300px)!important;bottom:calc(env(safe-area-inset-bottom,0px) + 80px);font-size:12px!important;padding:2px 0 0!important;background:rgba(22,16,9,.42)!important;border:1px solid rgba(201,163,90,.3)!important;border-radius:10px!important;box-shadow:none!important;backdrop-filter:none!important;overflow:hidden}html:where([data-theme="nuit"]) body #chat-overlay#chat-overlay#chat-overlay{background:rgba(11,14,20,.42)!important}
html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed{max-height:calc(3 * 1.4em + 4px)!important;padding:1px 8px 0!important;background:none!important;border-radius:0!important;overflow:hidden!important}
html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed:has(p.m2-open){max-height:calc(8 * 1.4em)!important}
html[data-chat-lines] body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p,html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p{display:block!important;margin:0!important;font-size:12px!important;line-height:1.4!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:unset}
html[data-chat-lines] body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p:nth-last-child(n+4),html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p:nth-last-child(n+4){display:none!important}
/* messages du serveur à la suite : un seul affiché, marqué « ⋯ » ; plus pâles et en 11,5 px */
html[data-chat-lines] body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p.is-server:has(+ p.is-server),html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p.is-server:has(+ p.is-server){display:none!important}
html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p:is(.is-server,.is-announce,.is-journal){font-size:11.5px!important;font-weight:700!important;opacity:.9}
html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p.is-server+p.is-server::before{content:'⋯';display:inline-block;margin-right:4px;padding:0 4px;border-radius:6px;background:#0006;font-size:10px;line-height:14px;vertical-align:1px}
html[data-chat-lines] body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p.m2-open,html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-feed p.m2-open{white-space:normal!important;overflow:visible!important}
html body #chat-overlay#chat-overlay#chat-overlay .chat-ov-time{font-size:9.5px!important;margin-right:3px!important;opacity:.65}
/* onglets : une rangée compacte qui défile, pastilles de non-lus dans le bouton */
html body #chat-overlay#chat-overlay#chat-overlay .chat-ov-tabs{display:flex!important;flex-wrap:nowrap!important;gap:3px!important;margin:3px 0 0!important;padding:0 5px 4px!important;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
html body #chat-overlay#chat-overlay#chat-overlay .chat-ov-tabs::-webkit-scrollbar{display:none}
html body #chat-overlay#chat-overlay#chat-overlay .chat-ov-tabs button{flex:none!important;position:relative;min-height:22px!important;height:22px;padding:0 8px!important;border-radius:999px!important;font:800 10.5px/22px var(--font-ui,sans-serif)!important;opacity:.85}
html body #chat-overlay#chat-overlay#chat-overlay .chat-ov-tabs [data-ov-ch][data-unread]::after{position:static!important;display:inline-block;margin-left:4px;min-width:14px;height:14px;padding:0 3px;border-radius:7px;font:800 9px/14px var(--font-ui,sans-serif)!important;vertical-align:1px;box-sizing:border-box}
html body #chat-overlay#chat-overlay#chat-overlay .chat-ov-grip{display:none!important}
html body #chat-overlay#chat-overlay#chat-overlay .chat-overlay-form{display:none!important}

/* ---------- 7. Cadre d'équipe replié : discret ---------- */
html body #rv-teamframe#rv-teamframe.is-folded{width:auto!important;max-width:150px;font-size:11px!important;opacity:.92}
html body #rv-teamframe#rv-teamframe.is-folded .tf-head{padding:4px 8px!important;gap:6px}
html body #rv-teamframe#rv-teamframe.is-folded .tf-head>b{display:none}

/* ---------- 8. Fenêtres : rien ne dépasse de l'écran ---------- */
html body dialog[open]:not(#mobile-menu-sheet){max-width:100vw!important;box-sizing:border-box}
/* fin de combat : le tableau (6 colonnes, coupé à droite) devient une liste de cartes */
html body #rv-fight-result#rv-fight-result .rt-wrap{overflow:visible!important}
html body #rv-fight-result#rv-fight-result .rt-table{display:block!important;background:none!important;font-size:12px!important}
html body #rv-fight-result#rv-fight-result .rt-table thead{display:none!important}
html body #rv-fight-result#rv-fight-result .rt-table tbody{display:grid!important;gap:3px}
html body #rv-fight-result#rv-fight-result .rt-table tr{display:flex!important;flex-wrap:wrap;align-items:center;gap:2px 10px;padding:4px 8px;border-radius:7px;background:#d4cba3}
html body #rv-fight-result#rv-fight-result .rt-table tr:nth-child(odd){background:#c9bf95}
html body #rv-fight-result#rv-fight-result .rt-table td{display:block!important;padding:0!important;border:0!important;background:none!important;white-space:nowrap}
html body #rv-fight-result#rv-fight-result .rt-table td:empty{display:none!important}
html body #rv-fight-result#rv-fight-result .rt-table td:nth-child(1){flex:1 1 100%;min-width:0;overflow:hidden;text-overflow:ellipsis}
html body #rv-fight-result#rv-fight-result .rt-table td:nth-child(2)::before{content:'Niv. ';opacity:.7}
html body #rv-fight-result#rv-fight-result .rt-table td:nth-child(4)::before{content:'Guilde ';opacity:.7}
html body #rv-fight-result#rv-fight-result .rt-table td:nth-child(5)::before{content:'Kamas ';opacity:.7}
html body #rv-fight-result#rv-fight-result .rt-table td:nth-child(6){flex:1 1 100%;white-space:normal}
html body #rv-fight-result#rv-fight-result .rt-xp span{min-width:0!important;padding:1px 8px!important}
/* un seul bouton de fermeture : « Continuer » en bas ; le ✕ du bandeau (et son infobulle « Fermer ») faisait doublon (17/10/2026) */
html body #rv-fight-result#rv-fight-result .tc-banner .tc-x{display:none!important}
html body #rv-fight-result#rv-fight-result .tc-banner .tc-shrink{right:12px!important}
}

/* ---------- 9. Console d'administration (hors onglet Paliers YouTube › Vérification, refait à part : #ytv-admin / .ytv-*) ---------- */
@media (max-width:600px),(max-width:1000px) and (max-height:500px){
html body dialog#admin-panel#admin-panel{inset:0!important;margin:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important;box-shadow:none!important}
html body #admin-panel#admin-panel .admin-heading{padding:6px 8px 6px 12px!important;min-height:0!important;gap:8px}
html body #admin-panel#admin-panel .admin-heading>div{gap:8px!important;min-width:0}
html body #admin-panel#admin-panel .admin-heading img{width:22px!important;height:22px!important}
html body #admin-panel#admin-panel .admin-heading span{display:none!important}
html body #admin-panel#admin-panel .admin-heading h2{font-size:16px!important;line-height:1.2!important;margin:0!important}
html body #admin-panel#admin-panel #admin-close{width:36px!important;height:36px!important;min-height:36px!important;font-size:18px!important}
/* onglets : une rangée compacte qui défile (icône + mot), l'actif bien marqué */
html body #admin-panel#admin-panel .admin-tabs{flex-wrap:nowrap!important;gap:4px!important;padding:6px 8px!important;overflow-x:auto!important;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;scroll-snap-type:x proximity;border-bottom:1px solid var(--window-line,#8a6a2c)!important}html:where([data-theme="nuit"]) body #admin-panel#admin-panel .admin-tabs{border-bottom:1px solid var(--window-line,#3d5379)!important}
html body #admin-panel#admin-panel .admin-tabs::-webkit-scrollbar{display:none}
html body #admin-panel#admin-panel .admin-tabs button{flex:none!important;scroll-snap-align:start;min-height:36px!important;height:36px;padding:0 10px!important;gap:5px!important;border-radius:999px!important;border:1px solid var(--window-line,#8a6a2c)!important;font-size:12.5px!important;line-height:1!important;box-shadow:none!important;transform:none!important}html:where([data-theme="nuit"]) body #admin-panel#admin-panel .admin-tabs button{border:1px solid var(--window-line,#3d5379)!important}
html body #admin-panel#admin-panel .admin-tabs button span{display:inline!important}
html body #admin-panel#admin-panel .admin-tabs img{width:16px!important;height:16px!important}
html body #admin-panel#admin-panel .admin-tabs button[aria-pressed=true]{background:var(--window-chrome,#3b2c18)!important;color:var(--window-text,#f6e7c3)!important;box-shadow:none!important}html:where([data-theme="nuit"]) body #admin-panel#admin-panel .admin-tabs button[aria-pressed=true]{background:var(--window-chrome,#1d2636)!important}
html body #admin-panel#admin-panel .admin-tabs b{font-size:10.5px!important;padding:0 5px!important;line-height:16px}
html body #admin-panel#admin-panel .admin-tabs [data-admin-refresh]{width:36px!important;padding:0!important;justify-content:center}
/* contenu : marges serrées, rien ne dépasse, boutons au doigt (≥ 36 px) */
html body #admin-panel#admin-panel #admin-content{overflow-x:hidden!important;-webkit-overflow-scrolling:touch}
html body #admin-panel#admin-panel :is(.admin-pad,.admin-directory,.admin-selection){padding:10px!important}
html body #admin-panel#admin-panel #admin-content :is(button,select,input:not([type=checkbox]):not([type=radio]),.admin-link-btn,a.admin-studio-link):not(.admin-link):not(#ytv-admin *){min-height:36px!important;font-size:13px!important;line-height:1.2!important}
html body #admin-panel#admin-panel #admin-content :is(button):not(.admin-link):not(#ytv-admin *){padding:6px 10px!important;box-shadow:none!important}
html body #admin-panel#admin-panel #admin-content :is(p,li,dd,dt,small,label,.admin-note,.admin-hint){overflow-wrap:anywhere}
html body #admin-panel#admin-panel .admin-section-caption{flex-wrap:wrap;gap:4px 10px;margin:10px 0 6px!important;font-size:13px}
html body #admin-panel#admin-panel .admin-section-caption span{font-size:12px}
/* tableau de bord : tuiles 2 × 3 compactes */
html body #admin-panel#admin-panel .admin-stats{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
html body #admin-panel#admin-panel .admin-stat{padding:7px 9px!important;min-height:0!important;border-radius:8px!important;column-gap:7px!important}
html body #admin-panel#admin-panel .admin-stat img{width:22px!important;height:22px!important}
html body #admin-panel#admin-panel .admin-stat b{font-size:17px!important;line-height:1.1!important}
html body #admin-panel#admin-panel .admin-stat span{font-size:11.5px!important;line-height:1.2!important}
/* listes et fiches en cartes empilées */
html body #admin-panel#admin-panel .admin-layout{display:block!important}
html body #admin-panel#admin-panel .admin-layout.has-selection .admin-directory{display:none!important}
html body #admin-panel#admin-panel .admin-players{max-height:none!important;display:grid;gap:6px}
html body #admin-panel#admin-panel .admin-players>button{padding:7px 9px!important;border-radius:8px!important;min-height:48px!important}
html body #admin-panel#admin-panel .admin-players>button .admin-identity small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11.5px}
html body #admin-panel#admin-panel .admin-avatar img{width:34px!important;height:34px!important}
html body #admin-panel#admin-panel .admin-selection header{padding:10px!important;border-radius:10px!important}
html body #admin-panel#admin-panel .admin-selection header .admin-identity strong{font-size:16px!important}
html body #admin-panel#admin-panel .admin-back{min-height:36px!important;margin-bottom:8px!important}
html body #admin-panel#admin-panel :is(.admin-action-groups,.admin-action-form){padding:10px!important;border-radius:10px!important}
html body #admin-panel#admin-panel .admin-action-group{display:grid!important;grid-template-columns:1fr!important;gap:4px!important}
html body #admin-panel#admin-panel .admin-action-group>span{padding:0!important}
html body #admin-panel#admin-panel .admin-action-group>div{display:grid!important;grid-template-columns:1fr 1fr;gap:6px!important}
html body #admin-panel#admin-panel .admin-action-group button{justify-content:center;text-align:center;font-size:12.5px!important;padding:5px 8px!important;line-height:1.15!important}
html body #admin-panel#admin-panel :is(.admin-sheet-grid,.admin-stats.is-compact){grid-template-columns:1fr 1fr!important;gap:6px!important}
html body #admin-panel#admin-panel .admin-sheet-grid{grid-template-columns:1fr!important}
html body #admin-panel#admin-panel .admin-proof{display:grid;gap:4px}
html body #admin-panel#admin-panel .admin-proof>div{display:grid;grid-template-columns:minmax(80px,auto) 1fr;gap:6px;font-size:12.5px}
html body #admin-panel#admin-panel .admin-bag{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(44px,1fr))!important;gap:4px!important}
/* journal, chat, signalements : cartes compactes */
html body #admin-panel#admin-panel :is(.admin-log,.admin-chat article,.admin-reports article,.admin-access-row,.ag-list>li){padding:8px 10px!important;border-radius:8px!important;margin:0 0 6px!important;font-size:12.5px!important;gap:4px!important}
html body #admin-panel#admin-panel .admin-log{display:grid!important;grid-template-columns:1fr!important}
html body #admin-panel#admin-panel .admin-log small{text-align:left!important}
html body #admin-panel#admin-panel .admin-chat article{display:flex!important;flex-direction:column!important;align-items:stretch!important}
html body #admin-panel#admin-panel .admin-chat article>span{display:grid!important;grid-template-columns:repeat(3,1fr);gap:5px}
html body #admin-panel#admin-panel .admin-chat article>span button{font-size:12px!important;padding:4px 6px!important}
html body #admin-panel#admin-panel .admin-reports small{word-break:break-word}
html body #admin-panel#admin-panel .admin-access-row{display:flex!important;flex-wrap:wrap;align-items:center;gap:6px!important}
html body #admin-panel#admin-panel .admin-access-row>span{flex:1 1 100%;min-width:0}
html body #admin-panel#admin-panel .admin-access-row>em{flex:none!important;width:auto!important}
html body #admin-panel#admin-panel .admin-access-row>button{flex:none!important;margin-left:auto}
html body #admin-panel#admin-panel .admin-access-state{display:grid!important;grid-template-columns:1fr;gap:8px}
html body #admin-panel#admin-panel .ag-row{display:grid!important;grid-template-columns:auto 1fr;gap:2px 8px;align-items:center}
html body #admin-panel#admin-panel .ag-row small{grid-column:2}
html body #admin-panel#admin-panel .ag-bar{display:grid!important;grid-template-columns:1fr auto;gap:8px;align-items:center}
/* filtres en ligne (journal : action + recherche) → empilés */
html body #admin-panel#admin-panel :is(.admin-log-filter,.admin-search,.admin-segment,.admin-subtabs){flex-wrap:wrap!important;gap:6px!important}
html body #admin-panel#admin-panel .admin-segment button{flex:1 1 auto}
html body #admin-panel#admin-panel .admin-footer{padding:6px 10px!important;font-size:11px!important}
html body #admin-panel#admin-panel .admin-footer img{width:16px;height:16px}
/* téléportation : la carte tient dans la largeur */
html body #admin-panel#admin-panel :is(.admin-tp,.admin-map,.admin-tp-canvas,canvas){max-width:100%!important;height:auto}
/* événements (admin-events-ui) : grilles d'icônes et de choix plus serrées */
html body #admin-panel#admin-panel .aev-grid{padding:10px!important;gap:10px!important}
html body #admin-panel#admin-panel .aev :is(.aev-icons,.aev-icon-grid){grid-template-columns:repeat(auto-fill,minmax(40px,1fr))!important;gap:5px!important}
}

/* Paysage (téléphone couché) : chat plus étroit, rangées plus serrées */
@media (max-width:1000px) and (max-height:500px){
:root{--m2-rowA:calc(var(--m2-top) + 50px);--m2-rowB:calc(var(--m2-top) + 82px)}
html body #chat-overlay#chat-overlay#chat-overlay{width:min(40vw,330px)!important;bottom:calc(env(safe-area-inset-bottom,0px) + 74px)}
:root{--m2-dj:min(440px,calc(100vw - 150px))}
html body #dungeon-room-bar#dungeon-room-bar#dungeon-room-bar{right:auto!important;width:var(--m2-dj)!important}
html body #dungeon-exit#dungeon-exit#dungeon-exit{right:auto!important;left:calc(14px + var(--m2-dj))!important}
}
