.mobile-header-menu{display:none}
@media(max-width:760px){
body>.header.header-compact{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;padding:12px 14px;position:relative;overflow:visible}
.header-compact>.brand{margin-right:auto;flex-shrink:1;min-width:0}.header-compact>.brand img{max-width:120px;object-fit:contain}
.header-compact>nav,.header-compact>.nav-end>a:not(.login-link),.header-compact>.nav-end>form{display:none!important}
.header-compact>.nav-end{display:flex;margin:0;padding:0;gap:0}.header-compact .login-link{font-size:12px;white-space:nowrap}
.header-compact>.header-theme-controls{margin:0;gap:6px;flex-shrink:0}.header-compact .theme-switch{transform:scale(.88);transform-origin:center}
.mobile-header-menu{display:block;order:5;position:relative}.mobile-header-menu>summary{list-style:none;cursor:pointer;width:36px;height:40px;display:grid;place-items:center}.mobile-header-menu>summary::-webkit-details-marker{display:none}.mobile-header-menu svg{width:22px;height:22px}
.mobile-header-links{position:absolute;right:0;top:48px;width:220px;padding:10px;border:1px solid var(--line,#8883);border-radius:18px;background:var(--surface,#19181f);box-shadow:0 16px 40px #0003;z-index:100;animation:header-menu-in .2s ease-out}.mobile-header-links a,.mobile-header-links button{display:block;text-align:left;padding:12px;border:0;background:none;color:inherit;text-decoration:none;font-size:14px;width:100%;box-sizing:border-box}.mobile-header-links form{margin:0}
}
@keyframes header-menu-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.mobile-header-links{animation:none}}
/* Keep the mobile dropdown isolated from desktop navigation and button styles. */
@media(max-width:760px){
body>.header.header-compact{z-index:120}
.header.header-compact .mobile-header-menu{flex:0 0 36px}
.header.header-compact .mobile-header-menu:not([open])>.mobile-header-links{display:none!important}
.header.header-compact .mobile-header-menu[open]>.mobile-header-links{display:flex!important;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:2px;width:min(260px,calc(100vw - 32px));max-height:calc(100dvh - 110px);overflow-y:auto;overflow-x:hidden;color:var(--text);}
.header.header-compact .mobile-header-links>a,.header.header-compact .mobile-header-links>form,.header.header-compact .mobile-header-links button{flex:none;width:100%;min-width:0;max-width:none;height:auto;margin:0;}
.header.header-compact .mobile-header-links>a,.header.header-compact .mobile-header-links button{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:44px;padding:10px 14px;border:0;border-radius:10px;background:transparent;color:var(--text);font-size:14px;line-height:1.4;white-space:normal;box-shadow:none;transform:none;}
.header.header-compact .mobile-header-links>a:hover,.header.header-compact .mobile-header-links button:hover{background:var(--theme-tint)}
.header.header-compact .nav-end>.login-link{display:block!important}
}
