/* On small screens, exploration and combat each keep only their useful controls. */
#mobile-topbar,#mobile-explorebar,#mobile-map-close{display:none}
#mobile-menu-sheet:not([open]){display:none}
@media(max-width:700px), (max-width:1000px) and (max-height:500px){
 body.mobile-ui-ready{--mobile-safe-bottom:env(safe-area-inset-bottom,0px);--mobile-safe-top:env(safe-area-inset-top,0px);--mobile-nav-height:64px;--hud-dock-height:72px}
 body.mobile-ui-ready :is(.title,.tools,.combat-launch,.monster-toggle,#game-topbar,.notice,.help){display:none!important}
 body.mobile-ui-ready:not(.in-battle) #spell-dock{display:none!important}
 body.mobile-ui-ready #mobile-topbar{position:fixed;top:calc(8px + var(--mobile-safe-top));left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));z-index:44;display:flex;justify-content:space-between;gap:12px;pointer-events:none}
 body.mobile-ui-ready #mobile-topbar>button{pointer-events:auto;display:flex;align-items:center;gap:7px;min-height:44px;max-width:calc(100% - 90px);padding:7px 12px;border-radius:12px;background:var(--theme-chrome);border:1px solid var(--theme-chrome-line);color:var(--theme-chrome-text);font-size:12px;box-shadow:0 3px 12px #0003;backdrop-filter:blur(12px)}
 #mobile-location img{width:19px;height:19px;object-fit:contain;flex:none}.mobile-location-name{font-weight:800}#mobile-location-coords{font-size:11.5px;color:var(--theme-chrome-muted);white-space:nowrap}
 body.mobile-ui-ready #mobile-menu-toggle{max-width:none;min-width:77px;justify-content:center;font-weight:700}#mobile-menu-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}
 #mobile-account-state{display:none}body.mobile-ui-ready #mobile-menu-toggle[data-status=error]{border-color:var(--theme-negative);background:var(--theme-paper);color:var(--theme-negative)}#mobile-account-state[data-status=error]{display:inline;font-size:11.5px}
 body.mobile-ui-ready #mobile-explorebar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;z-index:42;bottom:calc(8px + var(--mobile-safe-bottom));left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));min-height:var(--mobile-nav-height);padding:4px 5px;background:var(--theme-chrome);border:1px solid var(--theme-chrome-line);border-radius:14px;box-shadow:0 6px 22px #0004;backdrop-filter:blur(12px)}
 body.mobile-ui-ready #mobile-explorebar button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:54px;padding:6px 3px;border:0;border-radius:9px;font-size:11.5px;line-height:1.3;color:var(--theme-chrome-text);background:transparent}
 #mobile-explorebar button+button{border-left:1px solid color-mix(in srgb,var(--theme-chrome-line) 45%,transparent)!important;border-radius:0!important}#mobile-explorebar img{width:24px;height:24px;object-fit:contain}#mobile-explorebar svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.5}
 body.mobile-ui-ready #mobile-explorebar button:disabled{opacity:.45}#mobile-chat-unread{position:absolute;right:17%;top:2px;background:var(--theme-gold);color:var(--theme-chrome);min-width:18px;height:18px;line-height:18px;border-radius:10px;padding:0 4px;font-size:11.5px;font-weight:800}
 #mobile-chat-unread[hidden]{display:none!important}body.mobile-ui-ready.in-battle #mobile-explorebar{display:none}
 body.mobile-ui-ready .map{display:none!important}
 body.mobile-ui-ready .map header{padding-right:40px;min-height:32px;align-items:center;gap:12px}body.mobile-ui-ready .map canvas{width:100%!important;height:auto!important;aspect-ratio:1.5}body.mobile-ui-ready .map .map-progress{margin-top:9px;font-size:11.5px!important}
 body.mobile-ui-ready #mobile-map-close{display:grid;place-items:center;position:absolute;right:5px;top:5px;width:40px;height:40px;padding:0;color:var(--theme-chrome-text);font-size:20px;background:transparent;border:0}
 body.mobile-ui-ready #label{font-size:11.5px!important;padding:3px 7px;border-radius:5px;max-width:175px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 /* Secondary controls live in a native dialog, which pauses the game. */
 #mobile-menu-sheet #account-menu{padding:0;margin:0 0 18px;border:1px solid var(--theme-border);border-radius:12px;background:var(--theme-card);overflow:hidden}#mobile-menu-sheet #account-trigger{padding:11px 12px;min-height:58px;gap:10px}#mobile-menu-sheet #account-trigger>img{width:30px;height:36px}#mobile-menu-sheet #account-trigger strong{font-size:13px}#mobile-menu-sheet #account-trigger small{font-size:11.5px}
 body.mobile-ui-ready #mobile-menu-sheet #account-control{position:static;inset:auto;width:100%;max-width:none;max-height:none;padding:14px;border-width:1px 0 0;border-radius:0;box-shadow:none;overflow:visible}#mobile-menu-sheet #account-control .account-heading h2{font-size:21px}#mobile-menu-sheet #account-control .account-shortcuts{display:none}#mobile-menu-sheet #account-control :is(button,a){min-height:44px}#mobile-menu-sheet #account-control #account-logout{min-height:44px!important}
 body.mobile-ui-ready :is(#mobile-topbar,#mobile-explorebar,#mobile-menu-sheet) :is(button,a,summary):focus-visible{outline:2px solid var(--theme-gold);outline-offset:2px}
 /* Existing spell buttons retain their handlers, cooldowns and target states. */
 body.mobile-ui-ready.in-battle #spell-dock{display:block!important;bottom:calc(8px + var(--mobile-safe-bottom))!important;left:50%!important;right:auto!important;width:calc(100% - 16px)!important;max-width:520px!important;padding:10px 12px 8px!important;border-radius:14px!important}
 body.mobile-ui-ready.in-battle #spell-dock :is(#player-strip,.dock-identity,.dock-book,.combat-help-button){display:none!important}body.mobile-ui-ready.in-battle #spell-dock .dock-main{min-height:60px;justify-content:center;gap:0!important}
 body.mobile-ui-ready.in-battle #spell-bar{justify-content:center;gap:14px;flex:none}body.mobile-ui-ready.in-battle #spell-bar :is(.spell-slot,.spell-empty){width:56px!important;height:56px!important}body.mobile-ui-ready.in-battle #spell-bar .spell-slot img{width:40px;height:40px}body.mobile-ui-ready.in-battle #spell-bar :is(.spell-key,.spell-rank){display:none!important}
 body.mobile-ui-ready.in-battle #cast-action{padding-right:0!important;margin-top:8px;min-height:24px;flex-wrap:wrap;gap:6px;justify-content:center}body.mobile-ui-ready.in-battle #cast-name{font-size:11.5px!important;line-height:1.4;flex:1 1 180px;max-width:100%;text-align:center;white-space:normal;overflow:visible}body.mobile-ui-ready.in-battle #cast-action #cast-info{display:none!important}
 body.mobile-ui-ready.in-battle :is(#cast-self,#cast-cancel){min-height:38px;padding:7px 10px!important;border:1px solid var(--theme-chrome-line);border-radius:8px;font-size:11.5px;color:var(--theme-chrome-text);background:var(--theme-chrome-2);flex:none}
 body.mobile-ui-ready.in-battle #consume-item{min-height:44px;min-width:74px;padding:7px 10px}
 body.mobile-ui-ready.in-battle #fight-hud{top:calc(60px + var(--mobile-safe-top))!important;width:calc(100% - 16px)!important;max-width:520px;min-height:0;gap:6px!important;padding:5px 7px!important;z-index:43!important}body.mobile-ui-ready.in-battle #fight-status{display:none!important}body.mobile-ui-ready.in-battle #fight-resources{gap:5px!important}body.mobile-ui-ready.in-battle #fight-hud .fight-vital{min-width:0;min-height:39px}
 body.mobile-ui-ready.in-battle #leave-fight{min-height:40px;padding:7px!important;font-size:11.5px}body.mobile-ui-ready.in-battle #battle-feedback{top:calc(119px + var(--mobile-safe-top))!important;max-width:calc(100vw - 28px);padding:7px 10px;font-size:11.5px}
 body.mobile-ui-ready #monster-context{top:auto!important;bottom:calc(var(--mobile-nav-height) + 20px + var(--mobile-safe-bottom))!important;left:8px!important;right:8px;width:calc(100vw - 16px);max-width:none;max-height:calc(100dvh - 150px - var(--mobile-safe-top) - var(--mobile-safe-bottom));z-index:46}body.mobile-ui-ready #attack-group{min-height:46px}
 /* Chat opens on demand; it does not occupy a second permanent strip. */
 body.mobile-ui-ready #chat-toggle{display:none!important}body.mobile-ui-ready #retroverse-chat{left:8px;right:8px;width:calc(100vw - 16px);max-width:none;bottom:calc(var(--mobile-nav-height) + 16px + var(--mobile-safe-bottom));z-index:46}
 body.mobile-ui-ready #chat-panel{height:min(420px,calc(100dvh - 156px - var(--mobile-safe-top) - var(--mobile-safe-bottom)));max-height:calc(100dvh - 156px - var(--mobile-safe-top) - var(--mobile-safe-bottom));min-height:0}
 body.mobile-ui-ready.in-battle #retroverse-chat{bottom:calc(var(--mobile-combat-height,130px) + 16px + var(--mobile-safe-bottom))}body.mobile-ui-ready.in-battle #chat-panel{height:min(380px,calc(100dvh - var(--mobile-combat-height,130px) - 144px - var(--mobile-safe-top) - var(--mobile-safe-bottom)));max-height:calc(100dvh - var(--mobile-combat-height,130px) - 144px - var(--mobile-safe-top) - var(--mobile-safe-bottom))}
 body.mobile-ui-ready #chat-close{width:38px;height:38px}body.mobile-ui-ready #chat-panel .chat-tabs button{min-height:38px}body.mobile-ui-ready #chat-send{width:38px;height:34px}
}
@media(max-width:355px){body.mobile-ui-ready #mobile-topbar>button{gap:5px;padding-inline:9px}.mobile-location-name{font-size:11.5px}body.mobile-ui-ready.in-battle #spell-bar{gap:12px}body.mobile-ui-ready.in-battle #spell-bar :is(.spell-slot,.spell-empty){width:51px!important;height:55px!important}}
@media(max-width:1000px) and (max-height:500px){body.mobile-ui-ready #mobile-topbar{right:8px;left:8px}body.mobile-ui-ready.in-battle #fight-hud{top:calc(8px + var(--mobile-safe-top))!important;width:min(330px,calc(100% - 190px))!important;left:calc(50% + 22px)!important}body.mobile-ui-ready.in-battle #mobile-location{max-width:135px;min-width:0}body.mobile-ui-ready.in-battle .mobile-location-name{display:none}body.mobile-ui-ready.in-battle #battle-feedback{top:calc(67px + var(--mobile-safe-top))!important}body.mobile-ui-ready #mobile-menu-sheet{max-height:calc(100dvh - 24px - var(--mobile-safe-bottom))}}


@media(max-width:700px), (max-width:1000px) and (max-height:500px){
 body.mobile-ui-ready #prepare-dialog .prepare-resources>span,body.mobile-ui-ready #prepare-dialog .prepare-resources>button{padding:8px;min-height:64px;line-height:1.45}body.mobile-ui-ready #prepare-dialog .prepare-resources{gap:7px}
 body.mobile-ui-ready #prepare-dialog .prepared-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.mobile-ui-ready #prepare-dialog .prepared-list>div{padding:10px 6px}body.mobile-ui-ready #prepare-dialog .prepared-list strong{font-size:12px;line-height:1.4}body.mobile-ui-ready #prepare-dialog .prepared-list .spell-metrics{justify-content:center;gap:4px}body.mobile-ui-ready #prepare-dialog .prepare-actions{position:sticky;bottom:-20px;margin:14px -20px -20px;padding:12px 20px;background:var(--theme-paper);border-top:1px solid var(--theme-border);z-index:2;justify-content:space-between}body.mobile-ui-ready #prepare-dialog .prepare-actions button{min-height:44px}
}

@media(max-width:700px), (max-width:1000px) and (max-height:500px){
 body.mobile-ui-ready #prepare-dialog .prepare-resources>span,body.mobile-ui-ready #prepare-dialog .prepare-resources>button{display:block;min-height:0;text-align:center}body.mobile-ui-ready #prepare-dialog .prepare-resources b{display:block;margin-bottom:3px}body.mobile-ui-ready #prepare-dialog .prepare-resources small{display:block;margin-top:4px}
 body.mobile-ui-ready #prepare-dialog .prepare-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}body.mobile-ui-ready #prepare-dialog .prepare-actions button{min-width:0;padding:7px!important;line-height:1.4}
}


/* One menu for desktop and mobile; existing player controls remain authoritative. */
#quick-menu-open{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;font:700 12px var(--font-ui);white-space:nowrap}#quick-menu-open img{width:20px;height:22px;object-fit:contain}body.mobile-ui-ready #adventure-toggle{display:none!important}body.mobile-ui-ready #quick-menu-open{display:inline-flex}

/* Menu « Accès » : fenêtre Rétro, sections expliquées, tuiles alignées et vrais interrupteurs. */
#mobile-menu-sheet{--qa-frame:var(--rs-frame,var(--window-line));--qa-orange:var(--rs-orange,var(--window-accent));position:fixed;inset:auto 18px calc(var(--hud-dock-height,180px) + 16px) auto;margin:0;width:520px;max-width:calc(100vw - 36px);max-height:calc(100dvh - var(--hud-dock-height,180px) - 40px);padding:0;overflow:hidden;display:flex;flex-direction:column;border:2px solid var(--qa-frame);border-radius:6px;background:var(--window-paper);color:var(--window-ink);box-shadow:0 0 0 1px #0007,inset 0 0 0 1px #fff6,var(--window-shadow);font:13px/1.45 var(--font-ui,system-ui,sans-serif)}
#mobile-menu-sheet::backdrop{background:#16120b80;backdrop-filter:blur(2px)}:where(html[data-theme="nuit"]) #mobile-menu-sheet::backdrop{background:#0c0f1580}
#mobile-menu-sheet *{box-sizing:border-box}#mobile-menu-sheet :is(a,button){font-family:inherit}
#mobile-menu-sheet .mobile-sheet-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 8px 7px 13px;background:linear-gradient(180deg,color-mix(in srgb,var(--window-chrome-2) 85%,#fff),var(--window-chrome-2) 45%,var(--window-chrome));border-bottom:2px solid var(--qa-orange);color:var(--window-text);box-shadow:inset 0 1px #ffffff1f}
#mobile-menu-sheet .mobile-sheet-eyebrow{display:block;font-size:10.5px;letter-spacing:.12em;color:var(--window-muted)}#mobile-menu-sheet .mobile-sheet-header h2{margin:0;font:400 20px/1.2 var(--font-display,Georgia,serif);color:var(--window-text);text-shadow:0 1px 0 #000a}
#mobile-menu-sheet #mobile-menu-close{display:grid;place-items:center;flex:none;width:34px;height:34px;padding:0;border:1px solid color-mix(in srgb,var(--window-text) 35%,transparent);border-radius:4px;background:#0000004d;color:var(--window-text);font-size:16px;cursor:pointer}#mobile-menu-sheet #mobile-menu-close:hover{background:var(--theme-negative,#a33025)}
#mobile-menu-sheet .mobile-sheet-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:10px 12px 12px;scrollbar-width:thin;scrollbar-color:var(--qa-frame) transparent}
.quick-group{margin:0 0 12px}.quick-group>h3{display:flex;align-items:center;gap:8px;margin:0 0 2px;font:400 15px/1.3 var(--font-display,Georgia,serif);color:var(--window-ink)}.quick-group>h3::after{content:"";flex:1;height:1px;background:color-mix(in srgb,var(--qa-frame) 55%,transparent);box-shadow:0 1px #fff5}
.quick-group>p{margin:0 0 7px;font-size:11.5px;line-height:1.4;color:var(--theme-muted)}
.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.quick-actions .mobile-menu-help{grid-column:1/-1}.quick-switches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck]){display:flex;align-items:center;gap:9px;width:100%;min-width:0;min-height:48px;padding:6px 8px;border:1px solid color-mix(in srgb,var(--qa-frame) 70%,transparent);border-radius:4px;background:linear-gradient(180deg,#ffffff38,#ffffff00 60%,#0000000d),var(--theme-card);color:var(--window-ink);text-align:left;cursor:pointer;box-shadow:inset 0 1px #fff7,0 1px 0 #00000020;font-size:12px;line-height:1.3}
#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck]):not(:disabled):hover{border-color:var(--qa-orange);background-color:var(--theme-accent-soft)}#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck]):not(:disabled):active{transform:translateY(1px)}#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck]):disabled{opacity:.45;cursor:default;filter:grayscale(.5)}
#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck])>img{flex:none;width:26px;height:26px;object-fit:contain;filter:drop-shadow(0 1px 0 #fff8)}
#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck])>span:not(.quick-switch-icon){flex:1;min-width:0;display:flex;flex-direction:column}#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck]) b{font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck]) small{font-size:12px;line-height:1.2;color:var(--theme-muted);overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
#mobile-menu-sheet kbd{flex:none;display:inline-grid;place-items:center;min-width:26px;height:22px;padding:0 5px;border:1px solid var(--qa-frame);border-bottom-width:2px;border-radius:3px;background:var(--window-paper);color:var(--window-ink);font:700 10.5px/1 var(--font-ui,system-ui)}#mobile-menu-sheet .quick-tile kbd{min-width:44px}
.quick-switch-icon{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--window-chrome);color:var(--window-text);font-size:14px;line-height:1}
#mobile-menu-sheet .quick-switch>i{flex:none;position:relative;width:40px;height:22px;border-radius:11px;background:#0000002e;box-shadow:inset 0 1px 3px #0005;transition:background .15s}#mobile-menu-sheet .quick-switch>i::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:linear-gradient(#fff,#ddd6c4);box-shadow:0 1px 2px #0006;transition:transform .15s}
#mobile-menu-sheet .quick-switch[aria-checked=true]>i{background:var(--qa-orange)}#mobile-menu-sheet .quick-switch[aria-checked=true]>i::after{transform:translateX(18px)}#mobile-menu-sheet .quick-switch[aria-checked=true] small{color:var(--theme-accent-ink);font-weight:700}
#mobile-menu-sheet .quick-primary{background:linear-gradient(180deg,#ffffff40,#ffffff00 55%,#0000001f),var(--theme-accent);border-color:var(--theme-accent-hover);color:var(--theme-accent-text)}#mobile-menu-sheet .quick-primary small{color:color-mix(in srgb,var(--theme-accent-text) 80%,transparent)}#mobile-menu-sheet .quick-primary:not(:disabled):hover{background-color:var(--theme-accent-hover)}
.quick-combat-keys{margin:7px 0 0;font-size:11.5px;color:var(--theme-muted)}.quick-combat-keys kbd{min-width:20px!important;height:19px!important}
#mobile-menu-sheet .mobile-menu-primary{display:flex;justify-content:space-between;gap:10px;margin:0;padding-top:8px;border-top:1px solid color-mix(in srgb,var(--qa-frame) 45%,transparent)}#mobile-menu-sheet .mobile-menu-primary a{display:inline-flex;align-items:center;min-height:36px;color:var(--theme-accent-ink);font-size:12px;font-weight:700;text-decoration:none}#mobile-menu-sheet .mobile-menu-primary a:hover{text-decoration:underline}
#mobile-menu-sheet :is(button,a):focus-visible{outline:2px solid var(--qa-orange);outline-offset:2px}#mobile-account-slot{display:none}
#quick-menu-open{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;font:700 12px var(--font-ui);white-space:nowrap}#quick-menu-open img{width:20px;height:22px;object-fit:contain}
@media(max-width:700px),(max-width:1000px) and (max-height:500px){
 #quick-menu-open{display:none!important}
 body.mobile-ui-ready #mobile-menu-sheet{inset:auto 8px calc(8px + var(--mobile-safe-bottom));margin:0 auto;width:min(560px,calc(100vw - 16px));max-width:none;max-height:calc(100dvh - 76px - var(--mobile-safe-top) - var(--mobile-safe-bottom))}
 #mobile-account-slot{display:block}.quick-switches{grid-template-columns:1fr}#mobile-menu-sheet #mobile-menu-close{width:44px;height:44px}#mobile-menu-sheet .mobile-sheet-scroll{padding:10px}
 #mobile-menu-sheet kbd,.quick-combat-keys{display:none!important}#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck]){min-height:50px;gap:7px;padding:6px 7px}#mobile-menu-sheet :is([data-mobile-proxy],[data-mobile-unstuck])>img{width:24px;height:24px}
 #mobile-menu-sheet .mobile-menu-primary a{min-height:44px}
}
@media(max-width:1000px) and (max-height:500px){body.mobile-ui-ready #mobile-menu-sheet{max-height:calc(100dvh - 24px - var(--mobile-safe-bottom))}}
#mobile-menu-sheet .quick-switch b{white-space:normal}
#world{touch-action:none}
#label,.adventure-point,.monster-tag,.remote-player-label{touch-action:none}
/* Icônes « Affichage » dessinées (SVG) : contraste net sur le disque foncé (plus spécifique que la règle span du thème Rétro) ;
   interrupteurs sur deux colonnes, libellés complets. */
@media (min-width:701px) and (min-height:501px),(min-width:1001px){#mobile-menu-sheet .quick-switches{grid-template-columns:repeat(2,minmax(0,1fr))}}
html[data-theme] #mobile-menu-sheet span.quick-switch-icon{width:30px;height:30px;background:var(--window-chrome,#3d3628);color:#ffe9b0;box-shadow:inset 0 0 0 1px #ffffff26,0 1px 2px #0004}html[data-theme]:where([data-theme="nuit"]) #mobile-menu-sheet span.quick-switch-icon{background:var(--window-chrome,#262f3f)}
html[data-theme] #mobile-menu-sheet .quick-switch[aria-checked=true] span.quick-switch-icon{background:var(--qa-orange,#e8780c);color:#fff}
#mobile-menu-sheet .quick-switch-icon svg{display:block;width:18px;height:18px}
#mobile-menu-sheet .quick-switch b{white-space:normal;line-height:1.15;overflow-wrap:anywhere}
/* « Mon compte » intégré au menu Accès sur ordinateur aussi (mêmes règles que sur mobile). */
#mobile-account-slot{display:block}
#mobile-menu-sheet #account-menu{flex:none;padding:0;margin:0 0 14px;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-card);overflow:hidden}
#mobile-menu-sheet #account-trigger{padding:9px 12px;min-height:50px;gap:10px}
#mobile-menu-sheet #account-trigger>img{width:28px;height:34px}
body.mobile-ui-ready #mobile-menu-sheet #account-control{position:static;inset:auto;width:100%;max-width:none;max-height:none;padding:14px;border-width:1px 0 0;border-radius:0;box-shadow:none;overflow:visible}
/* Ordinateur : « Mon compte » en haut à droite ouvre le menu (compte + accès rapides) ; plus de bouton « Accès » en bas. */
#topbar-menu{flex:1;min-width:0;display:flex;align-items:center;gap:8px;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
#topbar-menu img{width:26px;height:32px;object-fit:contain;flex:none}
#topbar-menu span:not(.account-chevron){display:flex;flex-direction:column;min-width:0}
#topbar-menu strong{font:700 12.5px var(--font-ui,sans-serif)}#topbar-menu small{font-size:11px;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game-topbar #topbar-menu:hover strong{text-decoration:underline}
html[data-theme] body #player-strip #quick-menu-open{display:none!important}
#reset{display:none!important}
/* Accès rapides, refonte : tuiles verticales (icône, titre, une ligne d'aide), touche discrète en coin, rubriques fines, fond net. */
#mobile-menu-sheet::backdrop{background:#16120b55;backdrop-filter:none}:where(html[data-theme="nuit"]) #mobile-menu-sheet::backdrop{background:#0c0f1555}
#mobile-menu-sheet{border-radius:14px;box-shadow:0 18px 50px #0008}
#mobile-menu-sheet .quick-group{margin:0 0 14px}
#mobile-menu-sheet .quick-group>h3{font:700 11px/1.2 var(--font-ui,sans-serif);letter-spacing:.09em;text-transform:uppercase;color:#7a6838;margin:0 0 7px}
#mobile-menu-sheet .quick-group>p{display:none}
#mobile-menu-sheet .quick-grid{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:7px}
#mobile-menu-sheet .quick-tile{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-height:0;padding:10px 10px 9px;border-radius:11px;border:1px solid #d3c495;background:linear-gradient(180deg,#fbf6e7,#efe6c9);box-shadow:0 1px 0 #fff8 inset,0 1px 3px #3b2c1222;text-align:left;cursor:pointer;transition:transform .12s,box-shadow .12s,border-color .12s}:where(html[data-theme="nuit"]) #mobile-menu-sheet .quick-tile{box-shadow:0 1px 0 #fff8 inset,0 1px 3px #1a233322}
#mobile-menu-sheet .quick-tile:hover,#mobile-menu-sheet .quick-tile:focus-visible{transform:translateY(-1px);border-color:#c98a2a;box-shadow:0 4px 12px #3b2c1233}:where(html[data-theme="nuit"]) #mobile-menu-sheet .quick-tile:hover,:where(html[data-theme="nuit"]) #mobile-menu-sheet .quick-tile:focus-visible{box-shadow:0 4px 12px #1a233333}
#mobile-menu-sheet .quick-tile>img{width:28px;height:28px;object-fit:contain;padding:4px;border-radius:9px;background:#fffaf0;border:1px solid #e3d6ad;box-sizing:content-box}
#mobile-menu-sheet .quick-tile>span{display:flex;flex-direction:column;min-width:0;width:100%}
#mobile-menu-sheet .quick-tile b{font-size:13px;line-height:1.2;color:#352c18}
#mobile-menu-sheet .quick-tile small{font-size:10.5px;line-height:1.25;color:#7a7052;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#mobile-menu-sheet .quick-tile kbd{position:absolute;top:8px;right:8px;min-width:0;padding:1px 6px;border-radius:5px;border:1px solid #cbbb8c;background:#fffdf6;color:#6d6040;font:700 10px/1.5 var(--font-ui,sans-serif);box-shadow:0 1px 0 #cbbb8c}
@media (max-width:420px){#mobile-menu-sheet .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Menu « Accès rapides » en onglets (13/10/2026) : large sur ordinateur, compact, sans défilement */
#mobile-menu-sheet .menu-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:8px 12px 0;background:transparent}
#mobile-menu-sheet .menu-tabs button{min-height:36px;padding:0 6px;border:1px solid var(--theme-border,#c9b47c);border-bottom:0;border-radius:10px 10px 0 0;background:var(--theme-paper,#f3ead2);color:var(--theme-ink,#3d3420);font:800 12.5px var(--font-ui,sans-serif);cursor:pointer;opacity:.8}
#mobile-menu-sheet .menu-tabs button[aria-selected=true]{background:linear-gradient(#f2a64a,#d7791a);border-color:#a0520a;color:#fff;opacity:1}
#mobile-menu-sheet[data-tab] [data-tab-pane]{display:none!important}
#mobile-menu-sheet[data-tab=jeu] [data-tab-pane=jeu],#mobile-menu-sheet[data-tab=compte] [data-tab-pane=compte],#mobile-menu-sheet[data-tab=affichage] [data-tab-pane=affichage],#mobile-menu-sheet[data-tab=aide] [data-tab-pane=aide]{display:block!important}
#mobile-menu-sheet[data-tab=jeu] .quick-group[data-tab-pane=jeu]{display:grid!important}
#mobile-menu-sheet[data-tab=compte] #account-menu>summary{display:none!important}
#mobile-menu-sheet .quick-group>p{display:none}
@media (min-width:760px){
 #mobile-menu-sheet{width:min(820px,calc(100vw - 32px))!important;max-width:820px!important;max-height:calc(100dvh - 40px)!important}
 #mobile-menu-sheet .quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
 #mobile-menu-sheet .quick-switches{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 #mobile-menu-sheet .quick-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
 #mobile-menu-sheet[data-tab=compte] #account-control{width:auto!important;max-height:none!important;overflow:visible!important}
}
@media (min-width:760px){#mobile-menu-sheet[open]{margin:auto!important;inset:0!important;top:0!important;bottom:0!important}#mobile-menu-sheet .mobile-sheet-scroll{min-height:420px}}
@media (max-width:759px){
 #mobile-menu-sheet .quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
 #mobile-menu-sheet .quick-tile{flex-direction:column!important;align-items:center!important;text-align:center!important;padding:8px 4px!important;min-height:0!important;gap:4px!important}
 #mobile-menu-sheet .quick-tile small,#mobile-menu-sheet .quick-tile kbd{display:none!important}
 #mobile-menu-sheet .quick-tile b{font-size:12px!important;line-height:1.15}
 #mobile-menu-sheet .quick-tile img{width:30px!important;height:30px!important}
 #mobile-menu-sheet .quick-switch{background-image:none!important}
}

/* Qualité graphique (menu ▸ Affichage) */
#mobile-menu-sheet .gfx-quality{margin-top:8px;display:grid;gap:5px}
#mobile-menu-sheet .gfx-quality>b{font-size:12.5px;font-weight:800}
#mobile-menu-sheet .gfx-quality>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:3px;border-radius:12px;background:#0000001f;box-shadow:inset 0 1px 3px #0003}
#mobile-menu-sheet .gfx-quality button{min-height:34px;border:0;border-radius:9px;background:transparent;color:inherit;font:inherit;font-size:12.5px;font-weight:800;cursor:pointer;padding:4px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#mobile-menu-sheet .gfx-quality button[aria-checked=true]{background:var(--qa-orange,#e8780c);color:#fff;box-shadow:0 1px 3px #0005}
#mobile-menu-sheet .gfx-quality>small{font-size:11.5px;color:var(--theme-muted);min-height:1.2em}
/* Accès rapides sur ordinateur (16/10/2026) : pas de doublon des boutons déjà à l'écran (personnage, sac, grimoire, carte, chat) ;
   « Classes & sorts » retiré partout (la classe se choisit à la création, le grimoire suffit). Raccourcis clavier inchangés. */
#mobile-menu-sheet .quick-tile[data-mobile-proxy="#choose-class"]{display:none!important}
@media not ((max-width:700px) or ((max-width:1000px) and (max-height:500px))){#mobile-menu-sheet .quick-tile:is([data-mobile-proxy="#character-open"],[data-mobile-proxy="#inventory-open"],[data-mobile-proxy="#open-book"],[data-mobile-proxy="#mobile-location"],[data-mobile-proxy="#chat-toggle"]){display:none!important}}
