/** Shopify CDN: Minification failed

Line 137:5 Cannot use type selector "__inner" directly after nesting selector "&"
Line 162:5 Cannot use type selector "__sub" directly after nesting selector "&"
Line 175:5 Cannot use type selector "__line" directly after nesting selector "&"
Line 183:5 Cannot use type selector "__lead" directly after nesting selector "&"
Line 202:5 Cannot use type selector "__period" directly after nesting selector "&"

**/
/* ============================================
  Replace template 専用スタイル
  参考: ポータブル電源 買い替えキャンペーン (Tailwind 版)
  他ページに影響しないよう .template-replace-template でスコープ
   ============================================ */

/* アンカーリンクのスムーススクロール */
html {
  scroll-behavior: smooth;
}

.template-replace-template {
  --replace-brand: #00a9e0;
  --replace-brand-hover: #008cb8;
  --replace-brand-light: #effbff;
  --replace-danger: #cd3752;
  --replace-content-max: 900px;
  --replace-content-narrow: 900px;
  --replace-font-sans: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  /* 注釈・補足文の文字サイズ（ページ全体で統一。h6・KV注釈・notes1・特典内容注釈・coupon補足等はすべて var(--replace-note-font-size) を使用） */
  --replace-note-font-size: 12px;
  /* SP時の左右余白（ページ全体で統一） */
  --replace-sp-padding: 20px;
  
  @media screen and (min-width: 768px) {
    --replace-note-font-size: 13px;
  }
  
  /* ベーステキストサイズ: SP 14px / PC 16px */
  font-size: 14px;
  
  @media screen and (min-width: 768px) {
    font-size: 16px;
  }
  
  .main-content {
    background-color: #fff;
    color: #1f2937;
    font-family: var(--replace-font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.625;
  }
  
  /* テンプレート内の全要素に box-sizing: border-box を適用
  → max-width: 900px を指定した要素は padding を含めて900px幅になる */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  /* テキストリンクのfont-sizeを親要素に合わせる（テンプレート全体）
     section-rich-text の inline <style> が .section-{id} a { font-size: 14px } (0,1,1) を後勝ちで上書きするため、
     .rich-text a で詳細度を (0,2,1) に上げて確実に継承させる */
  a,
  .rich-text a {
    font-size: inherit;
  }
  
  /* ----- 共通コンテナ ----- */
  .page-width {
    max-width: var(--replace-content-max);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;

    @media screen and (min-width: 768px) {
      padding-left: 24px;
      padding-right: 24px;
    }

    @media screen and (min-width: 1080px) {
      padding-left: 0;
      padding-right: 0;
    }
  }
  
  /* ----- メインバナー（KV）エリア ----- */
  .replace-kv-section {
    width: 100%;
    position: relative;
    overflow: hidden;

    /* replace-kv-section__bg / __gradient / __fade は擬似要素に統合済み */
    .wide-banner picture,
    .wide-banner img {
      width: 100%;
      height: auto;
      max-width: 900px;
      margin-left: auto;
      margin-right: auto;
      display: block;
      object-fit: contain;
      filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
    }
  }
  
  .replace-kv-note {
    font-size: var(--replace-note-font-size);
    color: #6b7280;
    margin-top: 8px;
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 8px;
    padding-right: 8px;
    opacity: 0.8;

    @media screen and (min-width: 768px) {
      text-align: center;
    }
  }
  
  /* ----- タイトル＆リード（カード風） ----- */
  .replace-title-card {
    max-width: var(--replace-content-narrow);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
    padding: 0 20px;
    position: relative;
    z-index: 20;

    &__inner {
      background: #fff;
      border-radius: 1rem;
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      padding: 1.5rem;
      text-align: center;
      border: 1px solid #f3f4f6;

      @media screen and (min-width: 768px) {
        padding: 2.5rem;
      }
    }

    h2 {
      font-size: 1.5rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      margin-bottom: 1rem;
      line-height: 1.25;

      @media screen and (min-width: 768px) {
        font-size: 1.875rem;
      }
    }

    &__sub {
      font-size: 0.875rem;
      font-weight: 400;
      display: block;
      margin-bottom: 0.5rem;
      color: #6b7280;
      letter-spacing: normal;

      @media screen and (min-width: 768px) {
        font-size: 1rem;
      }
    }

    &__line {
      height: 4px;
      width: 4rem;
      background: var(--replace-brand);
      margin: 0 auto 1.5rem;
      border-radius: 9999px;
    }

    &__lead {
      font-size: 1rem;
      line-height: 1.625;
      margin-bottom: 1.5rem;
      font-weight: 500;
      color: #374151;

      @media screen and (min-width: 768px) {
        font-size: 1.125rem;
      }

      strong {
        color: var(--replace-brand);
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0 4px;
      }
    }

    &__period {
      background: #f9fafb;
      border-radius: 0.75rem;
      padding: 1.25rem;
      margin-bottom: 2rem;
      display: inline-block;
      text-align: left;
      font-size: 0.875rem;
      border: 1px solid #f3f4f6;
      width: 100%;

      @media screen and (min-width: 768px) {
        font-size: 1rem;
        width: auto;
      }

      strong {
        color: var(--replace-brand);
      }

      p:last-child {
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 0;
      }
    }
  }
  
  /* ----- CTAボタン（注意事項へ） ----- */
  .replace-cta-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--replace-brand);
    color: #fff;
    border-radius: 9999px;
    padding: 0.75rem 2rem;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.025em;

    &:hover {
      background: var(--replace-brand-hover);
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

      .arrow-down {
        transform: rotate(45deg) translate(3px, 3px);
      }
    }

    small {
      font-size: 10px;
      opacity: 0.9;
      margin-top: 2px;

      @media screen and (min-width: 768px) {
        font-size: 12px;
      }
    }

    .arrow-down {
      display: block;
      width: 1rem;
      height: 1rem;
      margin: 6px auto 0;
      border-right: 2px solid #fff;
      border-bottom: 2px solid #fff;
      transform: rotate(45deg);
      transition: transform 0.2s ease;
    }
  }
  
  /* section-title 内の CTA を同じ見た目に（既存セクション利用時） */
  .section-title p a[href^="#"] {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    padding: 15px 60px;
    background: var(--replace-brand);
    color: #fff;
    border-radius: 60px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: background-color 0.2s ease, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .section-title p a[href^="#"]:hover {
    background: var(--replace-brand-hover);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }
  
  .section-title .arrow-down {
    display: block;
    width: 12px;
    height: 12px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(45deg);
    margin: 8px auto 0;
    transition: transform 0.2s ease;
  }
  
  .section-title p:hover .arrow-down {
    transform: rotate(45deg) translate(3px, 3px);
  }
  
  /* ----- セクション見出し（共通） ----- */
  .replace-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: #111827;

    @media screen and (min-width: 768px) {
      font-size: 1.875rem;
    }
  }

  /* ----- 下取り対象・白カード ----- */
  .replace-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;

    @media screen and (min-width: 768px) {
      padding: 2rem;
    }

    & p {
      font-size: 1rem;
      color: #1f2937;
      margin-bottom: 1rem;

      @media screen and (min-width: 768px) {
        font-size: 1.125rem;
      }
    }
  }

  .replace-notice-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1.5rem;

    @media screen and (min-width: 768px) {
      padding: 1.5rem;
    }

    & h3 {
      color: var(--replace-danger);
      font-weight: 700;
      font-size: 1.125rem;
      margin-bottom: 0.75rem;
      display: flex;
      align-items: center;
    }

    & p {
      font-size: 0.875rem;
      color: #991b1b;
      line-height: 1.625;
      margin-bottom: 0;

      @media screen and (min-width: 768px) {
        font-size: 1rem;
      }
    }
  }
  
  /* ----- クーポン対象エリア（brand-light 背景） ----- */
  .replace-brand-light-section {
    background: var(--replace-brand-light);
    padding-top: 4rem;
    padding-bottom: 4rem;
    margin-bottom: 3rem;
  }
  
  .replace-brand-light-section .section-topics {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .replace-brand-light-section .topic-item__image {
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  /* リッチテキスト内リンク ----- */
  .rich-text a,
  .section-rich-text a {
    color: var(--replace-brand);
    text-decoration: underline;
  }
  
  .rich-text a:hover,
  .section-rich-text a:hover {
    color: var(--replace-brand-hover);
  }
  
  /* ----- 注意書きグレー枠 ----- */
  .replace-notes-box {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
    border: 1px solid #e5e7eb;
  }
  
  .replace-notes-box p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
  }
  
  .replace-notes-box p:last-child {
    margin-bottom: 0;
  }
  
  .replace-notes-box .replace-note-danger {
    color: var(--replace-danger);
    font-weight: 500;
  }
  
  /* ----- フォーム枠（上部アクセント線） ----- */
  .replace-form-wrapper {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;

    @media screen and (min-width: 768px) {
      padding: 2.5rem;
    }

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 8px;
      background: linear-gradient(to right, var(--replace-brand), #93c5fd);
    }
  }

  /* ----- 特典・注意・Q&A・規約セクション ----- */
  .replace-content-section {
    & h3 {
      font-size: 1.25rem;
      font-weight: 700;
      border-left: 4px solid var(--replace-brand);
      padding-left: 1rem;
      margin-bottom: 1.5rem;
      color: #111827;

      @media screen and (min-width: 768px) {
        font-size: 1.5rem;
      }
    }
  
    & h4 {
      font-weight: 700;
      color: #111827;
      margin-bottom: 0.5rem;
    }

    & .replace-qa-item {
      background: #f9fafb;
      border-radius: 0.75rem;
      padding: 1.5rem;
      border: 1px solid #f3f4f6;
      margin-bottom: 2rem;

      & h4 {
        display: flex;
        align-items: flex-start;
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
      }
    }

    & .replace-qa-a {
      color: #9ca3af;
      font-size: 1.5rem;
      font-weight: 800;
      margin-right: 0.75rem;
      flex-shrink: 0;
    }

    & #trade-in-term {
      background: #f9fafb;
      padding: 1.5rem;
      border-radius: 1rem;
      border: 1px solid #e5e7eb;

      @media screen and (min-width: 768px) {
        padding: 2.5rem;
      }

      & h3 {
        text-align: center;
        font-size: 1.125rem;
        border-left: none;
        padding-left: 0;

        @media screen and (min-width: 768px) {
          font-size: 1.25rem;
        }
      }
    }

    /* リスト ----- */
    & ul {
      list-style: disc;
      margin-left: 1.25rem;
      margin-bottom: 1rem;

      & li {
        margin-bottom: 0.75rem;
      }
    }

    & ol {
      list-style: decimal;
      list-style-position: inside;
      margin-left: 0.5rem;
      margin-bottom: 1rem;

      & li {
        margin-bottom: 0.25rem;
      }
    }
  }

  .replace-qa-q {
    color: var(--replace-brand);
    font-size: 1.5rem;
    font-weight: 800;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }
  
  /* リッチテキスト h2 中央 ----- */
  .section-rich-text h2,
  .rich-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: #111827;
    margin-bottom: 1rem;

    @media screen and (min-width: 768px) {
      font-size: 1.75rem;
      margin-bottom: 1.5rem;
    }
  }

  .section-rich-text h3,
  .rich-text h3 {
    color: var(--replace-danger);
    margin-bottom: 0.5rem;
  }

  .section-rich-text p,
  .rich-text p {
    font-size: 1rem;
    color: #374151;

    @media screen and (min-width: 768px) {
      font-size: 1.125rem;
    }
  }
  
  /* ----- バナー画像 ----- */
  .wide-banner picture,
  .wide-banner img {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .wide-banner a {
    display: block;
  }
  
  /* ========== 参照HTML（Tailwind）に合わせた整え ========== */
  
  /* 1. メインバナー（KV）: nth-child(2) = テンプレート1本目 */
  #MainContent > .shopify-section:nth-child(2):has(.wide-banner) {
    position: relative;
    overflow: hidden;
    background-color: #ebf8fd;

    /* グラデーション（opacity 0.8） */
    &::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      opacity: 0.8;
      background-image:
      radial-gradient(28.13% 74.38% at 0% 0%, rgba(0, 169, 224, 0.60) 5%, rgba(0, 224, 220, 0.00) 76.37%),
      radial-gradient(56.73% 131.17% at 100% 112.89%, rgba(0, 169, 224, 0.80) 0%, rgba(0, 224, 220, 0.00) 60%, rgba(0, 224, 220, 0.00) 99.58%);
    }

    /* 下端フェード（下のセクションと馴染む） */
    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 8rem;
      z-index: 2;
      pointer-events: none;
      background: linear-gradient(to bottom, transparent, #fff);
    }

    & .wide-banner {
      position: relative;
      z-index: 3;

      & img {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        display: block;
        object-fit: contain;
        border-radius: 0;
        box-shadow: none;
      }
    }
  }
  
  /* KVが空のとき: 1つ目のタイトルブロックに薄い青のヒーロー風背景 */
  #MainContent > .shopify-section:nth-child(2):not(:has(.wide-banner)) + .shopify-section .section-title {
    background: linear-gradient(180deg, #ebf8fd 0%, #fff 100%);
  }
  
  /* 2. section-title: 共通レイアウト */
  .section-title {
    max-width: var(--replace-content-narrow);
    margin-left: auto;
    margin-right: auto;
  }
  
  .section-title .h2 {
    font-size: 1.43rem; /* SP: 20px */
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.3;
    color: #111827;

    @media screen and (min-width: 768px) {
      font-size: 1.5rem; /* PC: 24px */
    }
  }
  
  /* メインタイトル下の青い線（section_id ベースで管理） */
  /* ※ #replace-title-main .h2::after でも同じスタイルを適用済み */
  #MainContent > .shopify-section:nth-child(4) .section-title .h2::after {
    content: "";
    display: block;
    height: 4px;
    width: 4rem;
    background: var(--replace-brand);
    margin: 1rem auto 1.5rem;
    border-radius: 9999px;
  }
  
  .section-title .h2 span {
    font-weight: 400;
    color: #6b7280;
    letter-spacing: normal;
  }
  
  /* 3. リッチテキスト: 共通（カードスタイルはIDベースで個別に付与） */

  .section-rich-text h3,
  .rich-text h3 {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--replace-danger);
    font-weight: 700;
    font-size: 1rem; /* SP: 14px / PC: 16px */

    @media screen and (min-width: 768px) {
      padding: 1rem 1.25rem;
    }
  }

  .section-rich-text h3 + p,
  .rich-text h3 + p {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    border-top: none;
    margin-top: -0.75rem;
    padding: 0 1rem 0.75rem;
    color: #991b1b;
    font-size: 1rem; /* ベースに合わせる */

    @media screen and (min-width: 768px) {
      padding: 0 1.25rem 1rem;
    }
  }

  .section-rich-text p,
  .rich-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #374151;
    font-size: 1rem; /* ベース: SP 14px / PC 16px */

    &:last-child {
      margin-bottom: 0;
    }
  }

  .section-rich-text ul,
  .rich-text ul {
    list-style: disc;
    margin-left: 1.25rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #374151;

    & li {
      margin-bottom: 0.25rem;
    }
  }

  .section-rich-text h6,
  .rich-text h6 {
    font-size: var(--replace-note-font-size);
    font-weight: normal;
    color: #6b7280;
    line-height: 2;
    margin-bottom: 0;
  }
  
  /* 4. クーポン対象エリア（section-topics）: brand-light 背景・2カラム・白カード風 */
  .shopify-section {
    &:has(.section-topics) {
      background: var(--replace-brand-light) !important;
      padding: 4rem 20px;
      margin-bottom: 3rem;

      & > div {
        background: transparent !important;
      }
    }
  }
  
  .section-topics {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;

    @media screen and (min-width: 768px) {
      grid-template-columns: 1fr 1fr;
      align-items: center;
      gap: 2.5rem;
    }

    & .topic-item {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;

      @media screen and (min-width: 768px) {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
      }
    }

    & .topic-item__title {
      font-size: 1rem;
      font-weight: 700;
      color: #111827;
      margin-bottom: 0.5rem;

      @media screen and (min-width: 768px) {
        grid-column: 1;
        grid-row: 1;
      }

      & h2 {
        font-size: 1.43rem; /* SP: 20px / PC: 24px */
        font-weight: 700;
        color: #111827;
        text-align: left;
        margin-bottom: 0.5rem;

        @media screen and (min-width: 768px) {
          font-size: 1.5rem;
        }
      }

      & h3 {
        font-size: 1rem;
        font-weight: 700;
        color: #111827;
        background: none;
        border: none;
        border-bottom: 2px solid var(--replace-brand);
        padding: 0 0 0.5rem;
        margin-top: 0;
        margin-bottom: 1rem;
        display: inline-block;
      }

      & ul {
        list-style: none;
        margin-left: 0;
        margin-top: 0.75rem;
        font-size: 1rem;
        color: inherit;
      }

      /* リストアイテム内のaタグ（ボックス型リンク） */
      & li {
        margin-bottom: 0.5rem;
        padding: 0;
        position: static;

        &::before {
          display: none;
        }

        & a {
          display: flex;
          align-items: center;
          font-weight: 500;
          font-size: 1rem;
          color: #374151;
          background: #fff;
          border: 1px solid #e5e7eb;
          border-radius: 0.5rem;
          padding: 0.875rem 1rem;
          text-decoration: none;
          transition: background-color 0.2s, border-color 0.2s;

          &::before {
            display: none;
          }

          &::after {
            content: "›";
            margin-left: auto;
            color: #9ca3af;
            font-size: 1.25rem;
            line-height: 1;
          }

          &:hover {
            background: #f0faff;
            border-color: var(--replace-brand);
            color: #374151;
            text-decoration: none;
          }
        }
      }
    }

    & .topic-item__description {
      @media screen and (min-width: 768px) {
        grid-column: 1;
        grid-row: 2;
      }
    }

    & .topic-item__image {
      border-radius: 0.75rem;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      width: 100%;
      height: auto;

      @media screen and (min-width: 768px) {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: start;
      }
    }
  }
  
  /* 5. フォームを含むセクション: 上部に青グラデ線・白枠 */
  .shopify-section {
    &:has([data-form-root]) {
      position: relative;
      overflow: hidden;
      background: #fff;
      border-radius: 1rem;
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
      border: 1px solid #e5e7eb;
      padding: 2.5rem 20px;
      margin-top: 2rem;

      @media screen and (min-width: 768px) {
        padding: 2.5rem 40px;
      }

      &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 8px;
        background: linear-gradient(to right, var(--replace-brand), #93c5fd);
      }

      & > * {
        position: relative;
        z-index: 1;
      }
    }
  }

  /* 5b. howtoエリア内フォーム: brand-light色のbox風（白枠・影・グラデをリセットして上書き） */
  .shopify-section:has(#replace-flow) + .shopify-section:has([data-form-root]) {
    position: static !important;
    overflow: visible !important;
    background: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 1.5rem var(--replace-sp-padding) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    &::before {
      display: none !important;
    }

    & > * {
      position: static !important;
      z-index: auto !important;
    }

    /* フォーム本体をbrand-light boxで囲む */
    [data-form-root] {
      background: var(--replace-brand-light) !important;
      border-radius: 0.75rem !important;
      padding: 0.75rem var(--replace-sp-padding) !important;
      max-width: var(--replace-content-narrow);
      margin: 0 auto;

      @media screen and (min-width: 768px) {
        padding: 1rem 2rem !important;
      }
    }
  }
  
  /* 6. 連続するタイトルブロック間のスペーシング（区切り線なし） */
  #MainContent .shopify-section:has(.section-title) + .shopify-section:has(.section-title) .section-title {
    padding-top: 0;
    margin-top: 0;
  }
  
  /* 7. 特典・注意・Q&A・規約（リッチテキスト内）: h3 左青線・リストのマーカー色 */
  .section-rich-text h3:not(:has(+ p)) {
    background: transparent;
    border: none;
    border-left: 4px solid var(--replace-brand);
    padding-left: 1rem;
    margin-left: 0;
    color: #111827;
    margin-top: 2rem;
  }
  
  .section-rich-text h3:not(:has(+ p)) + *,
  .rich-text h3:not(:has(+ p)) + * {
    margin-top: 0.5rem;
  }
  
  .section-rich-text ul li::marker,
  .rich-text ul li::marker {
    color: var(--replace-brand);
  }
  
  .section-rich-text ol,
  .rich-text ol {
    list-style: decimal;
    list-style-position: inside;
    margin-left: 0;
    margin-bottom: 1rem;

    & li {
      margin-bottom: 0.25rem;
    }
  }

  /* 8. #trade-in-term ブロック（利用規約） */
  .section-rich-text #trade-in-term,
  .rich-text #trade-in-term {
    background: #f9fafb;
    padding: 1.5rem 20px;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    margin-top: 2rem;

    @media screen and (min-width: 768px) {
      padding: 2.5rem 40px;
    }
  }

  #trade-in-term {
    & h3 {
      text-align: center;
      border-left: none;
      padding-left: 0;
      background: transparent;
      border: none;
      font-size: 1.125rem;
      color: #111827;

      @media screen and (min-width: 768px) {
        font-size: 1.25rem;
      }
    }

    & h4 {
      font-weight: 700;
      color: #111827;
      margin-top: 1.5rem;
      margin-bottom: 0.5rem;
    }

    & p,
    & ol,
    & li {
      font-size: 0.875rem;
      color: #374151;
      line-height: 1.625;
    }

    & ol {
      margin-left: 0.5rem;
    }
  }
  
  /* 9. リッチテキスト内の段落の行間 */
  .section-rich-text .rte-setting p,
  .rich-text .rte-setting p {
    line-height: 1.625;
  }
  
  /* h6 ブロック（小さな注意） */
  .section-rich-text .rte-setting h6,
  .rich-text .rte-setting h6 {
    font-size: var(--replace-note-font-size);
    color: #6b7280;
    font-weight: normal;
    margin-bottom: 0.5rem;
  }
  
  /* 10. バナー（参加方法など）の余白・角丸統一（KV以外） */
  #MainContent > .shopify-section:not(:nth-child(2)):has(.wide-banner) img {
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
  }
  
  /* ============================================
  IDベース スタイル（section_id を使った細かい調整）
  ============================================ */
  
  /* --- KVバナー --- */
  #MainContent > .shopify-section:nth-child(2) .wide-banner {
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  
  #MainContent > .shopify-section:nth-child(2) .wide-banner img {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100%;
  }
  
  /* --- KV注釈 --- */
  #MainContent > .shopify-section:nth-child(3):has(#replace-kv-note) {
    background: #fff;
  }
  
  #replace-kv-note {
    max-width: 900px;
    margin: 0 auto;
    padding: 8px 20px 0;
  }
  
  #replace-kv-note h6 {
    font-size: var(--replace-note-font-size);
    font-weight: normal;
    color: #9ca3af;
    line-height: 1.4;
    margin: 0;
    text-align: left;
  }
  
  /* ============================================================
  メインカードグループ（見出し・説明・CTA を1まとまりに）
  replace-title-main / replace-title-description / replace-title-cta
  ============================================================ */
  
  /* 4セクションの .shopify-section ラッパーを白背景でグループ化 */
  #replace-title-main,
  #replace-title-description,
  #replace-title-period,
  #replace-title-cta {
    background-color: #fff;
  }
  
  /* section-title 自体の最大幅・左右パディングを統一 */
  :is(#replace-title-main, #replace-title-period, #replace-title-cta) .section-title {
    max-width: var(--replace-content-narrow);
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  
  /* --- 先頭セクション（見出し）: 上パディング --- */
  #replace-title-main {
    padding-top: 2.5rem;

    & .section-title {
      padding-top: 0 !important;

      /* メイン見出し: font-sizeをQ&Aと揃える */
      & .h2 {
        font-size: 1.5rem;

        @media screen and (min-width: 768px) {
          font-size: 1.75rem;
        }

        /* 見出し下の青い線 */
        &::after {
          content: "";
          display: block;
          height: 4px;
          width: 4rem;
          background: var(--replace-brand);
          margin: 1rem auto 0;
          border-radius: 9999px;
        }
      }
    }
  }
  
  /* --- 中間セクション（説明文）の親 .shopify-section 背景 --- */
  .shopify-section {
    &:has(#replace-title-description) {
      background-color: #fff;
    }
  }
  
  /* --- 中間セクション（説明文） --- */
  #replace-title-description {
    max-width: var(--replace-content-narrow);
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 2rem 1rem;

    & p {
      text-align: center;
      line-height: 1.8;
      font-size: 14px;
      font-weight: normal;
      color: #374151;
      margin-bottom: 0;

      @media screen and (min-width: 768px) {
        font-size: 16px;
      }
    }

    /* 「5%OFF」などのブランドカラー強調 */
    & strong {
      color: var(--replace-brand);
      font-weight: 700;
    }
  }
  
  /* --- 期間・CTA 統合セクション（#replace-period-cta）: 期間box + CTAボタン --- */
  #replace-period-cta {
    max-width: var(--replace-content-narrow);
    margin-left: auto;
    margin-right: auto;
    padding-top: 0;
    padding-bottom: 2.5rem;
    text-align: center;
  }
  
  /* 1つ目の p: 期間ボックス */
  /* 2つ目の p: CTAボタン */
  #replace-period-cta {
    & p:first-of-type {
      display: inline-block;
      background: #f9fafb;
      border: 1px solid #e5e7eb;
      border-radius: 0.75rem;
      padding: 1.25rem 2rem;
      margin: 0.75rem auto 0;
      font-size: 14px;
      line-height: 1.7;
      color: #374151;
      font-weight: normal;
      text-align: center;
      min-width: 260px;

      @media screen and (min-width: 768px) {
        font-size: 16px;
        padding: 1.5rem 2.5rem;
      }

      & strong {
        display: block;
        font-size: 14px;
        font-weight: 700;
        color: var(--replace-brand);
        margin-bottom: 0.25rem;
        letter-spacing: 0.02em;

        @media screen and (min-width: 768px) {
          font-size: 16px;
        }
      }
    }

    /* 2つ目の p: 期間ボックスとの余白 */
    & p:last-of-type {
      margin-top: 1.5rem !important;

      /* p 内 a: CTAボタン */
      & a {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 12px 40px 10px;
        background: var(--replace-brand);
        color: #fff;
        border-radius: 60px;
        cursor: pointer;
        text-decoration: none;
        font-size: var(--replace-note-font-size);
        font-weight: 400;
        opacity: 1;
        transition: background-color 0.2s ease, box-shadow 0.2s;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

        &:hover {
          background: var(--replace-brand-hover);
          box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }

        & strong {
          display: block;
          font-size: 16px;
          font-weight: 700;
          line-height: 1.4;
          color: #fff;
          margin-bottom: 2px;
        }

        & span {
          display: block;
          font-size: 12px;
          font-weight: 400;
          color: rgba(255, 255, 255, 0.9);
          letter-spacing: normal;
          line-height: 1.4;

          @media screen and (min-width: 768px) {
            font-size: 13px;
          }
        }
      }
    }
  }
  
  /* --- 下取り対象製品 見出し --- */
  .shopify-section {
    &:has(#replace-title-trade-target),
    &:has(#replace-trade-target) {
      background-color: #f9fafb;
    }

    &:has(#replace-trade-target) {
      padding-bottom: 44px;
    }
  }
  
  #replace-title-trade-target {
    background-color: #f9fafb;
  }
  
  /* --- 下取り対象製品 本文ボックス --- */
  #replace-trade-target {
    background-color: #f9fafb;
    margin-top: 0;

    & .rich-text__text--medium {
      background: #fff;
      border-radius: 0.75rem;
      border: 1px solid #e5e7eb;
      padding: 2rem 1.5rem;

      @media screen and (min-width: 768px) {
        padding: 2.5rem 2rem;
      }
    }

    & p {
      font-size: 1rem;
      color: #374151;
      margin-bottom: 0.75rem;
    }

    /* ご注意ボックス: h3とその後のpを1つの赤枠にまとめる */
    & h3 {
      background: #fef2f2;
      border: 1px solid #fecaca;
      border-radius: 0.75rem 0.75rem 0 0;
      border-bottom: none;
      padding: 1rem 1.25rem;
      margin-top: 1.5rem;
      margin-bottom: 0;
      color: var(--replace-danger);
      font-weight: 700;
      font-size: 1rem;
    }

    & h3 + p {
      background: #fef2f2;
      border: 1px solid #fecaca;
      border-radius: 0 0 0.75rem 0.75rem;
      border-top: none;
      padding: 0.5rem 1.25rem 1.25rem;
      margin-top: 0;
      color: #991b1b;
      font-size: 0.9375rem;
      line-height: 1.7;
      margin-bottom: 0;
    }
  }
  
  /* --- キャンペーン対象製品エリア: 見出し・説明を水色に（統合セクション replace-title-coupon） --- */
  .shopify-section {
    &:has(#replace-title-coupon) {
      background: var(--replace-brand-light);
      padding-top: 4rem;
      margin-top: 0 !important;
    }
  }
  
  #replace-title-coupon {
    padding-top: 0 !important;
    padding-bottom: 1rem !important;

    & h2 {
      margin: 0 0 0.5rem;
    }

    & p {
      margin: 0;
      text-align: center;

      @media screen and (min-width: 768px) {
        font-size: 16px;
      }
    }

    & a {
      @media screen and (min-width: 768px) {
        font-size: 16px;
      }
    }
  }
  
  /* ============================================
  対象製品カードグループ（擬似要素でbox化）
  section_id: replace-coupon-box-[数字] のパターンで管理
  白box: box-1〜box-4 を連結して1枚の白カードに見せる
  box-5（ご注意）は白boxの外に独立した赤枠ボックスとして配置
  
  HTML構造 (section-rich-text):
  <section class="shopify-section">        ← .shopify-section
  <div class="page-width rich-text ..."
  id="replace-coupon-box-N"
  style="background-color:#effbff; margin-top:Xpx; padding:4px 20px;">
  <div>
  <div class="rich-text__text--medium rte-setting">...</div>
  </div>
  </div>
  </section>
  ============================================ */
  
  /* === .shopify-section ラッパー: クーポンボックス群（ネスト） === */
  .shopify-section {
    &:has([id^="replace-coupon-box-"]) {
      background: var(--replace-brand-light) !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      padding-left: var(--replace-sp-padding) !important;
      padding-right: var(--replace-sp-padding) !important;
    }

    /* === 白box共通（box-N〜）: 白背景・左右border === */
    & [id^="replace-coupon-box-"] {
      background: #fff !important;
      max-width: var(--replace-content-max);
      margin-left: auto !important;
      margin-right: auto !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      padding-left: var(--replace-sp-padding) !important;
      padding-right: var(--replace-sp-padding) !important;
      padding-top: 1.5rem !important;
      padding-bottom: 1.5rem !important;
      border-left: 1px solid #e5e7eb;
      border-right: 1px solid #e5e7eb;

      @media screen and (min-width: 768px) {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
      }

      /* aタグのフォントサイズ: テンプレート全体の inherit ルールで管理 */
    }

    /* --- 先頭のcoupon-box（JSが .replace-coupon-first を付与）: 上パディング＋上端スタイル --- */
    &:has(.replace-coupon-first) {
      padding-top: 1.5rem !important;
    }

    /* --- 末尾のcoupon-box（JSが .replace-coupon-last を付与）: 下パディング --- */
    &:has(.replace-coupon-last) {
      padding-bottom: 4rem !important;
    }

    /* --- 先頭要素: 上角丸・上border --- */
    & .replace-coupon-first {
      border-top: 1px solid #e5e7eb;
      border-radius: 0.75rem 0.75rem 0 0;
    }

    /* --- 末尾要素: 下角丸・下border --- */
    & .replace-coupon-last {
      border-bottom: 1px solid #e5e7eb !important;
      border-radius: 0 0 0.75rem 0.75rem !important;
    }

    /* --- 先頭かつ末尾（coupon-boxが1つのみ）: 全角丸 --- */
    & .replace-coupon-first.replace-coupon-last {
      border-radius: 0.75rem !important;
    }

    /* --- box-1: ヘッダー部分（ラベル・見出し） --- */
    & #replace-coupon-box-1 {
      padding-bottom: 1.25rem !important;  /* h3の下の余白 */

      /* p タグ = 「対象製品」ラベル */
      & p {
        font-size: var(--replace-note-font-size);
        font-weight: 400;
        color: var(--replace-brand);
        margin-bottom: 0.25rem;
        letter-spacing: 0.05em;
        text-align: center;
      }

      /* h3 タグ = 「Anker製のポータブル電源」（h2から変更） */
      & h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #111827;
        text-align: center;
        margin: 0;  /* 下余白はbox-1のpadding-bottomで調整 */
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;

        @media screen and (min-width: 768px) {
          font-size: 1.75rem;
        }
      }
    }

    /* --- box-2: 画像セクション（section-banner） --- */
    & #replace-coupon-box-2 {
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;

      & img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 0;
        border: none !important;
        box-shadow: none !important;
      }
    }

    /* --- box-3: 対象製品についてセクション --- */
    & #replace-coupon-box-3 {
      /* h3 見出し（左ライン: ブランドカラー） */
      & h3 {
        position: relative;
        font-size: 1rem;
        font-weight: 700;
        color: #111827;
        background: transparent;
        border: none;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        padding: 0 0 0.75rem 1rem;
        margin: 0 0 1rem;

        &::before {
          content: "";
          position: absolute;
          left: 0;
          top: 0.1em;
          bottom: 0.85rem;
          width: 4px;
          background: var(--replace-brand);
          border-radius: 2px;
        }

        @media screen and (min-width: 768px) {
          font-size: 1.125rem;
        }
      }

      /* ul リスト（ブランドカラーの中黒） */
      & ul {
        list-style: none;
        margin-left: 0;
        margin-bottom: 0.75rem;
      }

      & ul li {
        padding-left: 1.25rem;
        position: relative;
        font-size: 14px;
        color: #374151;
        margin-bottom: 0.5rem;
        line-height: 1.6;

        @media screen and (min-width: 768px) {
          font-size: 16px;
        }

        &::before {
          content: "•";
          position: absolute;
          left: 0.25rem;
          color: var(--replace-brand);
          font-size: 1rem;
          line-height: 1.6;
        }
      }

      /* リンク */
      & a {
        color: var(--replace-brand);
        text-decoration: underline;
      }

      /* h6 注釈（グレー背景） */
      & h6 {
        font-size: var(--replace-note-font-size);
        font-weight: 400;
        color: #6b7280;
        background: #f9fafb;
        border-radius: 0.375rem;
        padding: 0.5rem 0.75rem;
        margin-top: 0.5rem;
        margin-bottom: 0;
        line-height: 1.6;
      }
    }

    /* --- box-4: 対象外セクション --- */
    & #replace-coupon-box-4 {
      /* h3 見出し（左ライン: グレー） */
      & h3 {
        position: relative;
        font-size: 1rem;
        font-weight: 700;
        color: #111827;
        background: transparent;
        border: none;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        padding: 0 0 0.75rem 1rem;
        margin: 0 0 1rem;

        &::before {
          content: "";
          position: absolute;
          left: 0;
          top: 0.1em;
          bottom: 0.85rem;
          width: 4px;
          background: #9ca3af;
          border-radius: 2px;
        }

        @media screen and (min-width: 768px) {
          font-size: 1.125rem;
        }
      }

      /* ul リスト（グレーの中黒） */
      & ul {
        list-style: none;
        margin-left: 0;
        margin-bottom: 0;
      }

      & ul li {
        padding-left: 1.25rem;
        position: relative;
        font-size: 14px;
        color: #374151;
        margin-bottom: 0.75rem;
        line-height: 1.6;

        @media screen and (min-width: 768px) {
          font-size: 16px;
        }

        &::before {
          content: "•";
          position: absolute;
          left: 0.25rem;
          color: #9ca3af;
          font-size: 1rem;
          line-height: 1.6;
        }
      }
    }

    /* --- box-5: ご注意セクション（白boxの末尾として連結） --- */
    & #replace-coupon-box-5 {
      padding-top: 0 !important;
      padding-bottom: 1.5rem !important;

      /* box-5の内側: 薄いピンク背景・赤細枠のご注意カード */
      & .rich-text__text--medium {
        background: #fef2f2 !important;
        border: 1px solid #fecaca !important;
        border-radius: 0.75rem !important;
        padding: 1.25rem !important;

        @media screen and (min-width: 768px) {
          padding: 1.5rem !important;
        }
      }

      & h3 {
        color: #dc2626;
        font-size: 1rem;
        font-weight: 700;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0 0 0.5rem;
        margin: 0 0 0.5rem;

        @media screen and (min-width: 768px) {
          font-size: 1rem;
        }
      }

      /* グローバルの h3 + p（赤背景・赤枠）を完全リセット */
      & h3 + p {
        background: transparent;
        border: none;
        border-radius: 0;
        border-top: none;
        margin-top: 0;
        padding: 0;
      }

      & p {
        font-size: 0.875rem;
        font-weight: 400;
        color: #1f2937;
        line-height: 1.7;
        margin: 0;

        @media screen and (min-width: 768px) {
          font-size: 0.9375rem;
        }
      }
    }
  }

  /* ============================================
  キャンペーン参加方法 〜 お申し込みの流れ 統合エリア
  ============================================ */
  
  /* .shopify-section ラッパー: howto 統合エリア全セクション共通＋個別 */
  .shopify-section {
    /* 全セクションに共通白背景＋隙間ゼロ */
    &:has(#replace-title-howto),
    &:has(#replace-banner-flow),
    &:has(#replace-flow),
    &:has(#replace-notes1) {
      background: #fff;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      /* JSONの padding_left/right を打ち消し、CSS側で幅管理 */
      padding-left: var(--replace-sp-padding) !important;
      padding-right: var(--replace-sp-padding) !important;
    }

    /* お申し込みの流れ: 上側（水色背景→白背景）の境界余白 */
    &:has(#replace-title-howto) {
      padding-top: 4rem !important;
    }

    /* banner-flow: 画像は端まで伸ばすため余白なし */
    &:has(#replace-banner-flow) {
      padding-left: 0 !important;
      padding-right: 0 !important;

      & img {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
      }
    }

    /* 統合エリア最後のセクションに下余白 */
    &:has(#replace-notes1) {
      padding-bottom: 4rem;
    }
  }

  /* 見出し: 透明背景・影なし（JSONのmargin_left/right=0、max-width!importantで900px） */
  #replace-title-howto {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    max-width: var(--replace-content-narrow) !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 1.5rem !important;

    /* お申し込みの流れ: font-sizeをQ&Aと揃える */
    & .section-title .h2 {
      font-size: 1.5rem;

      @media screen and (min-width: 768px) {
        font-size: 1.75rem;
      }
    }
  }

  /* ステップ画像: max-width 統一、装飾なし */
  /* section-banner.liquid が .section-XXX-margin に max-width:1080px をインラインで出力するため !important で上書き */
  #replace-banner-flow {
    max-width: var(--replace-content-narrow) !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  /* 申し込み流れ説明: max-width 統一（JSONのpaddingは0に設定済み） */
  #replace-flow {
    max-width: var(--replace-content-narrow);
    margin: 0 auto;
    padding-left: 0 !important;
    padding-right: 0 !important;

    & p {
      font-size: 0.875rem;
      color: #374151;
      line-height: 1.8;

      @media screen and (min-width: 768px) {
        font-size: 1rem;
      }
    }

    /* 受付期間・回収期間の行: ボーダー付き縦並び */
    & p:has(strong) {
      border-top: 1px solid #e5e7eb;
      padding: 1rem 0;
      margin: 0;

      &:last-of-type {
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 1.5rem;
      }
    }

    & strong {
      color: var(--replace-brand);
      font-weight: 700;
      display: block;
      margin-bottom: 0.25rem;
      font-size: 0.875rem;

      @media screen and (min-width: 768px) {
        font-size: 1rem;
      }
    }
  }

  /* 注意書き（角丸ボーダーボックス）: max-width 統一 */
  #replace-notes1 {
    border: 1px solid #e5e7eb !important;
    border-radius: 0.75rem !important;
    padding: 1.25rem 1.5rem !important;
    max-width: var(--replace-content-narrow);
    margin: 1.5rem auto 0 !important;

    & h6 {
      font-size: var(--replace-note-font-size);
      color: #6b7280;
      font-weight: normal;
      line-height: 2;
    }

    @media screen and (min-width: 768px) {
      padding: 1.5rem 2rem !important;
    }
  }
  
  /* ============================================
  Q&A セクション（各Q&Aペアが独立セクション）
  - #replace-qa-title : 見出し（固定ID）
  - #replace-qa-N     : 各Q&Aペア（N=1,2,3…）  ← 増減可能
  - h4 = 質問（Q）
  - p  = 回答（A）
  - h6 = 注釈
  - カードの白box枠は CSS で描画（擬似要素不要、h4/p のborderで実現）
  - 最終Q&Aのセクション下余白は #replace-benefit の padding-top で確保
  ============================================ */
  
  /* .shopify-section ラッパー: Q&A 全セクション共通＋個別 */
  .shopify-section {
    /* 全Q&Aセクション: グレー背景・余白なし・JSONのpadding打ち消し */
    &:has(#replace-qa-title),
    &:has([id^="replace-qa-"]) {
      background: #f9fafb !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      padding-left: var(--replace-sp-padding) !important;
      padding-right: var(--replace-sp-padding) !important;
    }

    /* 見出しセクション（見出し・1統合時も同様）: 上にパディング、下は他Q&Aと揃えて 0.75rem */
    &:has(#replace-qa-title) {
      padding-top: 4rem !important;
      padding-bottom: 2.5rem !important;
    }

    /* === 各Q&Aカード: .shopify-section の擬似要素で白box枠を描画 === */
    /* カードはmax-width内に収め、セクション間の隙間0で連続して見せる */
    /* 最終Q&Aのパディングは #replace-benefit の padding-top で吸収（Q&A数可変に対応） */
    &:has([id^="replace-qa-"]:not(#replace-qa-title)) {
      position: relative;
      padding-top: 0 !important;
      padding-bottom: 0.375rem !important;
    }
  }

  /* コンテンツ幅揃え（JSONのpaddingは0に設定済み） */
  /* Q&A 見出し（h3）: グローバルの赤背景を完全リセット */
  #replace-qa-title {
    max-width: var(--replace-content-narrow);
    margin: 0 auto;
    padding-left: 0 !important;
    padding-right: 0 !important;

    & h3 {
      text-align: center;
      font-size: 1.5rem;
      font-weight: 700;
      color: #111827;
      margin: 0 0 1.5rem;
      padding: 0;
      background: transparent;
      border: none;
      border-radius: 0;

      @media screen and (min-width: 768px) {
        font-size: 1.75rem;
      }
    }
  }
  
  [id^="replace-qa-"] {
    max-width: var(--replace-content-narrow);
    margin: 0 auto;
    padding-left: 0 !important;
    padding-right: 0 !important;

    /* Q行: 白背景カード上半分 + Qバッジ（::before） */
    & h4 {
      position: relative !important;
      background: #fff !important;
      border: 1px solid #e5e7eb !important;
      border-bottom: none !important;
      border-radius: 0.75rem 0.75rem 0 0 !important;
      padding: 1.25rem 1.25rem 1rem 4rem !important;
      margin: 0 !important;
      font-size: 15px;
      font-weight: 700;
      color: #1a1a1a;
      line-height: 1.5;
      display: block !important;

      @media screen and (min-width: 768px) {
        font-size: 16px;
        padding: 1.5rem 1.5rem 1.25rem 4.5rem !important;
      }

      /* Qバッジ */
      &::before {
        content: "Q";
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 1.875rem;
        height: 1.875rem;
        border-radius: 50%;
        background: #e0f5fc;
        color: var(--replace-brand);
        font-size: 0.8125rem;
        font-weight: 800;

        @media screen and (min-width: 768px) {
          left: 1.25rem;
          width: 2rem;
          height: 2rem;
        }
      }
    }

    /* Q行（2個目以降）: 前のカードとの間隔 */
    & p + h4 {
      margin-top: 0.75rem !important;
    }

    /* A（p）: 白背景カード下半分 + Aバッジ（::before）+ Q/A間区切り線（background-image） */
    & h4 + p {
      position: relative !important;
      background: #fff !important;
      border: 1px solid #e5e7eb !important;
      border-top: none !important;
      border-radius: 0 0 0.75rem 0.75rem !important;
      padding: 1rem 1.25rem 1.25rem 4rem !important;
      margin: 0 !important;
      font-size: 13px;
      color: #555;
      line-height: 1.75;
      display: block !important;
      background-image: linear-gradient(to right, transparent 1rem, #ebebeb 1rem, #ebebeb calc(100% - 1rem), transparent calc(100% - 1rem)) !important;
      background-size: 100% 1px !important;
      background-repeat: no-repeat !important;
      background-position: top center !important;

      @media screen and (min-width: 768px) {
        font-size: 14px;
        padding: 1.25rem 1.5rem 1.5rem 4.5rem !important;
        background-image: linear-gradient(to right, transparent 1.25rem, #ebebeb 1.25rem, #ebebeb calc(100% - 1.25rem), transparent calc(100% - 1.25rem)) !important;
      }

      /* Aバッジ */
      &::before {
        content: "A";
        position: absolute;
        left: 1rem;
        top: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 1.875rem;
        height: 1.875rem;
        border-radius: 50%;
        background: #f3f4f6;
        color: #9ca3af;
        font-size: 0.8125rem;
        font-weight: 800;

        @media screen and (min-width: 768px) {
          left: 1.25rem;
          top: 1.1rem;
          width: 2rem;
          height: 2rem;
        }
      }
    }

    /* h6 注釈 */
    & h6 {
      font-size: var(--replace-note-font-size);
      font-weight: normal;
      color: #6b7280;
      line-height: 1.8;
      margin: 0.5rem 0 0;
      padding: 0;
      background: transparent;
      border: none;
    }

    /* リンク */
    & a {
      color: var(--replace-brand);
      text-decoration: underline;
      font-size: inherit;
    }
  }
  
  /* ============================================
  特典内容セクション
  - #replace-benefit-1 : 見出し（h3）+ 概要（p）       ← 白box 上部
  - #replace-benefit-2 : 付与の流れ（h4 + ol + h6）    ← 白box 中間（グレーbox擬似要素）
  - #replace-benefit-3 : 注釈（h6）                    ← 白box 下部・末尾
  ============================================ */
  
  /* .shopify-section ラッパー: benefit 全セクション共通＋個別 */
  .shopify-section {
    /* 全 benefit セクション: グレー背景・margin 0・上下paddingのみ管理
    （白boxの左右余白はコンテンツ要素の max-width + margin: auto で制御） */
    &:has([id^="replace-benefit-"]) {
      background: #f9fafb !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      padding-left: var(--replace-sp-padding) !important;
      padding-right: var(--replace-sp-padding) !important;
    }

    /* 先頭セクションの前にセクション間スペース */
    /* === benefit-1: 見出し + 概要 ===
    .shopify-section::before で白boxの上辺を描画
    白boxの横幅 = max-width: 900px の中央寄せ領域に合わせる */
    &:has(#replace-benefit-1) {
      padding-top: 2rem !important;
      position: relative;

      /* max(20px, calc(50% - 450px)): 画面幅900px以下は左右20px余白、900px超は中央450px */
      &::before {
        content: "";
        position: absolute;
        left: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        right: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        top: 2rem;          /* padding-top 分だけ下げる */
        bottom: 0;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-bottom: none;
        border-radius: 0.75rem 0.75rem 0 0;
        pointer-events: none;
      }
    }

    /* === benefit-1b: 概要テキスト（benefit-1の直下・白box内） === */
    /* benefit-1::before は benefit-1 セクション内のみなので、1b に白背景+左右ボーダーを付与して白ボックスを継続 */
    &:has(#replace-benefit-1b) {
      position: relative;
      padding-top: 0 !important;
      padding-bottom: 0 !important;

      &::before {
        content: "";
        position: absolute;
        left: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        right: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        top: 0;
        bottom: 0;
        background: #fff;
        border-left: 1px solid #e5e7eb;
        border-right: 1px solid #e5e7eb;
        pointer-events: none;
      }
    }

    /* === benefit-2: 付与の流れ ===
    ::before でグレーbox（h4+p を内包）を描画 */
    /* 白box 中間の左右border（::before で全体を覆う） */
    &:has(#replace-benefit-2) {
      position: relative;

      &::before {
        content: "";
        position: absolute;
        left: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        right: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        top: 0;
        bottom: 0;
        background: #fff;
        border-left: 1px solid #e5e7eb;
        border-right: 1px solid #e5e7eb;
        pointer-events: none;
      }
    }

    /* === benefit-3: 注釈 ===
    ::before で白boxの下辺を描画 */
    /* 末尾セクションの後にセクション間スペース */
    &:has(#replace-benefit-3) {
      padding-bottom: 2.5rem !important;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        left: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        right: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        top: 0;
        bottom: 2.5rem;     /* padding-bottom 分だけ上げる */
        background: #fff;
        border: 1px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 0.75rem 0.75rem;
        pointer-events: none;
      }
    }
  }

  /* benefit 共通: 幅制限・position・padding 0・背景透過 + .rich-text__text--medium / .rte-setting の左右余白 */
  [id^="replace-benefit-"] {
    max-width: var(--replace-content-narrow);
    margin: 0 auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    position: relative;

    & .rich-text__text--medium,
    & .rte-setting {
      padding-left: var(--replace-sp-padding) !important;
      padding-right: var(--replace-sp-padding) !important;

      @media screen and (min-width: 768px) {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
      }
    }
  }

  /* Liquidのインラインpadding:0を回避し、内側ラッパーで白box内余白を確保（左右は [id^="replace-benefit-"] 共通） */
  #replace-benefit-1 {
    & .rich-text__text--medium,
    & .rte-setting {
      padding-top: 1.5rem !important;
      padding-bottom: 0 !important;
    }
  }

  /* h3: グローバル赤背景リセット + 中央揃え（benefit-1 と notice-1 で共通） */
  #replace-benefit-1 h3,
  #replace-notice-1 h3 {
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.5rem;
    padding: 0 0 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;

    @media screen and (min-width: 768px) {
      font-size: 1.5rem;
    }
  }

  #replace-benefit-1b {
    & .rich-text__text--medium,
    & .rte-setting {
      padding-top: 0 !important;
      padding-bottom: 1.5rem !important;
    }

    & p {
      font-size: 15px;
      line-height: 1.75;
      color: #374151;
      margin: 0;
      background: transparent;
      border: none;
      border-radius: 0;
      padding: 0;

      @media screen and (min-width: 768px) {
        font-size: 16px;
      }
    }

    & strong {
      color: var(--replace-brand);
      font-weight: 700;
    }
  }

  /* Liquidのインラインpadding:0を回避し、内側ラッパーで白box内余白を確保
  下余白をグレーbox上の余白（0.75rem）に合わせる */
  #replace-benefit-2 {
    & .rich-text__text--medium,
    & .rte-setting {
      padding-top: 0 !important;
      padding-bottom: 0.75rem !important;
    }

    /* h4: グレーbox見出し */
    & h4 {
      font-size: 15px;
      font-weight: 700;
      color: #111827;
      margin: 0;
      padding: 0.75rem 1.25rem 0.5rem;  /* 下余白を小さく */
      background: #f3f4f6;
      border: none;
      border-radius: 0.5rem 0.5rem 0 0;

      @media screen and (min-width: 768px) {
        font-size: 15px;
      }
    }

    /* p: グレーbox本文（h4と左右余白を揃える） */
    & p {
      font-size: 14px;
      line-height: 1.75;
      color: #374151;
      margin: 0;
      padding: 0 1.25rem;
      background: #f3f4f6;

      @media screen and (min-width: 768px) {
        font-size: 15px;
      }

      /* 通常p: グレーbox内の行間を詰める */
      &:not(:last-of-type) {
        padding-top: 0.375rem;
      }

      /* 最後のp（※注釈）: 赤・太字・下角丸 */
      &:last-of-type {
        padding-bottom: 1rem;
        border-radius: 0 0 0.5rem 0.5rem;
        color: var(--replace-danger);
        font-size: var(--replace-note-font-size);
        font-weight: 700;
        padding-top: 0.5rem;

        @media screen and (min-width: 768px) {
          font-size: var(--replace-note-font-size);
        }

        & strong {
          color: var(--replace-danger);
        }
      }
    }
  }

  /* Liquidのインラインpadding:0を回避し、内側ラッパーで白box内余白を確保 */
  #replace-benefit-3 {
    & .rich-text__text--medium,
    & .rte-setting {
      padding-top: 1.5rem !important;
      padding-bottom: 1.5rem !important;
    }

    /* h6: 汎用注釈スタイル */
    & h6 {
      font-size: var(--replace-note-font-size);
      color: #6b7280;
      font-weight: normal;
      line-height: 2;
      margin: 0;
      padding: 0;
      background: transparent;
      border: none;
    }

    & a {
      color: var(--replace-brand);
      text-decoration: underline;
    }
  }
  
  /* ============================================
  注意事項セクション（特典内容と同パターン）
  - #replace-notice-1 : 見出し（h3）         ← 白box 上部
  - #replace-notice-2 : 本文（h6）            ← 白box 下部・末尾
  ============================================ */
  
  /* .shopify-section ラッパー: notice 全セクション共通＋個別 */
  .shopify-section {
    /* 全 notice セクション: グレー背景・余白なし */
    &:has([id^="replace-notice-"]) {
      background: #f9fafb !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      padding-left: var(--replace-sp-padding) !important;
      padding-right: var(--replace-sp-padding) !important;
    }

    /* 先頭セクションの前にセクション間スペース */
    /* === notice-1: 見出し === 白box上辺 */
    &:has(#replace-notice-1) {
      padding-top: 2rem !important;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        left: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        right: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        top: 2rem;
        bottom: 0;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-bottom: none;
        border-radius: 0.75rem 0.75rem 0 0;
        pointer-events: none;
      }
    }

    /* 末尾セクションの後にセクション間スペース */
    /* === notice-2: 本文（h6注釈） === 白box下辺 */
    &:has(#replace-notice-2) {
      padding-bottom: 4rem !important;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        left: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        right: max(20px, calc(50% - var(--replace-content-narrow) / 2));
        top: 0;
        bottom: 4rem;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 0.75rem 0.75rem;
        pointer-events: none;
      }
    }
  }

  /* コンテンツ要素: 幅制限・padding 0・背景透過・position */
  [id^="replace-notice-"] {
    max-width: var(--replace-content-narrow);
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: transparent !important;
    position: relative;
  }

  #replace-notice-1 {
    & .rich-text__text--medium,
    & .rte-setting {
      padding: 1.5rem var(--replace-sp-padding) 0 !important;

      @media screen and (min-width: 768px) {
        padding: 1.5rem 1.5rem 0 !important;
      }
    }
  }

  #replace-notice-2 {
    & .rich-text__text--medium,
    & .rte-setting {
      padding: 0 var(--replace-sp-padding) 1.5rem !important;

      @media screen and (min-width: 768px) {
        padding: 0 1.5rem 1.5rem !important;
      }
    }

    /* 「最新機種への買い替えメリット」青box */
    & .rich-text__merit-box {
      background: var(--replace-brand-light);
      border: 1px solid #bae6fd;
      border-radius: 0.75rem;
      padding: 1.5rem var(--replace-sp-padding);
      margin-top: 1.5rem;

      @media screen and (min-width: 768px) {
        padding: 1.5rem;
      }

      & p,
      & li,
      & a {
        font-size: 14px;
        line-height: 1.625;
      }

      & .rich-text__accordion summary {
        font-size: 16px;

        @media screen and (min-width: 768px) {
          font-size: 18px;
        }
      }

      & .rich-text__accordion p {
        font-size: 12px;

        @media screen and (min-width: 768px) {
          font-size: 14px;
        }
      }
    }

    /* h4: セクション見出し */
    & h4 {
      font-size: 1rem;
      font-weight: 700;
      color: #111827;
      margin: 1.5rem 0 0.75rem;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid #e5e7eb;

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

      @media screen and (min-width: 768px) {
        font-size: 1.0625rem;
      }
    }

    /* ol: 番号付きリスト（list-style: none のリセットに依存しないよう counter で描画） */
    & ol {
      margin: 0;
      padding-left: 0;
      counter-reset: ol-counter;

      & li {
        list-style: none;
        position: relative;
        padding-left: 1.5rem;
        font-size: 14px;
        color: #374151;
        line-height: 1.75;
        margin-bottom: 0.5rem;
        counter-increment: ol-counter;

        &::before {
          content: counter(ol-counter) ".";
          position: absolute;
          left: 0;
          width: 1.25rem;
          color: #374151;
        }

        @media screen and (min-width: 768px) {
          font-size: 15px;
        }

        &:last-child {
          margin-bottom: 0;
        }
      }
    }

    /* p: 本文段落 */
    & p {
      font-size: 14px;
      color: #374151;
      line-height: 1.75;
      margin: 0 0 0.75rem;

      @media screen and (min-width: 768px) {
        font-size: 15px;
      }

      &:last-child {
        margin-bottom: 0;
      }
    }

    /* ul: グレー中黒リスト */
    & ul {
      list-style: none;
      margin: 0;
      padding: 0;

      & li {
        position: relative;
        font-size: 14px;
        color: #374151;
        line-height: 1.75;
        margin-bottom: 0.5rem;
        padding-left: 1.25rem;

        @media screen and (min-width: 768px) {
          font-size: 15px;
        }

        &::before {
          content: "•";
          position: absolute;
          left: 0.25rem;
          color: #9ca3af;
          font-size: 1rem;
          line-height: 1.75;
        }

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }
  
  /* --- フォーム見出し --- */
  #replace-title-form .section-title {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* --- アコーディオン --- */
  .rich-text__accordion {
    background-color: #fff;
  }

  .rich-text__accordion + .rich-text__accordion {
    border-top: 1px solid #e0e0e0;
  }

  .rich-text__accordion summary {
    cursor: pointer;
    padding: 24px 40px 24px 0;
    font-size: 16px;
    font-weight: bold;
    color: #313131;
    background-color: #fff;
    list-style: none;
    position: relative;
  }

  .rich-text__accordion summary::-webkit-details-marker {
    display: none;
  }

  .rich-text__accordion summary::marker {
    display: none;
    content: "";
  }

  .rich-text__accordion summary::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: translateY(-75%) rotate(45deg);
    transition: transform 0.3s ease;
  }

  .rich-text__accordion[open] summary::after {
    transform: translateY(-25%) rotate(-135deg);
  }

  .rich-text__accordion p {
    padding: 0 16px 16px 0;
    font-size: 12px;
  }

  @media screen and (min-width: 768px) {
    .rich-text__accordion summary {
      font-size: 18px;
    }
    .rich-text__accordion p {
      font-size: 14px;
    }
  }

}
