@layer layouts {

  /* ===== header ===== */


  .l-header__inner {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--color-text);
    padding: 0 0 0 2%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
  }

  .l-header__logo {
    position: relative;

    a {
      display: block;
      background-image: none;

      &:hover {
        opacity: 0.7;
      }
    }

    img {
      width: 220px;
    }
  }

  .l-header__logoImg[data-logo="white"] {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
  }

  .l-header__right {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 30px;
  }

  .l-header__sns {
    display: flex;
    gap: 15px;

    li {
      width: 35px;
    }

    a {
      background-image: none;
    }

    a:hover {
      opacity: 0.7;
    }
  }

  .l-header__nav {
    height: 100%;
  }

  .l-header__list {
    display: flex;
    align-items: stretch;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .l-header__item {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    display: grid;
    border-left: 1px solid var(--color-text);

    &.is-request .l-header__link::before {
      width: 22px;
      height: 27px;
      background: url("/assets/img/global/icon-request.svg") no-repeat center/contain;
    }

    &.is-mail .l-header__link::before {
      width: 27px;
      height: 18px;
      background: url("/assets/img/global/icon-mail.svg") no-repeat center/contain;
    }

    &.is-access .l-header__link::before {
      width: 23px;
      height: 29px;
      background: url("/assets/img/global/icon-access.svg") no-repeat center/contain;
    }
  }

  .l-header__link {
    color: var(--color-navy);
    width: 80px;
    padding: 10px 0 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    grid-row: span 2;
    gap: 10px;
    background-image: none;

    &::before {
      content: "";
      display: inline-block;
      margin: 0 auto;
    }
  }

  .l-header__item:hover {
    .l-header__link {
      background: var(--color-navy);
      color: #fff;
    }

    &.is-request .l-header__link::before {
      background-image: url("/assets/img/global/icon-request-wh.svg");
    }

    &.is-mail .l-header__link::before {
      background-image: url("/assets/img/global/icon-mail-wh.svg");
    }

    &.is-access .l-header__link::before {
      background-image: url("/assets/img/global/icon-access-wh.svg");
    }
  }

  .l-header__menu:hover {
    background: var(--color-navy);

    .l-hamburger__bar {
      border-color: #fff;
    }
  }

  /* ハンバーガー */
  .is-close,
  .is-hover {
    display: none;
  }

  .l-header__menu {
    position: relative;
    width: 80px;
    transition: color .2s;

    &:hover {
      color: #fff;
    }
  }

  .l-header__menu {
    position: relative;
  }

  .l-header__menuIcon--menu,
  .l-header__menuIcon--close {
    width: 33px;
    height: 42.06px;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: currentColor;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-position: center;
    -webkit-mask-position: center;
  }

  .l-header__menuIcon--menu {
    mask-image: url("/assets/img/global/menu.svg");
    -webkit-mask-image: url("/assets/img/global/menu.svg");
  }

  .l-header__menuIcon--close {
    mask-image: url("/assets/img/global/menu-close.svg");
    -webkit-mask-image: url("/assets/img/global/menu-close.svg");
    opacity: 0;
    visibility: hidden;
  }

  .l-header__menu.is-open .l-header__menuIcon--menu {
    opacity: 0;
    visibility: hidden;
  }

  .l-header__menu.is-open .l-header__menuIcon--close {
    opacity: 1;
    visibility: visible;
  }

  /* オーバーレイ */
  .l-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: #989898;
    mix-blend-mode: multiply;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: pointer;

    &.is-open {
      opacity: 1;
      visibility: visible;
    }
  }

  /* キーワード検索 */
  .l-keyword {
    max-width: 80%;
    border: 1px solid var(--color-mgray);
    border-radius: 100px;
    overflow: hidden;
    position: relative;

    input {
      display: block;
      width: 100%;
      padding: 16px 55px 16px 24px;

      &:focus {
        outline: none;
      }
    }

    ::placeholder {
      color: #56607e;
    }
  }

  .l-keyword--sp {
    display: none;
  }

  .l-keyword__submit {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    z-index: 1;

    &:hover {
      opacity: .8;
    }
  }

  /* ドロワー本体 */
  .l-drawer {
    width: 100%;
    max-height: calc(100% - 80px);
    background: #fff;
    padding: 40px;
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;

    &.is-open {
      opacity: 1;
      visibility: visible;
    }
  }

  .l-drawer__body {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
  }

  .l-drawer__cols {
    display: grid;
    grid-template-columns: 1fr 220px;
    column-gap: 50px;
    align-items: start;
  }

  /* PC：タブ表示 */
  .l-drawer__menu {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0 30px;
  }

  .l-drawer__head {
    order: 0;
    position: relative;
    padding: 0.8em 1em;
    font-family: var(--font-family-mincho);
    font-weight: var(--font-weight-semibold);

    &::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -1px;
      width: 100%;
      height: 4px;
      background: var(--color-main);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s ease;
    }
  }

  .l-drawer__item {
    display: contents;

    a {
      color: var(--color-text);
    }
  }

  .l-drawer__item.is-active .l-drawer__head::after,
  .l-drawer__head:hover::after {
    transform: scaleX(1);
  }

  .l-drawer__icon {
    display: none;
  }

  .l-panel {
    order: 1;
    width: 100%;
    grid-template-columns: 250px auto;
    column-gap: 60px;
    margin-top: 40px;
    display: none;
  }

  .l-drawer__item.is-active .l-panel {
    display: grid;
  }

  .l-panel__top {
    color: var(--color-text);

    &:hover {
      color: var(--color-main);

      .l-panel__arrow::after {
        transform: translateX(6px);
      }
    }
  }

  .l-panel__thumb {
    border: 1px solid #d4d0de;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .l-panel__arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;

    &::after {
      content: "";
      display: inline-block;
      width: 1em;
      aspect-ratio: 1/1;
      background: url("/assets/img/global/header-arrow.png") no-repeat center/contain;
      transition: 0.2s;
    }
  }

  .l-panel__nav__body {
    display: flex;
    gap: 40px;
  }

  .l-panel__nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 140px;

    a {
      color: var(--color-text);
      display: block;
      padding-left: 1em;
      border-left: 3px solid var(--dept-color, #D4D0DE);
      background-image: none;
    }

    a:hover {
      color: var(--color-main);
    }
  }

  /* グループカラー */
  .l-panel__nav a[data-color="bungaku"] {
    --dept-color: var(--color-bungaku);
  }

  .l-panel__nav a[data-color="kyouiku"] {
    --dept-color: var(--color-f28476);
  }

  .l-panel__nav a[data-color="shinri"] {
    --dept-color: var(--color-shinri);
  }

  .l-panel__nav a[data-color="genbi"] {
    --dept-color: var(--color-genbi);
  }

  .l-panel__nav a[data-color="kasei"] {
    --dept-color: var(--color-kasei);
  }

  .l-panel__nav a[data-color="kyouiku"] {
    --dept-color: var(--color-kyouiku);
  }

  .l-panel__nav a[data-color="kango"] {
    --dept-color: var(--color-kango);
  }

  .l-panel__nav a[data-color="rikou"] {
    --dept-color: var(--color-rikou);
  }

  .l-panel__nav a[data-color="yakugaku"] {
    --dept-color: var(--color-yakugaku);
  }

  .l-panel__external::after {
    content: "";
    display: inline-block;
    width: 14px;
    aspect-ratio: 1/1;
    background-image: url("data:image/svg+xml,%3Csvg id='_レイヤー_2' data-name='レイヤー 2' xmlns='http://www.w3.org/2000/svg' width='20.83' height='21.12' viewBox='0 0 20.83 21.12'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%236f0689;%7D%3C/style%3E%3C/defs%3E%3Cg id='_コンテンツ' data-name='コンテンツ'%3E%3Cg%3E%3Cpath class='cls-1' d='M19.55,11.04h-2c-.11,0-.2.09-.2.2v7.47H2.4V3.77h7.47c.11,0,.2-.09.2-.2V1.57c0-.11-.09-.2-.2-.2H.2c-.11,0-.2.09-.2.2v19.35c0,.11.09.2.2.2h19.35c.11,0,.2-.09.2-.2v-9.67c0-.11-.09-.2-.2-.2Z'/%3E%3Cpath class='cls-1' d='M20.73,0h-6.34c-.06,0-.1.04-.1.1v2c0,.06.04.1.1.1h2.68l-8.27,8.27s-.04.1,0,.14l1.41,1.41s.04.03.07.03.05,0,.07-.03L18.63,3.75v2.68c0,.06.04.1.1.1h2c.06,0,.1-.04.1-.1V.1c0-.06-.04-.1-.1-.1Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    margin-left: 10px;
  }

  /* 対象者別・バナー・補助・SNS */
  .l-drawer__side {
    padding-top: 44px;

    a {
      color: var(--color-navy);
      background-image: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1.2em;
      border-bottom: 1px solid #d4d0de;
      font-weight: var(--font-weight-medium);

      &::after {
        content: "";
        display: inline-block;
        width: 1em;
        aspect-ratio: 1/1;
        background: url("/assets/img/global/header-arrow.png") no-repeat center/contain;
        transition: 0.2s;
      }

      &:hover {
        color: var(--color-main);

        &::after {
          transform: translateX(6px);
        }
      }
    }
  }

  /* お問い合わせボタン SP */
  .l-contactSp {
    display: none;
    margin-top: 40px;
  }

  .l-contactSp__btn {
    color: var(--color-text);
    display: block;
    border: 1px solid var(--color-mgray);
    padding: 25px;
    text-align: center;
    position: relative;

    &::after {
      content: "";
      display: inline-block;
      width: 13px;
      height: 10px;
      background: url("/assets/img/global/header-arrow.png") no-repeat center/contain;
      position: absolute;
      right: 25px;
      top: 50%;
      transform: translateY(-50%);
    }
  }

  .l-contactSp__txt {
    position: relative;

    &::before {
      content: "";
      display: inline-block;
      width: 30px;
      height: 20px;
      background: url("/assets/img/global/icon-mail.svg") no-repeat center/contain;
      position: absolute;
      left: -18px;
      top: 50%;
      transform: translate(-100%, -50%);
    }
  }

  /* バナー */
  .l-drawer__banners {
    width: 100%;
    max-width: 700px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;

    img {
      width: 100%;
    }

    a:hover {
      opacity: 0.8;
    }
  }

  .l-drawer__sub {
    display: flex;
    flex-wrap: wrap;
    gap: 1em 3em;
    justify-content: center;

    a {
      color: var(--color-text);
      font-size: 1.4rem;

      &:hover {
        color: var(--color-main);
      }
    }
  }

  .l-drawer__sns {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 15px;

    li {
      width: 35px;
    }
  }

  @media screen and (max-width: 1200px) {
    .l-drawer__cols {
      grid-template-columns: 1fr;
    }

    .l-drawer__menu {
      gap: 0 10px;
    }

    .l-drawer__head {
      padding: .8em;
    }

    .l-keyword {
      margin: 5px auto 15px;
    }

    .l-keyword--pc {
      display: none;
    }

    .l-keyword--sp {
      display: block;
    }
  }

  @media screen and (max-width: 820px) {
    .l-panel__nav__body {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      padding: 20px 0;
      gap: 20px;
      padding: 30px 0 40px;
    }
  }

  @media screen and (max-width: 768px) {
    .l-header__right {
      gap: 20px;
    }

    .l-header__inner {
      height: 60px;
    }

    .l-header__logo img {
      width: 175px;
    }

    .l-header__item {
      font-size: 1rem;

      &:not(:last-child) {
        border-left: none;
      }

      &.is-mail {
        display: none;
      }

      &.is-request .l-header__link::before {
        width: 19px;
        height: 24px;
      }

      &.is-access .l-header__link::before {
        width: 17px;
        height: 21px;
      }
    }

    .l-header__link {
      width: 60px;
      gap: 7px;
      padding: 0;
      justify-content: center;
    }

    .l-header__menu {
      width: 60px;
    }

    .l-header__menuIcon--menu {
      width: 25px;
      height: 23.4px;
    }

    .l-header__menuIcon--close {
      width: 25px;
      height: 31.9px;
    }

    .l-hamburger {
      width: 22px;
      height: 10px;
    }

    .l-hamburger__bar {
      &:first-child {
        top: 0;
      }

      &:last-child {
        bottom: 0;
      }
    }

    .l-header__sns {
      display: none;
    }

    .l-drawer {
      top: 60px;
      height: calc(100% - 60px);
      max-height: auto;
      padding: 20px 0;
    }

    .l-drawer__menu {
      display: block;
      border-bottom: none;
      gap: 0;
    }

    .l-drawer__head {
      font-size: 1.6rem;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      padding: 20px;
      font-family: var(--font-family-mincho);

      &::after {
        display: none;
      }
    }

    .l-drawer__body {
      width: 80%;
      max-width: 450px;
      margin: 0 auto;
    }

    .l-drawer__icon {
      display: block;
      position: absolute;
      right: 20px;
      width: 16px;
      height: 16px;

      &::before,
      &::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        background: var(--color-main);
        transition: transform 0.3s ease;
      }

      &::before {
        width: 16px;
        height: 2px;
        transform: translate(-50%, -50%);
      }

      &::after {
        width: 2px;
        height: 16px;
        transform: translate(-50%, -50%);
      }
    }

    .l-panel {
      font-size: 1.4rem;
      order: 0;
      grid-template-columns: 1fr;
      width: 100%;
      margin-top: 0;
      column-gap: 0;
      overflow: hidden;
      transition: grid-template-rows 0.4s ease;

      >* {
        min-height: 0;
      }
    }

    .l-panel__nav__body {
      margin-bottom: 30px;
      border-bottom: 1px solid var(--color-mgray);
    }

    .l-panel__nav {
      min-width: auto;
    }

    .l-drawer__item.is-active .l-panel {
      display: grid;
      grid-template-rows: 1fr;
    }

    .l-drawer__item.is-active .l-drawer__icon::after {
      transform: translate(-50%, -50%) scaleY(0);
    }

    .l-drawer__item.is-active .l-drawer__head {
      border-bottom: 3px solid var(--color-main);
    }

    .l-panel__top {
      width: 100%;
      display: grid;
      grid-template-columns: 100px auto;
      gap: 20px;
      margin-top: 20px;
    }

    .l-panel__arrow {
      margin-top: 0;
    }


    .l-drawer__side {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      column-gap: 15px;
      margin-top: 30px;
      padding-top: 0;

      li:nth-child(1) a,
      li:nth-child(2) a {
        border-top: 1px solid #d4d0de;
      }
    }

    .l-drawer__banners {
      grid-template-columns: 1fr;
      margin: 30px auto;
    }

    .l-drawer__sub {
      display: none;
    }

    .l-drawer__sns {
      display: flex;
    }

    .l-contactSp {
      display: block;
    }
  }


  /* ===== footer ===== */

  /* 上に戻るボタン */
  .l-pagetop {
    max-width: 90%;
    margin: 0 auto;
    position: sticky;
    bottom: 20px;
    display: flex;
    justify-content: flex-end;
    z-index: 100;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;

    &.is-visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
  }

  .l-pagetop__btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;

    width: 80px;
    height: 80px;

    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: .05em;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--color-text);

    &::before {
      content: "";
      order: 0;
      display: inline-block;
      width: 14px;
      aspect-ratio: 29/33;
      background: url("/assets/img/global/pagetop-arrow.png") no-repeat center/contain;
    }

    &::after {
      content: "";
      order: -1;
      display: block;
      width: 14px;
      height: 3px;
      background: var(--color-main);
    }

    &:hover::before {
      animation: pagetopArrow 0.6s ease;
    }
  }

  @keyframes pagetopArrow {
    0% {
      transform: translateY(0);
      opacity: 1;
    }

    45% {
      transform: translateY(-16px);
      opacity: 0;
    }

    55% {
      transform: translateY(16px);
      opacity: 0;
    }

    100% {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @media (max-width: 1080px) {
    .l-pagetop {
      bottom: 15px;
    }

    .l-pagetop__btn {
      width: 70px;
      height: 70px;
    }
  }

  /* footer */
  .l-footer {
    padding: 0 5%;
    background: var(--color-navy);
    color: #fff;
    margin-top: -40px;
  }

  .l-footer__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 60px 0 30px;
    position: relative;
  }

  .l-footer__top {
    display: flex;
    justify-content: space-between;
    column-gap: 170px;
    row-gap: 30px;
  }

  .footer__info {
    text-align: center;
  }

  .l-footer__logo {
    background-image: none;

    &:hover {
      opacity: 0.8;
    }
  }

  .l-footer__address {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 0;
  }

  .l-footer__sns {
    display: grid;
    grid-template-columns: repeat(3, 36px);
    justify-content: center;
    gap: 16px;
    margin-top: 25px;

    a {
      display: block;
      background-image: none;

      &:hover {
        opacity: 0.8;
      }
    }
  }

  .footer__btns {
    display: flex;
    gap: 12px;
    margin-top: 35px;
  }

  .footer__btn {
    font-weight: var(--font-weight-medium);
    color: #fff;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    letter-spacing: .05em;
    padding: 10px 24px;
    border: 1px solid #fff;
    border-radius: 999px;
    transition: 0.3s;

    &::after {
      content: "";
      width: 6px;
      height: 6px;
      border-top: 1px solid currentColor;
      border-right: 1px solid currentColor;
      rotate: 45deg;
    }

    &:hover {
      background: #fff;
      color: #1f2350;
    }
  }

  /* ナビ */
  .l-fnav {
    flex: 1;
    justify-content: space-around;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 100px;
    letter-spacing: .05em;
  }

  .l-fnav__list {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    row-gap: 35px;
    white-space: nowrap;
    font-weight: var(--font-weight-medium);

    &:last-child {
      font-weight: var(--font-weight-normal);
      font-size: 1.5rem;
      row-gap: 25px;
    }

    a {
      color: #fff;
    }
  }

  .l-flink {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #fff;
    letter-spacing: .05em;

    a {
      display: inline-flex;
      align-items: center;
      gap: 12px;
    }
  }

  .l-flink__list {
    display: flex;
    justify-content: space-around;
    row-gap: 15px;
  }

  .l-flink__item {

    a {
      color: #fff;
      display: flex;
      gap: 20px;
      align-items: center;
      background-image: none;
    }

    a::after {
      content: "";
      display: inline-block;
      width: 1em;
      aspect-ratio: 1/1;
      background: url("/assets/img/global/footer-arrow.png") no-repeat center/contain;
      transition: .2s;
    }

    a:hover {
      opacity: .8;

      &::after {
        transform: translateX(8px);
      }
    }
  }

  .l-footer__copy {
    font-family: var(--font-family-oswald);
    font-weight: 200;
    letter-spacing: .1em;
    margin-top: 40px;
    margin-bottom: 0;
    padding-bottom: 30px;
    text-align: center;
    line-height: 1.1;

    small {
      font-size: 1.5rem;
    }
  }


  @media (max-width: 1080px) {
    .l-footer__top {
      flex-direction: column;
      align-items: center;
      order: 2;
      margin-inline: initial;
    }
  }

  @media (max-width: 768px) {
    .l-footer__inner {
      display: flex;
      flex-direction: column;
    }



    .l-footer__sns {
      gap: 25px;
      margin-top: 25px;
    }

    .l-fnav {
      width: 100%;
      grid-template-columns: repeat(2, 1fr);
      column-gap: 10%;
    }

    .l-fnav__list {
      flex-direction: row;
      padding: 30px 0;
      row-gap: 25px;

      &:not(:last-child) {
        flex-direction: column;

      }

      &:last-child {
        flex-direction: column;
        height: 172px;
        font-size: 1.4rem;
        grid-column: span 2;
        border-top: 1px solid #fff;
        padding-left: 5%;
        padding-right: 5%;

        li {
          width: 50%;
        }
      }
    }

    .l-footer__info {
      order: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .l-flink {
      margin: 0;
      padding: 0 0 30px;
      border-top: none;
      border-bottom: 1px solid #fff;
    }

    .l-flink__list {
      flex-wrap: wrap;
      justify-content: space-between;
      row-gap: 25px;
    }

    .l-flink__item {
      width: 45%;

      a {
        justify-content: space-between;

      }
    }

    .l-footer__copy {
      margin-top: 30px;

      small {
        font-size: 1rem;
      }
    }
  }
}


/* ===== print ===== */
@media print {

  .l-header,
  .l-footer {
    display: none;
  }
}