/* セキュリティパッチ自動適用サービス — Cloud Assist ページ専用スタイル
   ファイル配置: /includes/patch-auto/patch-auto-style.css
   mu-plugin（wp-content/mu-plugins/patch-auto-embed.php）が <head> から読み込む。

   すべてのセレクタを .patch-auto-lp 配下にスコープし、WordPressテーマ(denettm)へ
   スタイルが漏れないようにしている。デザイントークン(CSS変数)も .patch-auto-lp 配下に限定。
   配色・余白・文字サイズは /aws/msp/（msp-style.css）のトーンに合わせている。
   フォントはテーマ側の読み込みを継承する（msp と同じく @import はしない）。 */

/* ================================================================
   DESIGN TOKENS / WRAPPER
   ================================================================ */
.patch-auto-lp {
  --pa-red: #ab010b;
  --pa-red-deep: #8a0009;
  --pa-red-tint: rgba(171, 1, 11, 0.04);
  --pa-ink: #424242;
  --pa-text: #555;
  --pa-muted: #666;
  --pa-faint: #888;
  --pa-line: #e0e0e0;
  --pa-soft: #f5f5f5;
  --pa-pad-x: var(--wp--style--root--padding-left, 15px);
  /* テーマのコンテンツ枠（1350px）と同じにして、本文の左端をヘッダーのロゴ・ページタイトルに揃える（msp の .inner と同じ） */
  --pa-max: 1350px;

  background: #fff;
  color: var(--pa-ink);
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* ラッパーには overflow-x:clip を付けない。付けるとテーマのコンテンツ幅（1350px）で
     100vw化したセクションの背景が切れる（msp・azureは切れている）。
     スクロールバー幅ぶんの横スクロールは、下の body 側で抑止する。 */
}

/* このページを含むときだけ、100vw化したセクションのはみ出し（スクロールバー幅）による横スクロールを抑止 */
body:has(.patch-auto-lp) {
  overflow-x: clip;
}

.patch-auto-lp *,
.patch-auto-lp *::before,
.patch-auto-lp *::after {
  box-sizing: border-box;
}

.patch-auto-lp h2,
.patch-auto-lp h3,
.patch-auto-lp p,
.patch-auto-lp ul,
.patch-auto-lp ol,
.patch-auto-lp li,
.patch-auto-lp table,
.patch-auto-lp th,
.patch-auto-lp td {
  margin: 0;
  padding: 0;
}

.patch-auto-lp ul,
.patch-auto-lp ol {
  list-style: none;
}

/* ---- Full-bleed: テーマのコンテンツ枠で背景が切れないようにセクションを画面幅へ ---- */
.patch-auto-lp > section,
.patch-auto-lp > .pa-mid-cta {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}

.patch-auto-lp .pa-inner {
  max-width: var(--pa-max);
  margin: 0 auto;
  padding-left: var(--pa-pad-x);
  padding-right: var(--pa-pad-x);
}

.patch-auto-lp .pa-section {
  padding-top: clamp(60px, 8vw, 110px);
  padding-bottom: clamp(60px, 8vw, 110px);
  background: #fff;
}

.patch-auto-lp .pa-bg-soft {
  background: var(--pa-soft);
}

/* ---- Section heading ---- */
.patch-auto-lp .pa-sec-heading {
  margin-bottom: clamp(32px, 4vw, 52px);
}

.patch-auto-lp .pa-sec-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pa-red);
  margin-bottom: 0.75rem;
}

.patch-auto-lp .pa-sec-heading h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 900;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--pa-ink);
}

.patch-auto-lp .pa-rule {
  display: block;
  width: 40px;
  height: 3px;
  background: var(--pa-red);
  margin-top: 1.25rem;
  border-radius: 2px;
}

.patch-auto-lp .pa-sub {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--pa-muted);
  line-height: 2;
}

.patch-auto-lp .pa-center {
  text-align: center;
}

.patch-auto-lp .pa-center .pa-rule,
.patch-auto-lp .pa-center .pa-sub {
  margin-left: auto;
  margin-right: auto;
}

.patch-auto-lp .pa-subhead {
  margin: clamp(48px, 6vw, 72px) 0 1.25rem;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 700;
  line-height: 1.6;
  color: var(--pa-ink);
}

/* ---- Buttons ---- */
.patch-auto-lp .pa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.patch-auto-lp .pa-btn-primary {
  background: var(--pa-red);
  color: #fff;
  border: 2px solid var(--pa-red);
}

.patch-auto-lp .pa-btn-primary:hover {
  background: var(--pa-red-deep);
  border-color: var(--pa-red-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(171, 1, 11, 0.25);
}

.patch-auto-lp .pa-btn-outline {
  background: #fff;
  color: var(--pa-ink);
  border: 2px solid var(--pa-line);
}

.patch-auto-lp .pa-btn-outline:hover {
  border-color: var(--pa-red);
  color: var(--pa-red);
  transform: translateY(-2px);
}

.patch-auto-lp .pa-btn-white {
  background: #fff;
  color: var(--pa-red);
  border: 2px solid #fff;
}

.patch-auto-lp .pa-btn-white:hover {
  color: var(--pa-red-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.patch-auto-lp .pa-btn:focus-visible,
.patch-auto-lp .pa-text-link:focus-visible,
.patch-auto-lp .pa-faq-btn:focus-visible,
.patch-auto-lp .pa-related a:focus-visible {
  outline: 3px solid var(--pa-red);
  outline-offset: 3px;
}

.patch-auto-lp .pa-final-cta .pa-btn:focus-visible {
  outline-color: #fff;
}

.patch-auto-lp .pa-text-link {
  display: inline-block;
  padding: 6px 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pa-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.patch-auto-lp .pa-text-link:hover {
  opacity: 0.7;
}

/* ---- Notes ---- */
.patch-auto-lp .pa-note {
  font-size: 0.85rem;
  color: var(--pa-faint);
  line-height: 1.8;
}

.patch-auto-lp .pa-note-block {
  margin-top: 1.25rem;
}

/* ================================================================
   0. FV
   ================================================================ */
.patch-auto-lp .pa-hero {
  /* WPテーマのページタイトル(h1)直下に入るため、上余白は詰める（msp の最上段と同じ考え方） */
  padding-top: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(40px, 5vw, 72px);
  /* タイトル直後は白で始める（2026-11-20 ユーザー指示）。直後の #paService も白なので罫線で区切る */
  background: #fff;
  border-bottom: 1px solid var(--pa-line);
  position: relative;
}

.patch-auto-lp .pa-hero .pa-inner {
  position: relative;
}

.patch-auto-lp .pa-hero-catch {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--pa-ink);
  margin-bottom: 1rem;
}

.patch-auto-lp .pa-hero-sub {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--pa-text);
  line-height: 1.9;
  margin-bottom: 1.25rem;
}

.patch-auto-lp .pa-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.patch-auto-lp .pa-hero-points li {
  position: relative;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--pa-ink);
  background: #fff;
  border: 1px solid var(--pa-line);
  border-radius: 6px;
  padding: 7px 14px 7px 32px;
}

.patch-auto-lp .pa-hero-points li::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 10px;
  height: 5px;
  margin-top: -4px;
  border-bottom: 2px solid var(--pa-red);
  border-left: 2px solid var(--pa-red);
  transform: rotate(-45deg);
}

.patch-auto-lp .pa-hero-plan {
  /* 文の長さに合わせる（820px固定だとPCで「ん。」だけ2行目に落ちた） */
  width: fit-content;
  max-width: 100%;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--pa-ink);
  padding: 12px 16px;
  background: var(--pa-soft);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.patch-auto-lp .pa-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* PCだけ改行するための <br> */
@media (max-width: 768px) {
  .patch-auto-lp .pa-br-pc {
    display: none;
  }

  /* スマホでは「マネージドプランに含まれる」とCTAを1画面目に収めるため、
     ポイント3つをCTAの下へ回す（見た目の順序だけ変える。DOM順は変えない） */
  .patch-auto-lp .pa-hero .pa-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .patch-auto-lp .pa-hero-plan,
  .patch-auto-lp .pa-hero-cta {
    align-self: stretch;
  }

  .patch-auto-lp .pa-hero-plan {
    width: auto;
  }

  .patch-auto-lp .pa-hero-points {
    order: 1;
    margin: 1.25rem 0 0;
  }
}

/* ================================================================
   Grids / Cards
   ================================================================ */
.patch-auto-lp .pa-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.patch-auto-lp .pa-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.patch-auto-lp .pa-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 提供内容は5枚。3列だと2段目に空きが出るので、6分割して上段3枚・下段2枚とも全幅に広げる */
.patch-auto-lp .pa-grid-service {
  grid-template-columns: repeat(6, 1fr);
}

.patch-auto-lp .pa-grid-service > * {
  grid-column: span 2;
}

.patch-auto-lp .pa-grid-service > :nth-child(n + 4) {
  grid-column: span 3;
}

.patch-auto-lp .pa-card {
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--pa-soft);
  border: 1px solid var(--pa-line);
  border-radius: 12px;
}

.patch-auto-lp .pa-card-white {
  background: #fff;
}

.patch-auto-lp .pa-card h3 {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 700;
  line-height: 1.6;
  color: var(--pa-ink);
  margin-bottom: 0.7rem;
}

.patch-auto-lp .pa-card p {
  font-size: 1rem;
  color: var(--pa-muted);
  line-height: 1.9;
}

.patch-auto-lp .pa-case-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pa-faint);
  margin-bottom: 0.75rem;
}

/* 6. Track Record */
.patch-auto-lp .pa-record-grid {
  max-width: 960px;
}

.patch-auto-lp .pa-record-link {
  margin-top: 1.5rem;
}

/* ================================================================
   9. Background
   ================================================================ */
.patch-auto-lp .pa-bg-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

/* 3項目目（SCS評価制度）は文が長いので2列ぶち抜き */
.patch-auto-lp .pa-bg-item-wide {
  grid-column: 1 / -1;
}

.patch-auto-lp .pa-bg-item {
  background: #fff;
  border: 1px solid var(--pa-line);
  border-radius: 12px;
  padding: clamp(20px, 2.4vw, 28px);
}

.patch-auto-lp .pa-bg-item > p {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--pa-text);
}

.patch-auto-lp .pa-bg-item > .pa-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--pa-faint);
}

.patch-auto-lp .pa-ref {
  font-size: 0.75em;
  font-weight: 700;
  color: var(--pa-red);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  white-space: nowrap;
}

.patch-auto-lp .pa-ref:hover {
  text-decoration: underline;
}

.patch-auto-lp .pa-sources {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--pa-faint);
}

.patch-auto-lp .pa-sources li + li {
  margin-top: 0.25rem;
}

.patch-auto-lp .pa-sources a {
  color: var(--pa-faint);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.patch-auto-lp .pa-sources a:hover {
  color: var(--pa-red);
}

/* 注番号リンクの飛び先（WP固定ヘッダー分のオフセット） */
.patch-auto-lp #paNote1,
.patch-auto-lp #paNote2 {
  scroll-margin-top: 120px;
}

/* ================================================================
   Tables（対応表・対象範囲）
   ================================================================ */
.patch-auto-lp .pa-table-wrap {
  background: #fff;
  border: 1px solid var(--pa-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.patch-auto-lp .pa-table {
  width: 100%;
  /* /aws/ 配下のテーマCSS（aws-other.css）が table { border-collapse: separate !important } を当てるため、
     !important で打ち消す（打ち消さないとセルの間に白いすき間が出る） */
  border-collapse: collapse !important;
  border-spacing: 0;
  font-size: 1rem;
}

.patch-auto-lp .pa-table thead th {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--pa-red);
  padding: 12px 20px;
  text-align: left;
}

.patch-auto-lp .pa-table tbody th,
.patch-auto-lp .pa-table tbody td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
  border-top: 1px solid #eee;
}

.patch-auto-lp .pa-table tbody tr:first-child th,
.patch-auto-lp .pa-table tbody tr:first-child td {
  border-top: none;
}

.patch-auto-lp .pa-table tbody th {
  width: 30%;
  font-weight: 700;
  color: var(--pa-ink);
  background: var(--pa-red-tint);
}

.patch-auto-lp .pa-table tbody td {
  color: var(--pa-text);
}

.patch-auto-lp .pa-table-spec tbody th {
  width: 24%;
}

.patch-auto-lp .pa-table-change thead th,
.patch-auto-lp .pa-table-change tbody th {
  width: 22%;
}

.patch-auto-lp .pa-table-change thead th:nth-child(2),
.patch-auto-lp .pa-table-change thead th:nth-child(3) {
  width: 39%;
}

.patch-auto-lp .pa-table-change tbody td:last-child {
  color: var(--pa-ink);
  background: var(--pa-red-tint);
}

/* 4. 役割分担の2つの箱 */
.patch-auto-lp .pa-roles {
  align-items: stretch;
}

.patch-auto-lp .pa-roles .pa-box {
  margin-top: 0;
}

.patch-auto-lp .pa-subhead-first {
  margin-top: 0;
}

/* ================================================================
   Steps（仕組み 5ステップ／導入の流れ 4ステップ）
   ================================================================ */
.patch-auto-lp .pa-steps {
  /* カード間に矢印を置く余白を確保する（--pa-step-gap の中央に矢印が来る） */
  --pa-step-gap: 32px;
  display: grid;
  gap: var(--pa-step-gap);
  counter-reset: pa-step;
}

.patch-auto-lp .pa-steps-5 {
  grid-template-columns: repeat(5, 1fr);
}

.patch-auto-lp .pa-steps-4 {
  grid-template-columns: repeat(4, 1fr);
}

.patch-auto-lp .pa-step {
  position: relative;
  counter-increment: pa-step;
  background: #fff;
  border: 1px solid var(--pa-line);
  border-radius: 12px;
  padding: 22px 18px 20px;
}

.patch-auto-lp .pa-bg-soft .pa-step {
  background: #fff;
}

.patch-auto-lp .pa-section:not(.pa-bg-soft) .pa-step {
  background: var(--pa-soft);
}

.patch-auto-lp .pa-step::before {
  content: counter(pa-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: var(--pa-red);
  border-radius: 50%;
}

/* ステップ間の矢印：カードの間の余白の中央・カードの高さの中央に置く（縦並び時は下向き） */
.patch-auto-lp .pa-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(var(--pa-step-gap) / -2);
  width: 12px;
  height: 18px;
  background: var(--pa-red);
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
  transform: translate(50%, -50%);
  z-index: 1;
}

.patch-auto-lp .pa-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--pa-ink);
  margin-bottom: 0.5rem;
}

.patch-auto-lp .pa-step p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--pa-muted);
}

/* ================================================================
   Boxes / Lists
   ================================================================ */
.patch-auto-lp .pa-box {
  margin-top: clamp(28px, 3.5vw, 40px);
  padding: clamp(22px, 2.8vw, 32px);
  background: var(--pa-soft);
  border: 1px solid var(--pa-line);
  border-radius: 12px;
}

.patch-auto-lp .pa-box-white {
  margin-top: 0;
  background: #fff;
}

.patch-auto-lp .pa-box-title {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.6;
  color: var(--pa-ink);
  margin-bottom: 1rem;
}

.patch-auto-lp .pa-box-lead {
  font-size: 1rem;
  color: var(--pa-muted);
  margin-bottom: 1rem;
}

.patch-auto-lp .pa-list li {
  position: relative;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--pa-text);
  padding: 6px 0 6px 22px;
}

.patch-auto-lp .pa-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 1.05em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pa-red);
}

.patch-auto-lp .pa-list-check li {
  padding-left: 26px;
}

.patch-auto-lp .pa-list-check li::before {
  left: 2px;
  top: 0.95em;
  width: 10px;
  height: 5px;
  border-radius: 0;
  background: none;
  border-bottom: 2px solid var(--pa-red);
  border-left: 2px solid var(--pa-red);
  transform: rotate(-45deg);
}

.patch-auto-lp .pa-list-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 32px;
}

/* ================================================================
   Mid CTA
   ================================================================ */
.patch-auto-lp .pa-mid-cta {
  background: var(--pa-red-tint);
  border-top: 1px solid rgba(171, 1, 11, 0.1);
  border-bottom: 1px solid rgba(171, 1, 11, 0.1);
  padding: 32px 0;
}

.patch-auto-lp .pa-mid-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: var(--pa-max);
  margin: 0 auto;
  padding: 0 var(--pa-pad-x);
}

.patch-auto-lp .pa-mid-cta-text {
  flex: 1 1 420px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--pa-ink);
}

.patch-auto-lp .pa-mid-cta .pa-btn {
  flex-shrink: 0;
}

/* ================================================================
   1. Service 内の重要パッチの箱（#paUrgent）
   ================================================================ */
.patch-auto-lp .pa-box-urgent {
  background: var(--pa-soft);
}

.patch-auto-lp .pa-box-urgent p {
  font-size: 1rem;
  line-height: 1.95;
  color: var(--pa-text);
}

.patch-auto-lp .pa-box-urgent p + p {
  margin-top: 0.8rem;
}

.patch-auto-lp .pa-box-urgent .pa-note {
  font-size: 0.85rem;
  color: var(--pa-faint);
}

/* ================================================================
   7. Pricing
   ================================================================ */
.patch-auto-lp .pa-price-lead {
  max-width: 860px;
  margin: 0 auto clamp(24px, 3vw, 36px);
  padding: 18px 22px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.85;
  color: var(--pa-ink);
  text-align: center;
  background: var(--pa-red-tint);
  border: 2px solid var(--pa-red);
  border-radius: 12px;
}

.patch-auto-lp .pa-price-boxes {
  max-width: 960px;
  margin: 0 auto;
}

.patch-auto-lp .pa-price-box {
  padding: clamp(22px, 2.8vw, 32px);
  background: var(--pa-soft);
  border: 1px solid var(--pa-line);
  border-radius: 12px;
}

.patch-auto-lp .pa-price-box.is-included {
  background: #fff;
}

.patch-auto-lp .pa-price-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--pa-ink);
  margin-bottom: 0.6rem;
}

.patch-auto-lp .pa-price-box p {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--pa-text);
}

.patch-auto-lp .pa-price-note {
  max-width: 960px;
  margin: 1.25rem auto 0;
  font-size: 0.95rem;
  color: var(--pa-muted);
  text-align: center;
}

.patch-auto-lp .pa-price-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 1.75rem;
}

/* ================================================================
   10. FAQ
   ================================================================ */
.patch-auto-lp .pa-faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.patch-auto-lp .pa-faq-item {
  border-bottom: 1px solid var(--pa-line);
}

.patch-auto-lp .pa-faq-q {
  font-size: inherit;
}

.patch-auto-lp .pa-faq-btn {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  position: relative;
  padding: 20px 48px 20px 0;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--pa-ink);
  text-align: left;
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s;
}

.patch-auto-lp .pa-faq-btn:hover {
  color: var(--pa-red);
}

/* 開閉アイコン（＋ → ×） */
.patch-auto-lp .pa-faq-btn::before,
.patch-auto-lp .pa-faq-btn::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--pa-faint);
  transition: transform 0.3s, background-color 0.3s;
}

.patch-auto-lp .pa-faq-btn::after {
  transform: rotate(90deg);
}

.patch-auto-lp .pa-faq-btn[aria-expanded="true"]::before {
  transform: rotate(45deg);
  background: var(--pa-red);
}

.patch-auto-lp .pa-faq-btn[aria-expanded="true"]::after {
  transform: rotate(135deg);
  background: var(--pa-red);
}

.patch-auto-lp .pa-faq-a-inner {
  padding-bottom: 20px;
  font-size: 1rem;
  line-height: 2;
  color: var(--pa-muted);
}

.patch-auto-lp .pa-faq-a-inner a {
  color: var(--pa-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* JSが動いた時だけ閉じる（JSが無い環境では全回答を表示したままにする） */
.patch-auto-lp.is-js .pa-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ================================================================
   11. Related
   ================================================================ */
.patch-auto-lp .pa-related {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
}

.patch-auto-lp .pa-related a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  height: 100%;
  padding: 18px 44px 18px 20px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--pa-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--pa-line);
  border-radius: 10px;
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.patch-auto-lp .pa-related a::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-top: 2px solid var(--pa-red);
  border-right: 2px solid var(--pa-red);
  transform: rotate(45deg);
}

.patch-auto-lp .pa-related a:hover {
  border-color: var(--pa-red);
  color: var(--pa-red);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ================================================================
   12. Final CTA
   ================================================================ */
.patch-auto-lp .pa-final-cta {
  padding: clamp(60px, 8vw, 110px) 0;
  background: var(--pa-red);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.patch-auto-lp .pa-final-cta h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.8;
  color: #fff;
  margin-bottom: 1rem;
}

.patch-auto-lp .pa-final-cta-sub {
  max-width: 760px;
  margin: 0 auto 2.25rem;
  font-size: 1.05rem;
  line-height: 2;
  color: rgba(255, 255, 255, 0.9);
}

.patch-auto-lp .pa-final-cta-phone {
  margin-top: 2rem;
}

.patch-auto-lp .pa-final-cta-tel {
  color: #fff;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.patch-auto-lp .pa-final-cta-hours {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}

/* ================================================================
   Floating CTA（768px以下のみ）
   ================================================================ */
.patch-auto-lp .pa-floating-cta {
  display: none;
}

@media (max-width: 768px) {
  .patch-auto-lp .pa-floating-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    padding: 10px var(--pa-pad-x) calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--pa-line);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .patch-auto-lp .pa-floating-cta.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .patch-auto-lp .pa-floating-cta-inner {
    display: flex;
    gap: 8px;
  }

  .patch-auto-lp .pa-floating-cta .pa-btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 0.9rem;
  }
}

/* ================================================================
   Scroll reveal（JSが動いた時だけ隠す。JSのセーフティネットで最終的に必ず表示される）
   ================================================================ */
.patch-auto-lp.is-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.patch-auto-lp.is-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .patch-auto-lp.is-js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .patch-auto-lp .pa-btn,
  .patch-auto-lp .pa-btn:hover,
  .patch-auto-lp.is-js .pa-faq-a,
  .patch-auto-lp .pa-floating-cta {
    transform: none;
    transition: none;
  }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1024px) {
  .patch-auto-lp .pa-related {
    grid-template-columns: repeat(2, 1fr);
  }

  .patch-auto-lp .pa-grid-service {
    grid-template-columns: repeat(2, 1fr);
  }

  .patch-auto-lp .pa-grid-service > *,
  .patch-auto-lp .pa-grid-service > :nth-child(n + 4) {
    grid-column: auto;
  }

  /* 2列だと最後の1枚が余るので全幅にする */
  .patch-auto-lp .pa-grid-service > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  /* 5ステップは横5列だと窮屈になるので縦並びへ */
  .patch-auto-lp .pa-steps-5,
  .patch-auto-lp .pa-steps-4 {
    --pa-step-gap: 28px;
    grid-template-columns: 1fr;
  }

  .patch-auto-lp .pa-step {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 18px 20px;
  }

  .patch-auto-lp .pa-step::before {
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }

  .patch-auto-lp .pa-step-title {
    margin-bottom: 0.2rem;
  }

  .patch-auto-lp .pa-step:not(:last-child)::after {
    top: auto;
    bottom: calc(var(--pa-step-gap) / -2);
    right: auto;
    left: 50%;
    transform: translate(-50%, 50%) rotate(90deg);
  }
}

@media (max-width: 768px) {
  .patch-auto-lp .pa-grid-2,
  .patch-auto-lp .pa-grid-3,
  .patch-auto-lp .pa-grid-service,
  .patch-auto-lp .pa-bg-list,
  .patch-auto-lp .pa-related,
  .patch-auto-lp .pa-list-2col {
    grid-template-columns: 1fr;
  }

  /* 表はスマホでは行ごとに縦積み（横スクロールさせない） */
  .patch-auto-lp .pa-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .patch-auto-lp .pa-table,
  .patch-auto-lp .pa-table tbody,
  .patch-auto-lp .pa-table tr,
  .patch-auto-lp .pa-table tbody th,
  .patch-auto-lp .pa-table tbody td {
    display: block;
    width: 100%;
  }

  .patch-auto-lp .pa-table tbody tr + tr {
    border-top: 1px solid var(--pa-line);
  }

  .patch-auto-lp .pa-table tbody th,
  .patch-auto-lp .pa-table-spec tbody th {
    width: 100%;
    padding: 12px 16px;
    border-top: none;
  }

  .patch-auto-lp .pa-table tbody td {
    padding: 12px 16px 16px;
    border-top: none;
  }

  /* 対比表：セルの前に列名を出す */
  .patch-auto-lp .pa-table-change tbody th,
  .patch-auto-lp .pa-table-change thead th {
    width: 100%;
  }

  .patch-auto-lp .pa-table-change tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--pa-red);
  }

  .patch-auto-lp .pa-table-change tbody td:last-child {
    border-top: 1px solid #eee;
  }

  .patch-auto-lp .pa-bg-item-wide {
    grid-column: auto;
  }

  .patch-auto-lp .pa-hero-cta {
    flex-direction: column;
  }

  .patch-auto-lp .pa-hero-cta .pa-btn,
  .patch-auto-lp .pa-mid-cta .pa-btn,
  .patch-auto-lp .pa-price-cta .pa-btn,
  .patch-auto-lp .pa-final-cta .pa-btn {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .patch-auto-lp .pa-hero-points li {
    font-size: 0.88rem;
  }

  .patch-auto-lp .pa-hero-plan {
    font-size: 0.9rem;
  }

  .patch-auto-lp .pa-price-lead {
    text-align: left;
  }
}

/* ================================================================
   2026-11-21 デザインの見直し（改行とカード幅）
   ================================================================ */

/* ---- 改行：最後の行に1〜3文字だけ残るのを防ぐ ----
   balance は各行の長さを揃える指定。見出しと、カード内の短い文に使う。
   auto-phrase は日本語を文節の切れ目で折り返す指定（Chrome/Edge のみ。他のブラウザでは無視され、今までどおりの折り返しになる）。 */
.patch-auto-lp h2,
.patch-auto-lp h3 {
  text-wrap: balance;
  word-break: auto-phrase;
}

.patch-auto-lp .pa-step p,
.patch-auto-lp .pa-card p,
.patch-auto-lp .pa-price-box p,
.patch-auto-lp .pa-price-lead,
.patch-auto-lp .pa-mid-cta-text,
.patch-auto-lp .pa-list li,
.patch-auto-lp .pa-bg-item > .pa-note {
  text-wrap: balance;
  word-break: auto-phrase;
}

/* 長めの文は行の長さは揃えず、折り返す位置だけ文節の切れ目にする */
.patch-auto-lp .pa-box p,
.patch-auto-lp .pa-box li {
  word-break: auto-phrase;
}

/* 2つの文が並ぶ短い注記は、文の途中ではなく文と文の間で折り返す */
.patch-auto-lp .pa-nb {
  display: inline-block;
}

/* ---- 横スクロール：body だけだと数px残るので html にも付ける ---- */
html:has(.patch-auto-lp) {
  overflow-x: clip;
}

/* ---- 実績：カードの列を本文幅いっぱいに（960px で止まり、右側が空いていた） ---- */
.patch-auto-lp .pa-record-grid {
  max-width: none;
}

@media (min-width: 1025px) {
  /* ---- サービス内容：5枚のカードを同じ幅に。2段目の2枚は中央に寄せる
     （1段目 424px・2段目 648px と幅が違っていた） ---- */
  .patch-auto-lp .pa-grid-service > :nth-child(n + 4) {
    grid-column: span 2;
  }

  .patch-auto-lp .pa-grid-service > :nth-child(4) {
    grid-column: 2 / span 2;
  }

  .patch-auto-lp .pa-grid-service > :nth-child(5) {
    grid-column: 4 / span 2;
  }
}

@media (min-width: 769px) {
  /* ---- 背景：3枚を同じ幅に。文章の長い3枚目を右列に置き、左列の2枚と高さを揃える
     （3枚目だけ全幅で、1行が長くなっていた） ---- */
  .patch-auto-lp .pa-bg-item-wide {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}
