.s-menu__button-back {
  z-index: var(--z-header);
  position: fixed;
  top: -6rem;
  right: -6rem;
  width: 17rem;
  height: 17rem;

  border-radius: 9999px;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  background: rgba(255, 243, 228, 1);
  transition-delay: 1s;
  transition: all 0.5s ease;
  display: grid;
  place-items: center;
  .is-open & {
    z-index: -1 !important;
  }
  .js__tmodal-active &,
  .js__lmodal-active &,
  .no-scroll &,
  .is-subpage &,
  .js__is-scroll & {
    opacity: 0;
    background: rgba(255, 243, 228, 1);
    height: 0;
    width: 0;
  }
  @media screen and (max-width: 768px) {
    width: 14.7rem;
    height: 14.7rem;
    top: -6rem;
    right: -4rem;
  }
}

.s-menu__cover {
  z-index: -1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  pointer-events: none;

  .is-open & {
    opacity: 1;
    pointer-events: auto;
    z-index: 40;
    transition-delay: 0s;
  }
}
.s-menu__bar-area {
  z-index: var(--z-header);
  position: fixed;
  top: 0;
  right: 0;
  width: 9rem;
  height: 9rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.3s;
  .js__tmodal-active &,
  .js__lmodal-active &,
  .no-scroll &,
  .is-subpage &,
  .js__is-scroll & {
    height: 8rem;
    width: 8.7rem;
    background: rgba(255, 243, 228, 1);
  }
  * {
    user-select: none;
    transition: 0.2s;
  }
  &:hover {
    opacity: 0.8;
  }
  .is-open & {
    background: #fefcfb !important;

    border-radius: 0 0 0 16px;
  }

  .s-menu__bar-text {
    position: absolute;
    line-height: 1;
    top: 2.2rem;
    right: 50%;
    transform: translateX(50%);
    font-size: 1.2rem;
    color: var(--color-text);
    display: flex;
    overflow: hidden;
    width: 5rem;
  }
  .js__tmodal-active &,
  .js__lmodal-active &,
  .no-scroll &,
  .is-subpage &,
  .js__is-scroll & {
    .s-menu__bar-text {
      top: 1.4rem;
      font-size: 1.2rem;
      letter-spacing: 0;
    }
  }

  .s-menu__bar-text-inner {
    display: flex;
    gap: 0.2rem;
    width: 10rem;
    left: 0;
    letter-spacing: 0;

    .is-open & {
      transform: translateX(-5rem);
    }
  }

  .s-menu__bar-text-open,
  .s-menu__bar-text-close {
    width: 5rem;
    text-align: center;
  }

  .s-menu__bar {
    position: absolute;
    height: 0.2rem;
    width: 2.8rem;
    top: 4rem;
    background-color: var(--color-primary);
    border-radius: 9999px;
  }

  .js__lmodal-active &,
  .no-scroll &,
  .is-subpage &,
  .js__is-scroll & {
    .s-menu__bar:nth-child(2) {
      top: 3.4rem;
    }
    .s-menu__bar:nth-child(3) {
      top: 3.8rem;
    }
    .s-menu__bar:nth-child(4) {
      top: 4.2rem;
    }
    .s-menu__bar:nth-child(5) {
      top: 4.6rem;
    }
    .s-menu__bar:nth-child(6) {
      top: 5rem;
    }
    .s-menu__bar:nth-child(7) {
      top: 5.4rem;
    }
  }
  .s-menu__bar:nth-child(2) {
    /* transition-delay: 0.2s; */

    .is-open & {
      transform: rotate(45deg);
      top: 5rem;
    }
  }

  .s-menu__bar:nth-child(3) {
    /* transition-delay: 0.05s; */
    top: 4.4rem;

    .is-open & {
      width: 0;
    }
  }

  .s-menu__bar:nth-child(4) {
    /* transition-delay: 0.1s; */
    top: 4.8rem;

    .is-open & {
      width: 0;
    }
  }

  .s-menu__bar:nth-child(5) {
    /* transition-delay: 0.15s; */
    top: 5.2rem;

    .is-open & {
      width: 0;
    }
  }

  .s-menu__bar:nth-child(6) {
    /* transition-delay: 0.2s; */
    top: 5.6rem;

    .is-open & {
      width: 0;
    }
  }
  .s-menu__bar:nth-child(7) {
    /* transition-delay: 0.2s; */
    top: 6rem;

    .is-open & {
      transform: rotate(-45deg);
      top: 5rem;
    }
  }
  .js__tmodal-active.is-open &,
  .js__lmodal-active.is-open &,
  .no-scroll.is-open &,
  .is-subpage.is-open &,
  .js__is-scroll.is-open & {
    .s-menu__bar:nth-child(2) {
      top: 4.5rem !important;
    }
    .s-menu__bar:nth-child(7) {
      top: 4.5rem !important;
    }
  }
}

.s-menu {
  * {
    transition: 0.3s;
  }
  .s-menu__logo {
    width: auto;
    top: 7.5rem;
    left: 7.5rem;
    .s-menu__logo-image {
      width: auto;
      margin-bottom: 5.2rem;
      height: 3.4rem;
      display: none;
      @media screen and (max-width: 768px) {
        display: block;
      }
    }
  }

  .s-menu__inner {
    pointer-events: none;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: flex-start;
    right: 0;
    max-width: 89.2rem;
    margin: 0 auto;
    border-left: 4px solid var(--color-line);
    background-color: rgba(250, 244, 237, 1);
    color: var(--color-text);
    right: 0;
    top: 0;
    position: fixed;
    height: 100vh;
    width: 90%;
    transform: translateX(10%);
    opacity: 0;
    transition: 0.6s;
    z-index: -1;

    .is-open & {
      transform: translateX(0);
      opacity: 1;
      pointer-events: auto;
      z-index: var(--z-menu);
    }

    @media screen and (max-width: 768px) {
      width: 100%;
      max-width: 100%;
      border-left: none;
    }
  }

  .s-menu__sp-scroll-area {
    height: 100%;
    display: flex;
    flex-direction: column;

    @media screen and (max-width: 768px) {
      height: 100svh;
      overflow-y: auto;
    }
  }

  .s-menu__scroll-area {
    max-height: 100%;
    overflow-y: auto;
    padding: 0 9.6rem;

    @media screen and (max-width: 768px) {
      max-height: none;
      overflow-y: unset;
      padding: 0 3.2rem;
    }
  }
  .s-menu__main-list {
    margin: 3.6rem 0 5rem;
  }
  .s-menu__main-list ul {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    font-family: var(--font-sans-semibold);

    @media screen and (max-width: 768px) {
      grid-template-columns: repeat(1, 1fr);
      gap: 2.4rem;
    }

    max-width: 70rem;
    color: var(--color-text);
    font-size: 1.8rem;
    padding: 0;
    gap: 0 1rem;
    @media screen and (max-width: 768px) {
    }

    a {
      display: block;
      width: 100%;
      text-decoration: none;
      position: relative;
      padding: 1.5rem 4rem 1.5rem 1.5rem;
      color: var(--color-text);
      border-bottom: 1px solid #fff;
      height: 100%;
      transition: all 0.2s ease-in-out;
      letter-spacing: 0.06rem;
      @media screen and (max-width: 768px) {
        font-size: 1.8rem;
        padding: 1.6rem 4rem 0.8rem 1.5rem;
      }

      &:before {
        transition: all 0.2s ease-in-out;
        content: "";
        position: absolute;
        right: 1rem;
        top: 0;
        bottom: 0;
        margin-top: auto;
        margin-bottom: auto;
        width: 2rem;
        height: 2rem;
        background: var(--color-primary-gradient);
        border-radius: 9999px;
        letter-spacing: 0.06em;
        @media screen and (max-width: 768px) {
          right: 0.8rem;
          top: 1rem;
        }
      }

      &:hover:before {
        right: 0.5rem;
      }

      &:after {
        transition: all 0.2s ease-in-out;
        content: "";
        top: 0;
        bottom: 0;
        right: 1.8rem;
        margin-top: auto;
        margin-bottom: auto;
        position: absolute;
        transform: rotate(-45deg);
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
        height: 0.6rem;
        width: 0.6rem;
        @media screen and (max-width: 768px) {
          right: 1.6rem;
          top: 1rem;
        }
      }

      &:hover:after {
        right: 1.3rem;
      }
    }
  }

  & li {
    transition: all 0.5s ease-in-out;
    position: relative;
  }

  .s-menu__sub-list {
    @media screen and (max-width: 768px) {
    }
  }
  .s-menu__sub-list ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    @media screen and (max-width: 768px) {
      margin: 4.8rem auto;
      grid-template-columns: repeat(2, 1fr);
    }

    margin: 0 auto 5rem;
    max-width: 70rem;
    color: var(--color-text-sub);
    font-size: 1.5rem;
    padding: 0;
    gap: 0 1rem;

    a {
      display: block;
      width: 100%;
      position: relative;
      padding: 1.5rem 2.5rem 1.5rem 1.5rem;
      color: var(--color-text-sub);
      border-bottom: 1px solid #fff;
      height: 100%;
      display: grid;
      text-decoration: none;
      align-items: center;
      font-size: 1.5rem;
      letter-spacing: 0.06em;
      @media screen and (max-width: 768px) {
        font-size: 1.2rem;
        line-height: 1.5;
      }

      &:after {
        content: "";
        top: 0;
        bottom: 0;

        right: 1.3rem;
        margin-top: auto;
        margin-bottom: auto;
        position: absolute;
        transform: rotate(-45deg);
        border-right: 2px solid var(--color-primary);
        border-bottom: 2px solid var(--color-primary);
        height: 0.6rem;
        width: 0.6rem;
      }
    }
  }
  .s-menu__clinic-banner {
    display: flex;
    justify-content: center;
    max-width: 70rem;
    margin: 4.8rem auto;
    gap: 1.6rem;
    @media screen and (max-width: 768px) {
      flex-direction: column;
      margin: 1.6rem auto;
    }
  }
  .s-menu__clinic-banner-inner {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .s-menu__clinic-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    color: var(--color-white);
    text-align: center;
    line-height: 1.5;
    font-family: var(--font-sans-bold);
    letter-spacing: 0.06em;
    z-index: 1;
  }
  .s-menu__banner {
    margin: 5rem auto 5rem;
    max-width: 70rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    bottom: -1rem;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    transition-delay: 0.2s;
    @media screen and (max-width: 768px) {
      margin: 1.6rem auto 4.8rem;
    }

    .is-open & {
      bottom: 0;
      opacity: 1;
    }

    img {
      width: 100%;
      height: auto;
      border-radius: 10px;
      max-width: 100%;
      object-fit: cover;
    }
  }

  .s-menu__sub-pr-area {
    padding: 1rem 2rem;
    background: #fff;
    font-size: 1.4rem;
    text-align: center;
    border-radius: 9999px;
    max-width: 70rem;
    margin: 5rem auto 5rem;
    letter-spacing: 0.06em;

    a {
      color: var(--color-primary);
      font-weight: normal;
      margin: 0 1rem;
      text-decoration: underline;
    }
  }

  .s-menu__footer-buttons {
    padding: var(--space-xm);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: auto;
    margin-left: -9.6rem;
    margin-right: -9.6rem;
    width: calc(100% + 19.2rem);
    a {
      border-right: 1px solid var(--color-white) !important;
      &:last-child {
        border-right: none !important;
      }
      @media (max-width: 768px) {
        border-right: none !important;
      }
    }
    @media screen and (max-width: 768px) {
      flex-direction: column;
      gap: 0.8rem;
      margin-left: 0;
      margin-right: 0;
      width: 100%;

      padding: 0 0rem 10rem;
    }

    .s-menu__button {
      flex: 1;
      display: grid;
      place-items: center;
      padding: 0.8rem;
      text-decoration: none;
      font-size: 1.5rem;
      text-align: center;
      letter-spacing: 0.1em;
      position: relative;
      box-shadow: var(--shadow-button);

      @media screen and (max-width: 768px) {
        border-radius: 4px;
        padding: 1.4rem 1.3rem 1.4rem;

        font-size: 1.2rem;
        line-height: 1.35;
      }

      img {
        border-radius: 0;
        margin-right: 0.8rem;
        vertical-align: bottom;
        height: 2.1rem;
        top: -0.4rem;
        width: auto;
        position: relative;

        @media screen and (max-width: 768px) {
          /* 左寄せ */
          position: absolute;
          left: 1.7rem;
          top: 50%;
          height: 1.7rem;
          transform: translateY(-50%);
          margin: 0;
        }
      }

      &.web {
        background: var(--color-primary-gradient);
        color: white;
      }

      &.line {
        background: var(--color-line-gradient);
        color: white;
      }

      &.tel {
        background: var(--color-button-gray-01);
        color: white;
        span {
          @media screen and (max-width: 768px) {
            font-size: 1.1rem;
          }
        }
        @media screen and (max-width: 768px) {
          padding: 0.6rem 1.3rem 0.7rem;
        }
      }
    }
  }
}

.s-menu__top-buttons {
  max-width: 700px;
  width: 100%;
  margin: 12rem auto 0;
  margin-bottom: 3.2rem;
  display: flex;
  gap: 8px;
  @media (max-width: 768px) {
    flex-direction: column;
    gap: 2.4rem;
    margin-top: 0;
  }
  .s-menu__top-button {
    position: relative;
    flex: 1;
    text-align: center;
    font-size: 1.4rem;
    padding: 18px 17px;
    border-radius: 4px;
    background: var(--color-primary-gradient);
    font-family: var(--font-sans-semibold);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.6rem;
    @media (max-width: 768px) {
      margin-bottom: 0;
      box-shadow: none !important;
    }
    img {
      width: 2.4rem;
      height: auto;
      @media (max-width: 768px) {
        width: 1.8rem;
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
      }
    }
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    &.line {
      background: var(--color-line-gradient);
    }

    &:hover {
      opacity: 0.8;
      cursor: pointer;
    }

    @media (max-width: 768px) {
    }
  }
  .s-menu__top-button-badge {
    font-size: 1.3rem;
    position: absolute;
    line-height: 135%;
    letter-spacing: 1.3px;
    right: 22px;
    top: -26px;
    padding: 10px;
    color: rgba(51, 168, 99, 1);

    background: #fff;
    box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.25);
    gap: 10px;
    border-radius: 4px;

    @media (max-width: 768px) {
      font-size: 1.2rem;
      top: -13px;
      right: 11px;
      padding: 6px 10px;
      box-shadow: none !important;
    }
  }
}
