:root {
  --container-max: 1200px;
  --gap: clamp(16px, 3vw, 32px);
  --radius: 0;
  --shadow: 0 0 0 rgba(0, 0, 0, 0);
  --border: none;
  --text: #000;
  --muted: #6b7280;
  --bg: #fff;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== PCデフォルト ===== */

.members {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0;
  margin-top: 6px;
}

.members__title {
  font-size: clamp(20px, 2.4vw, 28px);
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* PCは3カラム */
  gap: var(--gap);
}

.card {
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card__media {
  overflow: hidden;
}

.card__media picture,
.card__media img {
  width: 100%;
  height: 100%;
}

.card__media img {
  object-fit: cover;
}

.card__header {
  padding: 3rem 0 0;
  margin-bottom: 0.5rem;
}

.card__name {
  margin: 0;
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.card__role {
  margin: 4px 0 0;
  font-size: 1.3rem !important;
}

.card__body {
  padding: 0;
}

.card__body p {
  margin: 0;
  font-size: 1.3rem !important;
  font-feature-settings: "palt";
}
/* ===== スマホ：600px以下 ===== */
@media screen and (max-width: 600px) {
  .members {
    padding: 0;
  }

  .members__title {
    font-size: 20px;
  }

  .cards {
    grid-template-columns: 1fr; /* SPは1カラム */
    gap: 16px;
  }

  .card__header {
    padding: 2.5rem 0 0;
    margin-bottom: 0;
  }

  .card__name {
    font-size: 5.3vw;
    margin-bottom: 1.3rem;
  }

  .card__role {
    font-size: 0.9rem;
  }

  .card__body {
    padding: 0;
    margin-bottom: 4rem;
  }
  .card:last-of-type .card__body {
    margin-bottom: 0;
  }
  .card__body p {
    font-size: 1.3rem !important;
    font-feature-settings: initial;
  }
  .card__media picture,
  .card__media img {
    width: 89.3vw;
    height: auto;
    max-height: 100%;
  }
}

/* ===== M&A実績紹介-page_18 ===== */
.site_container.page {
  .page_content {
    .content_main {
      .rules {
        .box {
          padding: 25px 0 40px;
          &:last-child {
            padding-bottom: 0;
          }
        }
        .timeline {
          /* 必要に応じて位置決め用に残しておく */
          position: relative;

          .year-group {
            position: relative;
            padding-bottom: 4rem;

            &::before {
              /* 年グループをまたいだ縦線 */
              content: "";
              position: absolute;
              left: 12rem;
              top: 1rem;
              bottom: -3.6rem;
              width: 0.1rem;
              background: #dcdcdc;
            }

            &:last-child::before {
              /* 縦線を●で止める */
              bottom: 18.6rem;
            }

            .year {
              font-family: var(--font-min);
              font-size: 2rem;
              color: #000;
              margin-bottom: 0.8rem;
            }

            .item-list {
              margin: 0;
              padding: 0;
              margin-top: -2.4rem;
              position: relative;
              width: auto;

              > .item-pair {
                display: inline-flex;
                align-items: flex-start;
                flex-wrap: wrap;
                border-bottom: 1px solid #dcdcdc;
                width: 100%;
                padding-top: 3rem;
                padding-bottom: 3rem;
                &:first-child {
                  padding-top: 0;
                }

                &::after {
                  content: "";
                  position: absolute;
                  bottom: 0;
                  left: 0;
                  width: 100%;
                }

                > dt,
                > dd {
                  display: inline;
                  font-feature-settings: "palt";
                  vertical-align: middle;
                  line-height: 1.75;
                }

                > dt {
                  color: #969696;
                  font-weight: 700;
                  position: relative;
                  width: 5rem;
                  white-space: nowrap;
                  margin-right: 10rem;
                  margin-bottom: 1.5rem;

                  &::before {
                    content: "●";
                    position: absolute;
                    left: 11.6rem;
                    top: 0.6em;
                    font-size: 0.86rem;
                    color: #3058ac;
                    z-index: 1;
                  }
                  &:not(:last-of-type)::after {
                    content: "";
                    position: absolute;
                    left: 7.9rem;
                    top: 0.3em;
                    bottom: 0;
                    width: 0.1rem;
                    background: #dcdcdc;
                    z-index: 0;
                  }
                }

                > dd {
                  font-size: 1.6rem;
                  color: #000;
                  margin: 0;
                  padding: 0;
                  margin-right: 3rem;
                  &.item-full {
                    flex: 1 1 100%;
                    margin-left: 15rem;
                  }
                  &::after {
                    content: "\A";
                    white-space: pre;
                  }
                }
                .time-title {
                  font-weight: 700;
                  font-size: 18px;
                  margin-top: -2px;
                }
                .time-link {
                  &.press a {
                    background: url("/wp-content/themes/fundrise-2025-07/img/ma-track-record/icon_arrow_out.png") right
                      center/14px no-repeat;
                    padding-right: 2.2rem;
                  }
                  &.case a {
                    background: url("/wp-content/themes/fundrise-2025-07/img/ma-track-record/icon_arrow_down.png") right
                      60%/13px no-repeat;
                    padding-right: 2rem;
                  }
                  a {
                    &:link,
                    &:visited {
                      color: #3058ac;
                      text-decoration: underline;
                    }
                    &:hover,
                    &:active {
                      text-decoration: none;
                    }
                  }
                  svg {
                    margin-left: 0.3em;
                    vertical-align: -0.25em;
                    width: 18px;
                    height: 18px;
                    color: #3058ac;
                  }
                }
              }
            }
          }
        }

        .case-box {
          .h2-title {
            font-size: 175%;
            font-weight: 700;
            line-height: 1.64;
            margin: 7rem 0 3.5rem;
            position: relative;
            display: flex;
            align-items: center; /* ← 子要素を上下中央に */
            gap: 1.1rem;
            letter-spacing: 0.5px;
          }
          .label {
            display: inline-flex; /* 内側の縦中央 */
            align-items: center;
            padding: 0.1em 0.9em 0;
            border: 1px solid #3058ac; /* 線の色と太さ */
            border-radius: 9999px; /* 大きな値にすると完全な丸型（カプセル型）になる */
            font-size: 16px;
            font-weight: 400;
            color: #3058ac; /* 文字色 */
            b {
              font-family: var(--font-min);
              font-size: 18px;
              font-weight: 400;
              align-self: flex-end; /* 下に寄せる */
              margin-bottom: -1px; /* 微調整 */
            }
          }
          .lead {
            margin-bottom: 3.5rem;
          }
        }
        .img-txt-box {
          display: flex;
          align-items: flex-start;
          gap: 4rem;
          margin-bottom: 0;

          .img-box {
            flex: 0 0 auto;
            max-width: 40%;

            img {
              display: block;
              width: auto;
              height: 280px;
              border-radius: 8px;
            }
          }

          .txt-box {
            flex: 1;
            p {
              font-feature-settings: "palt";
            }

            dl {
              margin-top: 4rem;

              dt {
                margin-bottom: 1rem;
                img {
                  width: auto;
                  height: 40px;
                }
              }
              dt.case02 {
                margin-bottom: 0.5rem;
              }

              dd {
                word-break: break-all;
                color: #3058ac;
              }
            }
          }
        }

        @media screen and (max-width: 600px) {
          .img-txt-box {
            flex-direction: column;
            gap: 2.5rem;

            .img-box {
              max-width: 100%;
              img {
                border-radius: 6px;
                width: 100%;
                height: auto;
                max-height: max-content;
              }
            }

            .txt-box {
              line-height: 1.65;
            }
          }
        }
      }
    }
  }
}

@media screen and (max-width: 600px) {
  .site_container.page {
    .page_content {
      .content_main {
        .rules {
          .box {
            padding-top: 10.6vw;
            section {
              &:last-child {
                margin-bottom: 0;
              }
            }
          }
          .timeline {
            .year-group {
              padding-bottom: 10.6vw;
              &::before {
                left: 6.4rem;
                top: 2.66vw;
              }
              &:last-child::before {
                bottom: 52vw;
                left: 17.06vw;
              }

              .item-list {
                > .item-pair {
                  --leftcol: 9rem; /* 左カラム幅(年号+余白) */
                  padding: 5.4vw 0;

                  /* 既存の強制改行は打ち消す */
                  > dd::after {
                    content: none;
                  }

                  > dt {
                    margin: 0;
                    flex: 0 0 var(--leftcol); /* ← 左カラムを固定幅に */
                    width: auto; /* widthは使わない */
                    white-space: nowrap;

                    &::before {
                      left: 16vw;
                      top: 1.6vw;
                      font-size: 2.29vw;
                    }
                    &:not(:last-of-type)::after {
                      left: 4.4rem;
                    }
                  }

                  > dd {
                    margin: 0;
                    padding: 0;
                    font-size: 3.4vw;
                  }

                  /* タイトルで1行を使い切る＝ここで改行が発生 */
                  > dd.time-title {
                    font-weight: 700;
                    font-size: 3.7vw;
                    display: block;
                    flex: 0 0 calc(100% - var(--leftcol)); /* ← これが肝 */
                    margin-top: -0.53vw;
                  }

                  /* 2つのリンクは2行目で横並び */
                  > dd.time-link {
                    display: inline-flex;
                    align-items: center;
                    gap: 0.66vw;
                    margin-right: 1.6rem;
                    font-size: 3.4vw;
                    color: #3058ac;
                    text-decoration: underline;
                    position: relative;
                    top: -6.66vw;
                    left: 9rem;
                    &.press a {
                      background-size: 3.3vw;
                      background-position: right 45%;
                      padding-right: 5vw;
                    }
                    &.case a {
                      background-size: 2.6vw;
                      background-position: right 55%;
                      padding-right: 4vw;
                    }
                  }

                  /* 本文は3行目、右カラムにインデント */
                  > dd.item-full {
                    display: block;
                    margin-top: -2.6vw;
                    margin-left: var(--leftcol);
                    font-size: 3.4vw;
                  }
                }
              }
            }
          }
          .case-box {
            margin-bottom: 5rem;
            .h2-title {
              font-size: 4.5vw;
              margin-top: 2rem;
              margin-bottom: 2rem;
            }
            &:last-of-type {
              & > dd {
                margin-bottom: 0;
              }
            }
            .txt-box {
              p {
                font-feature-settings: "palt";
                margin-bottom: 2rem;
              }
              dl {
                dt {
                  margin-bottom: 0.5rem;
                  img {
                    height: 7.3vw;
                  }
                }
                dt.case02 {
                  margin-bottom: 0;
                }
                margin-top: 2rem;
              }
            }
            p,
            dd {
              font-size: 3.3vw;
            }
            p {
              margin-bottom: 1.5rem;
            }
            .label {
              font-size: 2.6vw;
              line-height: 1.4;
              b {
                font-size: 2.93vw;
                margin-bottom: 0;
              }
            }
            .lead {
              margin-bottom: 2rem;
            }
          }
        }
      }
    }
  }
}
@media screen and (max-width: 379px) {
  .site_container.page {
    .page_content {
      .content_main {
        .rules {
          .timeline {
            .year-group {
              &:last-child::before {
                bottom: 59vw;
              }
            }
          }
        }
      }
    }
  }
}
