/* =========================================================
   説明ページ（/mailletter/）専用
   このページは front-page.css も読み込むため、
   .container / .section / .section-title / .button 系はそちらを使う
   ========================================================= */
.mailletter-page {
  background: var(--ml-pearl, #faf7f2);
}

/* 見出し・本文の日本語改行制御 */
.mailletter-page h1,
.mailletter-page h2,
.mailletter-page h3,
.mailletter-page p,
.mailletter-page li,
.mailletter-page dd {
  word-break: keep-all;
  word-break: auto-phrase;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.ml-nowrap {
  white-space: nowrap;
}

/* --- ページ冒頭（メインビジュアル） ---
   メールレターフォームのビジュアルと同じ写真（people-beach-meditation.webp）を
   フルブリードの背景に敷き、/retreat/ の .retreat-hero と同じ「写真背景＋
   ネイビーのグラデーションオーバーレイ＋白文字」の手法を踏襲する。

   オーバーレイの不透明度は 0.68〜0.78 に固定している。白系の背景（雲・波の照り返し等）
   の最悪条件でも、白文字に対し WCAG AA の 4.5:1 を確保できる値として計算した
   （navy #14304c を白地に重ねた場合、不透明度0.70で約5.26:1）。
   写真の質感を残しつつ安全側に倒すため、テキストの重なる範囲は0.68を下回らせない。 */
.ml-page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  padding: clamp(96px, 13vw, 168px) 0 clamp(72px, 9vw, 108px);
}

.ml-page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ml-page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

.ml-page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(20, 48, 76, 0.74) 0%,
    rgba(20, 48, 76, 0.68) 45%,
    rgba(20, 48, 76, 0.78) 100%
  );
}

.ml-page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 840px;
  text-align: center;
}

.ml-page-eyebrow {
  margin: 0 0 18px;
  color: #ffffff;
  font-family: "Cormorant Garamond", "Inter", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(20, 48, 76, 0.55);
}

.ml-page-hero h1 {
  margin: 0 0 26px;
  color: #ffffff;
  font-family: "Shippori Mincho B1", "Noto Serif JP", serif;
  font-size: clamp(28px, 4.6vw, 46px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 16px rgba(20, 48, 76, 0.55);
}

.ml-page-hero-lead {
  margin: 0 auto 20px;
  max-width: 680px;
  color: #ffffff;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 2.05;
  text-shadow: 0 1px 12px rgba(20, 48, 76, 0.5);
}

.ml-page-hero-meta {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(20, 48, 76, 0.5);
}

.ml-page-hero-actions {
  display: flex;
  justify-content: center;
}

/* 写真背景の上でも視認できるよう、主CTAは白ピルにする（/retreat/ の
   .retreat-hero-cta .button-primary と同じ考え方） */
.ml-page-hero-actions .button-primary {
  background: rgba(255, 255, 255, 0.96);
  color: #1b3a5c;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.ml-page-hero-actions .button-primary:hover {
  background: #ffffff;
  color: #14304c;
}

/* --- こんな方へ ---
   イメージ画像（対話ワークの様子）を添えて、テキスト+写真の2カラムにする。
   写真は装飾なので、レイアウトはシンプルな角丸カード1枚に留める
   （/retreat/ の layered visual のような複雑な重なりは不要）。 */
.ml-target-section {
  background: #ffffff;
}

.ml-target-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.ml-target-copy {
  min-width: 0;
}

/* 2カラム時は中央寄せをやめて左寄せにする（写真と並ぶため） */
.ml-target-title.section-title {
  margin: 0 0 28px;
  text-align: left;
}

.ml-target-photo {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(27, 58, 92, 0.14);
}

.ml-target-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ml-target-list {
  max-width: 760px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.ml-target-list li {
  position: relative;
  padding: 18px 22px 18px 56px;
  background: #faf7f2;
  border: 1px solid #ece4d7;
  border-radius: 12px;
  font-size: 15.5px;
  line-height: 1.85;
}

.ml-target-list li::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 26px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #247a94;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 4.6 4 7.6 10 1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* --- お届けする内容 --- */
.ml-content-section {
  background: linear-gradient(180deg, #faf7f2 0%, #f3ede3 100%);
}

.ml-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.ml-content-card {
  padding: 34px 28px;
  background: #ffffff;
  border: 1px solid #ece4d7;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(27, 58, 92, 0.06);
}

.ml-content-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(63, 182, 217, 0.11);
  color: #247a94;
}

.ml-content-icon svg {
  width: 26px;
  height: 26px;
}

.ml-content-card h3 {
  margin: 0 0 14px;
  color: #1b3a5c;
  font-family: "Shippori Mincho B1", "Noto Serif JP", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.ml-content-card p {
  margin: 0;
  color: #2b2722;
  font-size: 14.5px;
  line-height: 1.95;
}

/* --- 登録特典 --- */
.ml-gift-section {
  background: #ffffff;
}

.ml-gift-lead {
  max-width: 760px;
  margin: -20px auto 44px;
  color: #2b2722;
  font-size: 15.5px;
  line-height: 2;
  text-align: center;
}

.ml-gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.ml-gift-card {
  position: relative;
  padding: 36px 30px 30px;
  background: #faf7f2;
  border: 1px solid #e0d8c8;
  border-radius: 16px;
}

.ml-gift-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #1b3a5c;
  color: #ffffff;
}

.ml-gift-icon svg {
  width: 24px;
  height: 24px;
}

.ml-gift-label {
  margin: 0 0 8px;
  color: #247a94;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.ml-gift-card h3 {
  margin: 0 0 14px;
  color: #1b3a5c;
  font-family: "Shippori Mincho B1", "Noto Serif JP", serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
}

.ml-gift-card p {
  margin: 0;
  color: #2b2722;
  font-size: 14.5px;
  line-height: 1.95;
}

.ml-gift-for {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid #e0d8c8;
  color: #6f675e !important;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* --- 配信について --- */
.ml-terms-section {
  background: linear-gradient(180deg, #faf7f2 0%, #f3ede3 100%);
}

.ml-terms-list {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 36px) clamp(22px, 4vw, 40px);
  background: #ffffff;
  border: 1px solid #ece4d7;
  border-radius: 16px;
}

.ml-terms-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #ece4d7;
}

.ml-terms-row:first-child {
  padding-top: 0;
}

.ml-terms-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ml-terms-row dt {
  margin: 0;
  color: #1b3a5c;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.85;
}

.ml-terms-row dd {
  margin: 0;
  color: #2b2722;
  font-size: 14.5px;
  line-height: 1.9;
}

.ml-terms-row dd a {
  color: #1b3a5c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- 関連ページ --- */
.ml-related-section {
  background: #ffffff;
}

.ml-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.ml-related-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #faf7f2;
  border: 1px solid #ece4d7;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ml-related-card:hover {
  transform: translateY(-2px);
  border-color: #c9bba3;
  box-shadow: 0 14px 32px rgba(27, 58, 92, 0.08);
}

/* サムネイル。角丸はカード本体（overflow:hidden）に任せるのでここでは付けない */
.ml-related-thumb {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ece4d7;
}

.ml-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ml-related-card:hover .ml-related-thumb img {
  transform: scale(1.05);
}

.ml-related-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
}

.ml-related-card strong {
  color: #1b3a5c;
  font-family: "Shippori Mincho B1", "Noto Serif JP", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

.ml-related-card small {
  color: #2b2722;
  font-size: 13.5px;
  line-height: 1.85;
  word-break: keep-all;
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

.ml-related-card em {
  margin-top: auto;
  padding-top: 6px;
  color: #247a94;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ml-related-card em::after {
  content: " ›";
}

/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 1060px) {
  .ml-content-grid,
  .ml-related-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .ml-gift-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  /* 「こんな方へ」は1カラムに戻し、写真をリストの上に配置する。
     写真が先だと「これは私のことだ」と気づく前に読者像を示せる */
  .ml-target-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }

  .ml-target-photo {
    order: -1;
    max-width: 420px;
    margin: 0 auto;
  }

  .ml-target-title.section-title {
    text-align: center;
  }
}

@media (max-width: 700px) {
  .ml-terms-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* PCでのみ意図した改行。狭い画面では自然な折り返しに任せる */
  .ml-br-pc {
    display: none;
  }
}

/* 320〜360px幅や高倍率ズームでは、見出しの nowrap 指定が横あふれを起こす。
   その幅では通常の折り返しに戻す（意味の切れ目は <br> が担っているため崩れない） */
@media (max-width: 380px) {
  .ml-nowrap {
    white-space: normal;
  }
}
