/**
 * メールマガジンのご案内（SP想定 750px）
 * FV〜特典: ec413-20260515/mv.png（一括 750×2732）
 */
/* ランディングで本文が #wrapper 上端に来る。余計な余白は付けない */
#mailmag-top {
  margin-top: 0;
  padding-top: 0;
}

.mailmag {
  --mailmag-brand: #a50519;
  --mailmag-brand-dark: #8a0414;
  --mailmag-cta: #a50519;
  --mailmag-acc: #a50519;
  --mailmag-text: #222;
  --mailmag-muted: #666;
  --mailmag-bg: #f8f6f2;
  /* mv.png 下端の白波に合わせ、スライス帯周りの地 */
  --mailmag-slice-paper: #ffffff;
  --mailmag-line: #ddd;
  --mailmag-tint: rgba(239, 199, 199, 0.2);
  /* カンプ: アコーディオン展開ブロック内（手順）の地 */
  --mailmag-acc-panel-bg: #fff1f1;
  color: var(--mailmag-text);
  background: var(--mailmag-bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mailmag__inner {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 20px 48px;
  box-sizing: border-box;
  background: var(--mailmag-bg);
}

.mailmag__slices {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  background: var(--mailmag-slice-paper);
  overflow: visible;
  min-height: 0;
  /* ツール上の CTA/画像が 700 までで隠れないよう必ず上書き */
  max-height: none;
}

/* 赤 CTA 上の透明タップ域。親: .mailmag__mv
 * Figma: タップ域 690×90（750 幅アートボード。画像実寸 750×2732 と比率一致）
 * 位置の微調整: .mailmag__mv の --mailmag-mv-cta-top-pct / --mailmag-mv-cta-left-pct（必要なら translate で数 px） */
.mailmag__figma-cta {
  position: absolute;
  z-index: 2;
  left: 4%;
  width: 92%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none !important;
  color: transparent;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
}

.mailmag__mv {
  position: relative;
  z-index: 1;
  max-width: 750px;
  margin: 0 auto;
  line-height: 0;
  background: #fff;
  /* 赤「メルマガ登録する」— 上下位置は Figma 座標に合わせて top を調整 */
  --mailmag-mv-cta-top-pct: 30.5%;
  --mailmag-mv-cta-left-pct: 4%;
  /* 幅: (690/750)×100% ＝ 同じく 92% */
  --mailmag-mv-cta-w-pct: 92%;
}

.mailmag__mv-img {
  display: block;
  width: 100% !important;
  max-width: 750px;
  height: auto !important;
  margin: 0 auto;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.mailmag__figma-cta--mv {
  top: var(--mailmag-mv-cta-top-pct);
  bottom: auto;
  left: var(--mailmag-mv-cta-left-pct);
  width: var(--mailmag-mv-cta-w-pct);
  /* Figma 高さ 90px ＝ mv 画像高さ(2732)に対する比率。画像が可変でも赤ボタン帯の高さが一定比で追従 */
  min-height: 0;
  height: calc(100% * 90 / 2732);
  max-height: none;
}

.mailmag__figma-cta--mv:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 6px;
}

#mailmag-register,
#anc_01 {
  scroll-margin-top: 1rem;
}

/* 登録ブロック以降 */
.mailmag__section {
  margin-top: 32px;
  padding-top: 4px;
}

/* mv 下〜登録 3 本の帯：赤丸範囲だけ #fff。外側 .mailmag__inner はクリーム */
.mailmag__register-surface {
  background: #fff;
  margin-left: -20px;
  margin-right: -20px;
  padding: 0 20px 28px;
  box-sizing: border-box;
}

/* mv 直下：上余白を詰める */
.mailmag__section--register {
  margin-top: 0;
  padding-top: 0;
}

.mailmag__section-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.12em;
  color: var(--mailmag-text);
}

/* ----- アコーディオン・枠 以降（既存） ----- */
.mailmag__acc-panel {
  display: none;
  padding: 41px 34px 10px;
  background: var(--mailmag-acc-panel-bg);
  box-sizing: border-box;
}

/* 展開エリア: li 自体は全幅。余白は手順文だけ。ボタン・図はカード幅内で margin:auto 中央 */
#mailmag-register .mailmag__acc-panel .mailmag__step {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0 0 29px 0;
}

#mailmag-register .mailmag__acc-panel .mailmag__step-body {
  text-align: left;
  text-wrap: pretty;
  margin: 0;
  /* 番号(40) + 隙間(12) — 上段 kicker+title ではなく、本文ブロック内だけ */
  padding: 0 15px 13px 52px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 26px;
  line-height: 1.75;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--mailmag-text);
}

.mailmag__step-body b {
  font-weight: 700;
}

.mailmag__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.mailmag__step {
  position: relative;
  margin-bottom: 20px;
  padding-left: 44px;
  min-height: 36px;
}

.mailmag__step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 3px;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  background: var(--mailmag-brand);
  border-radius: 50%;
}


.mailmag__figure-placeholder {
  margin: 12px 0;
  min-height: 120px;
  border-radius: 8px;
  background: #e8e8e8;
  border: 1px dashed #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--mailmag-muted);
  text-align: center;
  padding: 12px;
}

/* EC-413: acc_1/2/3 納品の手順用キャプチャ */
#mailmag-register .mailmag__acc-panel .mailmag__acc-capture {
  margin: 12px 0 0;
  line-height: 0;
  text-align: center;
  margin-bottom: 63px;
}

#mailmag-register .mailmag__acc-panel .mailmag__acc-capture--step2-confirm {
  /* 「変更を確定する」上の黄枠位置: ずれるときは bottom を調整 */
  --mailmag-acc-confirm-hilight-bottom: 2%;
  position: relative;
  display: block;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* app / member で下位置だけ変えたい例:
   #mailmag-register [data-mailmag-acc="app"]  .mailmag__acc-capture--step2-confirm { --mailmag-acc-confirm-hilight-bottom: 5%; }
   #mailmag-register [data-mailmag-acc="member"] .mailmag__acc-capture--step2-confirm { --mailmag-acc-confirm-hilight-bottom: 4%; } */
/* Figma Rectangle 1165: 378×95。キャプチャ(560)幅に追従 */
#mailmag-register .mailmag__acc-panel .mailmag__acc-capture-hilight--confirm {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: var(--mailmag-acc-confirm-hilight-bottom);
  width: calc(100% * 378 / 560);
  max-width: 378px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  object-fit: contain;
  display: block;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

/* カンプ: 手順用キャプチャ幅 560px（納品 PNG と同寸） */
#mailmag-register .mailmag__acc-panel .mailmag__acc-capture-img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-sizing: border-box;
}

/* カンプ: 登録導線の赤 CTA 横幅 600px（手順キャプチャ 560px よりやや広い帯） */
.mailmag__btn-primary {
  display: block;
  margin: 16px auto;
  max-width: 600px;
  width: 100%;
  padding: 16px 14px;
  /* ⑤ Figma: ボタン内テキスト 24px（公式アプリへ／マイページ／新規会員登録 など） */
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  color: #fff;
  text-decoration: none;
  background: var(--mailmag-brand);
  border-radius: 8px;
  box-sizing: border-box;
  margin-bottom: 36px;
}

/* カンプ: 文言はボタン幅いっぱいで中央、＞は右端（公式アプリ／マイページ／新規会員登録で共通） */
#mailmag-register .mailmag__btn-primary--chev {
  position: relative;
  display: block;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  padding: 20px 44px 20px 18px;
  margin-left: auto;
  margin-right: auto;
  text-decoration: none;
}

#mailmag-register .mailmag__btn-primary--chev .mailmag__btn-primary-label {
  display: block;
  width: 100%;
  text-align: center;
}

#mailmag-register .mailmag__btn-primary--chev .mailmag__btn-primary-chev {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-size: 1.1em;
  line-height: 1;
  font-weight: 700;
}

/* 手順の番号丸: 本文(21px) とのバランス */
#mailmag-register .mailmag__acc-panel .mailmag__step::before {
  width: 40px;
  height: 40px;
  line-height: 40px;
  font-size: 18px;
  font-weight: 700;
}

.mailmag__register-block {
  margin-top: 0;
  margin-bottom: 28px;
  text-align: center;
}

.mailmag__security {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  box-sizing: border-box;
}

/* 納品: Frame-1597880667-1.png。グレー枠は従来 HTML 版用のため、画像納品時は枠なし */
.mailmag__security--asset {
  /* ① Figma: 「登録無料」直上の余白を 30px 確保 */
  padding: 30px 0 4px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.mailmag__security-figure {
  /* 「詳しくはこちら」帯の上下: 例) bottom オフセットだけ変えたいとき --mailmag-security-link-bottom: 4px; */
  --mailmag-security-link-bottom: 25px;
  position: relative;
  max-width: 690px;
  margin: 0 auto;
  line-height: 0;
}

.mailmag__security-img {
  display: block;
  width: 100%;
  max-width: 690px;
  height: auto;
  margin: 0 auto;
}

/* 画像内「詳しくはこちら」: Figma タップ域 192×36（図 690×496 内。下揃え・左右中央。位置微調整は .mailmag__security-figure の --mailmag-security-link-bottom */
.mailmag__security-cta {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: var(--mailmag-security-link-bottom, 0);
  width: calc(100% * 192 / 690);
  height: calc(100% * 36 / 496);
  transform: translateX(-50%);
  box-sizing: border-box;
  text-decoration: none !important;
  color: transparent;
  background: rgba(0, 0, 0, 0) !important;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
  touch-action: manipulation;
}

.mailmag__security-cta:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
  color: transparent;
}

#mailmag-register .mailmag__register-block + .mailmag__acc {
  margin-top: 20px;
}

#mailmag-register .mailmag__acc + .mailmag__acc {
  margin-top: 12px;
}

/* 枠: 見出し＋（展開）パネル＋下段バー を1つの赤枠で囲む */
.mailmag__acc-card,
.mailmag__acc-shell {
  box-sizing: border-box;
}

.mailmag__acc-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin: 0;
  border: 2px solid var(--mailmag-brand);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.mailmag__acc-head,
.mailmag__acc-foot {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  /* foot は下段シェブロン用: inherit だと全サイトの button 色(白)を継承して消えるため別指定 */
  color: inherit;
  background: #fff;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

/* 閉(OFF): 赤帯＋白＾ */
#mailmag-register .mailmag__acc-shell:not(.is-open) .mailmag__acc-foot {
  color: #fff;
  background: var(--mailmag-acc);
}

.mailmag__acc-head {
  display: block;
  flex: 0 0 auto;
}

/* 展開時: 淡ピンク本文の直下に下バー（カンプ通り 薄グレー1px）。閉時は上段白と下段赤の間に線を出さない */
.mailmag__acc-foot {
  border-top: 0;
  background: #fff;
  flex: 0 0 auto;
}

/* 開(ON): 白帯＋赤＾（上は淡ピンクとの区切り線） */
.mailmag__acc-shell.is-open .mailmag__acc-foot {
  color: var(--mailmag-brand);
  background: #fff;
  border-top: 1px solid var(--mailmag-line);
}

#mailmag-register .mailmag__acc-shell.is-open .mailmag__acc-bar {
  color: var(--mailmag-brand);
  background: #fff;
}

#mailmag-register .mailmag__acc-shell.is-open .mailmag__acc-bar .mailmag__acc-arrow,
#mailmag-register .mailmag__acc-shell.is-open .mailmag__acc-bar .mailmag__acc-arrow path {
  color: var(--mailmag-brand);
  fill: var(--mailmag-brand);
}

.mailmag__acc-head:focus-visible,
.mailmag__acc-foot:focus-visible {
  outline: 2px solid var(--mailmag-brand);
  outline-offset: -2px;
  z-index: 1;
  position: relative;
}

/* 本文列の始まりを3行同じXに固定。flexだと中身幅で揺れるので grid 化 */
.mailmag__acc-main {
  display: grid;
  /* ④ アイコン列拡大に合わせて列幅を調整 */
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
  padding: 22px 18px 22px 37px;
  background: #fff;
  box-sizing: border-box;
}

/* アイコンの実寸が違っても、列幅内で中央に置く */
.mailmag__acc-icon {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  min-width: 0;
}

.mailmag__acc-ico {
  display: block;
  /* ④ Figma: アイコンをやや大きく（会員・未登録も同様） */
  width: 72px;
  height: 72px;
  object-fit: contain;
  object-position: center center;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* 納品 lets-icons：列いっぱい（= 上段と同じ左基準） */
.mailmag__acc-ico--app {
  width: 96px;
  height: 96px;
}

.mailmag__acc-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  text-align: left;
}

/* 3 本目：キッカーなしで「大見出し＋注釈」— 行間をカンプ寄りに */
.mailmag__acc-copy--guest {
  gap: 6px;
}

.mailmag__acc-kicker {
  /* ② Figma: 「カンタン！…」を 22px（公式アプリ／会員で同位置） */
  font-size: 22px;
  font-weight: normal;
  line-height: 1.45;
  color: var(--mailmag-brand);
  letter-spacing: 0.03em;
}

.mailmag__acc-title {
  display: block;
  /* ③ Figma: メイン見出し（例: 公式アプリ／すでに会員の方／未登録）を 28px */
  font-size: 26px;
  font-weight: bold;
  line-height: 1.3;
  color: var(--mailmag-text);
  letter-spacing: 0.04em;
}

/* 1行目（公式アプリ）: キッカー字間のみ微調整 */
#mailmag-register [data-mailmag-acc="app"] .mailmag__acc-kicker {
  line-height: 1.4;
  letter-spacing: 0.02em;
}

#mailmag-register [data-mailmag-acc="app"] .mailmag__acc-title {
  line-height: 1.25;
}

.mailmag__acc-footnote {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  font-weight: normal;
  /* 大見出し（太字・大）との差はサイズで付け、色は本文と同系で可読性優先 */
  color: var(--mailmag-text);
  margin: 0;
  letter-spacing: 0.02em;
}

#mailmag-register .mailmag__acc-footnote {
  font-size: 14px;
  line-height: 1.6;
}

/* ⑥ Figma: 「オンラインショップ未登録の方」を 28px（ゲスト見出しを明示） */
#mailmag-register [data-mailmag-acc="guest"] .mailmag__acc-title {
  font-size: 28px;
  line-height: 1.3;
}

/* ⑦ Figma: 「※メルマガ会員登録にはオンライン会員登録が必要です。」を 20px */
#mailmag-register [data-mailmag-acc="guest"] .mailmag__acc-footnote {
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* ⑧ タップが下層に取られないよう CTA を前面に（SP でリンク不発の抑止） */
#mailmag-register [data-mailmag-acc="guest"] a.mailmag__btn-primary {
  position: relative;
  z-index: 1;
}

.mailmag__acc-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  /* mailmag 未スコープ時の既定; #mailmag-register では OFF/ON で上書き */
  color: var(--mailmag-brand);
  background: #fff;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease;
}

#mailmag-register .mailmag__acc-shell:not(.is-open) .mailmag__acc-bar {
  color: #fff;
  background: var(--mailmag-acc);
}

#mailmag-register .mailmag__acc-shell:not(.is-open) .mailmag__acc-bar .mailmag__acc-arrow,
#mailmag-register .mailmag__acc-shell:not(.is-open) .mailmag__acc-bar .mailmag__acc-arrow path {
  color: #fff;
  fill: #fff;
  transition: transform 0.2s ease, fill 0.2s ease, color 0.2s ease;
}

/* mailmag 外で使う場合向け */
.mailmag__acc-bar .mailmag__acc-arrow {
  display: block;
  margin-top: 1px;
  transition: transform 0.2s ease, fill 0.2s ease, color 0.2s ease;
}

/* 下段の開閉: 展開時（矢印上向き）＝ カンプ ON */
.mailmag__acc-shell.is-open .mailmag__acc-bar .mailmag__acc-arrow {
  transform: rotate(180deg);
}

@media screen and (max-width: 767px) {
  .pc_only {
    display: none !important;
  }
}

@media (min-width: 751px) {
  .mailmag__acc-main {
    /* ④ PC でもアイコン列を SP 拡大に追従 */
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .mailmag__acc-ico {
    width: 76px;
    height: 76px;
  }

  .mailmag__acc-ico--app {
    width: auto;
    height: 96px;
  }

  .sp_only {
    display: none !important;
  }  
}
