/* The body becomes the containing block of fixed game HUD elements, so their
   right edge follows the resized canvas instead of extending under the dock. */
html:has(body.community-dock-open){overflow:hidden}
body.community-dock-open{--community-dock-width:min(400px,42vw);width:calc(100% - var(--community-dock-width));height:100dvh;overflow:visible;transform:translateZ(0)}
body.community-dock-open #game-shell{width:100%;min-width:0}
.community-game-dock{position:fixed;left:100%;top:0;width:var(--community-dock-width);height:100dvh;display:flex;flex-direction:column;z-index:100;background:#102119;color:#e9dec2;border-left:1px solid #c6a66d55;overflow:hidden;box-sizing:border-box}
.community-game-dock[hidden]{display:none!important}
.community-game-dock>header{height:48px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid #b8c4a322;font:14px Tahoma,sans-serif}
.community-game-dock>header button{background:transparent!important;border:0!important;color:#e9dec2!important;font:26px Tahoma,sans-serif!important;min-width:40px;min-height:40px;cursor:pointer;padding:0!important}
.community-game-dock iframe{display:block;border:0;width:100%;flex:1;min-height:0;background:#102119}
.chat-header .community-launcher{margin-left:auto;color:#e0c994;background:#203b2c;border:1px solid #c8ac6b55;border-radius:7px;padding:4px 10px;min-height:28px;font:11px Tahoma,sans-serif;cursor:pointer;white-space:nowrap}
.hud-windows [data-menu-system="community"] svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.hud-windows [data-menu-system="community"][aria-expanded="true"]{color:#ffe0a1;border-color:#d1b879}
:root body .menu-event-badge{position:absolute;top:-5px;right:-5px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border:2px solid #142119;border-radius:12px;background:#c2463c;color:#fff8ed;font:700 10px/1 Tahoma,sans-serif;pointer-events:none;z-index:3}
:root body .menu-event-badge[hidden]{display:none!important}
:root body .menu-event-badge[data-dot]{top:3px;right:3px;min-width:0;width:10px;height:10px;padding:0}
.hud-windows>button,.mobile-menu-toggle{position:relative}
/* A narrow screen shows one usable view at a time; closing restores the game. */
@media(max-width:600px){
 body.community-dock-open{width:100%}
 body.community-dock-open #game-shell{visibility:hidden;pointer-events:none}
 .community-game-dock{left:0;width:100%;height:var(--community-visible-height,100dvh);border-left:0}
 .community-game-dock>header{height:auto;min-height:48px;padding-top:env(safe-area-inset-top);padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
}
