._MicrocmsRichText_vr31t_1 {
  margin-top: var(--SPACING-MODULE-DEFAULT);

  & > :is(:not(:where(h2, h3, h4)):first-child) {
    margin-top: 0;
  }

  /* 見出しレベル2 */
  :where(h2) {
    margin-top: var(--SPACE-BLOCK-SPACING-64);
    margin-bottom: var(--SPACE-BLOCK-SPACING-24);
    padding-bottom: var(--SPACE-BLOCK-SPACING-24);
    position: relative;
    font-size: var(--FONT-SIZE-2XL);
    font-weight: var(--FONT-WEIGHT-BOLD);
    line-height: 1.5;

    @media (width > 768px) {
      margin-top: var(--SPACE-BLOCK-SPACING-80);
      margin-bottom: var(--SPACE-BLOCK-SPACING-32);
      font-size: var(--FONT-SIZE-4XL);
    }

    /* border */
    &::before {
      background-image: linear-gradient(
        to right,
        var(--BORDER-BLACK) 0%,
        var(--BORDER-BLACK) 20%,
        var(--BORDER-DEFAULT) 20%,
        var(--BORDER-DEFAULT) 100%
      );
      bottom: 0;
      content: '';
      display: block;
      height: 2px;
      left: 0;
      position: absolute;
      width: 100%;
    }

    & + *:not(:is(h1, h2, h3, h4, h5, h6)) {
      margin-top: 0 !important;
    }

    :where(a:any-link) {
      display: block;
      text-decoration: none;
      color: var(--TEXT-BLACK);
      transition: opacity var(--TRANSITION);

      &::after {
        content: '';
        display: inline-block;
        width: 32px;
        height: 32px;
        background-color: var(--TEXT-BLACK);
        mask-image: url('/assets/images/common/icon-arrow-right-bold.svg');
        mask-repeat: no-repeat;
        mask-size: cover;
        margin-left: var(--SPACE-BLOCK-SPACING-8);
        position: relative;
        top: 0.2em;

        @media (width > 768px) {
          top: 0.15em;
        }
      }

      @media (any-hover: hover) {
        &:hover {
          opacity: var(--OPACITY-HOVER);
        }
      }
    }

    &[style*='text-align: center'],
    &[style*='text-align: right'] {
      &::before {
        content: none;
      }
    }
  }

  /* 見出しレベル3 */
  :where(h3) {
    margin-top: var(--SPACE-BLOCK-SPACING-64);
    margin-bottom: var(--SPACE-BLOCK-SPACING-24);
    padding-bottom: var(--SPACE-BLOCK-SPACING-8);
    position: relative;
    font-size: var(--FONT-SIZE-XL);
    font-weight: var(--FONT-WEIGHT-BOLD);
    line-height: 1.5;

    @media (width > 768px) {
      margin-top: var(--SPACE-BLOCK-SPACING-72);
      margin-bottom: var(--SPACE-BLOCK-SPACING-32);
      font-size: var(--FONT-SIZE-3XL);
    }

    /* border */
    &::before {
      content: '';
      display: block;
      height: 2px;
      width: 100%;
      background-image: linear-gradient(
        to right,
        var(--BORDER-BLACK) 0,
        var(--BORDER-BLACK) 16px,
        var(--BORDER-DEFAULT) 16px,
        var(--BORDER-DEFAULT) 32px,
        transparent 32px,
        transparent 100%
      );
      position: absolute;
      bottom: 0;
      left: 0;
    }

    & + *:not(:is(h1, h2, h3, h4, h5, h6)) {
      margin-top: 0 !important;
    }

    :where(a:any-link) {
      text-decoration: none;
      color: var(--TEXT-BLACK);
      transition: opacity var(--TRANSITION);

      &::after {
        content: '';
        display: inline-block;
        aspect-ratio: 1 / 1;
        width: 24px;
        height: auto;
        background-color: var(--TEXT-BLACK);
        mask-image: url('/assets/images/common/icon-arrow-right-bold.svg');
        mask-repeat: no-repeat;
        mask-size: cover;
        margin-left: var(--SPACE-BLOCK-SPACING-8);
        position: relative;
        top: 0.2em;

        @media (width > 768px) {
          width: 32px;
          top: 0.15em;
        }
      }

      @media (any-hover: hover) {
        &:hover {
          opacity: var(--OPACITY-HOVER);
        }
      }
    }

    &[style*='text-align: center'],
    &[style*='text-align: right'] {
      &::before {
        content: none;
      }
    }
  }

  /* 見出しレベル4 */
  :where(h4) {
    margin-top: var(--SPACING-MODULE-DEFAULT);
    margin-bottom: var(--SPACE-BLOCK-SPACING-24);
    position: relative;
    font-size: var(--FONT-SIZE-L);
    font-weight: var(--FONT-WEIGHT-BOLD);
    line-height: 1.5;

    @media (width > 768px) {
      font-size: var(--FONT-SIZE-2XL);
    }

    & + *:not(:is(h1, h2, h3, h4, h5, h6)) {
      margin-top: 0 !important;
    }
  }

  /* 通常テキスト */
  :where(p) {
    margin-top: var(--SPACING-MODULE-DEFAULT);
    font-size: var(--FONT-SIZE-XS);

    @media (width > 768px) {
      font-size: var(--FONT-SIZE-BASE);
    }

    & + & {
      margin-top: var(--SPACE-BLOCK-SPACING-16);
    }

    :where(a:any-link) {
      text-decoration: underline;
      transition: opacity var(--TRANSITION);

      & > :where(svg) {
        margin-inline: var(--SPACE-BLOCK-SPACING-4);
        aspect-ratio: 1 / 1;
        width: 16px;
        height: auto;
        position: relative;
        top: -0.3em;

        &:has([id^='icon-pdf-']) {
          top: 0.1em;
          width: 20px;
        }
      }

      &:hover {
        text-decoration: none;
        opacity: var(--OPACITY-HOVER);
      }
    }

    :where(strong) {
      color: var(--TEXT-BLACK);
      font-weight: var(--FONT-WEIGHT-BOLD);
    }
  }

  /* メディア */
  :where(figure) {
    margin-top: var(--SPACING-MODULE-DEFAULT);
    margin-inline: auto;
    display: table;
    vertical-align: top;

    &[style*='text-align: left;'] {
      margin-inline: initial;
    }

    &[style*='text-align: right;'] {
      margin-right: initial;
    }

    :where(figcaption) {
      margin-top: var(--SPACE-BLOCK-SPACING-16);
      display: table-caption;
      caption-side: bottom;
      text-align: center;
      font-size: var(--FONT-SIZE-XXS);
      line-height: 1.5;
    }

    :where(a:any-link) {
      display: block;
      position: relative;
      transition: opacity var(--TRANSITION);

      &:focus-visible {
        opacity: var(--OPACITY-HOVER);
      }

      @media (any-hover: hover) {
        &:hover {
          opacity: var(--OPACITY-HOVER);
        }
      }

      /* icon background */
      &::before {
        content: '';
        display: block;
        background-color: var(--BG-BLACK);
        height: 40px;
        width: 40px;
        position: absolute;
        right: 0;
        bottom: 0;
      }

      &:not([target='_blank']) {
        /* icon */
        &::after {
          content: '';
          display: block;
          height: 32px;
          width: 32px;
          background-color: var(--BG-WHITE);
          mask-image: url('/assets/images/common/icon-arrow-right-bold.svg');
          mask-position: center;
          mask-repeat: no-repeat;
          mask-size: contain;
          position: absolute;
          right: 4px;
          bottom: 4px;
        }
      }

      &:has(:where(svg)) :where(svg) {
        color: var(--BG-WHITE);
        position: absolute;
        right: 4px;
        bottom: 4px;
        z-index: var(--Z-INDEX-DEFAULT);

        :where(path) {
          fill: currentColor;
        }
      }
    }
  }

  /* メディア（iframe） */
  :where(&:has(iframe)) {
    margin-inline: auto;
  }

  :where(div:has(iframe)) {
    margin-top: var(--SPACING-MODULE-DEFAULT);
  }

  /* リスト（ul） */
  :where(ul) {
    margin-top: var(--SPACING-MODULE-DEFAULT);
    display: flex;
    flex-direction: column;
    gap: var(--SPACE-BLOCK-SPACING-8);

    :where(li) {
      --icon-size: 4px;

      position: relative;
      padding-left: calc(var(--icon-size) + var(--SPACE-BLOCK-SPACING-8));
      font-size: var(--FONT-SIZE-XS);

      @media (width > 768px) {
        font-size: var(--FONT-SIZE-BASE);
      }

      /* bullet */
      &::before {
        content: '';
        display: block;
        height: var(--icon-size);
        width: var(--icon-size);
        background-color: var(--BORDER-BLACK);
        position: absolute;
        left: 0;
        top: 0.75em;
      }

      & > :is(ul, ol) {
        margin-top: var(--SPACE-BLOCK-SPACING-4);
        padding-left: calc(1em - var(--icon-size));

        :where(li) {
          &::before {
            background-color: var(--BORDER-DEFAULT);
          }
        }
      }
    }
  }

  /* リスト（ol） */
  :where(ol) {
    margin-top: var(--SPACING-MODULE-DEFAULT);
    padding-left: var(--SPACE-BLOCK-SPACING-24);
    display: flex;
    flex-direction: column;
    gap: var(--SPACE-BLOCK-SPACING-8);
    list-style-type: revert;

    :where(li) {
      padding-left: var(--SPACE-BLOCK-SPACING-8);
      font-size: var(--FONT-SIZE-XS);

      @media (width > 768px) {
        font-size: var(--FONT-SIZE-BASE);
      }

      & > :is(ul, ol) {
        margin-top: var(--SPACE-BLOCK-SPACING-8);
        padding-left: var(--SPACE-BLOCK-SPACING-16);

        @media (width > 768px) {
          padding-left: var(--SPACE-BLOCK-SPACING-24);
        }
      }
    }
  }

  /* テーブル */
  :where(table) {
    margin-top: var(--SPACING-MODULE-DEFAULT);
    width: 100%;

    :where(th, td) {
      min-width: 120px;
      padding: var(--SPACE-BLOCK-SPACING-16);
      border: 1px solid var(--BORDER-DEFAULT);

      & > :first-child {
        margin-top: 0;
      }

      & > * + * {
        margin-top: var(--SPACE-BLOCK-SPACING-16) !important;

        @media (width > 768px) {
          margin-top: var(--SPACE-BLOCK-SPACING-24) !important;
        }
      }
    }

    :where(th) {
      background-color: var(--BG-GRAY);
    }
  }

  .js-tableScroll {
    margin-top: var(--SPACING-MODULE-DEFAULT);
    position: relative;
    overflow: auto;

    :where(table) {
      margin-top: 0;

      @media (width <= 768px) {
        width: 1024px;
      }
    }

    .js-scrollTable__guideIcon {
      position: absolute;
      top: min(50%, 240px);
      left: 50%;
      translate: -50% -50%;
      z-index: var(--Z-INDEX-DEFAULT);
    }
  }
}
