/* Mulan Print: fit the Pangja desktop navigation to its boxed layout. */
@media (min-width: 992px) {
  .layout-boxed #haru-header .haru-header-nav-wrap.nav-sticky {
    max-width: var(--mulan-menu-page-width, 1200px);
  }

  #haru-header .header-navigation .header-primary-menu,
  #haru-header .header-navigation .menu-wrap {
    width: 100%;
    min-width: 0;
  }

  #haru-header .header-navigation .haru-main-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    max-width: 100%;
    float: none;
  }

  #haru-header .header-navigation .haru-main-menu > li {
    flex: 0 0 auto;
    float: none;
  }

  #haru-header .header-navigation .haru-main-menu > li > a {
    padding-right: clamp(6px, 0.75vw, 12px);
    padding-left: clamp(6px, 0.75vw, 12px);
    font-size: clamp(12px, 1vw, 14px);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  #haru-header .haru-main-menu > li.menu_style_dropdown {
    position: relative;
  }

  #haru-header .haru-main-menu > li.menu_style_dropdown:nth-last-child(-n+3) > .sub-menu {
    left: auto;
    right: 0;
  }

  /* Fixed panels escape ancestor clipping; JS keeps them inside the page. */
  #haru-header.mulan-menu-layout-ready .haru-main-menu > li.menu_style_dropdown .sub-menu,
  #haru-header.mulan-menu-layout-ready .haru-main-menu > li.menu_style_tab > .sub-menu {
    position: fixed;
    z-index: 1100;
    min-height: 0 !important;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: none !important;
    transform: none !important;
  }

  #haru-header .haru-main-menu > li.menu_style_dropdown .sub-menu {
    width: 280px;
    min-width: 0;
  }

  #haru-header .haru-main-menu > li.menu_style_dropdown .sub-menu a {
    display: block;
    float: none;
    width: auto;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #haru-header .haru-main-menu > li.menu_style_dropdown:focus-within > .sub-menu,
  #haru-header .haru-main-menu > li.menu_style_dropdown .sub-menu li:focus-within > .sub-menu {
    display: block;
    visibility: visible;
    opacity: 1;
  }

  #haru-header .haru-main-menu:focus-within > li:not(:focus-within) > .sub-menu {
    display: none !important;
  }
}
