html {
  --header-height: 64px;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  padding-top: var(--header-height);
}

html.menu-open {
  overflow: hidden;
}

.header__menu-panel {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: linear-gradient(to bottom, rgb(53 47 40 / 97%), rgb(32 29 28 / 97%));
  color: #eee;
  font-family: inherit;
}
.header__menu-panel[open] {
  display: flex;
  flex-direction: column;
  animation: viMenuFadeIn .3s ease both;
}
.header__menu-panel.is-closing {
  animation: viMenuFadeOut .3s ease both;
}
@keyframes viMenuFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes viMenuFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.header__menu-panel::backdrop {
  background: transparent;
}
.header__menu-close {
  position: absolute;
  top: 6px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.header__menu-close img {
  display: block;
  width: 30px;
  height: 30px;
}
.header__menu-scroll {
  flex: 1;
  min-height: 0;
  margin-top: 64px;
  padding: 32px clamp(24px, 15vw, 58px) 64px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.header__mobile-nav {
  display: flex;
  flex-direction: column;
}
.header__mobile-nav a {
  padding: 22px 0;
  border-bottom: 1px solid rgb(255 255 255 / 15%);
  color: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .08em;
  text-decoration: none;
}
.header__mobile-apply {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 252px;
  max-width: 100%;
  min-height: 56px;
  margin: 40px auto 0;
  padding: 14px 28px;
  border: 1px solid #d3c8c2;
  border-radius: 999px;
  background: linear-gradient(135deg,#514747,#100500 75%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1em;
  text-decoration: none;
}
.header__mobile-apply::after {
  position: absolute;
  right: 24px;
  width: 6px;
  height: 6px;
  border-top: 1px solid;
  border-right: 1px solid;
  transform: rotate(45deg);
  content: '';
}

.floating-apply {
  display: none;
}

@media (max-width: 767px) {
  .floating-apply {
    position: fixed;
    z-index: 49;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 20px 0 16px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .45));
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
    pointer-events: none;
  }

  .floating-apply.is-visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  .floating-apply .header__mobile-apply {
    margin: 0 auto;
    pointer-events: auto;
  }
}
.header__menu-close:focus-visible {
  outline: 2px solid #c8b394;
  outline-offset: 2px;
}

@media (hover: none) and (pointer: coarse) {
  .header__menu-close:focus-visible {
    outline: none;
  }
}

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 1080px;
  height: var(--header-height);
  padding: 0 32px;
  background: #efeae1;
  font-family: 'Yu Gothic Medium','Yu Gothic','YuGothic','游ゴシック体','Noto Sans JP',sans-serif;
  transition: background-color .25s ease;
}

.header.is-scrolled {
  background: #fff;
}
.header__logo {
  display: block;
  flex-shrink: 0;
}
.header__logo img {
  display: block;
  width: 176px;
  height: auto;
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.header__nav a {
  color: #555;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .1em;
  text-decoration: none;
  transition: opacity .2s ease;
}
.header__nav .header__apply {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 40px;
  padding: 10px 20px;
  border: 1px solid #b7b3b0;
  border-radius: 999px;
  background: linear-gradient(125deg,#625b5b 0%,#110700 70%);
  color: #fff;
  font-weight: 700;
}
.header__menu {
  display: none;
}
.header a:focus-visible, .header__menu:focus-visible {
  outline: 2px solid #9c8567;
  outline-offset: 4px;
}

@media (any-hover: hover) {
  .header a:hover {
    opacity: .7;
  }
}

@media (max-width: 767px) {
  html {
    --header-height: 54px;
  }
  .header {
    min-width: 0;
    padding-inline: 20px;
  }
  .header__nav {
    display: none;
  }
  .header__menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    width: 32px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .header__menu span {
    display: block;
    width: 32px;
    height: 2px;
    background: #000;
  }
}
