/* Global desktop header shared by every public SWELL page. Mobile is untouched. */
@media (min-width: 1100px) {
  #body_wrap.matsusai-desktop-header-v371 #header {
    min-height: 110px;
    position: relative;
    border-top: 0 !important;
    border-bottom: 1px solid #dce4e9;
    background: #fff !important;
    box-shadow: 0 5px 22px rgba(13,43,71,.055);
  }

  #body_wrap.matsusai-desktop-header-v371 #header .l-header__bar {
    height: 34px;
    min-height: 34px;
    position: absolute !important;
    z-index: 0;
    top: 0;
    right: 0;
    left: 0;
    display: block !important;
    border: 0 !important;
    outline: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #header .l-header__bar::before,
  #body_wrap.matsusai-desktop-header-v371 #header .l-header__bar::after {
    display: none !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #header .l-header__bar .l-container {
    height: 34px;
    min-height: 34px;
    border: 0 !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #header .l-header__bar .c-catchphrase,
  #body_wrap.matsusai-desktop-header-v371 #header .l-header__bar .c-iconList {
    visibility: hidden;
    pointer-events: none;
  }

  #body_wrap.matsusai-desktop-header-v371 #header .l-header__inner {
    width: 100%;
    max-width: 1440px;
    height: 110px;
    margin-right: auto;
    margin-left: auto;
    padding-right: clamp(36px,3.75vw,54px);
    padding-left: clamp(36px,3.75vw,54px);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box;
  }

  #body_wrap.matsusai-desktop-header-v371 #header .l-header__logo {
    width: min(300px,25vw);
    height: 56px;
    max-width: none;
    padding: 0;
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
  }

  #body_wrap.matsusai-desktop-header-v371 #header .c-headLogo,
  #body_wrap.matsusai-desktop-header-v371 #header .c-headLogo__link {
    width: 100%;
    height: 56px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #body_wrap.matsusai-desktop-header-v371 #header .c-headLogo__img {
    width: auto;
    max-height: 56px;
    margin: 0 auto;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a {
    height: 110px;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav {
    width: 100%;
    margin: 0;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav {
    width: 100%;
    display: flex;
    align-items: stretch;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a {
    padding-right: clamp(8px,1vw,14px);
    padding-left: clamp(8px,1vw,14px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #263746 !important;
    font-family: "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
    font-size: 13px;
    font-weight: 600 !important;
    line-height: 1.6;
    letter-spacing: .015em;
    text-decoration: none !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a:visited,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a:hover,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a:focus {
    color: #263746 !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a::after {
    content: "";
    height: 3px;
    position: absolute;
    right: 10px;
    bottom: 0;
    left: 10px;
    border-radius: 2px 2px 0 0;
    background: #0d2b47;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a:hover::after,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li.current-menu-item > a::after,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li.current-menu-ancestor > a::after {
    transform: scaleX(1);
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-sitemap-item,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li:has(> a[href*="/sitemap/"]),
  #body_wrap.matsusai-desktop-header-v371 #gnav a[href*="/sitemap/"] {
    display: none !important;
  }

  /* The Event Guide is intentionally exposed only in the smartphone drawer. */
  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-events-item,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li:has(> a[href*="/events/"]) {
    display: none !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-contact-item,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li:has(> a[href*="/contact/"]) {
    margin-left: 0 !important;
    order: 2;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-contact-item > a,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li:has(> a[href*="/contact/"]) > a {
    justify-content: center !important;
    text-align: center !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-information-item,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li:has(> a[href*="/info/"]) {
    margin-left: auto !important;
    order: 3;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-privacy-item,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li:has(> a[href*="/privacy-policy/"]) {
    margin-left: 0 !important;
    order: 4;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-privacy-item > a,
  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li:has(> a[href*="/privacy-policy/"]) > a {
    justify-content: center !important;
    text-align: center !important;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-social-slot {
    min-width: 112px;
    height: 110px;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    order: 5;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-social-slot .c-iconList {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    visibility: visible;
    pointer-events: auto;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-social-slot .c-iconList__item {
    margin: 0;
    list-style: none;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-social-slot .c-iconList__link {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid #dce3e8;
    border-radius: 50%;
    background: #fff;
    color: #0d2b47;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-social-slot .c-iconList__link:hover {
    border-color: #0d2b47;
    background: #0d2b47;
    color: #fff;
  }
}

@media (min-width: 1100px) and (max-width: 1279px) {
  #body_wrap.matsusai-desktop-header-v371 #header .l-header__logo {
    width: 240px;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .c-gnav > li > a {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 11px;
  }

  #body_wrap.matsusai-desktop-header-v371 #gnav .matsusai-desktop-social-slot {
    min-width: 106px;
  }
}

/* 3.8.7 smartphone masthead. This is deliberately home-only and below 600px;
   the shared desktop header and non-home smartphone pages remain unchanged. */
@media (max-width: 600px) {
  #body_wrap.home.matsusai-mobile-layout-v387 #header {
    min-height: 58px;
    border-top: 0 !important;
    border-bottom: 2px solid #0d2b47;
    background: #fff !important;
    box-shadow: none !important;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__bar {
    display: none !important;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__inner {
    width: 100%;
    height: 56px;
    min-height: 56px;
    padding: 0 52px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    background: #fff !important;
    box-sizing: border-box;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__logo {
    width: min(150px, 46vw);
    height: 56px;
    max-width: none;
    margin: 0;
    padding: 0;
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .c-headLogo,
  #body_wrap.home.matsusai-mobile-layout-v387 #header .c-headLogo__link {
    width: 100%;
    height: 56px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .c-headLogo__img {
    width: auto;
    max-width: 100%;
    max-height: 30px;
    margin: 0 auto;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__menuBtn,
  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__customBtn {
    width: 52px;
    height: 56px;
    min-width: 52px;
    min-height: 56px;
    margin: 0;
    position: absolute;
    z-index: 3;
    top: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #0d2b47;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__menuBtn {
    left: 0;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__customBtn {
    right: 0;
  }

  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__menuBtn > *,
  #body_wrap.home.matsusai-mobile-layout-v387 #header .l-header__customBtn > * {
    min-width: 44px;
    min-height: 44px;
  }
}

/* 3.8.8 trims only the smartphone home masthead and removes the decorative
   navy rule. The central logo and 44px interactive targets remain intact. */
@media (max-width: 600px) {
  #body_wrap.home.matsusai-mobile-layout-v388 #header {
    min-height: 52px;
    border-bottom: 0 !important;
  }

  #body_wrap.home.matsusai-mobile-layout-v388 #header .l-header__inner,
  #body_wrap.home.matsusai-mobile-layout-v388 #header .l-header__logo,
  #body_wrap.home.matsusai-mobile-layout-v388 #header .c-headLogo,
  #body_wrap.home.matsusai-mobile-layout-v388 #header .c-headLogo__link {
    height: 52px;
    min-height: 52px;
  }

  #body_wrap.home.matsusai-mobile-layout-v388 #header .c-headLogo__img {
    max-height: 28px;
  }

  #body_wrap.home.matsusai-mobile-layout-v388 #header .l-header__menuBtn,
  #body_wrap.home.matsusai-mobile-layout-v388 #header .l-header__customBtn {
    height: 52px;
    min-height: 52px;
  }
}

/* 3.8.10: improve smartphone drawer readability on every public page without
   changing the menu structure or its touch targets. */
@media (max-width: 600px) {
  #body_wrap .p-spMenu__nav .c-spnav > li > a {
    font-family: "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-weight: 650;
    letter-spacing: .01em;
  }

  #body_wrap .p-spMenu__nav .c-spnav > li.current-menu-item > a,
  #body_wrap .p-spMenu__nav .c-spnav > li.current-menu-ancestor > a {
    font-weight: 750;
  }

  #body_wrap #sp_menu_bottom .popular-posts .wpp-post-title {
    font-weight: 700;
  }
}
