/* 念のため：背景スライダーが残ってたら消す */
.pg-top__message--bg { display: none !important; }

/* 署名ブロックは右寄せ */
.pg-top__message--name{
  margin-left: auto;      /* 右に寄せる */
  text-align: right;
}

/* 画像も同じ右端に寄せて、署名の上に置く */
.pg-top__message--portrait{
  width: min(500px, 38vw);
  aspect-ratio: 3 / 4;     /* 写真に合わせて調整（縦なら3/4、横なら4/3） */
  margin-left: auto;       /* 右寄せ */
  margin-bottom: 48px;     /* 名前との間 */
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.9);
}

/* 画像表示 */
.pg-top__message--portrait img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 767px){
  .pg-top__message--bg{
    display: none !important;
  }
}

@media (max-width: 767px){

  /* 1) 背景スライダー（marquee）系：タグ/属性違いもまとめて殺す */
  .pg-top__message--bg,
  .pg-top__message .splide,
  .pg-top__message [data-type="marquee"],
  .pg-top__message [data-type="marquee"] *{
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* 2) それでも残る空白の主因になりがちな “セクションの余白/最低高” を潰す */
  .pg-top__message{
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* 3) inner側の “space-between” や高さ確保を潰す */
  .pg-top__message--inner{
    min-height: 0 !important;
    height: auto !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
}
/* CEO message: 旧スライダー用の余白を殺す（SP） */
@media (max-width: 767px) {
  .pg-top__message {
    padding-top: 0 !important;
  }

  .pg-top__message--inner {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* =========================
     追加②：本文（2018年〜）の上だけ余白を作る
     ========================= */
  .pg-top__message .pg-top__message--content {
    margin-top: 36px !important; /* ← ここが調整ポイント */
  }
}

@media (max-width: 767px) {
  .pg-top__message--portrait {
    width: 72% !important;     /* ← まずはこれ */
    max-width: 280px;          /* ← デカくなりすぎ防止 */
    margin: 0 0 16px auto !important; /* ← 右寄せ */
  }

  .pg-top__message--portrait img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 767px) {
  .pg-top__message--name--text {
    margin-bottom: 24px !important; /* ← お好みで 16〜32 */
  }
}

/* CEO portrait：画像が下まで埋まらず白帯が出るのを防ぐ */
.pg-top__message--portrait{
  overflow: hidden;
  background: transparent; /* もし親が白なら見えなくする */
}

.pg-top__message--portrait img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
