/* Bulletproof header: fixed bar, sharp menu, always-visible controls */
:root {
  --jk-menu-top: 78px;
}

/* Kill frosted-glass blur that made the open menu unreadable */
body .wp-site-blocks > header .wp-block-navigation__responsive-container,
body .wp-site-blocks > header .wp-block-navigation__responsive-container.is-menu-open,
body .wp-site-blocks > header .wp-block-navigation__responsive-container:not(.is-menu-open),
.jk-menu-backdrop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}

body .wp-site-blocks > header .wp-block-navigation__responsive-container,
body .wp-site-blocks > header .wp-block-navigation__responsive-container.is-menu-open {
  background: #102f2d !important;
  color: #f8f2e5 !important;
  opacity: 1 !important;
}

body .wp-site-blocks > header .wp-block-navigation__responsive-container:not(.is-menu-open) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body .wp-site-blocks > header .jk-menu-shell,
body .wp-site-blocks > header .jk-menu-shell * {
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body .wp-site-blocks > header.wp-block-template-part,
html body .wp-site-blocks > header.wp-block-template-part,
html body.home .wp-site-blocks > header.wp-block-template-part {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  inset: 0 0 auto !important;
  z-index: 100000 !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
}

body .wp-site-blocks > header .jk-header,
body .wp-site-blocks > header .jk-header--bar {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 78px !important;
  margin: 0 !important;
  padding: 10px 4% !important;
  background: rgba(0, 42, 45, 0.88) !important;
  border-bottom: 1px solid rgba(185, 163, 123, 0.33) !important;
  box-sizing: border-box !important;
  transform: none !important;
  filter: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body .wp-site-blocks > header.wp-block-template-part.jk-header--scrolled .jk-header,
body.jk-menu-open .wp-site-blocks > header.wp-block-template-part .jk-header {
  background: rgba(13, 37, 36, 0.98) !important;
  box-shadow: 0 7px 24px rgba(0, 12, 15, 0.14) !important;
}

body .wp-site-blocks > header .jk-header__inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 1450px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body .wp-site-blocks > header .jk-header__right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  min-width: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body .wp-site-blocks > header .jk-header-horizontal-logo {
  display: flex !important;
  flex: 0 1 auto !important;
  width: clamp(145px, 17vw, 245px) !important;
  max-width: 42vw !important;
  line-height: 0 !important;
}

body .wp-site-blocks > header .jk-header-horizontal-logo img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
}

body .wp-site-blocks > header .wp-block-navigation__responsive-container-open,
body .wp-site-blocks > header .wp-block-navigation__responsive-container-open.always-shown {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 10px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f6f4ee !important;
  cursor: pointer !important;
}

body .wp-site-blocks > header .wp-block-navigation__responsive-container-open svg,
body .wp-site-blocks > header .wp-block-navigation__responsive-container-open svg path {
  fill: currentColor !important;
}

body .wp-site-blocks > header .jk-account-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 2 !important;
}

/*
 * ログイン／マイページ：参考ページと同じ寸法で完全一致
 * min-height:34px / padding:6px 14px / font-size:12px / letter-spacing:.09em
 */
html body .wp-site-blocks > header .jk-account-link > a.jk-account-icon,
html body .wp-site-blocks > header .jk-account-link > a.jk-login-button,
html body .wp-site-blocks > header a.jk-account-icon,
html body .wp-site-blocks > header a.jk-login-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 34px !important;
  max-height: none !important;
  padding: 6px 14px !important;
  border: 1px solid rgba(207, 181, 130, 0.62) !important;
  border-radius: 9999px !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.09em !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* マイページ: 塗りつぶし */
html body .wp-site-blocks > header .jk-account-link > a.jk-account-icon,
html body .wp-site-blocks > header a.jk-account-icon {
  background: #e7d3aa !important;
  color: #172b28 !important;
}

html body .wp-site-blocks > header .jk-account-link > a.jk-account-icon .jk-account-text,
html body .wp-site-blocks > header a.jk-account-icon .jk-account-text {
  color: #172b28 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.09em !important;
  line-height: 1.4 !important;
}

/* ログイン: 枠線のみ（寸法はマイページと同一） */
html body .wp-site-blocks > header .jk-account-link > a.jk-login-button,
html body .wp-site-blocks > header a.jk-login-button {
  background: transparent !important;
  color: #e7d3aa !important;
}

html body .wp-site-blocks > header .jk-account-link > a.jk-login-button:hover,
html body .wp-site-blocks > header a.jk-login-button:hover {
  background: rgba(202, 174, 122, 0.12) !important;
}

html body .wp-site-blocks > header .jk-account-link > a.jk-account-icon:hover,
html body .wp-site-blocks > header a.jk-account-icon:hover {
  background: #f1e0bb !important;
}

/* Leave space under fixed header (non-HOME) */
body .wp-site-blocks {
  padding-top: var(--jk-menu-top) !important;
}

body.home .wp-site-blocks {
  padding-top: 0 !important;
}

@media (max-width: 780px) {
  :root { --jk-menu-top: 66px; }
  body .wp-site-blocks > header .jk-header,
  body .wp-site-blocks > header .jk-header--bar {
    min-height: 66px !important;
    padding: 8px 20px !important;
  }
  body .wp-site-blocks > header .jk-header-horizontal-logo {
    width: clamp(110px, 32vw, 160px) !important;
  }
  html body .wp-site-blocks > header .jk-account-link > a.jk-account-icon,
  html body .wp-site-blocks > header .jk-account-link > a.jk-login-button,
  html body .wp-site-blocks > header a.jk-account-icon,
  html body .wp-site-blocks > header a.jk-login-button {
    min-height: 34px !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
  }
  html body .wp-site-blocks > header .jk-account-link > a.jk-account-icon .jk-account-text {
    font-size: 11px !important;
  }
}

@media (max-width: 420px) {
  body .wp-site-blocks > header .jk-header,
  body .wp-site-blocks > header .jk-header--bar {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
