.global-nav :is(a, label) {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}
.global-nav :is(a, label):hover {
  color: var(--bg--color--type-link);
}
.global-nav i.bg-icon {
  font-size: 1rem;
  margin-right: 0.75em;
  margin-bottom: -0.1em;
  color: var(--bg--color--icon-neutral-sub);
}
.global-nav :where(*:hover) i.bg-icon {
  color: inherit;
}

.global-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.25;
}
.global-search form {
  height: 100%;
  display: flex;
  align-items: center;
}
.global-search input {
  flex-grow: 1;
  flex-shrink: 1;
  width: 100%;
  appearance: none;
  border: none;
  outline: none;
  font-size: min(16px, 1rem);
  line-height: 1;
}
:where(#global-footer) .socialMedia ul {
  justify-content: center;
}

#global-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 3rem;
  display: flex;
  align-items: center;
  font-size: 1rem;
  background-color: #fff;
  box-shadow: 0 1px rgba(0,0,0,0.16);
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  #global-header {
    position: relative;
    height: 4rem;
    padding: 0 24px 0 16px;
  }
  #global-header.en {
    height: 72px;
  }
}
#global-header-siteName {
  padding: 0 1.5rem;
}
#global-header-siteName img {
  height: 24px;
  width: auto;
}
@media (min-width: 1024px) {
  #global-header-siteName img {
    height: 2em;
  }
}

#global-header-nav .subMenu h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--wp--preset--color--black);
}
#global-header-nav .subMenu figure {
  position: relative;
}
#global-header-nav .subMenu figure a {
  display: flex;
  flex-direction: row-reverse;
  column-gap: 1em;
}
#global-header-nav .subMenu figure a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#global-header-nav .subMenu figure a::before {
  content: '';
  mask-image: var(--bg--icon--allow-forward);
  mask-size: contain;
  mask-repeat: no-repeat;
  height: 1.5rem;
  width: 1.5rem;
  background-color: var(--bg--color--type-link);
  margin-left: auto;
}
#global-header-nav .subMenu figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 32 / 12;
  object-fit: cover;
  border-radius: 8px;
}
#global-header-nav .subMenu figure:has(a:hover) img {
  opacity: 0.6;
}
#global-header-nav .subMenu figcaption {
  margin-top: 1em;
}
#global-header-nav .subMenu ul {
  list-style: disc;
  padding-left: 1.25em;
  width: fit-content;
  height: fit-content;
  display: grid;
  column-gap: clamp(2.5rem, 5vw, 3rem);
  row-gap: 1.25rem;
}
@media (min-width: 375px) {
  #global-header-nav .subMenu ul:has(> li:nth-child(4)) {
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
  }
  #global-header-nav .subMenu ul:has(> li:nth-child(6)) {
    grid-template-rows: repeat(3, auto);
  }
}
#global-header-nav .subMenu li::marker {
  color: var(--bg--color--icon-primary);
  font-size: 1rem;
}

#global-header-search {
  border: 1px solid var(--bg--color--button-disable);
  border-radius: 10px;
  padding-left: 1em;
  height: calc(2.5rem - 2px);
}

/* sp */

#global-header-nav-sp-toggle, #global-header > .toFrontPageLink {
  display: none;
}

@media (max-width: 1023px) {
  .global-nav {
    font-size: 1rem;
  }
  .global-nav .mainMenu > li {
    padding: 1rem 0;
  }
  .global-nav .mainMenu > li > :where(a, label) {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .global-nav .mainMenu > li > :where(a, label)::after {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    mask-size: contain;
    mask-repeat: no-repeat;
    background-color: var(--bg--color--icon-neutral-sub);
  }
  .global-nav .mainMenu > li > a::after {
    mask-image: var(--bg--icon--allow-forward);
  }
  .global-nav .mainMenu > li > label::after {
    mask-image: var(--bg--icon--plus);
  }
  .global-nav .mainMenu > li > label.open::after {
    mask-image: var(--bg--icon--minus);
  }
  .global-nav .subMenu {
    font-weight: 400;
    display: none;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bg--color--button-disable);
  }
  .global-nav .has-subMenu:not(:has(.open) + li) > label.open {
    padding-top: 2rem;
    box-shadow: 0 1px 0 0 var(--bg--color--button-disable) inset;
  }
  .global-nav .has-subMenu:first-child > label.open {
    margin-top: -2rem;
  }
  .global-nav .has-subMenu > label.open + .subMenu {
    display: block;
  }
  .global-nav .subMenu h3 {
    display: none;
  }
  .global-nav .subMenu ul {
    margin-top: 2rem;
  }

  #global-header > .toFrontPageLink:not(:has(#global-header-nav-sp-toggle:checked) > div) {
    display: block;
  }
  #global-header > .toFrontPageLink a {
    display: block;
    padding-left: min(6.25vw, 1.875rem);
    color: inherit;
    text-decoration: none;
  }
  #global-header > .toFrontPageLink a:hover {
    color: var(--bg--color--type-link);
  }

  label[for=global-header-nav-sp-toggle] {
    font-size: 1rem;
    width: 4.5rem;
    height: 3rem;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #global-header-nav {
    display: none;
  }
  #global-header-nav .mainMenu {
    margin-right: min(0px, calc(1.5rem - min(6.25vw, 1.875rem)));
  }
  #global-header-nav-sp-toggle:checked ~ #global-header-nav {
    display: flex;
    flex-direction: column;
    padding: 0 min(6.25vw, 1.875rem) 2rem;
    box-sizing: border-box;
    position: absolute;
    top: 3rem;
    height: calc(min(100vh, 100dvh) - 4rem);
    left: 0;
    right: 0;
    background-color: #fff;
    overflow-y: auto;
    box-shadow: 0 1px 0 0 rgba(0,0,0,0.16);
  }
  #global-header-nav-sp-toggle:not(:checked) ~ label > i.bgi-close,
  #global-header-nav-sp-toggle:checked ~ label > i.bgi-menu {
    display: none;
  }
  #global-header-search {
    margin-top: 2rem;
    padding: 1rem;
  }
  #global-header-lang {
    margin-top: 2rem;
  }
}

/* pc */

@media (min-width: 1080px) {
  #global-header-nav .mainMenu {
    margin-left: auto;
    padding-left: min(calc(100vw - 1280px + 192px), 192px)
  }
}

@media (min-width: 1024px) {
  label[for=global-header-nav-sp-toggle],
  #global-header-nav-sp-toggle:checked + #global-header-nav-sp {
    display: none;
  }
  #global-header-nav {
    display: flex;
    width: 100%;
    padding: 0;
    align-items: center;
  }
  #global-header-nav .mainMenu {
    display: flex;
    align-items: center;
    margin-right: auto;
  }
  #global-header-nav .mainMenu > li.has-subMenu,
  #global-header-nav .mainMenu > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 min(18px, calc(12 / 1280 * 100vw));
    height: 4rem;
  }
  #global-header-nav .mainMenu i:not(.subMenu i) {
    display: none;
  }
  #global-header-nav .subMenu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 -1px 0 rgba(0,0,0,0.1);
    visibility: hidden;
    display: grid;
    box-sizing: border-box;
    padding: 2.5rem max(64px, calc((100vw - var(--wp--style--global--content-size)) / 2));
    column-gap: min(64px, 5vw);
    grid-template-columns: min(224px, 20%) min(320px, 30%) clamp(320px, 50%, 430px);
  }
  #global-header-nav .mainMenu > li:hover .subMenu {
    visibility: visible;
  }
  #global-header-search {
    width: 9rem;
  }
  #global-header-lang {
    margin-left: 1.25rem;
  }
}

/* sitemap link */
#sitemapLink {
  background-color: #fff;
  padding: 16px max(24px, calc(50vw - 640px));
  font-size: var(--wp--preset--font-size--small);
}

#sitemapLink a {
  color: inherit;
  text-decoration: none;
}

#sitemapLink a:hover {
  color: var(--bg--color--type-link);
}

/* to page top link */

#toPageTopLink {
  position: sticky;
  z-index: 10;
  bottom: 0;
  padding: 0 20px;
  height: 0;
}
#toPageTopLink a {
  display: flex;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 2.5em;
  height: 2.5em;
  font-size: 1rem;
  text-decoration: none;
  color: #fff;
  background-color: var(--bg--color--button-enable);
  border-radius: 1em;
  transform: translateY(calc(-100% - 20px));
}
#toPageTopLink a:hover {
  background-color: var(--bg--color--button-hover);
}

/* breadcrumbs */

#breadcrumbs {
  max-width: min(87.5%, 1120px);
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.5rem;
  margin-bottom: -2.675rem;
  display: flex;
  align-items: center;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  position: relative;
  z-index: 1;
}
@media (min-width:640px) {
  #breadcrumbs {
    font-size: 12px;
  }
}
#breadcrumbs li {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  max-width: 50%;
}
#breadcrumbs li:nth-child(n+3) {
  padding-left: 0.5em;
}
#breadcrumbs :is(a, span) {
  display: block;
  align-items: center;
  line-height: 1.5;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#breadcrumbs i {
  flex-shrink: 0;
  flex-grow: 0;
  width: 1rem;
  height: 1rem;
}
#breadcrumbs i.bgi-chevron-forward {
  margin-bottom: -0.25em;
}
