#hud .tools{z-index:4;padding:11px;isolation:isolate}
#hud .tools #pause-btn{margin:0;min-width:72px;height:48px;min-height:48px}
#top-menu-actions{position:absolute;top:-1px;right:calc(100% + 6px);display:grid;grid-template-columns:repeat(var(--menu-columns,7),minmax(0,1fr));width:min(600px,var(--menu-room,600px));padding:6px;gap:4px;pointer-events:auto;border:6px solid transparent;border-image:url('/public/assets/rpg-window-frame-v1.webp') 30 fill / 6px / 0 stretch;background:#111a16;box-shadow:0 6px 18px #0006;transform-origin:right center;opacity:0;transform:translateX(12px);clip-path:inset(0 0 0 100%);visibility:hidden;transition:opacity .18s ease,transform .22s cubic-bezier(.2,.8,.2,1),clip-path .22s cubic-bezier(.2,.8,.2,1),visibility 0s linear .22s}
#hud .tools[data-expanded=true] #top-menu-actions{opacity:1;transform:translateX(0);clip-path:inset(0);visibility:visible;transition-delay:0s}
#hud .tools #top-menu-actions button{width:auto;min-width:0;height:48px;min-height:48px;flex-direction:column;padding:5px 2px;gap:5px;margin:0}
#hud .tools #top-menu-actions kbd{display:none}
#hud .tools[data-expanded=true] #pause-btn{border-color:#cbb37980;background:#b99a4a20!important}
#hud #network-debug{top:var(--menu-bottom,92px)}
/* Reserve the expanded menu's height so quest text never jumps or overlaps it. */
#game #quest-tracker{top:var(--quest-top,132px)}
@container game-viewport (max-height:540px){#hud .tools{padding:9px}#hud .tools #pause-btn{min-width:48px;width:48px;height:44px;min-height:44px}#top-menu-actions{padding:4px;gap:3px}#hud .tools #top-menu-actions button{height:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){#top-menu-actions{transition:none;transform:none}}
