/* R30: extend the existing compact navigation to tablets, without changing its design. */
@media(min-width:961px) and (max-width:1120px){
  #baole-navigation .nav-row{width:100%;height:64px;gap:8px;padding:0 16px}
  #baole-navigation .brand img{width:112px;height:auto}
  #baole-navigation .nav-links,
  #baole-navigation.menu-open .nav-links{display:none}
  #baole-navigation .nav-tools{min-width:0;gap:4px;font-size:13px}
  #baole-navigation .nav-tools .search-toggle,
  #baole-navigation .nav-tools .site-switcher,
  #baole-navigation .nav-tools .doc-tool,
  #baole-navigation .nav-tools .cart-tool,
  #baole-navigation[data-authed="0"] .nav-tools .console-tool{display:none}
  #baole-navigation .nav-tools>a.login-tool{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0 6px;color:#006eff}
  #baole-navigation .nav-tools .register{display:inline-flex;align-items:center;justify-content:center;height:40px;min-width:64px;padding:0 8px;border-radius:3px;font-size:12px}
  #baole-navigation[data-authed="1"] .nav-tools .console-tool{display:inline-flex;align-items:center;justify-content:center;height:44px;min-width:56px;padding:0 4px;color:#006eff}
  #baole-navigation .account-menu,#baole-navigation .account-menu summary{max-width:72px}
  #baole-navigation .account-menu summary{min-height:44px;padding:10px 0;font-size:12px}
  #baole-navigation .account-panel{position:fixed;top:var(--nav-bottom,64px);right:12px;max-width:calc(100vw - 24px);max-height:calc(100vh - var(--nav-bottom,64px) - 12px);max-height:calc(100dvh - var(--nav-bottom,64px) - 12px);overflow-y:auto;overscroll-behavior:contain}
  #baole-navigation .mobile-toggle{display:grid;width:44px;height:44px}
  #baole-navigation .mega-menu{position:fixed;top:var(--nav-bottom,64px);left:0;right:0;max-height:calc(100vh - var(--nav-bottom,64px));max-height:calc(100dvh - var(--nav-bottom,64px));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;transform:none}
  #baole-navigation .mega-wrap{width:100%;padding:0 16px 20px;max-width:100%}
  #baole-navigation .mobile-main-menu{display:block;padding-top:6px}
  #baole-navigation .mobile-main-menu>a,
  #baole-navigation .mobile-main-menu>button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px;padding:12px 4px;text-align:left;white-space:normal;font-size:15px;border-bottom:1px solid #edf0f5}
  #baole-navigation .mobile-main-menu svg{width:18px;height:18px;color:#7a8799}
  #baole-navigation .mobile-utility-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:18px}
  #baole-navigation .mobile-utility-links a{display:flex;align-items:center;justify-content:center;min-height:44px;background:#f5f8fc;font-size:13px}
  #baole-navigation .mobile-menu-heading{display:flex;align-items:center;gap:12px;min-height:56px;border-bottom:1px solid #edf0f5}
  #baole-navigation .mobile-menu-back{display:flex;align-items:center;gap:4px;min-height:44px;min-width:64px;padding:0;text-align:left;color:#006eff}
  #baole-navigation .mobile-menu-back svg{width:17px;height:17px}
  #baole-navigation .mobile-menu-title{font-size:15px;color:#24344b}
  #baole-navigation .mega-toolbar{height:auto;min-height:68px;padding:12px 0;gap:8px}
  #baole-navigation .menu-search{max-width:100%;height:44px;padding:0 10px;gap:8px}
  #baole-navigation .menu-search input{font-size:16px}
  #baole-navigation .menu-search kbd,
  #baole-navigation .search-suggestions,
  #baole-navigation .close-menu{display:none}
  #baole-navigation .mobile-category-filter{display:flex;height:auto;min-height:54px;padding:0 0 12px;gap:10px;align-items:center}
  #baole-navigation .mobile-category-filter label{flex:none;font-size:12px;color:#718096}
  #baole-navigation .mobile-category-filter select{min-width:0;width:100%;height:40px;padding:0 28px 0 10px;border:1px solid #e1e7ef;border-radius:3px;background:#f7f9fc;color:#202b3c;font-size:16px}
  #baole-navigation .products-panel{display:block;height:auto;min-height:0;padding:0}
  #baole-navigation .category-rail{display:none}
  #baole-navigation .catalog{height:auto;padding:0;min-width:0}
  #baole-navigation .catalog-scroll{overflow:visible;height:auto;max-height:none;padding:0}
  #baole-navigation .catalog-topline{padding:10px 0}
  #baole-navigation .product-group{padding:0;margin:0;border-bottom:1px solid #edf0f5}
  #baole-navigation .group-heading{margin:0;gap:10px;align-items:center}
  #baole-navigation .group-heading h3{flex:1;min-width:0}
  #baole-navigation .desktop-group-name{display:none}
  #baole-navigation .mobile-group-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:52px;padding:10px 0;text-align:left;font-size:14px;line-height:22px}
  #baole-navigation .mobile-group-toggle svg{width:16px;height:16px;flex:none}
  #baole-navigation .mobile-group-toggle[aria-expanded="true"] svg{transform:rotate(180deg)}
  #baole-navigation .group-heading>a{min-height:44px;display:flex;align-items:center;white-space:nowrap;font-size:11px;margin:0}
  #baole-navigation .product-grid{grid-template-columns:minmax(0,1fr);padding:0 0 10px;gap:0}
  #baole-navigation .product-group:not(.mobile-expanded) .product-grid{display:none}
  #baole-navigation .product-link{margin:0;padding:10px 12px;background:#f7f9fc;border-bottom:1px solid #edf0f5}
  #baole-navigation .product-link:last-child{border-bottom:0}
  #baole-navigation .simple-panel{display:block;padding:20px 0 0;max-height:none;overflow:visible;min-height:0}
  #baole-navigation .simple-title{display:none}
  #baole-navigation .simple-links,
  #baole-navigation .simple-panel[data-panel="合作伙伴"] .simple-links,
  #baole-navigation .bn-scenarios-panel .simple-links{grid-template-columns:minmax(0,1fr);gap:0}
  #baole-navigation .simple-link{margin:0;padding:14px 0;border-bottom:1px solid #edf0f5;min-width:0}
  #baole-navigation .simple-link strong{font-size:15px;line-height:24px}
  #baole-navigation .simple-link p{font-size:12px;line-height:21px;margin-top:5px}
  #baole-navigation .menu-bottom{height:auto;min-height:52px;gap:12px;flex-wrap:wrap;padding:16px 0 0}
  #baole-navigation .site-search-panel{padding:20px 0 0;min-width:0}
  #baole-navigation .site-search-input input{font-size:16px}
  #baole-navigation .site-search-form>button{width:64px}
}

/* Keep a direct cart entry on tablets; phones retain the existing menu entry. */
@media(min-width:601px) and (max-width:1200px){
  #baole-navigation .nav-tools .cart-tool{display:grid;width:44px;height:44px;padding:0;border-left:0}
}
@media(min-width:1121px) and (max-width:1200px){
  #baole-navigation .nav-row{gap:16px}
  #baole-navigation .nav-tools{gap:10px}
  #baole-navigation .account-menu{max-width:44px}
  #baole-navigation .account-menu summary{width:44px;max-width:44px;min-height:44px;padding:0;justify-content:center}
  #baole-navigation .account-menu summary .account-name,
  #baole-navigation .account-menu summary .chevron{display:none}
}
#baole-navigation .b30-mobile-cart-count{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;margin-left:6px;padding:0 4px;border-radius:8px;background:#006eff;color:#fff;font-size:10px;line-height:16px}
