@layer custom {
  html {
    scroll-behavior: smooth;
  }

  .page-glossary {
  }

  /* カテゴリフィルター */
  .page-glossary .categoryList {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    align-self: stretch;
    padding: 17px 25px;
    background-color: #f5f5f5;
    border-radius: 3px;
    gap: 0;
  }

  .page-glossary .categoryName {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 5px;
  }

  .page-glossary .tapArea {
    display: flex;
    flex-direction: column;
    padding-top: 2px;
    font-weight: 400;
    font-size: 14px;
    line-height: 36px;
    color: #333;
    white-space: nowrap;
  }

  .page-glossary .categoryItem {
    display: flex;
    flex-direction: column;
  }

  .page-glossary .categoryItemList {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
  }

  .page-glossary .categoryItemList li {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px;
  }

  .page-glossary .categoryItemList li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 20px 0;
    border-radius: 19px;
    background-color: #fff;
    font-weight: 400;
    font-size: 15px;
    line-height: 36px;
    color: #333;
    text-decoration: none;
    text-align: center;
    transition:
      background-color 0.2s,
      color 0.2s;
  }

  .page-glossary .categoryItemList li a:hover {
    background-color: #eb6100;
    color: #fff;
    font-weight: 700;
  }

  .page-glossary .categoryItemList li.selected a {
    background-color: #eb6100;
    color: #fff;
    font-weight: 700;
  }

  /* 用語セクション全体 */
  .page-glossary .glossary-sections {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    width: 100%;
    margin-top: 12px;
  }

  .page-glossary .wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 40px 48px 12px 48px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e2e2e2;
  }

  /* セクション見出し */
  .page-glossary .term-name {
    padding-bottom: 8px;
    border-bottom: 1px solid #aaa;
    font-weight: 700;
    font-size: 24px;
    line-height: 39px;
    color: #333;
  }

  /* 用語リスト */
  .page-glossary .term-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .page-glossary .list {
    margin: 0;
  }

  .page-glossary .list + .list {
    border-top: 1px solid #e2e2e2;
  }

  .page-glossary .qbtn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    padding: 40px 20px 40px 0;
  }

  .page-glossary .list + .list .qbtn {
    /* padding-bottom: 0; */
  }

  /* 用語タイトル */
  .page-glossary .qbtn-title {
    font-weight: 700;
    font-size: 24px;
    line-height: 27px;
    color: #333;
  }

  /* 用語説明 */
  .page-glossary .qbtn-desc {
    font-weight: 400;
    font-size: 16px;
    line-height: 27px;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
  }

  /* 続きを読むボタン */
  .page-glossary .qbtn-link {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0;
  }

  .page-glossary .read-more-btn {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 4px 20px;
    border: 1px solid #eb6100;
    border-radius: 9999px;
    background-color: #fff;
    font-weight: 400;
    font-size: 16px;
    line-height: 27px;
    color: #eb6100;
    text-decoration: none;
    transition:
      background-color 0.2s,
      color 0.2s;
  }

  .page-glossary .read-more-btn:hover {
    background-color: #eb6100;
    color: #fff;
  }

  .page-glossary .read-more-btn i {
    font-size: 12px;
    line-height: 16px;
  }

  .page-glossary .post-nothing {
    text-align: center;
    color: #666;
    padding: 40px 0;
  }

  /* ============================
     Single Page
     ============================ */

  .page-glossary-single .single-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    gap: 56px;
    width: 100%;
  }

  .page-glossary-single .wrap {
    gap: 44px;
    padding: 40px 30px;
    max-width: none;
  }

  .page-glossary-single .single-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }

  .page-glossary-single .term-name {
    font-size: 26px;
    line-height: 36.4px;
    border-bottom: none;
    padding-bottom: 0;
  }

  .page-glossary-single .term-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .page-glossary-single .qbtn {
    gap: 32px;
    padding: 0 20px 0 0;
  }

  .page-glossary-single .qbtn-text {
    font-weight: 400;
    font-size: 15px;
    line-height: 25.6px;
    color: #333;
    margin: 0;
  }

  /* 関連用語 */
  .page-glossary-single .related-terms {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 28px 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
  }

  .page-glossary-single .related-terms-title {
    font-weight: 700;
    font-size: 18px;
    line-height: 27px;
    color: #333;
  }

  .page-glossary-single .related-terms-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }

  .page-glossary-single .related-term-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 40px;
    background-color: #fff;
    border: 1px solid #aaa;
    border-radius: 9999px;
    font-weight: 400;
    font-size: 15px;
    line-height: 27px;
    color: #333;
    text-decoration: none;
    transition:
      background-color 0.2s,
      border-color 0.2s;
  }

  .page-glossary-single .related-term-tag:hover {
    background-color: #f0f0f0;
    border-color: #eb6100;
    color: #eb6100;
  }

  /* 用語集トップへ戻るボタン */
  .page-glossary-single .back-to-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 352px;
    height: 56px;
    padding: 0 29px;
    background-color: #fcfcfc;
    border: 1px solid #eb6100;
    border-radius: 9999px;
    font-weight: 400;
    font-size: 17px;
    color: #eb6100;
    text-decoration: none;
    transition:
      background-color 0.2s,
      color 0.2s;
  }

  .page-glossary-single .back-to-list:hover {
    background-color: #eb6100;
    color: #fff;
  }

  .page-glossary-single .back-to-list:hover .back-to-list-arrow {
    border-color: #fff;
  }

  .page-glossary-single .back-to-list-arrow {
    position: absolute;
    right: 29px;
    top: 50%;
    transform: translateY(-50%);
  }

  .page-glossary-single .back-to-list-arrow i {
    font-size: 16px;
  }

  /* レスポンシブ */
  @media (max-width: 1200px) {
    .page-glossary .wrap {
      padding: 32px 32px 12px 32px;
    }
    .page-glossary-single .wrap {
      padding: 32px;
    }
  }

  @media (max-width: 768px) {
    .page-glossary .categoryList {
      flex-direction: column;
      padding: 12px 16px;
    }

    .page-glossary .categoryName {
      padding: 0 0 8px;
    }

    .page-glossary .tapArea {
      line-height: 24px;
    }

    .page-glossary .categoryItemList li a {
      padding: 2px 14px 0;
      font-size: 13px;
      line-height: 30px;
    }

    .page-glossary .wrap {
      padding: 24px 16px 12px 16px;
    }

    .page-glossary .term-name {
      font-size: 20px;
      line-height: 32px;
    }

    .page-glossary .qbtn {
      padding: 24px 0;
    }

    .page-glossary .qbtn-title {
      font-size: 20px;
    }

    .page-glossary .qbtn-desc {
      font-size: 14px;
      line-height: 24px;
    }

    .page-glossary .glossary-sections {
      gap: 32px;
    }

    /* Single page responsive */
    .page-glossary-single .single-content {
      gap: 32px;
    }

    .page-glossary-single .related-terms-list {
      gap: 12px;
    }

    .page-glossary-single .related-term-tag {
      padding: 6px 24px;
      font-size: 14px;
    }

    .page-glossary-single .back-to-list {
      width: 100%;
      max-width: 352px;
    }
  }
}
